@nebula.js/sn-pivot-table 4.1.0 → 4.1.1

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.
package/core/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-pivot-table v4.1.0
2
+ * @nebula.js/sn-pivot-table v4.1.1
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -98,7 +98,7 @@ function Go(e,t){let n;return n=t?jo(e).withConfig({displayName:t.label,shouldFo
98
98
  }
99
99
  `),cu.rippleVisible,gu,550,(({theme:e})=>e.transitions.easing.easeInOut),cu.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),cu.child,cu.childLeaving,yu,550,(({theme:e})=>e.transitions.easing.easeInOut),cu.childPulsate,bu,(({theme:e})=>e.transitions.easing.easeInOut)),wu=e.forwardRef((function(t,n){const r=oc({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=r,s=rr(r,uu),[l,c]=e.useState([]),u=e.useRef(0),d=e.useRef(null);e.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const p=e.useRef(!1),h=e.useRef(0),f=e.useRef(null),m=e.useRef(null);e.useEffect((()=>()=>{h.current&&clearTimeout(h.current)}),[]);const g=e.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;c((e=>[...e,Ws.jsx(xu,{classes:{ripple:pc(o.ripple,cu.ripple),rippleVisible:pc(o.rippleVisible,cu.rippleVisible),ripplePulsate:pc(o.ripplePulsate,cu.ripplePulsate),child:pc(o.child,cu.child),childLeaving:pc(o.childLeaving,cu.childLeaving),childPulsate:pc(o.childPulsate,cu.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,d.current=a}),[o]),y=e.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},h.current=setTimeout((()=>{f.current&&(f.current(),f.current=null)}),80)):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[i,g]),b=e.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=e.useCallback(((e,t)=>{if(clearTimeout(h.current),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void(h.current=setTimeout((()=>{v(e,t)})));f.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[]);return e.useImperativeHandle(n,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),Ws.jsx(vu,nr({className:pc(cu.root,o.root,a),ref:m},s,{children:Ws.jsx(Xc,{component:null,exit:!0,children:l})}))}));var Su=wu;function Eu(e){return Ol("MuiButtonBase",e)}var Cu=Tl("MuiButtonBase",["root","disabled","focusVisible"]);const _u=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Mu=cc("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Cu.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ku=e.forwardRef((function(t,n){const r=oc({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:h="a",onBlur:f,onClick:m,onContextMenu:g,onDragLeave:y,onFocus:b,onFocusVisible:v,onKeyDown:x,onKeyUp:w,onMouseDown:S,onMouseLeave:E,onMouseUp:C,onTouchEnd:_,onTouchMove:M,onTouchStart:k,tabIndex:R=0,TouchRippleProps:A,touchRippleRef:I,type:L}=r,D=rr(r,_u),P=e.useRef(null),O=e.useRef(null),T=xl(O,I),{isFocusVisibleRef:N,onFocus:q,onBlur:F,ref:j}=Al(),[z,B]=e.useState(!1);c&&z&&B(!1),e.useImperativeHandle(i,(()=>({focusVisible:()=>{B(!0),P.current.focus()}})),[]);const[W,$]=e.useState(!1);e.useEffect((()=>{$(!0)}),[]);const H=W&&!u&&!c;function G(e,t,n=d){return vl((r=>{t&&t(r);return!n&&O.current&&O.current[e](r),!0}))}e.useEffect((()=>{z&&p&&!u&&W&&O.current.pulsate()}),[u,p,z,W]);const V=G("start",S),U=G("stop",g),Y=G("stop",y),K=G("stop",C),X=G("stop",(e=>{z&&e.preventDefault(),E&&E(e)})),J=G("start",k),Z=G("stop",_),Q=G("stop",M),ee=G("stop",(e=>{F(e),!1===N.current&&B(!1),f&&f(e)}),!1),te=vl((e=>{P.current||(P.current=e.currentTarget),q(e),!0===N.current&&(B(!0),v&&v(e)),b&&b(e)})),ne=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=e.useRef(!1),ie=vl((e=>{p&&!re.current&&z&&O.current&&" "===e.key&&(re.current=!0,O.current.stop(e,(()=>{O.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))})),oe=vl((e=>{p&&" "===e.key&&O.current&&z&&!e.defaultPrevented&&(re.current=!1,O.current.stop(e,(()=>{O.current.pulsate(e)}))),w&&w(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let ae=l;"button"===ae&&(D.href||D.to)&&(ae=h);const se={};"button"===ae?(se.type=void 0===L?"button":L,se.disabled=c):(D.href||D.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=xl(n,j,P),ce=nr({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:R,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=Ca({root:["root",t&&"disabled",n&&"focusVisible"]},Eu,i);return n&&r&&(o.root+=` ${r}`),o})(ce);return Ws.jsxs(Mu,nr({as:ae,className:pc(ue.root,s),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:U,onFocus:te,onKeyDown:ie,onKeyUp:oe,onMouseDown:V,onMouseLeave:X,onMouseUp:K,onDragLeave:Y,onTouchEnd:Z,onTouchMove:Q,onTouchStart:J,ref:le,tabIndex:c?-1:R,type:L},se,D,{children:[a,H?Ws.jsx(Su,nr({ref:T,center:o},A)):null]}))}));var Ru=ku;function Au(e){return Ol("MuiTypography",e)}Tl("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Iu=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Lu=cc("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${dl(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>nr({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),Du={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Pu={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Ou=e.forwardRef((function(e,t){const n=oc({props:e,name:"MuiTypography"}),r=(e=>Pu[e]||e)(n.color),i=Gs(nr({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Du}=i,h=rr(i,Iu),f=nr({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=s||(u?"p":p[d]||Du[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return Ca({root:["root",o,"inherit"!==e.align&&`align${dl(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},Au,a)})(f);return Ws.jsx(Lu,nr({as:m,ref:t,ownerState:f,className:pc(g.root,a)},h))}));var Tu=Ou;const Nu=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function qu(e){const t=[],n=[];return Array.from(e.querySelectorAll(Nu)).forEach(((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function Fu(){return!0}function ju(t){const{children:n,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:o=!1,getTabbable:a=qu,isEnabled:s=Fu,open:l}=t,c=e.useRef(!1),u=e.useRef(null),d=e.useRef(null),p=e.useRef(null),h=e.useRef(null),f=e.useRef(!1),m=e.useRef(null),g=Sa(n.ref,m),y=e.useRef(null);e.useEffect((()=>{l&&m.current&&(f.current=!r)}),[r,l]),e.useEffect((()=>{if(!l||!m.current)return;const e=ya(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),f.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}}),[l]),e.useEffect((()=>{if(!l||!m.current)return;const e=ya(m.current),t=t=>{y.current=t,!i&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(i&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(m.current)),n.length>0){var r,o;const e=Boolean((null==(r=y.current)?void 0:r.shiftKey)&&"Tab"===(null==(o=y.current)?void 0:o.key)),t=n[0],i=n[n.length-1];"string"!=typeof t&&"string"!=typeof i&&(e?i.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[r,i,o,s,l,a]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0};return Ws.jsxs(e.Fragment,{children:[Ws.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),e.cloneElement(n,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0,h.current=e.target;const t=n.props.onFocus;t&&t(e)}}),Ws.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const zu=e.forwardRef((function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=e.useState(null),l=Sa(e.isValidElement(r)?r.ref:null,n);if(xa((()=>{o||s(function(e){return"function"==typeof e?e():e}(i)||document.body)}),[i,o]),xa((()=>{if(a&&!o)return va(n,a),()=>{va(n,null)}}),[n,a,o]),o){if(e.isValidElement(r)){const t={ref:l};return e.cloneElement(r,t)}return Ws.jsx(e.Fragment,{children:r})}return Ws.jsx(e.Fragment,{children:a?q.createPortal(r,a):a})}));function Bu(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Wu(e){return parseInt(ba(e).getComputedStyle(e).paddingRight,10)||0}function $u(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Bu(e,i)}))}function Hu(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function Gu(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=ya(e);return t.body===e?ba(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(ya(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Wu(r)+e}px`;const t=ya(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Wu(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=ya(r).body;else{const t=r.parentElement,n=ba(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const Vu=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Bu(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);$u(t,e.mount,e.modalRef,r,!0);const i=Hu(this.containers,(e=>e.container===t));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Hu(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=Gu(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Hu(this.containers,(t=>-1!==t.modals.indexOf(e))),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&Bu(e.modalRef,t),$u(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&Bu(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Uu(t){const{container:n,disableEscapeKeyDown:r=!1,disableScrollLock:i=!1,manager:o=Vu,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:p}=t,h=e.useRef({}),f=e.useRef(null),m=e.useRef(null),g=Sa(m,p),[y,b]=e.useState(!d),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;"false"!==t["aria-hidden"]&&!1!==t["aria-hidden"]||(x=!1);const w=()=>(h.current.modalRef=m.current,h.current.mount=f.current,h.current),S=()=>{o.mount(w(),{disableScrollLock:i}),m.current&&(m.current.scrollTop=0)},E=wa((()=>{const e=function(e){return"function"==typeof e?e():e}(n)||ya(f.current).body;o.add(w(),e),m.current&&S()})),C=e.useCallback((()=>o.isTopModal(w())),[o]),_=wa((e=>{f.current=e,e&&(d&&C()?S():m.current&&Bu(m.current,x))})),M=e.useCallback((()=>{o.remove(w(),x)}),[x,o]);e.useEffect((()=>()=>{M()}),[M]),e.useEffect((()=>{d?E():v&&a||M()}),[d,M,v,a,E]);const k=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&C()&&(r||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},R=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(e={})=>{const n=ou(t);delete n.onTransitionEnter,delete n.onTransitionExited;const r=dn({},n,e);return dn({role:"presentation"},r,{onKeyDown:k(r),ref:g})},getBackdropProps:(e={})=>dn({"aria-hidden":!0},e,{onClick:R(e),open:d}),getTransitionProps:()=>({onEnter:ga((()=>{b(!1),s&&s()}),null==c?void 0:c.props.onEnter),onExited:ga((()=>{b(!0),l&&l(),a&&M()}),null==c?void 0:c.props.onExited)}),rootRef:g,portalRef:_,isTopModal:C,exited:y,hasTransition:v}}const Yu=["onChange","maxRows","minRows","style","value"];function Ku(e){return parseInt(e,10)||0}const Xu={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Ju(e){return null==e||0===Object.keys(e).length||0===e.outerHeightStyle&&!e.overflow}const Zu=e.forwardRef((function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:a,value:s}=t,l=bn(t,Yu),{current:c}=e.useRef(null!=s),u=e.useRef(null),d=Sa(n,u),p=e.useRef(null),h=e.useRef(0),[f,m]=e.useState({outerHeightStyle:0}),g=e.useCallback((()=>{const e=u.current,n=ba(e).getComputedStyle(e);if("0px"===n.width)return{outerHeightStyle:0};const r=p.current;r.style.width=n.width,r.value=e.value||t.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const a=n.boxSizing,s=Ku(n.paddingBottom)+Ku(n.paddingTop),l=Ku(n.borderBottomWidth)+Ku(n.borderTopWidth),c=r.scrollHeight;r.value="x";const d=r.scrollHeight;let h=c;o&&(h=Math.max(Number(o)*d,h)),i&&(h=Math.min(Number(i)*d,h)),h=Math.max(h,d);return{outerHeightStyle:h+("border-box"===a?s+l:0),overflow:Math.abs(h-c)<=1}}),[i,o,t.placeholder]),y=(e,t)=>{const{outerHeightStyle:n,overflow:r}=t;return h.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==r)?(h.current+=1,{overflow:r,outerHeightStyle:n}):e},b=e.useCallback((()=>{const e=g();Ju(e)||m((t=>y(t,e)))}),[g]);xa((()=>{const e=()=>{h.current=0,(()=>{const e=g();Ju(e)||q.flushSync((()=>{m((t=>y(t,e)))}))})()};const t=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}(e),n=u.current,r=ba(n);let i;return r.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(e),i.observe(n)),()=>{t.clear(),cancelAnimationFrame(undefined),r.removeEventListener("resize",t),i&&i.disconnect()}}),[g]),xa((()=>{b()})),e.useEffect((()=>{h.current=0}),[s]);return Ws.jsxs(e.Fragment,{children:[Ws.jsx("textarea",dn({value:s,onChange:e=>{h.current=0,c||b(),r&&r(e)},ref:d,rows:o,style:dn({height:f.outerHeightStyle,overflow:f.overflow?"hidden":void 0},a)},l)),Ws.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:dn({},Xu,a,{paddingTop:0,paddingBottom:0})})]})}));function Qu({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}var ed=e.createContext(void 0);function td(){return e.useContext(ed)}function nd(e){return Ws.jsx($s,nr({},e,{defaultTheme:rc,themeId:tr}))}function rd(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function id(e,t=!1){return e&&(rd(e.value)&&""!==e.value||t&&rd(e.defaultValue)&&""!==e.defaultValue)}function od(e){return Ol("MuiInputBase",e)}var ad=Tl("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);const sd=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],ld=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${dl(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},cd=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},ud=cc("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ld})((({theme:e,ownerState:t})=>nr({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ad.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&nr({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),dd=cc("input",{name:"MuiInputBase",slot:"Input",overridesResolver:cd})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=nr({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return nr({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ad.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${ad.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})})),pd=Ws.jsx(nd,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),hd=e.forwardRef((function(t,n){var r;const i=oc({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:h,endAdornment:f,fullWidth:m=!1,id:g,inputComponent:y="input",inputProps:b={},inputRef:v,maxRows:x,minRows:w,multiline:S=!1,name:E,onBlur:C,onChange:_,onClick:M,onFocus:k,onKeyDown:R,onKeyUp:A,placeholder:I,readOnly:L,renderSuffix:D,rows:P,slotProps:O={},slots:T={},startAdornment:N,type:q="text",value:F}=i,j=rr(i,sd),z=null!=b.value?b.value:F,{current:B}=e.useRef(null!=z),W=e.useRef(),$=e.useCallback((e=>{}),[]),H=xl(W,v,b.ref,$),[G,V]=e.useState(!1),U=td(),Y=Qu({props:i,muiFormControl:U,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Y.focused=U?U.focused:G,e.useEffect((()=>{!U&&p&&G&&(V(!1),C&&C())}),[U,p,G,C]);const K=U&&U.onFilled,X=U&&U.onEmpty,J=e.useCallback((e=>{id(e)?K&&K():X&&X()}),[K,X]);fl((()=>{B&&J({value:z})}),[z,J,B]);e.useEffect((()=>{J(W.current)}),[]);let Z=y,Q=b;S&&"input"===Z&&(Q=nr(P?{type:void 0,minRows:P,maxRows:P}:{type:void 0,maxRows:x,minRows:w},Q),Z=Zu);e.useEffect((()=>{U&&U.setAdornedStart(Boolean(N))}),[U,N]);const ee=nr({},i,{color:Y.color||"primary",disabled:Y.disabled,endAdornment:f,error:Y.error,focused:Y.focused,formControl:U,fullWidth:m,hiddenLabel:Y.hiddenLabel,multiline:S,size:Y.size,startAdornment:N,type:q}),te=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:h,type:f}=e;return Ca({root:["root",`color${dl(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${dl(p)}`,u&&"multiline",h&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",h&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]},od,t)})(ee),ne=T.root||c.Root||ud,re=O.root||u.root||{},ie=T.input||c.Input||dd;return Q=nr({},Q,null!=(r=O.input)?r:u.input),Ws.jsxs(e.Fragment,{children:[!h&&pd,Ws.jsxs(ne,nr({},re,!iu(ne)&&{ownerState:nr({},ee,re.ownerState)},{ref:n,onClick:e=>{W.current&&e.currentTarget===e.target&&W.current.focus(),M&&M(e)}},j,{className:pc(te.root,re.className,l,L&&"MuiInputBase-readOnly"),children:[N,Ws.jsx(ed.Provider,{value:null,children:Ws.jsx(ie,nr({ownerState:ee,"aria-invalid":Y.error,"aria-describedby":o,autoComplete:a,autoFocus:s,defaultValue:d,disabled:Y.disabled,id:g,onAnimationStart:e=>{J("mui-auto-fill-cancel"===e.animationName?W.current:{value:"x"})},name:E,placeholder:I,readOnly:L,required:Y.required,rows:P,value:z,onKeyDown:R,onKeyUp:A,type:q},Q,!iu(ie)&&{as:Z,ownerState:nr({},ee,Q.ownerState)},{ref:H,className:pc(te.input,Q.className,L&&"MuiInputBase-readOnly"),onBlur:e=>{C&&C(e),b.onBlur&&b.onBlur(e),U&&U.onBlur?U.onBlur(e):V(!1)},onChange:(e,...t)=>{if(!B){const t=e.target||W.current;if(null==t)throw new Error(er(1));J({value:t.value})}b.onChange&&b.onChange(e,...t),_&&_(e,...t)},onFocus:e=>{Y.disabled?e.stopPropagation():(k&&k(e),b.onFocus&&b.onFocus(e),U&&U.onFocus?U.onFocus(e):V(!0))}}))}),f,D?D(nr({},Y,{startAdornment:N})):null]}))]})}));var fd=hd;function md(e){return Ol("MuiInput",e)}var gd=nr({},ad,Tl("MuiInput",["root","underline","input"]));function yd(e){return Ol("MuiOutlinedInput",e)}var bd=nr({},ad,Tl("MuiOutlinedInput",["root","notchedOutline","input"]));function vd(e){return Ol("MuiFilledInput",e)}var xd=nr({},ad,Tl("MuiFilledInput",["root","underline","input"])),wd=function(t,n){function r(e,r){return Ws.jsx(yc,nr({"data-testid":`${n}Icon`,ref:r},e,{children:t}))}return r.muiName=yc.muiName,e.memo(e.forwardRef(r))}(Ws.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const Sd=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Ed={entering:{opacity:1},entered:{opacity:1}},Cd=e.forwardRef((function(t,n){const r=ic(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:h,onExited:f,onExiting:m,style:g,timeout:y=i,TransitionComponent:b=Hc}=t,v=rr(t,Sd),x=e.useRef(null),w=xl(x,s.ref,n),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(p),C=S(((e,t)=>{Jc(e);const n=Zc({style:g,timeout:y,easing:l},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),u&&u(e,t)})),_=S(d),M=S(m),k=S((e=>{const t=Zc({style:g,timeout:y,easing:l},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),h&&h(e)})),R=S(f);return Ws.jsx(b,nr({appear:a,in:c,nodeRef:x,onEnter:C,onEntered:_,onEntering:E,onExit:k,onExited:R,onExiting:M,addEndListener:e=>{o&&o(x.current,e)},timeout:y},v,{children:(t,n)=>e.cloneElement(s,nr({style:nr({opacity:0,visibility:"exited"!==t||c?void 0:"hidden"},Ed[t],g,s.props.style),ref:w},n))}))}));var _d=Cd;function Md(e){return Ol("MuiBackdrop",e)}Tl("MuiBackdrop",["root","invisible"]);const kd=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Rd=cc("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>nr({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),Ad=e.forwardRef((function(e,t){var n,r,i;const o=oc({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:h={},slots:f={},TransitionComponent:m=_d,transitionDuration:g}=o,y=rr(o,kd),b=nr({},o,{component:l,invisible:d}),v=(e=>{const{classes:t,invisible:n}=e;return Ca({root:["root",n&&"invisible"]},Md,t)})(b),x=null!=(n=h.root)?n:u.root;return Ws.jsx(m,nr({in:p,timeout:g},y,{children:Ws.jsx(Rd,nr({"aria-hidden":!0},x,{as:null!=(r=null!=(i=f.root)?i:c.Root)?r:l,className:pc(v.root,s,null==x?void 0:x.className),ownerState:nr({},b,null==x?void 0:x.ownerState),classes:v,ref:t,children:a}))}))}));var Id=Ad;var Ld=Tl("MuiBox",["root"]);const Dd=nc(),Pd=function(t={}){const{themeId:n,defaultTheme:r,defaultClassName:i="MuiBox-root",generateClassName:o}=t,a=Go("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Ms),s=e.forwardRef((function(e,t){const s=Ds(r),l=Gs(e),{className:c,component:u="div"}=l,d=bn(l,Vs);return Ws.jsx(a,dn({as:u,ref:t,className:Ma(c,o?o(i):i),theme:n&&s[n]||s},d))}));return s}({themeId:tr,defaultTheme:Dd,defaultClassName:Ld.root,generateClassName:Dl.generate});var Od=Pd;function Td(e){return Ol("MuiButton",e)}var Nd=Tl("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var qd=e.createContext({});var Fd=e.createContext(void 0);const jd=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],zd=e=>nr({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),Bd=cc(Ru,{shouldForwardProp:e=>ac(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${dl(n.color)}`],t[`size${dl(n.size)}`],t[`${n.variant}Size${dl(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const i="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],o="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return nr({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":nr({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:sl(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:sl(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:sl(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":nr({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Nd.focusVisible}`]:nr({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Nd.disabled}`]:nr({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${sl(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Nd.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Nd.disabled}`]:{boxShadow:"none"}})),Wd=cc("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${dl(n.size)}`]]}})((({ownerState:e})=>nr({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},zd(e)))),$d=cc("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${dl(n.size)}`]]}})((({ownerState:e})=>nr({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},zd(e)))),Hd=e.forwardRef((function(t,n){const r=e.useContext(qd),i=e.useContext(Fd),o=oc({props:Il(r,t),name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:f,fullWidth:m=!1,size:g="medium",startIcon:y,type:b,variant:v="text"}=o,x=rr(o,jd),w=nr({},o,{color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:p,fullWidth:m,size:g,type:b,variant:v}),S=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e;return nr({},a,Ca({root:["root",o,`${o}${dl(t)}`,`size${dl(i)}`,`${o}Size${dl(i)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${dl(i)}`],endIcon:["endIcon",`iconSize${dl(i)}`]},Td,a))})(w),E=y&&Ws.jsx(Wd,{className:S.startIcon,ownerState:w,children:y}),C=h&&Ws.jsx($d,{className:S.endIcon,ownerState:w,children:h}),_=i||"";return Ws.jsxs(Bd,nr({ownerState:w,className:pc(r.className,S.root,c,_),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:pc(S.focusVisible,f),ref:n,type:b},x,{classes:S,children:[E,a,C]}))}));var Gd=Hd;function Vd(e){return Ol("MuiModal",e)}Tl("MuiModal",["root","hidden","backdrop"]);const Ud=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Yd=cc("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>nr({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),Kd=cc(Id,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Xd=e.forwardRef((function(t,n){var r,i,o,a,s,l;const c=oc({name:"MuiModal",props:t}),{BackdropComponent:u=Kd,BackdropProps:d,className:p,closeAfterTransition:h=!1,children:f,container:m,component:g,components:y={},componentsProps:b={},disableAutoFocus:v=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:w=!1,disablePortal:S=!1,disableRestoreFocus:E=!1,disableScrollLock:C=!1,hideBackdrop:_=!1,keepMounted:M=!1,onBackdropClick:k,open:R,slotProps:A,slots:I}=c,L=rr(c,Ud),D=nr({},c,{closeAfterTransition:h,disableAutoFocus:v,disableEnforceFocus:x,disableEscapeKeyDown:w,disablePortal:S,disableRestoreFocus:E,disableScrollLock:C,hideBackdrop:_,keepMounted:M}),{getRootProps:P,getBackdropProps:O,getTransitionProps:T,portalRef:N,isTopModal:q,exited:F,hasTransition:j}=Uu(nr({},D,{rootRef:n})),z=nr({},D,{exited:F}),B=(e=>{const{open:t,exited:n,classes:r}=e;return Ca({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Vd,r)})(z),W={};if(void 0===f.props.tabIndex&&(W.tabIndex="-1"),j){const{onEnter:e,onExited:t}=T();W.onEnter=e,W.onExited=t}const $=null!=(r=null!=(i=null==I?void 0:I.root)?i:y.Root)?r:Yd,H=null!=(o=null!=(a=null==I?void 0:I.backdrop)?a:y.Backdrop)?o:u,G=null!=(s=null==A?void 0:A.root)?s:b.root,V=null!=(l=null==A?void 0:A.backdrop)?l:b.backdrop,U=lu({elementType:$,externalSlotProps:G,externalForwardedProps:L,getSlotProps:P,additionalProps:{ref:n,as:g},ownerState:z,className:pc(p,null==G?void 0:G.className,null==B?void 0:B.root,!z.open&&z.exited&&(null==B?void 0:B.hidden))}),Y=lu({elementType:H,externalSlotProps:V,additionalProps:d,getSlotProps:e=>O(nr({},e,{onClick:t=>{k&&k(t),null!=e&&e.onClick&&e.onClick(t)}})),className:pc(null==V?void 0:V.className,null==d?void 0:d.className,null==B?void 0:B.backdrop),ownerState:z});return M||R||j&&!F?Ws.jsx(zu,{ref:N,container:m,disablePortal:S,children:Ws.jsxs($,nr({},U,{children:[!_&&u?Ws.jsx(H,nr({},Y)):null,Ws.jsx(ju,{disableEnforceFocus:x,disableAutoFocus:v,disableRestoreFocus:E,isEnabled:q,open:R,children:e.cloneElement(f,W)})]}))}):null}));var Jd=Xd;function Zd(e){return Ol("MuiDivider",e)}var Qd=Tl("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const ep=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],tp=cc("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>nr({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:sl(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>nr({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>nr({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>nr({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>nr({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),np=cc("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>nr({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),rp=e.forwardRef((function(e,t){const n=oc({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=n,h=rr(n,ep),f=nr({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e;return Ca({root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},Zd,r)})(f);return Ws.jsx(tp,nr({as:a,className:pc(m.root,o),role:u,ref:t,ownerState:f},h,{children:i?Ws.jsx(np,{className:m.wrapper,ownerState:f,children:i}):null}))}));rp.muiSkipListHighlight=!0;var ip=rp;const op=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],ap=cc(ud,{shouldForwardProp:e=>ac(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ld(e,t),!n.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{var n;const r="light"===e.palette.mode,i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return nr({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${xd.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${xd.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${xd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${xd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${xd.disabled}, .${xd.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${xd.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&nr({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))})),sp=cc(dd,{name:"MuiFilledInput",slot:"Input",overridesResolver:cd})((({theme:e,ownerState:t})=>nr({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}))),lp=e.forwardRef((function(e,t){var n,r,i,o;const a=oc({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:p,slots:h={},type:f="text"}=a,m=rr(a,op),g=nr({},a,{fullWidth:c,inputComponent:u,multiline:d,type:f}),y=(e=>{const{classes:t,disableUnderline:n}=e;return nr({},t,Ca({root:["root",!n&&"underline"],input:["input"]},vd,t))})(a),b={root:{ownerState:g},input:{ownerState:g}},v=(null!=p?p:l)?ul(b,null!=p?p:l):b,x=null!=(n=null!=(r=h.root)?r:s.Root)?n:ap,w=null!=(i=null!=(o=h.input)?o:s.Input)?i:sp;return Ws.jsx(fd,nr({slots:{root:x,input:w},componentsProps:v,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:f},m,{classes:y}))}));lp.muiName="Input";var cp=lp;const up=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function dp(e){return`scale(${e}, ${e**2})`}const pp={entering:{opacity:1,transform:dp(1)},entered:{opacity:1,transform:"none"}},hp="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),fp=e.forwardRef((function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:h,style:f,timeout:m="auto",TransitionComponent:g=Hc}=t,y=rr(t,up),b=e.useRef(),v=e.useRef(),x=ic(),w=e.useRef(null),S=xl(w,o.ref,n),E=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},C=E(u),_=E(((e,t)=>{Jc(e);const{duration:n,delay:r,easing:i}=Zc({style:f,timeout:m,easing:a},{mode:"enter"});let o;"auto"===m?(o=x.transitions.getAutoHeightDuration(e.clientHeight),v.current=o):o=n,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:r}),x.transitions.create("transform",{duration:hp?o:.666*o,delay:r,easing:i})].join(","),l&&l(e,t)})),M=E(c),k=E(h),R=E((e=>{const{duration:t,delay:n,easing:r}=Zc({style:f,timeout:m,easing:a},{mode:"exit"});let i;"auto"===m?(i=x.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:n}),x.transitions.create("transform",{duration:hp?i:.666*i,delay:hp?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=dp(.75),d&&d(e)})),A=E(p);return e.useEffect((()=>()=>{clearTimeout(b.current)}),[]),Ws.jsx(g,nr({appear:i,in:s,nodeRef:w,onEnter:_,onEntered:M,onEntering:C,onExit:R,onExited:A,onExiting:k,addEndListener:e=>{"auto"===m&&(b.current=setTimeout(e,v.current||0)),r&&r(w.current,e)},timeout:"auto"===m?null:m},y,{children:(t,n)=>e.cloneElement(o,nr({style:nr({opacity:0,transform:dp(.75),visibility:"exited"!==t||s?void 0:"hidden"},pp[t],f,o.props.style),ref:S},n))}))}));fp.muiSupportAuto=!0;var mp=fp;const gp=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],yp=cc(ud,{shouldForwardProp:e=>ac(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ld(e,t),!n.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),nr({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${gd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${gd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${gd.disabled}, .${gd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${gd.disabled}:before`]:{borderBottomStyle:"dotted"}})})),bp=cc(dd,{name:"MuiInput",slot:"Input",overridesResolver:cd})({}),vp=e.forwardRef((function(e,t){var n,r,i,o;const a=oc({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:h,slots:f={},type:m="text"}=a,g=rr(a,gp),y=(e=>{const{classes:t,disableUnderline:n}=e;return nr({},t,Ca({root:["root",!n&&"underline"],input:["input"]},md,t))})(a),b={root:{ownerState:{disableUnderline:s}}},v=(null!=h?h:c)?ul(null!=h?h:c,b):b,x=null!=(n=null!=(r=f.root)?r:l.Root)?n:yp,w=null!=(i=null!=(o=f.input)?o:l.Input)?i:bp;return Ws.jsx(fd,nr({slots:{root:x,input:w},slotProps:v,fullWidth:u,inputComponent:d,multiline:p,ref:t,type:m},g,{classes:y}))}));vp.muiName="Input";var xp=vp;function wp(e){return Ol("MuiLink",e)}var Sp=Tl("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);const Ep={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var Cp=({theme:e,ownerState:t})=>{const n=(e=>Ep[e]||e)(t.color),r=Oa(e,`palette.${n}`,!1)||t.color,i=Oa(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:sl(r,.4)};const _p=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Mp=cc(Tu,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${dl(n.underline)}`],"button"===n.component&&t.button]}})((({theme:e,ownerState:t})=>nr({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&nr({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:Cp({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Sp.focusVisible}`]:{outline:"auto"}}))),kp=e.forwardRef((function(t,n){const r=oc({props:t,name:"MuiLink"}),{className:i,color:o="primary",component:a="a",onBlur:s,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=r,h=rr(r,_p),{isFocusVisibleRef:f,onBlur:m,onFocus:g,ref:y}=Al(),[b,v]=e.useState(!1),x=xl(n,y),w=nr({},r,{color:o,component:a,focusVisible:b,underline:u,variant:d}),S=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e;return Ca({root:["root",`underline${dl(i)}`,"button"===n&&"button",r&&"focusVisible"]},wp,t)})(w);return Ws.jsx(Mp,nr({color:o,className:pc(S.root,i),classes:c,component:a,onBlur:e=>{m(e),!1===f.current&&v(!1),s&&s(e)},onFocus:e=>{g(e),!0===f.current&&v(!0),l&&l(e)},ref:x,ownerState:w,variant:d,sx:[...Object.keys(Ep).includes(o)?[]:[{color:o}],...Array.isArray(p)?p:[p]]},h))}));var Rp=kp;var Ap=e.createContext({});function Ip(e){return Ol("MuiList",e)}Tl("MuiList",["root","padding","dense","subheader"]);const Lp=["children","className","component","dense","disablePadding","subheader"],Dp=cc("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>nr({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),Pp=e.forwardRef((function(t,n){const r=oc({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=r,u=rr(r,Lp),d=e.useMemo((()=>({dense:s})),[s]),p=nr({},r,{component:a,dense:s,disablePadding:l}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Ca({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Ip,t)})(p);return Ws.jsx(Ap.Provider,{value:d,children:Ws.jsxs(Dp,nr({as:a,className:pc(h.root,o),ref:n,ownerState:p},u,{children:[c,i]}))})}));var Op=Pp;function Tp(e){return Ol("MuiListItemIcon",e)}var Np=Tl("MuiListItemIcon",["root","alignItemsFlexStart"]);const qp=["className"],Fp=cc("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>nr({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})));var jp=e.forwardRef((function(t,n){const r=oc({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=rr(r,qp),a=nr({},r,{alignItems:e.useContext(Ap).alignItems}),s=(e=>{const{alignItems:t,classes:n}=e;return Ca({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Tp,n)})(a);return Ws.jsx(Fp,nr({className:pc(s.root,i),ownerState:a,ref:n},o))}));var zp=Tl("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const Bp=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Wp(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function $p(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Hp(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Gp(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Hp(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const Vp=e.forwardRef((function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,p=rr(t,Bp),h=e.useRef(null),f=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});fl((()=>{i&&h.current.focus()}),[i]),e.useImperativeHandle(r,(()=>({adjustStyleForScrollbar:(e,t)=>{const n=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&n){const n=`${function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(pl(e))}px`;h.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=n,h.current.style.width=`calc(100% + ${n})`}return h.current}})),[]);const m=xl(h,n);let g=-1;e.Children.forEach(a,((t,n)=>{e.isValidElement(t)?(t.props.disabled||("selectedMenu"===d&&t.props.selected||-1===g)&&(g=n),g===n&&(t.props.disabled||t.props.muiSkipListHighlight||t.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===n&&(g+=1,g>=a.length&&(g=-1))}));const y=e.Children.map(a,((t,n)=>{if(n===g){const n={};return o&&(n.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===d&&(n.tabIndex=0),e.cloneElement(t,n)}return t}));return Ws.jsx(Op,nr({role:"menu",ref:m,className:s,onKeyDown:e=>{const t=h.current,n=e.key,r=pl(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Gp(t,r,c,l,Wp);else if("ArrowUp"===n)e.preventDefault(),Gp(t,r,c,l,$p);else if("Home"===n)e.preventDefault(),Gp(t,null,c,l,Wp);else if("End"===n)e.preventDefault(),Gp(t,null,c,l,$p);else if(1===n.length){const i=f.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const s=r&&!i.repeating&&Hp(r,i);i.previousKeyMatched&&(s||Gp(t,r,!1,l,Wp,i))?e.preventDefault():i.previousKeyMatched=!1}u&&u(e)},tabIndex:i?0:-1},p,{children:y}))}));var Up=Vp;function Yp(e){return Ol("MuiPopover",e)}Tl("MuiPopover",["root","paper"]);const Kp=["onEntering"],Xp=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Jp=["slotProps"];function Zp(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Qp(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function eh(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function th(e){return"function"==typeof e?e():e}const nh=cc(Jd,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),rh=cc(ru,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),ih=e.forwardRef((function(t,n){var r,i,o;const a=oc({props:t,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:h,container:f,elevation:m=8,marginThreshold:g=16,open:y,PaperProps:b={},slots:v,slotProps:x,transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:S=mp,transitionDuration:E="auto",TransitionProps:{onEntering:C}={},disableScrollLock:_=!1}=a,M=rr(a.TransitionProps,Kp),k=rr(a,Xp),R=null!=(r=null==x?void 0:x.paper)?r:b,A=e.useRef(),I=xl(A,R.ref),L=nr({},a,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:g,externalPaperSlotProps:R,transformOrigin:w,TransitionComponent:S,transitionDuration:E,TransitionProps:M}),D=(e=>{const{classes:t}=e;return Ca({root:["root"],paper:["paper"]},Yp,t)})(L),P=e.useCallback((()=>{if("anchorPosition"===d)return u;const e=th(l),t=(e&&1===e.nodeType?e:pl(A.current).body).getBoundingClientRect();return{top:t.top+Zp(t,c.vertical),left:t.left+Qp(t,c.horizontal)}}),[l,c.horizontal,c.vertical,u,d]),O=e.useCallback((e=>({vertical:Zp(e,w.vertical),horizontal:Qp(e,w.horizontal)})),[w.horizontal,w.vertical]),T=e.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=O(t);if("none"===d)return{top:null,left:null,transformOrigin:eh(n)};const r=P();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,s=o+t.width,c=hl(th(l)),u=c.innerHeight-g,p=c.innerWidth-g;if(null!==g&&i<g){const e=i-g;i-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;i-=e,n.vertical+=e}if(null!==g&&o<g){const e=o-g;o-=e,n.horizontal+=e}else if(s>p){const e=s-p;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:eh(n)}}),[l,d,P,O,g]),[N,q]=e.useState(y),F=e.useCallback((()=>{const e=A.current;if(!e)return;const t=T(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,q(!0)}),[T]);e.useEffect((()=>(_&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F))),[l,_,F]);e.useEffect((()=>{y&&F()})),e.useImperativeHandle(s,(()=>y?{updatePosition:()=>{F()}}:null),[y,F]),e.useEffect((()=>{if(!y)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}((()=>{F()})),t=hl(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,y,F]);let j=E;"auto"!==E||S.muiSupportAuto||(j=void 0);const z=f||(l?pl(th(l)).body:void 0),B=null!=(i=null==v?void 0:v.root)?i:nh,W=null!=(o=null==v?void 0:v.paper)?o:rh,$=lu({elementType:W,externalSlotProps:nr({},R,{style:N?R.style:nr({},R.style,{opacity:0})}),additionalProps:{elevation:m,ref:I},ownerState:L,className:pc(D.paper,null==R?void 0:R.className)}),H=lu({elementType:B,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:k,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:z,open:y},ownerState:L,className:pc(D.root,h)}),{slotProps:G}=H,V=rr(H,Jp);return Ws.jsx(B,nr({},V,!iu(B)&&{slotProps:G,disableScrollLock:_},{children:Ws.jsx(S,nr({appear:!0,in:y,onEntering:(e,t)=>{C&&C(e,t),F()},onExited:()=>{q(!1)},timeout:j},M,{children:Ws.jsx(W,nr({},$,{children:p}))}))}))}));var oh=ih;function ah(e){return Ol("MuiMenu",e)}Tl("MuiMenu",["root","paper","list"]);const sh=["onEntering"],lh=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],ch={vertical:"top",horizontal:"right"},uh={vertical:"top",horizontal:"left"},dh=cc(oh,{shouldForwardProp:e=>ac(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ph=cc(rh,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),hh=cc(Up,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),fh=e.forwardRef((function(t,n){var r,i;const o=oc({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:h={},PopoverClasses:f,transitionDuration:m="auto",TransitionProps:{onEntering:g}={},variant:y="selectedMenu",slots:b={},slotProps:v={}}=o,x=rr(o.TransitionProps,sh),w=rr(o,lh),S=ic(),E="rtl"===S.direction,C=nr({},o,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:g,PaperProps:h,transitionDuration:m,TransitionProps:x,variant:y}),_=(e=>{const{classes:t}=e;return Ca({root:["root"],paper:["paper"],list:["list"]},ah,t)})(C),M=a&&!c&&p,k=e.useRef(null);let R=-1;e.Children.map(s,((t,n)=>{e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===y&&t.props.selected||-1===R)&&(R=n))}));const A=null!=(r=b.paper)?r:ph,I=null!=(i=v.paper)?i:h,L=lu({elementType:b.root,externalSlotProps:v.root,ownerState:C,className:[_.root,l]}),D=lu({elementType:A,externalSlotProps:I,ownerState:C,className:_.paper});return Ws.jsx(dh,nr({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?ch:uh,slots:{paper:A,root:b.root},slotProps:{root:L,paper:D},open:p,ref:n,transitionDuration:m,TransitionProps:nr({onEntering:(e,t)=>{k.current&&k.current.adjustStyleForScrollbar(e,S),g&&g(e,t)}},x),ownerState:C},w,{classes:f,children:Ws.jsx(hh,nr({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:k,autoFocus:a&&(-1===R||c),autoFocusItem:M,variant:y},u,{className:pc(_.list,u.className),children:s}))}))}));var mh=fh;function gh(e){return Ol("MuiMenuItem",e)}var yh=Tl("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const bh=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],vh=cc(Ru,{shouldForwardProp:e=>ac(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>nr({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${yh.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:sl(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${yh.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:sl(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${yh.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:sl(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:sl(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${yh.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${yh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Qd.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Qd.inset}`]:{marginLeft:52},[`& .${zp.root}`]:{marginTop:0,marginBottom:0},[`& .${zp.inset}`]:{paddingLeft:36},[`& .${Np.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&nr({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Np.root} svg`]:{fontSize:"1.25rem"}})))),xh=e.forwardRef((function(t,n){const r=oc({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=r,h=rr(r,bh),f=e.useContext(Ap),m=e.useMemo((()=>({dense:a||f.dense||!1,disableGutters:l})),[f.dense,a,l]),g=e.useRef(null);fl((()=>{i&&g.current&&g.current.focus()}),[i]);const y=nr({},r,{dense:m.dense,divider:s,disableGutters:l}),b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e;return nr({},a,Ca({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},gh,a))})(r),v=xl(g,n);let x;return r.disabled||(x=void 0!==d?d:-1),Ws.jsx(Ap.Provider,{value:m,children:Ws.jsx(vh,nr({ref:v,role:u,tabIndex:x,component:o,focusVisibleClassName:pc(b.focusVisible,c),className:pc(b.root,p)},h,{ownerState:y,classes:b}))})}));var wh=xh;function Sh(e){return Ol("MuiNativeSelect",e)}var Eh=Tl("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);const Ch=["className","disabled","error","IconComponent","inputRef","variant"],_h=({ownerState:e,theme:t})=>nr({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":nr({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Eh.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),Mh=cc("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ac,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Eh.multiple}`]:t.multiple}]}})(_h),kh=({ownerState:e,theme:t})=>nr({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Eh.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),Rh=cc("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${dl(n.variant)}`],n.open&&t.iconOpen]}})(kh),Ah=e.forwardRef((function(t,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard"}=t,c=rr(t,Ch),u=nr({},t,{disabled:i,variant:l,error:o}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e;return Ca({select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${dl(n)}`,o&&"iconOpen",r&&"disabled"]},Sh,t)})(u);return Ws.jsxs(e.Fragment,{children:[Ws.jsx(Mh,nr({ownerState:u,className:pc(d.select,r),disabled:i,ref:s||n},c)),t.multiple?null:Ws.jsx(Rh,{as:a,ownerState:u,className:d.icon})]})}));var Ih,Lh=Ah;const Dh=["children","classes","className","label","notched"],Ph=cc("fieldset",{shouldForwardProp:ac})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Oh=cc("legend",{shouldForwardProp:ac})((({ownerState:e,theme:t})=>nr({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&nr({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))));const Th=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Nh=cc(ud,{shouldForwardProp:e=>ac(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:ld})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return nr({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${bd.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${bd.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${bd.focused} .${bd.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${bd.error} .${bd.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${bd.disabled} .${bd.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&nr({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))})),qh=cc((function(e){const{className:t,label:n,notched:r}=e,i=rr(e,Dh),o=null!=n&&""!==n,a=nr({},e,{notched:r,withLabel:o});return Ws.jsx(Ph,nr({"aria-hidden":!0,className:t,ownerState:a},i,{children:Ws.jsx(Oh,{ownerState:a,children:o?Ws.jsx("span",{children:n}):Ih||(Ih=Ws.jsx("span",{className:"notranslate",children:"​"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),Fh=cc(dd,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:cd})((({theme:e,ownerState:t})=>nr({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0}))),jh=e.forwardRef((function(t,n){var r,i,o,a,s;const l=oc({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:h=!1,notched:f,slots:m={},type:g="text"}=l,y=rr(l,Th),b=(e=>{const{classes:t}=e;return nr({},t,Ca({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},yd,t))})(l),v=td(),x=Qu({props:l,muiFormControl:v,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w=nr({},l,{color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:v,fullWidth:u,hiddenLabel:x.hiddenLabel,multiline:h,size:x.size,type:g}),S=null!=(r=null!=(i=m.root)?i:c.Root)?r:Nh,E=null!=(o=null!=(a=m.input)?a:c.Input)?o:Fh;return Ws.jsx(fd,nr({slots:{root:S,input:E},renderSuffix:t=>Ws.jsx(qh,{ownerState:w,className:b.notchedOutline,label:null!=p&&""!==p&&x.required?s||(s=Ws.jsxs(e.Fragment,{children:[p," ","*"]})):p,notched:void 0!==f?f:Boolean(t.startAdornment||t.filled||t.focused)}),fullWidth:u,inputComponent:d,multiline:h,ref:n,type:g},y,{classes:nr({},b,{notchedOutline:null})}))}));jh.muiName="Input";var zh=jh;function Bh(e){return Ol("MuiSelect",e)}var Wh,$h=Tl("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);const Hh=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Gh=cc("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${$h.select}`]:t.select},{[`&.${$h.select}`]:t[n.variant]},{[`&.${$h.error}`]:t.error},{[`&.${$h.multiple}`]:t.multiple}]}})(_h,{[`&.${$h.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Vh=cc("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${dl(n.variant)}`],n.open&&t.iconOpen]}})(kh),Uh=cc("input",{shouldForwardProp:e=>sc(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Yh(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function Kh(e){return null==e||"string"==typeof e&&!e.trim()}const Xh=e.forwardRef((function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:h,error:f=!1,IconComponent:m,inputRef:g,labelId:y,MenuProps:b={},multiple:v,name:x,onBlur:w,onChange:S,onClose:E,onFocus:C,onOpen:_,open:M,readOnly:k,renderValue:R,SelectDisplayProps:A={},tabIndex:I,value:L,variant:D="standard"}=t,P=rr(t,Hh),[O,T]=bl({controlled:L,default:d,name:"Select"}),[N,q]=bl({controlled:M,default:u,name:"Select"}),F=e.useRef(null),j=e.useRef(null),[z,B]=e.useState(null),{current:W}=e.useRef(null!=M),[$,H]=e.useState(),G=xl(n,g),V=e.useCallback((e=>{j.current=e,e&&B(e)}),[]),U=null==z?void 0:z.parentNode;e.useImperativeHandle(G,(()=>({focus:()=>{j.current.focus()},node:F.current,value:O})),[O]),e.useEffect((()=>{u&&N&&z&&!W&&(H(s?null:U.clientWidth),j.current.focus())}),[z,s]),e.useEffect((()=>{a&&j.current.focus()}),[a]),e.useEffect((()=>{if(!y)return;const e=pl(j.current).getElementById(y);if(e){const t=()=>{getSelection().isCollapsed&&j.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[y]);const Y=(e,t)=>{e?_&&_(t):E&&E(t),W||(H(s?null:U.clientWidth),q(e))},K=e.Children.toArray(l),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(v){n=Array.isArray(O)?O.slice():[];const t=O.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),O!==n&&(T(n),S)){const r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:x}}),S(i,e)}v||Y(!1,t)}},J=null!==z&&N;let Z,Q;delete P["aria-invalid"];const ee=[];let te=!1;(id({value:O})||h)&&(R?Z=R(O):te=!0);const ne=K.map((t=>{if(!e.isValidElement(t))return null;let n;if(v){if(!Array.isArray(O))throw new Error(er(2));n=O.some((e=>Yh(e,t.props.value))),n&&te&&ee.push(t.props.children)}else n=Yh(O,t.props.value),n&&te&&(Q=t.props.children);return e.cloneElement(t,{"aria-selected":n?"true":"false",onClick:X(t),onKeyUp:e=>{" "===e.key&&e.preventDefault(),t.props.onKeyUp&&t.props.onKeyUp(e)},role:"option",selected:n,value:void 0,"data-value":t.props.value})}));te&&(Z=v?0===ee.length?null:ee.reduce(((e,t,n)=>(e.push(t),n<ee.length-1&&e.push(", "),e)),[]):Q);let re,ie=$;!s&&W&&z&&(ie=U.clientWidth),re=void 0!==I?I:p?null:0;const oe=A.id||(x?`mui-component-select-${x}`:void 0),ae=nr({},t,{variant:D,value:O,open:J,error:f}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e;return Ca({select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${dl(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Bh,t)})(ae),le=nr({},b.PaperProps,null==(r=b.slotProps)?void 0:r.paper),ce=yl();return Ws.jsxs(e.Fragment,{children:[Ws.jsx(Gh,nr({ref:V,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":p?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[y,oe].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:e=>{if(!k){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:p||k?null:e=>{0===e.button&&(e.preventDefault(),j.current.focus(),Y(!0,e))},onBlur:e=>{!J&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:O,name:x}}),w(e))},onFocus:C},A,{ownerState:ae,className:pc(A.className,se.select,c),id:oe,children:Kh(Z)?Wh||(Wh=Ws.jsx("span",{className:"notranslate",children:"​"})):Z})),Ws.jsx(Uh,nr({"aria-invalid":f,value:Array.isArray(O)?O.join(","):O,name:x,ref:F,"aria-hidden":!0,onChange:e=>{const t=K.find((t=>t.props.value===e.target.value));void 0!==t&&(T(t.props.value),S&&S(e,t))},tabIndex:-1,disabled:p,className:se.nativeInput,autoFocus:a,ownerState:ae},P)),Ws.jsx(Vh,{as:m,className:se.icon,ownerState:ae}),Ws.jsx(mh,nr({id:`menu-${x||""}`,anchorEl:U,open:J,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},b,{MenuListProps:nr({"aria-labelledby":y,role:"listbox","aria-multiselectable":v?"true":void 0,disableListWrap:!0,id:ce},b.MenuListProps),slotProps:nr({},b.slotProps,{paper:nr({},le,{style:nr({minWidth:ie},null!=le?le.style:null)})}),children:ne}))]})}));var Jh=Xh;const Zh=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Qh=["root"],ef={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ac(e)&&"variant"!==e,slot:"Root"},tf=cc(xp,ef)(""),nf=cc(zh,ef)(""),rf=cc(cp,ef)(""),of=e.forwardRef((function(t,n){const r=oc({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=wd,id:d,input:p,inputProps:h,label:f,labelId:m,MenuProps:g,multiple:y=!1,native:b=!1,onClose:v,onOpen:x,open:w,renderValue:S,SelectDisplayProps:E,variant:C="outlined"}=r,_=rr(r,Zh),M=b?Lh:Jh,k=Qu({props:r,muiFormControl:td(),states:["variant","error"]}),R=k.variant||C,A=nr({},r,{variant:R,classes:a}),I=(e=>{const{classes:t}=e;return t})(A),L=rr(I,Qh),D=p||{standard:Ws.jsx(tf,{ownerState:A}),outlined:Ws.jsx(nf,{label:f,ownerState:A}),filled:Ws.jsx(rf,{ownerState:A})}[R],P=xl(n,D.ref);return Ws.jsx(e.Fragment,{children:e.cloneElement(D,nr({inputComponent:M,inputProps:nr({children:o,error:k.error,IconComponent:u,variant:R,type:void 0,multiple:y},b?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:g,onClose:v,onOpen:x,open:w,renderValue:S,SelectDisplayProps:nr({id:d},E)},h,{classes:h?ul(L,h.classes):L},p?p.props.inputProps:{})},y&&b&&"outlined"===R?{notched:!0}:{},{ref:P,className:pc(D.props.className,s,I.root)},!p&&{variant:R},_))})}));of.muiName="Select";var af=of,sf=(e={})=>t.createElement(zn,{...e},t.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},t.createElement("rect",{stroke:En.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"}))));const lf={MuiAccordion:{styleOverrides:{root:{backgroundColor:En.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:En.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:t.createElement(qn,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${En.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:En.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${En.MISC_FOCUS_BORDER}`,borderRadius:Rn,backgroundColor:En.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${En.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:En.WHITE,color:En.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:Rn},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${En.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:En.GREYSCALE_0_15,backgroundColor:En.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:En.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${En.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:En.GREEN_PALE},"&:active":{backgroundColor:En.GREEN_DARK},"&.Mui-focusVisible":{borderColor:En.GREEN_PALE,boxShadow:`0 0 0 3px ${sl(En.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:En.BLUE_PALE},"&:active":{backgroundColor:En.BLUE_DARK},"&.Mui-focusVisible":{borderColor:En.BLUE_PALE,boxShadow:`0 0 0 3px ${sl(En.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:Rn,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:En.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${En.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:En.GREYSCALE_0_15,backgroundColor:En.GREYSCALE_100_60,"&:active":{backgroundColor:En.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:En.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${En.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:En.PURPLE,"&.Mui-focusVisible":{borderColor:En.PURPLE,boxShadow:`0 0 0 3px ${sl(En.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:En.GREEN,"&.Mui-focusVisible":{borderColor:En.GREEN,boxShadow:`0 0 0 3px ${sl(En.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:En.BLUE,"&.Mui-focusVisible":{borderColor:En.BLUE,boxShadow:`0 0 0 3px ${sl(En.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:En.ORANGE,"&.Mui-focusVisible":{borderColor:En.ORANGE,boxShadow:`0 0 0 3px ${sl(En.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:En.RED,"&.Mui-focusVisible":{borderColor:En.RED,boxShadow:`0 0 0 3px ${sl(En.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:En.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:En.PURPLE_PALE},"&:active":{backgroundColor:En.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:En.PURPLE_PALE,boxShadow:`0 0 0 3px ${sl(En.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:En.GREEN_PALE},"&:active":{backgroundColor:En.GREEN_DARK},"&.Mui-focusVisible":{borderColor:En.GREEN_PALE,boxShadow:`0 0 0 3px ${sl(En.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:En.BLUE_PALE},"&:active":{backgroundColor:En.BLUE_DARK},"&.Mui-focusVisible":{borderColor:En.BLUE_PALE,boxShadow:`0 0 0 3px ${sl(En.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:En.ORANGE_PALE},"&:active":{backgroundColor:En.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:En.ORANGE_PALE,boxShadow:`0 0 0 3px ${sl(En.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:En.RED_PALE},"&:active":{backgroundColor:En.RED_DARK},"&.Mui-focusVisible":{borderColor:En.RED_PALE,boxShadow:`0 0 0 3px ${sl(En.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:En.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:En.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:Rn,boxShadow:`inset 0 0 0 2px ${En.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:t.createElement(jn,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:Cn,borderRadius:Rn,color:En.TEXT_PRIMARY,backgroundColor:En.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:En.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${En.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:En.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:En.GREYSCALE_0_05,color:En.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:En.GREEN,borderColor:En.GREEN},"&.MuiChip-outlinedInfo":{color:En.BLUE,borderColor:En.BLUE},"&.MuiChip-outlinedWarning":{color:En.ORANGE,borderColor:En.ORANGE},"&.MuiChip-outlinedError":{color:En.RED,borderColor:En.RED}},outlined:{border:`solid 1px ${En.GREYSCALE_0_15}`,backgroundColor:En.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:Rn,boxShadow:"none",backgroundColor:En.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:En.GREEN,borderColor:En.GREEN},outlinedSecondary:{color:En.BLUE,borderColor:En.BLUE},label:{fontFamily:Pn.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:t.createElement(jn,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:t.createElement(qn,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:Rn},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:Rn,fontSize:_n,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:En.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${En.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:En.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:En.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:En.GREYSCALE_0_05}}},popupIndicator:{borderRadius:Rn,border:`solid 1px ${En.GREYSCALE_0_15}`,color:En.GREYSCALE_0_60,marginRight:0,width:kn,height:kn},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${En.GREYSCALE_0_15}`},clearIndicator:{borderRadius:Rn,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:En.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:_n}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:Cn,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:En.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:En.GREYSCALE_25,fontSize:Cn,fontFamily:Pn.FONT_FAMILY,fontWeight:Ln,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:En.TEXT_PRIMARY},"&.Mui-error":{color:En.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:En.TEXT_SECONDARY,content:"'(optional)'",fontWeight:In,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:En.TEXT_SECONDARY,content:"'(required)'",fontWeight:In,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:_n,lineHeight:"16px",backgroundColor:En.WHITE,borderRadius:Rn,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${En.GREYSCALE_0_05}`,borderColor:En.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${En.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${En.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${En.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${En.RED}`,boxShadow:`0px 0px 0px 1px ${En.RED}, inset 0 2px 0 0 ${En.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${En.GREYSCALE_0_10}`,borderColor:En.GREYSCALE_0_10,backgroundColor:En.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:En.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:En.GREYSCALE_0_15,borderRadius:Rn,boxShadow:`inset 0 2px 0 0 ${En.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>t.createElement(qn,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:En.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:En.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:En.GREYSCALE_0_03},"&:active":{backgroundColor:En.GREYSCALE_0_10},"&:focus":{backgroundColor:En.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${En.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${En.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:En.GREYSCALE_0_30,"&:hover":{backgroundColor:En.GREYSCALE_0_0,borderColor:En.GREYSCALE_0_15},"& ~svg":{color:En.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${En.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:Rn}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:En.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${En.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:En.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:_n,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:Cn,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:Cn,fontWeight:Ln,color:En.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Ln}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${En.GREYSCALE_0_15}, 0px 0px 0px 1px ${En.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:t.createElement($n,null),checkedIcon:t.createElement(Hn,null)},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:En.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${En.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:En.GREEN_PALE,boxShadow:`0 0 0 3px ${sl(En.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:En.BLUE_PALE,boxShadow:`0 0 0 3px ${sl(En.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:En.GREYSCALE_0_20}},"&.Mui-disabled":{fill:En.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:t.createElement(sf,null),checkedIcon:t.createElement(Bn,null),indeterminateIcon:t.createElement(Wn,null)},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:Rn,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:En.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:En.GREYSCALE_0_55,color:En.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:En.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:En.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:En.GREYSCALE_0_55,"&:hover":{color:En.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:En.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:En.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:_n,color:En.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Ln},secondary:{fontSize:Cn,color:En.GREYSCALE_45,fontWeight:In,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:_n,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:_n,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:En.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:Cn,borderBottom:`solid 1px ${En.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:_n,color:En.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:En.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:En.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:En.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:"url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%228px%22%20height%3D%227px%22%20viewBox%3D%220%200%208%207%22%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-labelledby%3D%22Tick%22%3E%20%20%3Cg%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cg%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M7.51662484%2C1.29325%20C7.12545778%2C0.90225%206.49218732%2C0.90225%206.10202068%2C1.29325%20L2.73658335%2C4.65725%20L1.90722914%2C3.82925%20C1.5170625%2C3.43825%200.883792042%2C3.43825%200.492624979%2C3.82925%20C0.102458344%2C4.21925%200.102458344%2C4.85225%200.492624979%2C5.24325%20L2.02928127%2C6.77825%20C2.4194479%2C7.16925%203.05271836%2C7.16925%203.44388542%2C6.77825%20L7.51662484%2C2.70725%20C7.9077919%2C2.31725%207.9077919%2C1.68425%207.51662484%2C1.29325%22%3E%3C%2Fpath%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E')",fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:En.RED}}},"&.Mui-focusVisible":{backgroundColor:En.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:En.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:En.GREEN,height:"24px","&.Mui-disabled":{color:En.GREYSCALE_0_15}},rail:{backgroundColor:En.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${En.GREYSCALE_0_05}`,borderRadius:Rn,boxShadow:`inset 0px 0px 0px 1px ${En.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${En.GREYSCALE_0_05}`,borderRadius:Rn},thumb:{height:"16px",width:"16px",borderRadius:Rn,backgroundColor:En.WHITE,boxShadow:`0px 1px 2px 0px ${En.GREYSCALE_0_15}, 0px 0px 0px 1px ${En.GREYSCALE_0_05}`,"&:hover":{borderRadius:Rn,boxShadow:`0 2px 4px 0 ${En.GREYSCALE_0_30}, 0 0 0 1px ${En.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${En.GREYSCALE_0_15}, 0 0 0 1px ${En.GREYSCALE_0_06}, 0 0 0 2px ${En.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${En.GREYSCALE_0_15}, 0 0 0 1px ${En.GREYSCALE_0_06}, 0 0 0 2px ${En.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:En.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:En.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:En.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:En.GREYSCALE_0_15},markLabel:{color:En.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:En.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:En.WHITE,color:En.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:En.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:En.GREEN_PALE,boxShadow:`0 0 0 3px ${sl(En.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:En.BLUE_PALE,boxShadow:`0 0 0 3px ${sl(En.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:En.GREYSCALE_0_15,borderRadius:Rn},thumb:{height:"16px",width:"16px",borderRadius:Rn,backgroundColor:En.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:_n,fontWeight:Ln,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${En.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${En.MISC_FOCUS_BORDER}`,backgroundColor:En.GREYSCALE_0_03,borderRadius:Rn},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:En.GREYSCALE_25,"&.Mui-selected":{color:En.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:_n,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:Rn,"&:hover":{backgroundColor:`${En.GREYSCALE_0_03}`},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${En.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${En.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:Rn,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:En.GREYSCALE_0_05},"&:hover":{backgroundColor:`${En.GREYSCALE_0_03}`,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${En.GREYSCALE_85}`,borderRight:`1px solid ${En.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Ln,backgroundColor:En.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:En.GREYSCALE_98,borderBottom:`1px solid ${En.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${En.GREYSCALE_85}`,borderTop:`1px solid ${En.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:En.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:En.GREYSCALE_0_05,"&:hover":{backgroundColor:En.GREYSCALE_0_03}},"&&:hover":{backgroundColor:En.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>t.createElement(Gn,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${En.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:_n,borderRadius:Rn,padding:"7px 16px",border:`1px solid ${En.GREYSCALE_0_15}`,backgroundColor:En.GREYSCALE_100_60,color:En.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:En.GREYSCALE_0_10,border:`1px solid ${En.GREYSCALE_0_30}`},"&:hover":{backgroundColor:En.GREYSCALE_0_03,border:`1px solid ${En.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:En.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${En.MISC_FOCUS_BORDER}`,border:`1px solid ${En.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:En.GREYSCALE_25,backgroundColor:En.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:En.GREYSCALE_0_10,border:`1px solid ${En.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:Cn,height:24,width:24,padding:7},sizeLarge:{fontSize:Mn,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:_n,borderRadius:Rn}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:En.GREYSCALE_20},tooltip:{backgroundColor:En.GREYSCALE_20,fontSize:Cn,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}};const cf={mode:"light",primary:{ultraLight:En.GREEN_ULTRA_LIGHT,light:En.GREEN_PALE,main:En.GREEN,dark:En.GREEN_DARK,extraDark:En.GREEN_EXTRA_DARK,contrastText:En.WHITE},secondary:{ultraLight:En.BLUE_ULTRA_LIGHT,light:En.BLUE_PALE,main:En.BLUE,dark:En.BLUE_DARK,extraDark:En.BLUE_EXTRA_DARK,contrastText:En.WHITE},error:{ultraLight:En.RED_ULTRA_LIGHT,light:En.RED_PALE,main:En.RED,dark:En.RED_DARK,extraDark:En.RED_EXTRA_DARK,contrastText:En.WHITE},warning:{ultraLight:En.ORANGE_ULTRA_LIGHT,light:En.ORANGE_PALE,main:En.ORANGE,dark:En.ORANGE_DARK,extraDark:En.ORANGE_EXTRA_DARK,contrastText:En.WHITE},success:{ultraLight:En.GREEN_ULTRA_LIGHT,light:En.GREEN_PALE,main:En.GREEN,dark:En.GREEN_DARK,extraDark:En.GREEN_EXTRA_DARK,contrastText:En.WHITE},info:{ultraLight:En.BLUE_ULTRA_LIGHT,light:En.BLUE_PALE,main:En.BLUE,dark:En.BLUE_DARK,extraDark:En.BLUE_EXTRA_DARK,contrastText:En.WHITE},text:{primary:En.TEXT_PRIMARY,secondary:En.TEXT_SECONDARY,disabled:En.GREYSCALE_0_30},action:{hover:En.GREYSCALE_0_03,hoverOpacity:.03,selected:En.GREYSCALE_0_05,selectedOpacity:.05,focus:En.MISC_FOCUS_BORDER},amethyst:{ultraLight:En.WHITE,main:En.PURPLE,light:En.PURPLE_PALE,dark:En.PURPLE_DARK,extraDark:En.GREYSCALE_0_0,contrastText:En.WHITE},background:{paper:En.WHITE,default:En.GREYSCALE_95},divider:En.GREYSCALE_0_15},uf=e=>({components:lf,palette:cf,breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:_n,fontWeightLight:An,fontWeightRegular:In,fontWeightMedium:Ln,fontWeightBold:Dn,htmlFontSize:_n,fontFamily:Pn.FONT_FAMILY,button:{fontWeight:Ln,fontSize:_n,textTransform:"none"},body1:{fontSize:Mn,lineHeight:"24px"},body2:{fontSize:_n,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:kn,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:Mn,fontWeight:Ln,lineHeight:"16px"},h6:{fontSize:_n,fontWeight:Ln,lineHeight:"16px"},caption:{color:En.TEXT_SECONDARY},subtitle1:{fontSize:_n,color:En.TEXT_SECONDARY},subtitle2:{fontSize:Cn,color:En.TEXT_SECONDARY}},shape:{borderRadius:Rn}}),df={...Sn,MISC_FOCUS_BORDER:En.MISC_FOCUS_BORDER},pf=uf().palette,hf={TEXT:pf.text.primary,DISABLED:pf.text.disabled,HOVER:pf.action.hover,WHITE:df.GREYSCALE_100,BORDER_LIGHT:df.GREYSCALE_90,BORDER_MEDIUM:df.GREYSCALE_85,BORDER_HEAVY:df.GREYSCALE_50,DARK_MODE_TEXT:df.GREYSCALE_95,DARK_MODE_BORDER:df.GREYSCALE_95,DARK_MODE_DISABLED:df.GREYSCALE_70,DARK_MODE_BACKGROUND:df.GREYSCALE_20,TRANSPARENT:"transparent",NULL_VALUE_BACKGROUND:df.GREYSCALE_95,SELECTED:pf.primary.main};function ff(e){return"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b&&"number"==typeof e.a}function mf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length&&ff(t[0]))return(t[0].r<<16)+(t[0].g<<8)+t[0].b;var r=0,i=0,o=0;if(1===t.length&&"string"==typeof t[0]){var a,s=t[0];(a=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(s))?(r=parseInt(a[1],10),i=parseInt(a[2],10),o=parseInt(a[3],10)):(a=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(s))?(r=parseInt(a[1],16),i=parseInt(a[2],16),o=parseInt(a[3],16)):(a=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(s))&&(r=parseInt(a[1]+a[1],16),i=parseInt(a[2]+a[2],16),o=parseInt(a[3]+a[3],16))}return(r<<16)+(i<<8)+o}function gf(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var bf={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},vf="qcm-color";function xf(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i,o,a,s,l,c,u,d,p,h={type:vf,r:0,g:0,b:0,a:1,l:void 0,invalid:!1,spaces:{}},f=0,m=0,g=0,y=1;if((null===(e=n[0])||void 0===e?void 0:e.type)===vf){var b=n[0];f=b.r,m=b.g,g=b.b,y=b.a,h.invalid=n[0].invalid,h.spaces=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yf(Object(n),!0).forEach((function(t){gf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n[0].spaces)}else if(n.length<3)if("string"==typeof n[0]){var v,x=n[0];if(v=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(x))f=parseInt(v[1],10),m=parseInt(v[2],10),g=parseInt(v[3],10);else if(v=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(x))f=parseInt(v[1],10),m=parseInt(v[2],10),g=parseInt(v[3],10),y=parseFloat(v[4]);else if(v=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(x))y=parseInt(v[1],10)/255,f=parseInt(v[2],10),m=parseInt(v[3],10),g=parseInt(v[4],10);else if(v=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(x))f=parseInt(v[1],16),m=parseInt(v[2],16),g=parseInt(v[3],16),y=1;else if(v=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(x))f=parseInt(v[1]+v[1],16),m=parseInt(v[2]+v[2],16),g=parseInt(v[3]+v[3],16),y=1;else if(v=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(x)){i=parseFloat(v[1]),o=parseFloat(v[3]),s=parseFloat(v[5]),o=(o/=100)<0?0:o>1?1:o,u=(i=(i%=360)<0?0:i>360?360:i)/60,d=(c=(s=(s/=100)<0?0:s>1?1:s)<=.5?2*s*o:(2-2*s)*o)*(1-Math.abs(u%2-1));var w=[];switch(u=Math.floor(u)){case 0:w=[c,d,0];break;case 1:w=[d,c,0];break;case 2:w=[0,c,d];break;case 3:w=[0,d,c];break;case 4:w=[d,0,c];break;case 5:w=[c,0,d];break;default:w=[0,0,0]}p=s-.5*c,f=w[0]+p,m=w[1]+p,g=w[2]+p,f=Math.round(255*f),m=Math.round(255*m),g=Math.round(255*g),y=1}else if(v=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(x)){i=parseFloat(v[1]),o=parseFloat(v[3]),s=parseFloat(v[5]),y=parseFloat(v[7]),o=(o/=100)<0?0:o>1?1:o,u=(i=(i%=360)<0?0:i>360?360:i)/60,d=(c=(s=(s/=100)<0?0:s>1?1:s)<=.5?2*s*o:(2-2*s)*o)*(1-Math.abs(u%2-1));var S=[];switch(u=Math.floor(u)){case 0:S=[c,d,0];break;case 1:S=[d,c,0];break;case 2:S=[0,c,d];break;case 3:S=[0,d,c];break;case 4:S=[d,0,c];break;case 5:S=[c,0,d];break;default:S=[0,0,0]}p=s-.5*c,f=S[0]+p,m=S[1]+p,g=S[2]+p,f=Math.round(255*f),m=Math.round(255*m),g=Math.round(255*g)}else if(v=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(x)){i=parseFloat(v[1]),o=parseFloat(v[3]),l=parseFloat(v[5]),u=(i=(i%=360)<0?0:i>360?360:i)/60,d=(c=(l=(l/=100)<0?0:l>1?1:l)*(o=(o/=100)<0?0:o>1?1:o))*(1-Math.abs(u%2-1));var E=[];switch(u=Math.floor(u)){case 0:E=[c,d,0];break;case 1:E=[d,c,0];break;case 2:E=[0,c,d];break;case 3:E=[0,d,c];break;case 4:E=[d,0,c];break;case 5:E=[c,0,d];break;default:E=[0,0,0]}p=l-c,f=E[0]+p,m=E[1]+p,g=E[2]+p,f=Math.round(255*f),m=Math.round(255*m),g=Math.round(255*g),y=1}else if(bf[x.toLowerCase()]){a=x.toLowerCase();var C=bf[a];f=C.r,m=C.g,g=C.b,y="number"==typeof bf[a].a?bf[a].a:1}else h.invalid=!0}else"number"==typeof n[0]&&n[0]>=0&&"argb"===n[1]?(y=(4278190080&n[0])>>>24,y/=255,f=(16711680&n[0])>>16,m=(65280&n[0])>>8,g=255&n[0]):"number"==typeof n[0]&&n[0]>=0?(f=(16711680&n[0])>>16,m=(65280&n[0])>>8,g=255&n[0]):h.invalid=!0;else n.length>=3&&n.length<=4?(f=n[0],m=n[1],g=n[2],y=arguments.length>=4?n[3]:1):h.invalid=!0;return Number.isNaN(+f+m+g+y)&&(h.invalid=!0),h.r=Math.floor(f),h.g=Math.floor(m),h.b=Math.floor(g),h.a=y,h.l=s,h}function wf(e){var t,n,r;if(ff(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""));var i="string"==typeof e?mf(e):e;return t=((16711680&i)>>16).toString(16),n=((65280&i)>>8).toString(16),r=(255&i).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r)}function Sf(e){var t,n,r=0,i="string"==typeof e?xf(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),c=Math.min(o,a,s),u=l;if(l===c)t=0,r=0;else{switch(t=0==(n=l-c)?0:n/u,l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function Ef(e){if(ff(e))return"rgb(".concat([e.r,e.g,e.b].join(", "),")");var t="string"==typeof e?mf(e):e,n=(65280&t)>>8,r=255&t;return"rgb(".concat((16711680&t)>>16,", ").concat(n,", ").concat(r,")")}function Cf(e,t){return ff(e)?"rgba(".concat([e.r,e.g,e.b,void 0!==t?t:e.a].join(", "),")"):Cf(xf(e),t)}function _f(e){return ff(e)?1===e.a?Ef(e):Cf(e):_f(xf(e))}var Mf=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)};function kf(e){return.2126*Mf(e.r)+.7152*Mf(e.g)+.0722*Mf(e.b)}function Rf(){var e=xf.apply(void 0,arguments),t={type:e.type,r:e.r,g:e.g,b:e.b,a:e.a,invalid:e.invalid,spaces:e.spaces},n=function(){return t.spaces.hsla||(t.spaces.hsla=function(e){var t,n,r=0,i="string"==typeof e?xf(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=i.a,c=Math.max(o,a,s),u=Math.min(o,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return"hsla(".concat(360*r,", ").concat(100*t,", ").concat(100*d,", ").concat(l,")")}(t)),t.spaces.hsla},r=function(e){var t=n(),r=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),i=parseFloat(r[1]),o=parseFloat(r[3]),a=parseFloat(r[7]),s=parseFloat(r[5]),l=Math.max(0,Math.min(s+e,100));return"hsla(".concat(i,", ").concat(o,", ").concat(l,", ").concat(a,")")};return{get type(){return t.type},isInvalid:function(){return t.invalid},get r(){return t.r},get g(){return t.g},get b(){return t.b},get a(){return t.a},getR:function(){return t.r},getG:function(){return t.g},getB:function(){return t.b},getAlpha:function(){return t.a},setAlpha:function(e){t.a=e,t.spaces={}},isEqualTo:function(e){var n=e.type===t.type?e:xf(e);return n.r===t.r&&n.g===t.g&&n.b===t.b&&n.a===t.a},isDark:function(){return function(){var e=xf.apply(void 0,arguments);return e.invalid||kf(e)<.4}(t)},getRGB:function(){return t.spaces.rgb||(t.spaces.rgb=Ef(t)),t.spaces.rgb},getRGBA:function(){return t.spaces.rgba||(t.spaces.rgba=Cf(t)),t.spaces.rgba},getString:function(){return t.spaces.string||(t.spaces.string=_f(t)),t.spaces.string},getHex:function(){return t.spaces.hex||(t.spaces.hex=wf(t)),t.spaces.hex},getHSL:function(){return t.spaces.hsl||(t.spaces.hsl=function(e){var t,n,r=0,i="string"==typeof e?xf(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),c=Math.min(o,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return"hsl(".concat(360*r,", ").concat(100*t,", ").concat(100*u,")")}(t)),t.spaces.hsl},getHSLA:n,getShiftedHSLA:r,getHSV:function(){return t.spaces.hsv||(t.spaces.hsv=function(e){var t=Sf(e),n=t.h,r=t.s,i=t.v;return"hsv(".concat(n,", ").concat(r,", ").concat(i,")")}(t)),t.spaces.hsv},getHSVObject:function(){return t.spaces.hsvObject||(t.spaces.hsvObject=Sf(t)),t.spaces.hsvObject},blend:function(e,n){var r=Math.floor(t.r+(e.r-t.r)*n),i=Math.floor(t.g+(e.g-t.g)*n),o=Math.floor(t.b+(e.b-t.b)*n),a=Math.floor(t.a+(e.getAlpha()-t.a)*n);return"rgba(".concat([r,i,o,a].join(", "),")")},getBrightenedColor:function(){return Rf(r(18*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)))},getDarkenedColor:function(){return Rf(r(18*-(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)))}}}function Af(e,t){if(e&&t){var n=kf(e),r=kf(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}}var If,Lf,Df=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],Pf=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];function Of(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?Pf:Df}var Tf=function(){if(Lf)return If;Lf=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return If=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(f&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(f,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},If}();function Nf(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qf(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ff(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(Tf);var jf=1/.7,zf="\\s*([+-]?\\d+)\\s*",Bf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$f=/^#([0-9a-f]{3,8})$/,Hf=new RegExp(`^rgb\\(${zf},${zf},${zf}\\)$`),Gf=new RegExp(`^rgb\\(${Wf},${Wf},${Wf}\\)$`),Vf=new RegExp(`^rgba\\(${zf},${zf},${zf},${Bf}\\)$`),Uf=new RegExp(`^rgba\\(${Wf},${Wf},${Wf},${Bf}\\)$`),Yf=new RegExp(`^hsl\\(${Bf},${Wf},${Wf}\\)$`),Kf=new RegExp(`^hsla\\(${Bf},${Wf},${Wf},${Bf}\\)$`),Xf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Jf(){return this.rgb().formatHex()}function Zf(){return this.rgb().formatRgb()}function Qf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=$f.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?em(t):3===n?new im(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?tm(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?tm(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Hf.exec(e))?new im(t[1],t[2],t[3],1):(t=Gf.exec(e))?new im(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Vf.exec(e))?tm(t[1],t[2],t[3],t[4]):(t=Uf.exec(e))?tm(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Yf.exec(e))?um(t[1],t[2]/100,t[3]/100,1):(t=Kf.exec(e))?um(t[1],t[2]/100,t[3]/100,t[4]):Xf.hasOwnProperty(e)?em(Xf[e]):"transparent"===e?new im(NaN,NaN,NaN,0):null}function em(e){return new im(e>>16&255,e>>8&255,255&e,1)}function tm(e,t,n,r){return r<=0&&(e=t=n=NaN),new im(e,t,n,r)}function nm(e){return e instanceof Ff||(e=Qf(e)),e?new im((e=e.rgb()).r,e.g,e.b,e.opacity):new im}function rm(e,t,n,r){return 1===arguments.length?nm(e):new im(e,t,n,null==r?1:r)}function im(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function om(){return`#${cm(this.r)}${cm(this.g)}${cm(this.b)}`}function am(){const e=sm(this.opacity);return`${1===e?"rgb(":"rgba("}${lm(this.r)}, ${lm(this.g)}, ${lm(this.b)}${1===e?")":`, ${e})`}`}function sm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lm(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cm(e){return((e=lm(e))<16?"0":"")+e.toString(16)}function um(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pm(e,t,n,r)}function dm(e){if(e instanceof pm)return new pm(e.h,e.s,e.l,e.opacity);if(e instanceof Ff||(e=Qf(e)),!e)return new pm;if(e instanceof pm)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new pm(a,s,l,e.opacity)}function pm(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function hm(e){return(e=(e||0)%360)<0?e+360:e}function fm(e){return Math.max(0,Math.min(1,e||0))}function mm(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Nf(Ff,Qf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jf,formatHex:Jf,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return dm(this).formatHsl()},formatRgb:Zf,toString:Zf}),Nf(im,rm,qf(Ff,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new im(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new im(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new im(lm(this.r),lm(this.g),lm(this.b),sm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:om,formatHex:om,formatHex8:function(){return`#${cm(this.r)}${cm(this.g)}${cm(this.b)}${cm(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:am,toString:am})),Nf(pm,(function(e,t,n,r){return 1===arguments.length?dm(e):new pm(e,t,n,null==r?1:r)}),qf(Ff,{brighter(e){return e=null==e?jf:Math.pow(jf,e),new pm(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new pm(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new im(mm(e>=240?e-240:e+120,i,r),mm(e,i,r),mm(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new pm(hm(this.h),fm(this.s),fm(this.l),sm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=sm(this.opacity);return`${1===e?"hsl(":"hsla("}${hm(this.h)}, ${100*fm(this.s)}%, ${100*fm(this.l)}%${1===e?")":`, ${e})`}`}}));const gm=Math.PI/180,ym=180/Math.PI,bm=4/29,vm=6/29,xm=3*vm*vm;function wm(e){if(e instanceof Sm)return new Sm(e.l,e.a,e.b,e.opacity);if(e instanceof km)return Rm(e);e instanceof im||(e=nm(e));var t,n,r=Mm(e.r),i=Mm(e.g),o=Mm(e.b),a=Em((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Em((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Em((.0139322*r+.0971045*i+.7141733*o)/.82521)),new Sm(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Sm(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Em(e){return e>.008856451679035631?Math.pow(e,1/3):e/xm+bm}function Cm(e){return e>vm?e*e*e:xm*(e-bm)}function _m(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Mm(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function km(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Rm(e){if(isNaN(e.h))return new Sm(e.l,0,0,e.opacity);var t=e.h*gm;return new Sm(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Nf(Sm,(function(e,t,n,r){return 1===arguments.length?wm(e):new Sm(e,t,n,null==r?1:r)}),qf(Ff,{brighter(e){return new Sm(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Sm(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new im(_m(3.1338561*(t=.96422*Cm(t))-1.6168667*(e=1*Cm(e))-.4906146*(n=.82521*Cm(n))),_m(-.9787684*t+1.9161415*e+.033454*n),_m(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Nf(km,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof km)return new km(e.h,e.c,e.l,e.opacity);if(e instanceof Sm||(e=wm(e)),0===e.a&&0===e.b)return new km(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ym;return new km(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new km(e,t,n,null==r?1:r)}),qf(Ff,{brighter(e){return new km(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new km(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Rm(this).rgb()}}));var Am=e=>()=>e;function Im(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Am(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?Im:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Am(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=rm(e)).r,(t=rm(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Im(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var Lm,Dm="center",Pm="bottom";function Om(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function Tm(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Nm(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Fm)):void 0===t&&(t=qm);for(var n,r,i,o,a,s=new Bm(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Bm(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(zm)}function qm(e){return e.children}function Fm(e){return Array.isArray(e)?e[1]:null}function jm(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function zm(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Bm(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:Dm,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Dm,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Dm,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Dm},{key:"DataRangeIncludingZero",alignment:Pm},{key:"LimitedData",alignment:Pm},{key:"NegativeOrZeroValues",alignment:Pm}].reduce((function(e,t){return e[t.key]=t,e}),{}),Bm.prototype=Nm.prototype={constructor:Bm,count:function(){return this.eachAfter(Tm)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Nm(this).eachBefore(jm)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Lm=function(e){
100
100
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
101
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(h,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},Lm({exports:{}});const Wm=(e,t=hf.TEXT,n=hf.WHITE)=>{const r=Rf(e),i=Rf(t),o=Rf(n);return r.isInvalid()?t:function(e,t,n){return Af(e,t)>Af(e,n)?t:n}(r,o,i).getRGB()},$m=e=>{const t=e.getStyle("","","dataColors.selected")||hf.SELECTED,n=function(e,t){var n=Rf("#FFFFFF"),r=Rf(e),i=Rf(t);if(r.isInvalid()||i.isInvalid()||r.getAlpha()<1||i.getAlpha()<1)return t;var o=Af(n,r),a=Af(i,r),s=o>a||o>4.5;return!s&&a>3?t:s?"#FFFFFF":"#000000"}(t,hf.TEXT);return{background:t,color:n}},Hm=(e,t)=>{const n=Rf(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},Gm=e=>!!e&&0===Rf(e).a,Vm=e=>{const t=Rf(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},Um=e=>{e.stopPropagation(),e.preventDefault()},Ym=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:null!=r&&r,defaultValue(e,t,i){var o;const a=null!==(o=null==r?void 0:r(e,t,i))&&void 0!==o&&o,s=i.theme.current(),l=n(s,a);return{color:"transparent"===l?"none":l}}}),Km=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},Xm=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,n,r)=>{var i,o;const a=null!==(i=t.fontFamily)&&void 0!==i?i:"Source Sans Pro, sans-serif",s=null!==(o=t.fontFamilies)&&void 0!==o?o:[],l=Array.from(new Set([e,a,...s])),c=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...l.sort().map((e=>Km(e,!0)))],u=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...Of(r).filter((e=>!l.includes(e))).map((e=>Km(e,!0)))];return[...c,...u.length>1?u:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),Jm=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],Zm=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,i)=>{const o=i.theme.current();return((e,t,n)=>{var r;const i=t.fontSize,o=null!==(r=t.fontSizes)&&void 0!==r?r:[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort(((e,t)=>parseInt(e,10)-parseInt(t,10))).map((e=>Km(e,!1)))],l=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...Jm.filter((e=>!a.includes(e))).map((e=>Km(e,!1)))];return[...s,...l.length>1?l:[]]})(t(o),o,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),Qm=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:null!=o?o:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:Xm({ref:`${e}.fontFamily`,themeAccessor:t=>{var n;return null!==(n=i(t,e,"fontFamily"))&&void 0!==n?n:t.fontFamily},translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:null!=t?t:[]},fontSize:Zm({ref:`${e}.fontSize`,themeAccessor:t=>{var n;return null!==(n=i(t,e,"fontSize"))&&void 0!==n?n:t.fontSize},translator:n}),fontColor:Ym(`${e}.fontColor`,void 0,(t=>{var n;return null!==(n=i(t,e,"color"))&&void 0!==n?n:t.color}))}},background:Ym(`${e}.background`,"properties.background",((t,n)=>{var r;const o=n?hf.WHITE:hf.TRANSPARENT;return null!==(r=i(t,e,"backgroundColor"))&&void 0!==r?r:o}),a)}}}}),eg=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:null!=t?t:[]},fontColor:Ym(`${e}.fontColor`,void 0,(t=>{var n;return null!==(n=r(t,e,"color"))&&void 0!==n?n:t.color}))}},background:Ym(`${e}.background`,"properties.background",(t=>{var i,o;return null!==(i=null!==(o=r(t,e,"backgroundColor"))&&void 0!==o?o:n)&&void 0!==i?i:"transparent"}))}}}}),tg=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map((e=>({value:e+1,translation:e+1}))),defaultValue:1}),ng="12px",rg="Source Sans Pro, sans-serif",ig="600",og=15e3,ag=4/3;var sg,lg;!function(e){e.Transparent="transparent",e.FontPrimary="#404040",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2"}(sg||(sg={})),function(e){e.Solid="solid",e.None="none"}(lg||(lg={}));const cg={display:"flex",justifyContent:"center",alignItems:"center"},ug={borderStyle:"solid"},dg={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},pg={lineHeight:ag,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},hg=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),fg=(e,t)=>e>0?`${e}px ${lg.Solid} ${t}`:lg.None,mg=(e,t,n,r)=>{const i=Number(!t||(null==r?void 0:r.right)),o=Number(!e||(null==r?void 0:r.bottom));return{borderRight:fg(i,n),borderBottom:fg(o,n),borderLeft:lg.None,borderTop:lg.None}},gg=(e,t,n,r,i,o)=>{const a=mg(t,r,i,o);return e.isLeftDimension||(e.isLastDimension&&!t&&(a.borderBottom=fg(2,i)),n||(a.borderLeft=fg(1,i))),a},yg=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=fg(1,n)),t&&(r.borderRight=fg(1,n)),r},bg=e=>({translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:tg("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:e.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")?tg("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"):void 0,border:Ym("grid.border","properties.border",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n?void 0:n.borderColor)&&void 0!==t?t:sg.DividerLight})),divider:Ym("grid.divider","properties.pivot.divider",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n||null===(n=n.divider)||void 0===n?void 0:n.borderColor)&&void 0!==t?t:sg.DividerDark})),background:Ym("grid.background","properties.background",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n?void 0:n.backgroundColor)&&void 0!==t?t:sg.Transparent}))}}}}),vg=(e,t,n)=>{var r,i,o,a,s,l;switch(t){case"header":return null===(r=e.object)||void 0===r||null===(r=r.pivotTableV2)||void 0===r||null===(r=r.dimension)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.name)||void 0===r?void 0:r[n];case"dimensionValues":return null===(i=e.object)||void 0===i||null===(i=i.pivotTableV2)||void 0===i||null===(i=i.dimension)||void 0===i||null===(i=i.label)||void 0===i||null===(i=i.value)||void 0===i?void 0:i[n];case"measureLabels":return null===(o=e.object)||void 0===o||null===(o=o.pivotTableV2)||void 0===o||null===(o=o.measure)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o[n];case"measureValues":return null===(a=e.object)||void 0===a||null===(a=a.pivotTableV2)||void 0===a||null===(a=a.measure)||void 0===a||null===(a=a.label)||void 0===a||null===(a=a.value)||void 0===a?void 0:a[n];case"totalValues":return null===(s=e.object)||void 0===s||null===(s=s.pivotTableV2)||void 0===s||null===(s=s.total)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s[n];case"nullValues":return null===(l=e.object)||void 0===l||null===(l=l.pivotTableV2)||void 0===l||null===(l=l.null)||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.value)||void 0===l?void 0:l[n];default:return}},xg=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,defaultValue:[],items:{headerSection:Qm({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:vg}),dimensionValueSection:Qm({section:"dimensionValues",translator:e,flags:t,getThemeValue:vg}),measureValueSection:Qm({section:"measureValues",translator:e,flags:t,getThemeValue:vg}),measureLabelSection:eg({section:"measureLabels",getThemeValue:vg}),totalValuesSection:eg({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:vg}),nullValuesSection:eg({section:"nullValues",fallbackBackground:sg.NullValueBackground,getThemeValue:vg}),gridSection:bg(t)}}]}),wg=e=>({type:"items",items:{nullValueText:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},...e.isEnabled("CLIENT_IM_5975_INDENT_MODE")&&{indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:Jt.Auto,translation:"Common.Auto"},{value:Jt.Pixels,translation:"Object.Table.Column.Pixels"},{value:Jt.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:Jt.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expression:"optional",defaultValue:Xt.PixelsDefault,show:e=>{var t;const n=e.qHyperCubeDef;return n.qIndentMode&&(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.type)===Jt.Pixels},change:e=>{var t;const n=e.qHyperCubeDef;void 0!==(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.pixels)&&(n.indentModeColumnWidth.pixels=Math.max(Xt.PixelsMin,Math.min(Xt.PixelsMax,n.indentModeColumnWidth.pixels)))}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:Xt.PercentageDefault,show:e=>{var t;const n=e.qHyperCubeDef;return n.qIndentMode&&(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.type)===Jt.Percentage},change:e=>{var t;const n=e.qHyperCubeDef;void 0!==(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.percentage)&&(n.indentModeColumnWidth.percentage=Math.max(Xt.PercentageMin,Math.min(Xt.PercentageMaxInIndentMode,n.indentModeColumnWidth.percentage)))}}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(t){const{qIndentMode:n}=t.qHyperCubeDef;return(!n||!e.isEnabled("CLIENT_IM_5975_INDENT_MODE"))&&!!t.qHyperCubeDef.qDimensions.some((e=>{var t;return"TOTAL_EXPR"===(null===(t=e.qOtherTotalSpec)||void 0===t?void 0:t.qTotalMode)}))}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}),Sg=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[xg(e,t),wg(t)]}}}),Eg="auto",Cg={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:Eg,translation:"Object.Table.SortingInSearch",options:[{value:Eg,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function _g(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:un(e),sorting:Cg,addons:Lt,settings:Sg(t,n)}}}function Mg(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:_g(e),importProperties:At(e),exportProperties:It}}const kg=()=>{let e;const t=new Promise((t=>{e=t}));return{promise:t,resolve:e}};function Rg(e,t){return b((()=>e),t)}const Ag={},Ig=e=>{const t=b((()=>({current:Ag})),[]);return t.current=t.current===Ag?e:t.current,t},Lg=()=>{const{viewState:e}=v(),t=Ig(new Set),n=void 0!==e,{promise:r,resolve:i}=b((()=>kg()),[]),o=Rg((e=>{n&&t.current.add(e)}),[t]),a=Rg(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,o)}),n)}}((async()=>{await Promise.all(t.current),t.current.clear(),i()}),1e3),[i,t]);return x((async()=>{n&&await r}),[r,n]),b((()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:o})),[a,n,e,o])},Dg="#grid",Pg=(e,t)=>{const n=null==t?void 0:t.closest(e);return n&&window.getComputedStyle(n).backgroundColor},Og=(e,t,n,r,i)=>{const o=Pg(".qv-object .qv-inner-object",n),a=Pg(".qv-panel-sheet",n),s=Pg(Dg,n),l=null!=s?s:a,c=(e=>{var t,n,r,i,o,a;const s=null===(t=e.components)||void 0===t?void 0:t.find((e=>"general"===e.key)),l=null==s||null===(n=s.bgColor)||void 0===n?void 0:n.colorExpression,c=null==s||null===(r=s.bgColor)||void 0===r||null===(r=r.color)||void 0===r?void 0:r.color;if((null==s||null===(i=s.bgColor)||void 0===i?void 0:i.useColorExpression)&&l)return Vm(l);if("none"===c)return"transparent";if(void 0===c)return;const u=Rf(c);return u.setAlpha(null!==(o=null==s||null===(a=s.bgColor)||void 0===a||null===(a=a.color)||void 0===a?void 0:a.alpha)&&void 0!==o?o:u.a),u.getRGBA()})(e),u=null==r?void 0:r(t),d=null==i?void 0:i(t),p=u||o||d,h=Gm(p),f=Wm(h?l:p,hf.TEXT,hf.DARK_MODE_TEXT)===Ef(hf.DARK_MODE_TEXT);const m=((e,t,n,r=hf.WHITE)=>e&&!Gm(e)?e:Gm(t)?n&&!Gm(n)?n:r:t)(c,p,l);return{color:p,headerColor:m,isDark:f}},Tg=(e,t,n,r)=>{const i=E(),o=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=w([]);return S((()=>{let n;return e&&(n=new MutationObserver((e=>{r(e)})),n.observe(e,t)),()=>{var e;null===(e=n)||void 0===e||e.disconnect()}}),[e,t]),n})(t.closest(Dg),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter((({oldValue:e})=>null==e?void 0:e.includes("background"))).map((({oldValue:e})=>e)).join(",");return b((()=>({...i,background:Og(e,i,t,n,r)})),[i.name(),t,n,r,e,o])};function Ng(e,t){const n=b((()=>({isLoading:!0})),t),[r,i]=x((async()=>{try{return await e()}finally{n.isLoading=!1}}),t);return[r,n.isLoading,i]}const qg=3;function Fg(e,t,n){let r=0,i=e.length;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=i;){const o=Math.floor((r+i)/2),a=e.slice(0,o),s=e.slice(0,o-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(o-1)||null;if(l===t)return e.slice(o)||null;l<t?r=o+1:i=o}return null}function jg({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i){const{maxNbrLinesOfText:o=qg}=null!=i?i:{},{estimateWidth:a,measureText:l,estimateLineCount:c}=s((()=>{const i=document.createElement("canvas").getContext("2d");i.font=`${n} ${r} ${e} ${t}`;const a=Om(i.measureText.bind(i)),s=e=>+a(e).width.toFixed(2),l=Om((({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;let r=0,i=e;do{r+=1,i=Fg(i,t,s)}while(null!==i&&r<o);return r}),(({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`));return{measureText:e=>a(e).width,estimateWidth:e=>a("N").width*e,estimateLineCount:l}}),[n,r,e,t,o]);return{estimateWidth:a,measureText:l,estimateLineCount:c}}var zg,Bg=F;zg=Bg.createRoot,Bg.hydrateRoot;const Wg="Source Sans Pro, sans-serif";function $g(e,t){const[n,r]=l(t),i=n.some(((e,n)=>e!==t[n]));i&&(r(t),e())}var Hg={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const Gg=({translator:e})=>(s((()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Hg).forEach((t=>{e.add(Hg[t])}))}}(e)}),[e]),e);function Vg(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Ug=Object.freeze({__proto__:null,default:Vg}),Yg="$$material";function Kg(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Xg(t){if(e.isValidElement(t)||!Kg(t))return t;const n={};return Object.keys(t).forEach((e=>{n[e]=Xg(t[e])})),n}function Jg(t,n,r={clone:!0}){const i=r.clone?dn({},t):t;return Kg(t)&&Kg(n)&&Object.keys(n).forEach((o=>{e.isValidElement(n[o])?i[o]=n[o]:Kg(n[o])&&Object.prototype.hasOwnProperty.call(t,o)&&Kg(t[o])?i[o]=Jg(t[o],n[o],r):r.clone?i[o]=Kg(n[o])?Xg(n[o]):n[o]:i[o]=n[o]})),i}var Zg=Object.freeze({__proto__:null,default:Jg,isPlainObject:Kg});const Qg=["values","unit","step"];function ey(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=bn(e,Qg),o=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>dn({},e,{[t.key]:t.val})),{})})(t),a=Object.keys(o);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-r/100}${n})`}return dn({keys:a,values:o,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},i)}var ty={borderRadius:4};function ny(e,t){return t?Jg(e,t,{clone:!1}):e}const ry={xs:0,sm:600,md:900,lg:1200,xl:1536},iy={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ry[e]}px)`};function oy(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||iy;return t.reduce(((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r)),{})}if("object"==typeof t){const e=r.breakpoints||iy;return Object.keys(t).reduce(((r,i)=>{if(-1!==Object.keys(e.values||ry).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r}),{})}return n(t)}function ay(e){if("string"!=typeof e)throw new Error(Vg(7));return e.charAt(0).toUpperCase()+e.slice(1)}var sy=Object.freeze({__proto__:null,default:ay});function ly(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function cy(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:ly(e,n)||r,t&&(i=t(i,r,e)),i}function uy(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=e=>{if(null==e[t])return null;const o=e[t],a=ly(e.theme,r)||{};return oy(e,o,(e=>{let r=cy(a,i,e);return e===r&&"string"==typeof e&&(r=cy(a,i,`${t}${"default"===e?"":ay(e)}`,e)),!1===n?r:{[n]:r}}))};return o.propTypes={},o.filterProps=[t],o}const dy={m:"margin",p:"padding"},py={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},hy={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fy=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!hy[e])return[e];e=hy[e]}const[t,n]=e.split(""),r=dy[t],i=py[n]||"";return Array.isArray(i)?i.map((e=>r+e)):[r+i]})),my=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],gy=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function yy(e,t,n,r){var i;const o=null!=(i=ly(e,t,!1))?i:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>{}}function by(e){return yy(e,"spacing",8)}function vy(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function xy(e,t,n,r){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=vy(t,n),e)),{})}(fy(n),r);return oy(e,e[n],i)}function wy(e,t){const n=by(e.theme);return Object.keys(e).map((r=>xy(e,t,r,n))).reduce(ny,{})}function Sy(e){return wy(e,my)}function Ey(e){return wy(e,gy)}function Cy(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?ny(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function _y(e){return"number"!=typeof e?e:`${e}px solid`}function My(e,t){return uy({prop:e,themeKey:"borders",transform:t})}Sy.propTypes={},Sy.filterProps=my,Ey.propTypes={},Ey.filterProps=gy;const ky=My("border",_y),Ry=My("borderTop",_y),Ay=My("borderRight",_y),Iy=My("borderBottom",_y),Ly=My("borderLeft",_y),Dy=My("borderColor"),Py=My("borderTopColor"),Oy=My("borderRightColor"),Ty=My("borderBottomColor"),Ny=My("borderLeftColor"),qy=My("outline",_y),Fy=My("outlineColor"),jy=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=yy(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:vy(t,e)});return oy(e,e.borderRadius,n)}return null};jy.propTypes={},jy.filterProps=["borderRadius"],Cy(ky,Ry,Ay,Iy,Ly,Dy,Py,Oy,Ty,Ny,jy,qy,Fy);const zy=e=>{if(void 0!==e.gap&&null!==e.gap){const t=yy(e.theme,"spacing",8),n=e=>({gap:vy(t,e)});return oy(e,e.gap,n)}return null};zy.propTypes={},zy.filterProps=["gap"];const By=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=yy(e.theme,"spacing",8),n=e=>({columnGap:vy(t,e)});return oy(e,e.columnGap,n)}return null};By.propTypes={},By.filterProps=["columnGap"];const Wy=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=yy(e.theme,"spacing",8),n=e=>({rowGap:vy(t,e)});return oy(e,e.rowGap,n)}return null};Wy.propTypes={},Wy.filterProps=["rowGap"];function $y(e,t){return"grey"===t?t:e}Cy(zy,By,Wy,uy({prop:"gridColumn"}),uy({prop:"gridRow"}),uy({prop:"gridAutoFlow"}),uy({prop:"gridAutoColumns"}),uy({prop:"gridAutoRows"}),uy({prop:"gridTemplateColumns"}),uy({prop:"gridTemplateRows"}),uy({prop:"gridTemplateAreas"}),uy({prop:"gridArea"}));function Hy(e){return e<=1&&0!==e?100*e+"%":e}Cy(uy({prop:"color",themeKey:"palette",transform:$y}),uy({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:$y}),uy({prop:"backgroundColor",themeKey:"palette",transform:$y}));const Gy=uy({prop:"width",transform:Hy}),Vy=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||ry[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Hy(t)}};return oy(e,e.maxWidth,t)}return null};Vy.filterProps=["maxWidth"];const Uy=uy({prop:"minWidth",transform:Hy}),Yy=uy({prop:"height",transform:Hy}),Ky=uy({prop:"maxHeight",transform:Hy}),Xy=uy({prop:"minHeight",transform:Hy});uy({prop:"size",cssProperty:"width",transform:Hy}),uy({prop:"size",cssProperty:"height",transform:Hy});Cy(Gy,Vy,Uy,Yy,Ky,Xy,uy({prop:"boxSizing"}));const Jy={border:{themeKey:"borders",transform:_y},borderTop:{themeKey:"borders",transform:_y},borderRight:{themeKey:"borders",transform:_y},borderBottom:{themeKey:"borders",transform:_y},borderLeft:{themeKey:"borders",transform:_y},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:_y},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:jy},color:{themeKey:"palette",transform:$y},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:$y},backgroundColor:{themeKey:"palette",transform:$y},p:{style:Ey},pt:{style:Ey},pr:{style:Ey},pb:{style:Ey},pl:{style:Ey},px:{style:Ey},py:{style:Ey},padding:{style:Ey},paddingTop:{style:Ey},paddingRight:{style:Ey},paddingBottom:{style:Ey},paddingLeft:{style:Ey},paddingX:{style:Ey},paddingY:{style:Ey},paddingInline:{style:Ey},paddingInlineStart:{style:Ey},paddingInlineEnd:{style:Ey},paddingBlock:{style:Ey},paddingBlockStart:{style:Ey},paddingBlockEnd:{style:Ey},m:{style:Sy},mt:{style:Sy},mr:{style:Sy},mb:{style:Sy},ml:{style:Sy},mx:{style:Sy},my:{style:Sy},margin:{style:Sy},marginTop:{style:Sy},marginRight:{style:Sy},marginBottom:{style:Sy},marginLeft:{style:Sy},marginX:{style:Sy},marginY:{style:Sy},marginInline:{style:Sy},marginInlineStart:{style:Sy},marginInlineEnd:{style:Sy},marginBlock:{style:Sy},marginBlockStart:{style:Sy},marginBlockEnd:{style:Sy},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:zy},rowGap:{style:Wy},columnGap:{style:By},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Hy},maxWidth:{style:Vy},minWidth:{transform:Hy},height:{transform:Hy},maxHeight:{transform:Hy},minHeight:{transform:Hy},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};var Zy=Jy;function Qy(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=ly(n,s)||{};if(c)return c(i);return oy(i,t,(t=>{let n=cy(u,l,t);return t===n&&"string"==typeof t&&(n=cy(u,l,`${e}${"default"===t?"":ay(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=null!=(r=o.unstable_sxConfig)?r:Zy;function s(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const i=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(o.breakpoints),s=Object.keys(i);let l=i;return Object.keys(r).forEach((n=>{const i=(s=r[n],c=o,"function"==typeof s?s(c):s);var s,c;if(null!=i)if("object"==typeof i)if(a[n])l=ny(l,e(n,i,o,a));else{const e=oy({theme:o},i,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,i)?l=ny(l,e):l[n]=t({sx:i,theme:o})}else l=ny(l,e(n,i,o,a))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(s,l)}return Array.isArray(i)?i.map(s):s(i)}}const eb=Qy();eb.filterProps=["sx"];var tb=eb;function nb(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}const rb=["breakpoints","palette","spacing","shape"];function ib(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=bn(e,rb),s=ey(n),l=function(e=8){if(e.mui)return e;const t=by({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(i);let c=Jg({breakpoints:s,direction:"ltr",components:{},palette:dn({mode:"light"},r),spacing:l,shape:dn({},ty,o)},a);return c.applyStyles=nb,c=t.reduce(((e,t)=>Jg(e,t)),c),c.unstable_sxConfig=dn({},Zy,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return tb({sx:e,theme:this})},c}var ob=Object.freeze({__proto__:null,default:ib,private_createBreakpoints:ey,unstable_applyStyles:nb});function ab(t=null){const n=e.useContext(Lo);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}const sb=ib();function lb(e=sb){return ab(e)}const cb=["sx"];function ub(e){const{sx:t}=e,n=bn(e,cb),{systemProps:r,otherProps:i}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:Zy;return Object.keys(e).forEach((t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r})(n);let o;return o=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return Kg(n)?dn({},r,n):r}:dn({},r,t),dn({},i,{sx:o})}var db=Object.freeze({__proto__:null,default:tb,extendSxProp:ub,unstable_createStyleFunctionSx:Qy,unstable_defaultSxConfig:Zy});const pb=e=>e;var hb=(()=>{let e=pb;return{configure(t){e=t},generate:t=>e(t),reset(){e=pb}}})();const fb=["className","component"];const mb={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function gb(e,t,n="Mui"){const r=mb[t];return r?`${n}-${r}`:`${hb.generate(e)}-${t}`}function yb(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=gb(e,t,n)})),r}const bb=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function vb(e){const t=`${e}`.match(bb);return t&&t[1]||""}function xb(e,t=""){return e.displayName||e.name||vb(e)||t}function wb(e,t,n){const r=xb(t);return e.displayName||(""!==r?`${n}(${r})`:n)}var Sb=Object.freeze({__proto__:null,default:function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return xb(e,"Component");if("object"==typeof e)switch(e.$$typeof){case fa.ForwardRef:return wb(e,e.render,"ForwardRef");case fa.Memo:return wb(e,e.type,"memo");default:return}}},getFunctionName:vb});function Eb(e,t){const n=dn({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=dn({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},o&&Object.keys(o)?i&&Object.keys(i)?(n[r]=dn({},o),Object.keys(i).forEach((e=>{n[r][e]=Eb(i[e],o[e])}))):n[r]=o:n[r]=i}else void 0===n[r]&&(n[r]=e[r])})),n}var Cb="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function _b(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}var Mb=Object.freeze({__proto__:null,default:_b});function kb(e){if(e.type)return e;if("#"===e.charAt(0))return kb(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Vg(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(Vg(10,r))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:r}}function Rb(e,t){return e=kb(e),t=function(e,t=0,n=1){return _b(e,t,n)}(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}(e)}function Ab(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}function Ib(e){return e&&e.ownerDocument||document}function Lb(e){return Ib(e).defaultView||window}function Db(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Pb(t){const n=e.useRef(t);return Cb((()=>{n.current=t})),e.useRef(((...e)=>(0,n.current)(...e))).current}function Ob(...t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{Db(t,e)}))}),t)}const Tb={};const Nb=[];class qb{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new qb}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function Fb(){const t=function(t,n){const r=e.useRef(Tb);return r.current===Tb&&(r.current=t(n)),r}(qb.create).current;return function(t){e.useEffect(t,Nb)}(t.disposeEffect),t}let jb=!0,zb=!1;const Bb=new qb,Wb={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function $b(e){e.metaKey||e.altKey||e.ctrlKey||(jb=!0)}function Hb(){jb=!1}function Gb(){"hidden"===this.visibilityState&&zb&&(jb=!0)}function Vb(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return jb||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!Wb[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Ub(){const t=e.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",$b,!0),t.addEventListener("mousedown",Hb,!0),t.addEventListener("pointerdown",Hb,!0),t.addEventListener("touchstart",Hb,!0),t.addEventListener("visibilitychange",Gb,!0))}),[]),n=e.useRef(!1);return{isFocusVisibleRef:n,onFocus:function(e){return!!Vb(e)&&(n.current=!0,!0)},onBlur:function(){return!!n.current&&(zb=!0,Bb.start(100,(()=>{zb=!1})),n.current=!1,!0)},ref:t}}function Yb(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function Kb(e,t,n=void 0){const r={};return Object.keys(e).forEach((i=>{r[i]=e[i].reduce(((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}function Xb(e){return"string"==typeof e}function Jb(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}function Zb(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}const Qb=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function ev(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=bn(e,Qb),s=o?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(r,i),{props:l,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Ma(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=dn({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=dn({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=Jb(dn({},i,r)),s=Zb(r),l=Zb(i),c=t(a),u=Ma(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=dn({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),p=dn({},c,n,l,s);return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}(dn({},a,{externalSlotProps:s})),u=function(e,t,n){return void 0===e||Xb(e)?t:dn({},t,{ownerState:dn({},t.ownerState,n)})}(n,dn({},l,{ref:Ob(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref)}),i);return u}function tv(t){var n;return parseInt(e.version,10)>=19?(null==t||null==(n=t.props)?void 0:n.ref)||null:(null==t?void 0:t.ref)||null}var nv=e.createContext(null);function rv(){return e.useContext(nv)}var iv="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function ov(t){const{children:n,theme:r}=t,i=rv(),o=e.useMemo((()=>{const e=null===i?r:function(e,t){if("function"==typeof t)return t(e);return dn({},e,t)}(i,r);return null!=e&&(e[iv]=null!==i),e}),[r,i]);return Ws.jsx(nv.Provider,{value:o,children:n})}const av=["value"],sv=e.createContext();function lv(e){let{value:t}=e,n=bn(e,av);return Ws.jsx(sv.Provider,dn({value:null==t||t},n))}const cv=e.createContext(void 0);function uv({value:e,children:t}){return Ws.jsx(cv.Provider,{value:e,children:t})}function dv({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Eb(i.defaultProps,r):i.styleOverrides||i.variants?r:Eb(i,r)}({props:t,name:n,theme:{components:e.useContext(cv)}})}const pv={};function hv(t,n,r,i=!1){return e.useMemo((()=>{const e=t&&n[t]||n;if("function"==typeof r){const o=r(e),a=t?dn({},n,{[t]:o}):o;return i?()=>a:a}return dn({},n,t?{[t]:r}:r)}),[t,n,r,i])}function fv(e){const{children:t,theme:n,themeId:r}=e,i=ab(pv),o=rv()||pv,a=hv(r,i,n),s=hv(r,o,n,!0),l="rtl"===a.direction;return Ws.jsx(ov,{theme:s,children:Ws.jsx(Lo.Provider,{value:a,children:Ws.jsx(lv,{value:l,children:Ws.jsx(uv,{value:null==a?void 0:a.components,children:t})})})})}var mv,gv={},yv={exports:{}};(mv=yv).exports=function(e){return e&&e.__esModule?e:{default:e}},mv.exports.__esModule=!0,mv.exports.default=mv.exports;var bv=yv.exports,vv=z(Ug),xv=z(Mb),wv=bv;Object.defineProperty(gv,"__esModule",{value:!0});var Sv=gv.alpha=Tv;gv.blend=function(e,t,n,r=1){const i=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),o=Iv(e),a=Iv(t),s=[i(o.values[0],a.values[0]),i(o.values[1],a.values[1]),i(o.values[2],a.values[2])];return Dv({type:"rgb",values:s})},gv.colorChannel=void 0;var Ev=gv.darken=Nv;gv.decomposeColor=Iv,gv.emphasize=Fv;var Cv=gv.getContrastRatio=function(e,t){const n=Ov(e),r=Ov(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)};gv.getLuminance=Ov,gv.hexToRgb=Av,gv.hslToRgb=Pv;var _v=gv.lighten=qv;gv.private_safeAlpha=function(e,t,n){try{return Tv(e,t)}catch(t){return e}},gv.private_safeColorChannel=void 0,gv.private_safeDarken=function(e,t,n){try{return Nv(e,t)}catch(t){return e}},gv.private_safeEmphasize=function(e,t,n){try{return Fv(e,t)}catch(t){return e}},gv.private_safeLighten=function(e,t,n){try{return qv(e,t)}catch(t){return e}},gv.recomposeColor=Dv,gv.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=Iv(e);return`#${t.map(((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e))).join("")}`};var Mv=wv(vv),kv=wv(xv);function Rv(e,t=0,n=1){return(0,kv.default)(e,t,n)}function Av(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}function Iv(e){if(e.type)return e;if("#"===e.charAt(0))return Iv(Av(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,Mv.default)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,Mv.default)(10,r))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:r}}const Lv=e=>{const t=Iv(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e)).join(" ")};gv.colorChannel=Lv;function Dv(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function Pv(e){e=Iv(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(e,t=(e+n/30)%12)=>i-o*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Dv({type:s,values:l})}function Ov(e){let t="hsl"===(e=Iv(e)).type||"hsla"===e.type?Iv(Pv(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Tv(e,t){return e=Iv(e),t=Rv(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Dv(e)}function Nv(e,t){if(e=Iv(e),t=Rv(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Dv(e)}function qv(e,t){if(e=Iv(e),t=Rv(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Dv(e)}function Fv(e,t=.15){return Ov(e)>.5?Nv(e,t):qv(e,t)}gv.private_safeColorChannel=(e,t)=>{try{return Lv(e)}catch(t){return e}};var jv={black:"#000",white:"#fff"};var zv={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var Bv={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var Wv={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var $v={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var Hv={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var Gv={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var Vv={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const Uv=["mode","contrastThreshold","tonalOffset"],Yv={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:jv.white,default:jv.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Kv={text:{primary:jv.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:jv.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Xv(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=_v(e.main,i):"dark"===t&&(e.dark=Ev(e.main,o)))}function Jv(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=bn(e,Uv),o=e.primary||function(e="light"){return"dark"===e?{main:Hv[200],light:Hv[50],dark:Hv[400]}:{main:Hv[700],light:Hv[400],dark:Hv[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:Bv[200],light:Bv[50],dark:Bv[400]}:{main:Bv[500],light:Bv[300],dark:Bv[700]}}(t),s=e.error||function(e="light"){return"dark"===e?{main:Wv[500],light:Wv[300],dark:Wv[700]}:{main:Wv[700],light:Wv[400],dark:Wv[800]}}(t),l=e.info||function(e="light"){return"dark"===e?{main:Gv[400],light:Gv[300],dark:Gv[700]}:{main:Gv[700],light:Gv[500],dark:Gv[900]}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Vv[400],light:Vv[300],dark:Vv[700]}:{main:Vv[800],light:Vv[500],dark:Vv[900]}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:$v[400],light:$v[300],dark:$v[700]}:{main:"#ed6c02",light:$v[500],dark:$v[900]}}(t);function d(e){return Cv(e,Kv.text.primary)>=n?Kv.text.primary:Yv.text.primary}const p=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:o=700})=>{if(!(e=dn({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(Vg(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(Vg(12,t?` (${t})`:"",JSON.stringify(e.main)));return Xv(e,"light",i,r),Xv(e,"dark",o,r),e.contrastText||(e.contrastText=d(e.main)),e},h={dark:Kv,light:Yv};return Jg(dn({common:dn({},jv),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:zv,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},h[t]),i)}const Zv=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Qv(e){return Math.round(1e5*e)/1e5}const ex={textTransform:"uppercase"},tx='"Roboto", "Helvetica", "Arial", sans-serif';function nx(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=tx,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,p=bn(n,Zv),h=i/14,f=d||(e=>e/c*h+"rem"),m=(e,t,n,i,o)=>dn({fontFamily:r,fontWeight:e,fontSize:f(t),lineHeight:n},r===tx?{letterSpacing:`${Qv(i/t)}em`}:{},o,u),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(s,14,1.75,.4,ex),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,ex),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Jg(dn({htmlFontSize:c,pxToRem:f,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),p,{clone:!1})}function rx(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var ix=["none",rx(0,2,1,-1,0,1,1,0,0,1,3,0),rx(0,3,1,-2,0,2,2,0,0,1,5,0),rx(0,3,3,-2,0,3,4,0,0,1,8,0),rx(0,2,4,-1,0,4,5,0,0,1,10,0),rx(0,3,5,-1,0,5,8,0,0,1,14,0),rx(0,3,5,-1,0,6,10,0,0,1,18,0),rx(0,4,5,-2,0,7,10,1,0,2,16,1),rx(0,5,5,-3,0,8,10,1,0,3,14,2),rx(0,5,6,-3,0,9,12,1,0,3,16,2),rx(0,6,6,-3,0,10,14,1,0,4,18,3),rx(0,6,7,-4,0,11,15,1,0,4,20,3),rx(0,7,8,-4,0,12,17,2,0,5,22,4),rx(0,7,8,-4,0,13,19,2,0,5,24,4),rx(0,7,9,-4,0,14,21,2,0,5,26,4),rx(0,8,9,-5,0,15,22,2,0,6,28,5),rx(0,8,10,-5,0,16,24,2,0,6,30,5),rx(0,8,11,-5,0,17,26,2,0,6,32,5),rx(0,9,11,-5,0,18,28,2,0,7,34,6),rx(0,9,12,-6,0,19,29,2,0,7,36,6),rx(0,10,13,-6,0,20,31,3,0,8,38,7),rx(0,10,13,-6,0,21,33,3,0,8,40,7),rx(0,10,14,-6,0,22,35,3,0,8,42,7),rx(0,11,14,-7,0,23,36,3,0,9,44,8),rx(0,11,15,-7,0,24,38,3,0,9,46,8)];const ox=["duration","easing","delay"],ax={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},sx={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function lx(e){return`${Math.round(e)}ms`}function cx(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function ux(e){const t=dn({},ax,e.easing),n=dn({},sx,e.duration);return dn({getAutoHeightDuration:cx,create:(e=["all"],r={})=>{const{duration:i=n.standard,easing:o=t.easeInOut,delay:a=0}=r;return bn(r,ox),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof i?i:lx(i)} ${o} ${"string"==typeof a?a:lx(a)}`)).join(",")}},e,{easing:t,duration:n})}var dx={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const px=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function hx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,a=bn(e,px);if(e.vars)throw new Error(Vg(18));const s=Jv(r),l=ib(e);let c=Jg(l,{mixins:(u=l.breakpoints,d=n,dn({toolbar:{minHeight:56,[u.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[u.up("sm")]:{minHeight:64}}},d)),palette:s,shadows:ix.slice(),typography:nx(s,o),transitions:ux(i),zIndex:dn({},dx)});var u,d;return c=Jg(c,a),c=t.reduce(((e,t)=>Jg(e,t)),c),c.unstable_sxConfig=dn({},Zy,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return tb({sx:e,theme:this})},c}var fx=hx();function mx(){const e=lb(fx);return e[Yg]||e}var gx,yx={},bx={exports:{}};var vx,xx={exports:{}};var wx=z(Uo),Sx=z(Zg),Ex=z(sy),Cx=z(Sb),_x=z(ob),Mx=z(db),kx=bv;Object.defineProperty(yx,"__esModule",{value:!0});var Rx=yx.default=function(e={}){const{themeId:t,defaultTheme:n=zx,rootShouldForwardProp:r=jx,slotShouldForwardProp:i=jx}=e,o=e=>(0,Ox.default)((0,Ax.default)({},e,{theme:Wx((0,Ax.default)({},e,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(e,a={})=>{(0,Lx.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:s,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=$x(Bx(l))}=a,p=(0,Ix.default)(a,qx),h=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,f=u||!1;let m=jx;"Root"===l||"root"===l?m=r:l?m=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const g=(0,Lx.default)(e,(0,Ax.default)({shouldForwardProp:m,label:undefined},p)),y=e=>"function"==typeof e&&e.__emotion_real!==e||(0,Dx.isPlainObject)(e)?r=>Hx(e,(0,Ax.default)({},r,{theme:Wx({theme:r.theme,defaultTheme:n,themeId:t})})):e,b=(r,...i)=>{let a=y(r);const l=i?i.map(y):[];s&&d&&l.push((e=>{const r=Wx((0,Ax.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const i=r.components[s].styleOverrides,o={};return Object.entries(i).forEach((([t,n])=>{o[t]=Hx(n,(0,Ax.default)({},e,{theme:r}))})),d(e,o)})),s&&!h&&l.push((e=>{var r;const i=Wx((0,Ax.default)({},e,{defaultTheme:n,themeId:t}));return Hx({variants:null==i||null==(r=i.components)||null==(r=r[s])?void 0:r.variants},(0,Ax.default)({},e,{theme:i}))})),f||l.push(o);const c=l.length-i.length;if(Array.isArray(r)&&c>0){const e=new Array(c).fill("");a=[...r,...e],a.raw=[...r.raw,...e]}const u=g(a,...l);return e.muiName&&(u.muiName=e.muiName),u};return g.withConfig&&(b.withConfig=g.withConfig),b}};yx.shouldForwardProp=jx,yx.systemDefaultTheme=void 0;var Ax=kx((gx||(gx=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(bx)),bx.exports)),Ix=kx((vx||(vx=1,function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}(xx)),xx.exports)),Lx=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=Fx(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(wx),Dx=Sx;kx(Ex),kx(Cx);var Px=kx(_x),Ox=kx(Mx);const Tx=["ownerState"],Nx=["variants"],qx=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Fx(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Fx=function(e){return e?n:t})(e)}function jx(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const zx=yx.systemDefaultTheme=(0,Px.default)(),Bx=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function Wx({defaultTheme:e,theme:t,themeId:n}){return r=t,0===Object.keys(r).length?e:t[n]||t;var r}function $x(e){return e?(t,n)=>n[e]:null}function Hx(e,t){let{ownerState:n}=t,r=(0,Ix.default)(t,Tx);const i="function"==typeof e?e((0,Ax.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap((e=>Hx(e,(0,Ax.default)({ownerState:n},r))));if(i&&"object"==typeof i&&Array.isArray(i.variants)){const{variants:e=[]}=i;let t=(0,Ix.default)(i,Nx);return e.forEach((e=>{let i=!0;"function"==typeof e.props?i=e.props((0,Ax.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,Ax.default)({ownerState:n},r,n)):e.style))})),t}return i}var Gx=e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e;var Vx=Rx({themeId:Yg,defaultTheme:fx,rootShouldForwardProp:Gx});const Ux=["theme"];function Yx(e){let{theme:t}=e,n=bn(e,Ux);const r=t[Yg];return Ws.jsx(fv,dn({},n,{themeId:r?Yg:void 0,theme:r||t}))}var Kx=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};const Xx={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Jx={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Zx=cc("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Xx},"&::-moz-range-track":{...Xx},"&::-ms-track":{...Xx},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Jx},"&::-moz-range-thumb":{...Jx},"&::-ms-thumb":{...Jx},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}}))),Qx=({columnWidth:e,keyValue:n,isLastColumn:r,isPivot:i,hoverColor:o,updateWidthCallback:a,confirmWidthCallback:s,handleBlur:l,setIsAdjustingWidth:u,isLeftColumn:d,accessibilityRelatedArgs:p,direction:h})=>{const f=Gg({translator:p.translator}),m=c({initWidth:e,columnWidth:e,initX:0}),g=r?0:1,y=i&&!d,b={left:"rtl"===h?"0px":y?m.current.columnWidth-g:"100%",right:"rtl"===h?"100%":"0px"},v=t=>{m.current={initWidth:e,columnWidth:e,initX:null!=t?t:m.current.initX}};$g((()=>{y&&v()}),[e]);const x=e=>{const t=Math.max(e,Xt.PixelsMin);m.current.columnWidth=t,a(t)},w=()=>{if(m.current.columnWidth!==m.current.initWidth){const e={type:Jt.Pixels,pixels:m.current.columnWidth};s(e)}else null==u||u(!1)},S=e=>{const t="rtl"===h?m.current.initWidth+m.current.initX-e.clientX:m.current.initWidth+e.clientX-m.current.initX;x(t)},E=e=>{Um(e),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",E),w()},C=e=>{const t=m.current.initWidth+e.touches[0].clientX-m.current.initX;x(t)},_=e=>{Um(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",_),w()},M=!i&&l?e=>{if(e.key===Yt.Left||e.key===Yt.Right){Um(e);const t=5,n=e.key===Yt.Left?-t:t;x(m.current.columnWidth+n)}else e.key===Yt.Space||e.key===Yt.Enter?(Um(e),l(e),w()):e.key===Yt.Esc&&(Um(e),l(e),x(m.current.initWidth))}:void 0,k=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(p.columnLabel)]);return t.createElement(Zx,{style:b,key:n,hoverColor:o,isLastColumn:r,className:Kt,"data-testid":Kt,onMouseDown:e=>{Um(e),document.addEventListener("mousemove",S),document.addEventListener("mouseup",E),null==u||u(!0),v(e.clientX)},onDoubleClick:()=>{s({type:Jt.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(Um(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",_),null==u||u(!0),v(e.touches[0].clientX))},onKeyDown:M,onBlur:l,onFocus:()=>{v()},type:"range",tabIndex:"-1",max:Xt.PixelsMax,"aria-label":k,"aria-valuemin":Xt.PixelsMin,"aria-valuemax":Xt.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:h})};function ew(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const tw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ew(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})),nw=u(tw);function rw(){return rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rw.apply(null,arguments)}const iw=cc(Od,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e})((({rightAligned:e,shouldShowMenuIcon:t})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:24,display:t?"flex":"none",fontWeight:"bold",width:"100%",alignItems:"center",justifyContent:"center"}))),ow=cc(nw,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),aw=cc(mh)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),sw=cc(ip)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),lw=cc(wh)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),cw=cc(wh,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})((({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden ",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"}))),uw=cc("div")((({theme:e})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),dw=cc("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),pw=cc(Tu)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),hw=cc(jp)((({theme:e})=>({width:16,minWidth:"unset !important",marginRight:e.spacing(1.5),lineHeight:0})));function fw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})),gw=u(mw);let yw={};const bw=({autoFocus:e,id:n,onClick:r,itemTitle:i,icon:o,enabled:a,subMenus:s,isSubMenu:u,isActive:p,handleHeadCellMenuKeyDown:h})=>{const[f,m]=l(!1),g=c(null),y=d((e=>{e.stopPropagation(),m(!1)}),[m]);return t.createElement(t.Fragment,null,t.createElement(cw,{ref:s?g:null,key:n,"data-testid":`menu-item-${n}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),yw={}),null!=s&&s.length&&(m(!0),yw[i]=m))},disabled:!a,autoFocus:e,isSubMenu:!!u,isActive:!!p,onKeyDown:h},p?t.createElement(uw,null):null,t.createElement(dw,null,t.createElement(hw,null,t.createElement(o,null)),t.createElement(pw,{variant:"body2"},i)),null!=s&&s.length?t.createElement(gw,null):null),null!=s&&s.length?t.createElement(ww,{isSubMenu:!0,open:f,anchorEl:g.current,onClose:y,menuGroups:(b=s,v=yw,b.map((e=>e.map((e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map((({onClick:e,...t})=>({...t,...e?{onClick:async t=>{Object.entries(v).forEach((([,e])=>{e(!1)})),await e(t)}}:{}})))})))))),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},handleHeadCellMenuKeyDown:h}):null);var b,v},vw=({menuGroup:e,isSubMenu:n,handleHeadCellMenuKeyDown:r})=>e.map((e=>[[e.groupHeading&&t.createElement(lw,{key:e.groupHeading,disabled:!0,style:{opacity:1}},e.groupHeading),e.items.map((e=>t.createElement(bw,rw({key:e.id},e,{isSubMenu:n,handleHeadCellMenuKeyDown:r}))))].filter(Boolean)])),xw={appear:200,enter:200,exit:100},ww=({anchorEl:e,open:n,onClose:r,menuGroups:i,transformOrigin:o,anchorOrigin:a,isSubMenu:s,handleHeadCellMenuKeyDown:l})=>i.length?t.createElement(aw,rw({className:"nebula-table-utils-head-menu",open:n,anchorEl:e,onClose:r,transitionDuration:xw,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"}},a?{anchorOrigin:a}:{},o?{transformOrigin:o}:{}),(({itemGroups:e,isSubMenu:n,handleHeadCellMenuKeyDown:r})=>e.map(((i,o)=>[vw({menuGroup:i,isSubMenu:n,handleHeadCellMenuKeyDown:r}),o<e.length-1?t.createElement(sw,{"data-testid":"group-divider",variant:"middle"}):void 0])))({itemGroups:i,isSubMenu:s,handleHeadCellMenuKeyDown:l})):null,Sw=(e,t)=>e.some((e=>t[e]>0)),Ew={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},Cw=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=l(null),[a,s]=l(Ew);return $g((()=>{e||(s(Ew),o(null))}),[e]),p((()=>{if(null==r||!r.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{var e,c,u;const d=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),p=await r.createSessionObject(d),h=await p.getLayout(),{qStateCounts:f}=null!==(e=null===(c=h.qListObject)||void 0===c?void 0:c.qDimensionInfo)&&void 0!==e?e:{};i=null===(u=h.qInfo)||void 0===u?void 0:u.qId,a?l():(o(p),f&&s((e=>({canSelectAll:Sw(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:Sw(["qSelected"],e),canSelectPossible:Sw(["qOption"],e),canSelectAlternative:Sw(["qAlternative"],e),canSelectExcluded:Sw(["qAlternative","qExcluded"],e)}))(f)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}};function _w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Mw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_w(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})),kw=u(Mw);function Rw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Aw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Rw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})),Iw=u(Aw);function Lw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Lw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})),Pw=u(Dw);function Ow(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Tw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ow(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})),Nw=u(Tw);function qw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){qw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.454.858v6.484a1 1 0 0 1-.576.906L8.5 14.663V7.17z"})),jw=u(Fw);function zw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Bw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){zw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})),Ww=u(Bw);function $w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Hw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$w(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})),Gw=u(Hw);function Vw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Uw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Vw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})),Yw=u(Uw);function Kw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Kw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})),Jw=u(Xw);function Zw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Zw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})),eS=u(Qw);function tS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){tS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})),rS=u(nS);function iS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){iS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})),aS=u(oS);function sS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const lS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})),cS=u(lS);function uS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){uS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})),pS=u(dS);let hS=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const fS="/qListObjectDef",mS=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,setFocusOnColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const h=[];if(n[hS.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);h.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(null==i?void 0:i(e,"A")),r(!1)},icon:kw,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(null==i?void 0:i(e,"D")),r(!1)},icon:Nw,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:Yw,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:jw,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&h.push(...t)}if(e.isDim&&null!=o&&o.select){const e=[];n[hS.Searching]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:Jw,enabled:!0}]}]),n[hS.Selections]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:pS,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectAll(fS))},icon:eS,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectPossible(fS))},icon:cS,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectAlternative(fS))},icon:rS,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectExcluded(fS))},icon:aS,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.clearSelections(fS))},icon:Iw,enabled:l.canClearSelections}]}]]}]}]),p&&h.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:Gw,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:Ww,enabled:!0}]}]),e.length>0&&h.push(...e)}return n[hS.AdjusterHeaderSize]&&h.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),null==u||u(c)},icon:Pw,enabled:!0}]}]),h},gS=({open:e,setOpen:n,anchorRef:r,headerData:i,translator:o,interactions:a,handleHeadCellMenuKeyDown:s,menuAvailabilityFlags:l,shouldShowMenuIcon:c=!0,sortRelatedArgs:u,searchRelatedArgs:p,selectionRelatedArgs:h,adjustHeaderSizeRelatedArgs:f,expandOrCollapseArgs:m,env:g,model:y})=>{var b;const v=Gg({translator:o}),{headTextAlign:x,qLibraryId:w,fieldId:S}=i,E=null==h?void 0:h.app,{fieldInstance:C,selectionActionsEnabledStatus:_}=Cw({open:e,headerData:i,app:E,qStateName:null==h?void 0:h.qStateName});let M=null;if(g.flags.isEnabled("CLIENT_IM_7107_TABLE_MENU_CYCLIC_DIM")&&y&&"setActiveField"in y&&void 0!==i.dimensionInfoIndex){const e=i.dimensionInfoIndex;M=async t=>{try{await y.setActiveField("/qHyperCubeDef",e,t)}catch(e){console.error(e)}}}const k=d((()=>{const e=w?{qLibraryId:w,type:"dimension"}:S;if(null!=p&&p.embed&&p.listboxRef){const{embed:t,listboxRef:n}=p;t.__DO_NOT_USE__.popover(n.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sortCriteria:p.sortCriteria,stateName:null==h?void 0:h.qStateName})}}),[w,S,p,null==h?void 0:h.qStateName]),R=d((e=>{e.stopPropagation(),n(!1)}),[n]);return a.active?t.createElement(iw,{rightAligned:"right"===x,shouldShowMenuIcon:c,className:"nebula-table-utils-head-menu-wrapper"},c?t.createElement(ow,{height:Gt,className:Vt,"data-testid":Vt,isInteractionsActive:null!==(b=a.active)&&void 0!==b&&b},t.createElement(nw,null)):null,t.createElement(ww,{open:e,anchorEl:r.current,onClose:R,menuGroups:mS({headerData:i,translator:v,menuAvailabilityFlags:l,setOpen:n,...u,embedListbox:k,interactions:a,fieldInstance:C,selectionActionsEnabledStatus:_,anchorRef:r,setFocusOnColumnAdjuster:null==f?void 0:f.setFocusOnColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:m}),handleHeadCellMenuKeyDown:s})):null},yS=e=>e.isDark?{background:e.color,borderColor:hf.DARK_MODE_BORDER,color:hf.DARK_MODE_TEXT,disabledColor:hf.DARK_MODE_DISABLED,iconColor:hf.DARK_MODE_TEXT}:{background:e.color,borderColor:hf.BORDER_MEDIUM,color:hf.TEXT,disabledColor:hf.DISABLED},bS=cc(Od,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),vS=cc(af,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),xS=cc(Gd,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)}))),wS=cc(Tu)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),SS=({children:e,footerContainer:n,interactions:r,theme:i,paginationNeeded:o=!0})=>{const a=s((()=>yS(i.background)),[i]);if(!r.active)return null;const l=o?t.createElement(bS,{footerStyle:a},e):null;return n?F.createPortal(e,n):l},ES=h({}),CS=()=>n(ES),_S=({children:e,direction:n,pageInfo:r,handleChangeRowsPerPage:i,footerContainer:o,isSelectionMode:a,handleChangePage:l,totalRowCount:c,totalColumnCount:u,totalPages:d,keyboard:p,translator:h,theme:f,interactions:m,rect:g,layout:y})=>{const b=(e=>!e.enabled||e.active)(p)?0:-1,v=s((()=>yS(f.background)),[f]),x=o?o.getBoundingClientRect().width:g.width,w=Gg({translator:h}),S=s((()=>({direction:n,pageInfo:r,handleChangeRowsPerPage:i,footerContainer:o,isSelectionMode:a,handleChangePage:l,totalRowCount:c,totalColumnCount:u,totalPages:d,keyboard:p,translator:w,theme:f,interactions:m,rect:g,layout:y,footerStyle:v,tabIndex:b,width:x})),[n,r,i,o,a,l,c,u,d,p,w,f,m,g,y,v,b,x]);return t.createElement(ES.Provider,{value:S},e)};let MS=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),kS=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});function RS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const AS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){RS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})),IS=u(AS);function LS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const DS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){LS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})),PS=u(DS);function OS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const TS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){OS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})),NS=u(TS),qS={FirstPage:PS,PreviousPage:IS,NextPage:gw,LastPage:NS,FirstPageRTL:NS,PreviousPageRTL:gw,NextPageRTL:IS,LastPageRTL:PS},FS=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=CS(),c=qS[`${n}${"rtl"===r?"RTL":""}`];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?null:()=>{o(t)}},IconComponent:c}},jS=()=>{const{pageInfo:e,width:n}=CS(),r=0===e.page,{IconComponent:i,styledProps:o}=FS({type:MS.FirstPage,disabledCondition:r,pageNumber:0});return n<=kS.FirstPage?null:t.createElement(xS,o,t.createElement(i,{height:Gt}))},zS=(e,t,n=!1)=>{n&&e.key===Yt.Tab&&!e.shiftKey&&(Um(e),((e,t,n)=>{var r,i,o,a;const s=null!==(r=null===(i=e.closest(".qv-object-wrapper"))||void 0===i||null===(i=i.querySelector(".sel-toolbar-confirm"))||void 0===i?void 0:i.parentElement)&&void 0!==r?r:null===(o=document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm"))||void 0===o?void 0:o.parentElement;s?s.focus():null===(a=t.focusSelection)||void 0===a||a.call(t,n)})(e.target,t,!1))},BS=()=>{const{pageInfo:e,keyboard:n,totalPages:r,isSelectionMode:i,width:o}=CS(),a=e.page>=r-1,{IconComponent:s,styledProps:l}=FS({type:MS.LastPage,disabledCondition:a,pageNumber:r-1}),c=n.enabled?e=>{zS(e,n,i)}:null;return o<=kS.LastPage?null:t.createElement(xS,rw({},l,{onKeyDown:c}),t.createElement(s,{height:Gt}))},WS=()=>{const{pageInfo:e,keyboard:n,totalPages:r,isSelectionMode:i,width:o}=CS(),a=e.page>=r-1,{IconComponent:s,styledProps:l}=FS({type:MS.NextPage,disabledCondition:a,pageNumber:e.page+1}),c=!(o>kS.FirstPage&&o>kS.LastPage)&&n.enabled?e=>{zS(e,n,i)}:null;return t.createElement(xS,rw({},l,{onKeyDown:c}),t.createElement(s,{height:Gt}))},$S=()=>{const{pageInfo:e}=CS(),n=0===e.page,{IconComponent:r,styledProps:i}=FS({type:MS.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return t.createElement(xS,i,t.createElement(r,{height:Gt}))},HS=()=>{const{translator:e,width:n,pageInfo:r,totalRowCount:i}=CS(),{page:o,rowsPerPage:a}=r;if(n<=kS.DisplayedRowsLabel)return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,i)}`,i.toString()]);return t.createElement(wS,{variant:"caption"},s)},GS=({name:e,value:n,options:r,handleChange:i})=>{const{layout:o,footerStyle:a,translator:s,tabIndex:l}=CS(),c=o.qInfo.qId,u=s.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,h={tabIndex:l,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return t.createElement(t.Fragment,null,t.createElement(wS,{variant:"caption",id:p},u,":"),t.createElement(vS,{footerStyle:a,size:"small",native:!0,value:n,onChange:i,inputProps:h},r))},VS=()=>{var e;const{pageInfo:n,isSelectionMode:r,totalColumnCount:i,width:o,handleChangeRowsPerPage:a}=CS();if(!(!(null===(e=n.rowsPerPageOptions)||void 0===e||!e.length)&&!r&&o>kS.RowsPerPage&&i<=100)||void 0===n.rowsPerPageOptions)return null;const s=t.createElement(t.Fragment,null,n.rowsPerPageOptions.map((e=>t.createElement("option",{key:e,value:e},e))));return t.createElement(GS,{name:"RowsPerPage",value:n.rowsPerPage,options:s,handleChange:e=>{null==a||a(+e.target.value)}})},US=1e3,YS="…",KS=({totalPages:e,page:n})=>{const r=Math.min(e,US),i=r<e&&n>500,o=i?Math.min(500+n,e):r,a=i?Math.max(0,o-US):0,s=Array.from(Array(r).keys()).map((e=>{const n=e+a;return t.createElement("option",{key:n,value:n},n+1)}));return a>0&&s.unshift(t.createElement("option",{key:"startMoreOptions",value:YS,disabled:!0},YS)),o<e-1&&s.push(t.createElement("option",{key:"endMoreOptions",value:YS,disabled:!0},YS)),t.createElement(t.Fragment,null,s)},XS=()=>{const{pageInfo:e,width:n,totalPages:r,handleChangePage:i}=CS(),{page:o}=e;if(n<=kS.SelectPage)return null;const a=t.createElement(KS,{totalPages:r,page:o});return t.createElement(GS,{name:"SelectPage",value:o,options:a,handleChange:e=>{i(+e.target.value)}})};var JS=f((e=>t.createElement(_S,e,t.createElement(VS,null),t.createElement(XS,null),t.createElement(HS,null),t.createElement(jS,null),t.createElement($S,null),t.createElement(WS,null),t.createElement(BS,null))));const ZS=e=>t.createElement(SS,e,t.createElement(JS,e)),QS=h({}),eE=()=>n(QS),tE=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,children:i})=>{const o=s((()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r})),[e,t,n,r]);return Ws.jsx(QS.Provider,{value:o,children:i})},nE=h({}),rE=()=>n(nE),iE=({app:e,model:t,theme:n,embed:r,keyboard:i,translator:o,interactions:a,env:l,children:c})=>{const u=s((()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:i,env:l,translator:o})),[e,a,t,r,n,i,l,o]);return Ws.jsx(nE.Provider,{value:u,children:c})},oE=h({}),aE=()=>n(oE),sE=({children:e,...t})=>Ws.jsx(oE.Provider,{value:t,children:e}),lE=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:i,height:o}=(()=>{var e;const{theme:t,translator:n}=rE(),{layoutService:r}=aE(),i=null!==(e=t.getStyle("","","fontFamily"))&&void 0!==e?e:rg;return r.hasData?r.hasLimitedData?{text:n.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:i,alignItems:"center",height:"22px"}:{}:{text:n.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:i,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:Ws.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:i,width:"100%",height:o},children:Ws.jsx("span",{style:{...pg,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},cE="/qHyperCubeDef",uE=-1,dE="PSEUDO-DIM",pE=[];for(let e=0;e<256;++e)pE.push((e+256).toString(16).slice(1));let hE;const fE=new Uint8Array(16);function mE(){if(!hE){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hE=crypto.getRandomValues.bind(crypto)}return hE(fE)}var gE={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function yE(e,t,n){if(gE.randomUUID&&!t&&!e)return gE.randomUUID();const r=(e=e||{}).random||(e.rng||mE)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(pE[e[t+0]]+pE[e[t+1]]+pE[e[t+2]]+pE[e[t+3]]+"-"+pE[e[t+4]]+pE[e[t+5]]+"-"+pE[e[t+6]]+pE[e[t+7]]+"-"+pE[e[t+8]]+pE[e[t+9]]+"-"+pE[e[t+10]]+pE[e[t+11]]+pE[e[t+12]]+pE[e[t+13]]+pE[e[t+14]]+pE[e[t+15]]).toLowerCase()}(r)}const bE=()=>{var e,t,n;return null!==(e=null===(t=crypto)||void 0===t||null===(n=t.randomUUID)||void 0===n?void 0:n.call(t))&&void 0!==e?e:yE()},vE=e=>e===uE?dE:(({qLibraryId:e,cId:t})=>{var n;return null!==(n=null!=e?e:t)&&void 0!==n?n:bE()})(e),xE=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===uE?n.columnWidthLocation=Bt.Measures:n.isLeftDimension?n.columnWidthLocation=Bt.Dimension:t.at(-1)===uE?n.columnWidthLocation=Bt.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=Bt.Pivot))},wE=(e,t,n,r)=>{var i;const o=vE(n),a=e.getDimensionInfoIndex(n),s=e.isLeftDimension(a);return n===uE?{id:o,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:Bt.Measures,isPivot:!0}:{id:o,colIdx:0,label:n.qFallbackTitle,qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:null!==(i=n.qLocked)&&void 0!==i&&i,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===en.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:Bt.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure}},SE=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})=>{let i=r;var o;n.length>0&&(i=(o=r).at(-1)===uE?o.slice(0,-1):o);const a=i.length+(n.length?1:0),s=Math.max(1,n.length),l=((e,t)=>Array(e).fill(null).map((()=>Array.from({length:t},(()=>null)))))(a,s);return n.forEach(((n,r,i)=>{const o=r===i.length-1;l[a-1][r]=wE(e,t,n,o)})),i.forEach(((n,r,i)=>{const o=r===i.length-1;l[r][s-1]=wE(e,t,n,o)})),l},EE=(e,t,n,r)=>{var i,o;const a=((e,t,n,r)=>{let i;var o;return i=0===n.length||n.includes(uE)?SE({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n}):(e=>e[0].map(((t,n)=>e.map((e=>e[n])))))(SE({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})),e.isIndentModeEnabled&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&(null===(o=i.at(-1))||void 0===o||o.forEach(((t,n)=>{if(Array.isArray(t)){const n=t;for(let t=0;t<n.length;t++)xE({layoutService:e,visibleLeftDimensionInfos:r,cell:n[t],colIdx:t})}else xE({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}))),i})(e,t,n,r);return{data:a,size:{x:null!==(i=null===(o=a[0])||void 0===o?void 0:o.length)&&void 0!==i?i:0,y:a.length}}};function CE(e){return CE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CE(e)}function _E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ME(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(i=r.key,o=void 0,o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"==typeof o?o:String(o)),r)}var i,o}function kE(e,t,n){return t&&ME(e.prototype,t),n&&ME(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IE(e,t)}function AE(e){return AE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},AE(e)}function IE(e,t){return IE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},IE(e,t)}function LE(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function DE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=AE(e);if(t){var i=AE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LE(this,n)}}function PE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return OE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function OE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var TE={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var n,r=e.indexOf("="),i="",o=!1;-1===r?n=e:(n=e.slice(0,r),i=e.slice(r+1),o=!0),t.push(function(e,t,n){return{key:NE(e),value:NE(t),useEqualSign:n}}(n,i,o))}})),t}};function NE(e){try{return decodeURIComponent(e)}catch(t){return e}}function qE(e){if(!(this instanceof qE))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:function(){return TE.fromSearchString(t.search)}}})}function FE(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}qE.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},qE.encodeSearchParams=function(e){for(var t,n="",r=0;r<e.length;r++)n+=0===r?"?":"&",n+=FE((t=e[r]).key),t.value?n+="=".concat(FE(t.value)):n+=t.useEqualSign?"=":"";return n};var jE,zE=function(){function e(t){_E(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}return kE(e,[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}]),e}(),BE=function(){function e(){_E(this,e)}return kE(e,[{key:"decode",value:function(e){for(var t,n="",r=new zE(e);r.hasNext();)n+=null!=(t=this.decodeCharacter(r))?t:r.next();return n}},{key:"decodeCharacter",value:function(e){return e.next()}}]),e}(),WE=function(e){return e>=0&&e<=1114111},$E=function(e){return e.match(/[\s]/)},HE=function(){RE(t,BE);var e=DE(t);function t(){return _E(this,t),e.apply(this,arguments)}return kE(t,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,i=e.next();if(null==i||"\\"!==i)return e.reset(),null;var o=e.next();if(null==o)return e.reset(),null;switch(o){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(o,16))return o;for(t=o,n=0;n<5&&(null!=(r=e.next())&&!$E(r));n++){if("NaN"===parseInt(r,16)){e.pushback(r);break}t+=r}var a=parseInt(t,16);return WE(a)?String.fromCharCode(a):"�"}}]),t}(),GE=function(){function e(t,n){_E(this,e),this._key=t,this._value=n}return kE(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}}]),e}(),VE=function(){function e(){_E(this,e)}return kE(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,n,r){var i,o;if(t.length===n)return o=this._value,this.setValue(r),o;var a=t.charAt(n);return this._nextMap?(i=this._nextMap[a])||(i=new e,this._nextMap[a]=i):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return GE.newInstanceIfNeeded(e,this._value);var n=this.getNextNode(e.charAt(t));if(!n)return GE.newInstanceIfNeeded(e,t,this._value);var r=n.getLongestMatch(e,t+1);return r||GE.newInstanceIfNeeded(e,t,this._value)}}]),e}(),UE=function(){function e(){_E(this,e),this.clear()}return kE(e,[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new VE);var n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}]),e}(),YE=function(){var e,t,n,r=[],i=[],o=new UE;for(e in r["&quot"]="34",r["&amp"]="38",r["&lt"]="60",r["&gt"]="62",r["&nbsp"]="160",r["&iexcl"]="161",r["&cent"]="162",r["&pound"]="163",r["&curren"]="164",r["&yen"]="165",r["&brvbar"]="166",r["&sect"]="167",r["&uml"]="168",r["&copy"]="169",r["&ordf"]="170",r["&laquo"]="171",r["&not"]="172",r["&shy"]="173",r["&reg"]="174",r["&macr"]="175",r["&deg"]="176",r["&plusmn"]="177",r["&sup2"]="178",r["&sup3"]="179",r["&acute"]="180",r["&micro"]="181",r["&para"]="182",r["&middot"]="183",r["&cedil"]="184",r["&sup1"]="185",r["&ordm"]="186",r["&raquo"]="187",r["&frac14"]="188",r["&frac12"]="189",r["&frac34"]="190",r["&iquest"]="191",r["&Agrave"]="192",r["&Aacute"]="193",r["&Acirc"]="194",r["&Atilde"]="195",r["&Auml"]="196",r["&Aring"]="197",r["&AElig"]="198",r["&Ccedil"]="199",r["&Egrave"]="200",r["&Eacute"]="201",r["&Ecirc"]="202",r["&Euml"]="203",r["&Igrave"]="204",r["&Iacute"]="205",r["&Icirc"]="206",r["&Iuml"]="207",r["&ETH"]="208",r["&Ntilde"]="209",r["&Ograve"]="210",r["&Oacute"]="211",r["&Ocirc"]="212",r["&Otilde"]="213",r["&Ouml"]="214",r["&times"]="215",r["&Oslash"]="216",r["&Ugrave"]="217",r["&Uacute"]="218",r["&Ucirc"]="219",r["&Uuml"]="220",r["&Yacute"]="221",r["&THORN"]="222",r["&szlig"]="223",r["&agrave"]="224",r["&aacute"]="225",r["&acirc"]="226",r["&atilde"]="227",r["&auml"]="228",r["&aring"]="229",r["&aelig"]="230",r["&ccedil"]="231",r["&egrave"]="232",r["&eacute"]="233",r["&ecirc"]="234",r["&euml"]="235",r["&igrave"]="236",r["&iacute"]="237",r["&icirc"]="238",r["&iuml"]="239",r["&eth"]="240",r["&ntilde"]="241",r["&ograve"]="242",r["&oacute"]="243",r["&ocirc"]="244",r["&otilde"]="245",r["&ouml"]="246",r["&divide"]="247",r["&oslash"]="248",r["&ugrave"]="249",r["&uacute"]="250",r["&ucirc"]="251",r["&uuml"]="252",r["&yacute"]="253",r["&thorn"]="254",r["&yuml"]="255",r["&OElig"]="338",r["&oelig"]="339",r["&Scaron"]="352",r["&scaron"]="353",r["&Yuml"]="376",r["&fnof"]="402",r["&circ"]="710",r["&tilde"]="732",r["&Alpha"]="913",r["&Beta"]="914",r["&Gamma"]="915",r["&Delta"]="916",r["&Epsilon"]="917",r["&Zeta"]="918",r["&Eta"]="919",r["&Theta"]="920",r["&Iota"]="921",r["&Kappa"]="922",r["&Lambda"]="923",r["&Mu"]="924",r["&Nu"]="925",r["&Xi"]="926",r["&Omicron"]="927",r["&Pi"]="928",r["&Rho"]="929",r["&Sigma"]="931",r["&Tau"]="932",r["&Upsilon"]="933",r["&Phi"]="934",r["&Chi"]="935",r["&Psi"]="936",r["&Omega"]="937",r["&alpha"]="945",r["&beta"]="946",r["&gamma"]="947",r["&delta"]="948",r["&epsilon"]="949",r["&zeta"]="950",r["&eta"]="951",r["&theta"]="952",r["&iota"]="953",r["&kappa"]="954",r["&lambda"]="955",r["&mu"]="956",r["&nu"]="957",r["&xi"]="958",r["&omicron"]="959",r["&pi"]="960",r["&rho"]="961",r["&sigmaf"]="962",r["&sigma"]="963",r["&tau"]="964",r["&upsilon"]="965",r["&phi"]="966",r["&chi"]="967",r["&psi"]="968",r["&omega"]="969",r["&thetasym"]="977",r["&upsih"]="978",r["&piv"]="982",r["&ensp"]="8194",r["&emsp"]="8195",r["&thinsp"]="8201",r["&zwnj"]="8204",r["&zwj"]="8205",r["&lrm"]="8206",r["&rlm"]="8207",r["&ndash"]="8211",r["&mdash"]="8212",r["&lsquo"]="8216",r["&rsquo"]="8217",r["&sbquo"]="8218",r["&ldquo"]="8220",r["&rdquo"]="8221",r["&bdquo"]="8222",r["&dagger"]="8224",r["&Dagger"]="8225",r["&bull"]="8226",r["&hellip"]="8230",r["&permil"]="8240",r["&prime"]="8242",r["&Prime"]="8243",r["&lsaquo"]="8249",r["&rsaquo"]="8250",r["&oline"]="8254",r["&frasl"]="8260",r["&euro"]="8364",r["&image"]="8365",r["&weierp"]="8472",r["&real"]="8476",r["&trade"]="8482",r["&alefsym"]="8501",r["&larr"]="8592",r["&uarr"]="8593",r["&rarr"]="8594",r["&darr"]="8595",r["&harr"]="8596",r["&crarr"]="8629",r["&lArr"]="8656",r["&uArr"]="8657",r["&rArr"]="8658",r["&dArr"]="8659",r["&hArr"]="8660",r["&forall"]="8704",r["&part"]="8706",r["&exist"]="8707",r["&empty"]="8709",r["&nabla"]="8711",r["&isin"]="8712",r["&notin"]="8713",r["&ni"]="8715",r["&prod"]="8719",r["&sum"]="8721",r["&minus"]="8722",r["&lowast"]="8727",r["&radic"]="8730",r["&prop"]="8733",r["&infin"]="8734",r["&ang"]="8736",r["&and"]="8743",r["&or"]="8744",r["&cap"]="8745",r["&cup"]="8746",r["&int"]="8747",r["&there4"]="8756",r["&sim"]="8764",r["&cong"]="8773",r["&asymp"]="8776",r["&ne"]="8800",r["&equiv"]="8801",r["&le"]="8804",r["&ge"]="8805",r["&sub"]="8834",r["&sup"]="8835",r["&nsub"]="8836",r["&sube"]="8838",r["&supe"]="8839",r["&oplus"]="8853",r["&otimes"]="8855",r["&perp"]="8869",r["&sdot"]="8901",r["&lceil"]="8968",r["&rceil"]="8969",r["&lfloor"]="8970",r["&rfloor"]="8971",r["&lang"]="9001",r["&rang"]="9002",r["&loz"]="9674",r["&spades"]="9824",r["&clubs"]="9827",r["&hearts"]="9829",r["&diams"]="9830",r)"function"!=typeof r[e]&&r.hasOwnProperty(e)&&(i[r[e]]=e);for(t in i)"function"!=typeof i[t]&&i.hasOwnProperty(t)&&(n=i[t].toLowerCase().substr(1),o.put(n,String.fromCharCode(t)));return o}(),KE=function(){RE(t,BE);var e=DE(t);function t(){return _E(this,t),e.apply(this,arguments)}return kE(t,[{key:"decodeCharacter",value:function(e){var t;e.mark();var n=e.next();if(null==n||"&"!==n)return e.reset(),null;var r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(null!=(t=this._getNumericEntity(e)))return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,n,r,i="";for(t=Math.min(e.remainder().length,YE.getMaxKeyLength()),r=0;r<t;r++)i+=e.next().toLowerCase();var o=YE.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),o.getValue()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,16);return!Number.isNaN(+r)&&WE(r)?String.fromCharCode(r):null}},{key:"_parseNumber",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,10);return!Number.isNaN(+r)&&WE(r)?String.fromCharCode(r):null}}]),t}(),XE=function(){RE(t,BE);var e=DE(t);function t(){return _E(this,t),e.apply(this,arguments)}return kE(t,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,i,o=e.next();if(null==o)return e.reset(),null;if("%"!==o)return e.reset(),null;for(t="",n=0;n<2;n++)null!=(r=e.nextHex())&&(t+=r);return 2===t.length&&(i=parseInt(t,16),WE(i))?String.fromCharCode(i):(e.reset(),null)}}]),t}(),JE=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(jE=document.createElement("div"));var ZE=Array.prototype.indexOf,QE=[",",".","_"," "],eC=[",",".","-","_"," "],tC={width:["%"],height:["%"]},nC={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},rC={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":nC.image,"background-color":nC.color,"border-color":nC.color,"border-image":nC.image,color:nC.color,icon:nC.image,"list-style-image":nC.image,"outline-color":nC.color},iC={attr_name:["on[a-z]{1,}","style","href","src"],attr_val:["javascript:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function oC(e,t,n){var r;if(t){if(ZE)return ZE.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function aC(e){if(null==e)return"";var t,n=document.createTextNode(e);return jE.appendChild(n),t=jE.innerHTML,jE.removeChild(n),t}function sC(e,t,n){var r,i,o,a,s,l,c,u,d;if(e=cC(e).toLowerCase(),t=cC(t),oC(e,iC.attr_name)>=0)throw new Error("Unsafe attribute name used: ".concat(e));for(o=0;o<iC.attr_val;o++)if(t.toLowerCase().match(iC.attr_val[o]))throw new Error("Unsafe attribute value used: ".concat(t));if((r=tC[e])||(r=eC),i="",!n){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");i+=s}i+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&oC(c,r)<0?(d=u.toString(16),i+="&#x".concat(d,";")):i+=c;return n||(i+='"'),i}function lC(e,t,n){var r,i,o,a,s,l,c,u,d,p;if(e=cC(e).toLowerCase(),t=cC(t),oC(e,iC.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(r=0;r<iC.css_val.length;r++)if(t.toLowerCase().indexOf(iC.css_val[r])>=0)throw new Error("Unsafe property value used: ".concat(t));if((i=rC[e])||(i=nC.default),o="",!n){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");o+=s}o+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&oC(c,i)<0?(d=u.toString(16),p="000000".substr(d.length),o+="\\".concat(p).concat(d)):o+=c;return o}function cC(e,t){var n,r,i,o,a=!1;if(null===e)return null;n=e,r=e,i=0;for(var s=[new KE,new XE,new HE];!a;){r=n;for(var l=0;l<s.length;l++)(o=s[l].decode(n))!==n&&(i++,n=o);r!==n||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}for(var uC=[],dC=0;dC<255;dC++)uC[dC]=dC>=48&&dC<=57||dC>=65&&dC<=90||dC>=97&&dC<=122?null:dC.toString(16);var pC=function(e){return aC(e.unsafe)},hC=function(e){var t,n=[],r=[],i={},o="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=lC(t,n[t],!0),o+=lC(t,n[t],!0),i[t]=r[t]);return e.map?i:o},fC=function(e){var t=[],n=[],r={},i="";for(var o in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(n[o]=sC(o,t[o],!0),i+=sC(o,t[o],!0),r[o]=n[o]);return e.map?r:i};function mC(e,t){throw new Error(t)}var gC={canonicalize:cC,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===CE(arguments[0])?function(){for(var e,t,n,r=arguments[0]||{},i=1,o=arguments.length;i<o;i++)if(null!=(e=arguments[i]))for(t in e)if(e.hasOwnProperty(t)){if(r===(n=e[t]))continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?pC(e):"css"===e.context?(null!=e.map&&"object"!==CE(e.map)&&mC(this,"Invalid parameter type"),hC(e)):"attr"===e.context?(null!=e.map&&"object"!==CE(e.map)&&mC(this,"Invalid parameter type"),fC(e)):void mC(this,"Invalid parameter type")},encodeForAttr:sC,encodeForAttr2:function(e){return sC("nonsens",e,!0)},encodeForCSS:lC,encodeForHref:function(e){cC(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new qE(e),n=qE.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),r=t.searchParams,i=(e=n+qE.encodeSearchParams(r)+t.hash).toLowerCase();if(-1!==i.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==i.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){var n,r,i,o,a,s;for(t||(t=QE),s="",n=0;n<e.length;n++)i=e.charAt(n),o=e.charCodeAt(n),oC(i,t)>=0||null==uC[o]?s+=i:(r=o.toString(16),o<256?(a="00".substr(r.length),s+="\\x".concat(a).concat(r.toUpperCase())):(a="0000".substr(r.length),s+="\\u".concat(a).concat(r.toUpperCase())));return s},encodeForHTML:aC,encodeForURL:function(e,t){var n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=cC(t).toLowerCase():mC(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':""},isSafeDataURL:function(e,t){var n=null!=t?t:{},r=n.maxByteSizeSvg,i=void 0===r?5e5:r,o=n.maxByteSizeImage,a=void 0===o?5e6:o,s=function(e){var t,n=PE(null!==(t=JE.exec(e.trim()))&&void 0!==t?t:[],4),r=n[1];return{encoding:n[2],data:n[3],mimeType:null==r?void 0:r.toLocaleLowerCase()}}(e),l=s.mimeType,c=s.encoding,u=s.data;if(!u)return!0;var d=function(e,t,n){var r={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(n)],r).size}catch(e){return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0}(l,c,u);return"image/svg+xml"===l?d<=i:d<=a}};const yC=(e,t)=>{var n;return null===(n=t.qAttrExps)||void 0===n||null===(n=n.qValues)||void 0===n?void 0:n[e]},bC=e=>{switch(e){case"topLeft":default:return{horizontal:"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"flex-end",vertical:"center"};case"topRight":return{horizontal:"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"flex-end",vertical:"flex-end"}}},vC=({text:e,url:t,imageSize:n,imagePosition:r})=>r&&t&&!t.toLowerCase().includes("javascript:")&&gC.isSafeDataURL(t)?{type:Dt.Image,url:t,text:e,imageSize:n,resolvedImagePosition:bC(r)}:{type:Dt.Text,url:void 0,text:e},xC=(e,t,n,r)=>{if(!e.qMiniChart||null==t||!t.miniChart||!n)return{type:Dt.Text,text:r};const{minY:i,maxY:o}=((e,t,n)=>{var r,i;const o="global"===(null===(r=t.yAxis)||void 0===r?void 0:r.scale),a="zeroCenter"===(null===(i=t.yAxis)||void 0===i?void 0:i.position),s=o?n.qYMin:e.qMiniChart.qMin,l=o?n.qYMax:e.qMiniChart.qMax;if(a){const e=Math.max(Math.abs(s),Math.abs(l));return{minY:-e,maxY:e}}return(e=>{var t,n;return"zeroBaseline"===(null===(t=e.yAxis)||void 0===t?void 0:t.position)||"bars"===e.type&&"auto"===(null===(n=e.yAxis)||void 0===n?void 0:n.position)})(t)?{minY:Math.min(0,s),maxY:Math.max(0,l)}:{minY:s,maxY:l}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:i,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:Dt.MiniChart,text:r,miniChart:a}},wC=(e,t,n)=>{var r;const i=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=null==i||null===(r=i.qValues)||void 0===r?void 0:r[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return(null==n?void 0:n.urlPosition)===Pt.Attribute||null==n?void 0:n.urlLabel},SC=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:Dt.Link,url:gC.encodeForHref(n),text:t,labelStructure:e}}catch(n){return{type:Dt.Text,url:void 0,text:t,labelStructure:e}}},EC=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText})=>{var l,c,u,d,p,h;const f=Ot(t),m=s(e);return f!==Dt.Image||!r.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")||null!==(l=r.anything.sense)&&void 0!==l&&null!==(c=l.isUnsupportedFeature)&&void 0!==c&&c.call(l,"tableImages")?f===Dt.Link?((e,t,n,r,i)=>{const{urlPosition:o}=null!=t?t:{};if(o===Pt.Attribute){var a;const o=wC(null!==(a=n.url)&&void 0!==a?a:-1,e,t);return SC({labelStructure:r,text:i||o||"",url:o})}if(o===Pt.Dimension){var s,l;const o=wC(null!==(s=n.urlLabel)&&void 0!==s?s:-1,e,t)||i;return r&&(r.maskedValue=o),SC({text:o,labelStructure:r,url:null!==(l=null==r?void 0:r.originalValue)&&void 0!==l?l:i})}return{type:Dt.Text,url:void 0,text:i,labelStructure:r}})(e,t,n,a,m):f!==Dt.Indicator||!r.flags.isEnabled("CLIENT_IM_6696_INDICATORS")||null!==(u=r.anything.sense)&&void 0!==u&&null!==(d=u.isUnsupportedFeature)&&void 0!==d&&d.call(u,"tableIndicators")?f!==Dt.MiniChart||!r.flags.isEnabled("CLIENT_IM_7110_TABLE_MINI_CHART")||null!==(p=r.anything.sense)&&void 0!==p&&null!==(h=p.isUnsupportedFeature)&&void 0!==h&&h.call(p,"qMiniChartDef")?{type:Dt.Text,url:void 0,text:m,labelStructure:a}:xC(e,t,o,m):((e,t,n)=>{const{indicator:r}=null!=e?e:{};return{type:Dt.Indicator,url:void 0,text:n,indicator:{applySegmentColors:null==r?void 0:r.applySegmentColors,position:null==r?void 0:r.position,showTextValues:null==r?void 0:r.showTextValues},indicatorConditionalColoring:t}})(t,i,m):((e,t,n,r)=>{const{imageSize:i,imagePosition:o,imageSetting:a,imageLabel:s}=null!=t?t:{};if("url"===a){var l,c;const t=null===(l=yC(null!==(c=n.imageUrl)&&void 0!==c?c:-1,e))||void 0===l?void 0:l.qText;return vC({text:r,url:t,imageSize:i,imagePosition:o})}if("label"===a){var u,d,p;const t=r;if(-1===n.imageLabel)return vC({text:s||t||"",url:t,imageSize:i,imagePosition:o});const a=null!==(u=null===(d=yC(null!==(p=n.imageLabel)&&void 0!==p?p:-1,e))||void 0===d?void 0:d.qText)&&void 0!==u?u:r;return vC({text:a,url:t,imageSize:i,imagePosition:o})}return{type:Dt.Text,url:void 0,text:r}})(e,t,n,m)},CC=(e,t)=>{var n,r,i,o;const a=t.qAttrExps,s=null==a||null===(n=a.qValues)||void 0===n||null===(n=n[null!==(r=null==e?void 0:e.cellForegroundColor)&&void 0!==r?r:-1])||void 0===n?void 0:n.qText,l=null==a||null===(i=a.qValues)||void 0===i||null===(i=i[null!==(o=null==e?void 0:e.cellBackgroundColor)&&void 0!==o?o:-1])||void 0===i?void 0:i.qText,c=l?Vm(l):null,u=s?Vm(s):null,d=((e,t)=>e||!t?null:Wm(t))(u,c);return{color:null!=d?d:u,background:c}},_C=(e,t)=>t.qSubNodes.reduce(((e,t)=>0===t.qSubNodes.length?e+1:_C(e,t)),e),MC=(e,t,n,r,i,o)=>{const a=i?o.rowsPerPage-n:og-r;let s=e.qUp+e.qDown;if(i&&0===n){const n=(t+e.qUp)%o.rowsPerPage;s=e.qDown+n}return Math.min(a,_C(s,e))},kC=(e,t,n)=>{if(e!==uE){if(t){const t=Ot(e.representation)===Dt.Link;return null!=n&&n.isLinksSupported&&t?e.representation:{type:Dt.Text}}return e.representation}},RC=({node:e,parent:t,root:n,x:r,y:i,pageY:o,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:c=!0,isIndentModeEnabled:u=!1,indentModeFeatures:d,indentLevel:p,labelStructure:h,env:f,pageInfo:m})=>{const g=(!u||!c)&&"P"===e.qType;let y=e.qText;if(c&&u&&h){const{originalValue:e,delimeter:t,suffix:n}=h;y=`${e} ${!n||!e&&n?"":t} ${n}`.trim()}const b={id:bE(),ref:e,x:r,y:i,pageX:r,pageY:o,mainAxisPageCoord:c?o:r,isLeftColumn:c,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:MC(e,i,o,r,c,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!(null==t||!t.isTotal),isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:CC(l,e),selectionCellType:c?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!c,visibleMeasureInfoIndex:g?e.qElemNo:null==t?void 0:t.visibleMeasureInfoIndex,representation:EC({cell:{...e,qText:y},representationProperties:kC(s,u,d),attrExprInfoIndex:l,env:f,labelStructure:h}),...void 0!==p&&{indentLevel:p}};return t&&(t.children[b.mainAxisPageCoord-t.mainAxisPageCoord]=b),b},AC=(e,t,n,r,i,o,a,s)=>{const{isIndentModeEnabled:l,indentModeFeatures:c}=i;if(!t.length)return e;let u=0;return function t(d,p,h,f=0,m=-1){e[f]||(e[f]={}),l&&m++;const g=i.leftDimensionInfoIndexes.indexOf(uE);h.forEach(((h,y)=>{var b,v;const x={originalValue:null!==(b=h.qText)&&void 0!==b?b:"",maskedValue:"",delimeter:"-",suffix:""};u+=0===y?0:1;const w=n.qTop-r.page*r.rowsPerPage,S=Math.max(0,w+u-h.qUp),E=n.qTop+u-h.qUp;var C,_;if(l&&(i.hasPseudoDimOnLeft&&m<=g))if(x.originalValue=null!==(C=h.qText)&&void 0!==C?C:"",x.maskedValue=null!==(_=h.qText)&&void 0!==_?_:"","N"===h.qType||"U"===h.qType||"T"===h.qType)m<g&&(x.suffix=i.visibleMeasureInfo[0].qFallbackTitle);else if("P"===h.qType){var M,k,R,A,I,L,D,P;x.originalValue=null!==(M=null===(k=p||d)||void 0===k||null===(k=k.representation.labelStructure)||void 0===k?void 0:k.originalValue)&&void 0!==M?M:"",x.maskedValue=null!==(R=null===(A=p||d)||void 0===A||null===(A=A.representation.labelStructure)||void 0===A?void 0:A.originalValue)&&void 0!==R?R:"",x.suffix=null!==(I=h.qText)&&void 0!==I?I:"";const e=h.qSubNodes;h={...null===(L=p||d)||void 0===L?void 0:L.ref,...h.qText?{qText:h.qText}:{},qSubNodes:e},m=null!==(D=null===(P=p||d)||void 0===P?void 0:P.indentLevel)&&void 0!==D?D:0}let O=f;l&&(O=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===h.qSubNodes.length&&(O=0));const T=null===(v=e.at(f))||void 0===v?void 0:v[S],N=l&&void 0===(null==T?void 0:T.ref.qText)||!T?RC({node:h,parent:p,root:d,x:O,y:E,pageY:S,layoutService:i,dimensionInfo:o[O],attrExprInfoIndex:a[O],isLeftColumn:!0,...l&&{isIndentModeEnabled:l,indentModeFeatures:c,indentLevel:m},env:s,pageInfo:r,labelStructure:x}):e[f][S];if(e[f][S]=N,h.qSubNodes.length){const e=l?0:f+1;t(d||N,N,h.qSubNodes,e,m)}}))}(null,null,t,0,-1),e},IC=(e,t)=>{e.slice(0,-1).forEach((e=>{Object.values(e).forEach(((e,n,r)=>{const i=r[n+1];e.distanceToNextCell=i?i.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)}))}))},LC=(e,t)=>{const n=e[0],r=n?Object.values(n):[],i=null!=t&&t.isIndentModeEnabled&&null!=t&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,o=null==n?void 0:n[i],a=r.at(-1);return null!=o&&o.isTotal?o.isLeafNode?o.mainAxisPageCoord:o.mainAxisPageCoord+o.leafCount-1:null!=a&&a.isTotal?a.mainAxisPageCoord-1:-1},DC=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:i,attrExprInfoIndexes:o,env:a})=>{const{qLeft:s,qArea:l}=t;if(!s.length)return e;const c=AC(e.grid,s,l,n,r,i,o,a);IC(c,n.rowsOnCurrentPage);const u=LC(c,r);return{...e,grid:c,columnCount:c.length,totalDividerIndex:u}},PC=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const i=[...t];return n.forEach(((t,n)=>{t.forEach(((t,o)=>{var a;const s=e.qTop-r.page*r.rowsPerPage+n,l=e.qLeft+o;Array.isArray(i[s])||(i[s]=[]);const c="U"===t.qType;i[s][l]=null!==(a=i[s][l])&&void 0!==a?a:{id:bE(),ref:t,isNull:c}}))})),i},OC=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:i}=t;return null!=r&&r.length?PC({qArea:i,prevData:e,pivotValuePoints:r,pageInfo:n}):e},TC=(e,t,n,r,i,o,a,s,l)=>{const{isIndentModeEnabled:c,indentModeFeatures:u}=r;if(!t.length)return e;let d=0;!function t(a,p,h,f=0){e[f]||(e[f]={}),h.forEach(((h,m)=>{var g;d+=0===m?0:1;const y=n.qLeft+d-h.qUp,b=null!==(g=e[f][y])&&void 0!==g?g:RC({node:h,parent:p,root:a,x:y,y:f,pageY:f,layoutService:r,dimensionInfo:i[f],attrExprInfoIndex:o[f],isLeftColumn:!1,...c&&{isIndentModeEnabled:c,indentModeFeatures:u},env:s,pageInfo:l});e[f][y]=b,h.qSubNodes.length&&t(a||b,b,h.qSubNodes,f+1)}))}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},NC=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:i,headerRows:o,env:a,pageInfo:s})=>{const{qTop:l,qArea:c}=t;if(!l.length)return e;const u=TC(e.grid,l,c,n,r,i,o,a,s);IC(u,n.size.x);const d=LC(u);return{...e,grid:u,rowCount:u.length,totalDividerIndex:d}},qC=e=>-1===e?{}:e.qAttrExprInfo.reduce(((e,{id:t},n)=>(e[t]=n,e)),{}),FC=(e,t)=>{const{env:n}=rE(),{layoutService:r,effectivePropertiesService:i}=aE(),{qPivotDataPages:o,pageInfo:a}=eE(),[c,u]=l(null),p=((e,t,n)=>s((()=>({left:e.map(qC),top:t.map(qC),measures:n.map(qC)})),[n,e,t]))(e,t,r.visibleMeasureInfo),h=s((()=>EE(r,i,t,e)),[r,i,t,e]),f=d((()=>o.slice(1).reduce(((e,t)=>OC({prevData:e,dataPage:t,pageInfo:a})),((e,t)=>{const{qData:n,qArea:r}=e;return PC({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(o[0],a))),[o,a]),m=d((()=>o.slice(1).reduce(((e,i)=>NC({prevData:e,nextDataPage:i,layoutService:r,visibleTopDimensionInfo:t,attrExprInfoIndexes:p.top,headerRows:h.size.y,env:n,pageInfo:a})),((e,t,n,r,i,o,a)=>{const{qArea:s,qTop:l}=e,c=TC([],l,s,t,n,r,i,o,a);IC(c,t.size.x);const u=LC(c);return{grid:c,rowCount:c.length,layoutSize:t.size,totalDividerIndex:u}})(o[0],r,t,p.top,h.size.y,n,a))),[o,r,t,p.top,h.size.y,n,a]),g=d((()=>o.slice(1).reduce(((t,i)=>DC({prevData:t,nextDataPage:i,pageInfo:a,layoutService:r,visibleLeftDimensionInfo:e,attrExprInfoIndexes:p.left,env:n})),((e,t,n,r,i,o)=>{const{qArea:a,qLeft:s}=e,l=AC([],s,a,n,t,r,i,o);IC(l,n.rowsOnCurrentPage);const c=LC(l,t);return{grid:l,columnCount:l.length,layoutSize:t.size,totalDividerIndex:c}})(o[0],r,a,e,p.left,n))),[o,r,a,e,p,n]),[y,b]=l((()=>f())),[v,x]=l((()=>m())),[w,S]=l((()=>g()));$g((()=>{b(f())}),[f]),$g((()=>{x(m())}),[m]),$g((()=>{S(g())}),[g]),$g((()=>{c&&c.forEach((i=>{b((e=>OC({prevData:e,dataPage:i,pageInfo:a}))),x((e=>NC({prevData:e,nextDataPage:i,layoutService:r,visibleTopDimensionInfo:t,attrExprInfoIndexes:p.top,headerRows:h.size.y,env:n,pageInfo:a}))),S((t=>DC({prevData:t,nextDataPage:i,pageInfo:a,layoutService:r,visibleLeftDimensionInfo:e,attrExprInfoIndexes:p.left,env:n})))}))}),[c]);const E=d((e=>{u(e)}),[]);return{headersData:h,measureData:y,topDimensionData:v,leftDimensionData:w,attrExprInfoIndexes:p,nextPageHandler:E}},jC=Math.sqrt(1e4),zC=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/Xt.PixelsMin)}),BC=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/jC),r=Math.ceil(e.qHeight/jC);for(let i=0;i<n;i++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+i*jC,qTop:e.qTop+n*jC,qWidth:Math.min(jC,e.qWidth-i*jC),qHeight:Math.min(jC,e.qHeight-n*jC)});return t};function WC({nextPageHandler:e}){const{model:t}=rE(),{pageInfo:n}=eE(),{layoutService:r}=aE(),i=(e=>{const t=c(e);return t.current=e,t})(n.page),o=t,a=d((async(e,t)=>{await(null==o?void 0:o.collapseLeft(cE,e,t,!1))}),[o]),l=d((async(e,t)=>{await(null==o?void 0:o.collapseTop(cE,e,t,!1))}),[o]),u=d((async(e,t)=>{await(null==o?void 0:o.expandLeft(cE,e,t,!1))}),[o]),p=d((async(e,t)=>{await(null==o?void 0:o.expandTop(cE,e,t,!1))}),[o]),h=d((async t=>{if(null!=o&&o.getHyperCubePivotData&&0!==t.length)try{const r=await o.getHyperCubePivotData(cE,t.reduce(((e,t)=>[...e,...BC(t)]),[]));i.current===n.page&&e(r)}catch(e){console.error(e)}}),[o,e,n,i]),f=d(((e,{dimensionInfoIndex:n,isLeftColumn:i,x:o=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:c}=r.layout.qHyperCube;let u=[];switch(a){case Bt.Dimension:u=[{qPath:`${cE}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case Bt.Measures:if(i)u=s.map(((e,t)=>({qPath:`${cE}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth})));else{const e=r.getMeasureInfoIndexFromCellIndex(o);u=[{qPath:`${cE}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case Bt.Pivot:u=[{qPath:`${cE}/topHeadersColumnWidth`,oldValue:c}]}const d=u.map((t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}}));null==t||t.applyPatches(d,!0)}),[t,r]),m=d((async e=>{await(null==o?void 0:o.applyPatches([{qPath:`${cE}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))}),[o,r]);return s((()=>({collapseLeft:a,collapseTop:l,expandLeft:u,expandTop:p,applyColumnWidth:f,applyIndentModeColumnWidth:m,fetchPages:h})),[a,l,u,p,f,m,h])}const $C=(e,t,n)=>(r,i)=>{if("P"===r)return uE;const o=t[n+i];return e[o]},HC=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach((e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)}))};return n(e),t},GC=h({}),VC=()=>n(GC),UC=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=aE(),{qPivotDataPages:r}=eE();return s((()=>{var i,o,a,s;const l=HC(null!==(i=null===(o=r[0])||void 0===o?void 0:o.qLeft)&&void 0!==i?i:[]),c=HC(null!==(a=null===(s=r[0])||void 0===s?void 0:s.qTop)&&void 0!==a?a:[]);return{visibleLeftDimensionInfo:l.map($C(n,t,0)),visibleTopDimensionInfo:c.map($C(n,t,e))}}),[n,t,e,r])})(),{headersData:r,measureData:i,topDimensionData:o,leftDimensionData:a,attrExprInfoIndexes:l,nextPageHandler:c}=FC(t,n),u=WC({nextPageHandler:c}),d=s((()=>({gridSectionsData:{headersData:r,topDimensionData:o,leftDimensionData:a,measureData:i},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:l,dataModel:u})),[t,n,r,i,o,a,l,u]);return Ws.jsx(GC.Provider,{value:d,children:e})},YC=18,KC=.75,XC=e=>{var t;return-1!==e&&(null==e||null===(t=e.representation)||void 0===t?void 0:t.type)===Dt.Image},JC=e=>void 0===e?ig:e,ZC=(e,t)=>e&&"number"==typeof e&&!Number.isNaN(e)?e:t,QC=e=>ZC(e,Xt.PixelsDefault),e_=(e,t)=>ZC(e,Xt.PercentageDefault)*t/100,t_=(e,t,n)=>{switch(null==t?void 0:t.type){case Jt.Pixels:return QC(t.pixels);case Jt.Percentage:return e_(t.percentage,e);case Jt.FitToContent:case Jt.Auto:default:return n}},n_=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:i,measureTextForHeader:o,longestMeasureValuePossible:a})=>e.reduce(((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:c}}}=t,{id:u,colIdx:d,qApprMaxGlyphCount:p,isLeftDimension:h}=s;if(!h)return e+0;if(u===dE)return e+0;const f=r(p),m=!n.qAlwaysFullyExpanded&&h&&d<c-1?21:0;let g=0;if(i&&o&&a){g=o("-")+a}return Math.max(e,24*l+YC+m+f+g)}),0),r_=(e,t,n)=>e.reduce(((e,r)=>{const i=(n?0:1)*YC;return Math.max(e,i+t(r.qFallbackTitle))}),0),i_=(e,t,n,r)=>{const i=100*e/t,o=r*KC*(i/100),a=n*(i/100);return Math.min(a,o)},o_=(e,t,n,r)=>r*(n/100)*(100*e/t/100),a_=(e,t)=>e.some((e=>e>=t*KC)),s_=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:i,widthOverride:o,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:c})=>{let u=[];const d=i*KC,p=n.data[n.data.length-1][0],h=Math.min(d,r.at(-1)),f=Math.min(d,n_({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,r_(e.visibleMeasureInfo,a));let g=0;const y=p.findIndex((e=>e.id===dE)),b=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:i}=e.indentModeColumnWidth;return i===Jt.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+YC+16:24})({layoutService:e,measureTextForHeader:a,translator:c,headersData:n});if(e.hasPseudoDimOnLeft)if(0===y){const e=Math.max(h,f,m);u=[Math.max(b,e-h),h]}else{const n=Math.min(d,r_(e.visibleMeasureInfo,l,!0));g=Math.min(d,n_({headers:p.slice(0,y),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(h,f,g);u=[Math.max(b,r-h),h]}else u=[Math.max(b,f-h),h];const v=Math.min(d,u.reduce(((e,t)=>e+t),0)),{indentModeColumnWidth:x}=e;o&&o<=d&&(x.type=Jt.Pixels,x.pixels=o);return[Jt.Pixels,Jt.Percentage].includes(x.type)||a_(u,i)?((e,t,n,r)=>{let i=e[0],o=e[1],a=[];const s=e.reduce(((e,t)=>e+t),0),{type:l,pixels:c,percentage:u}=t,d=a_(e,n);l===Jt.Auto&&d&&(i>o?i-=o:o-=i),l===Jt.Pixels&&c&&(i=i_(e[0],s,c,n),o=i_(e[1],s,c,n)),l===Jt.Percentage&&u&&(i=o_(e[0],s,u,n),o=o_(e[1],s,u,n));let p=0;o<=r&&(p=i-5,p>0&&(i-=p,o+=p)),p=o-r,p>0&&(i+=p,o-=p),a=[i,o];const h=a.reduce(((e,t)=>e+t),0);return{leftGridColumnWidths:a,leftGridWidth:h,leftGridFullWidth:h}})(u,x,i,h):{leftGridWidth:v,leftGridColumnWidths:u,leftGridFullWidth:v}};function l_({tableWidth:e}){const t=e*KC,{styleService:n,layoutService:r,effectivePropertiesService:i}=aE(),{translator:o}=rE(),{gridSectionsData:{headersData:a}}=VC(),{measureText:s}=jg(n.header),{estimateWidth:c,measureText:u}=jg({...n.dimensionValues,fontWeight:JC(n.dimensionValues.fontWeight)}),{measureText:p}=jg({...n.dimensionValues,...n.measureLabels}),h=d(((n,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:d,topHeadersColumnWidth:h}},visibleMeasureInfo:f,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,y=(t=0)=>f.reduce(((n,{qFallbackTitle:r,columnWidth:i})=>{const o=p(r)+YC,a=Math.max(o,t);return Math.max(n,m?a:t_(e,i,a))}),0),b=e=>a.data.reduce(((t,n)=>{const r=n[e];if(!r)return t;if(r.id===dE)return t;const i=(e=>{const{label:t,isLocked:n}=e,r=n?20:0;return YC+s(t)+20+r})(r);return Math.max(i,t)}),0);let v=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const w=x.map(((o,s)=>{let u=YC;if((!m||m&&1===a.size.x)&&n&&void 0!==l&&l===o.colIdx)u=m?Math.min(t,n):n;else{let t;o.columnWidthLocation===Bt.Pivot?t=m?void 0:h:o.columnWidthLocation===Bt.Dimension&&({columnWidth:t}=o);let n=0;if(o.isLeftDimension)if(o.id===dE)n=y();else{const e=b(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:o,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(XC(s))return Xt.PixelsDefault;const l=!i.qAlwaysFullyExpanded&&o&&t<d-1?21:0;return YC+c(n)+l})(o,s);n=Math.max(e,t),m&&!g&&s+1===d&&o.columnWidthLocation===Bt.Dimension&&a.size.x>1&&(n=e)}else o.isLeftDimension||(n=b(s),o.columnWidthLocation===Bt.Measures&&(n=y(n)));m&&1===a.size.x&&(t=r.indentModeColumnWidth),u=m&&!g&&a.size.x>1?n:t_(e,t,n)}return v+=u,u}));return m&&a.size.x>1?s_({layoutService:r,effectivePropertiesService:i,headersData:a,columnWidths:w,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:c,measureTextWidthForMeasuresCombinedWithDimensions:u,translator:o}):{leftGridWidth:Math.min(t,v),leftGridColumnWidths:w,leftGridFullWidth:v}}),[e,a,r,t,s,p,c,u,o,i]),[f,m]=l(h);$g((()=>{m(h())}),[h]);const g=d(((e,t)=>{m(h(e,t))}),[h]);return{...f,overrideLeftGridWidth:g}}function c_({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:i}=aE(),{visibleDimensionsInfo:{visibleTopDimensionInfo:o}}=VC(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:l}},size:c,visibleMeasureInfo:u}=i,{estimateWidth:p,measureText:h}=jg(r.measureValues),{estimateWidth:f}=jg({...r.dimensionValues,fontWeight:JC(r.dimensionValues.fontWeight)}),m=e-n-1,g=o.at(-1),y=g===uE,b=l.length-a>o.length?21:0,v=s((()=>{const e=y?u:[g],t=c.x/e.length,n=[],r=[];let i=m;const o=(e,r)=>{n[e]=Math.min(Xt.PixelsMax,Math.max(Xt.PixelsMin,r)),i-=n[e]*t};if(e.forEach(((e,t)=>{if(null!=e&&e.columnWidth){const{columnWidth:{type:n,pixels:i,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case Jt.Pixels:o(t,QC(i));break;case Jt.Percentage:o(t,e_(a,m));break;case Jt.FitToContent:o(t,((e,t,n)=>n?Xt.PixelsDefault:YC+(y?Math.max(p(e),h(t)):Math.max(Math.max(...u.map((e=>p(e.qApprMaxGlyphCount)))),f(e)+b)))(s,l,XC(e)));break;case Jt.Auto:default:r.push(t)}}else r.push(t)})),r.length){const e=r.length*t,o=i/e;r.forEach((e=>{n[e]=Math.max(Xt.AutoMinPivot,o)}))}return n}),[y,u,g,c.x,m,p,h,f,b]),x=s((()=>{if(y){const e=u.reduce(((e,t,n)=>e+v[n]),0);return e/u.length}return v[0]}),[y,v,u]),w=parseFloat((t/i.size.x).toFixed(12)),S=d((e=>(y&&void 0!==e?v[i.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-w),[y,v,i,x,w]),E=c.x*x;return{rightGridFullWidth:E,rightGridWidth:Math.min(E,m),getRightGridColumnWidth:S}}const u_=`scrollable-container--${$t.TopGrid}`,d_=`scrollable-container--${$t.LeftGrid}`,p_=`scrollable-container--${$t.DataGrid}`,h_=e=>e&&e instanceof HTMLDivElement?{width:e.offsetWidth-e.clientWidth,height:e.offsetHeight-e.clientHeight}:{width:0,height:0},f_=(e,t)=>e>t?Ht.Forward:e<t?Ht.Backward:Ht.None,m_=()=>{const{layoutService:e}=aE(),t=c(null),n=c(null),r=c(null),i=c(null),o=c([]),a=c([]),s=c(null),{scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:h},resetHorizontalScrollbarHeight:f}=(({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const[r,i]=l(0),[o,a]=l(0);return m((()=>{(e.current||n.current)&&i(Math.max(h_(e.current).width,h_(n.current).width))})),m((()=>{(t.current||n.current)&&a(Math.max(h_(t.current).height,h_(n.current).height))})),{scrollbarsDimensions:{verticalScrollbarWidth:r,horizontalScrollbarHeight:o},resetHorizontalScrollbarHeight:()=>{a(0)}}})({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:i,leftGridRef:o,dataGridRef:a}})=>{const{pageInfo:s}=eE(),{downloadService:l,viewService:c,layoutService:u}=aE(),p=d((()=>{var i,o,a,s;const l={left:0,top:0};null===(i=e.current)||void 0===i||i.scrollTo(l),null===(o=t.current)||void 0===o||o.scrollTo(l),null===(a=n.current)||void 0===a||a.scrollTo(l),null===(s=r.current)||void 0===s||s.scrollTo(l)}),[e,t,n,r]);m((()=>{p()}),[s.page,p]),m((()=>{u.triggerdByExpandOrCollapse||p()}),[u,p]),m((()=>{if(u.triggerdByExpandOrCollapse){var e,t,n,s,l,c,d;const u=null!==(e=null===(t=r.current)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0,p=null!==(n=null===(s=r.current)||void 0===s?void 0:s.scrollTop)&&void 0!==n?n:0;null===(l=o.current)||void 0===l||l.forEach((e=>{null==e||e.scrollTo(p)})),null===(c=i.current)||void 0===c||c.forEach((e=>{null==e||e.scrollTo(u)})),null===(d=a.current)||void 0===d||d.scrollTo({scrollTop:p,scrollLeft:u})}}),[u,r,a,o,i]),m((()=>{(l.isDownloadedAsPDForImage||u.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)}),[c,l,u,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:g,scrollDirectionRefs:{verticalScrollDirection:y,horizontalScrollDirection:b}}=(()=>{const e=c(Ht.None),t=c(Ht.None),n=c({prevScrollTop:0,prevScrollLeft:0});return{trackScrollDirection:d((r=>{if(r instanceof WheelEvent&&(e.current=f_(r.deltaY,0),t.current=f_(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const i=r.target;e.current=f_(i.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=i.scrollTop,t.current=f_(i.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=i.scrollLeft}}),[e,t,n]),scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),v=(()=>{const{viewService:e}=aE();return d((t=>{const n=t.target,r=t.currentTarget,i=n.dataset.key;i===d_&&(e.leftGridScrollLeft=r.scrollLeft),i===p_&&(e.scrollLeft=r.scrollLeft),i===u_&&(e.topGridScrollTop=r.scrollTop),i!==d_&&i!==p_||(e.scrollTop=r.scrollTop)}),[e])})(),x={gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},getWrapperElements:d((()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:i.current})),[t,n,r,i]),updateViewService:v,trackScrollDirection:g,isSnapshotMode:e.isSnapshot};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,isSnapshotMode:a})=>{p((()=>{const{headerGridWrapperElement:i,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{i.scrollLeft+=e.deltaX,i.scrollTop+=e.deltaY,l.scrollLeft=i.scrollLeft,s.scrollTop=i.scrollTop,o(e)},d=e=>{var r,a;l.scrollTop+=e.deltaY,null===(r=t.current)||void 0===r||r.forEach((e=>{null==e||e.scrollTo(l.scrollTop)})),i.scrollLeft+=e.deltaX,l.scrollLeft=i.scrollLeft,c.scrollTop=l.scrollTop,null===(a=n.current)||void 0===a||a.scrollTo({scrollTop:l.scrollTop}),o(e)},p=t=>{var r,a;s.scrollLeft+=t.deltaX,null===(r=e.current)||void 0===r||r.forEach((e=>{null==e||e.scrollTo(s.scrollLeft)})),i.scrollTop+=t.deltaY,s.scrollTop=i.scrollTop,c.scrollLeft=s.scrollLeft,null===(a=n.current)||void 0===a||a.scrollTo({scrollLeft:s.scrollLeft}),o(t)},h=r=>{var i,a,u;c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,null===(i=n.current)||void 0===i||i.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,null===(a=e.current)||void 0===a||a.forEach((e=>{null==e||e.scrollTo(c.scrollLeft)})),l.scrollTop=c.scrollTop,null===(u=t.current)||void 0===u||u.forEach((e=>{null==e||e.scrollTo(c.scrollTop)})),o(r)};return i.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",h),a&&setTimeout((()=>{i.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",h)}),0),()=>{i.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",h)}}),[o,i,a,e,t,n,r])})(x),(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,isSnapshotMode:a})=>{p((()=>{const{headerGridWrapperElement:s,topGridWrapperElement:l,leftGridWrapperElement:c,dataGridWrapperElement:u}=r(),d=e=>{const t=e.target;s.scrollLeft=t.scrollLeft,o(e),null==i||i(e)},p=e=>{const t=e.target;s.scrollTop=t.scrollTop,o(e),null==i||i(e)},h=r=>{var a,s,d;const p=r.target;null===(a=n.current)||void 0===a||a.scrollTo({scrollLeft:p.scrollLeft,scrollTop:p.scrollTop}),l.scrollLeft=u.scrollLeft,null===(s=e.current)||void 0===s||s.forEach((e=>{null==e||e.scrollTo(p.scrollLeft)})),c.scrollTop=u.scrollTop,null===(d=t.current)||void 0===d||d.forEach((e=>{null==e||e.scrollTo(p.scrollTop)})),o(r),null==i||i(r)};return c.addEventListener("scroll",d),l.addEventListener("scroll",p),u.addEventListener("scroll",h),a&&setTimeout((()=>{c.removeEventListener("scroll",d),l.removeEventListener("scroll",p),u.removeEventListener("scroll",h)}),0),()=>{c.removeEventListener("scroll",d),l.removeEventListener("scroll",p),u.removeEventListener("scroll",h)}}),[o,i,a,e,t,n,r])})(x),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:y,horizontalScrollDirection:b},scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:h,resetHorizontalScrollbarHeight:f}}},g_=()=>{const{layoutService:e}=aE(),{rect:t,pageInfo:n}=eE();return s((()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}}),[t,e,n.shouldShowPagination])},y_=({children:e,style:t})=>Ws.jsx("div",{"data-testid":"fullSize",style:t,children:e}),b_=({children:e,style:t})=>Ws.jsx("div",{"data-section-id":"GRID",style:{display:"grid",...t},children:e}),v_=e=>e&&`scrollable-container--${e}`,x_=({children:e,style:t,origin:n},r)=>{const{interactions:i}=rE(),o=i.active?t:{overflow:"hidden"};return Ws.jsx("div",{"data-testid":"scrollable","data-key":v_(n),style:o,ref:r,children:e})};var w_=t.forwardRef(x_);const S_=({children:e,style:t})=>Ws.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,left:0,...t},children:e});var E_=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function C_(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||E_(r)&&E_(i)))return!1;var r,i;return!0}function __(e,t){var n;void 0===t&&(t=C_);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}var M_="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function k_(e){cancelAnimationFrame(e.id)}function R_(e,t){var n=M_();var r={id:requestAnimationFrame((function i(){M_()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var A_=-1;function I_(e){if(void 0===e&&(e=!1),-1===A_||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),A_=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return A_}var L_=null;function D_(e){if(void 0===e&&(e=!1),null===L_||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?L_="positive-descending":(t.scrollLeft=1,L_=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),L_}return L_}var P_=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function O_(e){var t,n=e.getColumnOffset,i=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,h=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,y=e.shouldResetStyleCacheOnItemSizeChange,b=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,wn(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:wn(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=__((function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=__((function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,o=r.props,s=o.columnWidth,l=o.direction,c=o.rowHeight,u=r._getItemStyleCache(y&&s,y&&l,y&&c),h=e+":"+t;if(u.hasOwnProperty(h))i=u[h];else{var f=n(r.props,t,r._instanceProps),m="rtl"===l;u[h]=i={position:"absolute",left:m?void 0:f,right:m?f:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=__((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,c=o;if("rtl"===t)switch(D_()){case"negative":c=-o;break;case"positive-descending":c=l-i-o}c=Math.max(0,Math.min(c,l-i));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&k_(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=R_(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}xn(t,e),t.getDerivedStateFromProps=function(e,t){return T_(e,t),b(e),null};var g=t.prototype;return g.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},g.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,a=o.columnCount,d=o.height,p=o.rowCount,h=o.width,f=this.state,m=f.scrollLeft,g=f.scrollTop,y=I_();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==i&&(i=Math.max(0,Math.min(i,p-1)));var b=s(this.props,this._instanceProps),v=l(this.props,this._instanceProps)>h?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?u(this.props,i,n,g,this._instanceProps,v):g})},g.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},g.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(D_()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},g.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&k_(this._resetIsScrollingTimeoutId)},g.render=function(){var e=this.props,t=e.children,n=e.className,i=e.columnCount,o=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,h=e.itemKey,f=void 0===h?P_:h,m=e.outerElementType,g=e.outerTagName,y=e.rowCount,b=e.style,v=e.useIsScrolling,x=e.width,w=this.state.isScrolling,S=this._getHorizontalRangeToRender(),E=S[0],C=S[1],_=this._getVerticalRangeToRender(),M=_[0],k=_[1],R=[];if(i>0&&y)for(var A=M;A<=k;A++)for(var I=E;I<=C;I++)R.push(r(t,{columnIndex:I,data:p,isScrolling:v?w:void 0,key:f({columnIndex:I,data:p,rowIndex:A}),rowIndex:A,style:this._getItemStyle(A,I)}));var L=s(this.props,this._instanceProps),D=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:dn({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},r(u||d||"div",{children:R,ref:c,style:{height:L,pointerEvents:w?"none":void 0,width:D}}))},g._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],c=o[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],h=u[2],f=u[3];this._callOnItemsRendered(a,s,d,p,l,c,h,f)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,b,g,x,v)}},g._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var h=i(this.props,d,this._instanceProps),f=o(this.props,h,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,h-m),Math.max(0,Math.min(t-1,f+g)),h,f]},g._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=h(this.props,c,this._instanceProps),p=f(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,p+g)),d,p]},t}(g),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var T_=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},N_=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},q_=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},F_=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=o(c);i[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},j_=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?z_(e,t,n,o,0,r):B_(e,t,n,Math.max(0,o),r)},z_=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=F_(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},B_=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&F_(e,t,r,n).offset<i;)r+=a,a*=2;return z_(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},W_=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=F_(e,t,n,o),c="column"===e?q_(t,o):N_(t,o),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return i>=d&&i<=u?i:d>u||i<d?d:u}},$_=O_({getColumnOffset:function(e,t,n){return F_("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return j_("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=F_("column",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=F_("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:N_,getEstimatedTotalWidth:q_,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return W_("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return W_("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return F_("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return j_("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=F_("row",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=F_("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),H_=function(e,t){return e};function G_(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,o=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,wn(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:wn(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=__((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=__((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?d:0;c[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:d,height:h?"100%":p,width:h?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=__((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(D_()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState((function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&k_(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=R_(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}xn(t,e),t.getDerivedStateFromProps=function(e,t){return V_(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?I_():0:l.scrollHeight>l.clientHeight?I_():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(D_()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&k_(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,h=void 0===p?H_:p,f=e.layout,m=e.outerElementType,g=e.outerTagName,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,w="horizontal"===o||"horizontal"===f,S=w?this._onScrollHorizontal:this._onScrollVertical,E=this._getRangeToRender(),C=E[0],_=E[1],M=[];if(u>0)for(var k=C;k<=_;k++)M.push(r(t,{data:d,key:h(k,d),index:k,isScrolling:b?x:void 0,style:this._getItemStyle(k)}));var R=i(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:S,ref:this._outerRefSetter,style:dn({position:"relative",height:a,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},r(l||c||"div",{children:M,ref:s,style:{height:w?"100%":R,pointerEvents:x?"none":void 0,width:w?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),p=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(g),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var V_=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},U_=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var c=r(l);i[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return i[t]},Y_=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=U_(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},K_=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&U_(e,n,t).offset<r;)n+=o,o*=2;return Y_(e,t,Math.min(n,i-1),Math.floor(n/2),r)},X_=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},J_=G_({getItemOffset:function(e,t,n){return U_(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:X_,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=U_(e,t,i),p=X_(e,i),h=Math.max(0,Math.min(p-u,d.offset)),f=Math.max(0,d.offset-u+d.size+o);switch("smart"===n&&(n=r>=f-u&&r<=h+u?"auto":"center"),n){case"start":return h;case"end":return f;case"center":return Math.round(f+(h-f)/2);default:return r>=f&&r<=h?r:r<f?f:h}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?Y_(e,t,i,0,n):K_(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===i||"horizontal"===s?l:o,u=U_(e,t,r),d=n+c,p=u.offset+u.size,h=t;h<a-1&&p<d;)h++,p+=U_(e,h,r).size;return h},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function Z_(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var Q_=["style"],eM=["style"];function tM(e,t){var n=e.style,r=bn(e,Q_),i=t.style,o=bn(t,eM);return!Z_(n,i)&&!Z_(r,o)}const nM=10,rM=(e,t)=>e.current===Ht.Backward?t:0,iM=(e,t,n,r)=>{for(let i=n;i<n+r;i++){const n=e[i];if(void 0===n||void 0===n[t])return!0}return!1},oM=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,aM=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:i,endLeft:o})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=i;e<o;e++)if(iM(t,e,n,r)){const t=a[a.length-1],i={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&oM(t,i)?t.qWidth+=i.qWidth:a.push(i)}return a},sM=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:i,minBufferEndLeft:o,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===Ht.Backward?Math.max(0,i-25):o,u=Math.min(c+25,a);return aM({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},lM=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:i})=>{const{startLeft:o,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=e.size.x,l=rM(n,nM),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(o+nM,s-c),pageTop:i,qHeight:a}})(r,i,n),c=aM({pageInfo:e,measureData:t,startLeft:o,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...sM({pageInfo:e,measureData:t,scrollDirection:n,viewService:i,minBufferStartLeft:o,minBufferEndLeft:a,columnEndIndex:r.size.x})]:c},cM=(e,t,n,r)=>{const i=e[n];if(void 0===i)return!0;for(let e=t;e<t+r;e++){if(void 0===i[e])return!0}return!1},uM=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,dM=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:i,pageInfo:o})=>{const a=[],s=o.page*o.rowsPerPage;for(let o=e;o<t;o++)if(cM(i,n,o,r)){const e=a.at(-1),t={qLeft:n,qTop:o+s,qWidth:r,qHeight:1};void 0!==e&&uM(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},pM=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:i,endTop:o,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=rM(n,nM),l=Math.max(i-s,0);return{startTop:l,endTop:l+Math.min(a+nM,e.rowsOnCurrentPage-l),qLeft:r,qWidth:o}})(e,r,n),l=dM({startTop:i,endTop:o,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===Ht.Backward?Math.max(0,i-25):o,c=Math.min(r+25,e.rowsOnCurrentPage),u=dM({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},hM=async(e,t,n,r,i,o,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=i;let p=[],h=[];o.current!==Ht.None&&(p=pM({pageInfo:r,measureData:n,scrollDirection:o,viewService:i})),a.current!==Ht.None&&(h=lM({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:i})),o.current===Ht.None&&a.current===Ht.None&&(p=dM({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const f=e.fetchPages([...p,...h]);s.isDownloadedAsPDForImage&&s.waitForPromise(f)},fM=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-o,u=function(){o=Date.now(),r=0,e.apply(t,n)};r||(c>=i?u():r=setTimeout(u,i-c))}}(hM,100),mM=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,o)}),n)}}(hM,75),gM=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),yM=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:i,isLeftColumn:o,showTotalCellDivider:a})=>{const{styleService:{grid:{border:s,divider:l}}}=aE();return Ws.jsx("div",{style:{...e,...dg,...mg(n,r,s,i),...yg({bottomDivider:a&&o,rightDivider:a&&!o,borderColor:l})},"data-testid":"empty-cell","data-index":t})},bM=({children:e,verticalAlign:t,width:n,right:r})=>Ws.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",overflow:"hidden",flexDirection:"row",alignItems:t,width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,alignSelf:t},children:e}),vM=e=>{const{type:t,imageSize:n}=e;return t!==Dt.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"};function xM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wM=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xM(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})),SM=u(wM);function EM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const CM=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){EM(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})),_M=u(CM),MM=e=>{var t;return!(null===(t=e.target)||void 0===t||null===(t=t.getAttribute("class"))||void 0===t||!t.includes(Kt))},kM=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),i=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&i===e.activeSelection.endIndex)return e;const o={...e.activeSelection,startIndex:r,endIndex:i};return o.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:i}=e,o=new Map(i);for(let e=n;e<=r;e++){const n=t(e);"N"===(null==n?void 0:n.ref.qType)&&o.set(n.ref.qElemNo,n)}return o})(o),{...e,activeSelection:o}}default:return e}};const RM=h({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),AM=()=>n(RM),IM=({children:e,selections:t})=>{const n=function(e){var t,n,r;const{env:i}=rE(),{updatePageInfo:o}=eE(),a=e.isActive(),[l,c]=y(kM,{engineSelectedCells:null,selectedField:null,activeSelection:null});p((()=>{const t=()=>{c({type:"clearSelections"})},n=()=>{t(),o({page:0})};return e.on("deactivated",t),e.on("canceled",t),e.on("confirmed",n),e.on("cleared",t),()=>{e.removeListener("deactivated",t),e.removeListener("canceled",t),e.removeListener("confirmed",n),e.removeListener("cleared",t)}}),[e,o]);const u=d((async()=>{var t,n,r;if(!l.activeSelection)return;1===l.activeSelection.clientSelectedCells.size&&(n=l.engineSelectedCells,(r=l.activeSelection).clientSelectedCells.forEach(((e,t)=>{null!=n&&n.has(t)&&(r.clientSelectedCells.delete(t),n.delete(t))})));const i=new Map([...null!==(t=l.engineSelectedCells)&&void 0!==t?t:new Map,...l.activeSelection.clientSelectedCells]);try{c({type:"mouseup",payload:{engineSelectedCells:i}}),await e.select({method:"selectPivotCells",params:[cE,Array.from(i,(([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x})))]})}catch(e){console.error(e),c({type:"mouseup",payload:{engineSelectedCells:l.engineSelectedCells}})}}),[l,e]);p((()=>{if(l.activeSelection)return document.addEventListener("mouseup",u),()=>{document.removeEventListener("mouseup",u)}}),[u,l.activeSelection]);const h=d(((e,t)=>n=>{const r=t(e);MM(n)||(e=>{var t;return null!==(null===(t=e.target)||void 0===t?void 0:t.closest("[data-prevent-selection]"))})(n)||(e=>{var t;return"A"===(null===(t=e.target)||void 0===t?void 0:t.tagName)})(n)||!(e=>1===e.buttons)(n)||!r||c({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(r.ref.qElemNo,r)},selectedField:{selectionCellType:r.selectionCellType,index:"L"===r.selectionCellType?r.x:r.y}}})}),[]),f=d((t=>i.flags.isEnabled("CLIENT_IM_6223_PIVOT_RANGE_SELECTION")?async()=>{l.activeSelection&&(e.isActive()||await e.begin([cE]),c({type:"mouseover",payload:{index:t}}))}:void 0),[l.activeSelection,e,i]),m=d((e=>{var t,n;return!(!(null!==(t=l.engineSelectedCells)&&void 0!==t&&t.size||null!==(n=l.activeSelection)&&void 0!==n&&n.clientSelectedCells.size)||!l.selectedField||e.selectionCellType===l.selectedField.selectionCellType&&("L"===e.selectionCellType?l.selectedField.index===e.x:l.selectedField.index===e.y))}),[null===(t=l.activeSelection)||void 0===t?void 0:t.clientSelectedCells.size,null===(n=l.engineSelectedCells)||void 0===n?void 0:n.size,l.selectedField]),g=d((e=>{var t,n;return!m(e)&&((null===(t=l.engineSelectedCells)||void 0===t?void 0:t.has(e.ref.qElemNo))||!(null===(n=l.activeSelection)||void 0===n||!n.clientSelectedCells.has(e.ref.qElemNo)))}),[m,null===(r=l.activeSelection)||void 0===r?void 0:r.clientSelectedCells,l.engineSelectedCells]);return s((()=>({isSelected:g,isActive:a,isLocked:m,createMouseDownHandler:h,createMouseOverHandler:f})),[g,a,m,h,f])}(t);return Ws.jsx(RM.Provider,{value:n,children:e})};var LM;!function(e){e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration"}(LM||(LM={}));const DM={brighter:.5,darker:.3,opacity:.03},PM=(e,{cell:t,styleService:n})=>{if(e===LM.Background||e===LM.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},OM=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const i=PM(LM.Background,{cell:n,styleService:e});return!r||!i||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?PM(LM.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${Hm(o=i,DM)} 0px 2px,\n ${o} 0px 4px\n ) border-box`;var o},TM=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:PM(LM.Color,{cell:e,styleService:t}),NM=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,i=PM(LM.FontWeight,{cell:e,styleService:t});return void 0===i&&(r||n)?ig:i},qM=({cell:e,styleService:t})=>PM(LM.FontStyle,{cell:e,styleService:t}),FM=({cell:e,styleService:t})=>PM(LM.TextDecoration,{cell:e,styleService:t}),jM=e=>e?"pointer":"default",zM=({expandOrCollapse:e,cell:t})=>n=>{null==e||e(t.y,t.x),n.stopPropagation()},BM=(e,t)=>{if(!e.isLeftColumn||e.representation.type===Dt.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},WM=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r}=aE(),{interactions:i}=rE(),{isActive:o}=AM(),{dataModel:a}=VC();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const s=!i.active||o||!a,l=TM({cell:e,styleService:r,isCellSelected:n}),c=o?.4:1,u=e.ref.qCanExpand?_M:SM;let d;return d=e.ref.qCanExpand?t?a.expandLeft:a.expandTop:t?a.collapseLeft:a.collapseTop,Ws.jsx(u,{opacity:c,color:l,"data-prevent-selection":!s||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:s?"default":"pointer",...BM(e,r)},onClick:s?void 0:zM({cell:e,expandOrCollapse:d})})},$M=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},HM=e=>{switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";default:return"100%"}},GM=({representation:e,styleService:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:i})=>{const o=`calc(100% - ${n?21:0}px)`,a=i?t.contentCellHeight:t.headerCellHeight,s=i&&void 0!==r?a*Math.max(r,1):a;switch(e.imageSize){case"originalSize":return{maxWidth:o,maxHeight:s};case"fitWidth":return{width:o,maxHeight:s};case"fitHeight":return{height:s,maxWidth:o};case"fill":return{height:s,width:o};default:return{width:o,height:a}}},VM=(e,t)=>{if("alwaysFit"===e)switch(null==t?void 0:t.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},UM=e=>{if("alwaysFit"===e)return"contain"},YM=({representation:e,styleService:t,textStyle:n,canExpandOrCollapse:r,leafCount:i,isLeftColumn:o})=>{const{imageRef:a,onLoad:l}=(()=>{const{downloadService:e}=aE(),t=c(null),{promise:n,resolve:r}=s((()=>kg()),[]);return p((()=>{var i;return e.isDownloadedAsPDForImage&&(e.waitForPromise(n),null!==(i=t.current)&&void 0!==i&&i.complete&&r()),()=>{r()}}),[t,e,n,r]),{onLoad:d((()=>{r()}),[r]),imageRef:t}})(),{url:u,text:h,imageSize:f,resolvedImagePosition:m}=e,{overflow:g,...y}=n;return Ws.jsx("div",{"data-key":"image-container",style:{display:"flex",flexDirection:"column",justifyContent:null==m?void 0:m.vertical,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...GM({representation:e,styleService:t,canExpandOrCollapse:r,leafCount:i,isLeftColumn:o})},children:Ws.jsx("img",{src:u,alt:h,style:{width:HM(f),height:$M(f),objectFit:UM(f),objectPosition:VM(f,m),...y},onLoad:l,ref:a})})},KM=(e,t)=>{if(null!=e&&e.auto)return t;switch(null==e?void 0:e.align){case"center":return"center";case"left":return"flex-start";case"right":return"flex-end";default:return t}},XM={display:"flex",flexDirection:"row",alignItems:"center"},JM={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},ZM=(e,t,n,r)=>t?{...JM,...e.nullValues}:n?{...XM,color:e.totalValues.color,background:null!=r?r:e.totalValues.background}:{...XM,color:e.measureValues.color,background:null!=r?r:e.measureValues.background},QM=(e,t,n,r,i)=>{const{fontFamily:o,fontSize:a}=e.measureValues,s={...pg,...!n&&hg(e.grid.lineClamp),...t&&{color:t},fontFamily:o,fontSize:a};if(i){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:c,textDecoration:u}=e.measureValues;return{...s,fontWeight:void 0===l?ig:l,fontStyle:c,textDecoration:u}},ek=(e,t,n,r)=>{const{textAlign:i}=t,o=r?"flex-end":"center";var a,s;return e.isNull||n.type!==Dt.Image?KM(i,o):null!==(a=null===(s=n.resolvedImagePosition)||void 0===s?void 0:s.horizontal)&&void 0!==a?a:"center"},tk=({cell:e,representation:t,color:n,isNumeric:r,isTotalValueCell:i})=>{const{layoutService:o,styleService:a}=aE(),s=e.isNull?o.getNullValueText():t.text,l=QM(a,n,r,i,e.isNull);return t.type!==Dt.Image||e.isNull?Ws.jsx("span",{style:{padding:4,...l},children:s}):Ws.jsx(YM,{representation:t,styleService:a,textStyle:l,isLeftColumn:!0})},nk=(e,t)=>{var n,r;return null!==(n=null==e||null===(r=e[t])||void 0===r?void 0:r.visibleMeasureInfoIndex)&&void 0!==n?n:0},rk="flex-start",ik=(e,t)=>{return e.isNull?rk:t.type===Dt.Image&&"fill"!==t.imageSize?null===(n=t.resolvedImagePosition)||void 0===n?void 0:n.vertical:rk;var n},ok=({columnIndex:e,rowIndex:t,style:n,data:r})=>{var i;const{env:o}=rE(),{pageInfo:a}=eE(),{styleService:s,layoutService:l}=aE(),{attrExprInfoIndexes:c,gridSectionsData:{measureData:u,leftDimensionData:p,topDimensionData:h},visibleDimensionsInfo:{visibleLeftDimensionInfo:f,visibleTopDimensionInfo:m}}=VC(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=aE(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:i}}=VC(),o=r.length,a=i.length;return d(((r,i)=>{var s,l;return!!(null!==(s=n.grid.at(a-1))&&void 0!==s&&null!==(s=s[r])&&void 0!==s&&s.isTotal||null!==(l=t.grid.at(e?0:o-1))&&void 0!==l&&null!==(l=l[i])&&void 0!==l&&l.isTotal)}),[n,t,o,a,e])})(),y=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=VC(),n=t.length;return d((t=>{var r;const i=null===(r=e.grid.at(n-1))||void 0===r?void 0:r[t];return gM(i,e.totalDividerIndex)}),[e,n])})(),b=(()=>{const{layoutService:{isIndentModeEnabled:e}}=aE(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=VC(),r=n.length;return d((n=>{var i;const o=e?0:r-1,a=null===(i=t.grid.at(o))||void 0===i?void 0:i[n];return gM(a,t.totalDividerIndex,e)}),[t,e,r])})(),{showLastBorder:v}=r,x=h.grid.at(m.length-1),w=p.grid.at(f.length-1),{background:S}=s.measureValues,E=null===(i=u[t])||void 0===i?void 0:i[e],C=t===a.rowsOnCurrentPage-1,_=e===l.size.x-1;if(!E)return Ws.jsx(yM,{style:{...n,background:S},isLastRow:C,isLastColumn:_,showLastBorder:v,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const M=l.hasPseudoDimOnLeft?nk(w,t):nk(x,e),k=l.visibleMeasureInfo[M],R=EC({cell:E.ref,representationProperties:l.isIndentModeEnabled?{type:Dt.Text}:k.representation,attrExprInfoIndex:c.measures[M],env:o}),A=!E.isNull&&g(e,t),I=E.isNull?l.getNullValueText():R.text,L=!E.isNull||!Number.isNaN(+I),D=CC(c.measures[M],E.ref),P={...ZM(s,E.isNull,A,D.background),...mg(C,_,s.grid.border,v),...yg({bottomDivider:b(t),rightDivider:y(e),borderColor:s.grid.divider}),...dg,padding:"0px 4px",display:"flex",justifyContent:ek(E,k,R,L)};return Ws.jsx("div",{className:Ut,title:I,style:{...P,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:Ws.jsx(bM,{width:vM(R),verticalAlign:ik(E,R),children:Ws.jsx(tk,{cell:E,representation:R,isNumeric:L,isTotalValueCell:A,color:D.color})})})};var ak=t.memo(ok,tM);const sk=(e,t)=>{var n,r;return null!==(n=null===(r=t.list[e])||void 0===r?void 0:r.id)&&void 0!==n?n:e.toString()},lk=({columnIndex:e,rowIndex:t,data:n})=>{var r,i;return null!==(r=null===(i=n.grid[t])||void 0===i||null===(i=i[e])||void 0===i?void 0:i.id)&&void 0!==r?r:`${t}-${e}`},ck={...ug,overflow:"hidden",boxSizing:"content-box",borderWidth:"1px 0px 0px 1px"},uk=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:i,getRightGridColumnWidth:o,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l}=eE(),{layoutService:c,styleService:{grid:{divider:u},contentCellHeight:p}}=aE(),{dataModel:h,gridSectionsData:{measureData:f}}=VC(),g={...ck,borderColor:u,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},y=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=eE(),{downloadService:r,viewService:i,layoutService:o}=aE(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=VC(),u=s.columnCount,p=l.rowCount;return d((async({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:d,overscanRowStopIndex:h})=>{i.gridColumnStartIndex=s,i.gridRowStartIndex=d,i.gridWidth=l-s+1,i.gridHeight=h-d+1;const f=i.gridWidth+u+(t.current===Ht.None?0:nM),m=i.gridHeight+p+(e.current===Ht.None?0:nM);let g=fM;m*f>1500&&(g=mM),g(a,o,c,n,i,e,t,r)}),[i,o,a,c,e,t,n,u,p,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return $g((()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)}),[e,h,f]),m((()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})}),[r,t,e,p]),0===c.size.x?null:Ws.jsx($_,{"data-section-id":"DATA_GRID",ref:e,style:g,columnCount:c.size.x,columnWidth:o,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:i,grid:f},onItemsRendered:y,estimatedRowHeight:n(),estimatedColumnWidth:o(),itemKey:lk,children:ak})};var dk=f(uk);function pk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const hk=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pk(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),t.createElement("use",{fillRule:"evenodd"})),fk=u(hk),mk=e=>{const[t,n]=l(!1);return $g((()=>{n(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},gk=()=>{const[e,t]=l(!1),{dataModel:n}=VC(),{interactions:r}=rE(),{isAdjustingWidth:i,setIsAdjustingWidth:o}=mk([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||MM(e)||i||t(!0)},setIsAdjustingWidth:o}};function yk(e,t){var n,r;const i=null!==(n=null===(r=t.expressionColor)||void 0===r?void 0:r.background)&&void 0!==n?n:e.dimensionValues.background,o=t.isLeftColumn?e.header.background:i,a=o===sg.Transparent?hf.WHITE:o,s=fe(e.grid.border),l=fe(a);return l.isInvalid()||s.isInvalid()||1===s.a?e.grid.border:function(e,t,n){return fe(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(l,s,s.a).getRGB()}const bk=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:i,shouldApplyIndentModeColumnWidth:o,tableWidth:a})=>{var s;const{interactions:c,translator:u}=rE(),{isActive:d}=AM(),{dataModel:p}=VC(),{styleService:h}=aE(),[,f]=l({});if(!(e.canBeResized&&!!c.active&&!d))return null;const m=yk(h,e);return Ws.jsx(Qx,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:m,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{var n;o?p.applyIndentModeColumnWidth({...t,pixels:Math.min((null!=a?a:0)*KC,null!==(n=t.pixels)&&void 0!==n?n:0)}):p.applyColumnWidth(t,e)},setIsAdjustingWidth:i,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:null!==(s=e.label)&&void 0!==s?s:""},direction:"ltr"})};function vk(e){return dv(e)}const xk=e=>e.scrollTop;function wk(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof o?o[t.mode]:o,delay:a.transitionDelay}}function Sk(e){return gb("MuiPaper",e)}yb("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Ek=["className","component","elevation","square","variant"],Ck=Vx("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return dn({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&dn({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${Sv("#fff",Kx(t.elevation))}, ${Sv("#fff",Kx(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),_k=e.forwardRef((function(e,t){const n=vk({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=bn(n,Ek),c=dn({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return Kb({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Sk,i)})(c);return Ws.jsx(Ck,dn({as:i,ownerState:c,className:Ma(u.root,r),ref:t},l))}));var Mk=_k;var kk=yb("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const Rk=["center","classes","className"];let Ak,Ik,Lk,Dk,Pk=e=>e;const Ok=Bo(Ak||(Ak=Pk`
101
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(h,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},Lm({exports:{}});const Wm=(e,t=hf.TEXT,n=hf.WHITE)=>{const r=Rf(e),i=Rf(t),o=Rf(n);return r.isInvalid()?t:function(e,t,n){return Af(e,t)>Af(e,n)?t:n}(r,o,i).getRGB()},$m=e=>{const t=e.getStyle("","","dataColors.selected")||hf.SELECTED,n=function(e,t){var n=Rf("#FFFFFF"),r=Rf(e),i=Rf(t);if(r.isInvalid()||i.isInvalid()||r.getAlpha()<1||i.getAlpha()<1)return t;var o=Af(n,r),a=Af(i,r),s=o>a||o>4.5;return!s&&a>3?t:s?"#FFFFFF":"#000000"}(t,hf.TEXT);return{background:t,color:n}},Hm=(e,t)=>{const n=Rf(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},Gm=e=>!!e&&0===Rf(e).a,Vm=e=>{const t=Rf(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},Um=e=>{e.stopPropagation(),e.preventDefault()},Ym=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:null!=r&&r,defaultValue(e,t,i){var o;const a=null!==(o=null==r?void 0:r(e,t,i))&&void 0!==o&&o,s=i.theme.current(),l=n(s,a);return{color:"transparent"===l?"none":l}}}),Km=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},Xm=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,n,r)=>{var i,o;const a=null!==(i=t.fontFamily)&&void 0!==i?i:"Source Sans Pro, sans-serif",s=null!==(o=t.fontFamilies)&&void 0!==o?o:[],l=Array.from(new Set([e,a,...s])),c=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...l.sort().map((e=>Km(e,!0)))],u=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...Of(r).filter((e=>!l.includes(e))).map((e=>Km(e,!0)))];return[...c,...u.length>1?u:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),Jm=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],Zm=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,i)=>{const o=i.theme.current();return((e,t,n)=>{var r;const i=t.fontSize,o=null!==(r=t.fontSizes)&&void 0!==r?r:[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort(((e,t)=>parseInt(e,10)-parseInt(t,10))).map((e=>Km(e,!1)))],l=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...Jm.filter((e=>!a.includes(e))).map((e=>Km(e,!1)))];return[...s,...l.length>1?l:[]]})(t(o),o,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),Qm=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:null!=o?o:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:Xm({ref:`${e}.fontFamily`,themeAccessor:t=>{var n;return null!==(n=i(t,e,"fontFamily"))&&void 0!==n?n:t.fontFamily},translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:null!=t?t:[]},fontSize:Zm({ref:`${e}.fontSize`,themeAccessor:t=>{var n;return null!==(n=i(t,e,"fontSize"))&&void 0!==n?n:t.fontSize},translator:n}),fontColor:Ym(`${e}.fontColor`,void 0,(t=>{var n;return null!==(n=i(t,e,"color"))&&void 0!==n?n:t.color}))}},background:Ym(`${e}.background`,"properties.background",((t,n)=>{var r;const o=n?hf.WHITE:hf.TRANSPARENT;return null!==(r=i(t,e,"backgroundColor"))&&void 0!==r?r:o}),a)}}}}),eg=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:null!=t?t:[]},fontColor:Ym(`${e}.fontColor`,void 0,(t=>{var n;return null!==(n=r(t,e,"color"))&&void 0!==n?n:t.color}))}},background:Ym(`${e}.background`,"properties.background",(t=>{var i,o;return null!==(i=null!==(o=r(t,e,"backgroundColor"))&&void 0!==o?o:n)&&void 0!==i?i:"transparent"}))}}}}),tg=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map((e=>({value:e+1,translation:e+1}))),defaultValue:1}),ng="12px",rg="Source Sans Pro, sans-serif",ig="600",og=15e3,ag=4/3;var sg,lg;!function(e){e.Transparent="transparent",e.FontPrimary="#404040",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2"}(sg||(sg={})),function(e){e.Solid="solid",e.None="none"}(lg||(lg={}));const cg={display:"flex",justifyContent:"center",alignItems:"center"},ug={borderStyle:"solid"},dg={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},pg={lineHeight:ag,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},hg=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),fg=(e,t)=>e>0?`${e}px ${lg.Solid} ${t}`:lg.None,mg=(e,t,n,r)=>{const i=Number(!t||(null==r?void 0:r.right)),o=Number(!e||(null==r?void 0:r.bottom));return{borderRight:fg(i,n),borderBottom:fg(o,n),borderLeft:lg.None,borderTop:lg.None}},gg=(e,t,n,r,i,o)=>{const a=mg(t,r,i,o);return e.isLeftDimension||(e.isLastDimension&&!t&&(a.borderBottom=fg(2,i)),n||(a.borderLeft=fg(1,i))),a},yg=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=fg(1,n)),t&&(r.borderRight=fg(1,n)),r},bg=e=>({translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:tg("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:e.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")?tg("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"):void 0,border:Ym("grid.border","properties.border",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n?void 0:n.borderColor)&&void 0!==t?t:sg.DividerLight})),divider:Ym("grid.divider","properties.pivot.divider",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n||null===(n=n.divider)||void 0===n?void 0:n.borderColor)&&void 0!==t?t:sg.DividerDark})),background:Ym("grid.background","properties.background",(e=>{var t,n;return null!==(t=null===(n=e.object)||void 0===n||null===(n=n.pivotTableV2)||void 0===n||null===(n=n.grid)||void 0===n?void 0:n.backgroundColor)&&void 0!==t?t:sg.Transparent}))}}}}),vg=(e,t,n)=>{var r,i,o,a,s,l;switch(t){case"header":return null===(r=e.object)||void 0===r||null===(r=r.pivotTableV2)||void 0===r||null===(r=r.dimension)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.name)||void 0===r?void 0:r[n];case"dimensionValues":return null===(i=e.object)||void 0===i||null===(i=i.pivotTableV2)||void 0===i||null===(i=i.dimension)||void 0===i||null===(i=i.label)||void 0===i||null===(i=i.value)||void 0===i?void 0:i[n];case"measureLabels":return null===(o=e.object)||void 0===o||null===(o=o.pivotTableV2)||void 0===o||null===(o=o.measure)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o[n];case"measureValues":return null===(a=e.object)||void 0===a||null===(a=a.pivotTableV2)||void 0===a||null===(a=a.measure)||void 0===a||null===(a=a.label)||void 0===a||null===(a=a.value)||void 0===a?void 0:a[n];case"totalValues":return null===(s=e.object)||void 0===s||null===(s=s.pivotTableV2)||void 0===s||null===(s=s.total)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s[n];case"nullValues":return null===(l=e.object)||void 0===l||null===(l=l.pivotTableV2)||void 0===l||null===(l=l.null)||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.value)||void 0===l?void 0:l[n];default:return}},xg=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,defaultValue:[],items:{headerSection:Qm({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:vg}),dimensionValueSection:Qm({section:"dimensionValues",translator:e,flags:t,getThemeValue:vg}),measureValueSection:Qm({section:"measureValues",translator:e,flags:t,getThemeValue:vg}),measureLabelSection:eg({section:"measureLabels",getThemeValue:vg}),totalValuesSection:eg({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:vg}),nullValuesSection:eg({section:"nullValues",fallbackBackground:sg.NullValueBackground,getThemeValue:vg}),gridSection:bg(t)}}]}),wg=e=>({type:"items",items:{nullValueText:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},...e.isEnabled("CLIENT_IM_5975_INDENT_MODE")&&{indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:Jt.Auto,translation:"Common.Auto"},{value:Jt.Pixels,translation:"Object.Table.Column.Pixels"},{value:Jt.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:Jt.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expression:"optional",defaultValue:Xt.PixelsDefault,show:e=>{var t;const n=e.qHyperCubeDef;return n.qIndentMode&&(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.type)===Jt.Pixels},change:e=>{var t;const n=e.qHyperCubeDef;void 0!==(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.pixels)&&(n.indentModeColumnWidth.pixels=Math.max(Xt.PixelsMin,Math.min(Xt.PixelsMax,n.indentModeColumnWidth.pixels)))}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:Xt.PercentageDefault,show:e=>{var t;const n=e.qHyperCubeDef;return n.qIndentMode&&(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.type)===Jt.Percentage},change:e=>{var t;const n=e.qHyperCubeDef;void 0!==(null===(t=n.indentModeColumnWidth)||void 0===t?void 0:t.percentage)&&(n.indentModeColumnWidth.percentage=Math.max(Xt.PercentageMin,Math.min(Xt.PercentageMaxInIndentMode,n.indentModeColumnWidth.percentage)))}}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(t){const{qIndentMode:n}=t.qHyperCubeDef;return(!n||!e.isEnabled("CLIENT_IM_5975_INDENT_MODE"))&&!!t.qHyperCubeDef.qDimensions.some((e=>{var t;return"TOTAL_EXPR"===(null===(t=e.qOtherTotalSpec)||void 0===t?void 0:t.qTotalMode)}))}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}),Sg=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[xg(e,t),wg(t)]}}}),Eg="auto",Cg={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:Eg,translation:"Object.Table.SortingInSearch",options:[{value:Eg,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function _g(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:un(e),sorting:Cg,addons:Lt,settings:Sg(t,n)}}}function Mg(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:_g(e),importProperties:At(e),exportProperties:It}}const kg=()=>{let e;const t=new Promise((t=>{e=t}));return{promise:t,resolve:e}};function Rg(e,t){return b((()=>e),t)}const Ag={},Ig=e=>{const t=b((()=>({current:Ag})),[]);return t.current=t.current===Ag?e:t.current,t},Lg=()=>{const{viewState:e}=v(),t=Ig(new Set),n=void 0!==e,{promise:r,resolve:i}=b((()=>kg()),[]),o=Rg((e=>{n&&t.current.add(e)}),[t]),a=Rg(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,o)}),n)}}((async()=>{await Promise.all(t.current),t.current.clear(),i()}),1e3),[i,t]);return x((async()=>{n&&await r}),[r,n]),b((()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:o})),[a,n,e,o])},Dg="#grid",Pg=(e,t)=>{const n=null==t?void 0:t.closest(e);return n&&window.getComputedStyle(n).backgroundColor},Og=(e,t,n,r,i)=>{const o=Pg(".qv-object .qv-inner-object",n),a=Pg(".qv-panel-sheet",n),s=Pg(Dg,n),l=null!=s?s:a,c=(e=>{var t,n,r,i,o,a;const s=null===(t=e.components)||void 0===t?void 0:t.find((e=>"general"===e.key)),l=null==s||null===(n=s.bgColor)||void 0===n?void 0:n.colorExpression,c=null==s||null===(r=s.bgColor)||void 0===r||null===(r=r.color)||void 0===r?void 0:r.color;if((null==s||null===(i=s.bgColor)||void 0===i?void 0:i.useColorExpression)&&l)return Vm(l);if("none"===c)return"transparent";if(void 0===c)return;const u=Rf(c);return u.setAlpha(null!==(o=null==s||null===(a=s.bgColor)||void 0===a||null===(a=a.color)||void 0===a?void 0:a.alpha)&&void 0!==o?o:u.a),u.getRGBA()})(e),u=null==r?void 0:r(t),d=null==i?void 0:i(t),p=u||o||d,h=Gm(p),f=Wm(h?l:p,hf.TEXT,hf.DARK_MODE_TEXT)===Ef(hf.DARK_MODE_TEXT);const m=((e,t,n,r=hf.WHITE)=>e&&!Gm(e)?e:Gm(t)?n&&!Gm(n)?n:r:t)(c,p,l);return{color:p,headerColor:m,isDark:f}},Tg=(e,t,n,r)=>{const i=E(),o=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=w([]);return S((()=>{let n;return e&&(n=new MutationObserver((e=>{r(e)})),n.observe(e,t)),()=>{var e;null===(e=n)||void 0===e||e.disconnect()}}),[e,t]),n})(t.closest(Dg),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter((({oldValue:e})=>null==e?void 0:e.includes("background"))).map((({oldValue:e})=>e)).join(",");return b((()=>({...i,background:Og(e,i,t,n,r)})),[i.name(),t,n,r,e,o])};function Ng(e,t){const n=b((()=>({isLoading:!0})),t),[r,i]=x((async()=>{try{return await e()}finally{n.isLoading=!1}}),t);return[r,n.isLoading,i]}const qg=3;function Fg(e,t,n){let r=0,i=e.length;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=i;){const o=Math.floor((r+i)/2),a=e.slice(0,o),s=e.slice(0,o-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(o-1)||null;if(l===t)return e.slice(o)||null;l<t?r=o+1:i=o}return null}function jg({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i){const{maxNbrLinesOfText:o=qg}=null!=i?i:{},{estimateWidth:a,measureText:l,estimateLineCount:c}=s((()=>{const i=document.createElement("canvas").getContext("2d");i.font=`${n} ${r} ${e} ${t}`;const a=Om(i.measureText.bind(i)),s=e=>+a(e).width.toFixed(2),l=Om((({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;let r=0,i=e;do{r+=1,i=Fg(i,t,s)}while(null!==i&&r<o);return r}),(({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`));return{measureText:e=>a(e).width,estimateWidth:e=>a("N").width*e,estimateLineCount:l}}),[n,r,e,t,o]);return{estimateWidth:a,measureText:l,estimateLineCount:c}}var zg,Bg=F;zg=Bg.createRoot,Bg.hydrateRoot;const Wg="Source Sans Pro, sans-serif";function $g(e,t){const[n,r]=l(t),i=n.some(((e,n)=>e!==t[n]));i&&(r(t),e())}var Hg={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const Gg=({translator:e})=>(s((()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Hg).forEach((t=>{e.add(Hg[t])}))}}(e)}),[e]),e);function Vg(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Ug=Object.freeze({__proto__:null,default:Vg}),Yg="$$material";function Kg(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Xg(t){if(e.isValidElement(t)||!Kg(t))return t;const n={};return Object.keys(t).forEach((e=>{n[e]=Xg(t[e])})),n}function Jg(t,n,r={clone:!0}){const i=r.clone?dn({},t):t;return Kg(t)&&Kg(n)&&Object.keys(n).forEach((o=>{e.isValidElement(n[o])?i[o]=n[o]:Kg(n[o])&&Object.prototype.hasOwnProperty.call(t,o)&&Kg(t[o])?i[o]=Jg(t[o],n[o],r):r.clone?i[o]=Kg(n[o])?Xg(n[o]):n[o]:i[o]=n[o]})),i}var Zg=Object.freeze({__proto__:null,default:Jg,isPlainObject:Kg});const Qg=["values","unit","step"];function ey(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=bn(e,Qg),o=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>dn({},e,{[t.key]:t.val})),{})})(t),a=Object.keys(o);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-r/100}${n})`}return dn({keys:a,values:o,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},i)}var ty={borderRadius:4};function ny(e,t){return t?Jg(e,t,{clone:!1}):e}const ry={xs:0,sm:600,md:900,lg:1200,xl:1536},iy={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ry[e]}px)`};function oy(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||iy;return t.reduce(((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r)),{})}if("object"==typeof t){const e=r.breakpoints||iy;return Object.keys(t).reduce(((r,i)=>{if(-1!==Object.keys(e.values||ry).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r}),{})}return n(t)}function ay(e){if("string"!=typeof e)throw new Error(Vg(7));return e.charAt(0).toUpperCase()+e.slice(1)}var sy=Object.freeze({__proto__:null,default:ay});function ly(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function cy(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:ly(e,n)||r,t&&(i=t(i,r,e)),i}function uy(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=e=>{if(null==e[t])return null;const o=e[t],a=ly(e.theme,r)||{};return oy(e,o,(e=>{let r=cy(a,i,e);return e===r&&"string"==typeof e&&(r=cy(a,i,`${t}${"default"===e?"":ay(e)}`,e)),!1===n?r:{[n]:r}}))};return o.propTypes={},o.filterProps=[t],o}const dy={m:"margin",p:"padding"},py={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},hy={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fy=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!hy[e])return[e];e=hy[e]}const[t,n]=e.split(""),r=dy[t],i=py[n]||"";return Array.isArray(i)?i.map((e=>r+e)):[r+i]})),my=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],gy=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function yy(e,t,n,r){var i;const o=null!=(i=ly(e,t,!1))?i:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>{}}function by(e){return yy(e,"spacing",8)}function vy(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function xy(e,t,n,r){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=vy(t,n),e)),{})}(fy(n),r);return oy(e,e[n],i)}function wy(e,t){const n=by(e.theme);return Object.keys(e).map((r=>xy(e,t,r,n))).reduce(ny,{})}function Sy(e){return wy(e,my)}function Ey(e){return wy(e,gy)}function Cy(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?ny(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function _y(e){return"number"!=typeof e?e:`${e}px solid`}function My(e,t){return uy({prop:e,themeKey:"borders",transform:t})}Sy.propTypes={},Sy.filterProps=my,Ey.propTypes={},Ey.filterProps=gy;const ky=My("border",_y),Ry=My("borderTop",_y),Ay=My("borderRight",_y),Iy=My("borderBottom",_y),Ly=My("borderLeft",_y),Dy=My("borderColor"),Py=My("borderTopColor"),Oy=My("borderRightColor"),Ty=My("borderBottomColor"),Ny=My("borderLeftColor"),qy=My("outline",_y),Fy=My("outlineColor"),jy=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=yy(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:vy(t,e)});return oy(e,e.borderRadius,n)}return null};jy.propTypes={},jy.filterProps=["borderRadius"],Cy(ky,Ry,Ay,Iy,Ly,Dy,Py,Oy,Ty,Ny,jy,qy,Fy);const zy=e=>{if(void 0!==e.gap&&null!==e.gap){const t=yy(e.theme,"spacing",8),n=e=>({gap:vy(t,e)});return oy(e,e.gap,n)}return null};zy.propTypes={},zy.filterProps=["gap"];const By=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=yy(e.theme,"spacing",8),n=e=>({columnGap:vy(t,e)});return oy(e,e.columnGap,n)}return null};By.propTypes={},By.filterProps=["columnGap"];const Wy=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=yy(e.theme,"spacing",8),n=e=>({rowGap:vy(t,e)});return oy(e,e.rowGap,n)}return null};Wy.propTypes={},Wy.filterProps=["rowGap"];function $y(e,t){return"grey"===t?t:e}Cy(zy,By,Wy,uy({prop:"gridColumn"}),uy({prop:"gridRow"}),uy({prop:"gridAutoFlow"}),uy({prop:"gridAutoColumns"}),uy({prop:"gridAutoRows"}),uy({prop:"gridTemplateColumns"}),uy({prop:"gridTemplateRows"}),uy({prop:"gridTemplateAreas"}),uy({prop:"gridArea"}));function Hy(e){return e<=1&&0!==e?100*e+"%":e}Cy(uy({prop:"color",themeKey:"palette",transform:$y}),uy({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:$y}),uy({prop:"backgroundColor",themeKey:"palette",transform:$y}));const Gy=uy({prop:"width",transform:Hy}),Vy=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||ry[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Hy(t)}};return oy(e,e.maxWidth,t)}return null};Vy.filterProps=["maxWidth"];const Uy=uy({prop:"minWidth",transform:Hy}),Yy=uy({prop:"height",transform:Hy}),Ky=uy({prop:"maxHeight",transform:Hy}),Xy=uy({prop:"minHeight",transform:Hy});uy({prop:"size",cssProperty:"width",transform:Hy}),uy({prop:"size",cssProperty:"height",transform:Hy});Cy(Gy,Vy,Uy,Yy,Ky,Xy,uy({prop:"boxSizing"}));const Jy={border:{themeKey:"borders",transform:_y},borderTop:{themeKey:"borders",transform:_y},borderRight:{themeKey:"borders",transform:_y},borderBottom:{themeKey:"borders",transform:_y},borderLeft:{themeKey:"borders",transform:_y},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:_y},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:jy},color:{themeKey:"palette",transform:$y},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:$y},backgroundColor:{themeKey:"palette",transform:$y},p:{style:Ey},pt:{style:Ey},pr:{style:Ey},pb:{style:Ey},pl:{style:Ey},px:{style:Ey},py:{style:Ey},padding:{style:Ey},paddingTop:{style:Ey},paddingRight:{style:Ey},paddingBottom:{style:Ey},paddingLeft:{style:Ey},paddingX:{style:Ey},paddingY:{style:Ey},paddingInline:{style:Ey},paddingInlineStart:{style:Ey},paddingInlineEnd:{style:Ey},paddingBlock:{style:Ey},paddingBlockStart:{style:Ey},paddingBlockEnd:{style:Ey},m:{style:Sy},mt:{style:Sy},mr:{style:Sy},mb:{style:Sy},ml:{style:Sy},mx:{style:Sy},my:{style:Sy},margin:{style:Sy},marginTop:{style:Sy},marginRight:{style:Sy},marginBottom:{style:Sy},marginLeft:{style:Sy},marginX:{style:Sy},marginY:{style:Sy},marginInline:{style:Sy},marginInlineStart:{style:Sy},marginInlineEnd:{style:Sy},marginBlock:{style:Sy},marginBlockStart:{style:Sy},marginBlockEnd:{style:Sy},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:zy},rowGap:{style:Wy},columnGap:{style:By},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Hy},maxWidth:{style:Vy},minWidth:{transform:Hy},height:{transform:Hy},maxHeight:{transform:Hy},minHeight:{transform:Hy},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};var Zy=Jy;function Qy(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=ly(n,s)||{};if(c)return c(i);return oy(i,t,(t=>{let n=cy(u,l,t);return t===n&&"string"==typeof t&&(n=cy(u,l,`${e}${"default"===t?"":ay(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=null!=(r=o.unstable_sxConfig)?r:Zy;function s(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const i=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(o.breakpoints),s=Object.keys(i);let l=i;return Object.keys(r).forEach((n=>{const i=(s=r[n],c=o,"function"==typeof s?s(c):s);var s,c;if(null!=i)if("object"==typeof i)if(a[n])l=ny(l,e(n,i,o,a));else{const e=oy({theme:o},i,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,i)?l=ny(l,e):l[n]=t({sx:i,theme:o})}else l=ny(l,e(n,i,o,a))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(s,l)}return Array.isArray(i)?i.map(s):s(i)}}const eb=Qy();eb.filterProps=["sx"];var tb=eb;function nb(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}const rb=["breakpoints","palette","spacing","shape"];function ib(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=bn(e,rb),s=ey(n),l=function(e=8){if(e.mui)return e;const t=by({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(i);let c=Jg({breakpoints:s,direction:"ltr",components:{},palette:dn({mode:"light"},r),spacing:l,shape:dn({},ty,o)},a);return c.applyStyles=nb,c=t.reduce(((e,t)=>Jg(e,t)),c),c.unstable_sxConfig=dn({},Zy,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return tb({sx:e,theme:this})},c}var ob=Object.freeze({__proto__:null,default:ib,private_createBreakpoints:ey,unstable_applyStyles:nb});function ab(t=null){const n=e.useContext(Lo);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}const sb=ib();function lb(e=sb){return ab(e)}const cb=["sx"];function ub(e){const{sx:t}=e,n=bn(e,cb),{systemProps:r,otherProps:i}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:Zy;return Object.keys(e).forEach((t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r})(n);let o;return o=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return Kg(n)?dn({},r,n):r}:dn({},r,t),dn({},i,{sx:o})}var db=Object.freeze({__proto__:null,default:tb,extendSxProp:ub,unstable_createStyleFunctionSx:Qy,unstable_defaultSxConfig:Zy});const pb=e=>e;var hb=(()=>{let e=pb;return{configure(t){e=t},generate:t=>e(t),reset(){e=pb}}})();const fb=["className","component"];const mb={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function gb(e,t,n="Mui"){const r=mb[t];return r?`${n}-${r}`:`${hb.generate(e)}-${t}`}function yb(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=gb(e,t,n)})),r}const bb=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function vb(e){const t=`${e}`.match(bb);return t&&t[1]||""}function xb(e,t=""){return e.displayName||e.name||vb(e)||t}function wb(e,t,n){const r=xb(t);return e.displayName||(""!==r?`${n}(${r})`:n)}var Sb=Object.freeze({__proto__:null,default:function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return xb(e,"Component");if("object"==typeof e)switch(e.$$typeof){case fa.ForwardRef:return wb(e,e.render,"ForwardRef");case fa.Memo:return wb(e,e.type,"memo");default:return}}},getFunctionName:vb});function Eb(e,t){const n=dn({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=dn({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},o&&Object.keys(o)?i&&Object.keys(i)?(n[r]=dn({},o),Object.keys(i).forEach((e=>{n[r][e]=Eb(i[e],o[e])}))):n[r]=o:n[r]=i}else void 0===n[r]&&(n[r]=e[r])})),n}var Cb="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function _b(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}var Mb=Object.freeze({__proto__:null,default:_b});function kb(e){if(e.type)return e;if("#"===e.charAt(0))return kb(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Vg(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(Vg(10,r))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:r}}function Rb(e,t){return e=kb(e),t=function(e,t=0,n=1){return _b(e,t,n)}(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}(e)}function Ab(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}function Ib(e){return e&&e.ownerDocument||document}function Lb(e){return Ib(e).defaultView||window}function Db(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Pb(t){const n=e.useRef(t);return Cb((()=>{n.current=t})),e.useRef(((...e)=>(0,n.current)(...e))).current}function Ob(...t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{Db(t,e)}))}),t)}const Tb={};const Nb=[];class qb{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new qb}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function Fb(){const t=function(t,n){const r=e.useRef(Tb);return r.current===Tb&&(r.current=t(n)),r}(qb.create).current;return function(t){e.useEffect(t,Nb)}(t.disposeEffect),t}let jb=!0,zb=!1;const Bb=new qb,Wb={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function $b(e){e.metaKey||e.altKey||e.ctrlKey||(jb=!0)}function Hb(){jb=!1}function Gb(){"hidden"===this.visibilityState&&zb&&(jb=!0)}function Vb(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return jb||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!Wb[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Ub(){const t=e.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",$b,!0),t.addEventListener("mousedown",Hb,!0),t.addEventListener("pointerdown",Hb,!0),t.addEventListener("touchstart",Hb,!0),t.addEventListener("visibilitychange",Gb,!0))}),[]),n=e.useRef(!1);return{isFocusVisibleRef:n,onFocus:function(e){return!!Vb(e)&&(n.current=!0,!0)},onBlur:function(){return!!n.current&&(zb=!0,Bb.start(100,(()=>{zb=!1})),n.current=!1,!0)},ref:t}}function Yb(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function Kb(e,t,n=void 0){const r={};return Object.keys(e).forEach((i=>{r[i]=e[i].reduce(((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}function Xb(e){return"string"==typeof e}function Jb(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}function Zb(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}const Qb=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function ev(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=bn(e,Qb),s=o?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(r,i),{props:l,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Ma(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=dn({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=dn({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=Jb(dn({},i,r)),s=Zb(r),l=Zb(i),c=t(a),u=Ma(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=dn({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),p=dn({},c,n,l,s);return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}(dn({},a,{externalSlotProps:s})),u=function(e,t,n){return void 0===e||Xb(e)?t:dn({},t,{ownerState:dn({},t.ownerState,n)})}(n,dn({},l,{ref:Ob(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref)}),i);return u}function tv(t){var n;return parseInt(e.version,10)>=19?(null==t||null==(n=t.props)?void 0:n.ref)||null:(null==t?void 0:t.ref)||null}var nv=e.createContext(null);function rv(){return e.useContext(nv)}var iv="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function ov(t){const{children:n,theme:r}=t,i=rv(),o=e.useMemo((()=>{const e=null===i?r:function(e,t){if("function"==typeof t)return t(e);return dn({},e,t)}(i,r);return null!=e&&(e[iv]=null!==i),e}),[r,i]);return Ws.jsx(nv.Provider,{value:o,children:n})}const av=["value"],sv=e.createContext();function lv(e){let{value:t}=e,n=bn(e,av);return Ws.jsx(sv.Provider,dn({value:null==t||t},n))}const cv=e.createContext(void 0);function uv({value:e,children:t}){return Ws.jsx(cv.Provider,{value:e,children:t})}function dv({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Eb(i.defaultProps,r):i.styleOverrides||i.variants?r:Eb(i,r)}({props:t,name:n,theme:{components:e.useContext(cv)}})}const pv={};function hv(t,n,r,i=!1){return e.useMemo((()=>{const e=t&&n[t]||n;if("function"==typeof r){const o=r(e),a=t?dn({},n,{[t]:o}):o;return i?()=>a:a}return dn({},n,t?{[t]:r}:r)}),[t,n,r,i])}function fv(e){const{children:t,theme:n,themeId:r}=e,i=ab(pv),o=rv()||pv,a=hv(r,i,n),s=hv(r,o,n,!0),l="rtl"===a.direction;return Ws.jsx(ov,{theme:s,children:Ws.jsx(Lo.Provider,{value:a,children:Ws.jsx(lv,{value:l,children:Ws.jsx(uv,{value:null==a?void 0:a.components,children:t})})})})}var mv,gv={},yv={exports:{}};(mv=yv).exports=function(e){return e&&e.__esModule?e:{default:e}},mv.exports.__esModule=!0,mv.exports.default=mv.exports;var bv=yv.exports,vv=z(Ug),xv=z(Mb),wv=bv;Object.defineProperty(gv,"__esModule",{value:!0});var Sv=gv.alpha=Tv;gv.blend=function(e,t,n,r=1){const i=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),o=Iv(e),a=Iv(t),s=[i(o.values[0],a.values[0]),i(o.values[1],a.values[1]),i(o.values[2],a.values[2])];return Dv({type:"rgb",values:s})},gv.colorChannel=void 0;var Ev=gv.darken=Nv;gv.decomposeColor=Iv,gv.emphasize=Fv;var Cv=gv.getContrastRatio=function(e,t){const n=Ov(e),r=Ov(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)};gv.getLuminance=Ov,gv.hexToRgb=Av,gv.hslToRgb=Pv;var _v=gv.lighten=qv;gv.private_safeAlpha=function(e,t,n){try{return Tv(e,t)}catch(t){return e}},gv.private_safeColorChannel=void 0,gv.private_safeDarken=function(e,t,n){try{return Nv(e,t)}catch(t){return e}},gv.private_safeEmphasize=function(e,t,n){try{return Fv(e,t)}catch(t){return e}},gv.private_safeLighten=function(e,t,n){try{return qv(e,t)}catch(t){return e}},gv.recomposeColor=Dv,gv.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=Iv(e);return`#${t.map(((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e))).join("")}`};var Mv=wv(vv),kv=wv(xv);function Rv(e,t=0,n=1){return(0,kv.default)(e,t,n)}function Av(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}function Iv(e){if(e.type)return e;if("#"===e.charAt(0))return Iv(Av(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,Mv.default)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,Mv.default)(10,r))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:r}}const Lv=e=>{const t=Iv(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e)).join(" ")};gv.colorChannel=Lv;function Dv(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function Pv(e){e=Iv(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(e,t=(e+n/30)%12)=>i-o*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Dv({type:s,values:l})}function Ov(e){let t="hsl"===(e=Iv(e)).type||"hsla"===e.type?Iv(Pv(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Tv(e,t){return e=Iv(e),t=Rv(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Dv(e)}function Nv(e,t){if(e=Iv(e),t=Rv(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Dv(e)}function qv(e,t){if(e=Iv(e),t=Rv(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Dv(e)}function Fv(e,t=.15){return Ov(e)>.5?Nv(e,t):qv(e,t)}gv.private_safeColorChannel=(e,t)=>{try{return Lv(e)}catch(t){return e}};var jv={black:"#000",white:"#fff"};var zv={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var Bv={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var Wv={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var $v={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var Hv={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var Gv={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var Vv={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const Uv=["mode","contrastThreshold","tonalOffset"],Yv={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:jv.white,default:jv.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Kv={text:{primary:jv.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:jv.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Xv(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=_v(e.main,i):"dark"===t&&(e.dark=Ev(e.main,o)))}function Jv(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=bn(e,Uv),o=e.primary||function(e="light"){return"dark"===e?{main:Hv[200],light:Hv[50],dark:Hv[400]}:{main:Hv[700],light:Hv[400],dark:Hv[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:Bv[200],light:Bv[50],dark:Bv[400]}:{main:Bv[500],light:Bv[300],dark:Bv[700]}}(t),s=e.error||function(e="light"){return"dark"===e?{main:Wv[500],light:Wv[300],dark:Wv[700]}:{main:Wv[700],light:Wv[400],dark:Wv[800]}}(t),l=e.info||function(e="light"){return"dark"===e?{main:Gv[400],light:Gv[300],dark:Gv[700]}:{main:Gv[700],light:Gv[500],dark:Gv[900]}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Vv[400],light:Vv[300],dark:Vv[700]}:{main:Vv[800],light:Vv[500],dark:Vv[900]}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:$v[400],light:$v[300],dark:$v[700]}:{main:"#ed6c02",light:$v[500],dark:$v[900]}}(t);function d(e){return Cv(e,Kv.text.primary)>=n?Kv.text.primary:Yv.text.primary}const p=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:o=700})=>{if(!(e=dn({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(Vg(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(Vg(12,t?` (${t})`:"",JSON.stringify(e.main)));return Xv(e,"light",i,r),Xv(e,"dark",o,r),e.contrastText||(e.contrastText=d(e.main)),e},h={dark:Kv,light:Yv};return Jg(dn({common:dn({},jv),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:zv,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},h[t]),i)}const Zv=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Qv(e){return Math.round(1e5*e)/1e5}const ex={textTransform:"uppercase"},tx='"Roboto", "Helvetica", "Arial", sans-serif';function nx(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=tx,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,p=bn(n,Zv),h=i/14,f=d||(e=>e/c*h+"rem"),m=(e,t,n,i,o)=>dn({fontFamily:r,fontWeight:e,fontSize:f(t),lineHeight:n},r===tx?{letterSpacing:`${Qv(i/t)}em`}:{},o,u),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(s,14,1.75,.4,ex),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,ex),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Jg(dn({htmlFontSize:c,pxToRem:f,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),p,{clone:!1})}function rx(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var ix=["none",rx(0,2,1,-1,0,1,1,0,0,1,3,0),rx(0,3,1,-2,0,2,2,0,0,1,5,0),rx(0,3,3,-2,0,3,4,0,0,1,8,0),rx(0,2,4,-1,0,4,5,0,0,1,10,0),rx(0,3,5,-1,0,5,8,0,0,1,14,0),rx(0,3,5,-1,0,6,10,0,0,1,18,0),rx(0,4,5,-2,0,7,10,1,0,2,16,1),rx(0,5,5,-3,0,8,10,1,0,3,14,2),rx(0,5,6,-3,0,9,12,1,0,3,16,2),rx(0,6,6,-3,0,10,14,1,0,4,18,3),rx(0,6,7,-4,0,11,15,1,0,4,20,3),rx(0,7,8,-4,0,12,17,2,0,5,22,4),rx(0,7,8,-4,0,13,19,2,0,5,24,4),rx(0,7,9,-4,0,14,21,2,0,5,26,4),rx(0,8,9,-5,0,15,22,2,0,6,28,5),rx(0,8,10,-5,0,16,24,2,0,6,30,5),rx(0,8,11,-5,0,17,26,2,0,6,32,5),rx(0,9,11,-5,0,18,28,2,0,7,34,6),rx(0,9,12,-6,0,19,29,2,0,7,36,6),rx(0,10,13,-6,0,20,31,3,0,8,38,7),rx(0,10,13,-6,0,21,33,3,0,8,40,7),rx(0,10,14,-6,0,22,35,3,0,8,42,7),rx(0,11,14,-7,0,23,36,3,0,9,44,8),rx(0,11,15,-7,0,24,38,3,0,9,46,8)];const ox=["duration","easing","delay"],ax={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},sx={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function lx(e){return`${Math.round(e)}ms`}function cx(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function ux(e){const t=dn({},ax,e.easing),n=dn({},sx,e.duration);return dn({getAutoHeightDuration:cx,create:(e=["all"],r={})=>{const{duration:i=n.standard,easing:o=t.easeInOut,delay:a=0}=r;return bn(r,ox),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof i?i:lx(i)} ${o} ${"string"==typeof a?a:lx(a)}`)).join(",")}},e,{easing:t,duration:n})}var dx={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const px=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function hx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,a=bn(e,px);if(e.vars)throw new Error(Vg(18));const s=Jv(r),l=ib(e);let c=Jg(l,{mixins:(u=l.breakpoints,d=n,dn({toolbar:{minHeight:56,[u.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[u.up("sm")]:{minHeight:64}}},d)),palette:s,shadows:ix.slice(),typography:nx(s,o),transitions:ux(i),zIndex:dn({},dx)});var u,d;return c=Jg(c,a),c=t.reduce(((e,t)=>Jg(e,t)),c),c.unstable_sxConfig=dn({},Zy,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return tb({sx:e,theme:this})},c}var fx=hx();function mx(){const e=lb(fx);return e[Yg]||e}var gx,yx={},bx={exports:{}};var vx,xx={exports:{}};var wx=z(Uo),Sx=z(Zg),Ex=z(sy),Cx=z(Sb),_x=z(ob),Mx=z(db),kx=bv;Object.defineProperty(yx,"__esModule",{value:!0});var Rx=yx.default=function(e={}){const{themeId:t,defaultTheme:n=zx,rootShouldForwardProp:r=jx,slotShouldForwardProp:i=jx}=e,o=e=>(0,Ox.default)((0,Ax.default)({},e,{theme:Wx((0,Ax.default)({},e,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(e,a={})=>{(0,Lx.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:s,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=$x(Bx(l))}=a,p=(0,Ix.default)(a,qx),h=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,f=u||!1;let m=jx;"Root"===l||"root"===l?m=r:l?m=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const g=(0,Lx.default)(e,(0,Ax.default)({shouldForwardProp:m,label:undefined},p)),y=e=>"function"==typeof e&&e.__emotion_real!==e||(0,Dx.isPlainObject)(e)?r=>Hx(e,(0,Ax.default)({},r,{theme:Wx({theme:r.theme,defaultTheme:n,themeId:t})})):e,b=(r,...i)=>{let a=y(r);const l=i?i.map(y):[];s&&d&&l.push((e=>{const r=Wx((0,Ax.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const i=r.components[s].styleOverrides,o={};return Object.entries(i).forEach((([t,n])=>{o[t]=Hx(n,(0,Ax.default)({},e,{theme:r}))})),d(e,o)})),s&&!h&&l.push((e=>{var r;const i=Wx((0,Ax.default)({},e,{defaultTheme:n,themeId:t}));return Hx({variants:null==i||null==(r=i.components)||null==(r=r[s])?void 0:r.variants},(0,Ax.default)({},e,{theme:i}))})),f||l.push(o);const c=l.length-i.length;if(Array.isArray(r)&&c>0){const e=new Array(c).fill("");a=[...r,...e],a.raw=[...r.raw,...e]}const u=g(a,...l);return e.muiName&&(u.muiName=e.muiName),u};return g.withConfig&&(b.withConfig=g.withConfig),b}};yx.shouldForwardProp=jx,yx.systemDefaultTheme=void 0;var Ax=kx((gx||(gx=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(bx)),bx.exports)),Ix=kx((vx||(vx=1,function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}(xx)),xx.exports)),Lx=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=Fx(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(wx),Dx=Sx;kx(Ex),kx(Cx);var Px=kx(_x),Ox=kx(Mx);const Tx=["ownerState"],Nx=["variants"],qx=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Fx(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Fx=function(e){return e?n:t})(e)}function jx(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const zx=yx.systemDefaultTheme=(0,Px.default)(),Bx=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function Wx({defaultTheme:e,theme:t,themeId:n}){return r=t,0===Object.keys(r).length?e:t[n]||t;var r}function $x(e){return e?(t,n)=>n[e]:null}function Hx(e,t){let{ownerState:n}=t,r=(0,Ix.default)(t,Tx);const i="function"==typeof e?e((0,Ax.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap((e=>Hx(e,(0,Ax.default)({ownerState:n},r))));if(i&&"object"==typeof i&&Array.isArray(i.variants)){const{variants:e=[]}=i;let t=(0,Ix.default)(i,Nx);return e.forEach((e=>{let i=!0;"function"==typeof e.props?i=e.props((0,Ax.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,Ax.default)({ownerState:n},r,n)):e.style))})),t}return i}var Gx=e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e;var Vx=Rx({themeId:Yg,defaultTheme:fx,rootShouldForwardProp:Gx});const Ux=["theme"];function Yx(e){let{theme:t}=e,n=bn(e,Ux);const r=t[Yg];return Ws.jsx(fv,dn({},n,{themeId:r?Yg:void 0,theme:r||t}))}var Kx=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};const Xx={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Jx={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Zx=cc("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Xx},"&::-moz-range-track":{...Xx},"&::-ms-track":{...Xx},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Jx},"&::-moz-range-thumb":{...Jx},"&::-ms-thumb":{...Jx},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}}))),Qx=({columnWidth:e,keyValue:n,isLastColumn:r,isPivot:i,hoverColor:o,updateWidthCallback:a,confirmWidthCallback:s,handleBlur:l,setIsAdjustingWidth:u,isLeftColumn:d,accessibilityRelatedArgs:p,direction:h})=>{const f=Gg({translator:p.translator}),m=c({initWidth:e,columnWidth:e,initX:0}),g=r?0:1,y=i&&!d,b={left:"rtl"===h?"0px":y?m.current.columnWidth-g:"100%",right:"rtl"===h?"100%":"0px"},v=t=>{m.current={initWidth:e,columnWidth:e,initX:null!=t?t:m.current.initX}};$g((()=>{y&&v()}),[e]);const x=e=>{const t=Math.max(e,Xt.PixelsMin);m.current.columnWidth=t,a(t)},w=()=>{if(m.current.columnWidth!==m.current.initWidth){const e={type:Jt.Pixels,pixels:m.current.columnWidth};s(e)}else null==u||u(!1)},S=e=>{const t="rtl"===h?m.current.initWidth+m.current.initX-e.clientX:m.current.initWidth+e.clientX-m.current.initX;x(t)},E=e=>{Um(e),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",E),w()},C=e=>{const t="rtl"===h?m.current.initWidth+-m.current.initX-e.touches[0].clientX:m.current.initWidth+e.touches[0].clientX-m.current.initX;x(t)},_=e=>{Um(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",_),w()},M=!i&&l?e=>{if(e.key===Yt.Left||e.key===Yt.Right){Um(e);const t=5,n=e.key===Yt.Left?-t:t;x(m.current.columnWidth+n)}else e.key===Yt.Space||e.key===Yt.Enter?(Um(e),l(e),w()):e.key===Yt.Esc&&(Um(e),l(e),x(m.current.initWidth))}:void 0,k=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(p.columnLabel)]);return t.createElement(Zx,{style:b,key:n,hoverColor:o,isLastColumn:r,className:Kt,"data-testid":Kt,onMouseDown:e=>{Um(e),document.addEventListener("mousemove",S),document.addEventListener("mouseup",E),null==u||u(!0),v(e.clientX)},onDoubleClick:()=>{s({type:Jt.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(Um(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",_),null==u||u(!0),v(e.touches[0].clientX))},onKeyDown:M,onBlur:l,onFocus:()=>{v()},type:"range",tabIndex:"-1",max:Xt.PixelsMax,"aria-label":k,"aria-valuemin":Xt.PixelsMin,"aria-valuemax":Xt.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:h})};function ew(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const tw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ew(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})),nw=u(tw);function rw(){return rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rw.apply(null,arguments)}const iw=cc(Od,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e})((({rightAligned:e,shouldShowMenuIcon:t})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:24,display:t?"flex":"none",fontWeight:"bold",width:"100%",alignItems:"center",justifyContent:"center"}))),ow=cc(nw,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),aw=cc(mh)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),sw=cc(ip)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),lw=cc(wh)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),cw=cc(wh,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})((({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden ",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"}))),uw=cc("div")((({theme:e})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),dw=cc("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),pw=cc(Tu)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),hw=cc(jp)((({theme:e})=>({width:16,minWidth:"unset !important",marginRight:e.spacing(1.5),lineHeight:0})));function fw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})),gw=u(mw);let yw={};const bw=({autoFocus:e,id:n,onClick:r,itemTitle:i,icon:o,enabled:a,subMenus:s,isSubMenu:u,isActive:p,handleHeadCellMenuKeyDown:h})=>{const[f,m]=l(!1),g=c(null),y=d((e=>{e.stopPropagation(),m(!1)}),[m]);return t.createElement(t.Fragment,null,t.createElement(cw,{ref:s?g:null,key:n,"data-testid":`menu-item-${n}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),yw={}),null!=s&&s.length&&(m(!0),yw[i]=m))},disabled:!a,autoFocus:e,isSubMenu:!!u,isActive:!!p,onKeyDown:h},p?t.createElement(uw,null):null,t.createElement(dw,null,t.createElement(hw,null,t.createElement(o,null)),t.createElement(pw,{variant:"body2"},i)),null!=s&&s.length?t.createElement(gw,null):null),null!=s&&s.length?t.createElement(ww,{isSubMenu:!0,open:f,anchorEl:g.current,onClose:y,menuGroups:(b=s,v=yw,b.map((e=>e.map((e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map((({onClick:e,...t})=>({...t,...e?{onClick:async t=>{Object.entries(v).forEach((([,e])=>{e(!1)})),await e(t)}}:{}})))})))))),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},handleHeadCellMenuKeyDown:h}):null);var b,v},vw=({menuGroup:e,isSubMenu:n,handleHeadCellMenuKeyDown:r})=>e.map((e=>[[e.groupHeading&&t.createElement(lw,{key:e.groupHeading,disabled:!0,style:{opacity:1}},e.groupHeading),e.items.map((e=>t.createElement(bw,rw({key:e.id},e,{isSubMenu:n,handleHeadCellMenuKeyDown:r}))))].filter(Boolean)])),xw={appear:200,enter:200,exit:100},ww=({anchorEl:e,open:n,onClose:r,menuGroups:i,transformOrigin:o,anchorOrigin:a,isSubMenu:s,handleHeadCellMenuKeyDown:l})=>i.length?t.createElement(aw,rw({className:"nebula-table-utils-head-menu",open:n,anchorEl:e,onClose:r,transitionDuration:xw,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"}},a?{anchorOrigin:a}:{},o?{transformOrigin:o}:{}),(({itemGroups:e,isSubMenu:n,handleHeadCellMenuKeyDown:r})=>e.map(((i,o)=>[vw({menuGroup:i,isSubMenu:n,handleHeadCellMenuKeyDown:r}),o<e.length-1?t.createElement(sw,{"data-testid":"group-divider",variant:"middle"}):void 0])))({itemGroups:i,isSubMenu:s,handleHeadCellMenuKeyDown:l})):null,Sw=(e,t)=>e.some((e=>t[e]>0)),Ew={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},Cw=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=l(null),[a,s]=l(Ew);return $g((()=>{e||(s(Ew),o(null))}),[e]),p((()=>{if(null==r||!r.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{var e,c,u;const d=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),p=await r.createSessionObject(d),h=await p.getLayout(),{qStateCounts:f}=null!==(e=null===(c=h.qListObject)||void 0===c?void 0:c.qDimensionInfo)&&void 0!==e?e:{};i=null===(u=h.qInfo)||void 0===u?void 0:u.qId,a?l():(o(p),f&&s((e=>({canSelectAll:Sw(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:Sw(["qSelected"],e),canSelectPossible:Sw(["qOption"],e),canSelectAlternative:Sw(["qAlternative"],e),canSelectExcluded:Sw(["qAlternative","qExcluded"],e)}))(f)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}};function _w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Mw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_w(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})),kw=u(Mw);function Rw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Aw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Rw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})),Iw=u(Aw);function Lw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Lw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})),Pw=u(Dw);function Ow(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Tw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ow(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})),Nw=u(Tw);function qw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){qw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.454.858v6.484a1 1 0 0 1-.576.906L8.5 14.663V7.17z"})),jw=u(Fw);function zw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Bw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){zw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})),Ww=u(Bw);function $w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Hw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$w(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})),Gw=u(Hw);function Vw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Uw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Vw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})),Yw=u(Uw);function Kw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Kw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})),Jw=u(Xw);function Zw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qw=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Zw(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})),eS=u(Qw);function tS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){tS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})),rS=u(nS);function iS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){iS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})),aS=u(oS);function sS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const lS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})),cS=u(lS);function uS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){uS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})),pS=u(dS);let hS=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const fS="/qListObjectDef",mS=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,setFocusOnColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const h=[];if(n[hS.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);h.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(null==i?void 0:i(e,"A")),r(!1)},icon:kw,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(null==i?void 0:i(e,"D")),r(!1)},icon:Nw,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:Yw,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:jw,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&h.push(...t)}if(e.isDim&&null!=o&&o.select){const e=[];n[hS.Searching]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:Jw,enabled:!0}]}]),n[hS.Selections]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:pS,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectAll(fS))},icon:eS,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectPossible(fS))},icon:cS,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectAlternative(fS))},icon:rS,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.selectListObjectExcluded(fS))},icon:aS,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(null==s?void 0:s.clearSelections(fS))},icon:Iw,enabled:l.canClearSelections}]}]]}]}]),p&&h.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:Gw,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:Ww,enabled:!0}]}]),e.length>0&&h.push(...e)}return n[hS.AdjusterHeaderSize]&&h.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),null==u||u(c)},icon:Pw,enabled:!0}]}]),h},gS=({open:e,setOpen:n,anchorRef:r,headerData:i,translator:o,interactions:a,handleHeadCellMenuKeyDown:s,menuAvailabilityFlags:l,shouldShowMenuIcon:c=!0,sortRelatedArgs:u,searchRelatedArgs:p,selectionRelatedArgs:h,adjustHeaderSizeRelatedArgs:f,expandOrCollapseArgs:m,env:g,model:y,direction:b="ltr"})=>{var v;const x=Gg({translator:o}),{qLibraryId:w,fieldId:S,headTextAlign:E}=i,C=null==h?void 0:h.app,{fieldInstance:_,selectionActionsEnabledStatus:M}=Cw({open:e,headerData:i,app:C,qStateName:null==h?void 0:h.qStateName});let k=null;if(g.flags.isEnabled("CLIENT_IM_7107_TABLE_MENU_CYCLIC_DIM")&&y&&"setActiveField"in y&&void 0!==i.dimensionInfoIndex){const e=i.dimensionInfoIndex;k=async t=>{try{await y.setActiveField("/qHyperCubeDef",e,t)}catch(e){console.error(e)}}}const R=d((()=>{const e=w?{qLibraryId:w,type:"dimension"}:S;if(null!=p&&p.embed){const{embed:t,listboxRef:n}=p;t.__DO_NOT_USE__.popover(n.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"rtl"===b?"right":"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===b?"right":"left"},sortCriteria:p.sortCriteria,stateName:null==h?void 0:h.qStateName})}}),[w,S,p,null==h?void 0:h.qStateName,b]),A=d((e=>{e.stopPropagation(),n(!1)}),[n]);return a.active?t.createElement(iw,{rightAligned:"right"===E,shouldShowMenuIcon:c,className:"nebula-table-utils-head-menu-wrapper"},c?t.createElement(ow,{height:Gt,className:Vt,"data-testid":Vt,isInteractionsActive:null!==(v=a.active)&&void 0!==v&&v},t.createElement(nw,null)):null,t.createElement(ww,{open:e,anchorEl:r.current,onClose:A,menuGroups:mS({headerData:i,translator:x,menuAvailabilityFlags:l,setOpen:n,...u,embedListbox:R,interactions:a,fieldInstance:_,selectionActionsEnabledStatus:M,anchorRef:r,setFocusOnColumnAdjuster:null==f?void 0:f.setFocusOnColumnAdjuster,setActiveFieldCallback:k,expandOrCollapseArgs:m}),handleHeadCellMenuKeyDown:s})):null},yS=e=>e.isDark?{background:e.color,borderColor:hf.DARK_MODE_BORDER,color:hf.DARK_MODE_TEXT,disabledColor:hf.DARK_MODE_DISABLED,iconColor:hf.DARK_MODE_TEXT}:{background:e.color,borderColor:hf.BORDER_MEDIUM,color:hf.TEXT,disabledColor:hf.DISABLED},bS=cc(Od,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),vS=cc(af,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),xS=cc(Gd,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)}))),wS=cc(Tu)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),SS=({children:e,footerContainer:n,interactions:r,theme:i,paginationNeeded:o=!0})=>{const a=s((()=>yS(i.background)),[i]);if(!r.active)return null;const l=o?t.createElement(bS,{footerStyle:a},e):null;return n?F.createPortal(e,n):l},ES=h({}),CS=()=>n(ES),_S=({children:e,direction:n,pageInfo:r,handleChangeRowsPerPage:i,footerContainer:o,isSelectionMode:a,handleChangePage:l,totalRowCount:c,totalColumnCount:u,totalPages:d,keyboard:p,translator:h,theme:f,interactions:m,rect:g,layout:y})=>{const b=(e=>!e.enabled||e.active)(p)?0:-1,v=s((()=>yS(f.background)),[f]),x=o?o.getBoundingClientRect().width:g.width,w=Gg({translator:h}),S=s((()=>({direction:n,pageInfo:r,handleChangeRowsPerPage:i,footerContainer:o,isSelectionMode:a,handleChangePage:l,totalRowCount:c,totalColumnCount:u,totalPages:d,keyboard:p,translator:w,theme:f,interactions:m,rect:g,layout:y,footerStyle:v,tabIndex:b,width:x})),[n,r,i,o,a,l,c,u,d,p,w,f,m,g,y,v,b,x]);return t.createElement(ES.Provider,{value:S},e)};let MS=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),kS=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});function RS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const AS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){RS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})),IS=u(AS);function LS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const DS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){LS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})),PS=u(DS);function OS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const TS=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){OS(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})),NS=u(TS),qS={FirstPage:PS,PreviousPage:IS,NextPage:gw,LastPage:NS,FirstPageRTL:NS,PreviousPageRTL:gw,NextPageRTL:IS,LastPageRTL:PS},FS=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=CS(),c=qS[`${n}${"rtl"===r?"RTL":""}`];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?null:()=>{o(t)}},IconComponent:c}},jS=()=>{const{pageInfo:e,width:n}=CS(),r=0===e.page,{IconComponent:i,styledProps:o}=FS({type:MS.FirstPage,disabledCondition:r,pageNumber:0});return n<=kS.FirstPage?null:t.createElement(xS,o,t.createElement(i,{height:Gt}))},zS=(e,t,n=!1)=>{n&&e.key===Yt.Tab&&!e.shiftKey&&(Um(e),((e,t,n)=>{var r,i,o,a;const s=null!==(r=null===(i=e.closest(".qv-object-wrapper"))||void 0===i||null===(i=i.querySelector(".sel-toolbar-confirm"))||void 0===i?void 0:i.parentElement)&&void 0!==r?r:null===(o=document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm"))||void 0===o?void 0:o.parentElement;s?s.focus():null===(a=t.focusSelection)||void 0===a||a.call(t,n)})(e.target,t,!1))},BS=()=>{const{pageInfo:e,keyboard:n,totalPages:r,isSelectionMode:i,width:o}=CS(),a=e.page>=r-1,{IconComponent:s,styledProps:l}=FS({type:MS.LastPage,disabledCondition:a,pageNumber:r-1}),c=n.enabled?e=>{zS(e,n,i)}:null;return o<=kS.LastPage?null:t.createElement(xS,rw({},l,{onKeyDown:c}),t.createElement(s,{height:Gt}))},WS=()=>{const{pageInfo:e,keyboard:n,totalPages:r,isSelectionMode:i,width:o}=CS(),a=e.page>=r-1,{IconComponent:s,styledProps:l}=FS({type:MS.NextPage,disabledCondition:a,pageNumber:e.page+1}),c=!(o>kS.FirstPage&&o>kS.LastPage)&&n.enabled?e=>{zS(e,n,i)}:null;return t.createElement(xS,rw({},l,{onKeyDown:c}),t.createElement(s,{height:Gt}))},$S=()=>{const{pageInfo:e}=CS(),n=0===e.page,{IconComponent:r,styledProps:i}=FS({type:MS.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return t.createElement(xS,i,t.createElement(r,{height:Gt}))},HS=()=>{const{translator:e,width:n,pageInfo:r,totalRowCount:i}=CS(),{page:o,rowsPerPage:a}=r;if(n<=kS.DisplayedRowsLabel)return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,i)}`,i.toString()]);return t.createElement(wS,{variant:"caption"},s)},GS=({name:e,value:n,options:r,handleChange:i})=>{const{layout:o,footerStyle:a,translator:s,tabIndex:l}=CS(),c=o.qInfo.qId,u=s.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,h={tabIndex:l,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return t.createElement(t.Fragment,null,t.createElement(wS,{variant:"caption",id:p},u,":"),t.createElement(vS,{footerStyle:a,size:"small",native:!0,value:n,onChange:i,inputProps:h},r))},VS=()=>{var e;const{pageInfo:n,isSelectionMode:r,totalColumnCount:i,width:o,handleChangeRowsPerPage:a}=CS();if(!(!(null===(e=n.rowsPerPageOptions)||void 0===e||!e.length)&&!r&&o>kS.RowsPerPage&&i<=100)||void 0===n.rowsPerPageOptions)return null;const s=t.createElement(t.Fragment,null,n.rowsPerPageOptions.map((e=>t.createElement("option",{key:e,value:e},e))));return t.createElement(GS,{name:"RowsPerPage",value:n.rowsPerPage,options:s,handleChange:e=>{null==a||a(+e.target.value)}})},US=1e3,YS="…",KS=({totalPages:e,page:n})=>{const r=Math.min(e,US),i=r<e&&n>500,o=i?Math.min(500+n,e):r,a=i?Math.max(0,o-US):0,s=Array.from(Array(r).keys()).map((e=>{const n=e+a;return t.createElement("option",{key:n,value:n},n+1)}));return a>0&&s.unshift(t.createElement("option",{key:"startMoreOptions",value:YS,disabled:!0},YS)),o<e-1&&s.push(t.createElement("option",{key:"endMoreOptions",value:YS,disabled:!0},YS)),t.createElement(t.Fragment,null,s)},XS=()=>{const{pageInfo:e,width:n,totalPages:r,handleChangePage:i}=CS(),{page:o}=e;if(n<=kS.SelectPage)return null;const a=t.createElement(KS,{totalPages:r,page:o});return t.createElement(GS,{name:"SelectPage",value:o,options:a,handleChange:e=>{i(+e.target.value)}})};var JS=f((e=>t.createElement(_S,e,t.createElement(VS,null),t.createElement(XS,null),t.createElement(HS,null),t.createElement(jS,null),t.createElement($S,null),t.createElement(WS,null),t.createElement(BS,null))));const ZS=e=>t.createElement(SS,e,t.createElement(JS,e)),QS=h({}),eE=()=>n(QS),tE=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,children:i})=>{const o=s((()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r})),[e,t,n,r]);return Ws.jsx(QS.Provider,{value:o,children:i})},nE=h({}),rE=()=>n(nE),iE=({app:e,model:t,theme:n,embed:r,keyboard:i,translator:o,interactions:a,env:l,children:c})=>{const u=s((()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:i,env:l,translator:o})),[e,a,t,r,n,i,l,o]);return Ws.jsx(nE.Provider,{value:u,children:c})},oE=h({}),aE=()=>n(oE),sE=({children:e,...t})=>Ws.jsx(oE.Provider,{value:t,children:e}),lE=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:i,height:o}=(()=>{var e;const{theme:t,translator:n}=rE(),{layoutService:r}=aE(),i=null!==(e=t.getStyle("","","fontFamily"))&&void 0!==e?e:rg;return r.hasData?r.hasLimitedData?{text:n.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:i,alignItems:"center",height:"22px"}:{}:{text:n.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:i,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:Ws.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:i,width:"100%",height:o},children:Ws.jsx("span",{style:{...pg,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},cE="/qHyperCubeDef",uE=-1,dE="PSEUDO-DIM",pE=[];for(let e=0;e<256;++e)pE.push((e+256).toString(16).slice(1));let hE;const fE=new Uint8Array(16);function mE(){if(!hE){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hE=crypto.getRandomValues.bind(crypto)}return hE(fE)}var gE={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function yE(e,t,n){if(gE.randomUUID&&!t&&!e)return gE.randomUUID();const r=(e=e||{}).random||(e.rng||mE)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(pE[e[t+0]]+pE[e[t+1]]+pE[e[t+2]]+pE[e[t+3]]+"-"+pE[e[t+4]]+pE[e[t+5]]+"-"+pE[e[t+6]]+pE[e[t+7]]+"-"+pE[e[t+8]]+pE[e[t+9]]+"-"+pE[e[t+10]]+pE[e[t+11]]+pE[e[t+12]]+pE[e[t+13]]+pE[e[t+14]]+pE[e[t+15]]).toLowerCase()}(r)}const bE=()=>{var e,t,n;return null!==(e=null===(t=crypto)||void 0===t||null===(n=t.randomUUID)||void 0===n?void 0:n.call(t))&&void 0!==e?e:yE()},vE=e=>e===uE?dE:(({qLibraryId:e,cId:t})=>{var n;return null!==(n=null!=e?e:t)&&void 0!==n?n:bE()})(e),xE=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===uE?n.columnWidthLocation=Bt.Measures:n.isLeftDimension?n.columnWidthLocation=Bt.Dimension:t.at(-1)===uE?n.columnWidthLocation=Bt.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=Bt.Pivot))},wE=(e,t,n,r)=>{var i;const o=vE(n),a=e.getDimensionInfoIndex(n),s=e.isLeftDimension(a);return n===uE?{id:o,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:Bt.Measures,isPivot:!0}:{id:o,colIdx:0,label:n.qFallbackTitle,qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:null!==(i=n.qLocked)&&void 0!==i&&i,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===en.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:Bt.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure}},SE=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})=>{let i=r;var o;n.length>0&&(i=(o=r).at(-1)===uE?o.slice(0,-1):o);const a=i.length+(n.length?1:0),s=Math.max(1,n.length),l=((e,t)=>Array(e).fill(null).map((()=>Array.from({length:t},(()=>null)))))(a,s);return n.forEach(((n,r,i)=>{const o=r===i.length-1;l[a-1][r]=wE(e,t,n,o)})),i.forEach(((n,r,i)=>{const o=r===i.length-1;l[r][s-1]=wE(e,t,n,o)})),l},EE=(e,t,n,r)=>{var i,o;const a=((e,t,n,r)=>{let i;var o;return i=0===n.length||n.includes(uE)?SE({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n}):(e=>e[0].map(((t,n)=>e.map((e=>e[n])))))(SE({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})),e.isIndentModeEnabled&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&(null===(o=i.at(-1))||void 0===o||o.forEach(((t,n)=>{if(Array.isArray(t)){const n=t;for(let t=0;t<n.length;t++)xE({layoutService:e,visibleLeftDimensionInfos:r,cell:n[t],colIdx:t})}else xE({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}))),i})(e,t,n,r);return{data:a,size:{x:null!==(i=null===(o=a[0])||void 0===o?void 0:o.length)&&void 0!==i?i:0,y:a.length}}};function CE(e){return CE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CE(e)}function _E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ME(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(i=r.key,o=void 0,o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"==typeof o?o:String(o)),r)}var i,o}function kE(e,t,n){return t&&ME(e.prototype,t),n&&ME(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IE(e,t)}function AE(e){return AE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},AE(e)}function IE(e,t){return IE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},IE(e,t)}function LE(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function DE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=AE(e);if(t){var i=AE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LE(this,n)}}function PE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return OE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function OE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var TE={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var n,r=e.indexOf("="),i="",o=!1;-1===r?n=e:(n=e.slice(0,r),i=e.slice(r+1),o=!0),t.push(function(e,t,n){return{key:NE(e),value:NE(t),useEqualSign:n}}(n,i,o))}})),t}};function NE(e){try{return decodeURIComponent(e)}catch(t){return e}}function qE(e){if(!(this instanceof qE))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:function(){return TE.fromSearchString(t.search)}}})}function FE(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}qE.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},qE.encodeSearchParams=function(e){for(var t,n="",r=0;r<e.length;r++)n+=0===r?"?":"&",n+=FE((t=e[r]).key),t.value?n+="=".concat(FE(t.value)):n+=t.useEqualSign?"=":"";return n};var jE,zE=function(){function e(t){_E(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}return kE(e,[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}]),e}(),BE=function(){function e(){_E(this,e)}return kE(e,[{key:"decode",value:function(e){for(var t,n="",r=new zE(e);r.hasNext();)n+=null!=(t=this.decodeCharacter(r))?t:r.next();return n}},{key:"decodeCharacter",value:function(e){return e.next()}}]),e}(),WE=function(e){return e>=0&&e<=1114111},$E=function(e){return e.match(/[\s]/)},HE=function(){RE(t,BE);var e=DE(t);function t(){return _E(this,t),e.apply(this,arguments)}return kE(t,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,i=e.next();if(null==i||"\\"!==i)return e.reset(),null;var o=e.next();if(null==o)return e.reset(),null;switch(o){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(o,16))return o;for(t=o,n=0;n<5&&(null!=(r=e.next())&&!$E(r));n++){if("NaN"===parseInt(r,16)){e.pushback(r);break}t+=r}var a=parseInt(t,16);return WE(a)?String.fromCharCode(a):"�"}}]),t}(),GE=function(){function e(t,n){_E(this,e),this._key=t,this._value=n}return kE(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}}]),e}(),VE=function(){function e(){_E(this,e)}return kE(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,n,r){var i,o;if(t.length===n)return o=this._value,this.setValue(r),o;var a=t.charAt(n);return this._nextMap?(i=this._nextMap[a])||(i=new e,this._nextMap[a]=i):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return GE.newInstanceIfNeeded(e,this._value);var n=this.getNextNode(e.charAt(t));if(!n)return GE.newInstanceIfNeeded(e,t,this._value);var r=n.getLongestMatch(e,t+1);return r||GE.newInstanceIfNeeded(e,t,this._value)}}]),e}(),UE=function(){function e(){_E(this,e),this.clear()}return kE(e,[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new VE);var n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}]),e}(),YE=function(){var e,t,n,r=[],i=[],o=new UE;for(e in r["&quot"]="34",r["&amp"]="38",r["&lt"]="60",r["&gt"]="62",r["&nbsp"]="160",r["&iexcl"]="161",r["&cent"]="162",r["&pound"]="163",r["&curren"]="164",r["&yen"]="165",r["&brvbar"]="166",r["&sect"]="167",r["&uml"]="168",r["&copy"]="169",r["&ordf"]="170",r["&laquo"]="171",r["&not"]="172",r["&shy"]="173",r["&reg"]="174",r["&macr"]="175",r["&deg"]="176",r["&plusmn"]="177",r["&sup2"]="178",r["&sup3"]="179",r["&acute"]="180",r["&micro"]="181",r["&para"]="182",r["&middot"]="183",r["&cedil"]="184",r["&sup1"]="185",r["&ordm"]="186",r["&raquo"]="187",r["&frac14"]="188",r["&frac12"]="189",r["&frac34"]="190",r["&iquest"]="191",r["&Agrave"]="192",r["&Aacute"]="193",r["&Acirc"]="194",r["&Atilde"]="195",r["&Auml"]="196",r["&Aring"]="197",r["&AElig"]="198",r["&Ccedil"]="199",r["&Egrave"]="200",r["&Eacute"]="201",r["&Ecirc"]="202",r["&Euml"]="203",r["&Igrave"]="204",r["&Iacute"]="205",r["&Icirc"]="206",r["&Iuml"]="207",r["&ETH"]="208",r["&Ntilde"]="209",r["&Ograve"]="210",r["&Oacute"]="211",r["&Ocirc"]="212",r["&Otilde"]="213",r["&Ouml"]="214",r["&times"]="215",r["&Oslash"]="216",r["&Ugrave"]="217",r["&Uacute"]="218",r["&Ucirc"]="219",r["&Uuml"]="220",r["&Yacute"]="221",r["&THORN"]="222",r["&szlig"]="223",r["&agrave"]="224",r["&aacute"]="225",r["&acirc"]="226",r["&atilde"]="227",r["&auml"]="228",r["&aring"]="229",r["&aelig"]="230",r["&ccedil"]="231",r["&egrave"]="232",r["&eacute"]="233",r["&ecirc"]="234",r["&euml"]="235",r["&igrave"]="236",r["&iacute"]="237",r["&icirc"]="238",r["&iuml"]="239",r["&eth"]="240",r["&ntilde"]="241",r["&ograve"]="242",r["&oacute"]="243",r["&ocirc"]="244",r["&otilde"]="245",r["&ouml"]="246",r["&divide"]="247",r["&oslash"]="248",r["&ugrave"]="249",r["&uacute"]="250",r["&ucirc"]="251",r["&uuml"]="252",r["&yacute"]="253",r["&thorn"]="254",r["&yuml"]="255",r["&OElig"]="338",r["&oelig"]="339",r["&Scaron"]="352",r["&scaron"]="353",r["&Yuml"]="376",r["&fnof"]="402",r["&circ"]="710",r["&tilde"]="732",r["&Alpha"]="913",r["&Beta"]="914",r["&Gamma"]="915",r["&Delta"]="916",r["&Epsilon"]="917",r["&Zeta"]="918",r["&Eta"]="919",r["&Theta"]="920",r["&Iota"]="921",r["&Kappa"]="922",r["&Lambda"]="923",r["&Mu"]="924",r["&Nu"]="925",r["&Xi"]="926",r["&Omicron"]="927",r["&Pi"]="928",r["&Rho"]="929",r["&Sigma"]="931",r["&Tau"]="932",r["&Upsilon"]="933",r["&Phi"]="934",r["&Chi"]="935",r["&Psi"]="936",r["&Omega"]="937",r["&alpha"]="945",r["&beta"]="946",r["&gamma"]="947",r["&delta"]="948",r["&epsilon"]="949",r["&zeta"]="950",r["&eta"]="951",r["&theta"]="952",r["&iota"]="953",r["&kappa"]="954",r["&lambda"]="955",r["&mu"]="956",r["&nu"]="957",r["&xi"]="958",r["&omicron"]="959",r["&pi"]="960",r["&rho"]="961",r["&sigmaf"]="962",r["&sigma"]="963",r["&tau"]="964",r["&upsilon"]="965",r["&phi"]="966",r["&chi"]="967",r["&psi"]="968",r["&omega"]="969",r["&thetasym"]="977",r["&upsih"]="978",r["&piv"]="982",r["&ensp"]="8194",r["&emsp"]="8195",r["&thinsp"]="8201",r["&zwnj"]="8204",r["&zwj"]="8205",r["&lrm"]="8206",r["&rlm"]="8207",r["&ndash"]="8211",r["&mdash"]="8212",r["&lsquo"]="8216",r["&rsquo"]="8217",r["&sbquo"]="8218",r["&ldquo"]="8220",r["&rdquo"]="8221",r["&bdquo"]="8222",r["&dagger"]="8224",r["&Dagger"]="8225",r["&bull"]="8226",r["&hellip"]="8230",r["&permil"]="8240",r["&prime"]="8242",r["&Prime"]="8243",r["&lsaquo"]="8249",r["&rsaquo"]="8250",r["&oline"]="8254",r["&frasl"]="8260",r["&euro"]="8364",r["&image"]="8365",r["&weierp"]="8472",r["&real"]="8476",r["&trade"]="8482",r["&alefsym"]="8501",r["&larr"]="8592",r["&uarr"]="8593",r["&rarr"]="8594",r["&darr"]="8595",r["&harr"]="8596",r["&crarr"]="8629",r["&lArr"]="8656",r["&uArr"]="8657",r["&rArr"]="8658",r["&dArr"]="8659",r["&hArr"]="8660",r["&forall"]="8704",r["&part"]="8706",r["&exist"]="8707",r["&empty"]="8709",r["&nabla"]="8711",r["&isin"]="8712",r["&notin"]="8713",r["&ni"]="8715",r["&prod"]="8719",r["&sum"]="8721",r["&minus"]="8722",r["&lowast"]="8727",r["&radic"]="8730",r["&prop"]="8733",r["&infin"]="8734",r["&ang"]="8736",r["&and"]="8743",r["&or"]="8744",r["&cap"]="8745",r["&cup"]="8746",r["&int"]="8747",r["&there4"]="8756",r["&sim"]="8764",r["&cong"]="8773",r["&asymp"]="8776",r["&ne"]="8800",r["&equiv"]="8801",r["&le"]="8804",r["&ge"]="8805",r["&sub"]="8834",r["&sup"]="8835",r["&nsub"]="8836",r["&sube"]="8838",r["&supe"]="8839",r["&oplus"]="8853",r["&otimes"]="8855",r["&perp"]="8869",r["&sdot"]="8901",r["&lceil"]="8968",r["&rceil"]="8969",r["&lfloor"]="8970",r["&rfloor"]="8971",r["&lang"]="9001",r["&rang"]="9002",r["&loz"]="9674",r["&spades"]="9824",r["&clubs"]="9827",r["&hearts"]="9829",r["&diams"]="9830",r)"function"!=typeof r[e]&&r.hasOwnProperty(e)&&(i[r[e]]=e);for(t in i)"function"!=typeof i[t]&&i.hasOwnProperty(t)&&(n=i[t].toLowerCase().substr(1),o.put(n,String.fromCharCode(t)));return o}(),KE=function(){RE(t,BE);var e=DE(t);function t(){return _E(this,t),e.apply(this,arguments)}return kE(t,[{key:"decodeCharacter",value:function(e){var t;e.mark();var n=e.next();if(null==n||"&"!==n)return e.reset(),null;var r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(null!=(t=this._getNumericEntity(e)))return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,n,r,i="";for(t=Math.min(e.remainder().length,YE.getMaxKeyLength()),r=0;r<t;r++)i+=e.next().toLowerCase();var o=YE.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),o.getValue()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,16);return!Number.isNaN(+r)&&WE(r)?String.fromCharCode(r):null}},{key:"_parseNumber",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,10);return!Number.isNaN(+r)&&WE(r)?String.fromCharCode(r):null}}]),t}(),XE=function(){RE(t,BE);var e=DE(t);function t(){return _E(this,t),e.apply(this,arguments)}return kE(t,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,i,o=e.next();if(null==o)return e.reset(),null;if("%"!==o)return e.reset(),null;for(t="",n=0;n<2;n++)null!=(r=e.nextHex())&&(t+=r);return 2===t.length&&(i=parseInt(t,16),WE(i))?String.fromCharCode(i):(e.reset(),null)}}]),t}(),JE=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(jE=document.createElement("div"));var ZE=Array.prototype.indexOf,QE=[",",".","_"," "],eC=[",",".","-","_"," "],tC={width:["%"],height:["%"]},nC={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},rC={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":nC.image,"background-color":nC.color,"border-color":nC.color,"border-image":nC.image,color:nC.color,icon:nC.image,"list-style-image":nC.image,"outline-color":nC.color},iC={attr_name:["on[a-z]{1,}","style","href","src"],attr_val:["javascript:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function oC(e,t,n){var r;if(t){if(ZE)return ZE.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function aC(e){if(null==e)return"";var t,n=document.createTextNode(e);return jE.appendChild(n),t=jE.innerHTML,jE.removeChild(n),t}function sC(e,t,n){var r,i,o,a,s,l,c,u,d;if(e=cC(e).toLowerCase(),t=cC(t),oC(e,iC.attr_name)>=0)throw new Error("Unsafe attribute name used: ".concat(e));for(o=0;o<iC.attr_val;o++)if(t.toLowerCase().match(iC.attr_val[o]))throw new Error("Unsafe attribute value used: ".concat(t));if((r=tC[e])||(r=eC),i="",!n){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");i+=s}i+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&oC(c,r)<0?(d=u.toString(16),i+="&#x".concat(d,";")):i+=c;return n||(i+='"'),i}function lC(e,t,n){var r,i,o,a,s,l,c,u,d,p;if(e=cC(e).toLowerCase(),t=cC(t),oC(e,iC.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(r=0;r<iC.css_val.length;r++)if(t.toLowerCase().indexOf(iC.css_val[r])>=0)throw new Error("Unsafe property value used: ".concat(t));if((i=rC[e])||(i=nC.default),o="",!n){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");o+=s}o+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&oC(c,i)<0?(d=u.toString(16),p="000000".substr(d.length),o+="\\".concat(p).concat(d)):o+=c;return o}function cC(e,t){var n,r,i,o,a=!1;if(null===e)return null;n=e,r=e,i=0;for(var s=[new KE,new XE,new HE];!a;){r=n;for(var l=0;l<s.length;l++)(o=s[l].decode(n))!==n&&(i++,n=o);r!==n||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}for(var uC=[],dC=0;dC<255;dC++)uC[dC]=dC>=48&&dC<=57||dC>=65&&dC<=90||dC>=97&&dC<=122?null:dC.toString(16);var pC=function(e){return aC(e.unsafe)},hC=function(e){var t,n=[],r=[],i={},o="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=lC(t,n[t],!0),o+=lC(t,n[t],!0),i[t]=r[t]);return e.map?i:o},fC=function(e){var t=[],n=[],r={},i="";for(var o in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(n[o]=sC(o,t[o],!0),i+=sC(o,t[o],!0),r[o]=n[o]);return e.map?r:i};function mC(e,t){throw new Error(t)}var gC={canonicalize:cC,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===CE(arguments[0])?function(){for(var e,t,n,r=arguments[0]||{},i=1,o=arguments.length;i<o;i++)if(null!=(e=arguments[i]))for(t in e)if(e.hasOwnProperty(t)){if(r===(n=e[t]))continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?pC(e):"css"===e.context?(null!=e.map&&"object"!==CE(e.map)&&mC(this,"Invalid parameter type"),hC(e)):"attr"===e.context?(null!=e.map&&"object"!==CE(e.map)&&mC(this,"Invalid parameter type"),fC(e)):void mC(this,"Invalid parameter type")},encodeForAttr:sC,encodeForAttr2:function(e){return sC("nonsens",e,!0)},encodeForCSS:lC,encodeForHref:function(e){cC(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new qE(e),n=qE.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),r=t.searchParams,i=(e=n+qE.encodeSearchParams(r)+t.hash).toLowerCase();if(-1!==i.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==i.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){var n,r,i,o,a,s;for(t||(t=QE),s="",n=0;n<e.length;n++)i=e.charAt(n),o=e.charCodeAt(n),oC(i,t)>=0||null==uC[o]?s+=i:(r=o.toString(16),o<256?(a="00".substr(r.length),s+="\\x".concat(a).concat(r.toUpperCase())):(a="0000".substr(r.length),s+="\\u".concat(a).concat(r.toUpperCase())));return s},encodeForHTML:aC,encodeForURL:function(e,t){var n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=cC(t).toLowerCase():mC(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':""},isSafeDataURL:function(e,t){var n=null!=t?t:{},r=n.maxByteSizeSvg,i=void 0===r?5e5:r,o=n.maxByteSizeImage,a=void 0===o?5e6:o,s=function(e){var t,n=PE(null!==(t=JE.exec(e.trim()))&&void 0!==t?t:[],4),r=n[1];return{encoding:n[2],data:n[3],mimeType:null==r?void 0:r.toLocaleLowerCase()}}(e),l=s.mimeType,c=s.encoding,u=s.data;if(!u)return!0;var d=function(e,t,n){var r={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(n)],r).size}catch(e){return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0}(l,c,u);return"image/svg+xml"===l?d<=i:d<=a}};const yC=(e,t)=>{var n;return null===(n=t.qAttrExps)||void 0===n||null===(n=n.qValues)||void 0===n?void 0:n[e]},bC=e=>{switch(e){case"topLeft":default:return{horizontal:"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"flex-end",vertical:"center"};case"topRight":return{horizontal:"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"flex-end",vertical:"flex-end"}}},vC=({text:e,url:t,imageSize:n,imagePosition:r})=>r&&t&&!t.toLowerCase().includes("javascript:")&&gC.isSafeDataURL(t)?{type:Dt.Image,url:t,text:e,imageSize:n,resolvedImagePosition:bC(r)}:{type:Dt.Text,url:void 0,text:e},xC=(e,t,n,r)=>{if(!e.qMiniChart||null==t||!t.miniChart||!n)return{type:Dt.Text,text:r};const{minY:i,maxY:o}=((e,t,n)=>{var r,i;const o="global"===(null===(r=t.yAxis)||void 0===r?void 0:r.scale),a="zeroCenter"===(null===(i=t.yAxis)||void 0===i?void 0:i.position),s=o?n.qYMin:e.qMiniChart.qMin,l=o?n.qYMax:e.qMiniChart.qMax;if(a){const e=Math.max(Math.abs(s),Math.abs(l));return{minY:-e,maxY:e}}return(e=>{var t,n;return"zeroBaseline"===(null===(t=e.yAxis)||void 0===t?void 0:t.position)||"bars"===e.type&&"auto"===(null===(n=e.yAxis)||void 0===n?void 0:n.position)})(t)?{minY:Math.min(0,s),maxY:Math.max(0,l)}:{minY:s,maxY:l}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:i,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:Dt.MiniChart,text:r,miniChart:a}},wC=(e,t,n)=>{var r;const i=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=null==i||null===(r=i.qValues)||void 0===r?void 0:r[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return(null==n?void 0:n.urlPosition)===Pt.Attribute||null==n?void 0:n.urlLabel},SC=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:Dt.Link,url:gC.encodeForHref(n),text:t,labelStructure:e}}catch(n){return{type:Dt.Text,url:void 0,text:t,labelStructure:e}}},EC=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText})=>{var l,c,u,d,p,h;const f=Ot(t),m=s(e);return f!==Dt.Image||!r.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")||null!==(l=r.anything.sense)&&void 0!==l&&null!==(c=l.isUnsupportedFeature)&&void 0!==c&&c.call(l,"tableImages")?f===Dt.Link?((e,t,n,r,i)=>{const{urlPosition:o}=null!=t?t:{};if(o===Pt.Attribute){var a;const o=wC(null!==(a=n.url)&&void 0!==a?a:-1,e,t);return SC({labelStructure:r,text:i||o||"",url:o})}if(o===Pt.Dimension){var s,l;const o=wC(null!==(s=n.urlLabel)&&void 0!==s?s:-1,e,t)||i;return r&&(r.maskedValue=o),SC({text:o,labelStructure:r,url:null!==(l=null==r?void 0:r.originalValue)&&void 0!==l?l:i})}return{type:Dt.Text,url:void 0,text:i,labelStructure:r}})(e,t,n,a,m):f!==Dt.Indicator||!r.flags.isEnabled("CLIENT_IM_6696_INDICATORS")||null!==(u=r.anything.sense)&&void 0!==u&&null!==(d=u.isUnsupportedFeature)&&void 0!==d&&d.call(u,"tableIndicators")?f!==Dt.MiniChart||!r.flags.isEnabled("CLIENT_IM_7110_TABLE_MINI_CHART")||null!==(p=r.anything.sense)&&void 0!==p&&null!==(h=p.isUnsupportedFeature)&&void 0!==h&&h.call(p,"qMiniChartDef")?{type:Dt.Text,url:void 0,text:m,labelStructure:a}:xC(e,t,o,m):((e,t,n)=>{const{indicator:r}=null!=e?e:{};return{type:Dt.Indicator,url:void 0,text:n,indicator:{applySegmentColors:null==r?void 0:r.applySegmentColors,position:null==r?void 0:r.position,showTextValues:null==r?void 0:r.showTextValues},indicatorConditionalColoring:t}})(t,i,m):((e,t,n,r)=>{const{imageSize:i,imagePosition:o,imageSetting:a,imageLabel:s}=null!=t?t:{};if("url"===a){var l,c;const t=null===(l=yC(null!==(c=n.imageUrl)&&void 0!==c?c:-1,e))||void 0===l?void 0:l.qText;return vC({text:r,url:t,imageSize:i,imagePosition:o})}if("label"===a){var u,d,p;const t=r;if(-1===n.imageLabel)return vC({text:s||t||"",url:t,imageSize:i,imagePosition:o});const a=null!==(u=null===(d=yC(null!==(p=n.imageLabel)&&void 0!==p?p:-1,e))||void 0===d?void 0:d.qText)&&void 0!==u?u:r;return vC({text:a,url:t,imageSize:i,imagePosition:o})}return{type:Dt.Text,url:void 0,text:r}})(e,t,n,m)},CC=(e,t)=>{var n,r,i,o;const a=t.qAttrExps,s=null==a||null===(n=a.qValues)||void 0===n||null===(n=n[null!==(r=null==e?void 0:e.cellForegroundColor)&&void 0!==r?r:-1])||void 0===n?void 0:n.qText,l=null==a||null===(i=a.qValues)||void 0===i||null===(i=i[null!==(o=null==e?void 0:e.cellBackgroundColor)&&void 0!==o?o:-1])||void 0===i?void 0:i.qText,c=l?Vm(l):null,u=s?Vm(s):null,d=((e,t)=>e||!t?null:Wm(t))(u,c);return{color:null!=d?d:u,background:c}},_C=(e,t)=>t.qSubNodes.reduce(((e,t)=>0===t.qSubNodes.length?e+1:_C(e,t)),e),MC=(e,t,n,r,i,o)=>{const a=i?o.rowsPerPage-n:og-r;let s=e.qUp+e.qDown;if(i&&0===n){const n=(t+e.qUp)%o.rowsPerPage;s=e.qDown+n}return Math.min(a,_C(s,e))},kC=(e,t,n)=>{if(e!==uE){if(t){const t=Ot(e.representation)===Dt.Link;return null!=n&&n.isLinksSupported&&t?e.representation:{type:Dt.Text}}return e.representation}},RC=({node:e,parent:t,root:n,x:r,y:i,pageY:o,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:c=!0,isIndentModeEnabled:u=!1,indentModeFeatures:d,indentLevel:p,labelStructure:h,env:f,pageInfo:m})=>{const g=(!u||!c)&&"P"===e.qType;let y=e.qText;if(c&&u&&h){const{originalValue:e,delimeter:t,suffix:n}=h;y=`${e} ${!n||!e&&n?"":t} ${n}`.trim()}const b={id:bE(),ref:e,x:r,y:i,pageX:r,pageY:o,mainAxisPageCoord:c?o:r,isLeftColumn:c,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:MC(e,i,o,r,c,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!(null==t||!t.isTotal),isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:CC(l,e),selectionCellType:c?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!c,visibleMeasureInfoIndex:g?e.qElemNo:null==t?void 0:t.visibleMeasureInfoIndex,representation:EC({cell:{...e,qText:y},representationProperties:kC(s,u,d),attrExprInfoIndex:l,env:f,labelStructure:h}),...void 0!==p&&{indentLevel:p}};return t&&(t.children[b.mainAxisPageCoord-t.mainAxisPageCoord]=b),b},AC=(e,t,n,r,i,o,a,s)=>{const{isIndentModeEnabled:l,indentModeFeatures:c}=i;if(!t.length)return e;let u=0;return function t(d,p,h,f=0,m=-1){e[f]||(e[f]={}),l&&m++;const g=i.leftDimensionInfoIndexes.indexOf(uE);h.forEach(((h,y)=>{var b,v;const x={originalValue:null!==(b=h.qText)&&void 0!==b?b:"",maskedValue:"",delimeter:"-",suffix:""};u+=0===y?0:1;const w=n.qTop-r.page*r.rowsPerPage,S=Math.max(0,w+u-h.qUp),E=n.qTop+u-h.qUp;var C,_;if(l&&(i.hasPseudoDimOnLeft&&m<=g))if(x.originalValue=null!==(C=h.qText)&&void 0!==C?C:"",x.maskedValue=null!==(_=h.qText)&&void 0!==_?_:"","N"===h.qType||"U"===h.qType||"T"===h.qType)m<g&&(x.suffix=i.visibleMeasureInfo[0].qFallbackTitle);else if("P"===h.qType){var M,k,R,A,I,L,D,P;x.originalValue=null!==(M=null===(k=p||d)||void 0===k||null===(k=k.representation.labelStructure)||void 0===k?void 0:k.originalValue)&&void 0!==M?M:"",x.maskedValue=null!==(R=null===(A=p||d)||void 0===A||null===(A=A.representation.labelStructure)||void 0===A?void 0:A.originalValue)&&void 0!==R?R:"",x.suffix=null!==(I=h.qText)&&void 0!==I?I:"";const e=h.qSubNodes;h={...null===(L=p||d)||void 0===L?void 0:L.ref,...h.qText?{qText:h.qText}:{},qSubNodes:e},m=null!==(D=null===(P=p||d)||void 0===P?void 0:P.indentLevel)&&void 0!==D?D:0}let O=f;l&&(O=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===h.qSubNodes.length&&(O=0));const T=null===(v=e.at(f))||void 0===v?void 0:v[S],N=l&&void 0===(null==T?void 0:T.ref.qText)||!T?RC({node:h,parent:p,root:d,x:O,y:E,pageY:S,layoutService:i,dimensionInfo:o[O],attrExprInfoIndex:a[O],isLeftColumn:!0,...l&&{isIndentModeEnabled:l,indentModeFeatures:c,indentLevel:m},env:s,pageInfo:r,labelStructure:x}):e[f][S];if(e[f][S]=N,h.qSubNodes.length){const e=l?0:f+1;t(d||N,N,h.qSubNodes,e,m)}}))}(null,null,t,0,-1),e},IC=(e,t)=>{e.slice(0,-1).forEach((e=>{Object.values(e).forEach(((e,n,r)=>{const i=r[n+1];e.distanceToNextCell=i?i.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)}))}))},LC=(e,t)=>{const n=e[0],r=n?Object.values(n):[],i=null!=t&&t.isIndentModeEnabled&&null!=t&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,o=null==n?void 0:n[i],a=r.at(-1);return null!=o&&o.isTotal?o.isLeafNode?o.mainAxisPageCoord:o.mainAxisPageCoord+o.leafCount-1:null!=a&&a.isTotal?a.mainAxisPageCoord-1:-1},DC=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:i,attrExprInfoIndexes:o,env:a})=>{const{qLeft:s,qArea:l}=t;if(!s.length)return e;const c=AC(e.grid,s,l,n,r,i,o,a);IC(c,n.rowsOnCurrentPage);const u=LC(c,r);return{...e,grid:c,columnCount:c.length,totalDividerIndex:u}},PC=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const i=[...t];return n.forEach(((t,n)=>{t.forEach(((t,o)=>{var a;const s=e.qTop-r.page*r.rowsPerPage+n,l=e.qLeft+o;Array.isArray(i[s])||(i[s]=[]);const c="U"===t.qType;i[s][l]=null!==(a=i[s][l])&&void 0!==a?a:{id:bE(),ref:t,isNull:c}}))})),i},OC=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:i}=t;return null!=r&&r.length?PC({qArea:i,prevData:e,pivotValuePoints:r,pageInfo:n}):e},TC=(e,t,n,r,i,o,a,s,l)=>{const{isIndentModeEnabled:c,indentModeFeatures:u}=r;if(!t.length)return e;let d=0;!function t(a,p,h,f=0){e[f]||(e[f]={}),h.forEach(((h,m)=>{var g;d+=0===m?0:1;const y=n.qLeft+d-h.qUp,b=null!==(g=e[f][y])&&void 0!==g?g:RC({node:h,parent:p,root:a,x:y,y:f,pageY:f,layoutService:r,dimensionInfo:i[f],attrExprInfoIndex:o[f],isLeftColumn:!1,...c&&{isIndentModeEnabled:c,indentModeFeatures:u},env:s,pageInfo:l});e[f][y]=b,h.qSubNodes.length&&t(a||b,b,h.qSubNodes,f+1)}))}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},NC=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:i,headerRows:o,env:a,pageInfo:s})=>{const{qTop:l,qArea:c}=t;if(!l.length)return e;const u=TC(e.grid,l,c,n,r,i,o,a,s);IC(u,n.size.x);const d=LC(u);return{...e,grid:u,rowCount:u.length,totalDividerIndex:d}},qC=e=>-1===e?{}:e.qAttrExprInfo.reduce(((e,{id:t},n)=>(e[t]=n,e)),{}),FC=(e,t)=>{const{env:n}=rE(),{layoutService:r,effectivePropertiesService:i}=aE(),{qPivotDataPages:o,pageInfo:a}=eE(),[c,u]=l(null),p=((e,t,n)=>s((()=>({left:e.map(qC),top:t.map(qC),measures:n.map(qC)})),[n,e,t]))(e,t,r.visibleMeasureInfo),h=s((()=>EE(r,i,t,e)),[r,i,t,e]),f=d((()=>o.slice(1).reduce(((e,t)=>OC({prevData:e,dataPage:t,pageInfo:a})),((e,t)=>{const{qData:n,qArea:r}=e;return PC({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(o[0],a))),[o,a]),m=d((()=>o.slice(1).reduce(((e,i)=>NC({prevData:e,nextDataPage:i,layoutService:r,visibleTopDimensionInfo:t,attrExprInfoIndexes:p.top,headerRows:h.size.y,env:n,pageInfo:a})),((e,t,n,r,i,o,a)=>{const{qArea:s,qTop:l}=e,c=TC([],l,s,t,n,r,i,o,a);IC(c,t.size.x);const u=LC(c);return{grid:c,rowCount:c.length,layoutSize:t.size,totalDividerIndex:u}})(o[0],r,t,p.top,h.size.y,n,a))),[o,r,t,p.top,h.size.y,n,a]),g=d((()=>o.slice(1).reduce(((t,i)=>DC({prevData:t,nextDataPage:i,pageInfo:a,layoutService:r,visibleLeftDimensionInfo:e,attrExprInfoIndexes:p.left,env:n})),((e,t,n,r,i,o)=>{const{qArea:a,qLeft:s}=e,l=AC([],s,a,n,t,r,i,o);IC(l,n.rowsOnCurrentPage);const c=LC(l,t);return{grid:l,columnCount:l.length,layoutSize:t.size,totalDividerIndex:c}})(o[0],r,a,e,p.left,n))),[o,r,a,e,p,n]),[y,b]=l((()=>f())),[v,x]=l((()=>m())),[w,S]=l((()=>g()));$g((()=>{b(f())}),[f]),$g((()=>{x(m())}),[m]),$g((()=>{S(g())}),[g]),$g((()=>{c&&c.forEach((i=>{b((e=>OC({prevData:e,dataPage:i,pageInfo:a}))),x((e=>NC({prevData:e,nextDataPage:i,layoutService:r,visibleTopDimensionInfo:t,attrExprInfoIndexes:p.top,headerRows:h.size.y,env:n,pageInfo:a}))),S((t=>DC({prevData:t,nextDataPage:i,pageInfo:a,layoutService:r,visibleLeftDimensionInfo:e,attrExprInfoIndexes:p.left,env:n})))}))}),[c]);const E=d((e=>{u(e)}),[]);return{headersData:h,measureData:y,topDimensionData:v,leftDimensionData:w,attrExprInfoIndexes:p,nextPageHandler:E}},jC=Math.sqrt(1e4),zC=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/Xt.PixelsMin)}),BC=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/jC),r=Math.ceil(e.qHeight/jC);for(let i=0;i<n;i++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+i*jC,qTop:e.qTop+n*jC,qWidth:Math.min(jC,e.qWidth-i*jC),qHeight:Math.min(jC,e.qHeight-n*jC)});return t};function WC({nextPageHandler:e}){const{model:t}=rE(),{pageInfo:n}=eE(),{layoutService:r}=aE(),i=(e=>{const t=c(e);return t.current=e,t})(n.page),o=t,a=d((async(e,t)=>{await(null==o?void 0:o.collapseLeft(cE,e,t,!1))}),[o]),l=d((async(e,t)=>{await(null==o?void 0:o.collapseTop(cE,e,t,!1))}),[o]),u=d((async(e,t)=>{await(null==o?void 0:o.expandLeft(cE,e,t,!1))}),[o]),p=d((async(e,t)=>{await(null==o?void 0:o.expandTop(cE,e,t,!1))}),[o]),h=d((async t=>{if(null!=o&&o.getHyperCubePivotData&&0!==t.length)try{const r=await o.getHyperCubePivotData(cE,t.reduce(((e,t)=>[...e,...BC(t)]),[]));i.current===n.page&&e(r)}catch(e){console.error(e)}}),[o,e,n,i]),f=d(((e,{dimensionInfoIndex:n,isLeftColumn:i,x:o=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:c}=r.layout.qHyperCube;let u=[];switch(a){case Bt.Dimension:u=[{qPath:`${cE}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case Bt.Measures:if(i)u=s.map(((e,t)=>({qPath:`${cE}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth})));else{const e=r.getMeasureInfoIndexFromCellIndex(o);u=[{qPath:`${cE}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case Bt.Pivot:u=[{qPath:`${cE}/topHeadersColumnWidth`,oldValue:c}]}const d=u.map((t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}}));null==t||t.applyPatches(d,!0)}),[t,r]),m=d((async e=>{await(null==o?void 0:o.applyPatches([{qPath:`${cE}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))}),[o,r]);return s((()=>({collapseLeft:a,collapseTop:l,expandLeft:u,expandTop:p,applyColumnWidth:f,applyIndentModeColumnWidth:m,fetchPages:h})),[a,l,u,p,f,m,h])}const $C=(e,t,n)=>(r,i)=>{if("P"===r)return uE;const o=t[n+i];return e[o]},HC=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach((e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)}))};return n(e),t},GC=h({}),VC=()=>n(GC),UC=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=aE(),{qPivotDataPages:r}=eE();return s((()=>{var i,o,a,s;const l=HC(null!==(i=null===(o=r[0])||void 0===o?void 0:o.qLeft)&&void 0!==i?i:[]),c=HC(null!==(a=null===(s=r[0])||void 0===s?void 0:s.qTop)&&void 0!==a?a:[]);return{visibleLeftDimensionInfo:l.map($C(n,t,0)),visibleTopDimensionInfo:c.map($C(n,t,e))}}),[n,t,e,r])})(),{headersData:r,measureData:i,topDimensionData:o,leftDimensionData:a,attrExprInfoIndexes:l,nextPageHandler:c}=FC(t,n),u=WC({nextPageHandler:c}),d=s((()=>({gridSectionsData:{headersData:r,topDimensionData:o,leftDimensionData:a,measureData:i},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:l,dataModel:u})),[t,n,r,i,o,a,l,u]);return Ws.jsx(GC.Provider,{value:d,children:e})},YC=18,KC=.75,XC=e=>{var t;return-1!==e&&(null==e||null===(t=e.representation)||void 0===t?void 0:t.type)===Dt.Image},JC=e=>void 0===e?ig:e,ZC=(e,t)=>e&&"number"==typeof e&&!Number.isNaN(e)?e:t,QC=e=>ZC(e,Xt.PixelsDefault),e_=(e,t)=>ZC(e,Xt.PercentageDefault)*t/100,t_=(e,t,n)=>{switch(null==t?void 0:t.type){case Jt.Pixels:return QC(t.pixels);case Jt.Percentage:return e_(t.percentage,e);case Jt.FitToContent:case Jt.Auto:default:return n}},n_=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:i,measureTextForHeader:o,longestMeasureValuePossible:a})=>e.reduce(((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:c}}}=t,{id:u,colIdx:d,qApprMaxGlyphCount:p,isLeftDimension:h}=s;if(!h)return e+0;if(u===dE)return e+0;const f=r(p),m=!n.qAlwaysFullyExpanded&&h&&d<c-1?21:0;let g=0;if(i&&o&&a){g=o("-")+a}return Math.max(e,24*l+YC+m+f+g)}),0),r_=(e,t,n)=>e.reduce(((e,r)=>{const i=(n?0:1)*YC;return Math.max(e,i+t(r.qFallbackTitle))}),0),i_=(e,t,n,r)=>{const i=100*e/t,o=r*KC*(i/100),a=n*(i/100);return Math.min(a,o)},o_=(e,t,n,r)=>r*(n/100)*(100*e/t/100),a_=(e,t)=>e.some((e=>e>=t*KC)),s_=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:i,widthOverride:o,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:c})=>{let u=[];const d=i*KC,p=n.data[n.data.length-1][0],h=Math.min(d,r.at(-1)),f=Math.min(d,n_({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,r_(e.visibleMeasureInfo,a));let g=0;const y=p.findIndex((e=>e.id===dE)),b=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:i}=e.indentModeColumnWidth;return i===Jt.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+YC+16:24})({layoutService:e,measureTextForHeader:a,translator:c,headersData:n});if(e.hasPseudoDimOnLeft)if(0===y){const e=Math.max(h,f,m);u=[Math.max(b,e-h),h]}else{const n=Math.min(d,r_(e.visibleMeasureInfo,l,!0));g=Math.min(d,n_({headers:p.slice(0,y),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(h,f,g);u=[Math.max(b,r-h),h]}else u=[Math.max(b,f-h),h];const v=Math.min(d,u.reduce(((e,t)=>e+t),0)),{indentModeColumnWidth:x}=e;o&&o<=d&&(x.type=Jt.Pixels,x.pixels=o);return[Jt.Pixels,Jt.Percentage].includes(x.type)||a_(u,i)?((e,t,n,r)=>{let i=e[0],o=e[1],a=[];const s=e.reduce(((e,t)=>e+t),0),{type:l,pixels:c,percentage:u}=t,d=a_(e,n);l===Jt.Auto&&d&&(i>o?i-=o:o-=i),l===Jt.Pixels&&c&&(i=i_(e[0],s,c,n),o=i_(e[1],s,c,n)),l===Jt.Percentage&&u&&(i=o_(e[0],s,u,n),o=o_(e[1],s,u,n));let p=0;o<=r&&(p=i-5,p>0&&(i-=p,o+=p)),p=o-r,p>0&&(i+=p,o-=p),a=[i,o];const h=a.reduce(((e,t)=>e+t),0);return{leftGridColumnWidths:a,leftGridWidth:h,leftGridFullWidth:h}})(u,x,i,h):{leftGridWidth:v,leftGridColumnWidths:u,leftGridFullWidth:v}};function l_({tableWidth:e}){const t=e*KC,{styleService:n,layoutService:r,effectivePropertiesService:i}=aE(),{translator:o}=rE(),{gridSectionsData:{headersData:a}}=VC(),{measureText:s}=jg(n.header),{estimateWidth:c,measureText:u}=jg({...n.dimensionValues,fontWeight:JC(n.dimensionValues.fontWeight)}),{measureText:p}=jg({...n.dimensionValues,...n.measureLabels}),h=d(((n,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:d,topHeadersColumnWidth:h}},visibleMeasureInfo:f,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,y=(t=0)=>f.reduce(((n,{qFallbackTitle:r,columnWidth:i})=>{const o=p(r)+YC,a=Math.max(o,t);return Math.max(n,m?a:t_(e,i,a))}),0),b=e=>a.data.reduce(((t,n)=>{const r=n[e];if(!r)return t;if(r.id===dE)return t;const i=(e=>{const{label:t,isLocked:n}=e,r=n?20:0;return YC+s(t)+20+r})(r);return Math.max(i,t)}),0);let v=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const w=x.map(((o,s)=>{let u=YC;if((!m||m&&1===a.size.x)&&n&&void 0!==l&&l===o.colIdx)u=m?Math.min(t,n):n;else{let t;o.columnWidthLocation===Bt.Pivot?t=m?void 0:h:o.columnWidthLocation===Bt.Dimension&&({columnWidth:t}=o);let n=0;if(o.isLeftDimension)if(o.id===dE)n=y();else{const e=b(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:o,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(XC(s))return Xt.PixelsDefault;const l=!i.qAlwaysFullyExpanded&&o&&t<d-1?21:0;return YC+c(n)+l})(o,s);n=Math.max(e,t),m&&!g&&s+1===d&&o.columnWidthLocation===Bt.Dimension&&a.size.x>1&&(n=e)}else o.isLeftDimension||(n=b(s),o.columnWidthLocation===Bt.Measures&&(n=y(n)));m&&1===a.size.x&&(t=r.indentModeColumnWidth),u=m&&!g&&a.size.x>1?n:t_(e,t,n)}return v+=u,u}));return m&&a.size.x>1?s_({layoutService:r,effectivePropertiesService:i,headersData:a,columnWidths:w,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:c,measureTextWidthForMeasuresCombinedWithDimensions:u,translator:o}):{leftGridWidth:Math.min(t,v),leftGridColumnWidths:w,leftGridFullWidth:v}}),[e,a,r,t,s,p,c,u,o,i]),[f,m]=l(h);$g((()=>{m(h())}),[h]);const g=d(((e,t)=>{m(h(e,t))}),[h]);return{...f,overrideLeftGridWidth:g}}function c_({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:i}=aE(),{visibleDimensionsInfo:{visibleTopDimensionInfo:o}}=VC(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:l}},size:c,visibleMeasureInfo:u}=i,{estimateWidth:p,measureText:h}=jg(r.measureValues),{estimateWidth:f}=jg({...r.dimensionValues,fontWeight:JC(r.dimensionValues.fontWeight)}),m=e-n-1,g=o.at(-1),y=g===uE,b=l.length-a>o.length?21:0,v=s((()=>{const e=y?u:[g],t=c.x/e.length,n=[],r=[];let i=m;const o=(e,r)=>{n[e]=Math.min(Xt.PixelsMax,Math.max(Xt.PixelsMin,r)),i-=n[e]*t};if(e.forEach(((e,t)=>{if(null!=e&&e.columnWidth){const{columnWidth:{type:n,pixels:i,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case Jt.Pixels:o(t,QC(i));break;case Jt.Percentage:o(t,e_(a,m));break;case Jt.FitToContent:o(t,((e,t,n)=>n?Xt.PixelsDefault:YC+(y?Math.max(p(e),h(t)):Math.max(Math.max(...u.map((e=>p(e.qApprMaxGlyphCount)))),f(e)+b)))(s,l,XC(e)));break;case Jt.Auto:default:r.push(t)}}else r.push(t)})),r.length){const e=r.length*t,o=i/e;r.forEach((e=>{n[e]=Math.max(Xt.AutoMinPivot,o)}))}return n}),[y,u,g,c.x,m,p,h,f,b]),x=s((()=>{if(y){const e=u.reduce(((e,t,n)=>e+v[n]),0);return e/u.length}return v[0]}),[y,v,u]),w=parseFloat((t/i.size.x).toFixed(12)),S=d((e=>(y&&void 0!==e?v[i.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-w),[y,v,i,x,w]),E=c.x*x;return{rightGridFullWidth:E,rightGridWidth:Math.min(E,m),getRightGridColumnWidth:S}}const u_=`scrollable-container--${$t.TopGrid}`,d_=`scrollable-container--${$t.LeftGrid}`,p_=`scrollable-container--${$t.DataGrid}`,h_=e=>e&&e instanceof HTMLDivElement?{width:e.offsetWidth-e.clientWidth,height:e.offsetHeight-e.clientHeight}:{width:0,height:0},f_=(e,t)=>e>t?Ht.Forward:e<t?Ht.Backward:Ht.None,m_=()=>{const{layoutService:e}=aE(),t=c(null),n=c(null),r=c(null),i=c(null),o=c([]),a=c([]),s=c(null),{scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:h},resetHorizontalScrollbarHeight:f}=(({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const[r,i]=l(0),[o,a]=l(0);return m((()=>{(e.current||n.current)&&i(Math.max(h_(e.current).width,h_(n.current).width))})),m((()=>{(t.current||n.current)&&a(Math.max(h_(t.current).height,h_(n.current).height))})),{scrollbarsDimensions:{verticalScrollbarWidth:r,horizontalScrollbarHeight:o},resetHorizontalScrollbarHeight:()=>{a(0)}}})({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:i,leftGridRef:o,dataGridRef:a}})=>{const{pageInfo:s}=eE(),{downloadService:l,viewService:c,layoutService:u}=aE(),p=d((()=>{var i,o,a,s;const l={left:0,top:0};null===(i=e.current)||void 0===i||i.scrollTo(l),null===(o=t.current)||void 0===o||o.scrollTo(l),null===(a=n.current)||void 0===a||a.scrollTo(l),null===(s=r.current)||void 0===s||s.scrollTo(l)}),[e,t,n,r]);m((()=>{p()}),[s.page,p]),m((()=>{u.triggerdByExpandOrCollapse||p()}),[u,p]),m((()=>{if(u.triggerdByExpandOrCollapse){var e,t,n,s,l,c,d;const u=null!==(e=null===(t=r.current)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0,p=null!==(n=null===(s=r.current)||void 0===s?void 0:s.scrollTop)&&void 0!==n?n:0;null===(l=o.current)||void 0===l||l.forEach((e=>{null==e||e.scrollTo(p)})),null===(c=i.current)||void 0===c||c.forEach((e=>{null==e||e.scrollTo(u)})),null===(d=a.current)||void 0===d||d.scrollTo({scrollTop:p,scrollLeft:u})}}),[u,r,a,o,i]),m((()=>{(l.isDownloadedAsPDForImage||u.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)}),[c,l,u,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:g,scrollDirectionRefs:{verticalScrollDirection:y,horizontalScrollDirection:b}}=(()=>{const e=c(Ht.None),t=c(Ht.None),n=c({prevScrollTop:0,prevScrollLeft:0});return{trackScrollDirection:d((r=>{if(r instanceof WheelEvent&&(e.current=f_(r.deltaY,0),t.current=f_(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const i=r.target;e.current=f_(i.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=i.scrollTop,t.current=f_(i.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=i.scrollLeft}}),[e,t,n]),scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),v=(()=>{const{viewService:e}=aE();return d((t=>{const n=t.target,r=t.currentTarget,i=n.dataset.key;i===d_&&(e.leftGridScrollLeft=r.scrollLeft),i===p_&&(e.scrollLeft=r.scrollLeft),i===u_&&(e.topGridScrollTop=r.scrollTop),i!==d_&&i!==p_||(e.scrollTop=r.scrollTop)}),[e])})(),x={gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},getWrapperElements:d((()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:i.current})),[t,n,r,i]),updateViewService:v,trackScrollDirection:g,isSnapshotMode:e.isSnapshot};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,isSnapshotMode:a})=>{p((()=>{const{headerGridWrapperElement:i,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{i.scrollLeft+=e.deltaX,i.scrollTop+=e.deltaY,l.scrollLeft=i.scrollLeft,s.scrollTop=i.scrollTop,o(e)},d=e=>{var r,a;l.scrollTop+=e.deltaY,null===(r=t.current)||void 0===r||r.forEach((e=>{null==e||e.scrollTo(l.scrollTop)})),i.scrollLeft+=e.deltaX,l.scrollLeft=i.scrollLeft,c.scrollTop=l.scrollTop,null===(a=n.current)||void 0===a||a.scrollTo({scrollTop:l.scrollTop}),o(e)},p=t=>{var r,a;s.scrollLeft+=t.deltaX,null===(r=e.current)||void 0===r||r.forEach((e=>{null==e||e.scrollTo(s.scrollLeft)})),i.scrollTop+=t.deltaY,s.scrollTop=i.scrollTop,c.scrollLeft=s.scrollLeft,null===(a=n.current)||void 0===a||a.scrollTo({scrollLeft:s.scrollLeft}),o(t)},h=r=>{var i,a,u;c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,null===(i=n.current)||void 0===i||i.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,null===(a=e.current)||void 0===a||a.forEach((e=>{null==e||e.scrollTo(c.scrollLeft)})),l.scrollTop=c.scrollTop,null===(u=t.current)||void 0===u||u.forEach((e=>{null==e||e.scrollTo(c.scrollTop)})),o(r)};return i.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",h),a&&setTimeout((()=>{i.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",h)}),0),()=>{i.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",h)}}),[o,i,a,e,t,n,r])})(x),(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,isSnapshotMode:a})=>{p((()=>{const{headerGridWrapperElement:s,topGridWrapperElement:l,leftGridWrapperElement:c,dataGridWrapperElement:u}=r(),d=e=>{const t=e.target;s.scrollLeft=t.scrollLeft,o(e),null==i||i(e)},p=e=>{const t=e.target;s.scrollTop=t.scrollTop,o(e),null==i||i(e)},h=r=>{var a,s,d;const p=r.target;null===(a=n.current)||void 0===a||a.scrollTo({scrollLeft:p.scrollLeft,scrollTop:p.scrollTop}),l.scrollLeft=u.scrollLeft,null===(s=e.current)||void 0===s||s.forEach((e=>{null==e||e.scrollTo(p.scrollLeft)})),c.scrollTop=u.scrollTop,null===(d=t.current)||void 0===d||d.forEach((e=>{null==e||e.scrollTo(p.scrollTop)})),o(r),null==i||i(r)};return c.addEventListener("scroll",d),l.addEventListener("scroll",p),u.addEventListener("scroll",h),a&&setTimeout((()=>{c.removeEventListener("scroll",d),l.removeEventListener("scroll",p),u.removeEventListener("scroll",h)}),0),()=>{c.removeEventListener("scroll",d),l.removeEventListener("scroll",p),u.removeEventListener("scroll",h)}}),[o,i,a,e,t,n,r])})(x),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:y,horizontalScrollDirection:b},scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:h,resetHorizontalScrollbarHeight:f}}},g_=()=>{const{layoutService:e}=aE(),{rect:t,pageInfo:n}=eE();return s((()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}}),[t,e,n.shouldShowPagination])},y_=({children:e,style:t})=>Ws.jsx("div",{"data-testid":"fullSize",style:t,children:e}),b_=({children:e,style:t})=>Ws.jsx("div",{"data-section-id":"GRID",style:{display:"grid",...t},children:e}),v_=e=>e&&`scrollable-container--${e}`,x_=({children:e,style:t,origin:n},r)=>{const{interactions:i}=rE(),o=i.active?t:{overflow:"hidden"};return Ws.jsx("div",{"data-testid":"scrollable","data-key":v_(n),style:o,ref:r,children:e})};var w_=t.forwardRef(x_);const S_=({children:e,style:t})=>Ws.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,left:0,...t},children:e});var E_=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function C_(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||E_(r)&&E_(i)))return!1;var r,i;return!0}function __(e,t){var n;void 0===t&&(t=C_);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}var M_="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function k_(e){cancelAnimationFrame(e.id)}function R_(e,t){var n=M_();var r={id:requestAnimationFrame((function i(){M_()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var A_=-1;function I_(e){if(void 0===e&&(e=!1),-1===A_||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),A_=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return A_}var L_=null;function D_(e){if(void 0===e&&(e=!1),null===L_||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?L_="positive-descending":(t.scrollLeft=1,L_=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),L_}return L_}var P_=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function O_(e){var t,n=e.getColumnOffset,i=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,h=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,y=e.shouldResetStyleCacheOnItemSizeChange,b=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,wn(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:wn(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=__((function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=__((function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,o=r.props,s=o.columnWidth,l=o.direction,c=o.rowHeight,u=r._getItemStyleCache(y&&s,y&&l,y&&c),h=e+":"+t;if(u.hasOwnProperty(h))i=u[h];else{var f=n(r.props,t,r._instanceProps),m="rtl"===l;u[h]=i={position:"absolute",left:m?void 0:f,right:m?f:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=__((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,c=o;if("rtl"===t)switch(D_()){case"negative":c=-o;break;case"positive-descending":c=l-i-o}c=Math.max(0,Math.min(c,l-i));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&k_(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=R_(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}xn(t,e),t.getDerivedStateFromProps=function(e,t){return T_(e,t),b(e),null};var g=t.prototype;return g.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},g.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,a=o.columnCount,d=o.height,p=o.rowCount,h=o.width,f=this.state,m=f.scrollLeft,g=f.scrollTop,y=I_();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==i&&(i=Math.max(0,Math.min(i,p-1)));var b=s(this.props,this._instanceProps),v=l(this.props,this._instanceProps)>h?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?u(this.props,i,n,g,this._instanceProps,v):g})},g.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},g.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(D_()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},g.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&k_(this._resetIsScrollingTimeoutId)},g.render=function(){var e=this.props,t=e.children,n=e.className,i=e.columnCount,o=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,h=e.itemKey,f=void 0===h?P_:h,m=e.outerElementType,g=e.outerTagName,y=e.rowCount,b=e.style,v=e.useIsScrolling,x=e.width,w=this.state.isScrolling,S=this._getHorizontalRangeToRender(),E=S[0],C=S[1],_=this._getVerticalRangeToRender(),M=_[0],k=_[1],R=[];if(i>0&&y)for(var A=M;A<=k;A++)for(var I=E;I<=C;I++)R.push(r(t,{columnIndex:I,data:p,isScrolling:v?w:void 0,key:f({columnIndex:I,data:p,rowIndex:A}),rowIndex:A,style:this._getItemStyle(A,I)}));var L=s(this.props,this._instanceProps),D=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:dn({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},r(u||d||"div",{children:R,ref:c,style:{height:L,pointerEvents:w?"none":void 0,width:D}}))},g._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],c=o[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],h=u[2],f=u[3];this._callOnItemsRendered(a,s,d,p,l,c,h,f)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,b,g,x,v)}},g._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var h=i(this.props,d,this._instanceProps),f=o(this.props,h,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,h-m),Math.max(0,Math.min(t-1,f+g)),h,f]},g._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=h(this.props,c,this._instanceProps),p=f(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,p+g)),d,p]},t}(g),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var T_=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},N_=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},q_=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},F_=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=o(c);i[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},j_=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?z_(e,t,n,o,0,r):B_(e,t,n,Math.max(0,o),r)},z_=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=F_(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},B_=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&F_(e,t,r,n).offset<i;)r+=a,a*=2;return z_(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},W_=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=F_(e,t,n,o),c="column"===e?q_(t,o):N_(t,o),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return i>=d&&i<=u?i:d>u||i<d?d:u}},$_=O_({getColumnOffset:function(e,t,n){return F_("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return j_("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=F_("column",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=F_("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:N_,getEstimatedTotalWidth:q_,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return W_("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return W_("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return F_("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return j_("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=F_("row",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=F_("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),H_=function(e,t){return e};function G_(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,o=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,wn(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:wn(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=__((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=__((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?d:0;c[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:d,height:h?"100%":p,width:h?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=__((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(D_()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState((function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&k_(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=R_(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}xn(t,e),t.getDerivedStateFromProps=function(e,t){return V_(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?I_():0:l.scrollHeight>l.clientHeight?I_():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(D_()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&k_(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,h=void 0===p?H_:p,f=e.layout,m=e.outerElementType,g=e.outerTagName,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,w="horizontal"===o||"horizontal"===f,S=w?this._onScrollHorizontal:this._onScrollVertical,E=this._getRangeToRender(),C=E[0],_=E[1],M=[];if(u>0)for(var k=C;k<=_;k++)M.push(r(t,{data:d,key:h(k,d),index:k,isScrolling:b?x:void 0,style:this._getItemStyle(k)}));var R=i(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:S,ref:this._outerRefSetter,style:dn({position:"relative",height:a,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},r(l||c||"div",{children:M,ref:s,style:{height:w?"100%":R,pointerEvents:x?"none":void 0,width:w?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),p=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(g),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var V_=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},U_=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var c=r(l);i[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return i[t]},Y_=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=U_(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},K_=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&U_(e,n,t).offset<r;)n+=o,o*=2;return Y_(e,t,Math.min(n,i-1),Math.floor(n/2),r)},X_=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},J_=G_({getItemOffset:function(e,t,n){return U_(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:X_,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=U_(e,t,i),p=X_(e,i),h=Math.max(0,Math.min(p-u,d.offset)),f=Math.max(0,d.offset-u+d.size+o);switch("smart"===n&&(n=r>=f-u&&r<=h+u?"auto":"center"),n){case"start":return h;case"end":return f;case"center":return Math.round(f+(h-f)/2);default:return r>=f&&r<=h?r:r<f?f:h}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?Y_(e,t,i,0,n):K_(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===i||"horizontal"===s?l:o,u=U_(e,t,r),d=n+c,p=u.offset+u.size,h=t;h<a-1&&p<d;)h++,p+=U_(e,h,r).size;return h},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function Z_(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var Q_=["style"],eM=["style"];function tM(e,t){var n=e.style,r=bn(e,Q_),i=t.style,o=bn(t,eM);return!Z_(n,i)&&!Z_(r,o)}const nM=10,rM=(e,t)=>e.current===Ht.Backward?t:0,iM=(e,t,n,r)=>{for(let i=n;i<n+r;i++){const n=e[i];if(void 0===n||void 0===n[t])return!0}return!1},oM=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,aM=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:i,endLeft:o})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=i;e<o;e++)if(iM(t,e,n,r)){const t=a[a.length-1],i={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&oM(t,i)?t.qWidth+=i.qWidth:a.push(i)}return a},sM=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:i,minBufferEndLeft:o,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===Ht.Backward?Math.max(0,i-25):o,u=Math.min(c+25,a);return aM({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},lM=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:i})=>{const{startLeft:o,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=e.size.x,l=rM(n,nM),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(o+nM,s-c),pageTop:i,qHeight:a}})(r,i,n),c=aM({pageInfo:e,measureData:t,startLeft:o,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...sM({pageInfo:e,measureData:t,scrollDirection:n,viewService:i,minBufferStartLeft:o,minBufferEndLeft:a,columnEndIndex:r.size.x})]:c},cM=(e,t,n,r)=>{const i=e[n];if(void 0===i)return!0;for(let e=t;e<t+r;e++){if(void 0===i[e])return!0}return!1},uM=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,dM=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:i,pageInfo:o})=>{const a=[],s=o.page*o.rowsPerPage;for(let o=e;o<t;o++)if(cM(i,n,o,r)){const e=a.at(-1),t={qLeft:n,qTop:o+s,qWidth:r,qHeight:1};void 0!==e&&uM(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},pM=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:i,endTop:o,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=rM(n,nM),l=Math.max(i-s,0);return{startTop:l,endTop:l+Math.min(a+nM,e.rowsOnCurrentPage-l),qLeft:r,qWidth:o}})(e,r,n),l=dM({startTop:i,endTop:o,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===Ht.Backward?Math.max(0,i-25):o,c=Math.min(r+25,e.rowsOnCurrentPage),u=dM({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},hM=async(e,t,n,r,i,o,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=i;let p=[],h=[];o.current!==Ht.None&&(p=pM({pageInfo:r,measureData:n,scrollDirection:o,viewService:i})),a.current!==Ht.None&&(h=lM({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:i})),o.current===Ht.None&&a.current===Ht.None&&(p=dM({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const f=e.fetchPages([...p,...h]);s.isDownloadedAsPDForImage&&s.waitForPromise(f)},fM=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-o,u=function(){o=Date.now(),r=0,e.apply(t,n)};r||(c>=i?u():r=setTimeout(u,i-c))}}(hM,100),mM=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,o)}),n)}}(hM,75),gM=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),yM=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:i,isLeftColumn:o,showTotalCellDivider:a})=>{const{styleService:{grid:{border:s,divider:l}}}=aE();return Ws.jsx("div",{style:{...e,...dg,...mg(n,r,s,i),...yg({bottomDivider:a&&o,rightDivider:a&&!o,borderColor:l})},"data-testid":"empty-cell","data-index":t})},bM=({children:e,verticalAlign:t,width:n,right:r})=>Ws.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",overflow:"hidden",flexDirection:"row",alignItems:t,width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,alignSelf:t},children:e}),vM=e=>{const{type:t,imageSize:n}=e;return t!==Dt.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"};function xM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wM=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xM(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})),SM=u(wM);function EM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const CM=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){EM(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})),_M=u(CM),MM=e=>{var t;return!(null===(t=e.target)||void 0===t||null===(t=t.getAttribute("class"))||void 0===t||!t.includes(Kt))},kM=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),i=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&i===e.activeSelection.endIndex)return e;const o={...e.activeSelection,startIndex:r,endIndex:i};return o.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:i}=e,o=new Map(i);for(let e=n;e<=r;e++){const n=t(e);"N"===(null==n?void 0:n.ref.qType)&&o.set(n.ref.qElemNo,n)}return o})(o),{...e,activeSelection:o}}default:return e}};const RM=h({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),AM=()=>n(RM),IM=({children:e,selections:t})=>{const n=function(e){var t,n,r;const{env:i}=rE(),{updatePageInfo:o}=eE(),a=e.isActive(),[l,c]=y(kM,{engineSelectedCells:null,selectedField:null,activeSelection:null});p((()=>{const t=()=>{c({type:"clearSelections"})},n=()=>{t(),o({page:0})};return e.on("deactivated",t),e.on("canceled",t),e.on("confirmed",n),e.on("cleared",t),()=>{e.removeListener("deactivated",t),e.removeListener("canceled",t),e.removeListener("confirmed",n),e.removeListener("cleared",t)}}),[e,o]);const u=d((async()=>{var t,n,r;if(!l.activeSelection)return;1===l.activeSelection.clientSelectedCells.size&&(n=l.engineSelectedCells,(r=l.activeSelection).clientSelectedCells.forEach(((e,t)=>{null!=n&&n.has(t)&&(r.clientSelectedCells.delete(t),n.delete(t))})));const i=new Map([...null!==(t=l.engineSelectedCells)&&void 0!==t?t:new Map,...l.activeSelection.clientSelectedCells]);try{c({type:"mouseup",payload:{engineSelectedCells:i}}),await e.select({method:"selectPivotCells",params:[cE,Array.from(i,(([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x})))]})}catch(e){console.error(e),c({type:"mouseup",payload:{engineSelectedCells:l.engineSelectedCells}})}}),[l,e]);p((()=>{if(l.activeSelection)return document.addEventListener("mouseup",u),()=>{document.removeEventListener("mouseup",u)}}),[u,l.activeSelection]);const h=d(((e,t)=>n=>{const r=t(e);MM(n)||(e=>{var t;return null!==(null===(t=e.target)||void 0===t?void 0:t.closest("[data-prevent-selection]"))})(n)||(e=>{var t;return"A"===(null===(t=e.target)||void 0===t?void 0:t.tagName)})(n)||!(e=>1===e.buttons)(n)||!r||c({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(r.ref.qElemNo,r)},selectedField:{selectionCellType:r.selectionCellType,index:"L"===r.selectionCellType?r.x:r.y}}})}),[]),f=d((t=>i.flags.isEnabled("CLIENT_IM_6223_PIVOT_RANGE_SELECTION")?async()=>{l.activeSelection&&(e.isActive()||await e.begin([cE]),c({type:"mouseover",payload:{index:t}}))}:void 0),[l.activeSelection,e,i]),m=d((e=>{var t,n;return!(!(null!==(t=l.engineSelectedCells)&&void 0!==t&&t.size||null!==(n=l.activeSelection)&&void 0!==n&&n.clientSelectedCells.size)||!l.selectedField||e.selectionCellType===l.selectedField.selectionCellType&&("L"===e.selectionCellType?l.selectedField.index===e.x:l.selectedField.index===e.y))}),[null===(t=l.activeSelection)||void 0===t?void 0:t.clientSelectedCells.size,null===(n=l.engineSelectedCells)||void 0===n?void 0:n.size,l.selectedField]),g=d((e=>{var t,n;return!m(e)&&((null===(t=l.engineSelectedCells)||void 0===t?void 0:t.has(e.ref.qElemNo))||!(null===(n=l.activeSelection)||void 0===n||!n.clientSelectedCells.has(e.ref.qElemNo)))}),[m,null===(r=l.activeSelection)||void 0===r?void 0:r.clientSelectedCells,l.engineSelectedCells]);return s((()=>({isSelected:g,isActive:a,isLocked:m,createMouseDownHandler:h,createMouseOverHandler:f})),[g,a,m,h,f])}(t);return Ws.jsx(RM.Provider,{value:n,children:e})};var LM;!function(e){e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration"}(LM||(LM={}));const DM={brighter:.5,darker:.3,opacity:.03},PM=(e,{cell:t,styleService:n})=>{if(e===LM.Background||e===LM.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},OM=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const i=PM(LM.Background,{cell:n,styleService:e});return!r||!i||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?PM(LM.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${Hm(o=i,DM)} 0px 2px,\n ${o} 0px 4px\n ) border-box`;var o},TM=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:PM(LM.Color,{cell:e,styleService:t}),NM=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,i=PM(LM.FontWeight,{cell:e,styleService:t});return void 0===i&&(r||n)?ig:i},qM=({cell:e,styleService:t})=>PM(LM.FontStyle,{cell:e,styleService:t}),FM=({cell:e,styleService:t})=>PM(LM.TextDecoration,{cell:e,styleService:t}),jM=e=>e?"pointer":"default",zM=({expandOrCollapse:e,cell:t})=>n=>{null==e||e(t.y,t.x),n.stopPropagation()},BM=(e,t)=>{if(!e.isLeftColumn||e.representation.type===Dt.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},WM=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r}=aE(),{interactions:i}=rE(),{isActive:o}=AM(),{dataModel:a}=VC();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const s=!i.active||o||!a,l=TM({cell:e,styleService:r,isCellSelected:n}),c=o?.4:1,u=e.ref.qCanExpand?_M:SM;let d;return d=e.ref.qCanExpand?t?a.expandLeft:a.expandTop:t?a.collapseLeft:a.collapseTop,Ws.jsx(u,{opacity:c,color:l,"data-prevent-selection":!s||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:s?"default":"pointer",...BM(e,r)},onClick:s?void 0:zM({cell:e,expandOrCollapse:d})})},$M=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},HM=e=>{switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";default:return"100%"}},GM=({representation:e,styleService:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:i})=>{const o=`calc(100% - ${n?21:0}px)`,a=i?t.contentCellHeight:t.headerCellHeight,s=i&&void 0!==r?a*Math.max(r,1):a;switch(e.imageSize){case"originalSize":return{maxWidth:o,maxHeight:s};case"fitWidth":return{width:o,maxHeight:s};case"fitHeight":return{height:s,maxWidth:o};case"fill":return{height:s,width:o};default:return{width:o,height:a}}},VM=(e,t)=>{if("alwaysFit"===e)switch(null==t?void 0:t.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},UM=e=>{if("alwaysFit"===e)return"contain"},YM=({representation:e,styleService:t,textStyle:n,canExpandOrCollapse:r,leafCount:i,isLeftColumn:o})=>{const{imageRef:a,onLoad:l}=(()=>{const{downloadService:e}=aE(),t=c(null),{promise:n,resolve:r}=s((()=>kg()),[]);return p((()=>{var i;return e.isDownloadedAsPDForImage&&(e.waitForPromise(n),null!==(i=t.current)&&void 0!==i&&i.complete&&r()),()=>{r()}}),[t,e,n,r]),{onLoad:d((()=>{r()}),[r]),imageRef:t}})(),{url:u,text:h,imageSize:f,resolvedImagePosition:m}=e,{overflow:g,...y}=n;return Ws.jsx("div",{"data-key":"image-container",style:{display:"flex",flexDirection:"column",justifyContent:null==m?void 0:m.vertical,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...GM({representation:e,styleService:t,canExpandOrCollapse:r,leafCount:i,isLeftColumn:o})},children:Ws.jsx("img",{src:u,alt:h,style:{width:HM(f),height:$M(f),objectFit:UM(f),objectPosition:VM(f,m),...y},onLoad:l,ref:a})})},KM=(e,t)=>{if(null!=e&&e.auto)return t;switch(null==e?void 0:e.align){case"center":return"center";case"left":return"flex-start";case"right":return"flex-end";default:return t}},XM={display:"flex",flexDirection:"row",alignItems:"center"},JM={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},ZM=(e,t,n,r)=>t?{...JM,...e.nullValues}:n?{...XM,color:e.totalValues.color,background:null!=r?r:e.totalValues.background}:{...XM,color:e.measureValues.color,background:null!=r?r:e.measureValues.background},QM=(e,t,n,r,i)=>{const{fontFamily:o,fontSize:a}=e.measureValues,s={...pg,...!n&&hg(e.grid.lineClamp),...t&&{color:t},fontFamily:o,fontSize:a};if(i){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:c,textDecoration:u}=e.measureValues;return{...s,fontWeight:void 0===l?ig:l,fontStyle:c,textDecoration:u}},ek=(e,t,n,r)=>{const{textAlign:i}=t,o=r?"flex-end":"center";var a,s;return e.isNull||n.type!==Dt.Image?KM(i,o):null!==(a=null===(s=n.resolvedImagePosition)||void 0===s?void 0:s.horizontal)&&void 0!==a?a:"center"},tk=({cell:e,representation:t,color:n,isNumeric:r,isTotalValueCell:i})=>{const{layoutService:o,styleService:a}=aE(),s=e.isNull?o.getNullValueText():t.text,l=QM(a,n,r,i,e.isNull);return t.type!==Dt.Image||e.isNull?Ws.jsx("span",{style:{padding:4,...l},children:s}):Ws.jsx(YM,{representation:t,styleService:a,textStyle:l,isLeftColumn:!0})},nk=(e,t)=>{var n,r;return null!==(n=null==e||null===(r=e[t])||void 0===r?void 0:r.visibleMeasureInfoIndex)&&void 0!==n?n:0},rk="flex-start",ik=(e,t)=>{return e.isNull?rk:t.type===Dt.Image&&"fill"!==t.imageSize?null===(n=t.resolvedImagePosition)||void 0===n?void 0:n.vertical:rk;var n},ok=({columnIndex:e,rowIndex:t,style:n,data:r})=>{var i;const{env:o}=rE(),{pageInfo:a}=eE(),{styleService:s,layoutService:l}=aE(),{attrExprInfoIndexes:c,gridSectionsData:{measureData:u,leftDimensionData:p,topDimensionData:h},visibleDimensionsInfo:{visibleLeftDimensionInfo:f,visibleTopDimensionInfo:m}}=VC(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=aE(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:i}}=VC(),o=r.length,a=i.length;return d(((r,i)=>{var s,l;return!!(null!==(s=n.grid.at(a-1))&&void 0!==s&&null!==(s=s[r])&&void 0!==s&&s.isTotal||null!==(l=t.grid.at(e?0:o-1))&&void 0!==l&&null!==(l=l[i])&&void 0!==l&&l.isTotal)}),[n,t,o,a,e])})(),y=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=VC(),n=t.length;return d((t=>{var r;const i=null===(r=e.grid.at(n-1))||void 0===r?void 0:r[t];return gM(i,e.totalDividerIndex)}),[e,n])})(),b=(()=>{const{layoutService:{isIndentModeEnabled:e}}=aE(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=VC(),r=n.length;return d((n=>{var i;const o=e?0:r-1,a=null===(i=t.grid.at(o))||void 0===i?void 0:i[n];return gM(a,t.totalDividerIndex,e)}),[t,e,r])})(),{showLastBorder:v}=r,x=h.grid.at(m.length-1),w=p.grid.at(f.length-1),{background:S}=s.measureValues,E=null===(i=u[t])||void 0===i?void 0:i[e],C=t===a.rowsOnCurrentPage-1,_=e===l.size.x-1;if(!E)return Ws.jsx(yM,{style:{...n,background:S},isLastRow:C,isLastColumn:_,showLastBorder:v,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const M=l.hasPseudoDimOnLeft?nk(w,t):nk(x,e),k=l.visibleMeasureInfo[M],R=EC({cell:E.ref,representationProperties:l.isIndentModeEnabled?{type:Dt.Text}:k.representation,attrExprInfoIndex:c.measures[M],env:o}),A=!E.isNull&&g(e,t),I=E.isNull?l.getNullValueText():R.text,L=!E.isNull||!Number.isNaN(+I),D=CC(c.measures[M],E.ref),P={...ZM(s,E.isNull,A,D.background),...mg(C,_,s.grid.border,v),...yg({bottomDivider:b(t),rightDivider:y(e),borderColor:s.grid.divider}),...dg,padding:"0px 4px",display:"flex",justifyContent:ek(E,k,R,L)};return Ws.jsx("div",{className:Ut,title:I,style:{...P,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:Ws.jsx(bM,{width:vM(R),verticalAlign:ik(E,R),children:Ws.jsx(tk,{cell:E,representation:R,isNumeric:L,isTotalValueCell:A,color:D.color})})})};var ak=t.memo(ok,tM);const sk=(e,t)=>{var n,r;return null!==(n=null===(r=t.list[e])||void 0===r?void 0:r.id)&&void 0!==n?n:e.toString()},lk=({columnIndex:e,rowIndex:t,data:n})=>{var r,i;return null!==(r=null===(i=n.grid[t])||void 0===i||null===(i=i[e])||void 0===i?void 0:i.id)&&void 0!==r?r:`${t}-${e}`},ck={...ug,overflow:"hidden",boxSizing:"content-box",borderWidth:"1px 0px 0px 1px"},uk=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:i,getRightGridColumnWidth:o,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l}=eE(),{layoutService:c,styleService:{grid:{divider:u},contentCellHeight:p}}=aE(),{dataModel:h,gridSectionsData:{measureData:f}}=VC(),g={...ck,borderColor:u,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},y=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=eE(),{downloadService:r,viewService:i,layoutService:o}=aE(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=VC(),u=s.columnCount,p=l.rowCount;return d((async({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:d,overscanRowStopIndex:h})=>{i.gridColumnStartIndex=s,i.gridRowStartIndex=d,i.gridWidth=l-s+1,i.gridHeight=h-d+1;const f=i.gridWidth+u+(t.current===Ht.None?0:nM),m=i.gridHeight+p+(e.current===Ht.None?0:nM);let g=fM;m*f>1500&&(g=mM),g(a,o,c,n,i,e,t,r)}),[i,o,a,c,e,t,n,u,p,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return $g((()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)}),[e,h,f]),m((()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})}),[r,t,e,p]),0===c.size.x?null:Ws.jsx($_,{"data-section-id":"DATA_GRID",ref:e,style:g,columnCount:c.size.x,columnWidth:o,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:i,grid:f},onItemsRendered:y,estimatedRowHeight:n(),estimatedColumnWidth:o(),itemKey:lk,children:ak})};var dk=f(uk);function pk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const hk=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pk(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),t.createElement("use",{fillRule:"evenodd"})),fk=u(hk),mk=e=>{const[t,n]=l(!1);return $g((()=>{n(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},gk=()=>{const[e,t]=l(!1),{dataModel:n}=VC(),{interactions:r}=rE(),{isAdjustingWidth:i,setIsAdjustingWidth:o}=mk([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||MM(e)||i||t(!0)},setIsAdjustingWidth:o}};function yk(e,t){var n,r;const i=null!==(n=null===(r=t.expressionColor)||void 0===r?void 0:r.background)&&void 0!==n?n:e.dimensionValues.background,o=t.isLeftColumn?e.header.background:i,a=o===sg.Transparent?hf.WHITE:o,s=fe(e.grid.border),l=fe(a);return l.isInvalid()||s.isInvalid()||1===s.a?e.grid.border:function(e,t,n){return fe(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(l,s,s.a).getRGB()}const bk=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:i,shouldApplyIndentModeColumnWidth:o,tableWidth:a})=>{var s;const{interactions:c,translator:u}=rE(),{isActive:d}=AM(),{dataModel:p}=VC(),{styleService:h}=aE(),[,f]=l({});if(!(e.canBeResized&&!!c.active&&!d))return null;const m=yk(h,e);return Ws.jsx(Qx,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:m,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{var n;o?p.applyIndentModeColumnWidth({...t,pixels:Math.min((null!=a?a:0)*KC,null!==(n=t.pixels)&&void 0!==n?n:0)}):p.applyColumnWidth(t,e)},setIsAdjustingWidth:i,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:null!==(s=e.label)&&void 0!==s?s:""},direction:"ltr"})};function vk(e){return dv(e)}const xk=e=>e.scrollTop;function wk(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof o?o[t.mode]:o,delay:a.transitionDelay}}function Sk(e){return gb("MuiPaper",e)}yb("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Ek=["className","component","elevation","square","variant"],Ck=Vx("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return dn({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&dn({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${Sv("#fff",Kx(t.elevation))}, ${Sv("#fff",Kx(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),_k=e.forwardRef((function(e,t){const n=vk({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=bn(n,Ek),c=dn({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return Kb({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Sk,i)})(c);return Ws.jsx(Ck,dn({as:i,ownerState:c,className:Ma(u.root,r),ref:t},l))}));var Mk=_k;var kk=yb("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const Rk=["center","classes","className"];let Ak,Ik,Lk,Dk,Pk=e=>e;const Ok=Bo(Ak||(Ak=Pk`
102
102
  0% {
103
103
  transform: scale(0);
104
104
  opacity: 0.1;
@@ -171,6 +171,6 @@ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,p=e.le
171
171
  animation-iteration-count: infinite;
172
172
  animation-delay: 200ms;
173
173
  }
174
- `),kk.rippleVisible,Ok,550,(({theme:e})=>e.transitions.easing.easeInOut),kk.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),kk.child,kk.childLeaving,Tk,550,(({theme:e})=>e.transitions.easing.easeInOut),kk.childPulsate,Nk,(({theme:e})=>e.transitions.easing.easeInOut)),jk=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=r,s=bn(r,Rk),[l,c]=e.useState([]),u=e.useRef(0),d=e.useRef(null);e.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const p=e.useRef(!1),h=Fb(),f=e.useRef(null),m=e.useRef(null),g=e.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;c((e=>[...e,Ws.jsx(Fk,{classes:{ripple:Ma(o.ripple,kk.ripple),rippleVisible:Ma(o.rippleVisible,kk.rippleVisible),ripplePulsate:Ma(o.ripplePulsate,kk.ripplePulsate),child:Ma(o.child,kk.child),childLeaving:Ma(o.childLeaving,kk.childLeaving),childPulsate:Ma(o.childPulsate,kk.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,d.current=a}),[o]),y=e.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},h.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[i,g,h]),b=e.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=e.useCallback(((e,t)=>{if(h.clear(),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void h.start(0,(()=>{v(e,t)}));f.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[h]);return e.useImperativeHandle(n,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),Ws.jsx(qk,dn({className:Ma(kk.root,o.root,a),ref:m},s,{children:Ws.jsx(Xc,{component:null,exit:!0,children:l})}))}));var zk=jk;function Bk(e){return gb("MuiButtonBase",e)}var Wk=yb("MuiButtonBase",["root","disabled","focusVisible"]);const $k=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Hk=Vx("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Wk.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Gk=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:h="a",onBlur:f,onClick:m,onContextMenu:g,onDragLeave:y,onFocus:b,onFocusVisible:v,onKeyDown:x,onKeyUp:w,onMouseDown:S,onMouseLeave:E,onMouseUp:C,onTouchEnd:_,onTouchMove:M,onTouchStart:k,tabIndex:R=0,TouchRippleProps:A,touchRippleRef:I,type:L}=r,D=bn(r,$k),P=e.useRef(null),O=e.useRef(null),T=Ob(O,I),{isFocusVisibleRef:N,onFocus:q,onBlur:F,ref:j}=Ub(),[z,B]=e.useState(!1);c&&z&&B(!1),e.useImperativeHandle(i,(()=>({focusVisible:()=>{B(!0),P.current.focus()}})),[]);const[W,$]=e.useState(!1);e.useEffect((()=>{$(!0)}),[]);const H=W&&!u&&!c;function G(e,t,n=d){return Pb((r=>{t&&t(r);return!n&&O.current&&O.current[e](r),!0}))}e.useEffect((()=>{z&&p&&!u&&W&&O.current.pulsate()}),[u,p,z,W]);const V=G("start",S),U=G("stop",g),Y=G("stop",y),K=G("stop",C),X=G("stop",(e=>{z&&e.preventDefault(),E&&E(e)})),J=G("start",k),Z=G("stop",_),Q=G("stop",M),ee=G("stop",(e=>{F(e),!1===N.current&&B(!1),f&&f(e)}),!1),te=Pb((e=>{P.current||(P.current=e.currentTarget),q(e),!0===N.current&&(B(!0),v&&v(e)),b&&b(e)})),ne=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=e.useRef(!1),ie=Pb((e=>{p&&!re.current&&z&&O.current&&" "===e.key&&(re.current=!0,O.current.stop(e,(()=>{O.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))})),oe=Pb((e=>{p&&" "===e.key&&O.current&&z&&!e.defaultPrevented&&(re.current=!1,O.current.stop(e,(()=>{O.current.pulsate(e)}))),w&&w(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let ae=l;"button"===ae&&(D.href||D.to)&&(ae=h);const se={};"button"===ae?(se.type=void 0===L?"button":L,se.disabled=c):(D.href||D.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=Ob(n,j,P),ce=dn({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:R,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=Kb({root:["root",t&&"disabled",n&&"focusVisible"]},Bk,i);return n&&r&&(o.root+=` ${r}`),o})(ce);return Ws.jsxs(Hk,dn({as:ae,className:Ma(ue.root,s),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:U,onFocus:te,onKeyDown:ie,onKeyUp:oe,onMouseDown:V,onMouseLeave:X,onMouseUp:K,onDragLeave:Y,onTouchEnd:Z,onTouchMove:Q,onTouchStart:J,ref:le,tabIndex:c?-1:R,type:L},se,D,{children:[a,H?Ws.jsx(zk,dn({ref:T,center:o},A)):null]}))}));var Vk=Gk;function Uk(e){return gb("MuiTypography",e)}yb("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Yk=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Kk=Vx("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${ay(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>dn({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),Xk={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Jk={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Zk=e.forwardRef((function(e,t){const n=vk({props:e,name:"MuiTypography"}),r=(e=>Jk[e]||e)(n.color),i=ub(dn({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Xk}=i,h=bn(i,Yk),f=dn({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=s||(u?"p":p[d]||Xk[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return Kb({root:["root",o,"inherit"!==e.align&&`align${ay(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},Uk,a)})(f);return Ws.jsx(Kk,dn({as:m,ref:t,ownerState:f,className:Ma(g.root,a)},h))}));var Qk=Zk;const eR=e.forwardRef((function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=e.useState(null),l=Ob(e.isValidElement(r)?tv(r):null,n);if(Cb((()=>{o||s(function(e){return"function"==typeof e?e():e}(i)||document.body)}),[i,o]),Cb((()=>{if(a&&!o)return Db(n,a),()=>{Db(n,null)}}),[n,a,o]),o){if(e.isValidElement(r)){const t={ref:l};return e.cloneElement(r,t)}return Ws.jsx(e.Fragment,{children:r})}return Ws.jsx(e.Fragment,{children:a?q.createPortal(r,a):a})}));var tR=eR;const nR=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],rR={entering:{opacity:1},entered:{opacity:1}},iR=e.forwardRef((function(t,n){const r=mx(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:h,onExited:f,onExiting:m,style:g,timeout:y=i,TransitionComponent:b=Hc}=t,v=bn(t,nR),x=e.useRef(null),w=Ob(x,tv(s),n),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(p),C=S(((e,t)=>{xk(e);const n=wk({style:g,timeout:y,easing:l},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),u&&u(e,t)})),_=S(d),M=S(m),k=S((e=>{const t=wk({style:g,timeout:y,easing:l},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),h&&h(e)})),R=S(f);return Ws.jsx(b,dn({appear:a,in:c,nodeRef:x,onEnter:C,onEntered:_,onEntering:E,onExit:k,onExited:R,onExiting:M,addEndListener:e=>{o&&o(x.current,e)},timeout:y},v,{children:(t,n)=>e.cloneElement(s,dn({style:dn({opacity:0,visibility:"exited"!==t||c?void 0:"hidden"},rR[t],g,s.props.style),ref:w},n))}))}));var oR=iR;function aR(e){return gb("MuiBackdrop",e)}yb("MuiBackdrop",["root","invisible"]);const sR=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],lR=Vx("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>dn({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),cR=e.forwardRef((function(e,t){var n,r,i;const o=vk({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:h={},slots:f={},TransitionComponent:m=oR,transitionDuration:g}=o,y=bn(o,sR),b=dn({},o,{component:l,invisible:d}),v=(e=>{const{classes:t,invisible:n}=e;return Kb({root:["root",n&&"invisible"]},aR,t)})(b),x=null!=(n=h.root)?n:u.root;return Ws.jsx(m,dn({in:p,timeout:g},y,{children:Ws.jsx(lR,dn({"aria-hidden":!0},x,{as:null!=(r=null!=(i=f.root)?i:c.Root)?r:l,className:Ma(v.root,s,null==x?void 0:x.className),ownerState:dn({},b,null==x?void 0:x.ownerState),classes:v,ref:t,children:a}))}))}));var uR=cR;var dR=yb("MuiBox",["root"]);const pR=hx(),hR=function(t={}){const{themeId:n,defaultTheme:r,defaultClassName:i="MuiBox-root",generateClassName:o}=t,a=Go("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(tb),s=e.forwardRef((function(e,t){const s=lb(r),l=ub(e),{className:c,component:u="div"}=l,d=bn(l,fb);return Ws.jsx(a,dn({as:u,ref:t,className:Ma(c,o?o(i):i),theme:n&&s[n]||s},d))}));return s}({themeId:Yg,defaultTheme:pR,defaultClassName:dR.root,generateClassName:hb.generate});var fR=hR;function mR(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function gR(e){return parseInt(Lb(e).getComputedStyle(e).paddingRight,10)||0}function yR(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&mR(e,i)}))}function bR(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function vR(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Ib(e);return t.body===e?Lb(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Yb(Ib(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${gR(r)+e}px`;const t=Ib(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${gR(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=Ib(r).body;else{const t=r.parentElement,n=Lb(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const xR=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function wR(e){const t=[],n=[];return Array.from(e.querySelectorAll(xR)).forEach(((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function SR(){return!0}function ER(t){const{children:n,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:o=!1,getTabbable:a=wR,isEnabled:s=SR,open:l}=t,c=e.useRef(!1),u=e.useRef(null),d=e.useRef(null),p=e.useRef(null),h=e.useRef(null),f=e.useRef(!1),m=e.useRef(null),g=Ob(tv(n),m),y=e.useRef(null);e.useEffect((()=>{l&&m.current&&(f.current=!r)}),[r,l]),e.useEffect((()=>{if(!l||!m.current)return;const e=Ib(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),f.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}}),[l]),e.useEffect((()=>{if(!l||!m.current)return;const e=Ib(m.current),t=t=>{y.current=t,!i&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(i&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(m.current)),n.length>0){var r,o;const e=Boolean((null==(r=y.current)?void 0:r.shiftKey)&&"Tab"===(null==(o=y.current)?void 0:o.key)),t=n[0],i=n[n.length-1];"string"!=typeof t&&"string"!=typeof i&&(e?i.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[r,i,o,s,l,a]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0};return Ws.jsxs(e.Fragment,{children:[Ws.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),e.cloneElement(n,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0,h.current=e.target;const t=n.props.onFocus;t&&t(e)}}),Ws.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const CR=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&mR(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);yR(t,e.mount,e.modalRef,r,!0);const i=bR(this.containers,(e=>e.container===t));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=bR(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=vR(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=bR(this.containers,(t=>-1!==t.modals.indexOf(e))),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&mR(e.modalRef,t),yR(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&mR(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function _R(t){const{container:n,disableEscapeKeyDown:r=!1,disableScrollLock:i=!1,manager:o=CR,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:p}=t,h=e.useRef({}),f=e.useRef(null),m=e.useRef(null),g=Ob(m,p),[y,b]=e.useState(!d),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;"false"!==t["aria-hidden"]&&!1!==t["aria-hidden"]||(x=!1);const w=()=>(h.current.modalRef=m.current,h.current.mount=f.current,h.current),S=()=>{o.mount(w(),{disableScrollLock:i}),m.current&&(m.current.scrollTop=0)},E=Pb((()=>{const e=function(e){return"function"==typeof e?e():e}(n)||Ib(f.current).body;o.add(w(),e),m.current&&S()})),C=e.useCallback((()=>o.isTopModal(w())),[o]),_=Pb((e=>{f.current=e,e&&(d&&C()?S():m.current&&mR(m.current,x))})),M=e.useCallback((()=>{o.remove(w(),x)}),[x,o]);e.useEffect((()=>()=>{M()}),[M]),e.useEffect((()=>{d?E():v&&a||M()}),[d,M,v,a,E]);const k=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&C()&&(r||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},R=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(e={})=>{const n=Jb(t);delete n.onTransitionEnter,delete n.onTransitionExited;const r=dn({},n,e);return dn({role:"presentation"},r,{onKeyDown:k(r),ref:g})},getBackdropProps:(e={})=>dn({"aria-hidden":!0},e,{onClick:R(e),open:d}),getTransitionProps:()=>({onEnter:Ab((()=>{b(!1),s&&s()}),null==c?void 0:c.props.onEnter),onExited:Ab((()=>{b(!0),l&&l(),a&&M()}),null==c?void 0:c.props.onExited)}),rootRef:g,portalRef:_,isTopModal:C,exited:y,hasTransition:v}}function MR(e){return gb("MuiModal",e)}yb("MuiModal",["root","hidden","backdrop"]);const kR=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],RR=Vx("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>dn({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),AR=Vx(uR,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),IR=e.forwardRef((function(t,n){var r,i,o,a,s,l;const c=vk({name:"MuiModal",props:t}),{BackdropComponent:u=AR,BackdropProps:d,className:p,closeAfterTransition:h=!1,children:f,container:m,component:g,components:y={},componentsProps:b={},disableAutoFocus:v=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:w=!1,disablePortal:S=!1,disableRestoreFocus:E=!1,disableScrollLock:C=!1,hideBackdrop:_=!1,keepMounted:M=!1,onBackdropClick:k,open:R,slotProps:A,slots:I}=c,L=bn(c,kR),D=dn({},c,{closeAfterTransition:h,disableAutoFocus:v,disableEnforceFocus:x,disableEscapeKeyDown:w,disablePortal:S,disableRestoreFocus:E,disableScrollLock:C,hideBackdrop:_,keepMounted:M}),{getRootProps:P,getBackdropProps:O,getTransitionProps:T,portalRef:N,isTopModal:q,exited:F,hasTransition:j}=_R(dn({},D,{rootRef:n})),z=dn({},D,{exited:F}),B=(e=>{const{open:t,exited:n,classes:r}=e;return Kb({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},MR,r)})(z),W={};if(void 0===f.props.tabIndex&&(W.tabIndex="-1"),j){const{onEnter:e,onExited:t}=T();W.onEnter=e,W.onExited=t}const $=null!=(r=null!=(i=null==I?void 0:I.root)?i:y.Root)?r:RR,H=null!=(o=null!=(a=null==I?void 0:I.backdrop)?a:y.Backdrop)?o:u,G=null!=(s=null==A?void 0:A.root)?s:b.root,V=null!=(l=null==A?void 0:A.backdrop)?l:b.backdrop,U=ev({elementType:$,externalSlotProps:G,externalForwardedProps:L,getSlotProps:P,additionalProps:{ref:n,as:g},ownerState:z,className:Ma(p,null==G?void 0:G.className,null==B?void 0:B.root,!z.open&&z.exited&&(null==B?void 0:B.hidden))}),Y=ev({elementType:H,externalSlotProps:V,additionalProps:d,getSlotProps:e=>O(dn({},e,{onClick:t=>{k&&k(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Ma(null==V?void 0:V.className,null==d?void 0:d.className,null==B?void 0:B.backdrop),ownerState:z});return M||R||j&&!F?Ws.jsx(tR,{ref:N,container:m,disablePortal:S,children:Ws.jsxs($,dn({},U,{children:[!_&&u?Ws.jsx(H,dn({},Y)):null,Ws.jsx(ER,{disableEnforceFocus:x,disableAutoFocus:v,disableRestoreFocus:E,isEnabled:q,open:R,children:e.cloneElement(f,W)})]}))}):null}));var LR=IR;var DR=yb("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const PR=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function OR(e){return`scale(${e}, ${e**2})`}const TR={entering:{opacity:1,transform:OR(1)},entered:{opacity:1,transform:"none"}},NR="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),qR=e.forwardRef((function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:h,style:f,timeout:m="auto",TransitionComponent:g=Hc}=t,y=bn(t,PR),b=Fb(),v=e.useRef(),x=mx(),w=e.useRef(null),S=Ob(w,tv(o),n),E=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},C=E(u),_=E(((e,t)=>{xk(e);const{duration:n,delay:r,easing:i}=wk({style:f,timeout:m,easing:a},{mode:"enter"});let o;"auto"===m?(o=x.transitions.getAutoHeightDuration(e.clientHeight),v.current=o):o=n,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:r}),x.transitions.create("transform",{duration:NR?o:.666*o,delay:r,easing:i})].join(","),l&&l(e,t)})),M=E(c),k=E(h),R=E((e=>{const{duration:t,delay:n,easing:r}=wk({style:f,timeout:m,easing:a},{mode:"exit"});let i;"auto"===m?(i=x.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:n}),x.transitions.create("transform",{duration:NR?i:.666*i,delay:NR?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=OR(.75),d&&d(e)})),A=E(p);return Ws.jsx(g,dn({appear:i,in:s,nodeRef:w,onEnter:_,onEntered:M,onEntering:C,onExit:R,onExited:A,onExiting:k,addEndListener:e=>{"auto"===m&&b.start(v.current||0,e),r&&r(w.current,e)},timeout:"auto"===m?null:m},y,{children:(t,n)=>e.cloneElement(o,dn({style:dn({opacity:0,transform:OR(.75),visibility:"exited"!==t||s?void 0:"hidden"},TR[t],f,o.props.style),ref:S},n))}))}));qR.muiSupportAuto=!0;var FR=qR;function jR(e){return gb("MuiLink",e)}var zR=yb("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);const BR={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var WR=({theme:e,ownerState:t})=>{const n=(e=>BR[e]||e)(t.color),r=ly(e,`palette.${n}`,!1)||t.color,i=ly(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:Sv(r,.4)};const $R=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],HR=Vx(Qk,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${ay(n.underline)}`],"button"===n.component&&t.button]}})((({theme:e,ownerState:t})=>dn({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&dn({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:WR({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${zR.focusVisible}`]:{outline:"auto"}}))),GR=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiLink"}),{className:i,color:o="primary",component:a="a",onBlur:s,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=r,h=bn(r,$R),{isFocusVisibleRef:f,onBlur:m,onFocus:g,ref:y}=Ub(),[b,v]=e.useState(!1),x=Ob(n,y),w=dn({},r,{color:o,component:a,focusVisible:b,underline:u,variant:d}),S=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e;return Kb({root:["root",`underline${ay(i)}`,"button"===n&&"button",r&&"focusVisible"]},jR,t)})(w);return Ws.jsx(HR,dn({color:o,className:Ma(S.root,i),classes:c,component:a,onBlur:e=>{m(e),!1===f.current&&v(!1),s&&s(e)},onFocus:e=>{g(e),!0===f.current&&v(!0),l&&l(e)},ref:x,ownerState:w,variant:d,sx:[...Object.keys(BR).includes(o)?[]:[{color:o}],...Array.isArray(p)?p:[p]]},h))}));var VR=GR;var UR=e.createContext({});function YR(e){return gb("MuiList",e)}yb("MuiList",["root","padding","dense","subheader"]);const KR=["children","className","component","dense","disablePadding","subheader"],XR=Vx("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>dn({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),JR=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=r,u=bn(r,KR),d=e.useMemo((()=>({dense:s})),[s]),p=dn({},r,{component:a,dense:s,disablePadding:l}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Kb({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},YR,t)})(p);return Ws.jsx(UR.Provider,{value:d,children:Ws.jsxs(XR,dn({as:a,className:Ma(h.root,o),ref:n,ownerState:p},u,{children:[c,i]}))})}));var ZR=JR;var QR=yb("MuiListItemIcon",["root","alignItemsFlexStart"]);var eA=yb("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const tA=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nA(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function rA(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function iA(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function oA(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&iA(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const aA=e.forwardRef((function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,p=bn(t,tA),h=e.useRef(null),f=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Cb((()=>{i&&h.current.focus()}),[i]),e.useImperativeHandle(r,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&n){const n=`${Yb(Ib(e))}px`;h.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,h.current.style.width=`calc(100% + ${n})`}return h.current}})),[]);const m=Ob(h,n);let g=-1;e.Children.forEach(a,((t,n)=>{e.isValidElement(t)?(t.props.disabled||("selectedMenu"===d&&t.props.selected||-1===g)&&(g=n),g===n&&(t.props.disabled||t.props.muiSkipListHighlight||t.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===n&&(g+=1,g>=a.length&&(g=-1))}));const y=e.Children.map(a,((t,n)=>{if(n===g){const n={};return o&&(n.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===d&&(n.tabIndex=0),e.cloneElement(t,n)}return t}));return Ws.jsx(ZR,dn({role:"menu",ref:m,className:s,onKeyDown:e=>{const t=h.current,n=e.key,r=Ib(t).activeElement;if("ArrowDown"===n)e.preventDefault(),oA(t,r,c,l,nA);else if("ArrowUp"===n)e.preventDefault(),oA(t,r,c,l,rA);else if("Home"===n)e.preventDefault(),oA(t,null,c,l,nA);else if("End"===n)e.preventDefault(),oA(t,null,c,l,rA);else if(1===n.length){const i=f.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const s=r&&!i.repeating&&iA(r,i);i.previousKeyMatched&&(s||oA(t,r,!1,l,nA,i))?e.preventDefault():i.previousKeyMatched=!1}u&&u(e)},tabIndex:i?0:-1},p,{children:y}))}));var sA=aA;function lA(e){return gb("MuiPopover",e)}yb("MuiPopover",["root","paper"]);const cA=["onEntering"],uA=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],dA=["slotProps"];function pA(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function hA(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function fA(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function mA(e){return"function"==typeof e?e():e}const gA=Vx(LR,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yA=Vx(Mk,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),bA=e.forwardRef((function(t,n){var r,i,o;const a=vk({props:t,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:h,container:f,elevation:m=8,marginThreshold:g=16,open:y,PaperProps:b={},slots:v,slotProps:x,transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:S=FR,transitionDuration:E="auto",TransitionProps:{onEntering:C}={},disableScrollLock:_=!1}=a,M=bn(a.TransitionProps,cA),k=bn(a,uA),R=null!=(r=null==x?void 0:x.paper)?r:b,A=e.useRef(),I=Ob(A,R.ref),L=dn({},a,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:g,externalPaperSlotProps:R,transformOrigin:w,TransitionComponent:S,transitionDuration:E,TransitionProps:M}),D=(e=>{const{classes:t}=e;return Kb({root:["root"],paper:["paper"]},lA,t)})(L),P=e.useCallback((()=>{if("anchorPosition"===d)return u;const e=mA(l),t=(e&&1===e.nodeType?e:Ib(A.current).body).getBoundingClientRect();return{top:t.top+pA(t,c.vertical),left:t.left+hA(t,c.horizontal)}}),[l,c.horizontal,c.vertical,u,d]),O=e.useCallback((e=>({vertical:pA(e,w.vertical),horizontal:hA(e,w.horizontal)})),[w.horizontal,w.vertical]),T=e.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=O(t);if("none"===d)return{top:null,left:null,transformOrigin:fA(n)};const r=P();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,s=o+t.width,c=Lb(mA(l)),u=c.innerHeight-g,p=c.innerWidth-g;if(null!==g&&i<g){const e=i-g;i-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;i-=e,n.vertical+=e}if(null!==g&&o<g){const e=o-g;o-=e,n.horizontal+=e}else if(s>p){const e=s-p;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:fA(n)}}),[l,d,P,O,g]),[N,q]=e.useState(y),F=e.useCallback((()=>{const e=A.current;if(!e)return;const t=T(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,q(!0)}),[T]);e.useEffect((()=>(_&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F))),[l,_,F]);e.useEffect((()=>{y&&F()})),e.useImperativeHandle(s,(()=>y?{updatePosition:()=>{F()}}:null),[y,F]),e.useEffect((()=>{if(!y)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}((()=>{F()})),t=Lb(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,y,F]);let j=E;"auto"!==E||S.muiSupportAuto||(j=void 0);const z=f||(l?Ib(mA(l)).body:void 0),B=null!=(i=null==v?void 0:v.root)?i:gA,W=null!=(o=null==v?void 0:v.paper)?o:yA,$=ev({elementType:W,externalSlotProps:dn({},R,{style:N?R.style:dn({},R.style,{opacity:0})}),additionalProps:{elevation:m,ref:I},ownerState:L,className:Ma(D.paper,null==R?void 0:R.className)}),H=ev({elementType:B,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:k,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:z,open:y},ownerState:L,className:Ma(D.root,h)}),{slotProps:G}=H,V=bn(H,dA);return Ws.jsx(B,dn({},V,!Xb(B)&&{slotProps:G,disableScrollLock:_},{children:Ws.jsx(S,dn({appear:!0,in:y,onEntering:(e,t)=>{C&&C(e,t),F()},onExited:()=>{q(!1)},timeout:j},M,{children:Ws.jsx(W,dn({},$,{children:p}))}))}))}));var vA=bA;function xA(e){return gb("MuiMenu",e)}yb("MuiMenu",["root","paper","list"]);const wA=["onEntering"],SA=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],EA={vertical:"top",horizontal:"right"},CA={vertical:"top",horizontal:"left"},_A=Vx(vA,{shouldForwardProp:e=>Gx(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),MA=Vx(yA,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),kA=Vx(sA,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),RA=e.forwardRef((function(t,n){var r,i;const o=vk({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:h={},PopoverClasses:f,transitionDuration:m="auto",TransitionProps:{onEntering:g}={},variant:y="selectedMenu",slots:b={},slotProps:v={}}=o,x=bn(o.TransitionProps,wA),w=bn(o,SA),S=(()=>{const t=e.useContext(sv);return null!=t&&t})(),E=dn({},o,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:g,PaperProps:h,transitionDuration:m,TransitionProps:x,variant:y}),C=(e=>{const{classes:t}=e;return Kb({root:["root"],paper:["paper"],list:["list"]},xA,t)})(E),_=a&&!c&&p,M=e.useRef(null);let k=-1;e.Children.map(s,((t,n)=>{e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===y&&t.props.selected||-1===k)&&(k=n))}));const R=null!=(r=b.paper)?r:MA,A=null!=(i=v.paper)?i:h,I=ev({elementType:b.root,externalSlotProps:v.root,ownerState:E,className:[C.root,l]}),L=ev({elementType:R,externalSlotProps:A,ownerState:E,className:C.paper});return Ws.jsx(_A,dn({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?EA:CA,slots:{paper:R,root:b.root},slotProps:{root:I,paper:L},open:p,ref:n,transitionDuration:m,TransitionProps:dn({onEntering:(e,t)=>{M.current&&M.current.adjustStyleForScrollbar(e,{direction:S?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:E},w,{classes:f,children:Ws.jsx(kA,dn({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:M,autoFocus:a&&(-1===k||c),autoFocusItem:_,variant:y},u,{className:Ma(C.list,u.className),children:s}))}))}));var AA=RA;function IA(e){return gb("MuiMenuItem",e)}var LA=yb("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const DA=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],PA=Vx(Vk,{shouldForwardProp:e=>Gx(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>dn({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${LA.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Sv(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${LA.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Sv(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${LA.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Sv(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Sv(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${LA.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${LA.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${DR.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${DR.inset}`]:{marginLeft:52},[`& .${eA.root}`]:{marginTop:0,marginBottom:0},[`& .${eA.inset}`]:{paddingLeft:36},[`& .${QR.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&dn({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${QR.root} svg`]:{fontSize:"1.25rem"}})))),OA=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=r,h=bn(r,DA),f=e.useContext(UR),m=e.useMemo((()=>({dense:a||f.dense||!1,disableGutters:l})),[f.dense,a,l]),g=e.useRef(null);Cb((()=>{i&&g.current&&g.current.focus()}),[i]);const y=dn({},r,{dense:m.dense,divider:s,disableGutters:l}),b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e;return dn({},a,Kb({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},IA,a))})(r),v=Ob(g,n);let x;return r.disabled||(x=void 0!==d?d:-1),Ws.jsx(UR.Provider,{value:m,children:Ws.jsx(PA,dn({ref:v,role:u,tabIndex:x,component:o,focusVisibleClassName:Ma(b.focusVisible,c),className:Ma(b.root,p)},h,{ownerState:y,classes:b}))})}));var TA=OA;const NA=Vx(fR,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})((({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:i})=>({pointerEvents:i?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&i?n:t}}))),qA=Vx("div")({position:"absolute",left:0,bottom:0}),FA=Vx("div",{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({...cg,justifyContent:null!=e?e:cg.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8}))),jA=Vx("div")((()=>({...cg}))),zA=Vx("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})((({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:i,justifyContent:o})=>({display:"flex",justifyContent:o,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:i}))),BA=Vx(AA)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),WA=Vx(TA,{shouldForwardProp:e=>!["isActive"].includes(e)})((({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:`${e.spacing(.5)}`,margin:`${e.spacing(.25,.5)}`,padding:`${e.spacing(1,1.5)}`,display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}}))),$A=Vx("span")({textOverflow:"ellipsis",overflow:"hidden"}),HA=Vx("div",{shouldForwardProp:e=>"visible"!==e})((({visible:e})=>({opacity:e?1:0,width:20,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})));var GA;!function(e){e.Expand="Expand",e.Collapse="Collapse"}(GA||(GA={}));const VA=(e,t)=>({qExcludeList:t===GA.Expand,qPos:{qDimName:e,qElemNo:[]}}),UA=({qDimName:e,oldExpansionState:t=[],action:n})=>{const r=t.some((t=>{var n;return(null===(n=t.qPos)||void 0===n?void 0:n.qDimName)===e}));return r?((e,t,n)=>e.map((e=>((e,t)=>{var n;return(null===(n=e.qPos)||void 0===n?void 0:n.qDimName)===t})(e,t)?VA(t,n):e)))(t,e,n):[...t,VA(e,n)]},YA=({model:e,qExpansionState:t,qDimName:n,action:r})=>async()=>{const i=UA({qDimName:n,oldExpansionState:t,action:r});await(async({model:e,oldExpansionState:t,newExpansionState:n,errorMsg:r})=>{try{const r=[{qPath:`${cE}/qExpansionState`,qOp:t?"Replace":"Add",qValue:JSON.stringify(n)}];await e.applyPatches(r,!0)}catch(e){console.error(r,e)}})({model:e,oldExpansionState:t,newExpansionState:i,errorMsg:`Failed to ${r} dimension`})},KA=({model:e,effectivePropertiesService:t,cell:n,env:r})=>{if(!r.flags.isEnabled("CLIENT_IM_6273_EXPAND_OR_COLLAPSE_DIM"))return;const i={model:e,qExpansionState:t.qExpansionState,qDimName:n.fieldId};return{expandCallback:YA({...i,action:GA.Expand}),collapseCallback:YA({...i,action:GA.Collapse})}},XA={[hS.Sorting]:!0,[hS.Selections]:!0,[hS.Searching]:!0},JA=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:i,changeSortOrder:o,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:l,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{var p;const h=c(null),{styleService:f,layoutService:m,effectivePropertiesService:g}=aE(),{app:y,interactions:b,embed:v,translator:x,env:w,model:S}=rE(),{fontSize:E,fontFamily:C,fontStyle:_,fontWeight:M,textDecoration:k,color:R,background:A,hoverBackground:I,activeBackground:L}=f.header,D=c(null),{shouldShowLockIcon:P,shouldShowMenuIcon:O}=a,{open:T,setOpen:N,handleOpenMenu:q,setIsAdjustingWidth:F}=gk(),j={sortFromMenu:async(t,n)=>{t.stopPropagation(),await o(e,n)}},z={embed:v,listboxRef:h,sortCriteria:m.searchSortFromDimension&&e.isDim?g.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},B={app:y,qStateName:m.layout.qStateName},{labelTextAlign:W}=null!==(p=m.getDimensionInfo(e.dimensionInfoIndex))&&void 0!==p?p:{},$=KM(W,"flex-start");return Ws.jsxs(NA,{className:Ut,title:e.label,interactions:b,background:T?L:A,hoverBackground:I,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...dg,...gg(e,i,n,r,f.grid.border),color:R},"data-testid":"title-cell",onClick:q,children:[Ws.jsxs(FA,{children:[P?Ws.jsx(jA,{children:Ws.jsx(fk,{height:12})}):null,Ws.jsx(zA,{fontFamily:C,fontSize:E,fontStyle:_,fontWeight:M,textDecoration:k,justifyContent:$,children:Ws.jsx("span",{style:pg,children:e.label})})]}),e.isDim?Ws.jsxs(Ws.Fragment,{children:[Ws.jsx(gS,{headerData:e,translator:x,anchorRef:D,open:T,setOpen:N,interactions:b,menuAvailabilityFlags:XA,sortRelatedArgs:j,searchRelatedArgs:z,selectionRelatedArgs:B,expandOrCollapseArgs:KA({model:S,effectivePropertiesService:g,cell:e,env:w}),shouldShowMenuIcon:O,env:w,model:S&&"setActiveField"in S?S:void 0}),Ws.jsx(qA,{ref:h}),Ws.jsx(qA,{ref:D})]}):null,Ws.jsx(bk,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:l,setIsAdjustingWidth:F,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},ZA=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=aE();return e>0&&t>0?Ws.jsx("div",{style:{...ug,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null};function QA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const eI=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){QA(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})),tI=u(eI);function nI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rI=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nI(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),t.createElement("use",{fillRule:"evenodd"})),iI=u(rI),oI=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{styleService:r}=aE(),{interactions:i,translator:o}=rE(),{isActive:a}=AM(),{dataModel:s}=VC(),{setIsAdjustingWidth:l}=mk([s]);if(!(!!i.active&&!a))return null;const c=yk(r,{isLeftColumn:!0});return Ws.jsx(Qx,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:c,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*KC))},confirmWidthCallback:r=>{var i;if(r.type===Jt.FitToContent)return void s.applyIndentModeColumnWidth({type:Jt.Auto});const o=Math.min(null!==(i=r.pixels)&&void 0!==i?i:t,e*KC);n(o),s.applyIndentModeColumnWidth({type:Jt.Pixels,pixels:o})},setIsAdjustingWidth:l,accessibilityRelatedArgs:{translator:o,columnLabel:o.get("SNPivotTable.IndentMode.Rows")},direction:"ltr"})};function aI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const sI=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){aI(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})),lI=u(sI),cI=({cell:e,changeSortOrder:t})=>{const n=c(null),r=c(null),{app:i,interactions:o,embed:a,translator:s,env:l,model:u}=rE(),{layoutService:d,effectivePropertiesService:p}=aE(),{open:h,setOpen:f,handleOpenMenu:m}=gk();return Ws.jsxs(WA,{component:"div",onClick:m,isActive:h,children:[Ws.jsx($A,{children:e.label}),Ws.jsxs(HA,{className:"indent-mode-dropdown-more",visible:h,children:[Ws.jsx(lI,{}),e.isDim?Ws.jsxs(Ws.Fragment,{children:[Ws.jsx(gS,{headerData:e,translator:s,anchorRef:n,open:h,setOpen:f,interactions:o,menuAvailabilityFlags:XA,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:i,qStateName:d.layout.qStateName},expandOrCollapseArgs:KA({model:u,effectivePropertiesService:p,cell:e,env:l}),shouldShowMenuIcon:!1,env:l,model:u&&"setActiveField"in u?u:void 0}),Ws.jsx(qA,{ref:r}),Ws.jsx(qA,{ref:n})]}):null]})]})},uI=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{var i,o;const a=(null===(i=n.at(-1))||void 0===i?void 0:i.id)===dE,s=e+1<n.length&&(null===(o=n[e+1])||void 0===o?void 0:o.id)===dE;return!(r&&a&&s)&&((null==t?void 0:t.id)!==dE&&e<n.length-1)},dI=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:i})=>{const{styleService:o}=aE(),{interactions:a,translator:s}=rE(),{dataModel:u,gridSectionsData:{headersData:d}}=VC(),[p,h]=l(!1),f=c(null),{headerCellHeight:m}=o,{color:g,background:y,hoverBackground:b,activeBackground:v,fontFamily:x,fontSize:w,fontStyle:S,fontWeight:E,textDecoration:C}=o.header,{isAdjustingWidth:_}=mk([u]),M=e=>{e.stopPropagation()},k={height:m,gridColumn:`1 / span ${d.size.x}`,gridRow:d.size.y,zIndex:d.size.x-0};return Ws.jsxs(NA,{isDimension:!0,background:p?v:y,interactions:a,hoverBackground:b,style:{...k,...dg,color:g},onClick:e=>{!a.active||MM(e)||_||h(!p)},"data-testid":"indentModeHeaderCellWrapper",children:[Ws.jsxs(FA,{justifyContent:"flex-start",children:[Ws.jsx(zA,{fontFamily:x,fontSize:w,fontStyle:S,fontWeight:E,textDecoration:C,justifyContent:"flex-start",children:Ws.jsx("span",{style:pg,children:s.get("SNPivotTable.IndentMode.Rows")})}),p?Ws.jsx(iI,{}):Ws.jsx(tI,{}),Ws.jsx(qA,{ref:f})]}),Ws.jsx(BA,{open:p,anchorEl:f.current,children:e.map(((n,r)=>[n&&n.id!==dE&&Ws.jsx("li",{role:"presentation",onClick:M,onKeyDown:M,children:Ws.jsx(cI,{cell:n,changeSortOrder:t})}),uI({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===d.size.y})&&Ws.jsx(sw,{"data-testid":"group-divider",variant:"middle"},"divider")]))}),Ws.jsx(oI,{tableWidth:i,leftGridWidth:r,overrideLeftGridWidth:n})]})},pI={display:"grid",width:"fit-content"},hI=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:i,getHeaderCellsIconsVisibilityStatus:o,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=aE(),{gridSectionsData:{headersData:c}}=VC();return Ws.jsxs("div",{"data-testid":"HEADER_GRID",style:{...pI,gridTemplateColumns:n.map((e=>`${e}px`)).join(" "),gridTemplateRows:c.data.map((()=>`${r}px`)).join(" "),height:a},children:[c.size.y>1&&Ws.jsx(ZA,{columnSpan:c.size.x-1,rowSpan:c.size.y-1}),c.data.map(((a,u)=>{let d=[];if(l.isIndentModeEnabled&&c.size.x>1&&u+1===c.size.y){const n=c.data.at(-1);return d.push(Ws.jsx(dI,{menuItems:n[0],changeSortOrder:i,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n[0][0].id)),d}return d=a.reduce(((t,a,d)=>{if(a){const p=o(d,a.isLocked,a.label),h=l.isIndentModeEnabled&&1===c.size.x;t.push(Ws.jsx(JA,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:i,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:h,tableWidth:e},a.id))}return t}),[]),d}))]})};var fI=f(hI);const mI=(e,t,n,r)=>{const{layoutService:i}=aE();m((()=>{var t;null===(t=e.current)||void 0===t||t.forEach((e=>null==e?void 0:e.resetAfterIndex(0,!0)))}),[e,t,n,r,i])},gI=(e,t)=>{$g((()=>{var t;null===(t=e.current)||void 0===t||t.forEach((e=>null==e?void 0:e.resetAfterIndex(0,!1)))}),[e,t])},yI=(e,t)=>{const{isLast:n,list:r,listValues:i}=t;return n?r[e]:i[e]},bI=(e,t,n)=>{var r;const i=n?"flex-start":"center";var o,a;if(e.representation.type===Dt.Image)return null!==(o=null===(a=e.representation.resolvedImagePosition)||void 0===a?void 0:a.horizontal)&&void 0!==o?o:i;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){var s;const{labelTextAlign:n}=null!==(s=t.visibleMeasureInfo[e.visibleMeasureInfoIndex])&&void 0!==s?s:{};return KM(n,i)}const{textAlign:l}=null!==(r=t.getDimensionInfo(e.dimensionInfoIndex))&&void 0!==r?r:{};return KM(l,i)},vI=()=>{},xI=({children:e,text:t,reactWindowStyle:n,cell:r,data:i,showTotalCellDivider:o,isLastRow:a,isLastColumn:s,isLeftColumn:l,isCellSelected:c,isAdjustingWidth:u,index:d})=>{var p;const{styleService:h,layoutService:f}=aE(),{interactions:m}=rE(),{isLocked:g,createMouseDownHandler:y,createMouseOverHandler:b}=AM(),{showLastBorder:v}=i,x=g(r)||r.isLockedByDimension,w=!(x||!m.active||!m.select||r.isEmpty||r.isNull||r.isPseudoDimension||r.isTotal||u),S=w?y(d,(e=>yI(e,i))):void 0,E=w?b(d):void 0;return Ws.jsx("div",{className:Ut,title:m.passive?t:void 0,style:{...n,...mg(a,s,h.grid.border,v),...yg({bottomDivider:o&&l,rightDivider:o&&!l,borderColor:h.grid.divider}),...dg,padding:"0px 4px",cursor:jM(w),background:OM({styleService:h,isCellSelected:c,cell:r,isCellLocked:x}),zIndex:l?void 0:f.size.x-r.x,justifyContent:bI(r,f,l),display:"flex",...f.isIndentModeEnabled&&l&&{paddingLeft:Math.max(4,24*(null!==(p=r.indentLevel)&&void 0!==p?p:0))}},"aria-hidden":"true",onMouseDown:S,onMouseOver:E,onKeyUp:vI,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":r.x,"data-page-x":r.pageX,"data-y":r.y,"data-page-y":r.pageY,"data-cell-type":r.ref.qType,"data-dimension-info-index":r.dimensionInfoIndex,children:e})},wI=e=>{e.stopPropagation()},SI=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:wI,style:{pointerEvents:n.active?"auto":"none",color:null!=r?r:void 0,opacity:n.active&&n.passive||r?void 0:.4}}),EI=({href:e,text:n,interactions:r,color:i})=>t.createElement(Rp,SI({href:e,text:n,interactions:r,color:i}),n);function CI(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_I(Object(n),!0).forEach((function(t){CI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kI=Object.prototype.hasOwnProperty,RI=Object.prototype.toString,AI=Object.defineProperty,II=Object.getOwnPropertyDescriptor,LI=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===RI.call(e)},DI=function(e){if(!e||"[object Object]"!==RI.call(e))return!1;var t,n=kI.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&kI.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||kI.call(e,t)},PI=function(e,t){AI&&"__proto__"===t.name?AI(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},OI=function(e,t){if("__proto__"===t){if(!kI.call(e,t))return;if(II)return II(e,t).value}return e[t]},TI=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=OI(s,n),s!==(i=OI(t,n))&&(u&&i&&(DI(i)||(o=LI(i)))?(o?(o=!1,a=r&&LI(r)?r:[]):a=r&&DI(r)?r:{},PI(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&PI(s,{name:n,newValue:i}));return s};function NI(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function qI(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function FI(e){let{cache:t,f:n,mainCell:r,p:i,prop:o,page:a,rowIdx:s,row:l,sourceKey:c,target:u,targetProp:d,columnOrder:p}=e,h=r;if(i.field&&i.field!==n){const e=NI(i.field,a,{cache:t},p);if(-1===e)return;h=TI({qRow:s},e(l))}u[d]=qI(i,h,{key:c})}function jI(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),p=!!i[e].trackBy,h=typeof i[e].trackBy,f={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=NI(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const b=a.qDataPages[t].qArea.qTop+y,v=TI({qRow:b},o(a.qDataPages[t].qMatrix[y])),x=qI(u,v,{key:s});if(!(u.filter&&!u.filter(v))){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)FI({cache:n,f:l,mainCell:v,p:i[o],prop:d[e],props:c,page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}p&&r.track({cfg:i[e],itemData:v,obj:x,target:m,tracker:f,trackType:h}),g.push(x)}}}const y=p?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function zI(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function BI(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=$I)):void 0===t&&(t=WI);for(var n,r,i,o,a,s=new VI(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new VI(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(GI)}function WI(e){return e.children}function $I(e){return Array.isArray(e)?e[1]:null}function HI(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function GI(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function VI(e){this.data=e,this.depth=this.height=0,this.parent=null}function UI(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}VI.prototype=BI.prototype={constructor:VI,count:function(){return this.eachAfter(zI)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return BI(this).eachBefore(HI)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var YI={depth:-1},KI={},XI={};function JI(e){return e.id}function ZI(e){return e.parentId}function QI(){var e,t=JI,n=ZI;function r(r){var i,o,a,s,l,c,u,d,p=Array.from(r),h=t,f=n,m=new Map;if(null!=e){const t=p.map(((t,n)=>function(e){e=`${e}`;let t=e.length;tL(e,t-1)&&!tL(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(eL),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(eL(e)),p.push(XI));h=(e,n)=>t[n],f=(e,t)=>n[t]}for(a=0,i=p.length;a<i;++a)o=p[a],c=p[a]=new VI(o),null!=(u=h(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?KI:c)),null!=(u=f(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=p[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===KI)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===XI&&1===s.children.length;)s=s.children[0],--i;for(let e=p.length-1;e>=0&&(c=p[e]).data===XI;--e)c.data=null}if(s.parent=YI,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(GI),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=UI(e),r):t},r.parentId=function(e){return arguments.length?(n=UI(e),r):n},r.path=function(t){return arguments.length?(e=UI(t),r):e},r}function eL(e){let t=e.length;if(t<2)return"";for(;--t>1&&!tL(e,t););return e.slice(0,t)}function tL(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function nL(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=nL(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=nL(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function rL(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...rL(e[i].children,t-1,n)]);return r}function iL(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>rL(e.children,r-1,n)}return!1}const oL=/^qDimensionInfo(?:\/(\d+))?/,aL=/^\/?qMeasureInfo\/(\d+)/,sL=/\/qAttrExprInfo\/(\d+)/,lL=/\/qAttrDimInfo\/(\d+)/;function cL(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function uL(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,h=cL(n);return oL.test(d)&&(i=!0,o=+oL.exec(d)[1],d=r.replace(oL,"")),aL.test(d)&&("K"===n.qMode?c=+aL.exec(d)[1]:p&&-1!==p.indexOf(-1)?(c=+aL.exec(d)[1],u=0):u=+aL.exec(d)[1],d=d.replace(aL,"")),d&&(lL.exec(d)?s=+lL.exec(d)[1]:sL.exec(d)&&(a=+sL.exec(d)[1])),l=i?"S"===n.qMode?h[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function dL(e,t){let n,r,i=iL(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function pL(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function hL(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let p,h,f,m,g,y;if("primitive"===d.type?(f=d.value,y=String(d.value)):("function"==typeof d.value&&(p=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),p&&(f=g.map(p),p=null),h&&(y=g.map(h),h=null),f=d.reduce?d.reduce(f):f,y=d.reduceLabel?d.reduceLabel(y,f):String(f)):(f=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=f)):(f=i,y=i)),s.fields){const e=p?p(f):f;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=p?p(f):f;o[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const fL=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=nL(r,e);return o&&o[0]?(t.tree=BI(o[0],n.children||(e=>e[i])),t.tree):null};const mL=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields?s.fields:[s];for(let e=0;e<l.length;e++){const t=l[e];if(t.field!==a){const e=dL(o,uL(t.field,{cube:r,cache:i}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function gL(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=MI({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),c=QI().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):fL(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=cL(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(MI(MI({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?uL(a,{cube:i,cache:n}):{fieldDepth:0};mL({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=pL(r,a,{key:o});hL({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o,isTree:!0}),u[e].data=s}return a}function yL(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!fL(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),p=Object.keys(u),h=uL(c,{cube:s,cache:n}),{nodeFn:f,attrFn:m,valueFn:g}=dL({fieldDepth:0},h);mL({propsArr:p,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!i[a].trackBy,b=typeof i[a].trackBy,v={},x=[],w=f(n.tree),S=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=pL(d,n,{key:l});hL({propsArr:p,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:v,trackType:b}),S.push(o)}const E=y?r.collect(x,{main:d,propsArr:p,props:u}):S;o=[...o,...E]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var bL=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
174
+ `),kk.rippleVisible,Ok,550,(({theme:e})=>e.transitions.easing.easeInOut),kk.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),kk.child,kk.childLeaving,Tk,550,(({theme:e})=>e.transitions.easing.easeInOut),kk.childPulsate,Nk,(({theme:e})=>e.transitions.easing.easeInOut)),jk=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=r,s=bn(r,Rk),[l,c]=e.useState([]),u=e.useRef(0),d=e.useRef(null);e.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const p=e.useRef(!1),h=Fb(),f=e.useRef(null),m=e.useRef(null),g=e.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;c((e=>[...e,Ws.jsx(Fk,{classes:{ripple:Ma(o.ripple,kk.ripple),rippleVisible:Ma(o.rippleVisible,kk.rippleVisible),ripplePulsate:Ma(o.ripplePulsate,kk.ripplePulsate),child:Ma(o.child,kk.child),childLeaving:Ma(o.childLeaving,kk.childLeaving),childPulsate:Ma(o.childPulsate,kk.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,d.current=a}),[o]),y=e.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},h.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[i,g,h]),b=e.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=e.useCallback(((e,t)=>{if(h.clear(),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void h.start(0,(()=>{v(e,t)}));f.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[h]);return e.useImperativeHandle(n,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),Ws.jsx(qk,dn({className:Ma(kk.root,o.root,a),ref:m},s,{children:Ws.jsx(Xc,{component:null,exit:!0,children:l})}))}));var zk=jk;function Bk(e){return gb("MuiButtonBase",e)}var Wk=yb("MuiButtonBase",["root","disabled","focusVisible"]);const $k=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Hk=Vx("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Wk.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Gk=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:h="a",onBlur:f,onClick:m,onContextMenu:g,onDragLeave:y,onFocus:b,onFocusVisible:v,onKeyDown:x,onKeyUp:w,onMouseDown:S,onMouseLeave:E,onMouseUp:C,onTouchEnd:_,onTouchMove:M,onTouchStart:k,tabIndex:R=0,TouchRippleProps:A,touchRippleRef:I,type:L}=r,D=bn(r,$k),P=e.useRef(null),O=e.useRef(null),T=Ob(O,I),{isFocusVisibleRef:N,onFocus:q,onBlur:F,ref:j}=Ub(),[z,B]=e.useState(!1);c&&z&&B(!1),e.useImperativeHandle(i,(()=>({focusVisible:()=>{B(!0),P.current.focus()}})),[]);const[W,$]=e.useState(!1);e.useEffect((()=>{$(!0)}),[]);const H=W&&!u&&!c;function G(e,t,n=d){return Pb((r=>{t&&t(r);return!n&&O.current&&O.current[e](r),!0}))}e.useEffect((()=>{z&&p&&!u&&W&&O.current.pulsate()}),[u,p,z,W]);const V=G("start",S),U=G("stop",g),Y=G("stop",y),K=G("stop",C),X=G("stop",(e=>{z&&e.preventDefault(),E&&E(e)})),J=G("start",k),Z=G("stop",_),Q=G("stop",M),ee=G("stop",(e=>{F(e),!1===N.current&&B(!1),f&&f(e)}),!1),te=Pb((e=>{P.current||(P.current=e.currentTarget),q(e),!0===N.current&&(B(!0),v&&v(e)),b&&b(e)})),ne=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=e.useRef(!1),ie=Pb((e=>{p&&!re.current&&z&&O.current&&" "===e.key&&(re.current=!0,O.current.stop(e,(()=>{O.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))})),oe=Pb((e=>{p&&" "===e.key&&O.current&&z&&!e.defaultPrevented&&(re.current=!1,O.current.stop(e,(()=>{O.current.pulsate(e)}))),w&&w(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let ae=l;"button"===ae&&(D.href||D.to)&&(ae=h);const se={};"button"===ae?(se.type=void 0===L?"button":L,se.disabled=c):(D.href||D.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=Ob(n,j,P),ce=dn({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:R,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=Kb({root:["root",t&&"disabled",n&&"focusVisible"]},Bk,i);return n&&r&&(o.root+=` ${r}`),o})(ce);return Ws.jsxs(Hk,dn({as:ae,className:Ma(ue.root,s),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:U,onFocus:te,onKeyDown:ie,onKeyUp:oe,onMouseDown:V,onMouseLeave:X,onMouseUp:K,onDragLeave:Y,onTouchEnd:Z,onTouchMove:Q,onTouchStart:J,ref:le,tabIndex:c?-1:R,type:L},se,D,{children:[a,H?Ws.jsx(zk,dn({ref:T,center:o},A)):null]}))}));var Vk=Gk;function Uk(e){return gb("MuiTypography",e)}yb("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Yk=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Kk=Vx("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${ay(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>dn({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),Xk={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Jk={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Zk=e.forwardRef((function(e,t){const n=vk({props:e,name:"MuiTypography"}),r=(e=>Jk[e]||e)(n.color),i=ub(dn({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Xk}=i,h=bn(i,Yk),f=dn({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=s||(u?"p":p[d]||Xk[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return Kb({root:["root",o,"inherit"!==e.align&&`align${ay(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},Uk,a)})(f);return Ws.jsx(Kk,dn({as:m,ref:t,ownerState:f,className:Ma(g.root,a)},h))}));var Qk=Zk;const eR=e.forwardRef((function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=e.useState(null),l=Ob(e.isValidElement(r)?tv(r):null,n);if(Cb((()=>{o||s(function(e){return"function"==typeof e?e():e}(i)||document.body)}),[i,o]),Cb((()=>{if(a&&!o)return Db(n,a),()=>{Db(n,null)}}),[n,a,o]),o){if(e.isValidElement(r)){const t={ref:l};return e.cloneElement(r,t)}return Ws.jsx(e.Fragment,{children:r})}return Ws.jsx(e.Fragment,{children:a?q.createPortal(r,a):a})}));var tR=eR;const nR=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],rR={entering:{opacity:1},entered:{opacity:1}},iR=e.forwardRef((function(t,n){const r=mx(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:h,onExited:f,onExiting:m,style:g,timeout:y=i,TransitionComponent:b=Hc}=t,v=bn(t,nR),x=e.useRef(null),w=Ob(x,tv(s),n),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(p),C=S(((e,t)=>{xk(e);const n=wk({style:g,timeout:y,easing:l},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),u&&u(e,t)})),_=S(d),M=S(m),k=S((e=>{const t=wk({style:g,timeout:y,easing:l},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),h&&h(e)})),R=S(f);return Ws.jsx(b,dn({appear:a,in:c,nodeRef:x,onEnter:C,onEntered:_,onEntering:E,onExit:k,onExited:R,onExiting:M,addEndListener:e=>{o&&o(x.current,e)},timeout:y},v,{children:(t,n)=>e.cloneElement(s,dn({style:dn({opacity:0,visibility:"exited"!==t||c?void 0:"hidden"},rR[t],g,s.props.style),ref:w},n))}))}));var oR=iR;function aR(e){return gb("MuiBackdrop",e)}yb("MuiBackdrop",["root","invisible"]);const sR=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],lR=Vx("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>dn({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),cR=e.forwardRef((function(e,t){var n,r,i;const o=vk({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:h={},slots:f={},TransitionComponent:m=oR,transitionDuration:g}=o,y=bn(o,sR),b=dn({},o,{component:l,invisible:d}),v=(e=>{const{classes:t,invisible:n}=e;return Kb({root:["root",n&&"invisible"]},aR,t)})(b),x=null!=(n=h.root)?n:u.root;return Ws.jsx(m,dn({in:p,timeout:g},y,{children:Ws.jsx(lR,dn({"aria-hidden":!0},x,{as:null!=(r=null!=(i=f.root)?i:c.Root)?r:l,className:Ma(v.root,s,null==x?void 0:x.className),ownerState:dn({},b,null==x?void 0:x.ownerState),classes:v,ref:t,children:a}))}))}));var uR=cR;var dR=yb("MuiBox",["root"]);const pR=hx(),hR=function(t={}){const{themeId:n,defaultTheme:r,defaultClassName:i="MuiBox-root",generateClassName:o}=t,a=Go("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(tb),s=e.forwardRef((function(e,t){const s=lb(r),l=ub(e),{className:c,component:u="div"}=l,d=bn(l,fb);return Ws.jsx(a,dn({as:u,ref:t,className:Ma(c,o?o(i):i),theme:n&&s[n]||s},d))}));return s}({themeId:Yg,defaultTheme:pR,defaultClassName:dR.root,generateClassName:hb.generate});var fR=hR;function mR(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function gR(e){return parseInt(Lb(e).getComputedStyle(e).paddingRight,10)||0}function yR(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&mR(e,i)}))}function bR(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function vR(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Ib(e);return t.body===e?Lb(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Yb(Ib(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${gR(r)+e}px`;const t=Ib(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${gR(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=Ib(r).body;else{const t=r.parentElement,n=Lb(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const xR=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function wR(e){const t=[],n=[];return Array.from(e.querySelectorAll(xR)).forEach(((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function SR(){return!0}function ER(t){const{children:n,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:o=!1,getTabbable:a=wR,isEnabled:s=SR,open:l}=t,c=e.useRef(!1),u=e.useRef(null),d=e.useRef(null),p=e.useRef(null),h=e.useRef(null),f=e.useRef(!1),m=e.useRef(null),g=Ob(tv(n),m),y=e.useRef(null);e.useEffect((()=>{l&&m.current&&(f.current=!r)}),[r,l]),e.useEffect((()=>{if(!l||!m.current)return;const e=Ib(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),f.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}}),[l]),e.useEffect((()=>{if(!l||!m.current)return;const e=Ib(m.current),t=t=>{y.current=t,!i&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(i&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(m.current)),n.length>0){var r,o;const e=Boolean((null==(r=y.current)?void 0:r.shiftKey)&&"Tab"===(null==(o=y.current)?void 0:o.key)),t=n[0],i=n[n.length-1];"string"!=typeof t&&"string"!=typeof i&&(e?i.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[r,i,o,s,l,a]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0};return Ws.jsxs(e.Fragment,{children:[Ws.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),e.cloneElement(n,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),f.current=!0,h.current=e.target;const t=n.props.onFocus;t&&t(e)}}),Ws.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const CR=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&mR(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);yR(t,e.mount,e.modalRef,r,!0);const i=bR(this.containers,(e=>e.container===t));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=bR(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=vR(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=bR(this.containers,(t=>-1!==t.modals.indexOf(e))),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&mR(e.modalRef,t),yR(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&mR(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function _R(t){const{container:n,disableEscapeKeyDown:r=!1,disableScrollLock:i=!1,manager:o=CR,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:p}=t,h=e.useRef({}),f=e.useRef(null),m=e.useRef(null),g=Ob(m,p),[y,b]=e.useState(!d),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;"false"!==t["aria-hidden"]&&!1!==t["aria-hidden"]||(x=!1);const w=()=>(h.current.modalRef=m.current,h.current.mount=f.current,h.current),S=()=>{o.mount(w(),{disableScrollLock:i}),m.current&&(m.current.scrollTop=0)},E=Pb((()=>{const e=function(e){return"function"==typeof e?e():e}(n)||Ib(f.current).body;o.add(w(),e),m.current&&S()})),C=e.useCallback((()=>o.isTopModal(w())),[o]),_=Pb((e=>{f.current=e,e&&(d&&C()?S():m.current&&mR(m.current,x))})),M=e.useCallback((()=>{o.remove(w(),x)}),[x,o]);e.useEffect((()=>()=>{M()}),[M]),e.useEffect((()=>{d?E():v&&a||M()}),[d,M,v,a,E]);const k=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&C()&&(r||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},R=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(e={})=>{const n=Jb(t);delete n.onTransitionEnter,delete n.onTransitionExited;const r=dn({},n,e);return dn({role:"presentation"},r,{onKeyDown:k(r),ref:g})},getBackdropProps:(e={})=>dn({"aria-hidden":!0},e,{onClick:R(e),open:d}),getTransitionProps:()=>({onEnter:Ab((()=>{b(!1),s&&s()}),null==c?void 0:c.props.onEnter),onExited:Ab((()=>{b(!0),l&&l(),a&&M()}),null==c?void 0:c.props.onExited)}),rootRef:g,portalRef:_,isTopModal:C,exited:y,hasTransition:v}}function MR(e){return gb("MuiModal",e)}yb("MuiModal",["root","hidden","backdrop"]);const kR=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],RR=Vx("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>dn({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),AR=Vx(uR,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),IR=e.forwardRef((function(t,n){var r,i,o,a,s,l;const c=vk({name:"MuiModal",props:t}),{BackdropComponent:u=AR,BackdropProps:d,className:p,closeAfterTransition:h=!1,children:f,container:m,component:g,components:y={},componentsProps:b={},disableAutoFocus:v=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:w=!1,disablePortal:S=!1,disableRestoreFocus:E=!1,disableScrollLock:C=!1,hideBackdrop:_=!1,keepMounted:M=!1,onBackdropClick:k,open:R,slotProps:A,slots:I}=c,L=bn(c,kR),D=dn({},c,{closeAfterTransition:h,disableAutoFocus:v,disableEnforceFocus:x,disableEscapeKeyDown:w,disablePortal:S,disableRestoreFocus:E,disableScrollLock:C,hideBackdrop:_,keepMounted:M}),{getRootProps:P,getBackdropProps:O,getTransitionProps:T,portalRef:N,isTopModal:q,exited:F,hasTransition:j}=_R(dn({},D,{rootRef:n})),z=dn({},D,{exited:F}),B=(e=>{const{open:t,exited:n,classes:r}=e;return Kb({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},MR,r)})(z),W={};if(void 0===f.props.tabIndex&&(W.tabIndex="-1"),j){const{onEnter:e,onExited:t}=T();W.onEnter=e,W.onExited=t}const $=null!=(r=null!=(i=null==I?void 0:I.root)?i:y.Root)?r:RR,H=null!=(o=null!=(a=null==I?void 0:I.backdrop)?a:y.Backdrop)?o:u,G=null!=(s=null==A?void 0:A.root)?s:b.root,V=null!=(l=null==A?void 0:A.backdrop)?l:b.backdrop,U=ev({elementType:$,externalSlotProps:G,externalForwardedProps:L,getSlotProps:P,additionalProps:{ref:n,as:g},ownerState:z,className:Ma(p,null==G?void 0:G.className,null==B?void 0:B.root,!z.open&&z.exited&&(null==B?void 0:B.hidden))}),Y=ev({elementType:H,externalSlotProps:V,additionalProps:d,getSlotProps:e=>O(dn({},e,{onClick:t=>{k&&k(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Ma(null==V?void 0:V.className,null==d?void 0:d.className,null==B?void 0:B.backdrop),ownerState:z});return M||R||j&&!F?Ws.jsx(tR,{ref:N,container:m,disablePortal:S,children:Ws.jsxs($,dn({},U,{children:[!_&&u?Ws.jsx(H,dn({},Y)):null,Ws.jsx(ER,{disableEnforceFocus:x,disableAutoFocus:v,disableRestoreFocus:E,isEnabled:q,open:R,children:e.cloneElement(f,W)})]}))}):null}));var LR=IR;var DR=yb("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const PR=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function OR(e){return`scale(${e}, ${e**2})`}const TR={entering:{opacity:1,transform:OR(1)},entered:{opacity:1,transform:"none"}},NR="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),qR=e.forwardRef((function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:h,style:f,timeout:m="auto",TransitionComponent:g=Hc}=t,y=bn(t,PR),b=Fb(),v=e.useRef(),x=mx(),w=e.useRef(null),S=Ob(w,tv(o),n),E=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},C=E(u),_=E(((e,t)=>{xk(e);const{duration:n,delay:r,easing:i}=wk({style:f,timeout:m,easing:a},{mode:"enter"});let o;"auto"===m?(o=x.transitions.getAutoHeightDuration(e.clientHeight),v.current=o):o=n,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:r}),x.transitions.create("transform",{duration:NR?o:.666*o,delay:r,easing:i})].join(","),l&&l(e,t)})),M=E(c),k=E(h),R=E((e=>{const{duration:t,delay:n,easing:r}=wk({style:f,timeout:m,easing:a},{mode:"exit"});let i;"auto"===m?(i=x.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:n}),x.transitions.create("transform",{duration:NR?i:.666*i,delay:NR?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=OR(.75),d&&d(e)})),A=E(p);return Ws.jsx(g,dn({appear:i,in:s,nodeRef:w,onEnter:_,onEntered:M,onEntering:C,onExit:R,onExited:A,onExiting:k,addEndListener:e=>{"auto"===m&&b.start(v.current||0,e),r&&r(w.current,e)},timeout:"auto"===m?null:m},y,{children:(t,n)=>e.cloneElement(o,dn({style:dn({opacity:0,transform:OR(.75),visibility:"exited"!==t||s?void 0:"hidden"},TR[t],f,o.props.style),ref:S},n))}))}));qR.muiSupportAuto=!0;var FR=qR;function jR(e){return gb("MuiLink",e)}var zR=yb("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);const BR={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var WR=({theme:e,ownerState:t})=>{const n=(e=>BR[e]||e)(t.color),r=ly(e,`palette.${n}`,!1)||t.color,i=ly(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:Sv(r,.4)};const $R=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],HR=Vx(Qk,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${ay(n.underline)}`],"button"===n.component&&t.button]}})((({theme:e,ownerState:t})=>dn({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&dn({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:WR({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${zR.focusVisible}`]:{outline:"auto"}}))),GR=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiLink"}),{className:i,color:o="primary",component:a="a",onBlur:s,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=r,h=bn(r,$R),{isFocusVisibleRef:f,onBlur:m,onFocus:g,ref:y}=Ub(),[b,v]=e.useState(!1),x=Ob(n,y),w=dn({},r,{color:o,component:a,focusVisible:b,underline:u,variant:d}),S=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e;return Kb({root:["root",`underline${ay(i)}`,"button"===n&&"button",r&&"focusVisible"]},jR,t)})(w);return Ws.jsx(HR,dn({color:o,className:Ma(S.root,i),classes:c,component:a,onBlur:e=>{m(e),!1===f.current&&v(!1),s&&s(e)},onFocus:e=>{g(e),!0===f.current&&v(!0),l&&l(e)},ref:x,ownerState:w,variant:d,sx:[...Object.keys(BR).includes(o)?[]:[{color:o}],...Array.isArray(p)?p:[p]]},h))}));var VR=GR;var UR=e.createContext({});function YR(e){return gb("MuiList",e)}yb("MuiList",["root","padding","dense","subheader"]);const KR=["children","className","component","dense","disablePadding","subheader"],XR=Vx("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>dn({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),JR=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=r,u=bn(r,KR),d=e.useMemo((()=>({dense:s})),[s]),p=dn({},r,{component:a,dense:s,disablePadding:l}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Kb({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},YR,t)})(p);return Ws.jsx(UR.Provider,{value:d,children:Ws.jsxs(XR,dn({as:a,className:Ma(h.root,o),ref:n,ownerState:p},u,{children:[c,i]}))})}));var ZR=JR;var QR=yb("MuiListItemIcon",["root","alignItemsFlexStart"]);var eA=yb("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const tA=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nA(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function rA(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function iA(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function oA(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&iA(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const aA=e.forwardRef((function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,p=bn(t,tA),h=e.useRef(null),f=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Cb((()=>{i&&h.current.focus()}),[i]),e.useImperativeHandle(r,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&n){const n=`${Yb(Ib(e))}px`;h.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,h.current.style.width=`calc(100% + ${n})`}return h.current}})),[]);const m=Ob(h,n);let g=-1;e.Children.forEach(a,((t,n)=>{e.isValidElement(t)?(t.props.disabled||("selectedMenu"===d&&t.props.selected||-1===g)&&(g=n),g===n&&(t.props.disabled||t.props.muiSkipListHighlight||t.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===n&&(g+=1,g>=a.length&&(g=-1))}));const y=e.Children.map(a,((t,n)=>{if(n===g){const n={};return o&&(n.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===d&&(n.tabIndex=0),e.cloneElement(t,n)}return t}));return Ws.jsx(ZR,dn({role:"menu",ref:m,className:s,onKeyDown:e=>{const t=h.current,n=e.key,r=Ib(t).activeElement;if("ArrowDown"===n)e.preventDefault(),oA(t,r,c,l,nA);else if("ArrowUp"===n)e.preventDefault(),oA(t,r,c,l,rA);else if("Home"===n)e.preventDefault(),oA(t,null,c,l,nA);else if("End"===n)e.preventDefault(),oA(t,null,c,l,rA);else if(1===n.length){const i=f.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const s=r&&!i.repeating&&iA(r,i);i.previousKeyMatched&&(s||oA(t,r,!1,l,nA,i))?e.preventDefault():i.previousKeyMatched=!1}u&&u(e)},tabIndex:i?0:-1},p,{children:y}))}));var sA=aA;function lA(e){return gb("MuiPopover",e)}yb("MuiPopover",["root","paper"]);const cA=["onEntering"],uA=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],dA=["slotProps"];function pA(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function hA(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function fA(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function mA(e){return"function"==typeof e?e():e}const gA=Vx(LR,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yA=Vx(Mk,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),bA=e.forwardRef((function(t,n){var r,i,o;const a=vk({props:t,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:h,container:f,elevation:m=8,marginThreshold:g=16,open:y,PaperProps:b={},slots:v,slotProps:x,transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:S=FR,transitionDuration:E="auto",TransitionProps:{onEntering:C}={},disableScrollLock:_=!1}=a,M=bn(a.TransitionProps,cA),k=bn(a,uA),R=null!=(r=null==x?void 0:x.paper)?r:b,A=e.useRef(),I=Ob(A,R.ref),L=dn({},a,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:g,externalPaperSlotProps:R,transformOrigin:w,TransitionComponent:S,transitionDuration:E,TransitionProps:M}),D=(e=>{const{classes:t}=e;return Kb({root:["root"],paper:["paper"]},lA,t)})(L),P=e.useCallback((()=>{if("anchorPosition"===d)return u;const e=mA(l),t=(e&&1===e.nodeType?e:Ib(A.current).body).getBoundingClientRect();return{top:t.top+pA(t,c.vertical),left:t.left+hA(t,c.horizontal)}}),[l,c.horizontal,c.vertical,u,d]),O=e.useCallback((e=>({vertical:pA(e,w.vertical),horizontal:hA(e,w.horizontal)})),[w.horizontal,w.vertical]),T=e.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=O(t);if("none"===d)return{top:null,left:null,transformOrigin:fA(n)};const r=P();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,s=o+t.width,c=Lb(mA(l)),u=c.innerHeight-g,p=c.innerWidth-g;if(null!==g&&i<g){const e=i-g;i-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;i-=e,n.vertical+=e}if(null!==g&&o<g){const e=o-g;o-=e,n.horizontal+=e}else if(s>p){const e=s-p;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:fA(n)}}),[l,d,P,O,g]),[N,q]=e.useState(y),F=e.useCallback((()=>{const e=A.current;if(!e)return;const t=T(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,q(!0)}),[T]);e.useEffect((()=>(_&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F))),[l,_,F]);e.useEffect((()=>{y&&F()})),e.useImperativeHandle(s,(()=>y?{updatePosition:()=>{F()}}:null),[y,F]),e.useEffect((()=>{if(!y)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}((()=>{F()})),t=Lb(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,y,F]);let j=E;"auto"!==E||S.muiSupportAuto||(j=void 0);const z=f||(l?Ib(mA(l)).body:void 0),B=null!=(i=null==v?void 0:v.root)?i:gA,W=null!=(o=null==v?void 0:v.paper)?o:yA,$=ev({elementType:W,externalSlotProps:dn({},R,{style:N?R.style:dn({},R.style,{opacity:0})}),additionalProps:{elevation:m,ref:I},ownerState:L,className:Ma(D.paper,null==R?void 0:R.className)}),H=ev({elementType:B,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:k,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:z,open:y},ownerState:L,className:Ma(D.root,h)}),{slotProps:G}=H,V=bn(H,dA);return Ws.jsx(B,dn({},V,!Xb(B)&&{slotProps:G,disableScrollLock:_},{children:Ws.jsx(S,dn({appear:!0,in:y,onEntering:(e,t)=>{C&&C(e,t),F()},onExited:()=>{q(!1)},timeout:j},M,{children:Ws.jsx(W,dn({},$,{children:p}))}))}))}));var vA=bA;function xA(e){return gb("MuiMenu",e)}yb("MuiMenu",["root","paper","list"]);const wA=["onEntering"],SA=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],EA={vertical:"top",horizontal:"right"},CA={vertical:"top",horizontal:"left"},_A=Vx(vA,{shouldForwardProp:e=>Gx(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),MA=Vx(yA,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),kA=Vx(sA,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),RA=e.forwardRef((function(t,n){var r,i;const o=vk({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:h={},PopoverClasses:f,transitionDuration:m="auto",TransitionProps:{onEntering:g}={},variant:y="selectedMenu",slots:b={},slotProps:v={}}=o,x=bn(o.TransitionProps,wA),w=bn(o,SA),S=(()=>{const t=e.useContext(sv);return null!=t&&t})(),E=dn({},o,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:g,PaperProps:h,transitionDuration:m,TransitionProps:x,variant:y}),C=(e=>{const{classes:t}=e;return Kb({root:["root"],paper:["paper"],list:["list"]},xA,t)})(E),_=a&&!c&&p,M=e.useRef(null);let k=-1;e.Children.map(s,((t,n)=>{e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===y&&t.props.selected||-1===k)&&(k=n))}));const R=null!=(r=b.paper)?r:MA,A=null!=(i=v.paper)?i:h,I=ev({elementType:b.root,externalSlotProps:v.root,ownerState:E,className:[C.root,l]}),L=ev({elementType:R,externalSlotProps:A,ownerState:E,className:C.paper});return Ws.jsx(_A,dn({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?EA:CA,slots:{paper:R,root:b.root},slotProps:{root:I,paper:L},open:p,ref:n,transitionDuration:m,TransitionProps:dn({onEntering:(e,t)=>{M.current&&M.current.adjustStyleForScrollbar(e,{direction:S?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:E},w,{classes:f,children:Ws.jsx(kA,dn({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:M,autoFocus:a&&(-1===k||c),autoFocusItem:_,variant:y},u,{className:Ma(C.list,u.className),children:s}))}))}));var AA=RA;function IA(e){return gb("MuiMenuItem",e)}var LA=yb("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const DA=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],PA=Vx(Vk,{shouldForwardProp:e=>Gx(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>dn({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${LA.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Sv(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${LA.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Sv(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${LA.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Sv(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Sv(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${LA.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${LA.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${DR.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${DR.inset}`]:{marginLeft:52},[`& .${eA.root}`]:{marginTop:0,marginBottom:0},[`& .${eA.inset}`]:{paddingLeft:36},[`& .${QR.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&dn({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${QR.root} svg`]:{fontSize:"1.25rem"}})))),OA=e.forwardRef((function(t,n){const r=vk({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=r,h=bn(r,DA),f=e.useContext(UR),m=e.useMemo((()=>({dense:a||f.dense||!1,disableGutters:l})),[f.dense,a,l]),g=e.useRef(null);Cb((()=>{i&&g.current&&g.current.focus()}),[i]);const y=dn({},r,{dense:m.dense,divider:s,disableGutters:l}),b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e;return dn({},a,Kb({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},IA,a))})(r),v=Ob(g,n);let x;return r.disabled||(x=void 0!==d?d:-1),Ws.jsx(UR.Provider,{value:m,children:Ws.jsx(PA,dn({ref:v,role:u,tabIndex:x,component:o,focusVisibleClassName:Ma(b.focusVisible,c),className:Ma(b.root,p)},h,{ownerState:y,classes:b}))})}));var TA=OA;const NA=Vx(fR,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})((({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:i})=>({pointerEvents:i?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&i?n:t}}))),qA=Vx("div")({position:"absolute",left:0,bottom:0}),FA=Vx("div",{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({...cg,justifyContent:null!=e?e:cg.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8}))),jA=Vx("div")((()=>({...cg}))),zA=Vx("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})((({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:i,justifyContent:o})=>({display:"flex",justifyContent:o,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:i}))),BA=Vx(AA)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),WA=Vx(TA,{shouldForwardProp:e=>!["isActive"].includes(e)})((({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:`${e.spacing(.5)}`,margin:`${e.spacing(.25,.5)}`,padding:`${e.spacing(1,1.5)}`,display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}}))),$A=Vx("span")({textOverflow:"ellipsis",overflow:"hidden"}),HA=Vx("div",{shouldForwardProp:e=>"visible"!==e})((({visible:e})=>({opacity:e?1:0,width:20,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})));var GA;!function(e){e.Expand="Expand",e.Collapse="Collapse"}(GA||(GA={}));const VA=(e,t)=>({qExcludeList:t===GA.Expand,qPos:{qDimName:e,qElemNo:[]}}),UA=({qDimName:e,oldExpansionState:t=[],action:n})=>{const r=t.some((t=>{var n;return(null===(n=t.qPos)||void 0===n?void 0:n.qDimName)===e}));return r?((e,t,n)=>e.map((e=>((e,t)=>{var n;return(null===(n=e.qPos)||void 0===n?void 0:n.qDimName)===t})(e,t)?VA(t,n):e)))(t,e,n):[...t,VA(e,n)]},YA=({model:e,qExpansionState:t,qDimName:n,action:r})=>async()=>{const i=UA({qDimName:n,oldExpansionState:t,action:r});await(async({model:e,oldExpansionState:t,newExpansionState:n,errorMsg:r})=>{try{const r=[{qPath:`${cE}/qExpansionState`,qOp:t?"Replace":"Add",qValue:JSON.stringify(n)}];await e.applyPatches(r,!0)}catch(e){console.error(r,e)}})({model:e,oldExpansionState:t,newExpansionState:i,errorMsg:`Failed to ${r} dimension`})},KA=({model:e,effectivePropertiesService:t,cell:n,env:r})=>{if(!r.flags.isEnabled("CLIENT_IM_6273_EXPAND_OR_COLLAPSE_DIM"))return;const i={model:e,qExpansionState:t.qExpansionState,qDimName:n.fieldId};return{expandCallback:YA({...i,action:GA.Expand}),collapseCallback:YA({...i,action:GA.Collapse})}},XA={[hS.Sorting]:!0,[hS.Selections]:!0,[hS.Searching]:!0},JA=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:i,changeSortOrder:o,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:l,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{var p;const h=c(null),{styleService:f,layoutService:m,effectivePropertiesService:g}=aE(),{app:y,interactions:b,embed:v,translator:x,env:w,model:S}=rE(),{fontSize:E,fontFamily:C,fontStyle:_,fontWeight:M,textDecoration:k,color:R,background:A,hoverBackground:I,activeBackground:L}=f.header,D=c(null),{shouldShowLockIcon:P,shouldShowMenuIcon:O}=a,{open:T,setOpen:N,handleOpenMenu:q,setIsAdjustingWidth:F}=gk(),j={sortFromMenu:async(t,n)=>{t.stopPropagation(),await o(e,n)}},z={embed:v,listboxRef:h,sortCriteria:m.searchSortFromDimension&&e.isDim?g.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},B={app:y,qStateName:m.layout.qStateName},{labelTextAlign:W}=null!==(p=m.getDimensionInfo(e.dimensionInfoIndex))&&void 0!==p?p:{},$=KM(W,"flex-start");return Ws.jsxs(NA,{className:Ut,title:e.label,interactions:b,background:T?L:A,hoverBackground:I,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...dg,...gg(e,i,n,r,f.grid.border),color:R},"data-testid":"title-cell",onClick:q,children:[Ws.jsxs(FA,{children:[P?Ws.jsx(jA,{children:Ws.jsx(fk,{height:12})}):null,Ws.jsx(zA,{fontFamily:C,fontSize:E,fontStyle:_,fontWeight:M,textDecoration:k,justifyContent:$,children:Ws.jsx("span",{style:pg,children:e.label})})]}),e.isDim?Ws.jsxs(Ws.Fragment,{children:[Ws.jsx(gS,{headerData:e,translator:x,anchorRef:D,open:T,setOpen:N,interactions:b,menuAvailabilityFlags:XA,sortRelatedArgs:j,searchRelatedArgs:z,selectionRelatedArgs:B,expandOrCollapseArgs:KA({model:S,effectivePropertiesService:g,cell:e,env:w}),shouldShowMenuIcon:O,env:w,model:S&&"setActiveField"in S?S:void 0}),Ws.jsx(qA,{ref:h}),Ws.jsx(qA,{ref:D})]}):null,Ws.jsx(bk,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:l,setIsAdjustingWidth:F,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},ZA=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=aE();return e>0&&t>0?Ws.jsx("div",{style:{...ug,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null};function QA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const eI=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){QA(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})),tI=u(eI);function nI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const rI=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nI(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),t.createElement("use",{fillRule:"evenodd"})),iI=u(rI),oI=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{styleService:r}=aE(),{interactions:i,translator:o}=rE(),{isActive:a}=AM(),{dataModel:s}=VC(),{setIsAdjustingWidth:l}=mk([s]);if(!(!!i.active&&!a))return null;const c=yk(r,{isLeftColumn:!0});return Ws.jsx(Qx,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:c,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*KC))},confirmWidthCallback:r=>{var i;if(r.type===Jt.FitToContent)return void s.applyIndentModeColumnWidth({type:Jt.Auto});const o=Math.min(null!==(i=r.pixels)&&void 0!==i?i:t,e*KC);n(o),s.applyIndentModeColumnWidth({type:Jt.Pixels,pixels:o})},setIsAdjustingWidth:l,accessibilityRelatedArgs:{translator:o,columnLabel:o.get("SNPivotTable.IndentMode.Rows")},direction:"ltr"})};function aI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const sI=(e,n)=>t.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){aI(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:n},e),t.createElement("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})),lI=u(sI),cI=({cell:e,changeSortOrder:t})=>{const n=c(null),r=c(null),{app:i,interactions:o,embed:a,translator:s,env:l,model:u}=rE(),{layoutService:d,effectivePropertiesService:p}=aE(),{open:h,setOpen:f,handleOpenMenu:m}=gk();return Ws.jsxs(WA,{component:"div",onClick:m,isActive:h,children:[Ws.jsx($A,{children:e.label}),Ws.jsxs(HA,{className:"indent-mode-dropdown-more",visible:h,children:[Ws.jsx(lI,{}),e.isDim?Ws.jsxs(Ws.Fragment,{children:[Ws.jsx(gS,{headerData:e,translator:s,anchorRef:n,open:h,setOpen:f,interactions:o,menuAvailabilityFlags:XA,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:i,qStateName:d.layout.qStateName},expandOrCollapseArgs:KA({model:u,effectivePropertiesService:p,cell:e,env:l}),shouldShowMenuIcon:!1,env:l,model:u&&"setActiveField"in u?u:void 0}),Ws.jsx(qA,{ref:r}),Ws.jsx(qA,{ref:n})]}):null]})]})},uI=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{var i,o;const a=(null===(i=n.at(-1))||void 0===i?void 0:i.id)===dE,s=e+1<n.length&&(null===(o=n[e+1])||void 0===o?void 0:o.id)===dE;return!(r&&a&&s)&&((null==t?void 0:t.id)!==dE&&e<n.length-1)},dI=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:i})=>{const{styleService:o}=aE(),{interactions:a,translator:s}=rE(),{dataModel:u,gridSectionsData:{headersData:d}}=VC(),[p,h]=l(!1),f=c(null),{headerCellHeight:m}=o,{color:g,background:y,hoverBackground:b,activeBackground:v,fontFamily:x,fontSize:w,fontStyle:S,fontWeight:E,textDecoration:C}=o.header,{isAdjustingWidth:_}=mk([u]),M=e=>{e.stopPropagation()},k={height:m,gridColumn:`1 / span ${d.size.x}`,gridRow:d.size.y,zIndex:d.size.x-0};return Ws.jsxs(NA,{isDimension:!0,background:p?v:y,interactions:a,hoverBackground:b,style:{...k,...dg,color:g},onClick:e=>{!a.active||MM(e)||_||h(!p)},"data-testid":"indentModeHeaderCellWrapper",children:[Ws.jsxs(FA,{justifyContent:"flex-start",children:[Ws.jsx(zA,{fontFamily:x,fontSize:w,fontStyle:S,fontWeight:E,textDecoration:C,justifyContent:"flex-start",children:Ws.jsx("span",{style:pg,children:s.get("SNPivotTable.IndentMode.Rows")})}),p?Ws.jsx(iI,{}):Ws.jsx(tI,{}),Ws.jsx(qA,{ref:f})]}),Ws.jsx(BA,{open:p,anchorEl:f.current,children:e.map(((n,r)=>[n&&n.id!==dE&&Ws.jsx("li",{role:"presentation",onClick:M,onKeyDown:M,children:Ws.jsx(cI,{cell:n,changeSortOrder:t})}),uI({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===d.size.y})&&Ws.jsx(sw,{"data-testid":"group-divider",variant:"middle"})]))}),Ws.jsx(oI,{tableWidth:i,leftGridWidth:r,overrideLeftGridWidth:n})]})},pI={display:"grid",width:"fit-content"},hI=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:i,getHeaderCellsIconsVisibilityStatus:o,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=aE(),{gridSectionsData:{headersData:c}}=VC();return Ws.jsxs("div",{"data-testid":"HEADER_GRID",style:{...pI,gridTemplateColumns:n.map((e=>`${e}px`)).join(" "),gridTemplateRows:c.data.map((()=>`${r}px`)).join(" "),height:a},children:[c.size.y>1&&Ws.jsx(ZA,{columnSpan:c.size.x-1,rowSpan:c.size.y-1}),c.data.map(((a,u)=>{let d=[];if(l.isIndentModeEnabled&&c.size.x>1&&u+1===c.size.y){const n=c.data.at(-1);return d.push(Ws.jsx(dI,{menuItems:n[0],changeSortOrder:i,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n[0][0].id)),d}return d=a.reduce(((t,a,d)=>{if(a){const p=o(d,a.isLocked,a.label),h=l.isIndentModeEnabled&&1===c.size.x;t.push(Ws.jsx(JA,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:i,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:h,tableWidth:e},a.id))}return t}),[]),d}))]})};var fI=f(hI);const mI=(e,t,n,r)=>{const{layoutService:i}=aE();m((()=>{var t;null===(t=e.current)||void 0===t||t.forEach((e=>null==e?void 0:e.resetAfterIndex(0,!0)))}),[e,t,n,r,i])},gI=(e,t)=>{$g((()=>{var t;null===(t=e.current)||void 0===t||t.forEach((e=>null==e?void 0:e.resetAfterIndex(0,!1)))}),[e,t])},yI=(e,t)=>{const{isLast:n,list:r,listValues:i}=t;return n?r[e]:i[e]},bI=(e,t,n)=>{var r;const i=n?"flex-start":"center";var o,a;if(e.representation.type===Dt.Image)return null!==(o=null===(a=e.representation.resolvedImagePosition)||void 0===a?void 0:a.horizontal)&&void 0!==o?o:i;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){var s;const{labelTextAlign:n}=null!==(s=t.visibleMeasureInfo[e.visibleMeasureInfoIndex])&&void 0!==s?s:{};return KM(n,i)}const{textAlign:l}=null!==(r=t.getDimensionInfo(e.dimensionInfoIndex))&&void 0!==r?r:{};return KM(l,i)},vI=()=>{},xI=({children:e,text:t,reactWindowStyle:n,cell:r,data:i,showTotalCellDivider:o,isLastRow:a,isLastColumn:s,isLeftColumn:l,isCellSelected:c,isAdjustingWidth:u,index:d})=>{var p;const{styleService:h,layoutService:f}=aE(),{interactions:m}=rE(),{isLocked:g,createMouseDownHandler:y,createMouseOverHandler:b}=AM(),{showLastBorder:v}=i,x=g(r)||r.isLockedByDimension,w=!(x||!m.active||!m.select||r.isEmpty||r.isNull||r.isPseudoDimension||r.isTotal||u),S=w?y(d,(e=>yI(e,i))):void 0,E=w?b(d):void 0;return Ws.jsx("div",{className:Ut,title:m.passive?t:void 0,style:{...n,...mg(a,s,h.grid.border,v),...yg({bottomDivider:o&&l,rightDivider:o&&!l,borderColor:h.grid.divider}),...dg,padding:"0px 4px",cursor:jM(w),background:OM({styleService:h,isCellSelected:c,cell:r,isCellLocked:x}),zIndex:l?void 0:f.size.x-r.x,justifyContent:bI(r,f,l),display:"flex",...f.isIndentModeEnabled&&l&&{paddingLeft:Math.max(4,24*(null!==(p=r.indentLevel)&&void 0!==p?p:0))}},"aria-hidden":"true",onMouseDown:S,onMouseOver:E,onKeyUp:vI,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":r.x,"data-page-x":r.pageX,"data-y":r.y,"data-page-y":r.pageY,"data-cell-type":r.ref.qType,"data-dimension-info-index":r.dimensionInfoIndex,children:e})},wI=e=>{e.stopPropagation()},SI=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:wI,style:{pointerEvents:n.active?"auto":"none",color:null!=r?r:void 0,opacity:n.active&&n.passive||r?void 0:.4}}),EI=({href:e,text:n,interactions:r,color:i})=>t.createElement(Rp,SI({href:e,text:n,interactions:r,color:i}),n);function CI(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_I(Object(n),!0).forEach((function(t){CI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kI=Object.prototype.hasOwnProperty,RI=Object.prototype.toString,AI=Object.defineProperty,II=Object.getOwnPropertyDescriptor,LI=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===RI.call(e)},DI=function(e){if(!e||"[object Object]"!==RI.call(e))return!1;var t,n=kI.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&kI.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||kI.call(e,t)},PI=function(e,t){AI&&"__proto__"===t.name?AI(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},OI=function(e,t){if("__proto__"===t){if(!kI.call(e,t))return;if(II)return II(e,t).value}return e[t]},TI=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=OI(s,n),s!==(i=OI(t,n))&&(u&&i&&(DI(i)||(o=LI(i)))?(o?(o=!1,a=r&&LI(r)?r:[]):a=r&&DI(r)?r:{},PI(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&PI(s,{name:n,newValue:i}));return s};function NI(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function qI(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function FI(e){let{cache:t,f:n,mainCell:r,p:i,prop:o,page:a,rowIdx:s,row:l,sourceKey:c,target:u,targetProp:d,columnOrder:p}=e,h=r;if(i.field&&i.field!==n){const e=NI(i.field,a,{cache:t},p);if(-1===e)return;h=TI({qRow:s},e(l))}u[d]=qI(i,h,{key:c})}function jI(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),p=!!i[e].trackBy,h=typeof i[e].trackBy,f={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=NI(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const b=a.qDataPages[t].qArea.qTop+y,v=TI({qRow:b},o(a.qDataPages[t].qMatrix[y])),x=qI(u,v,{key:s});if(!(u.filter&&!u.filter(v))){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)FI({cache:n,f:l,mainCell:v,p:i[o],prop:d[e],props:c,page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}p&&r.track({cfg:i[e],itemData:v,obj:x,target:m,tracker:f,trackType:h}),g.push(x)}}}const y=p?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function zI(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function BI(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=$I)):void 0===t&&(t=WI);for(var n,r,i,o,a,s=new VI(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new VI(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(GI)}function WI(e){return e.children}function $I(e){return Array.isArray(e)?e[1]:null}function HI(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function GI(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function VI(e){this.data=e,this.depth=this.height=0,this.parent=null}function UI(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}VI.prototype=BI.prototype={constructor:VI,count:function(){return this.eachAfter(zI)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return BI(this).eachBefore(HI)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var YI={depth:-1},KI={},XI={};function JI(e){return e.id}function ZI(e){return e.parentId}function QI(){var e,t=JI,n=ZI;function r(r){var i,o,a,s,l,c,u,d,p=Array.from(r),h=t,f=n,m=new Map;if(null!=e){const t=p.map(((t,n)=>function(e){e=`${e}`;let t=e.length;tL(e,t-1)&&!tL(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(eL),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(eL(e)),p.push(XI));h=(e,n)=>t[n],f=(e,t)=>n[t]}for(a=0,i=p.length;a<i;++a)o=p[a],c=p[a]=new VI(o),null!=(u=h(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?KI:c)),null!=(u=f(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=p[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===KI)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===XI&&1===s.children.length;)s=s.children[0],--i;for(let e=p.length-1;e>=0&&(c=p[e]).data===XI;--e)c.data=null}if(s.parent=YI,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(GI),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=UI(e),r):t},r.parentId=function(e){return arguments.length?(n=UI(e),r):n},r.path=function(t){return arguments.length?(e=UI(t),r):e},r}function eL(e){let t=e.length;if(t<2)return"";for(;--t>1&&!tL(e,t););return e.slice(0,t)}function tL(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function nL(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=nL(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=nL(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function rL(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...rL(e[i].children,t-1,n)]);return r}function iL(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>rL(e.children,r-1,n)}return!1}const oL=/^qDimensionInfo(?:\/(\d+))?/,aL=/^\/?qMeasureInfo\/(\d+)/,sL=/\/qAttrExprInfo\/(\d+)/,lL=/\/qAttrDimInfo\/(\d+)/;function cL(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function uL(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,h=cL(n);return oL.test(d)&&(i=!0,o=+oL.exec(d)[1],d=r.replace(oL,"")),aL.test(d)&&("K"===n.qMode?c=+aL.exec(d)[1]:p&&-1!==p.indexOf(-1)?(c=+aL.exec(d)[1],u=0):u=+aL.exec(d)[1],d=d.replace(aL,"")),d&&(lL.exec(d)?s=+lL.exec(d)[1]:sL.exec(d)&&(a=+sL.exec(d)[1])),l=i?"S"===n.qMode?h[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function dL(e,t){let n,r,i=iL(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function pL(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function hL(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let p,h,f,m,g,y;if("primitive"===d.type?(f=d.value,y=String(d.value)):("function"==typeof d.value&&(p=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),p&&(f=g.map(p),p=null),h&&(y=g.map(h),h=null),f=d.reduce?d.reduce(f):f,y=d.reduceLabel?d.reduceLabel(y,f):String(f)):(f=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=f)):(f=i,y=i)),s.fields){const e=p?p(f):f;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=p?p(f):f;o[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const fL=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=nL(r,e);return o&&o[0]?(t.tree=BI(o[0],n.children||(e=>e[i])),t.tree):null};const mL=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields?s.fields:[s];for(let e=0;e<l.length;e++){const t=l[e];if(t.field!==a){const e=dL(o,uL(t.field,{cube:r,cache:i}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function gL(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=MI({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),c=QI().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):fL(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=cL(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(MI(MI({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?uL(a,{cube:i,cache:n}):{fieldDepth:0};mL({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=pL(r,a,{key:o});hL({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o,isTree:!0}),u[e].data=s}return a}function yL(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!fL(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),p=Object.keys(u),h=uL(c,{cube:s,cache:n}),{nodeFn:f,attrFn:m,valueFn:g}=dL({fieldDepth:0},h);mL({propsArr:p,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!i[a].trackBy,b=typeof i[a].trackBy,v={},x=[],w=f(n.tree),S=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=pL(d,n,{key:l});hL({propsArr:p,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:v,trackType:b}),S.push(o)}const E=y?r.collect(x,{main:d,propsArr:p,props:u}):S;o=[...o,...E]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var bL=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
175
175
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
176
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(h,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}}));function vL(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const xL={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},wL=/%\)?$/,SL=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,EL=/^\(oct\)/i,CL=/^\(dec\)/i,_L=/^\(hex\)/i,ML=/^\(bin\)/i,kL=/^\(rom\)/i,RL=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,AL=/#|0/g;function IL(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function LL(e,t,n){let r;return SL.test(t)?e=IL(e,Number(/\d{2}/.exec(t)[0]),t,n):EL.test(t)?e=IL(e,8,t,n):CL.test(t)?e=IL(e,10,t,n):_L.test(t)?e=IL(e,16,t,n):ML.test(t)?e=IL(e,2,t,n):kL.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function DL(e,t,n){const r=vL(e);return n?r:new RegExp(r||"",t)}function PL(e,t,n,r){let i,o,a,s,l,c,u,d,p,h=e.pattern;var f,m;r&&(e.abbreviate=!0),f=t,(m=n)&&(m=vL(m)),f&&(f=vL(f)),p=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(p),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(DL(c,"g"),t)),u=n,n=".",u&&(a=a.replace(DL(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(AL)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=wL.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(DL(t,null,!0),"|").concat(DL(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class OL{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return xL;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new OL(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],RL.test(e[0])&&(r.positive.isFunctional=!0),e[1]?RL.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?RL.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||PL(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&PL(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&PL(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",p="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=LL(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=bL(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=bL(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===o?u.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+p+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function TL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function NL(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new OL(...t)}(i,e,t,n,r),a=TL(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const qL="D",FL="T",jL="TS",zL="IV",BL=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],WL=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$L=["January","February","March","April","May","June","July","August","September","October","November","December"],HL=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function GL(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function VL(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function UL(e,t){let n,r=function(e){const t=e,n=24*VL(t),r=60*VL(n),i=60*VL(r),o=1e3*VL(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class YL{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:BL,qDayNames:WL,qLongMonthNames:$L,qMonthNames:HL}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[FL]:r.qTimeFmt||"hh:mm:ss",[qL]:r.qDateFmt||"YYYY-MM-DD",[jL]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new YL(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=UL(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:GL("".concat(t.year).slice(-2),2),YYY:GL("".concat(t.year).slice(-3),3),def:e=>GL("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:GL("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:GL("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>GL("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>GL("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>GL("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>GL("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function KL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new YL(...t)}function XL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=KL(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=TL(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==zL?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=KL(i,e,t),r=TL(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function JL(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return XL(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),NL(n,r,i,o,t)}(t,i),p="dimension"===s?"first":(e,t)=>d(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:p,formatter:()=>d,tags:()=>t.qTags};return h}function ZL(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:JL(TI({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=ZL("qAttrDimInfo",t,n,a,TI({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=ZL("qAttrExprInfo",t,n,a,TI({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=ZL("qMeasureInfo",t,n,a,TI({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function QL(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=QL.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=yL,a.hierarchy=gL,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=jI,a.pages=i.qDataPages,a.hierarchy=gL):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...ZL("qDimensionInfo",i,e,"",TI({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...ZL("qMeasureInfo",i,e,"",TI({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),i=JL(MI({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),s}const eD=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],tD=/\/qDimensionInfo(?:\/(\d+))?/,nD=/\/qMeasureInfo\/(\d+)/,rD=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,iD=/\/qAttrExprInfo\/(\d+)/,oD=/\/?qHyperCube/,aD=/\/?qTreeData/,sD=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),lD=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function cD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;oD.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=sD):aD.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=lD);let s=!0;if(tD.test(e)&&(r=+tD.exec(e)[1]),nD.test(e)&&(i=+nD.exec(e)[1]),rD.test(e)){i=-1,r=0;const e=+rD.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(iD.test(e)){const e=i;if(t){i=0;const a=nL(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+iD.exec(n)[1]}else r>-1?(r=-1,i=+iD.exec(n)[1]):i+=+iD.exec(n)[1]+1}return eD.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function uD(e){QL.util=e.data("matrix").util,e.data("q",QL),e.formatter("q-number",NL),e.formatter("q-time",XL)}uD.qBrushHelper=cD,uD.selections=cD;var dD=Object.prototype.hasOwnProperty,pD=Object.prototype.toString,hD=Object.defineProperty,fD=Object.getOwnPropertyDescriptor,mD=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===pD.call(e)},gD=function(e){if(!e||"[object Object]"!==pD.call(e))return!1;var t,n=dD.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&dD.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||dD.call(e,t)},yD=function(e,t){hD&&"__proto__"===t.name?hD(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},bD=function(e,t){if("__proto__"===t){if(!dD.call(e,t))return;if(fD)return fD(e,t).value}return e[t]},vD=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=bD(s,n),s!==(i=bD(t,n))&&(u&&i&&(gD(i)||(o=mD(i)))?(o?(o=!1,a=r&&mD(r)?r:[]):a=r&&gD(r)?r:{},yD(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&yD(s,{name:n,newValue:i}));return s},xD="2.3.0";function wD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ED(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SD(Object(n),!0).forEach((function(t){wD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CD(e){return!!e.changedTouches}function _D(e){return"number"==typeof e&&!isNaN(e)}function MD(e){return"number"!=typeof e||isNaN(e)}function kD(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function RD(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function AD(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function ID(e){const[t,n,r,i]=kD(e);return{x:t,y:n,width:r-t,height:i-n}}function LD(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function DD(e){const{x:t,y:n,width:r,height:i,x1:o,x2:a,y1:s,y2:l,cx:c,cy:u,r:d,vertices:p}=e||{};return _D(c)&&_D(u)&&_D(d)?"circle":_D(o)&&_D(a)&&_D(s)&&_D(l)?"line":_D(t)&&_D(n)&&_D(r)&&_D(i)?"rect":_D(t)&&_D(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function PD(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var OD=Math.PI,TD=2*OD,ND=1e-6,qD=TD-ND;function FD(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function jD(){return new FD}function zD(e){return function(){return e}}FD.prototype=jD.prototype={constructor:FD,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>ND)if(Math.abs(u*s-l*c)>ND&&i){var p=n-o,h=r-a,f=s*s+l*l,m=p*p+h*h,g=Math.sqrt(f),y=Math.sqrt(d),b=i*Math.tan((OD-Math.acos((f+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>ND&&(this._+="L"+(e+v*c)+","+(t+v*u)),this._+="A"+i+","+i+",0,0,"+ +(u*p>c*h)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>ND||Math.abs(this._y1-c)>ND)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%TD+TD),d>qD?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>ND&&(this._+="A"+n+","+n+",0,"+ +(d>=OD)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var BD=Math.abs,WD=Math.atan2,$D=Math.cos,HD=Math.max,GD=Math.min,VD=Math.sin,UD=Math.sqrt,YD=1e-12,KD=Math.PI,XD=KD/2,JD=2*KD;function ZD(e){return e>=1?XD:e<=-1?-XD:Math.asin(e)}function QD(e){return e.innerRadius}function eP(e){return e.outerRadius}function tP(e){return e.startAngle}function nP(e){return e.endAngle}function rP(e){return e&&e.padAngle}function iP(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/UD(s*s+l*l),u=c*l,d=-c*s,p=e+u,h=t+d,f=n+u,m=r+d,g=(p+f)/2,y=(h+m)/2,b=f-p,v=m-h,x=b*b+v*v,w=i-o,S=p*m-f*h,E=(v<0?-1:1)*UD(HD(0,w*w*x-S*S)),C=(S*v-b*E)/x,_=(-S*b-v*E)/x,M=(S*v+b*E)/x,k=(-S*b+v*E)/x,R=C-g,A=_-y,I=M-g,L=k-y;return R*R+A*A>I*I+L*L&&(C=M,_=k),{cx:C,cy:_,x01:-u,y01:-d,x11:C*(i/w-1),y11:_*(i/w-1)}}function oP(){var e=QD,t=eP,n=zD(0),r=null,i=tP,o=nP,a=rP,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),p=i.apply(this,arguments)-XD,h=o.apply(this,arguments)-XD,f=BD(h-p),m=h>p;if(s||(s=l=jD()),d<u&&(c=d,d=u,u=c),d>YD)if(f>JD-YD)s.moveTo(d*$D(p),d*VD(p)),s.arc(0,0,d,p,h,!m),u>YD&&(s.moveTo(u*$D(h),u*VD(h)),s.arc(0,0,u,h,p,m));else{var g,y,b=p,v=h,x=p,w=h,S=f,E=f,C=a.apply(this,arguments)/2,_=C>YD&&(r?+r.apply(this,arguments):UD(u*u+d*d)),M=GD(BD(d-u)/2,+n.apply(this,arguments)),k=M,R=M;if(_>YD){var A=ZD(_/u*VD(C)),I=ZD(_/d*VD(C));(S-=2*A)>YD?(x+=A*=m?1:-1,w-=A):(S=0,x=w=(p+h)/2),(E-=2*I)>YD?(b+=I*=m?1:-1,v-=I):(E=0,b=v=(p+h)/2)}var L=d*$D(b),D=d*VD(b),P=u*$D(w),O=u*VD(w);if(M>YD){var T,N=d*$D(v),q=d*VD(v),F=u*$D(x),j=u*VD(x);if(f<KD&&(T=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,p=d*l-u*c;if(!(p*p<YD))return[e+(p=(u*(t-o)-d*(e-i))/p)*l,t+p*c]}(L,D,F,j,N,q,P,O))){var z=L-T[0],B=D-T[1],W=N-T[0],$=q-T[1],H=1/VD(function(e){return e>1?0:e<-1?KD:Math.acos(e)}((z*W+B*$)/(UD(z*z+B*B)*UD(W*W+$*$)))/2),G=UD(T[0]*T[0]+T[1]*T[1]);k=GD(M,(u-G)/(H-1)),R=GD(M,(d-G)/(H+1))}}E>YD?R>YD?(g=iP(F,j,L,D,d,R,m),y=iP(N,q,P,O,d,R,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),R<M?s.arc(g.cx,g.cy,R,WD(g.y01,g.x01),WD(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,WD(g.y01,g.x01),WD(g.y11,g.x11),!m),s.arc(0,0,d,WD(g.cy+g.y11,g.cx+g.x11),WD(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,R,WD(y.y11,y.x11),WD(y.y01,y.x01),!m))):(s.moveTo(L,D),s.arc(0,0,d,b,v,!m)):s.moveTo(L,D),u>YD&&S>YD?k>YD?(g=iP(P,O,N,q,u,-k,m),y=iP(L,D,F,j,u,-k,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),k<M?s.arc(g.cx,g.cy,k,WD(g.y01,g.x01),WD(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,k,WD(g.y01,g.x01),WD(g.y11,g.x11),!m),s.arc(0,0,u,WD(g.cy+g.y11,g.cx+g.x11),WD(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,k,WD(y.y11,y.x11),WD(y.y01,y.x01),!m))):s.arc(0,0,u,w,x,m):s.lineTo(P,O)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-KD/2;return[$D(r)*n,VD(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:zD(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:zD(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:zD(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:zD(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:zD(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:zD(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:zD(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function aP(e){this._context=e}function sP(e){return new aP(e)}function lP(e){return e[0]}function cP(e){return e[1]}function uP(){var e=lP,t=null,n=zD(0),r=cP,i=zD(!0),o=null,a=sP,s=null;function l(l){var c,u,d,p,h,f=l.length,m=!1,g=new Array(f),y=new Array(f);for(null==o&&(s=a(h=jD())),c=0;c<=f;++c){if(!(c<f&&i(p=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(p,c,l),y[c]=+n(p,c,l),s.point(t?+t(p,c,l):g[c],r?+r(p,c,l):y[c]))}if(h)return s=null,h+""||null}function c(){return function(){var e=lP,t=cP,n=zD(!0),r=null,i=sP,o=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(o=i(c=jD())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,s,a),+t(l,s,a));if(c)return o=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:zD(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:zD(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:zD(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}().defined(i).curve(a).context(o)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:zD(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:zD(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:zD(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:zD(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:zD(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:zD(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:zD(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}function dP(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function pP(e){return e}aP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var hP=Array.prototype.slice;function fP(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function mP(e){this._context=e}function gP(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function yP(e,t){this._context=e,this._k=(1-t)/6}mP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fP(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fP(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},yP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gP(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:gP(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var bP=function e(t){function n(e){return new yP(e,t)}return n.tension=function(t){return e(+t)},n}(0);function vP(e,t){this._context=e,this._alpha=t}vP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>YD){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>YD){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var xP=function e(t){function n(e){return t?new vP(e,t):new yP(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function wP(e){return e<0?-1:1}function SP(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(wP(o)+wP(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function EP(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function CP(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function _P(e){this._context=e}function MP(e){this._context=new kP(e)}function kP(e){this._context=e}function RP(e){this._context=e}function AP(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function IP(e,t){this._context=e,this._t=t}function LP(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function DP(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function PP(e,t){return e[t]}function OP(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function TP(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function NP(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map((e=>i[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function qP(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function FP(e){return(e=qP(Math.abs(e)))?e[1]:NaN}_P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:CP(this,this._t0,EP(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,CP(this,EP(this,n=SP(this,e,t)),n);break;default:CP(this,this._t0,n=SP(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(MP.prototype=Object.create(_P.prototype)).point=function(e,t){_P.prototype.point.call(this,t,e)},kP.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},RP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=AP(e),i=AP(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},IP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var jP,zP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function BP(e){if(!(t=zP.exec(e)))throw new Error("invalid format: "+e);var t;return new WP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function WP(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function $P(e,t){var n=qP(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}BP.prototype=WP.prototype,WP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var HP={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>$P(100*e,t),r:$P,s:function(e,t){var n=qP(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(jP=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+qP(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function GP(e){return e}var VP,UP,YP,KP=Array.prototype.map,XP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function JP(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?GP:(t=KP.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?GP:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(KP.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=BP(e)).fill,n=e.align,d=e.sign,p=e.symbol,h=e.zero,f=e.width,m=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(m=!0,b="g"):HP[b]||(void 0===g&&(g=12),y=!0,b="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var v="$"===p?i:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===p?o:/[%p]/.test(b)?l:"",w=HP[b],S=/[defgprs%]/.test(b);function E(e){var i,o,l,p=v,E=x;if("c"===b)E=w(e)+E,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:c:"-"===d||"("===d?"":d)+p,E=("s"===b?XP[8+jP/3]:"")+E+(C&&"("===d?")":""),S)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){E=(46===l?a+e.slice(i+1):e.slice(i))+E,e=e.slice(0,i);break}}m&&!h&&(e=r(e,1/0));var _=p.length+e.length+E.length,M=_<f?new Array(f-_+1).join(t):"";switch(m&&h&&(e=r(M+e,M.length?f-E.length:1/0),M=""),n){case"<":e=p+e+E+M;break;case"=":e=p+M+e+E;break;case"^":e=M.slice(0,_=M.length>>1)+p+e+E+M.slice(_);break;default:e=M+p+e+E}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return e+""},E}return{format:d,formatPrefix:function(e,t){var n=d(((e=BP(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(FP(t)/3))),i=Math.pow(10,-r),o=XP[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){VP=JP(e),UP=VP.format,YP=VP.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const ZP=new Date,QP=new Date;function eO(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>eO((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(ZP.setTime(+t),QP.setTime(+r),e(ZP),e(QP),Math.floor(n(ZP,QP))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const tO=6e4,nO=864e5,rO=6048e5,iO=eO((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*tO)/nO),(e=>e.getDate()-1));iO.range;const oO=eO((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/nO),(e=>e.getUTCDate()-1));oO.range;const aO=eO((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/nO),(e=>Math.floor(e/nO)));function sO(e){return eO((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*tO)/rO))}aO.range;const lO=sO(0),cO=sO(1),uO=sO(2),dO=sO(3),pO=sO(4),hO=sO(5),fO=sO(6);function mO(e){return eO((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/rO))}lO.range,cO.range,uO.range,dO.range,pO.range,hO.range,fO.range;const gO=mO(0),yO=mO(1),bO=mO(2),vO=mO(3),xO=mO(4),wO=mO(5),SO=mO(6);gO.range,yO.range,bO.range,vO.range,xO.range,wO.range,SO.range;const EO=eO((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));EO.every=e=>isFinite(e=Math.floor(e))&&e>0?eO((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,EO.range;const CO=eO((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function _O(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function MO(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function kO(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=_O,n=(t,n)=>_O(e(t),n),r=(t,n)=>e(t)-n):(t=e===_O||e===MO?e:RO,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function RO(){return 0}CO.every=e=>isFinite(e=Math.floor(e))&&e>0?eO((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,CO.range;const AO=kO(_O).right;kO((function(e){return null===e?NaN:+e})).center;var IO=AO;class LO extends Map{constructor(e,t=PO){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(DO(this,e))}has(e){return super.has(DO(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function DO({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function PO(e){return null!==e&&"object"==typeof e?e.valueOf():e}const OO=Math.sqrt(50),TO=Math.sqrt(10),NO=Math.sqrt(2);function qO(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=OO?10:o>=TO?5:o>=NO?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?qO(e,t,2*n):[s,l,c]}function FO(e,t,n){return qO(e=+e,t=+t,n=+n)[2]}function jO(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function zO(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function BO(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function WO(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=KO(i),u=XO(i),d=KO(o),p=XO(o),h=KO(a),f=XO(a),m=KO(s),g=XO(s),y=KO(l),b=XO(l),v={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:yT,e:yT,f:ST,g:PT,G:TT,H:bT,I:vT,j:xT,L:wT,m:ET,M:CT,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:iN,s:oN,S:_T,u:MT,U:kT,V:AT,w:IT,W:LT,x:null,X:null,y:DT,Y:OT,Z:NT,"%":rN},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:qT,e:qT,f:WT,g:QT,G:tN,H:FT,I:jT,j:zT,L:BT,m:$T,M:HT,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:iN,s:oN,S:GT,u:VT,U:UT,V:KT,w:XT,W:JT,x:null,X:null,y:ZT,Y:eN,Z:nN,"%":rN},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:sT,e:sT,f:hT,g:rT,G:nT,H:cT,I:cT,j:lT,L:pT,m:aT,M:uT,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:oT,Q:mT,s:gT,S:dT,u:ZO,U:QO,V:eT,w:JO,W:tT,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:rT,Y:nT,Z:iT,"%":fT};function S(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=$O[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function E(e,t){return function(n){var r,i,o=BO(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=zO(BO(o.y,0,1))).getUTCDay(),r=i>4||0===i?yO.ceil(r):yO(r),r=oO.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=jO(BO(o.y,0,1))).getDay(),r=i>4||0===i?cO.ceil(r):cO(r),r=iO.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?zO(BO(o.y,0,1)).getUTCDay():jO(BO(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,zO(o)):jO(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in $O?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e+="",!0);return t.toString=function(){return e},t}}}var $O={"-":"",_:" ",0:"0"},HO=/^\s*\d+/,GO=/^%/,VO=/[\\^$*+?|[\]().{}]/g;function UO(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function YO(e){return e.replace(VO,"\\$&")}function KO(e){return new RegExp("^(?:"+e.map(YO).join("|")+")","i")}function XO(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function JO(e,t,n){var r=HO.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ZO(e,t,n){var r=HO.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function QO(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function eT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function nT(e,t,n){var r=HO.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function rT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function iT(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function oT(e,t,n){var r=HO.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function aT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function sT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function lT(e,t,n){var r=HO.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function cT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function uT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function dT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function pT(e,t,n){var r=HO.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function hT(e,t,n){var r=HO.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fT(e,t,n){var r=GO.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function mT(e,t,n){var r=HO.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function gT(e,t,n){var r=HO.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function yT(e,t){return UO(e.getDate(),t,2)}function bT(e,t){return UO(e.getHours(),t,2)}function vT(e,t){return UO(e.getHours()%12||12,t,2)}function xT(e,t){return UO(1+iO.count(EO(e),e),t,3)}function wT(e,t){return UO(e.getMilliseconds(),t,3)}function ST(e,t){return wT(e,t)+"000"}function ET(e,t){return UO(e.getMonth()+1,t,2)}function CT(e,t){return UO(e.getMinutes(),t,2)}function _T(e,t){return UO(e.getSeconds(),t,2)}function MT(e){var t=e.getDay();return 0===t?7:t}function kT(e,t){return UO(lO.count(EO(e)-1,e),t,2)}function RT(e){var t=e.getDay();return t>=4||0===t?pO(e):pO.ceil(e)}function AT(e,t){return e=RT(e),UO(pO.count(EO(e),e)+(4===EO(e).getDay()),t,2)}function IT(e){return e.getDay()}function LT(e,t){return UO(cO.count(EO(e)-1,e),t,2)}function DT(e,t){return UO(e.getFullYear()%100,t,2)}function PT(e,t){return UO((e=RT(e)).getFullYear()%100,t,2)}function OT(e,t){return UO(e.getFullYear()%1e4,t,4)}function TT(e,t){var n=e.getDay();return UO((e=n>=4||0===n?pO(e):pO.ceil(e)).getFullYear()%1e4,t,4)}function NT(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+UO(t/60|0,"0",2)+UO(t%60,"0",2)}function qT(e,t){return UO(e.getUTCDate(),t,2)}function FT(e,t){return UO(e.getUTCHours(),t,2)}function jT(e,t){return UO(e.getUTCHours()%12||12,t,2)}function zT(e,t){return UO(1+oO.count(CO(e),e),t,3)}function BT(e,t){return UO(e.getUTCMilliseconds(),t,3)}function WT(e,t){return BT(e,t)+"000"}function $T(e,t){return UO(e.getUTCMonth()+1,t,2)}function HT(e,t){return UO(e.getUTCMinutes(),t,2)}function GT(e,t){return UO(e.getUTCSeconds(),t,2)}function VT(e){var t=e.getUTCDay();return 0===t?7:t}function UT(e,t){return UO(gO.count(CO(e)-1,e),t,2)}function YT(e){var t=e.getUTCDay();return t>=4||0===t?xO(e):xO.ceil(e)}function KT(e,t){return e=YT(e),UO(xO.count(CO(e),e)+(4===CO(e).getUTCDay()),t,2)}function XT(e){return e.getUTCDay()}function JT(e,t){return UO(yO.count(CO(e)-1,e),t,2)}function ZT(e,t){return UO(e.getUTCFullYear()%100,t,2)}function QT(e,t){return UO((e=YT(e)).getUTCFullYear()%100,t,2)}function eN(e,t){return UO(e.getUTCFullYear()%1e4,t,4)}function tN(e,t){var n=e.getUTCDay();return UO((e=n>=4||0===n?xO(e):xO.ceil(e)).getUTCFullYear()%1e4,t,4)}function nN(){return"+0000"}function rN(){return"%"}function iN(e){return+e}function oN(e){return Math.floor(+e/1e3)}const aN=NP();aN("d3-number",(function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=JP(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o})),aN("d3-time",(function(e){let t=WO({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=WO(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const sN={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return aN(t.type||"d3-number")(t.format||"")})(e)};function lN(e){let{id:t=sN.id,key:n=sN.key,min:r=sN.min,max:i=sN.max,type:o=sN.type,tags:a=sN.tags,title:s=sN.title,values:l=sN.values,value:c=sN.value,label:u=sN.label,formatter:d=sN.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>o(e),min:()=>r(e),max:()=>i(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:c,label:u}}const cN=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),uN=e=>e.reduce(((e,t)=>e+t),0),dN={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=cN(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=cN(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=cN(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=cN(e),n=t.length;return n?uN(t)/n:NaN}};function pN(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>pN(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=dN[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?dN[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=dN[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?dN[l.field.reduceLabel]:l.field.reduceLabel))})),i}function hN(e,t){const{main:n}=pN(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:pN(e,t,e.props||{},n),main:n}}function fN(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function mN(e,t){let{main:n,propsArr:r,props:i}=t,o=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=i[e].field?i[e].field.formatter():e=>e})),o.push(...e.map((e=>{const t=fN(e.items,n,a);return r.forEach((n=>{t[n]=fN(e.items,i[n],s[n],n)})),t}))),o}function gN(e){let{cfg:t,itemData:n,obj:r,target:i,tracker:o,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=o[s];l||(l=o[s]={items:[],id:s},i.push(l)),l.items.push(r)}function yN(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function bN(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const vN={diverging:function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},none:LP,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}LP(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}LP(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,p=(d-(u[a-1][1]||0))/2,h=0;h<s;++h){var f=e[t[h]];p+=(f[a][1]||0)-(f[a-1][1]||0)}l+=d,c+=p*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,LP(e,t)}}},xN={ascending:function(e){var t=e.map(TP);return DP(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(TP),o=function(e){var t=e.map(OP);return DP(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:DP,reverse:function(e){return DP(e).reverse()}};function wN(e,t,n){const r={},i=t.stackKey,o=t.value,a=t.startProp||"start",s=t.endProp||"end",l=t.offset||"none",c=t.order||"none",u=t.valueRef||"";let d=0,p={};for(let t=0;t<e.items.length;t++){let n=e.items[t],o=u?n[u]:null;if(o&&o.source){let e="".concat(o.source.key||"","/").concat(o.source.field);p[e]||(p[e]=o.source)}let a=i(n);r[a]=r[a]||{items:[]},r[a].items.push(n),d=Math.max(d,r[a].items.length)}const h=Array.apply(null,{length:d}).map(Number.call,Number),f=Object.keys(r).map((e=>r[e].items)),m=function(){var e=zD([]),t=DP,n=LP,r=PP;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,c=s.length,u=new Array(c);for(o=0;o<c;++o){for(var d,p=s[o],h=u[o]=new Array(l),f=0;f<l;++f)h[f]=d=[0,+r(i[f],p,f,i)],d.data=i[f];h.key=p}for(o=0,a=t(u);o<c;++o)u[a[o]].index=o;return n(u,a),u}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:zD(hP.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:zD(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?DP:"function"==typeof e?e:zD(hP.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?LP:e,i):n},i}().keys(h).value(((e,t)=>e[t]?o(e[t]):0)).order(xN[c]).offset(vN[l]);let g=m(f),y=[];for(let e=0;e<g.length;e++){let t=g[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[a]={value:n[0]},r[s]={value:n[1]},y.push(n[0],n[1]))}}let b=Object.keys(p).map((e=>{let t=n(p[e].key);return t?t.field(p[e].field):null})).filter((e=>!!e));const v=lN({title:b.map((e=>e.title())).join(", "),min:bN(y),max:yN(y),type:"measure",formatter:b[0]?b[0].formatter:void 0});e.fields.push(v)}function SN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=ED({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.items.map((e=>({value:o(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))})),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map((t=>({value:o(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&wN(n,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function EN(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:SN;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function CN(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const _N=Symbol("implicit");function MN(){var e=new LO,t=[],n=[],r=_N;function i(i){let o=e.get(i);if(void 0===o){if(r!==_N)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new LO;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return MN(t,n).unknown(r)},CN.apply(i,arguments),i}function kN(){var e,t,n=MN().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,p=d?a:o,h=d?o:a;e=(h-p)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),p+=(h-p-e*(n-l))*u,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var f=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map((function(t){return p+e*t}));return i(d?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return kN(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},CN.apply(d(),arguments)}function RN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function AN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function IN(){}var LN=.7,DN=1/LN,PN="\\s*([+-]?\\d+)\\s*",ON="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",TN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NN=/^#([0-9a-f]{3,8})$/,qN=new RegExp(`^rgb\\(${PN},${PN},${PN}\\)$`),FN=new RegExp(`^rgb\\(${TN},${TN},${TN}\\)$`),jN=new RegExp(`^rgba\\(${PN},${PN},${PN},${ON}\\)$`),zN=new RegExp(`^rgba\\(${TN},${TN},${TN},${ON}\\)$`),BN=new RegExp(`^hsl\\(${ON},${TN},${TN}\\)$`),WN=new RegExp(`^hsla\\(${ON},${TN},${TN},${ON}\\)$`),$N={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function HN(){return this.rgb().formatHex()}function GN(){return this.rgb().formatRgb()}function VN(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=NN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?UN(t):3===n?new XN(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?YN(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?YN(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qN.exec(e))?new XN(t[1],t[2],t[3],1):(t=FN.exec(e))?new XN(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=jN.exec(e))?YN(t[1],t[2],t[3],t[4]):(t=zN.exec(e))?YN(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=BN.exec(e))?nq(t[1],t[2]/100,t[3]/100,1):(t=WN.exec(e))?nq(t[1],t[2]/100,t[3]/100,t[4]):$N.hasOwnProperty(e)?UN($N[e]):"transparent"===e?new XN(NaN,NaN,NaN,0):null}function UN(e){return new XN(e>>16&255,e>>8&255,255&e,1)}function YN(e,t,n,r){return r<=0&&(e=t=n=NaN),new XN(e,t,n,r)}function KN(e,t,n,r){return 1===arguments.length?function(e){return e instanceof IN||(e=VN(e)),e?new XN((e=e.rgb()).r,e.g,e.b,e.opacity):new XN}(e):new XN(e,t,n,null==r?1:r)}function XN(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function JN(){return`#${tq(this.r)}${tq(this.g)}${tq(this.b)}`}function ZN(){const e=QN(this.opacity);return`${1===e?"rgb(":"rgba("}${eq(this.r)}, ${eq(this.g)}, ${eq(this.b)}${1===e?")":`, ${e})`}`}function QN(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eq(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tq(e){return((e=eq(e))<16?"0":"")+e.toString(16)}function nq(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new iq(e,t,n,r)}function rq(e){if(e instanceof iq)return new iq(e.h,e.s,e.l,e.opacity);if(e instanceof IN||(e=VN(e)),!e)return new iq;if(e instanceof iq)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new iq(a,s,l,e.opacity)}function iq(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function oq(e){return(e=(e||0)%360)<0?e+360:e}function aq(e){return Math.max(0,Math.min(1,e||0))}function sq(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}RN(IN,VN,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:HN,formatHex:HN,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return rq(this).formatHsl()},formatRgb:GN,toString:GN}),RN(XN,KN,AN(IN,{brighter(e){return e=null==e?DN:Math.pow(DN,e),new XN(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?LN:Math.pow(LN,e),new XN(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new XN(eq(this.r),eq(this.g),eq(this.b),QN(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JN,formatHex:JN,formatHex8:function(){return`#${tq(this.r)}${tq(this.g)}${tq(this.b)}${tq(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ZN,toString:ZN})),RN(iq,(function(e,t,n,r){return 1===arguments.length?rq(e):new iq(e,t,n,null==r?1:r)}),AN(IN,{brighter(e){return e=null==e?DN:Math.pow(DN,e),new iq(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?LN:Math.pow(LN,e),new iq(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new XN(sq(e>=240?e-240:e+120,i,r),sq(e,i,r),sq(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new iq(oq(this.h),aq(this.s),aq(this.l),QN(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=QN(this.opacity);return`${1===e?"hsl(":"hsla("}${oq(this.h)}, ${100*aq(this.s)}%, ${100*aq(this.l)}%${1===e?")":`, ${e})`}`}}));var lq=e=>()=>e;function cq(e){return 1==(e=+e)?uq:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):lq(isNaN(t)?n:t)}}function uq(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):lq(isNaN(e)?t:e)}var dq=function e(t){var n=cq(t);function r(e,t){var r=n((e=KN(e)).r,(t=KN(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=uq(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function pq(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function hq(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=xq(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function fq(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function mq(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function gq(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=xq(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var yq=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bq=new RegExp(yq.source,"g");function vq(e,t){var n,r,i,o=yq.lastIndex=bq.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=yq.exec(e))&&(r=bq.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:mq(n,r)})),o=bq.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function xq(e,t){var n,r=typeof t;return null==t||"boolean"===r?lq(t):("number"===r?mq:"string"===r?(n=VN(t))?(t=n,dq):vq:t instanceof VN?dq:t instanceof Date?fq:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?pq:Array.isArray(t)?hq:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?gq:mq)(e,t)}function wq(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Sq(e){return+e}var Eq=[0,1];function Cq(e){return e}function _q(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Mq(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=_q(i,r),o=n(a,o)):(r=_q(r,i),o=n(o,a)),function(e){return o(r(e))}}function kq(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=_q(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=IO(e,t,1,r)-1;return o[n](i[n](t))}}function Rq(){var e,t,n,r,i,o,a=Eq,s=Eq,l=xq,c=Cq;function u(){var e=Math.min(a.length,s.length);return c!==Cq&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?kq:Mq,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),mq)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,Sq),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=wq,u()},d.clamp=function(e){return arguments.length?(c=!!e||Cq,u()):c!==Cq},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Aq(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?FO(t,e,n):FO(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=BP(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(FP(t)/3)))-FP(Math.abs(e)))}(o,a))||(r.precision=i),YP(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,FP(t)-FP(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-FP(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return UP(r)}function Iq(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?qO(t,e,n):qO(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Aq(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=FO(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Lq(){var e=Rq()(Cq,Cq);return e.copy=function(){return t=e,Lq().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},CN.apply(e,arguments),Iq(e)}function Dq(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[IO(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return Dq().domain(t).range(n).unknown(e)},CN.apply(i,arguments)}function Pq(e){return void 0===e?e=>e:t=>e(t)}function Oq(e){return Math.max(0,Math.min(1,e))}function Tq(e){return"object"==typeof e}function Nq(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function qq(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...Nq(t,o,a)),o-=a-o,a=e[i],r.push(...Nq(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...Nq(t,o,a))):r.push(...Nq(t,o,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function Fq(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=MD(i)||MD(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const c=r>0?qq(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(Pq(o));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:u[t],value:e,isMinor:-1===l.indexOf(e)}}))}function jq(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=MD(i)||MD(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const c=n.ticks(s),u=r>0?qq(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(Pq(o));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===c.indexOf(e)}}))}function zq(e){let t,{settings:n,scale:r,distance:i,formatter:o=e=>e}=e;const a=n.minorTicks&&!MD(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!MD(e.value):!MD(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(Tq(e)?e.value:e)-(Tq(t)?t.value:t))).filter(((e,t,r)=>{const i=Tq(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=Tq(e),i=t?e.value:e,o=n(i);return{position:o,value:i,label:t&&void 0!==e.label?e.label:r(i),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?Oq(n(e.start)):o,end:t&&!isNaN(e.end)?Oq(n(e.end)):o}}))}({values:e,scale:r.copy(),formatter:o})}else if(MD(n.ticks.count)){t=(n.ticks.tight?jq:Fq)({distance:i,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:o}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,o)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:i}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:o})}return t}function Bq(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]})),r}const Wq={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},$q={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},Hq={count:NaN};function Gq(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function Vq(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Lq(),i={instance:null,invert:!1},o={data:t,resources:n},a=Bq(e,Wq,o);let s;function l(e){return MD(e)?NaN:r(e)}a.ticks=Bq(e.ticks,$q,o),a.minorTicks=Bq(e.minorTicks,Hq,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=vD(!0,{},a,e.settings),e.scale=l,s=zq(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=Vq(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return Gq(i,l),i.instance(e)},l.normInvert=function(e){return Gq(i,l),i.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]);return l.domain([c,u]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const Uq={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function Yq(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=Bq(e,Uq,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}}))}(t,n.trackBy)}}const c=kN();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=vD({datum:i[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const Kq={depth:0};function Xq(e,t,n){return e.ancestors().map((e=>t(vD({datum:e.data},n)))).reverse().slice(1).toString()}const Jq=e=>e.min(),Zq=e=>e.max();function Qq(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(Jq).filter(_D);i=e.length?Math.min(...e):i}if(!r){const e=t.map(Zq).filter(_D);o=e.length?Math.max(...e):o}}return[i,o]}const eF={domain:[],range:[],invert:!1,min:NaN,max:NaN};function tF(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Vq(e,t,n).clamp(!0).interpolate(dq),i=Bq(e,eF,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;vD(!0,s,r);const[l,c]=Qq(i,t?t.fields:[]),u=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],p=a?i.range:d;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),l,c)),s}const nF={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function rF(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const iF={domain:[],range:[]};const oF={domain:[],range:[],unknown:void 0},aF={domain:[],range:[],override:!1};const sF=NP();function lF(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const i=SN(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}sF("linear",Vq),sF("band",Yq),sF("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=Bq(t,Uq,i);o.ticks=Bq(t.ticks,Kq,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=Yq(o);const{values:s,labels:l,items:c,ticks:u}=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter((e=>{if(e.depth>0){const t=Xq(e,i,n),d=e.leaves()||[e],p=i(vD({datum:e.data},n)),h=o(vD({datum:e.data},n)),f=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:h,leftEdge:Xq(d[0],i,n),rightEdge:Xq(d[Math.max(d.length-1,0)],i,n),node:e};f?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(h)),(r<=0&&!f||e.depth===r)&&c.push(m),l[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),d=function(e){const t=String(e),n=c[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};vD(!0,d,a),d.bandwidth=function(e){const t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=c[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=c[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>u.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const p=a.pxScale;return d.pxScale=function(e){return a=p(e),d},d.domain(s),d})),sF("sequential-color",tF),sF("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Dq(),i=Bq(e,nF,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return MD(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=Qq(i,l),d=o?i.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[];let h=a?i.range:p,f=[];return f=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=Lq().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(h,c,u):[c+(u-c)/2],h.length>f.length+1?f=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(h,c,u):h.length<f.length+1&&(h=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=tF().domain([n,r]).range(t);return[n,...rF(e),r].map((e=>i(e)))}(f,h,c,u)),s.data=()=>t,s.range(i.invert?h.slice().reverse():h),s.domain(f),s})),sF("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=MN(),i={data:t,resources:n},o=Bq(e,iF,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=vD({datum:l[e]},i),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(u),r}(e,t,n),i=n.theme,o=Bq(e,oF,{data:t,resources:n});let a;if(o.explicit=Bq(e.explicit,aF,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var cF={};function uF(){uF.init.call(this)}cF.isObject=function(e){return"object"==typeof e&&null!==e},cF.isNumber=function(e){return"number"==typeof e},cF.isUndefined=function(e){return void 0===e},cF.isFunction=function(e){return"function"==typeof e};var dF=uF;uF.EventEmitter=uF,uF.prototype._events=void 0,uF.prototype._maxListeners=void 0,uF.defaultMaxListeners=10,uF.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},uF.prototype.setMaxListeners=function(e){if(!cF.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},uF.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],cF.isUndefined(n))return!1;if(cF.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(cF.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},uF.prototype.addListener=function(e,t){var n;if(!cF.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,cF.isFunction(t.listener)?t.listener:t),this._events[e]?cF.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,cF.isObject(this._events[e])&&!this._events[e].warned)&&((n=cF.isUndefined(this._maxListeners)?uF.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,cF.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),cF.isFunction(console.trace)&&console.trace()));return this},uF.prototype.on=uF.prototype.addListener,uF.prototype.once=function(e,t){if(!cF.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},uF.prototype.removeListener=function(e,t){var n,r,i,o;if(!cF.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||cF.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(cF.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},uF.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],cF.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},uF.prototype.listeners=function(e){return this._events&&this._events[e]?cF.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},uF.listenerCount=function(e,t){return e._events&&e._events[t]?cF.isFunction(e._events[t])?1:e._events[t].length:0};var pF={mixin:e=>(Object.keys(dF.prototype).forEach((t=>{e[t]=dF.prototype[t]})),dF.init(e),e)};function hF(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;({min:e=e,max:t=t}=o),void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return pF.mixin(i),i}function fF(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||hF();return o.update({min:n,max:r,viewSize:i}),o}function mF(e,t){return e<=t}function gF(e,t){return e<t}function yF(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function bF(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:i=!0}=n;e=r?mF:gF,t=i?mF:gF},i.add=e=>{let{min:t,max:n}=e;const i=yF(r,t),o=yF(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let{min:t,max:n}=e;const i=yF(r,t),o=yF(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let{min:t,max:n}=e;const i=yF(r,t,!0),o=yF(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function vF(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const xF={key:void 0,includeMin:!0,includeMax:!0};function wF(e){let{items:t,collection:n,vc:r}=e;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function SF(e){let{items:t,collection:n}=e;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function EF(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function CF(e){let{key:t,collection:n,obj:r,fn:i,value:o}=e;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function _F(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function MF(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?vD({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function kF(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function RF(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function AF(e,t,n){let{ranges:r,interceptors:i,rc:o,aliases:a,rangeConfig:s}=n;const l=MF(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}})),c}function IF(){let{vc:e=vF,rc:t=bF}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},i={},o={},a={sources:{},default:vD({},xF)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(i).forEach((t=>{e.values[t]=i[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},c={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:vD({},xF)},e.ranges.forEach((e=>{const t={};Object.keys(xF).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:xF[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{i[n]&&e.values[n].join(";")===i[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(i).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,r={},i={};for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},i={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(i).map((e=>({type:"value",id:e,brush:i[e]})))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const r=MF(s.addValues,t,o),a=wF({vc:e,collection:i,items:r});u.emit("add-values",r),a.length&&(n||(n=!0,u.emit("start")),u.emit("update",a,[]),c.updateValues())}};return u.setValues=t=>{const r=MF(s.setValues,t,o),a=function(e){let{items:t,vCollection:n,vc:r}=e;const i={},o=EF(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||CF({key:a,value:e,collection:n,obj:i,fn:r})},p=Object.keys(o);for(let e=0,t=p.length;e<t;e++)a=p[e],o[a].forEach(d);return l=_F(c,i),s=_F(i,c),[s,l]}({items:r,vCollection:i,vc:e});u.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=MF(s.removeValues,e,o),n=SF({collection:i,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=MF(s.addValues,t,o),l=MF(s.removeValues,r,o),d=wF({vc:e,collection:i,items:a}),p=SF({collection:i,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||p.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,p),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=MF(s.toggleValues,t,o),a=function(e){let{items:t,values:n,vc:r}=e;const i={},o={},a=[],s=[],l=EF(t);let c,u,d;const p=Object.keys(l);for(let e=0,t=p.length;e<t;e++){c=p[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):CF({key:c,value:u,collection:n,obj:i,fn:r})}const h=Object.keys(i);for(let e=0,t=h.length;e<t;e++)c=h[e],a.push({id:c,values:i[c]});const f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)c=f[e],s.push({id:c,values:o[c]});return[a,s]}({items:r,values:i,vc:e});u.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=o[e]||e;return!!i[n]&&i[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{AF(e,"add",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{AF(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{AF(e,"set",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{AF(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsValue(t)},u.containsRange=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,c,u,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)c=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],a[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in o&&(u=o[u]),d=c.value,r[u]?a[t].bool=Array.isArray(d)?r[u].containsRange({min:d[0],max:d[1]}):r[u].containsValue(d):i[u]&&i[u].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},u.intercept=(e,t)=>{const n=kF(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=kF(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=kF(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:RF(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>u.removeInterceptor(e.name,t)))}))},u.addKeyAlias=(e,t)=>{o[e]=t},u.removeKeyAlias=e=>{delete o[e]},pF.mixin(u),u}function LF(e){return e*e*e}function DF(e){return--e*e*e+1}function PF(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}NP();const OF=["stroke","fill","color","backgroundColor","thumbColor"];function TF(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=NF(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function NF(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?mq:"string"===r?(i=VN(t))&&OF.includes(n)?(t=i,dq):vq:t instanceof VN?dq:t instanceof Date?fq:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?pq:Array.isArray(t)?TF:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?qF:mq)(e,t)}function qF(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=NF(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function FF(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const jF={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},zF=/^\$/;function BF(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function WF(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function $F(e,t){return e.pxScale?e.pxScale(t):e}const HF={normalizeSettings:function(e,t,n){const r=vD({},e),i=vD({},t);return Object.keys(r).forEach((e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(BF(o)){let n=t[e];"string"==typeof n&&zF.test(n)&&(n=jF[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&zF.test(n)?i[e]=jF[n]:i[e]=n})),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,p=u&&o in s,h=d?s[c.ref]:p?s[o]:a;BF(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&h?(r[o]=c.scale(h.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&h?r[o]=h.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:WF};function GF(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...GF(t.children)),e):(e.push(t),e)),[])}function VF(e,t){let{context:n,data:r,style:i,filter:o,mode:a}=t;const s=e.chart.brush(n),l=r,c=i.active||{},u=i.inactive||{},d=[];Object.keys(c).forEach((e=>{d.push(e)})),Object.keys(u).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const p=[];let h=!1;const f=()=>{let t=GF(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=()=>{const e=f(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,i,a),o=p.indexOf(e[r]);let l=!1;t&&-1===o?(p.push(e[r]),l=!0):t||-1===o||(p.splice(o,1),l=!0),e[r].needToUpdate=l||h,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=vD({},e[i],e[i].__style),n=e[i].isActive;d.forEach((r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,p):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,p):u[r]:e[i].__style[r]})),r=!0}delete e[i].needToUpdate}return h=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=f(),i=r.length;for(let e=0;e<i;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in u&&(r[e][t]="function"==typeof u[t]?u[t].call(null,r[e]):u[t])})));h=!0,p.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=f(),i=r.length;for(let e=0;e<i;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);p.length=0,n||e.renderer.render(e.nodes)},b=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{p.length=0,h=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",b)}}}function UF(e){let{nodes:t,action:n,chart:r,trigger:i}=e;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:i}=e;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}i.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:o,action:n,chart:r,trigger:i})}function YF(e){let{collisions:t,t:n,config:r,action:i}=e,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map((e=>e.node));return UF({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function KF(e,t,n){const r=n.element().getBoundingClientRect();let i=CD(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&CD(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!CD(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function XF(e,t,n){return e?"function"==typeof e?e(t):e:n}const JF={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function ZF(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function QF(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function ej(e){return-e/180*Math.PI}function tj(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(ej(e))}function nj(e,t){return{x:e.x+t.x,y:e.y+t.y}}function rj(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ij(e,t){return{x:e.x*t,y:e.y*t}}function oj(e,t){return e.x-t.x}function aj(e,t){return e.y-t.y}function sj(e,t){return oj(e,t)**2+aj(e,t)**2}function lj(e,t){return Math.sqrt(sj(e,t))}function cj(e,t){return e.x*t.x+e.y*t.y}function uj(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=rj(e,n);return nj({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const dj={up:0,down:180,left:90,right:-90};function pj(e){let{x:t,y:n,size:r}=e;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const hj=NP();hj.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),hj.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:ZF([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),hj.add("saltire",(function(e){const t=ej(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=QF(e.x,e.y,o,i).map((e=>uj(e,t,s)));return{type:"path",fill:"black",d:ZF(l)}})),hj.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),hj.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=dj[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=ej(r);return s=s.map((e=>uj(e,l,n))),{type:"path",fill:"black",d:ZF(s)}})),hj.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:pj(e)}})),hj.add("star",(function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=ej(i),c=ej(i+s/2),u=Math.sin(l),d=Math.cos(l),p=Math.sin(c),h=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+h*o,y:e.y+p*o})}return{type:"path",fill:"black",d:ZF(n)}})),hj.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=ej(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:ZF(t)}})),hj.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:ZF(QF(t,n,e.size,o))}})),hj.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=ej(90);o=o.map((n=>uj(n,e,t)))}const a=ID(o);return a.type="rect",a.fill="black",a})),hj.add("rect",(function(e){const{x:t,y:n,size:r}=e,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}}));const fj=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hj;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==JF[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function mj(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:i=0,preferredSize:o=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:i}=e;return"function"==typeof o?o({inner:n,outer:r,children:i,dock:this.dock()},t):o},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(i=e,this):"function"==typeof i?i(t):i},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function gj(e,t,n){const{require:r=[]}=t,i=t.mediator||{},{settings:o,formatter:a,scale:s,data:l,renderer:c,chart:u,dockConfig:d,mediator:p,instance:h,rect:f,style:m,registries:g,resolver:y,update:b,_DO_NOT_USE_getInfo:v,symbol:x,isVisible:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:o}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),f&&Object.defineProperty(e,"rect",{get:f}),v&&(e._DO_NOT_USE_getInfo=v),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:h}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(i).forEach((t=>{e.mediator.on(t,i[t].bind(e))}))}function yj(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function bj(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function vj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:i,container:o,mediator:a,registries:s,theme:l,renderer:c}=t,u=pF.mixin({});let d,p,h,f,m,g=t.settings||{},y=vD(!0,{},n,g),b=[],v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:HF,n={};return{resolve:function(r){let{data:i,settings:o,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(o,a,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const u=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:c};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:c};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],u.push(o)}}return{settings:n.norm,items:u}}}}({chart:i}),x=!1;const w={nodes:[],chart:i,config:y.brush||{},renderer:null},S={tap:[],over:[]},E=[],C={},_=vD({},g);function M(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(C,...l):r&&(a=e[t])),o&&("function"==typeof g[t]?a=g[t].call(_,...l):r&&(a=g[t])),i||o||(a=n.call(C,...l)),a}}const k=M("preferredSize",(()=>0),!0),R=M("resize",(e=>{let{inner:t}=e;return t})),A=M("created"),I=M("beforeMount"),L=M("mounted"),D=M("beforeUnmount"),P=M("beforeUpdate"),O=M("updated"),T=M("beforeRender"),N=M("beforeDestroy"),q=M("destroyed"),F=e.render,j=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&E.push(VF(w,e))}))},z=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?S.over.push(e):S.tap.push(e)}))};Object.defineProperty(w,"data",{get:()=>b});const B=y.renderer||e.renderer,W=B?c||s.renderer(B)():c||s.renderer()();"function"==typeof W.settings&&W.settings(y.rendererSettings),w.renderer=W;const $={resources:i.logger?{logger:i.logger()}:{}};let H=mj(yj(y,k,i.logger()),$);const G=e=>{e.key=y.key,e.element=W.element()},V=()=>{};V.dockConfig=()=>H,V.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=vD(!0,{},n,e.settings),H=mj(yj(y,k,i.logger()),$),w.config=y.brush||{}),y.scale&&(d=i.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=SN(y.data,{dataset:i.dataset,collection:i.dataCollection},{logger:i.logger()},i.dataCollection);t?t.isFirst?(b=n,b.items&&(b.items=[...n.items])):b.items&&(b.items=[...b.items,...n.items||[]]):b=n}else b=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?p=i.formatter(y.formatter):d&&d.data().fields&&(p=d.data().fields[0].formatter()),m=l.style(y.style||{})},V.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=R({inner:e,outer:t});f=n?W.size(n):W.size(e),_.rect=vD(!0,{computedPhysical:f.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),f=vD(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},f)},V.getRect=()=>_.rect;const U=()=>{const e=W.renderArgs?W.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=b;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return b.items&&r&&(n=ED(ED({},b),{},{items:b.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function J(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?w.nodes=[...e||[]]:w.nodes&&(w.nodes=[...w.nodes,...e||[]]):w.nodes=e}V.beforeMount=I,V.beforeRender=()=>{T({size:f})},V.render=()=>{const e=F.call(C,...U());J(e),W.render(e),Y=e,K=_.rect.computed},V.hide=()=>{V.unmount(),W.size({x:0,y:0,width:0,height:0}),W.clear()},V.beforeUpdate=()=>{P({settings:y,data:b})},V.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return W.render(),void(Y=null);const r=F.call(C,...U());J(r),E.forEach((e=>e.cleanUp())),E.length=0,S.tap=[],S.over=[],t&&(j(),z()),E.forEach((e=>{e.isActive()&&e.update()})),Y&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:Y,currentRect:_.rect.computed,previousRect:K}),X=function(e,t,n,r){let i,{old:o,current:a}=e,{renderer:s}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],h=null;const f=n.trackBy||FF,m={start(){let e={};if(o.forEach(((t,n)=>{let r=f(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=f(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),i=r.map((e=>e.data.major.value)),o=n.filter((e=>i.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>o.includes(e.data.major.value))),s=r.filter((e=>o.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(qF(vD({},e[r],{points:n.old}),vD({},t,{points:n.current}))),l.push(vD({},e[r],{commonPoints:n.old}))}else d.ips.push(qF(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(qF(vD({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(qF(e[t],vD({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:LF,duration:200,tweens:u.ips,nodes:[...l]}),p.push({name:"updating",easing:PF,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:DF,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,{isInit:o,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===o?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===i)}p.length&&(h=s.getScene(a),p[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=p[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,n=[],o=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));if(n.push(...o),n.push(...e.nodes),s.render(n),t>=1){p.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");p.length?"updating"===p[0].name&&t&&p.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}i&&(i=window.requestAnimationFrame(m.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return h}};return m}({old:Y,current:r},{renderer:W},n,i.storage),X.start()):W.render(r),Y=r,K=_.rect.computed,W.setKey&&"string"==typeof g.key&&W.setKey(g.key)},V.updated=O,V.destroy=()=>{V.unmount(),N(h),W.destroy(),q(),h=null};const Z=e=>{w.nodes=e,E.forEach((e=>{e.isActive()&&e.update()})),W.render(e)};return gj(C,e,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>W,chart:()=>i,dockConfig:()=>H,mediator:()=>a,instance:()=>_,rect:()=>_.rect,style:()=>m,update:()=>Z,registries:()=>s,resolver:()=>v,symbol:()=>fj(s.symbol)}),gj(_,g,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>W,chart:()=>i,dockConfig:()=>H,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(C),isVisible:()=>x}),V.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const o=i.brush(e),a=W.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let i=0;i<a.length;i++){const s=a[i];s.data&&o.containsMappedData(s.data,n||e.data,t)&&(G(s),r.push(s),a.splice(i,1),i--)}}))}return r},V.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:W).findShapes(e);for(let e=0,t=n.length;e<t;e++)G(n[e]);return n},V.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=W.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)G(r[e]);return r},V.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];UF({nodes:e,action:t.action||"toggle",trigger:t,chart:i,data:w.data})},V.mount=()=>{h=W.element&&W.element()?h:W.appendTo(o),W.setKey&&"string"==typeof g.key&&W.setKey(g.key),y.brush&&(j(),z()),bj(_,u,g),bj(C,u,e),x=!0},V.mounted=()=>L(h),V.unmount=()=>{[_,C].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,u)})),S.tap=[],S.over=[],E.forEach((e=>{e.cleanUp()})),E.length=0,D(),x=!1},V.onBrushTap=e=>{S.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return YF({collisions:KF(t,n,r.renderer),t:n,config:r,action:XF(n.action,t,"toggle")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},V.onBrushOver=e=>{S.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return YF({collisions:KF(t,n,r.renderer),t:n,config:r,action:XF(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},V.def=C,V.ctx=_,V.renderer=()=>W,V.set({settings:g}),A(),V}function xj(e){const t=vD(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function wj(e,t,n){const r=nj(function(e,t){const n=cj(e,t)/cj(t,t)||1;return{x:t.x*n,y:t.y*n}}(rj(n,e),rj(t,e)),e);return r}function Sj(e,t,n){return lj(e,n)+lj(t,n)-lj(e,t)<1e-12}function Ej(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function Cj(e){return e.x1===e.x2&&e.y1===e.y2}function _j(e){return e.width<=0||e.height<=0}function Mj(e){return e.r<=0}function kj(e){return e.edges.length<=2}function Rj(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=Tj(e,LD(t.edges[r])),!0===n)return!0;return!1}function Aj(e,t){let n=!1;const{numPolygons:r,polygons:i}=t;for(let t=0;t<r;t++){if(n=Hj(e,i[t]),!0===n)return!0}return!1}function Ij(e,t){if(Mj(e))return!1;return sj({x:e.cx,y:e.cy},t)<=e.r**2}function Lj(e,t){if(_j(t)||Mj(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function Dj(e,t){if(Mj(e)||Cj(t))return!1;const[n,r]=RD(t);if(Ij(e,n)||Ij(e,r))return!0;const i={x:e.cx,y:e.cy},o=wj(n,r,i);return sj(o,i)<=e.r**2&&Sj(n,r,o)}function Pj(e,t){if(kj(t)||Mj(e))return!1;if(Oj(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(Dj(e,LD(t.edges[r])))return!0}return!1}function Oj(e,t){if(kj(e)||!jj(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function Tj(e,t){if(kj(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(Bj(t,LD(e.edges[n])))return!0}const[n,r]=RD(t);return Oj(e,n)||Oj(e,r)}function Nj(e,t){if(kj(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(zj(t,LD(e.edges[n])))return!0}const[n,r,i,o]=AD(t);return Oj(e,n)||Oj(e,r)||Oj(e,i)||Oj(e,o)}function qj(e,t){return!_j(e)&&!_j(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function Fj(e,t){if(_j(e)||_j(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>jj(e,t)))}function jj(e,t){return!_j(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function zj(e,t){if(Cj(t)||_j(e))return!1;const[n,r]=RD(t);if(jj(e,n)||jj(e,r))return!0;const i=AD(e);let o=i.length;for(let e=0;e<o;e++){if(Bj(LD([i[e],i[3!==e?e+1:0]]),t))return!0}return!1}function Bj(e,t){const[n,r]=RD(e),[i,o]=RD(t),a=oj(r,n),s=aj(r,n),l=oj(o,i),c=aj(o,i),u=oj(n,i),d=aj(n,i);let p=c*a-l*s;const h=l*d-c*u,f=a*d-s*u;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===c)return!1;if(0===p){if(0===h&&0===f){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=aj(i,n)/s,g=aj(o,n)/s}else m=(i.x-n.x)/a,g=(o.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=h/p;return p=f/p,y>=0&&y<=1&&p>=0&&p<=1}function Wj(e,t){if(Cj(e))return!1;const[n,r]=RD(e);return Sj(n,r,t)}function $j(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!qj(n,r)&&(Fj(n,r)?Rj(e,t):Rj(t,e))}function Hj(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!qj(n,r)&&(Fj(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:i}=e;for(let e=0;e<r;e++)if(n=$j(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=Uj(e,LD(t.edges[r])),!0===n)return!0;return!1}(e,t))}function Gj(e,t){if(Mj(e))return!1;if(Vj(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(Dj(e,LD(n.edges[t])))return!0}}return!1}function Vj(e,t){if(!jj(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function Uj(e,t){const[n,r]=RD(t);if(Vj(e,n)||Vj(e,r))return!0;const{numPolygons:i,polygons:o}=e;for(let e=0;e<i;e++){const n=o[e];for(let e=0,r=n.edges.length;e<r;e++){if(Bj(t,LD(n.edges[e])))return!0}}return!1}function Yj(e,t){const[n,r,i,o]=AD(t);if(Vj(e,n)||Vj(e,r)||Vj(e,i)||Vj(e,o))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(zj(t,LD(n.edges[e])))return!0}}return!1}const Kj=/^\$/,Xj="@extend";function Jj(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function Zj(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&Jj(e),Kj.test(r)?(n.push(e),Zj(r,t,n)):r}let r=e;const i=vD(!0,{},t,e),o={};if(e[Xj]){const o=e[Xj];-1!==n.indexOf(o)&&Jj(o);let a=n.slice();a.push(o),r=vD(!0,{},Zj(i[o],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===Xj||Kj.test(e))return;o[e]=r[e];let a=o[e];Kj.test(a)&&a in i?(-1!==n.indexOf(a)&&Jj(a),t.push(a),a=i[a],"object"==typeof a||Kj.test(a)&&a in i?o[e]=Zj(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=Zj(a,i,t))})),o}function Qj(e,t){return Zj(e,t,[])}function ez(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>Qj(e,n),setStyle:t=>{n=vD({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function tz(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function nz(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return vD(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function rz(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function iz(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function oz(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function az(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function sz(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function lz(e,t,n,r,i){const o=vD({},t),a=vD({},n);oz(o,r),az(a,r),sz(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(oz(t,r),az(n,r),!0)}function cz(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function uz(e){return ID([].concat(...e.map(AD)))}function dz(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:i,translation:o}=e;const a=rz(r.x,r.y,r.width,r.height),s=rz(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n})).forEach((e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=uz(n.map((e=>e.outerRect))),c=uz(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=cz(c),t.edgeBleed=e.edgeBleed,t.computed=cz(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0})),u}function pz(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function hz(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function fz(e){let t=nz(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:i}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),tz(r),tz(n),{logicalContainerRect:r,containerRect:n}}(e,t),[o,a]=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];hz(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];pz(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:i}=e;const o=rz(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];iz(n,o,t),lz(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every((e=>t.some((t=>t.key===e))));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),sz(t,o,a),o}({layoutRect:r,visible:o,hidden:a,settings:t}),l=dz({visible:o,layoutRect:r,reducedRect:s,containerRect:i,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=rz();e.comp.resize(t,t)})),{visible:o.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=nz(e)},n}const mz=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},gz=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(ED(ED({},n),{},{children:gz(e.children)}))}})),yz=(e,t)=>({visible:[],hidden:t,ordered:[]}),bz=e=>(t,n)=>{var r;const i=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(ED(ED({},t),{},{children:gz(e.children)}))}})),o=e=>n[e.index],{visible:a=i,hidden:s=[],ordered:l=a}=null!==(r=e(t,i))&&void 0!==r?r:{};return{visible:a.map(o),hidden:s.map(o),ordered:l.map(o)}},vz=e=>"function"==typeof e?bz(e):(e=>{const t=fz(e);return bz(((e,n)=>t.layout(e,n)))})(e);function xz(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=DD(e),a=vD(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function wz(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach((t=>{e.insertBefore(t,r)}))):(o&&o.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function Sz(e,t){let{element:n,data:r=[],settings:i={},on:o={}}=e;const a=t.registries,s=t.logger,l=ez(t.style,t.palettes),c=[],u=vD({},e),d=function(){const e={};return pF.mixin(e),e}();let p=[],h=null,f=null,m=null,g=[],y=()=>{},b=()=>{};const v={};let x=!1;const w=function(e){let{createComponent:t}=e;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>o(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find((e=>r.hasKey&&r.key===e.key));i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:s}=e;return s.map((e=>{const s=mz(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)})).filter((e=>!!e))},c=e=>{let{components:t,hidden:n,layoutFn:r,ordered:i,rect:o,visible:a}=e;const{visible:s,hidden:l,ordered:u}=r(o,t);a.push(...s),n.push(...l),i.push(...u),s.forEach((e=>{if(e.children){var t,r;const o=vz(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&c({components:e.children,hidden:n,layoutFn:yz,ordered:i,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],i=[]},n.findComponentByKey=e=>mz(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],o=[],a=[],s=vz(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let{components:t}=e;i=t.map((e=>o(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:o,scales:a}=e;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:vj(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:vD(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function S(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(u,...a):n.call(u,...a),i}}const E=()=>{let e;i.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=i.dockLayout):e=i.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return w.layout({layoutSettings:e,rect:t})},C=S("created"),_=S("beforeMount"),M=S("mounted"),k=S("beforeUpdate"),R=S("updated"),A=S("beforeRender"),I=S("beforeDestroy"),L=S("destroyed"),D=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:i={},scroll:o={}}=t;y=function(e,t){let{types:n,logger:r}=t;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach(((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}})),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(v).forEach((e=>v[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:SN;const i={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=vD(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:lF;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:y,collection:b},ED(ED({},c),{},{scale:a.scale})),f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:EN;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(r,{dataset:y,collection:b},ED(ED({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=fF(e[r],t?t[r]:null));return n}(o,m)};function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));g.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),g=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(u,d,n);return r.set(e),r}))}const O=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return p.forEach((e=>{const t=e.instance.getRect();jj(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)})),a},T=()=>{if(c.length||!n)return;Object.keys(o).forEach((e=>{const t=o[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=O(e)},r=t=>{const n=e.comps||O(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=CD(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=O(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),i.forEach((e=>{n.addEventListener(e.key,e.listener),c.push(e)}))},N=()=>{c.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),c.length=0},q=()=>{n.innerHTML="",(()=>{const{components:e=[]}=i;A(),D(r,i),w.set({components:e});const{visible:t,hidden:o,ordered:a}=E();p=t,o.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),wz(n,a)})(),T(),P(i.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(i=e.settings,P(e.settings.interactions)),k(),D(r,i);const{formatters:n,scales:o,components:a=[]}=i;w.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:o}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),E()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:o=[]}=e;let a;e.data&&(r=e.data),e.settings&&(i=e.settings,P(e.settings.interactions)),k(),D(r,i,{partialData:t});const{formatters:s,scales:l,components:c=[]}=i;w.update({components:c,data:r,excludeFromUpdate:o,formatters:s,scales:l}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const u=[],d=[];let h;if(t)w.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),h=u;else{const{visible:e,hidden:t,ordered:n}=E();p=e,h=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?u.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),h.forEach((e=>e.instance.beforeRender())),h.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||wz(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),p.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),R()},u.destroy=()=>{I(),w.destroy(),N(),P(),delete u.update,delete u.destroy,L()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return p.filter((e=>null==r||e.key===r)).forEach((r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]})),i},u.findShapes=e=>{let t=[];return p.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},u.componentsFromPoint=e=>O(e).map((e=>e.instance.ctx)),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=p;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));o=p.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=xz(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;p.filter((e=>r===e.key)).forEach((r=>{let i=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(i,t.components[n])}))}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=hF()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>b(e),u.scales=function(){return h.all()},u.formatters=function(){return f.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return v[e]||(v[e]=IF()),v[e]},u.scale=function(e){return h.get(e)},u.formatter=function(e){return f.get(e)},u.toggleBrushing=function(e){x=void 0!==e?e:!x},u.component=e=>{const t=w.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>s,u.theme=()=>l,u.storage=xj({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:g,on(){T(),g.forEach((e=>e.on()))},off(){N(),g.forEach((e=>e.off()))}})}),C(),n&&(_(),q(),M(n),u.element=n),u}const Ez=e=>{let t=NP(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var Cz=NP();function _z(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const Mz=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const kz=e=>{let{key:t,data:n,cache:r,config:i}=e;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,{source:n,data:r,cache:i,config:o}=e,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?c=u.map((()=>[])):(c={},u.forEach((e=>{c[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=Mz(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(lN(vD({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:r,source:t,config:i})};function Rz(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},i={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r,matrix:t}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:o,main:a}=hN(e,t),s=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],p=n.items(),h=[];for(let t=0;t<p.length;t++){const n=p[t];if(a.filter&&!a.filter(n))continue;const r=_z(a,n,{key:i});s.forEach((e=>{const a=o[e];let s=a.field?a.field.items()[t]:n;r[e]=_z(a,s,{key:i})})),l&&gN({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),h.push(r)}r=l?[...r,...mN(d,{main:a,propsArr:s,props:o})]:[...r,...h]}})),r}(e,i),hierarchy:()=>null};return kz({key:e,data:t,config:n,cache:r}),i}Rz.util={normalizeConfig:hN,collect:mN,track:gN};const Az=NP();Az.default("matrix"),Az("matrix",Rz),Az("default",Rz);const Iz=NP();function Lz(e,t,n){return Math.max(e,Math.min(t,n))}function Dz(e){let{item:t,value:n,boxCenter:r,rendWidth:i,rendHeight:o,flipXY:a,symbol:s}=e,l="x",c="y",u=i,d=o,p=n<.5?90:-90;return a&&(l="y",c="x",u=o,d=i,p=n<.5?180:0),s(vD({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function Pz(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:i,rendHeight:o,flipXY:a}=e,s="x",l="y",c="width",u="height",d=i,p=o;a&&(s="y",l="x",c="height",u="width",d=o,p=i);const{actualDiff:h,actualLow:f}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:i=1}=e;const o=Math.max(t,n),a=Math.min(t,n),s=Lz(-.1,1.2,o),l=Lz(-.1,1.2,a),c=s*i-l*i,u=Math.max(r,c),d=(u-c)/2;return{actualDiff:u,startModifier:d,actualLow:l*i-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return vD({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:f,[u]:h,[c]:n*d,data:t.data||{},collider:{type:null}})}function Oz(e){let{item:t,from:n,to:r,boxCenter:i,rendWidth:o,rendHeight:a,flipXY:s}=e,l="x1",c="y1",u="x2",d="y2",p=o,h=a;return s&&(l="y1",c="x1",u="y2",d="x2",p=a,h=o),vD({},t.line,{type:"line",[d]:Math.floor(n*h),[l]:i*p,[c]:Math.floor(r*h),[u]:i*p,data:t.data||{},collider:{type:null}})}function Tz(e){let{item:t,key:n,position:r,width:i,boxCenter:o,rendWidth:a,rendHeight:s,flipXY:l}=e,c="x1",u="y1",d="x2",p="y2",h=a,f=s;l&&(c="y1",u="x1",d="y2",p="x2",h=s,f=a);const m=i/2;return vD({type:"line"},t[n],{[u]:Math.floor(r*f),[c]:(o-m)*h,[p]:Math.floor(r*f),[d]:(o+m)*h,r:m*h,cx:o*h,cy:r*f,width:i*h,data:t.data||{},collider:{type:null}})}function Nz(e,t,n){const{width:r,maxWidthPx:i,minWidthPx:o}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(i)?n:i/n);return s=isNaN(o)?s:Math.max(o/n,s),s*a}Iz("native",(function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function c(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}}));const qz={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},Fz=Object.keys(qz),jz={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,i="horizontal"===this.settings.settings.orientation,{style:o,resolver:a,symbol:s}=this,l=Fz.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=qz[e]));const u=function(e){let{keys:t,data:n,defaultSettings:r,style:i,settings:o,width:a,height:s,resolver:l}=e;const c=vD(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:vD(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:vD(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const h=o.minor||{},f={};["start","end","min","max","med"].forEach((e=>{(h[e]||n.items&&n.items.length&&n.items[0][e])&&(f[e]={scale:h.scale,ref:e})}));let m,g={major:p,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:vD(!0,{},f,h)})};for(let e=0,r=t.length;e<r;e++)o[m]&&!1===o[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:o[m],scaled:u}));return g}({keys:l,data:t,defaultSettings:c,style:o,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:p}=u,h=function(e){let{width:t,height:n,flipXY:r,resolved:i,keys:o,symbol:a}=e;const s=[],l=i.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,p=i.major.settings,h=["start","end","min","max","med"].filter((e=>void 0!==i.minor.settings[e])),f=h.length,m=o.filter((e=>"oob"!==e));let g,y,b,v,x,w,S,E,C;const _=o?o.length:0,M=m?m.length:0,k={box:function(){b.box&&_D(b.start)&&_D(b.end)&&g.push(Pz({item:b,boxWidth:v,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){_D(b.min)&&_D(b.start)&&g.push(Oz({item:b,from:b.min,to:b.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),_D(b.max)&&_D(b.end)&&g.push(Oz({item:b,from:b.max,to:b.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){b.median&&_D(b.med)&&g.push(Tz({item:b,key:"median",position:b.med,width:v,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;_D(b.min)&&g.push(Tz({item:b,key:"whisker",position:b.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),_D(b.max)&&g.push(Tz({item:b,key:"whisker",position:b.max,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))}}};function R(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<f;r++)e=b[h[r]],_D(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,E=n>1&&n!==Number.MAX_VALUE,C=S||E}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let h=null,f=null;void 0!==p.binStart?(h=t.binStart,f=t.binEnd,y=p.binStart.scale):(y=p.major.scale,h=y?t.major:0);let A=0;y?y.bandwidth?(A=y.bandwidth(),h-=A/2):A=f-h:A=1,b=vD({},{major:h,majorEnd:f},i.minor.items[e]);for(let t=0;t<_;t++)b[o[t]]=i[o[t]].items[e];if(v=Nz(A,b,d),x=(A-v)/2,w=x+b.major+v/2,R(),C)b.oob&&(S?g.push(Dz({item:b,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):E&&g.push(Dz({item:b,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<M;e++)b[m[e]]&&!1===b[m[e]].show||k[m[e]]();const I={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(I)}return s}({items:p,settings:d,width:n,height:r,flipXY:i,resolved:u,keys:l,symbol:s});return h}};const zz={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},Bz=/px$/,Wz={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},$z={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function Hz(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function Gz(e,t,n,r){let{width:i,height:o}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=Bz.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);MD(a)&&(t=zz,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=Wz.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=ED(ED({},l),{},{type:s,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(c.width=t.width);const u=r(c);return u.data=e.data,u}))}const Vz={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:vD({},Wz,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:i}=this.rect,o=vD({},$z,this.settings.settings.sizeLimits),a=n.items,s=function(e,t,n,r,i){const o=Hz(e?e.scale:void 0,n),a=Hz(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,r,i,o);return Gz(a,this.rect,s,this.settings.shapeFn||this.symbol)}};Math.PI;const Uz={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function Yz(e,t,n,r){let{x:i,y:o,width:a,height:s}=t;const l=oP(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,p=d/100;return e.map(((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=p*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const h=l.centroid(e),f=i.offset?function(e,t,n,r){let[i,o]=e;const a=Math.sqrt(i*i+o*o);i/=a,o/=a;const s=n-r;return{x:i*t*s,y:o*t*s}}(h,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(f.x,", ").concat(f.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+f.x,y:c.y+f.y}}},i}))}function Kz(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const Xz={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],i=this.settings.settings,{items:o}=this.resolver.resolve({data:t,defaults:vD({},Uz,this.style.slice),settings:i.slice});let a=0;for(let e=0,t=o.length;e<t;e++){const t=Kz(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=pP,t=dP,n=null,r=zD(0),i=zD(JD),o=zD(0);function a(a){var s,l,c,u,d,p=a.length,h=0,f=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min(JD,Math.max(-JD,i.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/p,o.apply(this,arguments)),v=b*(y<0?-1:1);for(s=0;s<p;++s)(d=m[f[s]=s]=+e(a[s],s,a))>0&&(h+=d);for(null!=t?f.sort((function(e,n){return t(m[e],m[n])})):null!=n&&f.sort((function(e,t){return n(a[e],a[t])})),s=0,c=h?(y-p*v)/h:0;s<p;++s,g=u)l=f[s],u=g+((d=m[l])>0?d*c:0)+v,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:zD(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:zD(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:zD(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:zD(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return Yz(s(n),vD({},this.rect,{x:0,y:0}),r,a)}};const Jz=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class Zz{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[Zz.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=Zz.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&Jz(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function Qz(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Zz(...t)}function eB(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const tB={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=Qz(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,WF(this,"x",this.rect.width),WF(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=vD({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=vD({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=eB(this.x,this.rect.width),this.lines.y=eB(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>vD(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function nB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function rB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function iB(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function oB(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function aB(e){let{chart:t,blueprint:n,renderer:r,p:i,settings:o,items:a,slopeLine:s}=e,l=!0,c=!1,u=!1,d=!1,p=!1,h=vD(!0,{},o.style.line,i.line||{}),f=vD(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},o.style.label||{},{fill:h.stroke});if(c=s?n.processItem({type:"line",x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,stroke:h.stroke||"black",strokeWidth:h.strokeWidth||1,strokeDasharray:h.strokeDasharray,flipXY:!1,value:i.valueInfo?i.valueInfo.id:i.value}):n.processItem({type:"line",x1:i.position,y1:0,x2:i.position,y2:1,stroke:h.stroke||"black",strokeWidth:h.strokeWidth||1,strokeDasharray:h.strokeDasharray,flipXY:i.flipXY||!1,value:i.valueInfo?i.valueInfo.id:i.value}),i.label){const e=vD(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},o.style.label||{},{fill:h.stroke},i.label);let s,c={width:0,height:0},f="";s=iB(i,t),!1!==i.label.showValue&&(s?f=" (".concat(s(i.value),")"):i.scale&&(f=" (".concat(i.value,")"))),f&&(c=r.measureText({text:f,fontFamily:e.fontFamily,fontSize:e.fontSize}));let m=r.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:m.width+c.width,height:Math.max(m.height,c.height)},y=e.padding,b=oB(i.flipXY?e.vAlign:e.align),v=oB(i.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*n.width,e.maxWidthPx),w=g.height+2*y,S=i.flipXY?w:x,E=i.flipXY?x:w;if(u=n.processItem({fn:t=>{let{width:r,height:o}=t,a=i.position*r-(i.flipXY?w:x)*(1-b);a=i.flipXY?a:Math.max(a,0);return{type:"rect",x:a,y:Math.max(Math.abs(v*o-E*v),0),width:i.flipXY?S:Math.min(S,n.width-a),height:E,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:i.flipXY||!1}),u.x<-1||u.x+u.width>n.width+1||u.y<-1||u.y+u.height>n.height+1)u=void 0;else{d={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:u.x+y,y:u.y+u.height/2+g.height/3,maxWidth:u.width-2*y-c.width,anchor:"start"},f&&(p={type:"text",text:f||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:d.x+3+(u.width-(c.width+2*y)),y:d.y});for(let e=0,t=a.length;e<t;e++){let t=a[e];"rect"===t.type?qj(u,t)&&(l=!1):"line"===t.type&&i.flipXY===t.flipXY&&zj(u,t)&&(l=!1)}}}if(a.push(c),0!==(null==s?void 0:s.slope)&&(null!=s&&s.showLabel||null!=s&&s.showValue)){let e,o;const l=120;let u=s.showLabel?s.refLineLabel:"";if(s.showValue){const n=iB(i,t),r=n?n(s.value):s.value;e="(".concat(s.slope,"x + ").concat(r,")"),u+=s.refLineLabel?" ".concat(e):e}if(u.length>1){var m;const e=r.measureText({text:u,fontFamily:f.fontFamily,fontSize:f.fontSize});e.width=e.width>l?l:e.width;const i=s.slope>0&&!s.isRtl?4*f.padding:f.padding/2,d=s.slope>0?3*f.padding:f.padding,p=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.max()*t+n<=i.min())return!0;return!1}(t,s.slope,s.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r(t<0?(i.min()-n)/t:(i.max()-n)/t)}(t,s.slope,s.value):void 0,g=void 0===p?Math.abs(c.y2):1,y=function(e,t,n,r,i,o){return e.slope>0?n<.8?e.isRtl?n*i.width-(r.width+o.padding):n*i.width:n>.8?e.isRtl?n*i.width+(r.width+2*o.padding):n*i.width-(r.width+6*o.padding):1===n?e.isRtl?n*i.width+(r.width+3*o.padding):n*i.width-(r.width+6*o.padding):t.x2-(r.width+2*o.padding):e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(s,c,p,e,n,f),b=s.slope>0?g:c.y1;s.labelStroke&&(o={type:"rect",x:s.isRtl?Math.max(y,i)-2:Math.max(y,i)+2,y:Math.abs(Math.max(b,d)-e.height),rx:3,ry:3,width:e.width+f.padding,height:e.height-2,stroke:h.stroke,fill:h.stroke});const v={type:"text",text:u,fill:null!==(m=s.labelStroke)&&void 0!==m?m:h.stroke,opacity:f.opacity,fontFamily:f.fontFamily,fontSize:f.fontSize,x:o?o.x+2:Math.max(y,i)+2,y:o?o.y+e.height-f.padding:Math.abs(Math.max(b,d)-f.padding/2),anchor:"start",title:u,maxWidth:l,width:e.width};(function(e,t,n,r,i,o,a){for(let s=0,l=e.length;s<l;s++){const l=e[s];if("text"===(null==l?void 0:l.type))if(n>0&&void 0!==i){if(Math.abs(l.x-t.x)<l.width+o&&Math.abs(l.y-t.y)<r.height+a)return!0}else if(Math.abs(l.y-t.y)<r.height+a)return!0}return!1})(a,v,s.slope,e,p,i,d)||(o&&a.push(o),a.push(v))}}l&&u&&d&&(a.push(u,d),p&&a.push(p))}function sB(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function lB(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function cB(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}const uB={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=Qz(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(lB).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=cB(t,e.value);return vD(e,{scale:t,position:n})}return vD(e,{position:e.value})})),this.lines.y=this.lines.y.filter(lB).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=cB(t,e.value);return vD(e,{scale:t,position:n,flipXY:!0})}return vD(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(sB(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(sB(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max();i=ED({},r),i.x1=cB(e,o),i.x2=cB(e,a);const s=o*r.slope+r.value,l=a*r.slope+r.value;if(i.y1=cB(n,s),i.y2=cB(n,l),i.y1>1&&i.y2>1)return r.slope,void t["y".concat(i.y1>1?1:0)].push(sB(r));if(i.y1<0)return void t["y".concat(i.y1>1?1:0)].push(sB(r))}else i=void 0;aB({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:i}=e;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:r,height:i}=t,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:nB(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,p=u.cy||u.y,h={type:"text",text:s.length||"",x:d-.4*a.width,y:p+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},f={type:"path",d:rB(d,p,a.width,c),x:d,y:p,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,h,f)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function dB(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){vD(e,t.style)}(t,e),t}function pB(e){return"string"==typeof e||"number"==typeof e?e:"-"}function hB(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map((e=>uj(e,r,{x:t.x,y:t.y}))),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},p=r>=0?[u,d]:[d,u];c.push(...p),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function fB(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function mB(e,t){var n,r;const i={type:"text",text:pB(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+fB(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+fB(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),hB(e,i,t),i}function gB(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){vD(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function yB(e){return!e.isMinor&&e.position>=0&&e.position<=1}function bB(e){let{rect:t,state:n,majorTicks:r,measure:i,horizontal:o}=e;return o?function(e){let{majorTicks:t,measureText:n,rect:r,state:i}=e;const o="layered"===i.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(o*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const i=r.height,o=n("M").height;return!(t.length<2)&&i*Math.abs(t[0].position-t[1].position)<o}({majorTicks:r,measureText:i,rect:t,state:n})}function vB(e){let{value:t,maxValue:n,minValue:r,range:i,modifier:o}=e;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function xB(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,p="top"===e||"bottom"===e,h=p?n.inner.width:n.inner.height,f=o.ticks({settings:a,distance:h,formatter:r}).filter(yB),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=vB({value:t.width,maxValue:u,minValue:d}),t};if(t&&p&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:i,settings:o}=e;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,p=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(p=s*u*Math.abs(r.start-r.end),o+c>p)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(p=s*u*e,d=n("M").width*l*a,d+c>p)return!0}return!1}({majorTicks:f,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&bB({rect:n.inner,state:s,majorTicks:f,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>vB({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>vB({value:e.width,maxValue:u,minValue:d});if(p&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=f.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const b=y.map(m),v=b.map(g),x=Math.max(...v,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=f[r]?f[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:i,angle:o}=e;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:f,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const wB=(e,t,n)=>e.width*Math.abs(t.position-n.position);function SB(e){let{layered:t,major:n,innerRect:r,outerRect:i,tick:o,index:a}=e;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?wB(r,o,l)/2-2:1/0,d=c?wB(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:i}=e;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:i}=e;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function EB(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function CB(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=EB(e)+e.labels.margin,t}function _B(e,t){return e.map((e=>gB(e,t)))}function MB(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function kB(e){let{textMetrics:t,settings:n,innerRect:r,scale:i,tilted:o,layered:a,tick:s}=e;const l=t.height,c=MB(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-CB(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-CB(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=vB({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function RB(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:i,tilted:o,layered:a,tick:s,index:l,major:c}=e;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-CB(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-CB(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=SB({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=vB({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function AB(e){let t;function n(){return t=RB,n}function r(){return t=kB,r}function i(e){let{settings:n,scale:r,innerRect:i,outerRect:o,measureText:a,ticks:s,state:l,textBounds:c}=e;const u=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),p=function(e){return e.filter((e=>e.isMinor))}(s),h={innerRect:i,align:n.align,outerRect:o},f="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.line.show&&(h.style=n.line,h.padding=n.paddingStart,u.push(dB(h))),n.ticks.show&&(h.style=n.ticks,h.tickSize=n.ticks.tickSize,h.padding=EB(n),g=_B(d,h)),n.labels.show){const e=CB(n);h.style=n.labels,h.padding=e,h.tilted=f,h.layered=m,h.angle=n.labels.tiltAngle,h.paddingEnd=n.paddingEnd,h.textBounds=c;const l=(e,l)=>{h.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:h.style});const c=t({textMetrics:h.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:f,layered:m,tick:e,major:d,index:l});h.maxWidth=c.width,h.maxHeight=c.height,h.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:i}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*MB(n,i)}({innerRect:i,scale:r,ticks:s,settings:n,tick:e})};let p=[];p=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=mB(e,t);return i.data=e.data,i}))}(d,h,l):function(e,t,n,r){const i=t.padding,o=CB(n);return e.map(((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=mB(e,t);return l.data=e.data,l}))}(d,h,n,l),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>qj(PD(1,e[t].boundingRect),PD(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(p,g,h),u.push(...p)}return n.minorTicks&&n.minorTicks.show&&p.length>0&&(h.style=n.minorTicks,h.tickSize=n.minorTicks.tickSize,h.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(..._B(p,h))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const IB={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},LB={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const DB={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const i=vD(!0,{},t.isDiscrete?IB:LB,n),o=vD(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=o;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=AB(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=$F(r,i);const o=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const{size:c,edgeBleed:u,isToLarge:d}=xB({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s});if(l+=c,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=vD({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return vD(this.state.innerRect,r),vD(this.state.outerRect,i),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=$F(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),Jz.multiple(t),t}};const PB={render:()=>[]};function OB(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function TB(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const NB={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=OB(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:i,measureText:o,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:TB(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};vD(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(vD(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=OB(t,n,this.scale)}};function qB(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function FB(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const jB={require:["chart","renderer"],on:{panStart(e){const t=FB(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=qB(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=FB(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=FB(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=FB(e,this.renderer);qB(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function zB(e){let{h:t,isVertical:n,value:r,pos:i,align:o,borderHit:a,state:s,idx:l}=e;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",h="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(p="".concat(s.targetRect.x+s.targetRect.width,"px"),h="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,p="".concat(s.rect.width-d,"px"),h="".concat(s.rect.height-d,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:i,"px"),top:"".concat(n?i:d,"px"),height:n?"".concat(a,"px"):h,width:n?p:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:vD({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function BB(e){let{h:t,isVertical:n,label:r,otherValue:i,rangeIdx:o,idx:a,pos:s,align:l,state:c,value:u}=e;const d="end"!==l,p="outside"===c.settings.bubbles.placement;let h,f="none";n?(h=d?"left":"right",p&&(f=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(h=d?"top":"bottom",p&&(f=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const b=m?t("input",{type:"text",value:u,style:ED(ED({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[h]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:f}},[b])}function WB(e){let{h:t,isVertical:n,top:r,height:i,color:o,on:a,opacity:s}=e;return t("div",vD({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function $B(e){let{borderHit:t,els:n,isVertical:r,state:i,vStart:o,vEnd:a,idx:s}=e,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,p=Math.abs(u-d),h=Math.min(u,d)+l,f=h+p;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),p={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(p.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[WB(p)]))}const m=u<d?o:a,g=u<d?a:o,[y,b]=c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],v=m+1e-5>=y&&m-1e-5<=b,x=g-1e-5<=b&&g+1e-5>=y;v&&n.push(zB({h:i.h,isVertical:r,borderHit:t,value:m,pos:h,align:"start",state:i,idx:s})),x&&n.push(zB({h:i.h,isVertical:r,borderHit:t,value:g,pos:f,align:"end",state:i,idx:s}));const w=i.settings.bubbles;if(w&&w.show){const e={fontSize:w.fontSize,fontFamily:w.fontFamily,color:w.fill},t=[o,a];v&&n.push(BB({h:i.h,isVertical:r,align:w.align,style:e,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,t)),pos:h,state:i})),x&&n.push(BB({h:i.h,isVertical:r,align:w.align,style:e,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(i.format(g,t)),pos:f,state:i}))}}function HB(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function GB(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,i)=>{e.active&&i===e.active.idx||$B({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})})),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=HB(e);r=e.active.start+t,i=e.active.end+t}$B({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function VB(e){return{min:e.scale.min(),max:e.scale.max()}}function UB(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function YB(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function KB(e){e.renderer.render(GB(e))}function XB(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}function JB(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function ZB(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function QB(e){const t=e.reduce(((e,t)=>(e.push(...AD(t.bounds)),e)),[]);return ID(t)}const eW={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=XB(this.state,this.state.brushInstance),this.state.active=null,KB(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=$F(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=QB(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=$F(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=QB(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map((e=>({min:e.min,max:e.max})));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=ED({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)}))}(this.state,e,t,n),this.emit("bubbleEnd"),KB(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,KB(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=Vq(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>ZB(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(JB(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=IF(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach((e=>{if(!ZB(r,[e.min,e.max]))return;const o=n.indexOf(JB(e.min,t)),a=n.indexOf(JB(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))})),i}(e,i);return this.state.ranges=XB(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[GB(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=vD({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(h/t.size),c.start=t.scale.normInvert(p/t.size);let f=t.ranges;const m=VB(t);let g,y,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),m.min=b>0?f[b-1].max:m.min,m.max=b+1<f.length?f[b+1].min:m.max;else{for(g=0;g<f.length;g++){if(f[g].min<=c.start&&c.start<=f[g].max){b=g,m.min=g?f[g-1].max:m.min,m.max=g+1<f.length?f[g+1].min:m.max;break}if(c.start<f[g].min){m.max=f[g].min,m.min=g?f[g-1].max:m.min;break}}-1===b&&f.length&&g>=f.length&&(m.min=f[f.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==b)if(y={idx:b,start:f[b].min,end:f[b].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(p-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(p-n)<=o&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!jj(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:XB,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=VB(e);YB(e,e.current,n)}(this.state,XB),KB(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=HB(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=XB(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter((e=>-1===i.indexOf(e))),s=i.filter((e=>-1===o.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),c=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),KB(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;KB(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function tW(e){e.renderer.render(GB(e))}function nW(e){return e.rc.ranges()}function rW(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const iW={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=o[0]?o.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=bF(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let f=h,m=p;c.start=p,c.current=h;let g=t.ranges;const y=UB(t);let b,v,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(b=0;b<g.length;b++){if(g[b].min<=m&&m<=g[b].max){x=b,y.min=b?g[b-1].max:y.min,y.max=b+1<g.length?g[b+1].min:y.max;break}if(m<g[b].min){y.max=g[b].min,y.min=b?g[b-1].max:y.min;break}}-1===x&&g.length&&b>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(v={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=v.start,t=v.end;Math.abs(p-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(p-t)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:m,end:f,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!jj(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:nW,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=UB(e);YB(e,e.current,n)}(this.state,nW),tW(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=HB(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...rW(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),tW(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function oW(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}(e).map((i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function aW(e,t,n,r){function i(){!function(e){e.renderer.render(oW(e))}(e)}function o(){!function(e){e.renderer.render(oW(e))}(e)}function a(){!function(e){e.renderer.render(oW(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function sW(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const lW={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=$F(this.chart.scale(e.scale),r);return sW(this.state),aW(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,oW(this.state)},beforeDestroy(){sW(this.state)}};function cW(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function uW(e,t,n){return sj(e,t.points[0])<n.settings.snapIndicator.threshold**2}function dW(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function pW(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function hW(e,t){e.snapIndicator.visible=t}const fW={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})))}(this.settings);const n=cW(this.state.rendererBounds,e);dW(this.state,n),pW({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=cW(this.state.rendererBounds,e);uW(t,this.state,this.settings)?hW(this.state,!0):hW(this.state,!1),dW(this.state,t),pW({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;hW(this.state,!1);uW(cW(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map((e=>({x:e.x+n,y:e.y+r}))),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function mW(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function gW(e){let{orientation:t,targetNodes:n,labels:r,container:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mW;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:p}=r[t];if(d[s]<i[s]||d[s]+d[l]>i[s]+i[l])return!1;for(let e=o(d,a,s,l,c);e<a.length;e++)if(qj(d,a[e].textBounds))return!1;const h=o(d,n,s,l,u),f=d[s]+d[l];for(let e=h;e<n.length;e++){const t=n[e].node;if(f<t.localBounds[s])break;if(qj(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const yW=4;function bW(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function vW(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function xW(e){return ED(ED({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function wW(e,t,n){return n?e.width>=t.height:e.width>=t.width}function SW(e,t,n){return n?e.height>=t.width:e.height>=t.height}function EW(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||wW(t,n,!0),a=SW(t,n,!r)):(o=wW(t,n),a=i||SW(t,n,!1)),o&&a}function CW(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function _W(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return wW(e,t,n.rotate)&&SW(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=CW(e.x,e.width,i.height,n.align)+o,r.y=CW(e.y,e.height,i.width,n.justify),r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=CW(e.x,e.width,i.width,n.align),r.y=CW(e.y,e.height,i.height,n.justify)+o),r}function MW(e){let{bar:t,view:n,direction:r,position:i,padding:o=yW}=e;const a={};if(vD(a,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(a.y=0,a.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(a.y=o,a.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(a.x=0,a.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(a.x=o,a.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(a,n),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{top:n=yW,bottom:r=yW,left:i=yW,right:o=yW}=t;e.x+=i,e.width-=i+o,e.y+=n,e.height-=n+r}(a,o),a}function kW(e){let t,n,r,i,o,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:p}=e,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:MW;const f=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=h({bar:c.localBounds,view:p,direction:a,position:r.position,padding:r.padding}),f.push(i),t=!o||i[m]>t[m]?i:t,EW(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=f.indexOf(n)),r=d[o],{bounds:n,placement:r}}function RW(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=yW,bottom:a=yW,left:s=yW,right:l=yW}=i,c=e.x+e.dx,u=e.y+e.dy,d=n?Math.min(t.width,r.height):Math.min(t.height,r.width),p=n?Math.min(t.height,r.height):Math.min(t.width,r.width),h=.5*t.height,f=1e-9;return{x:(n?c-h:c)-s-f,y:(n?u:u-h)-o-f,width:p+(s+l)-f,height:d+(o+a)-f}}function AW(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:i,collectiveOrientation:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kW,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_W,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:gW;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,p,h,f,m,g,y,b,v,x,w,S,E,C;for(let e=0,l=n.length;e<l;e++){g=null,p=n[e],h=p.node,E=bW(h,t),v=p.direction,C="left"===v||"right"===v?"h":"v";for(let t=0;t<p.texts.length;t++){if(f=p.texts[t],!vW(f))continue;x=p.labelSettings[t],b=p.measurements[t],S=x.placements;const n=a({direction:v,fitsHorizontally:i,lblStngs:x,measured:b,node:h,orientation:C,placements:S,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){m=w.justify;const t="function"==typeof x.linkData?x.linkData(E,e):void 0,n="function"==typeof w.overflow?w.overflow(E,e):w.overflow;"up"===v&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===o||i);if(d=s(g,f,{justify:"h"===C?w.align:m,align:"h"===C?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n}),d){const n=RW(d,b,r,g,w.padding);y="function"==typeof w.fill?w.fill(ED(ED({},E),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(ED(ED({},E),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=RW(d,b,r,g,w.background.padding))),c.push(d),u.labels.push({node:h,textBounds:n})}}}}const _=c.filter(l(u));return[..._.filter((e=>void 0!==e.backgroundBounds)).map(xW),..._]}function IW(e){const t=2*Math.PI;return(e%t+t)%t}function LW(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function DW(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function PW(e,t,n){let{x:r,y:i}=t;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function OW(e){let t,n,{radius:r,size:i,angle:o}=e,{width:a,height:s}=i,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=PW(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=PW(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=PW(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=PW(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function TW(e){let{slice:t,measured:n,padding:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=IW((i+o)/2);let d=s-r,p={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(p.angle=u-Math.PI/2,p.anchor="end"):(p.angle=u+Math.PI/2,p.anchor="start"),p}function NW(e){let{context:t,node:n,bounds:r}=e;let{start:i,end:o}=n.desc.slice;const a=IW((i+o)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function qW(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function FW(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function jW(e){let t,n,{slice:r,direction:i,position:o,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:p,innerRadius:h,offset:f}=r;switch(o){case"into":t="rotate"===i?TW({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t;const l=IW((i+o)/2);let c=OW({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",zj(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||zj(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||Lj({cx:0,cy:0,r:a},c)?null:(LW(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:h},t="rotate"===i?TW({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:i}=e;const{start:o,end:a,outerRadius:s}=t,l=IW((o+a)/2);let c=OW({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",LW(c,n),i.insideLabelBounds.some((e=>qj(e,c)))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let{slice:t,measured:n,padding:r,view:i}=e,{start:o,end:a,outerRadius:s,offset:l}=t,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=IW((o+a)/2);let p=Math.sin(d)*c,h=-Math.cos(d)*c,f=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=h<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<f&&(f=t)}if(Math.sin(m)>.001){let e=p<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<f&&(f=t)}if(f<=0||f<n.minReqWidth)return null;let g={x:p,y:h,width:f,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:i,context:o}=e,{start:a,end:s,outerRadius:l,offset:c}=t;const u=IW((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,p=Math.sin(u)*d,h=-Math.cos(u)*d,f=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(p+c.x));e<f&&(f=e)}else{let e=Math.abs(i.x-(p+c.x));e<f&&(f=e)}if(f<n.minReqWidth)return null;let m={x:p,y:h,width:f,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=f.x,t.y+=f.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const{start:r,end:i,offset:o,outerRadius:a}=n,s=IW((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function zW(e){let{context:t,direction:n,measured:r,node:i,placementSettings:o,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jW;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function BW(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const WW=/\n+|\r+|\r\n/,$W=/\s/,HW=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function GW(e){return"string"==typeof e?-1!==e.search(WW):-1!==String(e).search(WW)}function VW(e){return-1!==e.search($W)}function UW(e){return-1!==e.search(HW)}function YW(e,t,n){return Math.max(t,Math.min(n,e))}function KW(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:i=[GW],noBreakAllowedIdentifiers:o=[],suppressIdentifier:a=[VW,GW,e=>""===e],hyphenationIdentifiers:s=[UW]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let d=n?c:-1;function p(e){const t=YW(e,0,c-1),n=l[t],u=r(n),d=function(e,t,n,r,i){return r.some((r=>r(e,t,n)))?1:i.some((r=>r(e,t,n)))?0:2}(n,t,l,i,o);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=YW(e,0,c-1),u(d)?p(d):{done:!0}},peek:p,length:c}}const XW="…",JW=/^\s*\d+(\.\d+)?px\s*$/i;function ZW(e){return"string"===typeof e&&JW.test(e)}function QW(e){const t=e["font-size"]||e.fontSize;return ZW(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function e$(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=QW(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function t$(e,t){return{lines:[],line:"",width:0,maxLines:e$(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function n$(e){e.lines.push(e.line),e.line="",e.width=0}function r$(e,t){e.line+=t.value,e.width+=t.width}function i$(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function o$(e,t,n){const r=KW({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?i$(e,t,r):t,n$(e),r$(e,t)):r$(e,t)}}function a$(e,t){const n=KW({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=t$(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){n$(r),i=!1;break}1===e.breakOpportunity?n$(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?i$(r,e,n):e,n$(r),r$(r,e)):r$(r,e)}return{lines:r.lines,reduced:i}}function s$(e,t){const n=KW({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=t$(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){n$(r),i=!1;break}1===e.breakOpportunity?n$(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?n$(r):e.width>r.maxWidth?o$(r,e,t):(n$(r),r$(r,e)):r$(r,e)}return{lines:r.lines,reduced:i}}function l$(e){return{"break-all":a$,"break-word":s$}[e.wordBreak]}function c$(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=l$(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||GW(n.text)){const o=(QW(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach(((a,s)=>{const l=vD({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=XW:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)})),i}(a,n,o,i.height)}}}}function u$(e,t){let{text:n,"font-size":r,"font-family":i,maxWidth:o}=e;if(n="string"==typeof n?n:"".concat(n),void 0===o)return n;let a=t({text:n,fontSize:r,fontFamily:i}).width;if(a<=o)return n;let s=0,l=n.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:n.substr(0,e)+XW,fontSize:r,fontFamily:i}).width,a<=o?s=e+1:l=e-1}return n.substr(0,l)+XW}function d$(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const p$={},h$={},f$={fontSize:void 0,fontFamily:void 0};let m$;function g$(e,t,n){const r=e+t+n;return"number"!=typeof h$[r]&&(m$=m$||document.createElement("canvas").getContext("2d"),function(e,t){f$.fontSize===e&&f$.fontFamily===t||(m$.font=e+" "+t,f$.fontSize=e,f$.fontFamily=t)}(t,n),h$[r]=m$.measureText(e).width),h$[r]}function y$(e){return"number"!=typeof p$[e]&&(p$[e]=function(e){if(ZW(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),p$[e]}function b$(e){let{text:t,fontSize:n,fontFamily:r}=e;return{width:g$(t,n,r),height:y$(n)}}function v$(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b$;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+d$(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function x$(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b$;const n=l$(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||GW(e.text))){const o=n(e,(e=>t({text:e,fontFamily:i,fontSize:r}))),a=vD({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?XW:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=v$(a,t);return c.height=QW(e)*o.lines.length,c}return v$(e,t)}function w$(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function S$(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function E$(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function C$(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:i,offset:o}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return E$({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?E$(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var _$={bar:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:AW;const l=vD({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>vD({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>vD({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:p,targetNodes:h}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:i,placementSettings:o,settings:a,renderer:s}=e;const l={},c=[];let u,d,p,h,f,m,g,y=!0,b=!1;for(let e=0;e<t.length;e++){if(d=t[e],h=d.localBounds,!qj(h,n))continue;let v=bW(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],p="function"==typeof m.label?m.label(v,e):void 0,vW(p)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=p,f=s.measureText(l),u.measurements.push(f),u.texts.push(p),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&f.width<=h.width-2*yW);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:b}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:u}),f=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),m="h"===f?"y":"x",g="h"===f?"height":"width";return h.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:h,stngs:t,rect:i,fitsHorizontally:d,collectiveOrientation:f})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zW,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:FW;const c=vD({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>vD({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>vD({},c,t,e,n))))),p=[],h={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const{start:a,end:s}=e[o].desc.slice,l=IW((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>IW((e.desc.slice.start+e.desc.slice.end)/2)-IW((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const f={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=qW(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=BW(c,r,o),b=s({context:f,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:h}),v=b.bounds,x=b.placement;if(v&&x){if("outside"===x.position&&"rotate"!==m){NW({context:f,node:t,bounds:v});if(!Ej(DW(v),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(v,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),p.push(o),v.line&&(v.line.stroke=n,p.push(v.line)))}}}return p},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:i,style:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S$;const s=vD({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=vD({},s,t),c=t.labels.map((e=>vD({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=w$(t,n),{type:s,bounds:p}=C$(t);if(!p)continue;let h,f=0,m=[],g=[],y="circle"===s?2*p.r*.9:p.height;for(f+=l.padding,h=0;h<c.length;h++){let t=c[h],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=i.measureText(u);if(f+=r.height+t.padding,f>y)break;g.push(n),m.push(r)}const b=h,v=Math.max(0,y-f);let x;for(x="circle"===s?p.cy-.9*p.r:p.y,x+=l.justify*v+l.padding,h=0;h<b;h++){let t,n=c[h];if("circle"===s){let e=Math.max(Math.abs(x-p.cy),Math.abs(x+m[h].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[h].height}}else t={x:p.x+l.padding,y:x,width:p.width-2*l.padding,height:m[h].height};x+=m[h].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const u="function"==typeof n.linkData?n.linkData(o,e):void 0;let f=a(t,g[h],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[h]});if(f){if(f.text&&f.text!==XW){const e=u$(f,i.measureText);if(XW===e)continue;f.ellipsed=e}void 0!==u&&(f.data=u),d.push(f)}}}return d}};const M$={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&_$[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:i,renderer:o,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},_$[e.strategy.type]))})),t}};const k$={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,justify:.5,align:.5,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25},navigation:{button:{class:void 0,content:void 0,tabIndex:void 0},disabled:!1}};function R$(e){let{x:t=0,y:n,item:r,globalMetrics:i,createSymbol:o,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,c=r.symbol.meta;const u="rtl"===a;let d={x:u?t+i.maxLabelBounds.width:t+i.maxSymbolSize+i.spacing,y:n,width:i.maxLabelBounds.width,height:Math.max(i.maxSymbolSize,i.maxLabelBounds.height)},p=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:u?t+i.maxLabelBounds.width+i.spacing:t,y:n,width:i.maxSymbolSize,height:d.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const h=o(vD({},c,p));return delete h.collider,s.anchor=u?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[h,s],collider:{type:"rect",x:t,y:n,width:i.maxItemBounds.width,height:i.maxItemBounds.height}},metrics:d}}function A$(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function I$(e,t){let n,r,i,o,{onScroll:a=()=>{}}=t,s=null,l=0;const c={itemize:t=>{n=function(e,t){let n,r,{resolved:i,dock:o}=e,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,d=0,p=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=vD({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),p=Math.max(r.label.bounds.height,p)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,p),width:u+8+d},maxLabelBounds:{width:d,height:p}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,l=c.getContentOverflow(i);const a=c.extent();s=Math.max(0,Math.min(s,l)),o=vD({},i);const u="horizontal"===c.orientation()?"x":"y";return o[u]-=s,o["x"===u?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:i,create:o=R$,parallels:a,createSymbol:s}=n;const l=i.layout.direction,c=i.globalMetrics,u=i.items,d="horizontal"===i.layout.orientation;let p=0;const h=[],f=c.maxItemBounds.height,m=c.maxItemBounds.width,g=i.layout.margin.vertical+f,y=i.layout.margin.horizontal+m;let b=t.x,v=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:v,x:"rtl"===l?r.x+x+r.width-m-(b-t.x):b,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&b>=r.x-m||!d&&v>=r.y-f)&&h.push(n.item),p++,p>=a?(p=0,d?(b+=y,v=t.y):(v+=g,b=t.x)):d?v+=g:b+=y,!d&&v>r.y+r.height)break;if(d&&b>r.x+r.width)break}return h}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return A$(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,A$(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===c.orientation()?o.x<i.x:o.y<i.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>A$(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return c}function L$(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const D$={up:"▲",right:"▶",down:"▼",left:"◀"};function P$(e,t){let{size:n,isActive:r,direction:i,nav:o,attrs:a}=t,s={},l="";const c=a;o&&o.button&&("function"==typeof o.button.class?s=o.button.class({direction:i}):o.button.class&&(s=o.button.class),"function"==typeof o.button.content&&(l=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(c.tabindex=o.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(u.border="0",u.background="none"),(!r||o&&o.disabled)&&(c.disabled="disabled"),e("button",vD({class:L$(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[D$[i]])])}function O$(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:i,itemRenderer:o}=t;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[P$(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),P$(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(p)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function T$(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=vD({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(vD({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function N$(e,t,n,r){let i,o,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){i={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-i.width-(i.width?t.spacing:0),n=p.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,h=s.spread(),f=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:p.y+Math.max(0,(f-h)/2),width:p.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},i.y=o.y;"rtl"===s.direction()&&(a.x=p.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),d=Math.max(i.height,f,s.spread())}else{const e=p.height-i.height-(i.height?t.spacing:0),n=p.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},o={x:p.x,y:i.y+i.height+(i.height?t.spacing:0),width:p.width,height:p.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=vD({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:vD({},e,i),content:vD({},e,o),navigation:vD({},e,a),orientation:n,preferredSize:d}}function q$(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const i=e.scale.datum?vD({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i}))}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:vD(!0,{},k$.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:k$.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:vD(!0,{},k$.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=vD(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:vD(!0,{},k$.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:vD(!0,{},{show:k$.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function F$(e){const{rect:t,settings:n,state:r,itemRenderer:i,navigationRenderer:o,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=N$(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:vD({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},u}const j$={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=F$(this);this.update(e)},this.itemRenderer=I$(this,{onScroll:this.onScroll}),this.navigationRenderer=O$(this),this.titleRenderer=T$(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),q$(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=N$(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){q$(this)},render(){return F$(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function z$(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function B$(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function W$(e){return B$(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function $$(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function H$(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map(((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return o}(e,i),a=function(e){return B$(e.layout.dock,e.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"})}(e.settings);if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const s=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),l=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),c={isVertical:t,nodes:[],title:{anchor:W$(e.settings),textMetrics:s,textBounds:l,requiredWidth:()=>{if(!n.show)return 0;let e=l.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,c.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=l.height;return t&&(e+=n.padding),Math.min(e,c.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...c.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...o.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(c.rect[n],c.rect[n]*e.stgns.length)-c.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return c}const G$={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=$$(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=H$(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=H$(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=$$(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return z$(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return z$(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}}));return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const V$={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},connect:!1,orientation:"horizontal",layers:{curve:"linear",show:!0,sort:void 0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function U$(e,t){let{generatorType:n,item:r,data:i,major:o,minor:a,layerObj:s,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function Y$(e){const{metaLayers:t,coordinates:n,layers:r,lines:i,areas:o}=function(e){let{data:t,stngs:n,rect:r,resolver:i,style:o,domain:a}=e;const{width:s,height:l}=r,c=i.resolve({data:t,defaults:V$.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let p=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:p++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const h=Object.keys(d).map((e=>(d[e].consumableData=ED({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),f={items:h.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:c,metaLayers:h,layers:i.resolve({data:f,defaults:{curve:V$.layers.curve,show:V$.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:f,defaults:vD({},V$.layers.line,o.line),settings:m.line}),areas:i.resolve({data:f,defaults:vD({},V$.layers.area,o.area),settings:m.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,p;for(let r=0;r<t.items.length;r++){if(d=t.items[r],p=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(p.minor0?p.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const h=c.sort(((e,t)=>e-t))[Math.floor((c.length-1)/2)];a.push({layerObj:l,lineObj:i.items[s],areaObj:o.items[s],median:h,points:u,consumableData:t.consumableData})})),a}const K$={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const i=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=Y$({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:i,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=o.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));o.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else o.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:i,stngs:o}=t;const a=[],s=o.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===o.orientation){const e=vD(!0,{},p);p=vD(!0,{},d),d=vD(!0,{},e)}s.area&&!1!==c.show&&a.push(U$(u,{data:e.consumableData,item:c,generatorType:"area",major:p,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(U$(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(U$(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:l,stngs:o},"none")))})),a}(o,{width:n,height:r,missingMinor0:i,stngs:this.stngs})}};function X$(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function J$(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function Z$(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const Q$={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=X$(this,e,!1);jj({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})))}(this.settings),this.state.start=X$(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=X$(this,e),function(e){if(e.state.active){const t=J$(e,e.state.start),n=J$(e,e.state.end),r=e.chart.shapesAt(Z$(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([vD({type:"rect"},Z$(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function eH(e,t,n){let{renderer:r,style:i,props:o,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:L$(vD({"pic-tooltip":!0},s.tooltip)),style:vD({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:L$(vD({"pic-tooltip-content":!0},s.content))},l),a("div",{class:L$(vD({"pic-tooltip-arrow":!0},s.arrow)),style:vD({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function tH(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),o=!0,r=null,a.set("active")}),c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function nH(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function rH(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function iH(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function oH(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function aH(e){let{area:t,vx:n,vy:r,width:i,height:o,offset:a}=e;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,p=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,p+=l+u>t.height?-(l+u-t.height):0,{x:d,y:p}}function sH(e){let{options:t,pointer:n,width:r,height:i,dockOrder:o,x:a,y:s}=e;const{targetBounds:l}=n,c=nH(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:iH(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},p=rH(r,i,t.offset),h=[],f="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=aH({area:d,vx:f,vy:m,width:r,height:i,offset:p[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=iH(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,h.push(y)}return h.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),h[0]}function lH(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return vD({scaleRatio:i.scaleRatio},i.computedInner)}const cH={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:i,height:o,options:a}=e;const{targetBounds:s}=r,{x:l,y:c,width:u,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:l,y:c+d/2},right:{x:l+u,y:c+d/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+d},inside:{x:l+u/2,y:c+d/2}},h=nH(a.offset),f=h[a.dock];if(f)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:f},computedArrowStyle:iH(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=rH(i,o,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(oH(m,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,i,o,g[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:h[t]},computedArrowStyle:iH(a.offset)[t],dock:t}}const b=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:i,area:o,width:a,height:s}=e;const l="top",c="target"===t.area?n[l].x:i.left+n[l].x,u=("target"===t.area?n[l].y:(i.top,n[l].y),r[l]),d=c+u.x,p=(u.y,a);let h=n.top.x;return d<0&&d+p>o.width||(d<0?h-=d:d+p>o.width&&(h-=d+p-o.width)),h}({options:a,docks:p,dockOffsets:g,targetBounds:s,area:m,width:i,height:o});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(p.top.y,"px"),transform:h.top},computedArrowStyle:iH(a.offset+b-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:i}=e;const{x:o,y:a}=n;return sH({x:o,y:a,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:i,nodes:o,resources:a}=e;const s=o[0],{dx:l,dy:c}=n,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,p=c+u.y+u.height/2,{start:h,end:f,outerRadius:m}=s.desc.slice,g=(h+f)/2-Math.PI/2,y=2*Math.PI,b=(g%y+y)%y;let v=["top","left","right","bottom"];return"auto"===t.dock&&(v=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),sH({x:d+m*u.scaleRatio.x*Math.cos(b),y:p+m*u.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:i,options:t,dockOrder:v})}};function uH(e,t){let{width:n,height:r}=e,{chart:i,state:o,props:a}=t;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>lH(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=lH(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=vD(c,a.placement(s))),"object"===l&&cH[a.placement.type]?c=vD(c,a.placement):"string"===l&&cH[a.placement]&&(c=vD(c,{type:a.placement})),s.options=c;const u=cH[c.type](s);let{x:d,y:p,width:h,height:f}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,h+=d,p+=s.pointer.dy,f+=p,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),h),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(u.computedTooltipStyle.top)),f),"px"),u}let dH;function pH(){dH=null}const hH={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const fH={require:["chart","renderer"],defaultSettings:{settings:hH,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,p=i-a.left,h=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:p,cy:h,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,i)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=tH({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){dH&&dH!==e&&dH()}(t),dH=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,vD({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,vD({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),dH===t&&(dH=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),pH()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),pH()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:i,h:o}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach((e=>{if("function"==typeof i.extract){const t=vD({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=uH(eH(t,{style:{left:"0px",top:"0px",visibility:"hidden"}},this).getBoundingClientRect(),this);this.state.tooltipElm=eH(t,n,this)}};const mH={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var gH={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},yH=/([astvzqmhlc])([^astvzqmhlc]*)/gi,bH=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function vH(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(yH,((e,n,r)=>{const i=function(e){const t=e.match(bH);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<gH[o])return"";for(t.push([a,...i.splice(0,gH[o])]);i.length>=gH[o]&&i.length&&gH[o];)t.push([a,...i.splice(0,gH[o])]);return""})),t}const xH=2*Math.PI;function wH(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function SH(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function EH(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=wH(e,t),s=wH(t,n),l=wH(n,r),c={x:SH(.5,e.x,t.x,n.x,r.x),y:SH(.5,e.y,t.y,n.y,r.y)},u=wH(a,s),d=wH(s,l);return EH(e,a,u,c,i,o-1),EH(c,d,l,r,i,o-1),i}function CH(e,t,n){const{cp1:r,cp2:i}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return EH(e,r,i,n)}function _H(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],p=e[7],h=e[1],f=e[2];if("a"===e[0]&&(d+=t,p+=n),t===p&&n===p)return r;if(!h||!f)return r.push({x:d,y:p}),r;({cx:s,cy:l,rx:h,ry:f,sweepAngle:c,startAngle:u}=function(e,t,n,r,i,o,a,s,l){let c,u,d,p,h,f;const m=ej(n%360),g=Math.cos(m),y=Math.sin(m),b=(s-o)/2,v=(l-a)/2,x=g*b+y*v,w=g*v-y*b;f=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,f>1&&(f=Math.sqrt(f),e*=f,t*=f);const S=e*w,E=t*x,C=S**2+E**2,_=(e*t)**2-C;let M=Math.sqrt(Math.max(_/C,0));r===i&&(M=-M);const k=M*(S/t),R=M*(-E/e);p=g*k-y*R+(s+o)/2,h=y*k+g*R+(l+a)/2;const A=(x-k)/e,I=(w-R)/t,L=(-x-k)/e,D=(-w-R)/t;return c=Math.atan2(I,A),c+=c<0?xH:0,u=Math.atan2(D,L),u+=u<0?xH:0,d=u-c,!i&&c<u?d-=xH:i&&u<c&&(d+=xH),d%=xH,{startAngle:c,sweepAngle:d,cx:p,cy:h,rx:e,ry:t}}(h,f,a,i,o,d,p,t,n));const m=Math.abs(c*Math.sqrt((h**2+f**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%xH,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*h+-i*n,y:l+i*f+n*i})}return r}function MH(e){const t=vH(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(..._H(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(..._H(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...EH({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...EH({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...EH({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...EH({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...CH({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...CH({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...CH({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...CH({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const kH={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{MH(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var RH=[function(e){e.component("box",jz),e.component("box-marker",jz)},function(e){e.component("point",Vz),e.component("point-marker",Vz)},function(e){e.component("pie",Xz)},function(e){e.component("grid-line",tB)},function(e){e.component("ref-line",uB)},function(e){e.component("axis",DB)},function(e){e.component("container",PB)},function(e){e.component("text",NB)},function(e){e.component("scrollbar",jB)},function(e){e.component("brush-range",eW),e.component("brush-area-dir",iW)},function(e){e.component("range",lW)},function(e){e.component("brush-lasso",fW)},function(e){e.component("labels",M$)},function(e){e.component("legend-cat",j$)},function(e){e.component("legend-seq",G$)},function(e){e.component("line",K$)},function(e){e.component("brush-area",Q$)},function(e){e.component("tooltip",fH)},function(e){e.component("debug-collider",mH)},function(e){e.component("debug-path-to-points",kH)}];class AH{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}}class IH{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:i,minHeight:o})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,i)):(this.x=e+Math.min(n,-i),this.width=-Math.min(n,-i)),r>=0?(this.y=t,this.height=Math.max(r,o)):(this.y=t+Math.min(r,-o),this.height=-Math.min(r,-o))}containsPoint(e){return jj(this,e)}intersectsLine(e){return zj(this,LD(e))}intersectsRect(e){return qj(this,ID(e))}intersectsCircle(e){return Lj(e,this)}intersectsPolygon(e){return Nj(e,this)}intersectsGeoPolygon(e){return Yj(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class LH{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return Ij(this,e)}intersectsLine(e){return Dj(this,LD(e))}intersectsRect(e){return Lj(this,ID(e))}intersectsCircle(e){return n=e,!Mj(t=this)&&!Mj(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return Pj(this,e)}intersectsGeoPolygon(e){return Gj(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class DH{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:i})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(i)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return Dj({cx:e.x,cy:e.y,r:this.tolerance},this)}return Wj(this,e)}intersectsLine(e){return Bj(this,LD(e))}intersectsRect(e){return zj(ID(e),this)}intersectsCircle(e){return Dj(e,this)}intersectsPolygon(e){return Tj(e,this)}intersectsGeoPolygon(e){return Uj(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class PH{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return Oj(this,e)}intersectsCircle(e){return Pj(e,this)}intersectsLine(e){return Tj(this,LD(e))}intersectsRect(e){return Nj(this,ID(e))}intersectsPolygon(e){return $j(this,e)}intersectsGeoPolygon(e){return Hj(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function OH(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new PH(...t)}function TH(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function NH(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class qH{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)NH(this.vertices[e]),this.vertices[e].length>2&&TH(this.vertices[e]),this.polygons[e]=OH({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return Vj(this,e)}intersectsCircle(e){return Gj(e,this)}intersectsLine(e){return Uj(this,LD(e))}intersectsRect(e){return Yj(this,ID(e))}intersectsPolygon(e){return Hj(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!qj(n,r)&&(Fj(r,n)?Aj(t,e):Aj(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function FH(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qH(...t)}class jH{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>Wj(t,e)))}intersectsCircle(e){return this.segments.some((t=>Dj(e,t)))}intersectsLine(e){const t=LD(e);return this.segments.some((e=>Bj(e,t)))}intersectsRect(e){const t=ID(e);return this.segments.some((e=>zj(t,e)))}intersectsPolygon(e){return this.segments.some((t=>Tj(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>Uj(e,t)))}points(){return this._points}}const zH=NP();function BH(e,t){return zH.get(e)(t)}zH.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new IH(...t)})),zH.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new LH(...t)})),zH.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new DH(...t)})),zH.add("polygon",OH),zH.add("geopolygon",FH),zH.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new jH(...t)}));class WH{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=BH(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class $H{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new $H).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof $H&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const HH=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function GH(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function VH(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function UH(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function YH(e,t){t.args.length>=6&&e.transform(...t.args)}function KH(e,t){const n=function(e){let t,n=[];for(;null!==(t=HH.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?GH(t,r):"scale"===r.cmd?VH(t,r):"matrix"===r.cmd?YH(t,r):"translate"===r.cmd&&UH(t,r)}const XH={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},JH={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function ZH(e,t){if(!t||!t.length||!e||"function"!=typeof JH[e.type])return[];switch(e.type){case"type":case"tag":return JH[e.type](e.value,t);case"attr":return JH[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return JH[e.type](t);default:return[]}}var QH={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{i=e.match(XH[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(XH).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););})),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=ZH(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function eG(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every((e=>Array.isArray(e)))?i.map((e=>n.transformPoints(e))):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=ID(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=LD(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:ZF(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=ZF(i[t],!0);o={type:"path",d:e}}return o}class tG{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:i,height:o}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:i,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>eG(e,t,n)))}:eG(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new tG(e))),this._parent=()=>e.parent?new tG(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();i-=t,o-=n}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function nG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new tG(...t)}class rG{constructor(e){this._node=nG(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function iG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new rG(...t)}function oG(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=iG(n);const e=n.parent;e&&"stage"!==e.type&&oG(e,t.parent)}}function aG(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?FH(n):OH(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=iG(i);return oG(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=iG(e);return oG(e,t),t}return null}(e,t,r)}function sG(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=aG(i,t,r);a&&n.push(a),!i.children||a||i.collider||sG(i.children,t,n,r)}}function lG(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==aG(r,t,n))return!0;if(r.children&&!r.collider)return lG(r.children,t,n)}return!1}function cG(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(DD(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=AD(e).map((e=>ij(e,t))),["intersectsRect",n];case"line":return n=RD(e).map((e=>ij(e,t))),["intersectsLine",n];case"point":return n=ij(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>ij(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>ij(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function uG(e,t){const[n,r]=cG(t,e.dpi),i=[];return n&&(sG([e],n,i,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,i)),i}function dG(e,t){const[n,r]=cG(t,e.dpi);return lG([e],n,r)}class pG extends AH{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:i,fillReference:o}=e;var a,s;a=this.attrs,s=e,Object.keys(JF).forEach((e=>{const t=s[e];void 0!==t&&(a[JF[e]]=t)})),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=vD(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return QH.find(e,this).map((e=>nG(e)))}getItemsFrom(e){return uG(this,e)}containsPoint(e){return dG(this,e)}intersectsLine(e){return dG(this,e)}intersectsRect(e){return dG(this,e)}intersectsCircle(e){return dG(this,e)}intersectsPolygon(e){return dG(this,e)}intersectsGeoPolygon(e){return dG(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new $H;void 0!==this.attrs.transform&&KH(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new $H;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new WH(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=BH("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=BH(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class hG extends AH{addChild(e){if(!(e&&e instanceof AH))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const fG=hG.prototype;class mG extends pG{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=vD({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,i]=e.bounds(t),{x:o,y:a}=r,{x:s,y:l}=i,c=isNaN(n.width)?s:Math.max(s,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=vD({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=fG.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=vD({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=fG.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=vD({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(fG.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=vD(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(fG.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=vD(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function gG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new mG(...t)}class yG extends mG{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const bG=hG.prototype,vG=["x1","x2","y1","y2","id","offset","style"];class xG extends pG{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=vG.length;r!==i;r++)n=vG[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return bG.addChild.call(this,e)}addChildren(e){return bG.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return bG.removeChild.call(this,e),this}removeChildren(e){return bG.removeChildren.call(this,e),this}}function wG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new xG(...t)}const SG=hG.prototype,EG=["patternUnits","x","y","width","height","id"];class CG extends pG{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=EG.length;r!==i;r++)n=EG[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return SG.addChild.call(this,e)}addChildren(e){return SG.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return SG.removeChild.call(this,e),this}removeChildren(e){return SG.removeChildren.call(this,e),this}}class _G extends pG{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,collider:s}=e,l=vD({type:"rect",x:t,y:n,width:r,height:i},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=AD(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=kD(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class MG extends pG{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:i}=e,o=vD({type:"circle",cx:t,cy:n,r:r},i);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=o,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:i}=this.attrs,o=t-r,a=n-i;let s=2*r,l=2*i,c=[{x:o,y:a},{x:o+s,y:a},{x:o+s,y:a+l},{x:o,y:a+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,r,i]=kD(c);s=r-t,l=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class kG extends pG{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:i=0,collider:o}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=i;const a={type:"line",x1:t,y1:n,x2:r,y2:i};this.collider=vD(a,o),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=RD(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,i,o]=kD(t),a=n!==i||r!==o;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,i-n):0,height:a?Math.max(1,o-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const RG=Math.PI/2;function AG(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function IG(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const LG={step:function(e){return new IP(e,.5)},stepAfter:function(e){return new IP(e,1)},stepBefore:function(e){return new IP(e,0)},linear:sP,basis:function(e){return new mP(e)},cardinal:bP.tension(0),catmullRom:xP,monotonex:function(e){return new _P(e)},monotoney:function(e){return new MP(e)},natural:function(e){return new RP(e)}};function DG(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class PG extends pG{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=oP();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:i,stngs:o,generatorType:a}=e,s=uP(),l=o.coordinates?o.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(LG["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=MH(this.attrs.d),this.segments.length>1&&this.segments.every((e=>DG(e))))return void(this.collider=vD({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(DG(t))this.collider=vD({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=AG(s,a),u=AG(s,l),d=(c+u)/2,p=d+Math.PI,h=Math.max(d,p),f=Math.min(d,p),m=c>u;if(1===n){const e=AG(a,s);r.push(IG(a,e-RG,t)),i.unshift(IG(a,e+RG,t))}const g=m?h:f,y=m?f:h;if(r.push(IG(s,g,t)),i.unshift(IG(s,y,t)),n===o-1){const e=AG(l,s);r.push(IG(l,e+RG,t)),i.unshift(IG(l,e-RG,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=vD({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:MH(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,i,o]=kD(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function OG(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}let TG=class extends pG{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:i=0,textBoundsFn:o,text:a,title:s,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=i,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof o&&(this._textBoundsFn=o),"string"==typeof u&&(this.ellipsed=u),this.collider=vD({type:OG(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=AD(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[i,o,a,s]=kD(r);return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}};const NG=NP();function qG(e,t){return NG.get(e)(t)}NG.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _G(...t)})),NG.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new MG(...t)})),NG.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new TG(...t)})),NG.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kG(...t)})),NG.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new PG(...t)})),NG.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yG(...t)})),NG.add("container",gG),NG.add("defs",gG),NG.add("linearGradient",wG),NG.add("radialGradient",wG),NG.add("stop",wG),NG.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new CG(...t)}));const FG=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return vD(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function jG(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function zG(e,t,n){e.node=n[t],e.index=t}function BG(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(zG(o,a,e),jG(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=FG.save(o.node);const s=qG(o.node.type,o.node);s&&(o.node.transform&&(n.save(),KH(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&BG(o.node.children,s,n,r),o.node.transform&&n.restore()),FG.restore()}}function WG(e){let{items:t,stage:n,dpi:r,on:i={}}=e;return n||(n=qG("stage",r)),BG(t,n,new $H,i),n}function $G(e,t,n){const{orientation:r,degree:i,stops:o=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else{const r=tj(i);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const o=t.boundingRect();a=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=o.length;e<t;e++){let t=o[e];a.addColorStop(t.offset,t.color)}return a}function HG(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function GG(){let{x:e,y:t,width:n,height:r,scaleRatio:i,margin:o,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==i&&(s.scaleRatio.x=isNaN(i.x)?s.scaleRatio.x:i.x,s.scaleRatio.y=isNaN(i.y)?s.scaleRatio.y:i.y),void 0!==o&&(s.margin.left=isNaN(o.left)?0:o.left,s.margin.top=isNaN(o.top)?0:o.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function VG(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:b$,textBounds:x$,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function UG(e){return t=>{let{node:n}=t;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=e.textBounds)}}const YG=200,KG=200;class XG{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:i}=e;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*YG,height:n.computedPhysical.height+2*KG},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const JG=NP();function ZG(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function QG(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function eV(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function tV(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function nV(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=$G(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=$G(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),tV(t,o,n,a),o.modelViewMatrix&&eV(o.modelViewMatrix.elements,t),JG.has(o.type)&&JG.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&nV(o.children,t,n,r),t.restore()}}function rV(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:WG;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=GG();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",ZG]];let l;const c=VG();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new XG(e)),n.appendChild(e),e),c.getScene=r=>{const i=QG(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[c$(c.measureText),UG(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||HG(e,t,n),r[i]):HG(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=QG(u),p=t&&r.transform();if(p)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:p}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const h=c.getScene(n),f=!i||!h.equals(i);l.clear();const m=o||f,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),nV(h.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&h.children.unshift(...i.children),i=h,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=GG(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function iV(e,t){JG.add(e,t)}function oV(e,t){return Math.max(0,Math.min(e,t))}const aV=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),sV=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),lV=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function cV(e){return aV.test(e)}function uV(e){return sV.test(e)||lV.test(e)}function dV(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],cV(n))return"ltr";if(uV(n))return"rtl"}return"ltr"}const pV={start:"end",end:"start",center:"center",middle:"middle"};function hV(e,t){return"rtl"===t?pV[e]:e}function fV(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=fV([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=fV(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function mV(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function gV(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function yV(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(mV(i.diff.added,i.object,t),gV(i.diff.removed,r),yV(i.diff.items,t,n,r)))}function bV(e,t,n,r,i,o){const a=fV(e,t);return mV(a.added,n,r),gV(a.removed,o),yV(a.items,r,i,o),a.items}iV("rect",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=oV(r/2,o>0?o:a),a=oV(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()})),iV("circle",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()})),iV("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),iV("path",(function(e,t){let{g:n,doStroke:r,doFill:i}=t;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)})),iV("text",(function(e,t){let{g:n,ellipsed:r,doStroke:i}=t;const o=r||u$(e,b$);e["font-weight"]?n.font="".concat(e["font-weight"]," ").concat(e["font-size"]," ").concat(e["font-family"]):n.font="".concat(e["font-size"]," ").concat(e["font-family"]);const a=dV(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=hV("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=d$(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)}));const vV="http://www.w3.org/2000/svg",xV=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(vV,"container"===e?"g":e);return t.appendChild(n),n},wV=e=>{e.parentNode&&e.parentNode.removeChild(e)},SV=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||u$(t.attrs,b$);const n=dV(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",hV(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(vV,"title");n.textContent=t.attrs.title,e.appendChild(n)}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?d$(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class EV{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function CV(){return new EV(bV,xV,SV,wV)}function _V(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function MV(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vV,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:WG;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:CV)();let r,i,o,a=!1,s=GG();const l={transform:void 0},c=VG(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_V,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach((a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")}))},clear(){n={}}};return i}(u.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_V,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=i[o],c={};void 0===r&&(r=90),"radial"===t?c.type="radialGradient":(c=tj(r),["x1","x2","y1","y2"].forEach((e=>{e in i[o]&&(c[e]=i[o][e])})),c.type="linearGradient"),c.id=l,c.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(c),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},p.onCreate,d.onCreate,c$(c.measureText),UG(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="",a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),p.clear(),d.clear(),u.children.length=0;const h=c.getScene(e),f=!o||!h.equals(o),m=a||f;return m&&(c.clear(),n.render(h.children,i)),a=!1,o=h,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=GG(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var kV,RV,AV,IV,LV,DV,PV,OV={},TV=[],NV=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function qV(e,t){for(var n in t)e[n]=t[n];return e}function FV(e){var t=e.parentNode;t&&t.removeChild(e)}function jV(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?kV.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return zV(e,a,r,i,null)}function zV(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++AV:i};return null==i&&null!=RV.vnode&&RV.vnode(o),o}function BV(e){return e.children}function WV(e,t){this.props=e,this.context=t}function $V(e,t){if(null==t)return e.__?$V(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?$V(e):null}function HV(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return HV(e)}}function GV(e){(!e.__d&&(e.__d=!0)&&IV.push(e)&&!VV.__r++||LV!==RV.debounceRendering)&&((LV=RV.debounceRendering)||DV)(VV)}function VV(){var e,t,n,r,i,o,a,s;for(IV.sort(PV);e=IV.shift();)e.__d&&(t=IV.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=qV({},o)).__v=o.__v+1,tU(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?$V(o):a,o.__h),nU(r,o),o.__e!=a&&HV(o)),IV.length>t&&IV.sort(PV));VV.__r=0}function UV(e,t,n,r,i,o,a,s,l,c){var u,d,p,h,f,m,g,y=r&&r.__k||TV,b=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?zV(null,h,null,null,h):Array.isArray(h)?zV(BV,{children:h},null,null,null):h.__b>0?zV(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=y[u])||p&&h.key==p.key&&h.type===p.type)y[u]=void 0;else for(d=0;d<b;d++){if((p=y[d])&&h.key==p.key&&h.type===p.type){y[d]=void 0;break}p=null}tU(e,h,p=p||OV,i,o,a,s,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=YV(h,l,e):l=KV(e,h,p,y,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=$V(p))}for(n.__e=m,u=b;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=XV(r).nextSibling),oU(y[u],y[u]));if(g)for(u=0;u<g.length;u++)iU(g[u],g[++u],g[++u])}function YV(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?YV(r,t,n):KV(n,r,r,i,r.__e,t));return t}function KV(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function XV(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=XV(n)))return r;return null}function JV(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||NV.test(t)?n:n+"px"}function ZV(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||JV(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||JV(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?eU:QV,o):e.removeEventListener(t,o?eU:QV,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function QV(e){return this.l[e.type+!1](RV.event?RV.event(e):e)}function eU(e){return this.l[e.type+!0](RV.event?RV.event(e):e)}function tU(e,t,n,r,i,o,a,s,l){var c,u,d,p,h,f,m,g,y,b,v,x,w,S,E,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=RV.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,b):(t.__c=u=new WV(g,b),u.constructor=C,u.render=aU),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=qV({},u.__s)),qV(u.__s,C.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,b),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}if(u.context=b,u.props=g,u.__P=e,x=RV.__r,w=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=qV(qV({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),E=null!=c&&c.type===BV&&null==c.key?c.props.children:c,UV(e,Array.isArray(E)?E:[E],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=rU(n.__e,t,n,r,i,o,a,l);(c=RV.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),RV.__e(e,t,n)}}function nU(e,t){RV.__c&&RV.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){RV.__e(e,t.__v)}}))}function rU(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,s=!1}if(null===h)d===p||s&&e.data===p||(e.data=p);else{if(o=o&&kV.call(e.childNodes),c=(d=n.props||OV).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||ZV(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||ZV(e,o,t[o],n[o],r)}(e,p,d,i,s),u)t.__k=[];else if(f=t.props.children,UV(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,a,o?o[0]:n.__k&&$V(n,0),s),null!=o)for(f=o.length;f--;)null!=o[f]&&FV(o[f]);s||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===h&&!f||"option"===h&&f!==d.value)&&ZV(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&ZV(e,"checked",f,d.checked,!1))}return e}function iU(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){RV.__e(e,n)}}function oU(e,t,n){var r,i;if(RV.unmount&&RV.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||iU(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){RV.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&oU(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||FV(e.__e),e.__=e.__e=e.__d=void 0}function aU(e,t,n){return this.constructor(e,n)}function sU(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,i=GG();const o={transform:void 0},a=VG();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach((t=>{void 0!==e[t]&&(o[t]=e[t])})),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:i,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}let a;return n.style.transform="",n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?jV("div",null,e):e,r=function(e,t,n){var r,i,o;RV.__&&RV.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],tU(t,e=(!r&&n||t).__k=jV(BV,null,[e]),i||OV,OV,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?kV.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),nU(o,e)}(a,n,r),!0},a.renderArgs=[jV],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=GG(e)),i),a}kV=TV.slice,RV={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},AV=0,WV.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=qV({},this.state),"function"==typeof e&&(e=e(qV({},n),this.props)),e&&qV(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),GV(this))},WV.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),GV(this))},WV.prototype.render=BV,IV=[],DV="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,PV=function(e,t){return e.__v.__b-t.__v.__b},VV.__r=0;var lU=[function(e){e.renderer("svg",MV)},function(e){e.renderer("canvas",rV)},function(e){e.renderer("dom",sU)}];const cU={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const uU=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=cU.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[cU.OFF]:()=>{},[cU.ERROR]:function(){return t.error(...arguments)},[cU.WARN]:function(){return t.warn(...arguments)},[cU.INFO]:function(){return t.info(...arguments)},[cU.DEBUG]:function(){return t.log(...arguments)}},i=function(e){if(e&&!(n<e)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];(r[e]||r[cU.DEBUG])(...i)}};return{log:i,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(cU.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(cU.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(cU.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(cU.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:cU}}(t.logger),i={component:NP(n.component,"component",r),data:NP(n.data,"data",r),formatter:NP(n.formatter,"formatter",r),interaction:NP(n.interaction,"interaction",r),renderer:Ez(n.renderer),scale:NP(n.scale,"scale",r),symbol:NP(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:vD({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>Sz(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach((e=>{o[e]=i[e]})),o.version=xD,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:Cz,data:Az,formatter:aN,interaction:Iz,renderer:Ez(),scale:sF,symbol:hj});RH.forEach(uU.use),lU.forEach(uU.use),[].forEach(uU.use);const dU=uU();dU.use(uD),dU.renderer.prio(["canvas"]);const pU=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,hU=({href:e,text:t,labelStructure:n,interactions:r,color:i})=>Ws.jsxs("span",{children:[Ws.jsx(VR,{...SI({href:e,text:t,interactions:r,color:i}),children:null!=n&&n.maskedValue?n.maskedValue:null==n?void 0:n.originalValue}),!!n&&pU(n)]}),fU=({children:e,textStyle:t})=>Ws.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box"},children:e}),mU=({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>{const{isActive:i}=AM(),{interactions:o}=rE();let a=r?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:i,suffix:o,delimeter:a}=n;return`${0!==i.length?i:r} ${o?a:""} ${o}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const s=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>({...pg,...hg(r?Math.max(t.grid.lineClamp,e.leafCount*t.grid.lineClamp):t.grid.columnLineClamp),color:TM({cell:e,styleService:t,isCellSelected:n}),fontWeight:NM({cell:e,styleService:t}),fontStyle:qM({cell:e,styleService:t}),textDecoration:FM({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r});if(e.representation.type===Dt.Image&&!e.isTotal)return Ws.jsx(YM,{representation:e.representation,isLeftColumn:r,styleService:t,textStyle:s,leafCount:e.leafCount,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand});if(e.representation.type===Dt.Link&&!i&&!e.isTotal){const t=r&&e.representation.labelStructure?hU:EI;a=Ws.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:o,color:e.expressionColor.color})}return Ws.jsx(fU,{textStyle:s,children:a})},gU=e=>{const t=e.isLeftColumn?"flex-start":"center";var n;return e.representation.type!==Dt.Image||(e=>"fill"===e.representation.imageSize)(e)?t:null===(n=e.representation.resolvedImagePosition)||void 0===n?void 0:n.vertical},yU=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:i}=aE(),{isSelected:o}=AM(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=mk([n]),h=yI(e,n),f=a?e===l-1:c,m=a?c:e===l-1,g=gM(h,u,i.isIndentModeEnabled);if(void 0===h){const{background:n}=r.dimensionValues;return Ws.jsx(yM,{style:{...t,background:n},index:e,isLastRow:f,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const y=o(h);return Ws.jsxs(xI,{text:h.representation.text,reactWindowStyle:t,isLeftColumn:a,isLastRow:f,isLastColumn:m,isCellSelected:y,showTotalCellDivider:g,cell:h,data:n,isAdjustingWidth:d,index:e,children:[Ws.jsxs(bM,{verticalAlign:gU(h),width:vM(h.representation),right:h.isLeftColumn?void 0:4,children:[Ws.jsx(WM,{isLeftColumn:a,isCellSelected:y,cell:h}),Ws.jsx(mU,{isLeftColumn:a,isCellSelected:y,cell:h,styleService:r})]}),Ws.jsx(bk,{cellInfo:{...h,columnWidthLocation:h.isPseudoDimension?Bt.Measures:Bt.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var bU=t.memo(yU,tM);const vU=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>i=>{var o;const a=n?e[i]:t.at(i);return a&&0===i&&a.x>0?(a.leafCount+a.x+a.distanceToNextCell)*r():!n&&a?(a.leafCount+a.distanceToNextCell)*r():r(null!==(o=null==a?void 0:a.x)&&void 0!==o?o:i)},xU=(e,t,n,r)=>{const i=Object.values(e);let o,a=i.length;return r&&(a=n,o=t/a),{itemCount:a,estimatedItemSize:o,listValues:i}},wU=(e,t)=>n=>{e.current&&(e.current[t]=n)},SU={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...ug},EU={overflow:"hidden",willChange:"auto",flexShrink:0},CU=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:i})=>{const{pageInfo:o}=eE(),{layoutService:a,styleService:{contentCellHeight:s,grid:{divider:l}}}=aE(),{qSize:c}=a.layout.qHyperCube,{gridSectionsData:{leftDimensionData:u},visibleDimensionsInfo:{visibleLeftDimensionInfo:d}}=VC();gI(e,u),mI(e,t,n,s);const p=o.rowsOnCurrentPage*s,h={...SU,borderColor:l,width:r.reduce(((e,t)=>e+t),0)};return Ws.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:u.grid.map(((t,l)=>{const h=l===u.columnCount-1,f=vE(d[l]),{itemCount:m,estimatedItemSize:g,listValues:y}=xU(t,p,o.rowsOnCurrentPage,h),b=a.isIndentModeEnabled?()=>s:((e,t,n,r,i)=>o=>{const a=r?e[o]:t.at(o);if(a&&0===o&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===i-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,y,s,h,c.qcy);return Ws.jsx(J_,{ref:wU(e,l),style:{...EU,flexGrow:h?1:0},height:n,width:r[l],itemCount:m,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:m,showLastBorder:i,listValues:y,totalDividerIndex:u.totalDividerIndex},itemKey:sk,estimatedItemSize:g,children:bU},f)}))})};var _U=f(CU);const MU={overflow:"hidden",willChange:"auto"},kU={...ug,borderWidth:"0px 0px 0px 1px"},RU=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:i,getRightGridColumnWidth:o})=>{const{layoutService:a,styleService:{grid:{divider:s},headerCellHeight:l}}=aE(),{gridSectionsData:{headersData:c,topDimensionData:u}}=VC(),d={...kU,borderColor:s,height:r};gI(e,u),mI(e,n,r,l);const p=a.size.x*o();return 0===u.rowCount?Ws.jsx("div",{style:{width:n,height:r,...kU}}):Ws.jsx("div",{style:d,"data-section-id":"TOP_GRID",children:u.grid.map(((r,s)=>{const l=s===u.rowCount-1,{itemCount:d,estimatedItemSize:h,listValues:f}=xU(r,p,a.size.x,l),m=(({layoutService:e,headersData:t,topRowIndex:n})=>{var r;const i=t.data[n],o=t.size.x-1,a=e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y?null===(r=i[0][o])||void 0===r?void 0:r.dimensionInfoIndex:null==i?void 0:i[o].dimensionInfoIndex;return void 0!==a?e.getDimensionInfo(a):void 0})({layoutService:a,headersData:c,topRowIndex:s}),g=m?vE(m):`empty ${s}`;return Ws.jsx(J_,{ref:wU(e,s),style:MU,height:t(),width:n,itemCount:d,itemSize:vU({list:r,listValues:f,isLastRow:l,getRightGridColumnWidth:o}),layout:"horizontal",itemData:{list:r,isLast:l,itemCount:d,showLastBorder:i,listValues:f,totalDividerIndex:u.totalDividerIndex},itemKey:sk,estimatedItemSize:h,children:bU},g)}))})};var AU=f(RU);const IU=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=aE(),n=g_(),r=(()=>{const{model:e}=rE(),t=d((async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:i,sortDirection:o}=t,a=[];if(n===o)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}}),[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:i,topGridWrapperRef:o,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:u},scrollDirectionRefs:{verticalScrollDirection:h,horizontalScrollDirection:f},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:y}}=m_(),{leftGridWidth:b,leftGridFullWidth:v,leftGridColumnWidths:x,rightGridFullWidth:w,showLastRightBorder:S,getRightGridColumnWidth:E,getHeaderCellsIconsVisibilityStatus:C,overrideLeftGridWidth:_}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:i}=aE(),{gridSectionsData:{headersData:o}}=VC(),{measureText:a}=jg(i.header),s=l_({tableWidth:e}),l=c_({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=s.leftGridWidth+l.rightGridFullWidth+1<e,u=d(((e,t,n="")=>{let i=e;r.isIndentModeEnabled&&(i=1,1===o.size.x&&(i=0));const l=s.leftGridColumnWidths[i];let c=!1,u=!1,d=a(n)+YC;return t&&d+20<=l&&(u=!0,d+=20),d+20<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}}),[s.leftGridColumnWidths,a,r.isIndentModeEnabled,o.size.x]);return p((()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()}),[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:c,getHeaderCellsIconsVisibilityStatus:u}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:y}),{gridScaffoldDimensions:M,headerGridDims:k,topGridDims:R,leftGridDims:A,dataGridDims:I,metadata:{everyThingFitsInTableRectHeight:L,scrollbarsVisibilityStatus:D}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:i},scrollBarsDimensions:{verticalScrollbarWidth:o,horizontalScrollbarHeight:a}})=>{const s=g_(),{pageInfo:l}=eE(),{gridSectionsData:{headersData:c,topDimensionData:u}}=VC(),d=Math.min(s.height*KC,Math.max(s.height*KC-25,s.height-t-a)),p=s.width*KC,h=l.rowsOnCurrentPage*t,f=Math.max(c.size.y,u.rowCount,1),m=e*f,g=e*f,y=Math.min(p,n),b=s.width-p,v=Math.max(b,s.width-y),x=Math.min(d,m,g),{availableHeight:w,everyThingFitsInTableRectHeight:S,everyThingFitsInTableRectWidth:E}=((e,t,n)=>{const r=t+1+n+o<=s.width,i=e+1+h+a,l=i-s.height<a||i<=s.height;return{availableHeight:l?i:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,y,v),C=w-d,_=Math.max(C,w-x),M=Math.min(_,h),k=Math.min(_,h),R=m+1+h,{visibilityStatus:A,metadata:{hasLeftGridOverflowX:I,hasDataGridOverflowX:L}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:i}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:o,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=o>t,d=a>n,p=l>i;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:y,rightSectionWidth:v},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:_}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:i},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${y}px ${v}px`,gridTemplateRows:`${x}px ${_}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:i-o+(L?o:0),height:g},stickyWrapper:{width:v-1-o,height:-1},self:{width:Math.min(i,v)-(E?1:0)-o,height:g}},leftGridDims:{fullSizeWrapper:{width:y,height:R-g+(!I&&L?a:0)},stickyWrapper:{width:y,height:_-1-a},self:{width:y,height:Math.max(t,M-(S?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:i-o+(L?o:0),height:R-g+(!L&&I?a:0)},stickyWrapper:{width:v-1-o,height:_-1-a},self:{width:Math.min(i,v)-(E?1:0)-o,height:Math.max(t,k-(S?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:S,scrollbarsVisibilityStatus:A}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:b,leftGridOriginalWidth:v,rightGridOriginalWidth:w},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),P=d((()=>e),[e]),O=d((()=>t),[t]);return(()=>{const{downloadService:e}=aE();p((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))})(),Ws.jsxs(b_,{style:M,children:[Ws.jsx("div",{style:{overflow:"hidden"},ref:i,children:Ws.jsx(fI,{tableWidth:n.width,leftGridWidth:b,columnWidths:x,getHeaderCellsIconsVisibilityStatus:C,rowHight:e,height:k.height,changeSortOrder:r,overrideLeftGridWidth:_})}),Ws.jsx(w_,{style:D.topGrid,origin:$t.TopGrid,ref:o,children:Ws.jsx(y_,{style:R.fullSizeWrapper,children:Ws.jsx(S_,{style:R.stickyWrapper,children:Ws.jsx(AU,{topGridRef:l,rowHightCallback:P,...R.self,showLastBorder:{right:S,bottom:!1},getRightGridColumnWidth:E})})})}),Ws.jsx(w_,{style:D.leftGrid,origin:$t.LeftGrid,ref:a,children:Ws.jsx(y_,{style:A.fullSizeWrapper,children:Ws.jsx(S_,{style:A.stickyWrapper,children:Ws.jsx(_U,{leftGridRef:c,...A.self,columnWidths:x,showLastBorder:{right:!1,bottom:L}})})})}),Ws.jsx(w_,{style:D.dataGrid,origin:$t.DataGrid,ref:s,children:Ws.jsx(y_,{style:I.fullSizeWrapper,children:Ws.jsx(S_,{style:I.stickyWrapper,children:Ws.jsx(dk,{dataGridRef:u,rowHightCallback:O,...I.self,showLastBorder:{right:S,bottom:L},getRightGridColumnWidth:E,verticalScrollDirection:h,horizontalScrollDirection:f})})})})]})},LU=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=rE(),{pageInfo:i,updatePageInfo:o,rect:a}=eE(),{layoutService:s}=aE(),{layout:l,hasData:c}=s;return Ws.jsxs(Ws.Fragment,{children:[c?Ws.jsx(IU,{}):null,Ws.jsx(lE,{}),Ws.jsx(ZS,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{o({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:l})]})},DU={WHITE:"#FFFFFF",GREY:"#999999",GREY_PALE:"#B2B2B2",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF",GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_25:"rgba(0, 0, 0, 0.25)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_0_65:"rgba(0, 0, 0, 0.65)",GREYSCALE_100_05:"rgba(255, 255, 255, 0.05)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_25:"rgba(255, 255, 255, 0.25)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},PU=12,OU=14,TU=16,NU=24,qU=3,FU=300,jU=400,zU=600,BU=700,WU={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};yn(DU.GREYSCALE_0,.05),yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5),yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5),yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5);var $U;function HU(){return HU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HU.apply(null,arguments)}yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5),yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5);var GU,VU=function(t){return e.createElement("svg",HU({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),$U||($U=e.createElement("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})))};function UU(){return UU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UU.apply(null,arguments)}var YU=function(t){return e.createElement("svg",UU({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),GU||(GU=e.createElement("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345z"})))};function KU({fontSize:e="medium",children:t=null,className:n=""}={}){const r="small"===e?"16px":"20px",i="small"===e?"-2px 0":void 0;return Ws.jsx("i",{style:{fontSize:r,margin:i,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})}function XU(e={}){return Ws.jsx(KU,{...e,children:Ws.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[Ws.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),Ws.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function JU(e={}){return Ws.jsx(KU,{...e,children:Ws.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Ws.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[Ws.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),Ws.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function ZU(e={}){return Ws.jsx(KU,{fontSize:"medium",...e,children:Ws.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Ws.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Ws.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function QU(e={}){return Ws.jsx(KU,{fontSize:"medium",...e,children:Ws.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ws.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),Ws.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function eY({className:e}){return Ws.jsx(KU,{fontSize:"small",className:e,children:Ws.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:Ws.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Ws.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:Ws.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[Ws.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),Ws.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function tY(e={}){return Ws.jsx(KU,{...e,children:Ws.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Ws.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Ws.jsx("rect",{stroke:DU.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}Ws.jsx(YU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),Ws.jsx(VU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),Ws.jsx(ZU,{}),Ws.jsx(QU,{}),Ws.jsx((function(e={}){return Ws.jsx(KU,{...e,children:Ws.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Ws.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Ws.jsx("rect",{stroke:"#000000",fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}),{}),Ws.jsx(XU,{}),Ws.jsx(JU,{}),Ws.jsx(VU,{style:{color:DU.TEXT_PRIMARY},"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16});const nY={MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{}}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:qU,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transition:"unset",color:"var(--sprout-common-foreground-color-default)",boxShadow:"none","&:hover":{backgroundColor:"var(--sprout-common-background-color-hover)"},"&:active":{backgroundColor:"var(--sprout-common-background-color-pressed)"},"&.Mui-disabled":{backgroundColor:"var(--sprout-common-background-color-disabled)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"calc(var(--sprout-focus-border-default-width) / -2)",backgroundColor:"var(--sprout-focus-background-color-default)",zIndex:100}},text:{padding:"8px 16px",backgroundColor:"transparent"},textPrimary:{color:"var(--sprout-brand-primary-color-default)"},textSecondary:{color:"var(--sprout-info-color-default)"},textWarning:{color:"var(--sprout-warning-color-default)"},textError:{color:"var(--sprout-danger-color-default)"},outlined:{padding:"7px 16px",border:"var(--sprout-common-border-moderate)",backgroundColor:"var(--sprout-common-background-color-enabled)","&.Mui-focusVisible":{borderColor:"transparent"},"&:hover":{border:"var(--sprout-common-border-moderate)"}},outlinedPrimary:{borderColor:"var(--sprout-brand-primary-color-default)",color:"var(--sprout-brand-primary-color-default)","&:hover":{borderColor:"var(--sprout-brand-primary-color-default)"}},outlinedSecondary:{borderColor:"var(--sprout-info-color-default)",color:"var(--sprout-info-color-default)","&:hover":{borderColor:"var(--sprout-info-color-default)"}},outlinedWarning:{borderColor:"var(--sprout-warning-color-default)",color:"var(--sprout-warning-color-default)","&:hover":{borderColor:"var(--sprout-warning-color-default)"}},outlinedError:{borderColor:"var(--sprout-danger-color-default)",color:"var(--sprout-danger-color-default)","&:hover":{borderColor:"var(--sprout-danger-color-default)"}},contained:{color:"var(--sprout-brand-primary-color-inverse)",backgroundColor:"var(--sprout-brand-primary-color-default)",padding:"8px 16px","&:hover":{backgroundColor:"var(--sprout-brand-primary-color-hover)"},"&:active":{backgroundColor:"var(--sprout-brand-primary-color-pressed)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"var(--sprout-focus-border-default-width)",background:"var(--sprout-brand-primary-color-focus)"}},containedError:{backgroundColor:"var(--sprout-danger-color-default)","&:hover":{backgroundColor:"var(--sprout-danger-color-hover)"},"&:active":{backgroundColor:"var(--sprout-danger-color-pressed)"},"&.Mui-focusVisible":{outlineColor:"var(--sprout-danger-color-inverse)",backgroundColor:"var(--sprout-danger-color-focus)"}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]}};var rY=(e,t)=>(e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:DU.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:DU.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:Ws.jsx(VU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${DU.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`,borderRadius:qU,backgroundColor:DU.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${DU.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:DU.WHITE,color:DU.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:qU},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${DU.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:DU.GREYSCALE_0_15,backgroundColor:DU.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${DU.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:DU.GREEN_PALE},"&:active":{backgroundColor:DU.GREEN_DARK},"&.Mui-focusVisible":{borderColor:DU.GREEN_PALE,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:DU.BLUE_PALE},"&:active":{backgroundColor:DU.BLUE_DARK},"&.Mui-focusVisible":{borderColor:DU.BLUE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:qU,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:DU.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${DU.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:DU.GREYSCALE_0_15,backgroundColor:DU.GREYSCALE_100_60,"&:active":{backgroundColor:DU.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${DU.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:DU.PURPLE,"&.Mui-focusVisible":{borderColor:DU.PURPLE,boxShadow:`0 0 0 3px ${Rb(DU.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:DU.GREEN,"&.Mui-focusVisible":{borderColor:DU.GREEN,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:DU.BLUE,"&.Mui-focusVisible":{borderColor:DU.BLUE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:DU.ORANGE,"&.Mui-focusVisible":{borderColor:DU.ORANGE,boxShadow:`0 0 0 3px ${Rb(DU.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:DU.RED,"&.Mui-focusVisible":{borderColor:DU.RED,boxShadow:`0 0 0 3px ${Rb(DU.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:DU.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:DU.PURPLE_PALE},"&:active":{backgroundColor:DU.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:DU.PURPLE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:DU.GREEN_PALE},"&:active":{backgroundColor:DU.GREEN_DARK},"&.Mui-focusVisible":{borderColor:DU.GREEN_PALE,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:DU.BLUE_PALE},"&:active":{backgroundColor:DU.BLUE_DARK},"&.Mui-focusVisible":{borderColor:DU.BLUE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:DU.ORANGE_PALE},"&:active":{backgroundColor:DU.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:DU.ORANGE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:DU.RED_PALE},"&:active":{backgroundColor:DU.RED_DARK},"&.Mui-focusVisible":{borderColor:DU.RED_PALE,boxShadow:`0 0 0 3px ${Rb(DU.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:DU.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:DU.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:qU,boxShadow:`inset 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:Ws.jsx(YU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:PU,borderRadius:qU,color:DU.TEXT_PRIMARY,backgroundColor:DU.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:DU.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:DU.GREYSCALE_0_05,color:DU.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:DU.GREEN,borderColor:DU.GREEN},"&.MuiChip-outlinedInfo":{color:DU.BLUE,borderColor:DU.BLUE},"&.MuiChip-outlinedWarning":{color:DU.ORANGE,borderColor:DU.ORANGE},"&.MuiChip-outlinedError":{color:DU.RED,borderColor:DU.RED}},outlined:{border:`solid 1px ${DU.GREYSCALE_0_15}`,backgroundColor:DU.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:qU,boxShadow:"none",backgroundColor:DU.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:DU.GREEN,borderColor:DU.GREEN},outlinedSecondary:{color:DU.BLUE,borderColor:DU.BLUE},label:{fontFamily:WU.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:Ws.jsx(YU,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:Ws.jsx(VU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:qU},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:qU,fontSize:OU,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:DU.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${DU.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:DU.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:DU.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:DU.GREYSCALE_0_05}}},popupIndicator:{borderRadius:qU,border:`solid 1px ${DU.GREYSCALE_0_15}`,color:DU.GREYSCALE_0_60,marginRight:0,width:NU,height:NU},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${DU.GREYSCALE_0_15}`},clearIndicator:{borderRadius:qU,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:DU.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:OU}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:PU,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:DU.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:DU.GREYSCALE_25,fontSize:PU,fontFamily:WU.FONT_FAMILY,fontWeight:zU,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:DU.TEXT_PRIMARY},"&.Mui-error":{color:DU.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:DU.TEXT_SECONDARY,content:"'(optional)'",fontWeight:jU,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:DU.TEXT_SECONDARY,content:"'(required)'",fontWeight:jU,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:OU,lineHeight:"16px",backgroundColor:DU.WHITE,borderRadius:qU,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${DU.GREYSCALE_0_05}`,borderColor:DU.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${DU.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${DU.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${DU.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${DU.RED}`,boxShadow:`0px 0px 0px 1px ${DU.RED}, inset 0 2px 0 0 ${DU.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${DU.GREYSCALE_0_10}`,borderColor:DU.GREYSCALE_0_10,backgroundColor:DU.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:DU.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:DU.GREYSCALE_0_15,borderRadius:qU,boxShadow:`inset 0 2px 0 0 ${DU.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>Ws.jsx(VU,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:DU.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:DU.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:DU.GREYSCALE_0_03},"&:active":{backgroundColor:DU.GREYSCALE_0_10},"&:focus":{backgroundColor:DU.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${DU.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:DU.GREYSCALE_0_30,"&:hover":{backgroundColor:DU.GREYSCALE_0_0,borderColor:DU.GREYSCALE_0_15},"& ~svg":{color:DU.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${DU.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:qU}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${DU.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:DU.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:OU,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:PU,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:PU,fontWeight:zU,color:DU.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:zU}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${DU.GREYSCALE_0_15}, 0px 0px 0px 1px ${DU.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:Ws.jsx(ZU,{}),checkedIcon:Ws.jsx(QU,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:DU.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:DU.GREEN_PALE,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:DU.BLUE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:DU.GREYSCALE_0_20}},"&.Mui-disabled":{fill:DU.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:Ws.jsx(tY,{}),checkedIcon:Ws.jsx(XU,{}),indeterminateIcon:Ws.jsx(JU,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:qU,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:DU.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:DU.GREYSCALE_0_55,color:DU.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:DU.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:DU.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:DU.GREYSCALE_0_55,"&:hover":{color:DU.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:DU.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:DU.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:OU,color:DU.TEXT_PRIMARY,lineHeight:"16px",fontWeight:zU},secondary:{fontSize:PU,color:DU.GREYSCALE_45,fontWeight:jU,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:OU,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:OU,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:DU.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:PU,borderBottom:`solid 1px ${DU.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:OU,color:DU.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:DU.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:DU.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:DU.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:"url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%228px%22%20height%3D%227px%22%20viewBox%3D%220%200%208%207%22%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-labelledby%3D%22Tick%22%3E%20%20%3Cg%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cg%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M7.51662484%2C1.29325%20C7.12545778%2C0.90225%206.49218732%2C0.90225%206.10202068%2C1.29325%20L2.73658335%2C4.65725%20L1.90722914%2C3.82925%20C1.5170625%2C3.43825%200.883792042%2C3.43825%200.492624979%2C3.82925%20C0.102458344%2C4.21925%200.102458344%2C4.85225%200.492624979%2C5.24325%20L2.02928127%2C6.77825%20C2.4194479%2C7.16925%203.05271836%2C7.16925%203.44388542%2C6.77825%20L7.51662484%2C2.70725%20C7.9077919%2C2.31725%207.9077919%2C1.68425%207.51662484%2C1.29325%22%3E%3C%2Fpath%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E')",fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:DU.RED}}},"&.Mui-focusVisible":{backgroundColor:DU.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:DU.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:DU.GREEN,height:"24px","&.Mui-disabled":{color:DU.GREYSCALE_0_15}},rail:{backgroundColor:DU.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${DU.GREYSCALE_0_05}`,borderRadius:qU,boxShadow:`inset 0px 0px 0px 1px ${DU.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${DU.GREYSCALE_0_05}`,borderRadius:qU},thumb:{height:"16px",width:"16px",borderRadius:qU,backgroundColor:DU.WHITE,boxShadow:`0px 1px 2px 0px ${DU.GREYSCALE_0_15}, 0px 0px 0px 1px ${DU.GREYSCALE_0_05}`,"&:hover":{borderRadius:qU,boxShadow:`0 2px 4px 0 ${DU.GREYSCALE_0_30}, 0 0 0 1px ${DU.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${DU.GREYSCALE_0_15}, 0 0 0 1px ${DU.GREYSCALE_0_06}, 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${DU.GREYSCALE_0_15}, 0 0 0 1px ${DU.GREYSCALE_0_06}, 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:DU.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:DU.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:DU.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:DU.GREYSCALE_0_15},markLabel:{color:DU.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:DU.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:DU.WHITE,color:DU.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:DU.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:DU.GREEN_PALE,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:DU.BLUE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:DU.GREYSCALE_0_15,borderRadius:qU},thumb:{height:"16px",width:"16px",borderRadius:qU,backgroundColor:DU.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:OU,fontWeight:zU,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${DU.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`,backgroundColor:DU.GREYSCALE_0_03,borderRadius:qU},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:DU.GREYSCALE_25,"&.Mui-selected":{color:DU.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:OU,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:qU,"&:hover":{backgroundColor:DU.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${DU.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${DU.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:qU,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:DU.GREYSCALE_0_05},"&:hover":{backgroundColor:DU.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${DU.GREYSCALE_85}`,borderRight:`1px solid ${DU.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:zU,backgroundColor:DU.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:DU.GREYSCALE_98,borderBottom:`1px solid ${DU.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${DU.GREYSCALE_85}`,borderTop:`1px solid ${DU.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:DU.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:DU.GREYSCALE_0_05,"&:hover":{backgroundColor:DU.GREYSCALE_0_03}},"&&:hover":{backgroundColor:DU.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>Ws.jsx(eY,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${DU.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:OU,borderRadius:qU,padding:"7px 16px",border:`1px solid ${DU.GREYSCALE_0_15}`,backgroundColor:DU.GREYSCALE_100_60,color:DU.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:DU.GREYSCALE_0_10,border:`1px solid ${DU.GREYSCALE_0_30}`},"&:hover":{backgroundColor:DU.GREYSCALE_0_03,border:`1px solid ${DU.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:DU.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${DU.MISC_FOCUS_BORDER}`,border:`1px solid ${DU.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:DU.GREYSCALE_25,backgroundColor:DU.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:DU.GREYSCALE_0_10,border:`1px solid ${DU.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:PU,height:24,width:24,padding:7},sizeLarge:{fontSize:TU,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:OU,borderRadius:qU}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:DU.GREYSCALE_20},tooltip:{backgroundColor:DU.GREYSCALE_20,fontSize:PU,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}},...e?{...nY}:{}}))(t);const iY=e=>({mode:"light",primary:{ultraLight:DU.GREEN_ULTRA_LIGHT,light:DU.GREEN_PALE,main:DU.GREEN,dark:DU.GREEN_DARK,extraDark:DU.GREEN_EXTRA_DARK,contrastText:DU.WHITE},secondary:{ultraLight:DU.BLUE_ULTRA_LIGHT,light:DU.BLUE_PALE,main:DU.BLUE,dark:DU.BLUE_DARK,extraDark:DU.BLUE_EXTRA_DARK,contrastText:DU.WHITE},error:{ultraLight:DU.RED_ULTRA_LIGHT,light:DU.RED_PALE,main:DU.RED,dark:DU.RED_DARK,extraDark:DU.RED_EXTRA_DARK,contrastText:DU.WHITE},warning:{ultraLight:DU.ORANGE_ULTRA_LIGHT,light:DU.ORANGE_PALE,main:DU.ORANGE,dark:DU.ORANGE_DARK,extraDark:DU.ORANGE_EXTRA_DARK,contrastText:DU.WHITE},success:{ultraLight:DU.GREEN_ULTRA_LIGHT,light:DU.GREEN_PALE,main:DU.GREEN,dark:DU.GREEN_DARK,extraDark:DU.GREEN_EXTRA_DARK,contrastText:DU.WHITE},info:{ultraLight:DU.BLUE_ULTRA_LIGHT,light:DU.BLUE_PALE,main:DU.BLUE,dark:DU.BLUE_DARK,extraDark:DU.BLUE_EXTRA_DARK,contrastText:DU.WHITE},text:{primary:DU.TEXT_PRIMARY,secondary:DU.TEXT_SECONDARY,disabled:DU.GREYSCALE_0_30},action:{hover:DU.GREYSCALE_0_03,hoverOpacity:.03,selected:DU.GREYSCALE_0_05,selectedOpacity:.05,focus:DU.MISC_FOCUS_BORDER},amethyst:{ultraLight:DU.WHITE,main:DU.PURPLE,light:DU.PURPLE_PALE,dark:DU.PURPLE_DARK,extraDark:DU.GREYSCALE_0_0,contrastText:DU.WHITE},background:{paper:DU.WHITE,default:DU.GREYSCALE_95},divider:DU.GREYSCALE_0_15}),oY=(e="light",t=!1)=>((e,t=!1)=>({components:rY(0,t),palette:iY(),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:OU,fontWeightLight:FU,fontWeightRegular:jU,fontWeightMedium:zU,fontWeightBold:BU,htmlFontSize:OU,fontFamily:WU.FONT_FAMILY,button:{fontWeight:zU,fontSize:OU,textTransform:"none"},body1:{fontSize:TU,lineHeight:"24px"},body2:{fontSize:OU,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:NU,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:TU,fontWeight:zU,lineHeight:"16px"},h6:{fontSize:OU,fontWeight:zU,lineHeight:"16px"},caption:{color:DU.TEXT_SECONDARY},subtitle1:{fontSize:OU,color:DU.TEXT_SECONDARY},subtitle2:{fontSize:PU,color:DU.TEXT_SECONDARY}},shape:{borderRadius:qU}}))(0,t);const aY=(e,{selections:n,baseObjects:r,coreServices:i,nebulaObjects:o})=>{const a=function(e){var t;const n=oY();return null!=n&&null!==(t=n.components)&&void 0!==t&&null!==(t=t.MuiTable)&&void 0!==t&&t.styleOverrides&&(n.components.MuiTable.styleOverrides.root={}),hx({...n,direction:e})}("ltr");e.render(Ws.jsx(t.StrictMode,{children:Ws.jsx(Yx,{theme:a,children:Ws.jsx(iE,{...o,children:Ws.jsx(tE,{...r,children:Ws.jsx(IM,{selections:n,children:Ws.jsx(sE,{...i,children:Ws.jsx(UC,{children:Ws.jsx(LU,{})})})})})})})}))};var sY,lY,cY,uY;!function(e){e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider"}(sY||(sY={})),function(e){e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2"}(lY||(lY={})),function(e){e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value"}(cY||(cY={})),function(e){e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor"}(uY||(uY={}));const dY=e=>e?`${parseInt(e,10)}px`:void 0,pY=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?sg.Transparent:n}},hY=(e,t)=>+(parseInt(e,10)*ag*t+8).toFixed(2),fY=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?ig:"normal",mY=e=>null!=e&&e.some((e=>"italic"===e))?"italic":"normal",gY=e=>null!=e&&e.some((e=>"underline"===e))?"underline":"none",yY=document.createElement("textarea");function bY(e){yY.value=e,document.body.appendChild(yY),yY.select(),yY.setSelectionRange(0,yY.value.length),document.execCommand("copy"),document.body.removeChild(yY)}yY.style.position="absolute",yY.style.left="-9999px",yY.setAttribute("readonly","");function vY(e){null==C||C(((t,n)=>{const r=n.target,i=null==r?void 0:r.closest(`.${Ut}`);null!=i&&i.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:async()=>{(e=>{var t;const n=e.title;n&&(null!==(t=navigator.clipboard)&&void 0!==t&&t.writeText?navigator.clipboard.writeText(n).catch((()=>{bY(n)})):bY(n))})(i)}}),null==e||e.forEach((e=>{e(t,n,i)}))}))}const xY=({model:e,env:t,layoutService:n,effectivePropertiesService:r,translator:i})=>Rg(((o,a,s)=>{if(!e||r.qAlwaysFullyExpanded||!t.flags.isEnabled("CLIENT_IM_6273_EXPAND_OR_COLLAPSE_DIM"))return;const l=e,c=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group"}),{qDimName:u,label:d}=((e,t)=>{const n=((e,t)=>{const n=null==e?void 0:e.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qDimName:n.qGroupFieldDefs.at(n.qGroupPos),label:n.qFallbackTitle}:{qDimName:void 0,label:void 0}})(s,n);c.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(cE,0,0,!0),await e.expandLeft(cE,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(l)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qDimName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--plus",translation:i.get("SNPivotTable.ContextMenu.ExpandDimension",[null!=r?r:""]),tid:"expand-dimension",select:YA({model:e,qExpansionState:t.qExpansionState,qDimName:n,action:GA.Expand})}))({model:l,effectivePropertiesService:r,qDimName:u,label:d,translator:i})),c.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(cE,0,0,!0),await e.collapseLeft(cE,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(l)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qDimName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--minus",translation:i.get("SNPivotTable.ContextMenu.CollapseDimension",[null!=r?r:""]),tid:"collapse-dimension",select:YA({model:e,qExpansionState:t.qExpansionState,qDimName:n,action:GA.Collapse})}))({model:l,effectivePropertiesService:r,qDimName:u,label:d,translator:i}))}),[e,n,r]),wY=(e,t)=>b((()=>(({layout:e,flags:t})=>{var n,r,i,o;const{qHyperCube:a,nullValueRepresentation:s,snapshotData:l}=e,{qNoOfLeftDims:c,qEffectiveInterColumnSortOrder:u,qMeasureInfo:d,qDimensionInfo:p}=a,h=!!l,f=null!==(n=null==l||null===(r=l.content)||void 0===r?void 0:r.rowsPerPage)&&void 0!==n?n:15e3,m={x:Math.min(e.qHyperCube.qSize.qcx,og),y:Math.min(e.qHyperCube.qSize.qcy,f)},g=u.slice(0,c),y=e=>g.some((t=>t===e)),b=y(uE),v=new Map(u.map((e=>{var t;return[null!==(t=p[e])&&void 0!==t?t:uE,e]}))),x=d.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return{layout:e,getNullValueText:()=>{var e;return null!==(e=null==s?void 0:s.text)&&void 0!==e?e:"-"},getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(b)return 0;const n=e%x.length;return t?n:d.findIndex((e=>e===x[n]))},getDimensionInfo:e=>e===uE?uE:p[e],getDimensionInfoIndex:e=>{var t;return null!==(t=v.get(e))&&void 0!==t?t:-1},size:m,isSnapshot:h,hasLimitedData:!h&&m.x<e.qHyperCube.qSize.qcx,hasData:m.x>0&&m.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:b,leftDimensionInfoIndexes:g,isLeftDimension:y,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:x,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode)&&t.isEnabled("CLIENT_IM_5975_INDENT_MODE"),indentModeFeatures:{isLinksSupported:t.isEnabled("CLIENT_IM_5975_INDENT_MODE_LINKS")},indentModeColumnWidth:null!==(i=e.qHyperCube.indentModeColumnWidth)&&void 0!==i?i:{type:Jt.Auto,pixels:Xt.PixelsDefault,percentage:Xt.PercentageDefault},searchSortFromDimension:"inherit"===(null===(o=e.search)||void 0===o?void 0:o.sorting)}})({layout:e,flags:t})),[e,t]),SY=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:i})=>{const{layout:o,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=Ig(e);return t.current=e,t})(zC(i));return Ng((async()=>{var t;const{qHyperCube:i}=o,{maxNumberOfVisibleRows:c,maxNumberOfVisibleColumns:u}=l.current;var d,p;if(a)return null!==(d=null===(p=o.snapshotData)||void 0===p||null===(p=p.content)||void 0===p?void 0:p.qPivotDataPages)&&void 0!==d?d:[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,c,u)||((e,t,n,r)=>{var i,o;const{qHyperCube:{qPivotDataPages:a,qSize:s}}=e,{qTop:l,qWidth:c,qHeight:u}=null!==(i=null===(o=a[0])||void 0===o?void 0:o.qArea)&&void 0!==i?i:{qTop:0,qWidth:0,qHeight:0};return l<t.page*t.rowsPerPage||c<Math.min(r,s.qcx)||u<Math.min(n,s.qcy)})(o,r,c,u))){const t=((e,t,n,r,i,o)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(og,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-i)),n>l&&(c=Math.max(0,l-o))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,o),qHeight:Math.min(s-u,i)}})(s,n,o.qHyperCube.qSize,r,c,u);return t?e.getHyperCubePivotData(cE,BC(t)):[]}return null!==(t=i.qPivotDataPages)&&void 0!==t?t:[]}),[o,a,e,n,r.page,r.rowsPerPage,l,s])},EY=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),CY=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:EY({rowsPerPage:n,totalRowCount:e,page:t})}),_Y=15,MY=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:i})=>{var o;return _((async e=>{const o=e;if(!o.snapshotData||!r||o.snapshotData.content)return o;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-_Y,0),c=Math.max(s+i-_Y,s,0),u=og-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=zC(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,o+30),qHeight:Math.min(d,a+30)}})(t,i,n),u=BC(c),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};o.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(cE,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:i.page,rowsPerPage:i.rowsPerPage},o.snapshotData.object.size.w=n.width,o.snapshotData.object.size.h=n.height}return o})),M((()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,i)})),[t]),null!==(o=e.layout.snapshotData)&&void 0!==o&&o.content?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var kY={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const RY=()=>{const e=k(),t=e.language();return b((()=>{!function(e){if(e.get&&e.add){const t="SNPivotTable_LimitedData";if(e.get(t)!==t)return;Object.keys(kY).forEach((t=>{e.add(kY[t])}))}}(e)}),[e]),{translator:e,language:t}},AY=e=>{const{flags:t}=e,n=R(),r=(e=>{const t=b((()=>zg(e)),[e]);return S((()=>()=>{t.unmount()}),[t]),t})(n),i=A(),o=I(),a=L(),s=D(),l=P(),c=O(),u=Lg(),d=((e,t)=>{const[n]=Ng((async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}}),[e,t]),r=b((()=>{var e,t;const r=void 0!==(null==n?void 0:n.qHyperCubeDef.qSortbyYValue)&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),i=null!==(e=null==n?void 0:n.qHyperCubeDef.qDimensions.map((e=>e.qDef.qSortCriterias)))&&void 0!==e?e:[];return{qAlwaysFullyExpanded:null!==(t=null==n?void 0:n.qHyperCubeDef.qAlwaysFullyExpanded)&&void 0!==t&&t,qExpansionState:null==n?void 0:n.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:r,getSortCriteriaForDimension:e=>i[e]}}),[n]);return r})(o,i),p=wY(i,t),h=T(),f=Tg(i,n),{translator:m,language:g}=RY(),{pageInfo:y,updatePageInfo:v}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,i=t.isDownloadedAsPDForImage||e.isSnapshot,o=(e=>{var t;return null===(t=e.layout.snapshotData)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.rowsPerPage})(e),[a,s]=w((()=>{const a=((e,t)=>{var n,r,i,o;return t.isDownloadedAsPDForImage?null!==(n=null===(r=t.viewState)||void 0===r?void 0:r.renderPage)&&void 0!==n?n:0:e.isSnapshot&&null!==(i=null===(o=e.layout.snapshotData)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.page)&&void 0!==i?i:0})(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!i,...CY(r.qcy,a,o)}})),l=e.layout.qHyperCube.qSize.qcy;return S((()=>{s((t=>({...t,...CY(l,t.page,o),shouldShowPagination:l>e.size.y&&!i})))}),[l,e.size.y,s,i,o]),S((()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=EY({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}}),[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:EY({...a,...e})})}}})(p,u),x=((e,t,n)=>b((()=>((e,t)=>{var n,r,i,o,a,s,l,c;if(e.isDownloadedAsPDForImage){var u,d,p,h;const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:null!==(u=null==t?void 0:t.scrollTop)&&void 0!==u?u:0,scrollLeft:null!==(d=null==t?void 0:t.scrollLeft)&&void 0!==d?d:0,leftGridScrollLeft:null!==(p=null==t?void 0:t.leftGridScrollLeft)&&void 0!==p?p:0,topGridScrollTop:null!==(h=null==t?void 0:t.topGridScrollTop)&&void 0!==h?h:0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:null!==(n=null==t||null===(r=t.content)||void 0===r?void 0:r.scrollTop)&&void 0!==n?n:0,scrollLeft:null!==(i=null==t||null===(o=t.content)||void 0===o?void 0:o.scrollLeft)&&void 0!==i?i:0,leftGridScrollLeft:null!==(a=null==t||null===(s=t.content)||void 0===s?void 0:s.leftGridScrollLeft)&&void 0!==a?a:0,topGridScrollTop:null!==(l=null==t||null===(c=t.content)||void 0===c?void 0:c.topGridScrollTop)&&void 0!==l?l:0}})(n,t.snapshotData)),[n,e.page,t.snapshotData]))(y,i,u),E=MY({rect:N(),layoutService:p,viewService:x,model:o,pageInfo:y}),[C,_]=SY({model:o,layoutService:p,viewService:x,pageInfo:y,rect:E}),M=b((()=>((e,t,n)=>{var r,i,o,a,s,l,c,u,d,p,h,f,m,g,y,b,v,x,w,S,E,C,_,M,k,R,A,I,L,D,P,O,T,N,q,F,j,z,B,W,$,H,G,V,U,Y,K;const X=null===(r=t.layout.components)||void 0===r?void 0:r.find((e=>"theme"===e.key)),J=null==X?void 0:X.header,Z=null==X?void 0:X.dimensionValues,Q=null==X?void 0:X.measureValues,ee=null==X?void 0:X.measureLabels,te=null==X?void 0:X.totalValues,ne=null==X?void 0:X.nullValues,re=null==X?void 0:X.grid,ie=(t,n,r)=>e.getStyle(t,n,r),oe=+(null!==(i=null!==(o=null==re?void 0:re[sY.LineClamp])&&void 0!==o?o:ie(lY.Grid,cY.Grid,uY.LineClamp))&&void 0!==i?i:1),ae=n.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")?+(null!==(a=null!==(s=null==re?void 0:re[sY.ColumnLineClamp])&&void 0!==s?s:ie(lY.Grid,cY.Grid,uY.ColumnLineClamp))&&void 0!==a?a:1):1,se=null!==(l=null!==(c=pY(e,null==J?void 0:J[sY.Background]))&&void 0!==c?c:ie(lY.Dimension,cY.LabelName,uY.BackgroundColor))&&void 0!==l?l:sg.Transparent,le={header:{fontSize:null!==(u=null!==(d=dY(null==J?void 0:J[sY.FontSize]))&&void 0!==d?d:ie(lY.Dimension,cY.LabelName,uY.FontSize))&&void 0!==u?u:ng,fontFamily:null!==(p=null!==(h=null==J?void 0:J[sY.FontFamily])&&void 0!==h?h:ie(lY.Dimension,cY.LabelName,uY.FontFamily))&&void 0!==p?p:rg,fontWeight:fY(null==J?void 0:J[sY.FontStyle],ig),fontStyle:mY(null==J?void 0:J[sY.FontStyle]),textDecoration:gY(null==J?void 0:J[sY.FontStyle]),color:null!==(f=null!==(m=pY(e,null==J?void 0:J[sY.FontColor]))&&void 0!==m?m:ie(lY.Dimension,cY.LabelName,uY.FontColor))&&void 0!==f?f:hf.TEXT,background:se,hoverBackground:Hm(se,Zt),activeBackground:Hm(se,Qt)},dimensionValues:{fontSize:null!==(g=null!==(y=dY(null==Z?void 0:Z[sY.FontSize]))&&void 0!==y?y:ie(lY.Dimension,cY.LabelValue,uY.FontSize))&&void 0!==g?g:ng,fontFamily:null!==(b=null!==(v=null==Z?void 0:Z[sY.FontFamily])&&void 0!==v?v:ie(lY.Dimension,cY.LabelValue,uY.FontFamily))&&void 0!==b?b:rg,fontWeight:fY(null==Z?void 0:Z[sY.FontStyle],void 0),fontStyle:mY(null==Z?void 0:Z[sY.FontStyle]),textDecoration:gY(null==Z?void 0:Z[sY.FontStyle]),color:null!==(x=null!==(w=pY(e,null==Z?void 0:Z[sY.FontColor]))&&void 0!==w?w:ie(lY.Dimension,cY.LabelValue,uY.FontColor))&&void 0!==x?x:hf.TEXT,background:null!==(S=null!==(E=pY(e,null==Z?void 0:Z[sY.Background]))&&void 0!==E?E:ie(lY.Dimension,cY.LabelValue,uY.BackgroundColor))&&void 0!==S?S:sg.Transparent},measureValues:{fontSize:null!==(C=null!==(_=dY(null==Q?void 0:Q[sY.FontSize]))&&void 0!==_?_:ie(lY.Measure,cY.LabelValue,uY.FontSize))&&void 0!==C?C:ng,fontFamily:null!==(M=null!==(k=null==Q?void 0:Q[sY.FontFamily])&&void 0!==k?k:ie(lY.Measure,cY.LabelValue,uY.FontFamily))&&void 0!==M?M:rg,fontWeight:fY(null==Q?void 0:Q[sY.FontStyle],"normal"),fontStyle:mY(null==Q?void 0:Q[sY.FontStyle]),textDecoration:gY(null==Q?void 0:Q[sY.FontStyle]),color:null!==(R=null!==(A=pY(e,null==Q?void 0:Q[sY.FontColor]))&&void 0!==A?A:ie(lY.Measure,cY.LabelValue,uY.FontColor))&&void 0!==R?R:sg.FontSecondary,background:null!==(I=null!==(L=pY(e,null==Q?void 0:Q[sY.Background]))&&void 0!==L?L:ie(lY.Measure,cY.LabelValue,uY.BackgroundColor))&&void 0!==I?I:sg.Transparent},measureLabels:{fontWeight:fY(null==ee?void 0:ee[sY.FontStyle],"normal"),fontStyle:mY(null==ee?void 0:ee[sY.FontStyle]),textDecoration:gY(null==ee?void 0:ee[sY.FontStyle]),color:null!==(D=null!==(P=pY(e,null==ee?void 0:ee[sY.FontColor]))&&void 0!==P?P:ie(lY.Measure,cY.LabelName,uY.FontColor))&&void 0!==D?D:sg.FontSecondary,background:null!==(O=null!==(T=pY(e,null==ee?void 0:ee[sY.Background]))&&void 0!==T?T:ie(lY.Measure,cY.LabelName,uY.BackgroundColor))&&void 0!==O?O:sg.Transparent},totalValues:{fontWeight:fY(null==te?void 0:te[sY.FontStyle],ig),fontStyle:mY(null==te?void 0:te[sY.FontStyle]),textDecoration:gY(null==te?void 0:te[sY.FontStyle]),color:null!==(N=null!==(q=pY(e,null==te?void 0:te[sY.FontColor]))&&void 0!==q?q:ie(lY.Total,cY.LabelValue,uY.FontColor))&&void 0!==N?N:hf.TEXT,background:null!==(F=null!==(j=pY(e,null==te?void 0:te[sY.Background]))&&void 0!==j?j:ie(lY.Total,cY.LabelValue,uY.BackgroundColor))&&void 0!==F?F:sg.Transparent},nullValues:{fontWeight:fY(null==ne?void 0:ne[sY.FontStyle],"normal"),fontStyle:mY(null==ne?void 0:ne[sY.FontStyle]),textDecoration:gY(null==ne?void 0:ne[sY.FontStyle]),color:null!==(z=null!==(B=pY(e,null==ne?void 0:ne[sY.FontColor]))&&void 0!==B?B:ie(lY.Null,cY.LabelValue,uY.FontColor))&&void 0!==z?z:hf.TEXT,background:null!==(W=null!==($=pY(e,null==ne?void 0:ne[sY.Background]))&&void 0!==$?$:ie(lY.Null,cY.LabelValue,uY.BackgroundColor))&&void 0!==W?W:sg.NullValueBackground},grid:{columnLineClamp:ae,lineClamp:oe,border:null!==(H=null!==(G=pY(e,null==re?void 0:re[sY.Border]))&&void 0!==G?G:ie(lY.Grid,cY.Grid,uY.BorderColor))&&void 0!==H?H:sg.DividerLight,divider:null!==(V=null!==(U=pY(e,null==re?void 0:re[sY.Divider]))&&void 0!==U?U:ie(lY.Grid,cY.Divider,uY.BorderColor))&&void 0!==V?V:sg.DividerDark,background:null!==(Y=null!==(K=pY(e,null==re?void 0:re[sY.Background]))&&void 0!==K?K:ie(lY.Grid,cY.Grid,uY.BackgroundColor))&&void 0!==Y?Y:sg.Transparent},selectedColors:$m(e)};return le.headerCellHeight=Math.max(hY(le.header.fontSize,ae),hY(le.dimensionValues.fontSize,ae),32),le.contentCellHeight=Math.max(hY(le.measureValues.fontSize,oe),hY(le.dimensionValues.fontSize,oe),24),le.dimensionValueTextHeight=hY(le.dimensionValues.fontSize,1),le})(f,p,t)),[f,p,t]),k=((e,t,n)=>{const[,r,i]=Ng((async()=>{var t;const r=Of(n.flags),i=e.getStyle("","","fontFamily"),o=e.getStyle("object","label.name","fontFamily"),a=e.getStyle("object","label.value","fontFamily"),s=null!==(t=e.getStyle("","","fontFamilies"))&&void 0!==t?t:[];return Promise.all([...r,...s,i,o,a,Wg].filter((e=>void 0!==e)).map((async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)})))}),[t,e,n]);return i?(console.warn("Failed to load fonts:",i),!0):!r})(f,i,e);vY([xY({model:o,env:e,layoutService:p,effectivePropertiesService:d,translator:m})]),S((()=>{!_&&o&&!!C&&k&&aY(r,{selections:h,baseObjects:{rect:E,pageInfo:y,qPivotDataPages:C,updatePageInfo:v},nebulaObjects:{env:e,app:a,model:o,embed:s,theme:f,keyboard:l,translator:m,interactions:c},coreServices:{styleService:M,viewService:x,layoutService:p,downloadService:u,effectivePropertiesService:d}})}),[o,a,E,c,h,x,p,u,_,C,M,r,k,m,g,y,v,d,s,l,f,e])},IY={version:"4.1.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]};function LY(e){return{qae:{properties:{initial:{...IY,qHyperCubeDef:{...IY.qHyperCubeDef,qIndentMode:!1}}},data:Et(e)},ext:Mg(e),component(){AY(e)}}}export{LY as default};
176
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(h,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}}));function vL(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const xL={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},wL=/%\)?$/,SL=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,EL=/^\(oct\)/i,CL=/^\(dec\)/i,_L=/^\(hex\)/i,ML=/^\(bin\)/i,kL=/^\(rom\)/i,RL=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,AL=/#|0/g;function IL(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function LL(e,t,n){let r;return SL.test(t)?e=IL(e,Number(/\d{2}/.exec(t)[0]),t,n):EL.test(t)?e=IL(e,8,t,n):CL.test(t)?e=IL(e,10,t,n):_L.test(t)?e=IL(e,16,t,n):ML.test(t)?e=IL(e,2,t,n):kL.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function DL(e,t,n){const r=vL(e);return n?r:new RegExp(r||"",t)}function PL(e,t,n,r){let i,o,a,s,l,c,u,d,p,h=e.pattern;var f,m;r&&(e.abbreviate=!0),f=t,(m=n)&&(m=vL(m)),f&&(f=vL(f)),p=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(p),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(DL(c,"g"),t)),u=n,n=".",u&&(a=a.replace(DL(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(AL)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=wL.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(DL(t,null,!0),"|").concat(DL(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class OL{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return xL;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new OL(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],RL.test(e[0])&&(r.positive.isFunctional=!0),e[1]?RL.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?RL.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||PL(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&PL(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&PL(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",p="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=LL(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=bL(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=bL(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===o?u.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+p+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function TL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function NL(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new OL(...t)}(i,e,t,n,r),a=TL(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const qL="D",FL="T",jL="TS",zL="IV",BL=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],WL=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$L=["January","February","March","April","May","June","July","August","September","October","November","December"],HL=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function GL(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function VL(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function UL(e,t){let n,r=function(e){const t=e,n=24*VL(t),r=60*VL(n),i=60*VL(r),o=1e3*VL(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class YL{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:BL,qDayNames:WL,qLongMonthNames:$L,qMonthNames:HL}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[FL]:r.qTimeFmt||"hh:mm:ss",[qL]:r.qDateFmt||"YYYY-MM-DD",[jL]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new YL(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=UL(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:GL("".concat(t.year).slice(-2),2),YYY:GL("".concat(t.year).slice(-3),3),def:e=>GL("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:GL("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:GL("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>GL("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>GL("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>GL("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>GL("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function KL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new YL(...t)}function XL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=KL(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=TL(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==zL?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=KL(i,e,t),r=TL(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function JL(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return XL(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),NL(n,r,i,o,t)}(t,i),p="dimension"===s?"first":(e,t)=>d(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:p,formatter:()=>d,tags:()=>t.qTags};return h}function ZL(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:JL(TI({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=ZL("qAttrDimInfo",t,n,a,TI({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=ZL("qAttrExprInfo",t,n,a,TI({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=ZL("qMeasureInfo",t,n,a,TI({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function QL(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=QL.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=yL,a.hierarchy=gL,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=jI,a.pages=i.qDataPages,a.hierarchy=gL):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...ZL("qDimensionInfo",i,e,"",TI({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...ZL("qMeasureInfo",i,e,"",TI({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),i=JL(MI({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),s}const eD=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],tD=/\/qDimensionInfo(?:\/(\d+))?/,nD=/\/qMeasureInfo\/(\d+)/,rD=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,iD=/\/qAttrExprInfo\/(\d+)/,oD=/\/?qHyperCube/,aD=/\/?qTreeData/,sD=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),lD=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function cD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;oD.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=sD):aD.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=lD);let s=!0;if(tD.test(e)&&(r=+tD.exec(e)[1]),nD.test(e)&&(i=+nD.exec(e)[1]),rD.test(e)){i=-1,r=0;const e=+rD.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(iD.test(e)){const e=i;if(t){i=0;const a=nL(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+iD.exec(n)[1]}else r>-1?(r=-1,i=+iD.exec(n)[1]):i+=+iD.exec(n)[1]+1}return eD.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function uD(e){QL.util=e.data("matrix").util,e.data("q",QL),e.formatter("q-number",NL),e.formatter("q-time",XL)}uD.qBrushHelper=cD,uD.selections=cD;var dD=Object.prototype.hasOwnProperty,pD=Object.prototype.toString,hD=Object.defineProperty,fD=Object.getOwnPropertyDescriptor,mD=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===pD.call(e)},gD=function(e){if(!e||"[object Object]"!==pD.call(e))return!1;var t,n=dD.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&dD.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||dD.call(e,t)},yD=function(e,t){hD&&"__proto__"===t.name?hD(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},bD=function(e,t){if("__proto__"===t){if(!dD.call(e,t))return;if(fD)return fD(e,t).value}return e[t]},vD=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=bD(s,n),s!==(i=bD(t,n))&&(u&&i&&(gD(i)||(o=mD(i)))?(o?(o=!1,a=r&&mD(r)?r:[]):a=r&&gD(r)?r:{},yD(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&yD(s,{name:n,newValue:i}));return s},xD="2.3.0";function wD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ED(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SD(Object(n),!0).forEach((function(t){wD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CD(e){return!!e.changedTouches}function _D(e){return"number"==typeof e&&!isNaN(e)}function MD(e){return"number"!=typeof e||isNaN(e)}function kD(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function RD(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function AD(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function ID(e){const[t,n,r,i]=kD(e);return{x:t,y:n,width:r-t,height:i-n}}function LD(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function DD(e){const{x:t,y:n,width:r,height:i,x1:o,x2:a,y1:s,y2:l,cx:c,cy:u,r:d,vertices:p}=e||{};return _D(c)&&_D(u)&&_D(d)?"circle":_D(o)&&_D(a)&&_D(s)&&_D(l)?"line":_D(t)&&_D(n)&&_D(r)&&_D(i)?"rect":_D(t)&&_D(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function PD(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var OD=Math.PI,TD=2*OD,ND=1e-6,qD=TD-ND;function FD(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function jD(){return new FD}function zD(e){return function(){return e}}FD.prototype=jD.prototype={constructor:FD,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>ND)if(Math.abs(u*s-l*c)>ND&&i){var p=n-o,h=r-a,f=s*s+l*l,m=p*p+h*h,g=Math.sqrt(f),y=Math.sqrt(d),b=i*Math.tan((OD-Math.acos((f+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>ND&&(this._+="L"+(e+v*c)+","+(t+v*u)),this._+="A"+i+","+i+",0,0,"+ +(u*p>c*h)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>ND||Math.abs(this._y1-c)>ND)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%TD+TD),d>qD?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>ND&&(this._+="A"+n+","+n+",0,"+ +(d>=OD)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var BD=Math.abs,WD=Math.atan2,$D=Math.cos,HD=Math.max,GD=Math.min,VD=Math.sin,UD=Math.sqrt,YD=1e-12,KD=Math.PI,XD=KD/2,JD=2*KD;function ZD(e){return e>=1?XD:e<=-1?-XD:Math.asin(e)}function QD(e){return e.innerRadius}function eP(e){return e.outerRadius}function tP(e){return e.startAngle}function nP(e){return e.endAngle}function rP(e){return e&&e.padAngle}function iP(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/UD(s*s+l*l),u=c*l,d=-c*s,p=e+u,h=t+d,f=n+u,m=r+d,g=(p+f)/2,y=(h+m)/2,b=f-p,v=m-h,x=b*b+v*v,w=i-o,S=p*m-f*h,E=(v<0?-1:1)*UD(HD(0,w*w*x-S*S)),C=(S*v-b*E)/x,_=(-S*b-v*E)/x,M=(S*v+b*E)/x,k=(-S*b+v*E)/x,R=C-g,A=_-y,I=M-g,L=k-y;return R*R+A*A>I*I+L*L&&(C=M,_=k),{cx:C,cy:_,x01:-u,y01:-d,x11:C*(i/w-1),y11:_*(i/w-1)}}function oP(){var e=QD,t=eP,n=zD(0),r=null,i=tP,o=nP,a=rP,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),p=i.apply(this,arguments)-XD,h=o.apply(this,arguments)-XD,f=BD(h-p),m=h>p;if(s||(s=l=jD()),d<u&&(c=d,d=u,u=c),d>YD)if(f>JD-YD)s.moveTo(d*$D(p),d*VD(p)),s.arc(0,0,d,p,h,!m),u>YD&&(s.moveTo(u*$D(h),u*VD(h)),s.arc(0,0,u,h,p,m));else{var g,y,b=p,v=h,x=p,w=h,S=f,E=f,C=a.apply(this,arguments)/2,_=C>YD&&(r?+r.apply(this,arguments):UD(u*u+d*d)),M=GD(BD(d-u)/2,+n.apply(this,arguments)),k=M,R=M;if(_>YD){var A=ZD(_/u*VD(C)),I=ZD(_/d*VD(C));(S-=2*A)>YD?(x+=A*=m?1:-1,w-=A):(S=0,x=w=(p+h)/2),(E-=2*I)>YD?(b+=I*=m?1:-1,v-=I):(E=0,b=v=(p+h)/2)}var L=d*$D(b),D=d*VD(b),P=u*$D(w),O=u*VD(w);if(M>YD){var T,N=d*$D(v),q=d*VD(v),F=u*$D(x),j=u*VD(x);if(f<KD&&(T=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,p=d*l-u*c;if(!(p*p<YD))return[e+(p=(u*(t-o)-d*(e-i))/p)*l,t+p*c]}(L,D,F,j,N,q,P,O))){var z=L-T[0],B=D-T[1],W=N-T[0],$=q-T[1],H=1/VD(function(e){return e>1?0:e<-1?KD:Math.acos(e)}((z*W+B*$)/(UD(z*z+B*B)*UD(W*W+$*$)))/2),G=UD(T[0]*T[0]+T[1]*T[1]);k=GD(M,(u-G)/(H-1)),R=GD(M,(d-G)/(H+1))}}E>YD?R>YD?(g=iP(F,j,L,D,d,R,m),y=iP(N,q,P,O,d,R,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),R<M?s.arc(g.cx,g.cy,R,WD(g.y01,g.x01),WD(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,WD(g.y01,g.x01),WD(g.y11,g.x11),!m),s.arc(0,0,d,WD(g.cy+g.y11,g.cx+g.x11),WD(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,R,WD(y.y11,y.x11),WD(y.y01,y.x01),!m))):(s.moveTo(L,D),s.arc(0,0,d,b,v,!m)):s.moveTo(L,D),u>YD&&S>YD?k>YD?(g=iP(P,O,N,q,u,-k,m),y=iP(L,D,F,j,u,-k,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),k<M?s.arc(g.cx,g.cy,k,WD(g.y01,g.x01),WD(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,k,WD(g.y01,g.x01),WD(g.y11,g.x11),!m),s.arc(0,0,u,WD(g.cy+g.y11,g.cx+g.x11),WD(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,k,WD(y.y11,y.x11),WD(y.y01,y.x01),!m))):s.arc(0,0,u,w,x,m):s.lineTo(P,O)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-KD/2;return[$D(r)*n,VD(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:zD(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:zD(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:zD(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:zD(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:zD(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:zD(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:zD(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function aP(e){this._context=e}function sP(e){return new aP(e)}function lP(e){return e[0]}function cP(e){return e[1]}function uP(){var e=lP,t=null,n=zD(0),r=cP,i=zD(!0),o=null,a=sP,s=null;function l(l){var c,u,d,p,h,f=l.length,m=!1,g=new Array(f),y=new Array(f);for(null==o&&(s=a(h=jD())),c=0;c<=f;++c){if(!(c<f&&i(p=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(p,c,l),y[c]=+n(p,c,l),s.point(t?+t(p,c,l):g[c],r?+r(p,c,l):y[c]))}if(h)return s=null,h+""||null}function c(){return function(){var e=lP,t=cP,n=zD(!0),r=null,i=sP,o=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(o=i(c=jD())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,s,a),+t(l,s,a));if(c)return o=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:zD(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:zD(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:zD(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}().defined(i).curve(a).context(o)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:zD(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:zD(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:zD(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:zD(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:zD(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:zD(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:zD(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}function dP(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function pP(e){return e}aP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var hP=Array.prototype.slice;function fP(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function mP(e){this._context=e}function gP(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function yP(e,t){this._context=e,this._k=(1-t)/6}mP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fP(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fP(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},yP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gP(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:gP(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var bP=function e(t){function n(e){return new yP(e,t)}return n.tension=function(t){return e(+t)},n}(0);function vP(e,t){this._context=e,this._alpha=t}vP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>YD){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>YD){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var xP=function e(t){function n(e){return t?new vP(e,t):new yP(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function wP(e){return e<0?-1:1}function SP(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(wP(o)+wP(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function EP(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function CP(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function _P(e){this._context=e}function MP(e){this._context=new kP(e)}function kP(e){this._context=e}function RP(e){this._context=e}function AP(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function IP(e,t){this._context=e,this._t=t}function LP(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function DP(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function PP(e,t){return e[t]}function OP(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function TP(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function NP(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map((e=>i[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function qP(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function FP(e){return(e=qP(Math.abs(e)))?e[1]:NaN}_P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:CP(this,this._t0,EP(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,CP(this,EP(this,n=SP(this,e,t)),n);break;default:CP(this,this._t0,n=SP(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(MP.prototype=Object.create(_P.prototype)).point=function(e,t){_P.prototype.point.call(this,t,e)},kP.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},RP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=AP(e),i=AP(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},IP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var jP,zP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function BP(e){if(!(t=zP.exec(e)))throw new Error("invalid format: "+e);var t;return new WP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function WP(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function $P(e,t){var n=qP(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}BP.prototype=WP.prototype,WP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var HP={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>$P(100*e,t),r:$P,s:function(e,t){var n=qP(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(jP=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+qP(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function GP(e){return e}var VP,UP,YP,KP=Array.prototype.map,XP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function JP(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?GP:(t=KP.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?GP:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(KP.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=BP(e)).fill,n=e.align,d=e.sign,p=e.symbol,h=e.zero,f=e.width,m=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(m=!0,b="g"):HP[b]||(void 0===g&&(g=12),y=!0,b="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var v="$"===p?i:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===p?o:/[%p]/.test(b)?l:"",w=HP[b],S=/[defgprs%]/.test(b);function E(e){var i,o,l,p=v,E=x;if("c"===b)E=w(e)+E,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:c:"-"===d||"("===d?"":d)+p,E=("s"===b?XP[8+jP/3]:"")+E+(C&&"("===d?")":""),S)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){E=(46===l?a+e.slice(i+1):e.slice(i))+E,e=e.slice(0,i);break}}m&&!h&&(e=r(e,1/0));var _=p.length+e.length+E.length,M=_<f?new Array(f-_+1).join(t):"";switch(m&&h&&(e=r(M+e,M.length?f-E.length:1/0),M=""),n){case"<":e=p+e+E+M;break;case"=":e=p+M+e+E;break;case"^":e=M.slice(0,_=M.length>>1)+p+e+E+M.slice(_);break;default:e=M+p+e+E}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return e+""},E}return{format:d,formatPrefix:function(e,t){var n=d(((e=BP(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(FP(t)/3))),i=Math.pow(10,-r),o=XP[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){VP=JP(e),UP=VP.format,YP=VP.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const ZP=new Date,QP=new Date;function eO(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>eO((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(ZP.setTime(+t),QP.setTime(+r),e(ZP),e(QP),Math.floor(n(ZP,QP))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const tO=6e4,nO=864e5,rO=6048e5,iO=eO((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*tO)/nO),(e=>e.getDate()-1));iO.range;const oO=eO((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/nO),(e=>e.getUTCDate()-1));oO.range;const aO=eO((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/nO),(e=>Math.floor(e/nO)));function sO(e){return eO((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*tO)/rO))}aO.range;const lO=sO(0),cO=sO(1),uO=sO(2),dO=sO(3),pO=sO(4),hO=sO(5),fO=sO(6);function mO(e){return eO((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/rO))}lO.range,cO.range,uO.range,dO.range,pO.range,hO.range,fO.range;const gO=mO(0),yO=mO(1),bO=mO(2),vO=mO(3),xO=mO(4),wO=mO(5),SO=mO(6);gO.range,yO.range,bO.range,vO.range,xO.range,wO.range,SO.range;const EO=eO((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));EO.every=e=>isFinite(e=Math.floor(e))&&e>0?eO((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,EO.range;const CO=eO((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function _O(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function MO(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function kO(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=_O,n=(t,n)=>_O(e(t),n),r=(t,n)=>e(t)-n):(t=e===_O||e===MO?e:RO,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function RO(){return 0}CO.every=e=>isFinite(e=Math.floor(e))&&e>0?eO((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,CO.range;const AO=kO(_O).right;kO((function(e){return null===e?NaN:+e})).center;var IO=AO;class LO extends Map{constructor(e,t=PO){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(DO(this,e))}has(e){return super.has(DO(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function DO({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function PO(e){return null!==e&&"object"==typeof e?e.valueOf():e}const OO=Math.sqrt(50),TO=Math.sqrt(10),NO=Math.sqrt(2);function qO(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=OO?10:o>=TO?5:o>=NO?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?qO(e,t,2*n):[s,l,c]}function FO(e,t,n){return qO(e=+e,t=+t,n=+n)[2]}function jO(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function zO(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function BO(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function WO(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=KO(i),u=XO(i),d=KO(o),p=XO(o),h=KO(a),f=XO(a),m=KO(s),g=XO(s),y=KO(l),b=XO(l),v={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:yT,e:yT,f:ST,g:PT,G:TT,H:bT,I:vT,j:xT,L:wT,m:ET,M:CT,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:iN,s:oN,S:_T,u:MT,U:kT,V:AT,w:IT,W:LT,x:null,X:null,y:DT,Y:OT,Z:NT,"%":rN},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:qT,e:qT,f:WT,g:QT,G:tN,H:FT,I:jT,j:zT,L:BT,m:$T,M:HT,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:iN,s:oN,S:GT,u:VT,U:UT,V:KT,w:XT,W:JT,x:null,X:null,y:ZT,Y:eN,Z:nN,"%":rN},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:sT,e:sT,f:hT,g:rT,G:nT,H:cT,I:cT,j:lT,L:pT,m:aT,M:uT,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:oT,Q:mT,s:gT,S:dT,u:ZO,U:QO,V:eT,w:JO,W:tT,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:rT,Y:nT,Z:iT,"%":fT};function S(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=$O[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function E(e,t){return function(n){var r,i,o=BO(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=zO(BO(o.y,0,1))).getUTCDay(),r=i>4||0===i?yO.ceil(r):yO(r),r=oO.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=jO(BO(o.y,0,1))).getDay(),r=i>4||0===i?cO.ceil(r):cO(r),r=iO.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?zO(BO(o.y,0,1)).getUTCDay():jO(BO(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,zO(o)):jO(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in $O?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e+="",!0);return t.toString=function(){return e},t}}}var $O={"-":"",_:" ",0:"0"},HO=/^\s*\d+/,GO=/^%/,VO=/[\\^$*+?|[\]().{}]/g;function UO(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function YO(e){return e.replace(VO,"\\$&")}function KO(e){return new RegExp("^(?:"+e.map(YO).join("|")+")","i")}function XO(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function JO(e,t,n){var r=HO.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ZO(e,t,n){var r=HO.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function QO(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function eT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function nT(e,t,n){var r=HO.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function rT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function iT(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function oT(e,t,n){var r=HO.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function aT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function sT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function lT(e,t,n){var r=HO.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function cT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function uT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function dT(e,t,n){var r=HO.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function pT(e,t,n){var r=HO.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function hT(e,t,n){var r=HO.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fT(e,t,n){var r=GO.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function mT(e,t,n){var r=HO.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function gT(e,t,n){var r=HO.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function yT(e,t){return UO(e.getDate(),t,2)}function bT(e,t){return UO(e.getHours(),t,2)}function vT(e,t){return UO(e.getHours()%12||12,t,2)}function xT(e,t){return UO(1+iO.count(EO(e),e),t,3)}function wT(e,t){return UO(e.getMilliseconds(),t,3)}function ST(e,t){return wT(e,t)+"000"}function ET(e,t){return UO(e.getMonth()+1,t,2)}function CT(e,t){return UO(e.getMinutes(),t,2)}function _T(e,t){return UO(e.getSeconds(),t,2)}function MT(e){var t=e.getDay();return 0===t?7:t}function kT(e,t){return UO(lO.count(EO(e)-1,e),t,2)}function RT(e){var t=e.getDay();return t>=4||0===t?pO(e):pO.ceil(e)}function AT(e,t){return e=RT(e),UO(pO.count(EO(e),e)+(4===EO(e).getDay()),t,2)}function IT(e){return e.getDay()}function LT(e,t){return UO(cO.count(EO(e)-1,e),t,2)}function DT(e,t){return UO(e.getFullYear()%100,t,2)}function PT(e,t){return UO((e=RT(e)).getFullYear()%100,t,2)}function OT(e,t){return UO(e.getFullYear()%1e4,t,4)}function TT(e,t){var n=e.getDay();return UO((e=n>=4||0===n?pO(e):pO.ceil(e)).getFullYear()%1e4,t,4)}function NT(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+UO(t/60|0,"0",2)+UO(t%60,"0",2)}function qT(e,t){return UO(e.getUTCDate(),t,2)}function FT(e,t){return UO(e.getUTCHours(),t,2)}function jT(e,t){return UO(e.getUTCHours()%12||12,t,2)}function zT(e,t){return UO(1+oO.count(CO(e),e),t,3)}function BT(e,t){return UO(e.getUTCMilliseconds(),t,3)}function WT(e,t){return BT(e,t)+"000"}function $T(e,t){return UO(e.getUTCMonth()+1,t,2)}function HT(e,t){return UO(e.getUTCMinutes(),t,2)}function GT(e,t){return UO(e.getUTCSeconds(),t,2)}function VT(e){var t=e.getUTCDay();return 0===t?7:t}function UT(e,t){return UO(gO.count(CO(e)-1,e),t,2)}function YT(e){var t=e.getUTCDay();return t>=4||0===t?xO(e):xO.ceil(e)}function KT(e,t){return e=YT(e),UO(xO.count(CO(e),e)+(4===CO(e).getUTCDay()),t,2)}function XT(e){return e.getUTCDay()}function JT(e,t){return UO(yO.count(CO(e)-1,e),t,2)}function ZT(e,t){return UO(e.getUTCFullYear()%100,t,2)}function QT(e,t){return UO((e=YT(e)).getUTCFullYear()%100,t,2)}function eN(e,t){return UO(e.getUTCFullYear()%1e4,t,4)}function tN(e,t){var n=e.getUTCDay();return UO((e=n>=4||0===n?xO(e):xO.ceil(e)).getUTCFullYear()%1e4,t,4)}function nN(){return"+0000"}function rN(){return"%"}function iN(e){return+e}function oN(e){return Math.floor(+e/1e3)}const aN=NP();aN("d3-number",(function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=JP(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o})),aN("d3-time",(function(e){let t=WO({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=WO(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const sN={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return aN(t.type||"d3-number")(t.format||"")})(e)};function lN(e){let{id:t=sN.id,key:n=sN.key,min:r=sN.min,max:i=sN.max,type:o=sN.type,tags:a=sN.tags,title:s=sN.title,values:l=sN.values,value:c=sN.value,label:u=sN.label,formatter:d=sN.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>o(e),min:()=>r(e),max:()=>i(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:c,label:u}}const cN=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),uN=e=>e.reduce(((e,t)=>e+t),0),dN={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=cN(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=cN(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=cN(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=cN(e),n=t.length;return n?uN(t)/n:NaN}};function pN(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>pN(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=dN[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?dN[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=dN[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?dN[l.field.reduceLabel]:l.field.reduceLabel))})),i}function hN(e,t){const{main:n}=pN(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:pN(e,t,e.props||{},n),main:n}}function fN(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function mN(e,t){let{main:n,propsArr:r,props:i}=t,o=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=i[e].field?i[e].field.formatter():e=>e})),o.push(...e.map((e=>{const t=fN(e.items,n,a);return r.forEach((n=>{t[n]=fN(e.items,i[n],s[n],n)})),t}))),o}function gN(e){let{cfg:t,itemData:n,obj:r,target:i,tracker:o,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=o[s];l||(l=o[s]={items:[],id:s},i.push(l)),l.items.push(r)}function yN(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function bN(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const vN={diverging:function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},none:LP,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}LP(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}LP(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,p=(d-(u[a-1][1]||0))/2,h=0;h<s;++h){var f=e[t[h]];p+=(f[a][1]||0)-(f[a-1][1]||0)}l+=d,c+=p*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,LP(e,t)}}},xN={ascending:function(e){var t=e.map(TP);return DP(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(TP),o=function(e){var t=e.map(OP);return DP(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:DP,reverse:function(e){return DP(e).reverse()}};function wN(e,t,n){const r={},i=t.stackKey,o=t.value,a=t.startProp||"start",s=t.endProp||"end",l=t.offset||"none",c=t.order||"none",u=t.valueRef||"";let d=0,p={};for(let t=0;t<e.items.length;t++){let n=e.items[t],o=u?n[u]:null;if(o&&o.source){let e="".concat(o.source.key||"","/").concat(o.source.field);p[e]||(p[e]=o.source)}let a=i(n);r[a]=r[a]||{items:[]},r[a].items.push(n),d=Math.max(d,r[a].items.length)}const h=Array.apply(null,{length:d}).map(Number.call,Number),f=Object.keys(r).map((e=>r[e].items)),m=function(){var e=zD([]),t=DP,n=LP,r=PP;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,c=s.length,u=new Array(c);for(o=0;o<c;++o){for(var d,p=s[o],h=u[o]=new Array(l),f=0;f<l;++f)h[f]=d=[0,+r(i[f],p,f,i)],d.data=i[f];h.key=p}for(o=0,a=t(u);o<c;++o)u[a[o]].index=o;return n(u,a),u}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:zD(hP.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:zD(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?DP:"function"==typeof e?e:zD(hP.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?LP:e,i):n},i}().keys(h).value(((e,t)=>e[t]?o(e[t]):0)).order(xN[c]).offset(vN[l]);let g=m(f),y=[];for(let e=0;e<g.length;e++){let t=g[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[a]={value:n[0]},r[s]={value:n[1]},y.push(n[0],n[1]))}}let b=Object.keys(p).map((e=>{let t=n(p[e].key);return t?t.field(p[e].field):null})).filter((e=>!!e));const v=lN({title:b.map((e=>e.title())).join(", "),min:bN(y),max:yN(y),type:"measure",formatter:b[0]?b[0].formatter:void 0});e.fields.push(v)}function SN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=ED({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.items.map((e=>({value:o(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))})),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map((t=>({value:o(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&wN(n,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function EN(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:SN;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function CN(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const _N=Symbol("implicit");function MN(){var e=new LO,t=[],n=[],r=_N;function i(i){let o=e.get(i);if(void 0===o){if(r!==_N)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new LO;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return MN(t,n).unknown(r)},CN.apply(i,arguments),i}function kN(){var e,t,n=MN().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,p=d?a:o,h=d?o:a;e=(h-p)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),p+=(h-p-e*(n-l))*u,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var f=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map((function(t){return p+e*t}));return i(d?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return kN(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},CN.apply(d(),arguments)}function RN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function AN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function IN(){}var LN=.7,DN=1/LN,PN="\\s*([+-]?\\d+)\\s*",ON="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",TN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NN=/^#([0-9a-f]{3,8})$/,qN=new RegExp(`^rgb\\(${PN},${PN},${PN}\\)$`),FN=new RegExp(`^rgb\\(${TN},${TN},${TN}\\)$`),jN=new RegExp(`^rgba\\(${PN},${PN},${PN},${ON}\\)$`),zN=new RegExp(`^rgba\\(${TN},${TN},${TN},${ON}\\)$`),BN=new RegExp(`^hsl\\(${ON},${TN},${TN}\\)$`),WN=new RegExp(`^hsla\\(${ON},${TN},${TN},${ON}\\)$`),$N={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function HN(){return this.rgb().formatHex()}function GN(){return this.rgb().formatRgb()}function VN(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=NN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?UN(t):3===n?new XN(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?YN(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?YN(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qN.exec(e))?new XN(t[1],t[2],t[3],1):(t=FN.exec(e))?new XN(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=jN.exec(e))?YN(t[1],t[2],t[3],t[4]):(t=zN.exec(e))?YN(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=BN.exec(e))?nq(t[1],t[2]/100,t[3]/100,1):(t=WN.exec(e))?nq(t[1],t[2]/100,t[3]/100,t[4]):$N.hasOwnProperty(e)?UN($N[e]):"transparent"===e?new XN(NaN,NaN,NaN,0):null}function UN(e){return new XN(e>>16&255,e>>8&255,255&e,1)}function YN(e,t,n,r){return r<=0&&(e=t=n=NaN),new XN(e,t,n,r)}function KN(e,t,n,r){return 1===arguments.length?function(e){return e instanceof IN||(e=VN(e)),e?new XN((e=e.rgb()).r,e.g,e.b,e.opacity):new XN}(e):new XN(e,t,n,null==r?1:r)}function XN(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function JN(){return`#${tq(this.r)}${tq(this.g)}${tq(this.b)}`}function ZN(){const e=QN(this.opacity);return`${1===e?"rgb(":"rgba("}${eq(this.r)}, ${eq(this.g)}, ${eq(this.b)}${1===e?")":`, ${e})`}`}function QN(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eq(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tq(e){return((e=eq(e))<16?"0":"")+e.toString(16)}function nq(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new iq(e,t,n,r)}function rq(e){if(e instanceof iq)return new iq(e.h,e.s,e.l,e.opacity);if(e instanceof IN||(e=VN(e)),!e)return new iq;if(e instanceof iq)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new iq(a,s,l,e.opacity)}function iq(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function oq(e){return(e=(e||0)%360)<0?e+360:e}function aq(e){return Math.max(0,Math.min(1,e||0))}function sq(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}RN(IN,VN,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:HN,formatHex:HN,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return rq(this).formatHsl()},formatRgb:GN,toString:GN}),RN(XN,KN,AN(IN,{brighter(e){return e=null==e?DN:Math.pow(DN,e),new XN(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?LN:Math.pow(LN,e),new XN(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new XN(eq(this.r),eq(this.g),eq(this.b),QN(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JN,formatHex:JN,formatHex8:function(){return`#${tq(this.r)}${tq(this.g)}${tq(this.b)}${tq(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ZN,toString:ZN})),RN(iq,(function(e,t,n,r){return 1===arguments.length?rq(e):new iq(e,t,n,null==r?1:r)}),AN(IN,{brighter(e){return e=null==e?DN:Math.pow(DN,e),new iq(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?LN:Math.pow(LN,e),new iq(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new XN(sq(e>=240?e-240:e+120,i,r),sq(e,i,r),sq(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new iq(oq(this.h),aq(this.s),aq(this.l),QN(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=QN(this.opacity);return`${1===e?"hsl(":"hsla("}${oq(this.h)}, ${100*aq(this.s)}%, ${100*aq(this.l)}%${1===e?")":`, ${e})`}`}}));var lq=e=>()=>e;function cq(e){return 1==(e=+e)?uq:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):lq(isNaN(t)?n:t)}}function uq(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):lq(isNaN(e)?t:e)}var dq=function e(t){var n=cq(t);function r(e,t){var r=n((e=KN(e)).r,(t=KN(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=uq(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function pq(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function hq(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=xq(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function fq(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function mq(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function gq(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=xq(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var yq=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bq=new RegExp(yq.source,"g");function vq(e,t){var n,r,i,o=yq.lastIndex=bq.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=yq.exec(e))&&(r=bq.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:mq(n,r)})),o=bq.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function xq(e,t){var n,r=typeof t;return null==t||"boolean"===r?lq(t):("number"===r?mq:"string"===r?(n=VN(t))?(t=n,dq):vq:t instanceof VN?dq:t instanceof Date?fq:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?pq:Array.isArray(t)?hq:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?gq:mq)(e,t)}function wq(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Sq(e){return+e}var Eq=[0,1];function Cq(e){return e}function _q(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Mq(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=_q(i,r),o=n(a,o)):(r=_q(r,i),o=n(o,a)),function(e){return o(r(e))}}function kq(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=_q(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=IO(e,t,1,r)-1;return o[n](i[n](t))}}function Rq(){var e,t,n,r,i,o,a=Eq,s=Eq,l=xq,c=Cq;function u(){var e=Math.min(a.length,s.length);return c!==Cq&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?kq:Mq,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),mq)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,Sq),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=wq,u()},d.clamp=function(e){return arguments.length?(c=!!e||Cq,u()):c!==Cq},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Aq(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?FO(t,e,n):FO(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=BP(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(FP(t)/3)))-FP(Math.abs(e)))}(o,a))||(r.precision=i),YP(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,FP(t)-FP(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-FP(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return UP(r)}function Iq(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?qO(t,e,n):qO(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Aq(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=FO(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Lq(){var e=Rq()(Cq,Cq);return e.copy=function(){return t=e,Lq().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},CN.apply(e,arguments),Iq(e)}function Dq(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[IO(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return Dq().domain(t).range(n).unknown(e)},CN.apply(i,arguments)}function Pq(e){return void 0===e?e=>e:t=>e(t)}function Oq(e){return Math.max(0,Math.min(1,e))}function Tq(e){return"object"==typeof e}function Nq(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function qq(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...Nq(t,o,a)),o-=a-o,a=e[i],r.push(...Nq(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...Nq(t,o,a))):r.push(...Nq(t,o,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function Fq(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=MD(i)||MD(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const c=r>0?qq(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(Pq(o));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:u[t],value:e,isMinor:-1===l.indexOf(e)}}))}function jq(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=MD(i)||MD(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const c=n.ticks(s),u=r>0?qq(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(Pq(o));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===c.indexOf(e)}}))}function zq(e){let t,{settings:n,scale:r,distance:i,formatter:o=e=>e}=e;const a=n.minorTicks&&!MD(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!MD(e.value):!MD(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(Tq(e)?e.value:e)-(Tq(t)?t.value:t))).filter(((e,t,r)=>{const i=Tq(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=Tq(e),i=t?e.value:e,o=n(i);return{position:o,value:i,label:t&&void 0!==e.label?e.label:r(i),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?Oq(n(e.start)):o,end:t&&!isNaN(e.end)?Oq(n(e.end)):o}}))}({values:e,scale:r.copy(),formatter:o})}else if(MD(n.ticks.count)){t=(n.ticks.tight?jq:Fq)({distance:i,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:o}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,o)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:i}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:o})}return t}function Bq(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]})),r}const Wq={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},$q={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},Hq={count:NaN};function Gq(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function Vq(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Lq(),i={instance:null,invert:!1},o={data:t,resources:n},a=Bq(e,Wq,o);let s;function l(e){return MD(e)?NaN:r(e)}a.ticks=Bq(e.ticks,$q,o),a.minorTicks=Bq(e.minorTicks,Hq,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=vD(!0,{},a,e.settings),e.scale=l,s=zq(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=Vq(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return Gq(i,l),i.instance(e)},l.normInvert=function(e){return Gq(i,l),i.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]);return l.domain([c,u]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const Uq={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function Yq(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=Bq(e,Uq,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}}))}(t,n.trackBy)}}const c=kN();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=vD({datum:i[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const Kq={depth:0};function Xq(e,t,n){return e.ancestors().map((e=>t(vD({datum:e.data},n)))).reverse().slice(1).toString()}const Jq=e=>e.min(),Zq=e=>e.max();function Qq(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(Jq).filter(_D);i=e.length?Math.min(...e):i}if(!r){const e=t.map(Zq).filter(_D);o=e.length?Math.max(...e):o}}return[i,o]}const eF={domain:[],range:[],invert:!1,min:NaN,max:NaN};function tF(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Vq(e,t,n).clamp(!0).interpolate(dq),i=Bq(e,eF,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;vD(!0,s,r);const[l,c]=Qq(i,t?t.fields:[]),u=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],p=a?i.range:d;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),l,c)),s}const nF={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function rF(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const iF={domain:[],range:[]};const oF={domain:[],range:[],unknown:void 0},aF={domain:[],range:[],override:!1};const sF=NP();function lF(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const i=SN(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}sF("linear",Vq),sF("band",Yq),sF("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=Bq(t,Uq,i);o.ticks=Bq(t.ticks,Kq,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=Yq(o);const{values:s,labels:l,items:c,ticks:u}=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter((e=>{if(e.depth>0){const t=Xq(e,i,n),d=e.leaves()||[e],p=i(vD({datum:e.data},n)),h=o(vD({datum:e.data},n)),f=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:h,leftEdge:Xq(d[0],i,n),rightEdge:Xq(d[Math.max(d.length-1,0)],i,n),node:e};f?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(h)),(r<=0&&!f||e.depth===r)&&c.push(m),l[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),d=function(e){const t=String(e),n=c[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};vD(!0,d,a),d.bandwidth=function(e){const t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=c[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=c[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>u.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const p=a.pxScale;return d.pxScale=function(e){return a=p(e),d},d.domain(s),d})),sF("sequential-color",tF),sF("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Dq(),i=Bq(e,nF,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return MD(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=Qq(i,l),d=o?i.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[];let h=a?i.range:p,f=[];return f=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=Lq().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(h,c,u):[c+(u-c)/2],h.length>f.length+1?f=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(h,c,u):h.length<f.length+1&&(h=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=tF().domain([n,r]).range(t);return[n,...rF(e),r].map((e=>i(e)))}(f,h,c,u)),s.data=()=>t,s.range(i.invert?h.slice().reverse():h),s.domain(f),s})),sF("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=MN(),i={data:t,resources:n},o=Bq(e,iF,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=vD({datum:l[e]},i),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(u),r}(e,t,n),i=n.theme,o=Bq(e,oF,{data:t,resources:n});let a;if(o.explicit=Bq(e.explicit,aF,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var cF={};function uF(){uF.init.call(this)}cF.isObject=function(e){return"object"==typeof e&&null!==e},cF.isNumber=function(e){return"number"==typeof e},cF.isUndefined=function(e){return void 0===e},cF.isFunction=function(e){return"function"==typeof e};var dF=uF;uF.EventEmitter=uF,uF.prototype._events=void 0,uF.prototype._maxListeners=void 0,uF.defaultMaxListeners=10,uF.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},uF.prototype.setMaxListeners=function(e){if(!cF.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},uF.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],cF.isUndefined(n))return!1;if(cF.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(cF.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},uF.prototype.addListener=function(e,t){var n;if(!cF.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,cF.isFunction(t.listener)?t.listener:t),this._events[e]?cF.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,cF.isObject(this._events[e])&&!this._events[e].warned)&&((n=cF.isUndefined(this._maxListeners)?uF.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,cF.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),cF.isFunction(console.trace)&&console.trace()));return this},uF.prototype.on=uF.prototype.addListener,uF.prototype.once=function(e,t){if(!cF.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},uF.prototype.removeListener=function(e,t){var n,r,i,o;if(!cF.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||cF.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(cF.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},uF.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],cF.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},uF.prototype.listeners=function(e){return this._events&&this._events[e]?cF.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},uF.listenerCount=function(e,t){return e._events&&e._events[t]?cF.isFunction(e._events[t])?1:e._events[t].length:0};var pF={mixin:e=>(Object.keys(dF.prototype).forEach((t=>{e[t]=dF.prototype[t]})),dF.init(e),e)};function hF(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;({min:e=e,max:t=t}=o),void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return pF.mixin(i),i}function fF(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||hF();return o.update({min:n,max:r,viewSize:i}),o}function mF(e,t){return e<=t}function gF(e,t){return e<t}function yF(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function bF(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:i=!0}=n;e=r?mF:gF,t=i?mF:gF},i.add=e=>{let{min:t,max:n}=e;const i=yF(r,t),o=yF(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let{min:t,max:n}=e;const i=yF(r,t),o=yF(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let{min:t,max:n}=e;const i=yF(r,t,!0),o=yF(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function vF(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const xF={key:void 0,includeMin:!0,includeMax:!0};function wF(e){let{items:t,collection:n,vc:r}=e;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function SF(e){let{items:t,collection:n}=e;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function EF(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function CF(e){let{key:t,collection:n,obj:r,fn:i,value:o}=e;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function _F(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function MF(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?vD({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function kF(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function RF(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function AF(e,t,n){let{ranges:r,interceptors:i,rc:o,aliases:a,rangeConfig:s}=n;const l=MF(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}})),c}function IF(){let{vc:e=vF,rc:t=bF}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},i={},o={},a={sources:{},default:vD({},xF)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(i).forEach((t=>{e.values[t]=i[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},c={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:vD({},xF)},e.ranges.forEach((e=>{const t={};Object.keys(xF).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:xF[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{i[n]&&e.values[n].join(";")===i[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(i).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,r={},i={};for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},i={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(i).map((e=>({type:"value",id:e,brush:i[e]})))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const r=MF(s.addValues,t,o),a=wF({vc:e,collection:i,items:r});u.emit("add-values",r),a.length&&(n||(n=!0,u.emit("start")),u.emit("update",a,[]),c.updateValues())}};return u.setValues=t=>{const r=MF(s.setValues,t,o),a=function(e){let{items:t,vCollection:n,vc:r}=e;const i={},o=EF(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||CF({key:a,value:e,collection:n,obj:i,fn:r})},p=Object.keys(o);for(let e=0,t=p.length;e<t;e++)a=p[e],o[a].forEach(d);return l=_F(c,i),s=_F(i,c),[s,l]}({items:r,vCollection:i,vc:e});u.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=MF(s.removeValues,e,o),n=SF({collection:i,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=MF(s.addValues,t,o),l=MF(s.removeValues,r,o),d=wF({vc:e,collection:i,items:a}),p=SF({collection:i,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||p.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,p),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=MF(s.toggleValues,t,o),a=function(e){let{items:t,values:n,vc:r}=e;const i={},o={},a=[],s=[],l=EF(t);let c,u,d;const p=Object.keys(l);for(let e=0,t=p.length;e<t;e++){c=p[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):CF({key:c,value:u,collection:n,obj:i,fn:r})}const h=Object.keys(i);for(let e=0,t=h.length;e<t;e++)c=h[e],a.push({id:c,values:i[c]});const f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)c=f[e],s.push({id:c,values:o[c]});return[a,s]}({items:r,values:i,vc:e});u.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=o[e]||e;return!!i[n]&&i[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{AF(e,"add",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{AF(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{AF(e,"set",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{AF(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsValue(t)},u.containsRange=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,c,u,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)c=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],a[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in o&&(u=o[u]),d=c.value,r[u]?a[t].bool=Array.isArray(d)?r[u].containsRange({min:d[0],max:d[1]}):r[u].containsValue(d):i[u]&&i[u].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},u.intercept=(e,t)=>{const n=kF(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=kF(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=kF(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:RF(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>u.removeInterceptor(e.name,t)))}))},u.addKeyAlias=(e,t)=>{o[e]=t},u.removeKeyAlias=e=>{delete o[e]},pF.mixin(u),u}function LF(e){return e*e*e}function DF(e){return--e*e*e+1}function PF(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}NP();const OF=["stroke","fill","color","backgroundColor","thumbColor"];function TF(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=NF(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function NF(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?mq:"string"===r?(i=VN(t))&&OF.includes(n)?(t=i,dq):vq:t instanceof VN?dq:t instanceof Date?fq:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?pq:Array.isArray(t)?TF:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?qF:mq)(e,t)}function qF(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=NF(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function FF(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const jF={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},zF=/^\$/;function BF(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function WF(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function $F(e,t){return e.pxScale?e.pxScale(t):e}const HF={normalizeSettings:function(e,t,n){const r=vD({},e),i=vD({},t);return Object.keys(r).forEach((e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(BF(o)){let n=t[e];"string"==typeof n&&zF.test(n)&&(n=jF[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&zF.test(n)?i[e]=jF[n]:i[e]=n})),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,p=u&&o in s,h=d?s[c.ref]:p?s[o]:a;BF(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&h?(r[o]=c.scale(h.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&h?r[o]=h.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:WF};function GF(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...GF(t.children)),e):(e.push(t),e)),[])}function VF(e,t){let{context:n,data:r,style:i,filter:o,mode:a}=t;const s=e.chart.brush(n),l=r,c=i.active||{},u=i.inactive||{},d=[];Object.keys(c).forEach((e=>{d.push(e)})),Object.keys(u).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const p=[];let h=!1;const f=()=>{let t=GF(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=()=>{const e=f(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,i,a),o=p.indexOf(e[r]);let l=!1;t&&-1===o?(p.push(e[r]),l=!0):t||-1===o||(p.splice(o,1),l=!0),e[r].needToUpdate=l||h,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=vD({},e[i],e[i].__style),n=e[i].isActive;d.forEach((r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,p):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,p):u[r]:e[i].__style[r]})),r=!0}delete e[i].needToUpdate}return h=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=f(),i=r.length;for(let e=0;e<i;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in u&&(r[e][t]="function"==typeof u[t]?u[t].call(null,r[e]):u[t])})));h=!0,p.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=f(),i=r.length;for(let e=0;e<i;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);p.length=0,n||e.renderer.render(e.nodes)},b=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{p.length=0,h=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",b)}}}function UF(e){let{nodes:t,action:n,chart:r,trigger:i}=e;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:i}=e;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}i.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:o,action:n,chart:r,trigger:i})}function YF(e){let{collisions:t,t:n,config:r,action:i}=e,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map((e=>e.node));return UF({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function KF(e,t,n){const r=n.element().getBoundingClientRect();let i=CD(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&CD(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!CD(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function XF(e,t,n){return e?"function"==typeof e?e(t):e:n}const JF={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function ZF(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function QF(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function ej(e){return-e/180*Math.PI}function tj(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(ej(e))}function nj(e,t){return{x:e.x+t.x,y:e.y+t.y}}function rj(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ij(e,t){return{x:e.x*t,y:e.y*t}}function oj(e,t){return e.x-t.x}function aj(e,t){return e.y-t.y}function sj(e,t){return oj(e,t)**2+aj(e,t)**2}function lj(e,t){return Math.sqrt(sj(e,t))}function cj(e,t){return e.x*t.x+e.y*t.y}function uj(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=rj(e,n);return nj({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const dj={up:0,down:180,left:90,right:-90};function pj(e){let{x:t,y:n,size:r}=e;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const hj=NP();hj.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),hj.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:ZF([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),hj.add("saltire",(function(e){const t=ej(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=QF(e.x,e.y,o,i).map((e=>uj(e,t,s)));return{type:"path",fill:"black",d:ZF(l)}})),hj.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),hj.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=dj[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=ej(r);return s=s.map((e=>uj(e,l,n))),{type:"path",fill:"black",d:ZF(s)}})),hj.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:pj(e)}})),hj.add("star",(function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=ej(i),c=ej(i+s/2),u=Math.sin(l),d=Math.cos(l),p=Math.sin(c),h=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+h*o,y:e.y+p*o})}return{type:"path",fill:"black",d:ZF(n)}})),hj.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=ej(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:ZF(t)}})),hj.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:ZF(QF(t,n,e.size,o))}})),hj.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=ej(90);o=o.map((n=>uj(n,e,t)))}const a=ID(o);return a.type="rect",a.fill="black",a})),hj.add("rect",(function(e){const{x:t,y:n,size:r}=e,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}}));const fj=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hj;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==JF[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function mj(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:i=0,preferredSize:o=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:i}=e;return"function"==typeof o?o({inner:n,outer:r,children:i,dock:this.dock()},t):o},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(i=e,this):"function"==typeof i?i(t):i},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function gj(e,t,n){const{require:r=[]}=t,i=t.mediator||{},{settings:o,formatter:a,scale:s,data:l,renderer:c,chart:u,dockConfig:d,mediator:p,instance:h,rect:f,style:m,registries:g,resolver:y,update:b,_DO_NOT_USE_getInfo:v,symbol:x,isVisible:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:o}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),f&&Object.defineProperty(e,"rect",{get:f}),v&&(e._DO_NOT_USE_getInfo=v),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:h}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(i).forEach((t=>{e.mediator.on(t,i[t].bind(e))}))}function yj(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function bj(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function vj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:i,container:o,mediator:a,registries:s,theme:l,renderer:c}=t,u=pF.mixin({});let d,p,h,f,m,g=t.settings||{},y=vD(!0,{},n,g),b=[],v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:HF,n={};return{resolve:function(r){let{data:i,settings:o,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(o,a,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const u=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:c};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:c};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],u.push(o)}}return{settings:n.norm,items:u}}}}({chart:i}),x=!1;const w={nodes:[],chart:i,config:y.brush||{},renderer:null},S={tap:[],over:[]},E=[],C={},_=vD({},g);function M(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(C,...l):r&&(a=e[t])),o&&("function"==typeof g[t]?a=g[t].call(_,...l):r&&(a=g[t])),i||o||(a=n.call(C,...l)),a}}const k=M("preferredSize",(()=>0),!0),R=M("resize",(e=>{let{inner:t}=e;return t})),A=M("created"),I=M("beforeMount"),L=M("mounted"),D=M("beforeUnmount"),P=M("beforeUpdate"),O=M("updated"),T=M("beforeRender"),N=M("beforeDestroy"),q=M("destroyed"),F=e.render,j=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&E.push(VF(w,e))}))},z=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?S.over.push(e):S.tap.push(e)}))};Object.defineProperty(w,"data",{get:()=>b});const B=y.renderer||e.renderer,W=B?c||s.renderer(B)():c||s.renderer()();"function"==typeof W.settings&&W.settings(y.rendererSettings),w.renderer=W;const $={resources:i.logger?{logger:i.logger()}:{}};let H=mj(yj(y,k,i.logger()),$);const G=e=>{e.key=y.key,e.element=W.element()},V=()=>{};V.dockConfig=()=>H,V.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=vD(!0,{},n,e.settings),H=mj(yj(y,k,i.logger()),$),w.config=y.brush||{}),y.scale&&(d=i.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=SN(y.data,{dataset:i.dataset,collection:i.dataCollection},{logger:i.logger()},i.dataCollection);t?t.isFirst?(b=n,b.items&&(b.items=[...n.items])):b.items&&(b.items=[...b.items,...n.items||[]]):b=n}else b=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?p=i.formatter(y.formatter):d&&d.data().fields&&(p=d.data().fields[0].formatter()),m=l.style(y.style||{})},V.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=R({inner:e,outer:t});f=n?W.size(n):W.size(e),_.rect=vD(!0,{computedPhysical:f.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),f=vD(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},f)},V.getRect=()=>_.rect;const U=()=>{const e=W.renderArgs?W.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=b;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return b.items&&r&&(n=ED(ED({},b),{},{items:b.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function J(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?w.nodes=[...e||[]]:w.nodes&&(w.nodes=[...w.nodes,...e||[]]):w.nodes=e}V.beforeMount=I,V.beforeRender=()=>{T({size:f})},V.render=()=>{const e=F.call(C,...U());J(e),W.render(e),Y=e,K=_.rect.computed},V.hide=()=>{V.unmount(),W.size({x:0,y:0,width:0,height:0}),W.clear()},V.beforeUpdate=()=>{P({settings:y,data:b})},V.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return W.render(),void(Y=null);const r=F.call(C,...U());J(r),E.forEach((e=>e.cleanUp())),E.length=0,S.tap=[],S.over=[],t&&(j(),z()),E.forEach((e=>{e.isActive()&&e.update()})),Y&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:Y,currentRect:_.rect.computed,previousRect:K}),X=function(e,t,n,r){let i,{old:o,current:a}=e,{renderer:s}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],h=null;const f=n.trackBy||FF,m={start(){let e={};if(o.forEach(((t,n)=>{let r=f(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=f(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),i=r.map((e=>e.data.major.value)),o=n.filter((e=>i.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>o.includes(e.data.major.value))),s=r.filter((e=>o.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(qF(vD({},e[r],{points:n.old}),vD({},t,{points:n.current}))),l.push(vD({},e[r],{commonPoints:n.old}))}else d.ips.push(qF(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(qF(vD({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(qF(e[t],vD({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:LF,duration:200,tweens:u.ips,nodes:[...l]}),p.push({name:"updating",easing:PF,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:DF,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,{isInit:o,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===o?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===i)}p.length&&(h=s.getScene(a),p[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=p[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,n=[],o=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));if(n.push(...o),n.push(...e.nodes),s.render(n),t>=1){p.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");p.length?"updating"===p[0].name&&t&&p.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}i&&(i=window.requestAnimationFrame(m.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return h}};return m}({old:Y,current:r},{renderer:W},n,i.storage),X.start()):W.render(r),Y=r,K=_.rect.computed,W.setKey&&"string"==typeof g.key&&W.setKey(g.key)},V.updated=O,V.destroy=()=>{V.unmount(),N(h),W.destroy(),q(),h=null};const Z=e=>{w.nodes=e,E.forEach((e=>{e.isActive()&&e.update()})),W.render(e)};return gj(C,e,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>W,chart:()=>i,dockConfig:()=>H,mediator:()=>a,instance:()=>_,rect:()=>_.rect,style:()=>m,update:()=>Z,registries:()=>s,resolver:()=>v,symbol:()=>fj(s.symbol)}),gj(_,g,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>W,chart:()=>i,dockConfig:()=>H,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(C),isVisible:()=>x}),V.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const o=i.brush(e),a=W.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let i=0;i<a.length;i++){const s=a[i];s.data&&o.containsMappedData(s.data,n||e.data,t)&&(G(s),r.push(s),a.splice(i,1),i--)}}))}return r},V.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:W).findShapes(e);for(let e=0,t=n.length;e<t;e++)G(n[e]);return n},V.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=W.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)G(r[e]);return r},V.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];UF({nodes:e,action:t.action||"toggle",trigger:t,chart:i,data:w.data})},V.mount=()=>{h=W.element&&W.element()?h:W.appendTo(o),W.setKey&&"string"==typeof g.key&&W.setKey(g.key),y.brush&&(j(),z()),bj(_,u,g),bj(C,u,e),x=!0},V.mounted=()=>L(h),V.unmount=()=>{[_,C].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,u)})),S.tap=[],S.over=[],E.forEach((e=>{e.cleanUp()})),E.length=0,D(),x=!1},V.onBrushTap=e=>{S.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return YF({collisions:KF(t,n,r.renderer),t:n,config:r,action:XF(n.action,t,"toggle")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},V.onBrushOver=e=>{S.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return YF({collisions:KF(t,n,r.renderer),t:n,config:r,action:XF(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},V.def=C,V.ctx=_,V.renderer=()=>W,V.set({settings:g}),A(),V}function xj(e){const t=vD(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function wj(e,t,n){const r=nj(function(e,t){const n=cj(e,t)/cj(t,t)||1;return{x:t.x*n,y:t.y*n}}(rj(n,e),rj(t,e)),e);return r}function Sj(e,t,n){return lj(e,n)+lj(t,n)-lj(e,t)<1e-12}function Ej(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function Cj(e){return e.x1===e.x2&&e.y1===e.y2}function _j(e){return e.width<=0||e.height<=0}function Mj(e){return e.r<=0}function kj(e){return e.edges.length<=2}function Rj(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=Tj(e,LD(t.edges[r])),!0===n)return!0;return!1}function Aj(e,t){let n=!1;const{numPolygons:r,polygons:i}=t;for(let t=0;t<r;t++){if(n=Hj(e,i[t]),!0===n)return!0}return!1}function Ij(e,t){if(Mj(e))return!1;return sj({x:e.cx,y:e.cy},t)<=e.r**2}function Lj(e,t){if(_j(t)||Mj(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function Dj(e,t){if(Mj(e)||Cj(t))return!1;const[n,r]=RD(t);if(Ij(e,n)||Ij(e,r))return!0;const i={x:e.cx,y:e.cy},o=wj(n,r,i);return sj(o,i)<=e.r**2&&Sj(n,r,o)}function Pj(e,t){if(kj(t)||Mj(e))return!1;if(Oj(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(Dj(e,LD(t.edges[r])))return!0}return!1}function Oj(e,t){if(kj(e)||!jj(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function Tj(e,t){if(kj(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(Bj(t,LD(e.edges[n])))return!0}const[n,r]=RD(t);return Oj(e,n)||Oj(e,r)}function Nj(e,t){if(kj(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(zj(t,LD(e.edges[n])))return!0}const[n,r,i,o]=AD(t);return Oj(e,n)||Oj(e,r)||Oj(e,i)||Oj(e,o)}function qj(e,t){return!_j(e)&&!_j(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function Fj(e,t){if(_j(e)||_j(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>jj(e,t)))}function jj(e,t){return!_j(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function zj(e,t){if(Cj(t)||_j(e))return!1;const[n,r]=RD(t);if(jj(e,n)||jj(e,r))return!0;const i=AD(e);let o=i.length;for(let e=0;e<o;e++){if(Bj(LD([i[e],i[3!==e?e+1:0]]),t))return!0}return!1}function Bj(e,t){const[n,r]=RD(e),[i,o]=RD(t),a=oj(r,n),s=aj(r,n),l=oj(o,i),c=aj(o,i),u=oj(n,i),d=aj(n,i);let p=c*a-l*s;const h=l*d-c*u,f=a*d-s*u;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===c)return!1;if(0===p){if(0===h&&0===f){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=aj(i,n)/s,g=aj(o,n)/s}else m=(i.x-n.x)/a,g=(o.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=h/p;return p=f/p,y>=0&&y<=1&&p>=0&&p<=1}function Wj(e,t){if(Cj(e))return!1;const[n,r]=RD(e);return Sj(n,r,t)}function $j(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!qj(n,r)&&(Fj(n,r)?Rj(e,t):Rj(t,e))}function Hj(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!qj(n,r)&&(Fj(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:i}=e;for(let e=0;e<r;e++)if(n=$j(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=Uj(e,LD(t.edges[r])),!0===n)return!0;return!1}(e,t))}function Gj(e,t){if(Mj(e))return!1;if(Vj(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(Dj(e,LD(n.edges[t])))return!0}}return!1}function Vj(e,t){if(!jj(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function Uj(e,t){const[n,r]=RD(t);if(Vj(e,n)||Vj(e,r))return!0;const{numPolygons:i,polygons:o}=e;for(let e=0;e<i;e++){const n=o[e];for(let e=0,r=n.edges.length;e<r;e++){if(Bj(t,LD(n.edges[e])))return!0}}return!1}function Yj(e,t){const[n,r,i,o]=AD(t);if(Vj(e,n)||Vj(e,r)||Vj(e,i)||Vj(e,o))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(zj(t,LD(n.edges[e])))return!0}}return!1}const Kj=/^\$/,Xj="@extend";function Jj(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function Zj(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&Jj(e),Kj.test(r)?(n.push(e),Zj(r,t,n)):r}let r=e;const i=vD(!0,{},t,e),o={};if(e[Xj]){const o=e[Xj];-1!==n.indexOf(o)&&Jj(o);let a=n.slice();a.push(o),r=vD(!0,{},Zj(i[o],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===Xj||Kj.test(e))return;o[e]=r[e];let a=o[e];Kj.test(a)&&a in i?(-1!==n.indexOf(a)&&Jj(a),t.push(a),a=i[a],"object"==typeof a||Kj.test(a)&&a in i?o[e]=Zj(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=Zj(a,i,t))})),o}function Qj(e,t){return Zj(e,t,[])}function ez(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>Qj(e,n),setStyle:t=>{n=vD({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function tz(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function nz(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return vD(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function rz(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function iz(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function oz(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function az(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function sz(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function lz(e,t,n,r,i){const o=vD({},t),a=vD({},n);oz(o,r),az(a,r),sz(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(oz(t,r),az(n,r),!0)}function cz(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function uz(e){return ID([].concat(...e.map(AD)))}function dz(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:i,translation:o}=e;const a=rz(r.x,r.y,r.width,r.height),s=rz(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n})).forEach((e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=uz(n.map((e=>e.outerRect))),c=uz(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=cz(c),t.edgeBleed=e.edgeBleed,t.computed=cz(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0})),u}function pz(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function hz(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function fz(e){let t=nz(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:i}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),tz(r),tz(n),{logicalContainerRect:r,containerRect:n}}(e,t),[o,a]=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];hz(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];pz(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:i}=e;const o=rz(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];iz(n,o,t),lz(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every((e=>t.some((t=>t.key===e))));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),sz(t,o,a),o}({layoutRect:r,visible:o,hidden:a,settings:t}),l=dz({visible:o,layoutRect:r,reducedRect:s,containerRect:i,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=rz();e.comp.resize(t,t)})),{visible:o.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=nz(e)},n}const mz=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},gz=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(ED(ED({},n),{},{children:gz(e.children)}))}})),yz=(e,t)=>({visible:[],hidden:t,ordered:[]}),bz=e=>(t,n)=>{var r;const i=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(ED(ED({},t),{},{children:gz(e.children)}))}})),o=e=>n[e.index],{visible:a=i,hidden:s=[],ordered:l=a}=null!==(r=e(t,i))&&void 0!==r?r:{};return{visible:a.map(o),hidden:s.map(o),ordered:l.map(o)}},vz=e=>"function"==typeof e?bz(e):(e=>{const t=fz(e);return bz(((e,n)=>t.layout(e,n)))})(e);function xz(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=DD(e),a=vD(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function wz(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach((t=>{e.insertBefore(t,r)}))):(o&&o.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function Sz(e,t){let{element:n,data:r=[],settings:i={},on:o={}}=e;const a=t.registries,s=t.logger,l=ez(t.style,t.palettes),c=[],u=vD({},e),d=function(){const e={};return pF.mixin(e),e}();let p=[],h=null,f=null,m=null,g=[],y=()=>{},b=()=>{};const v={};let x=!1;const w=function(e){let{createComponent:t}=e;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>o(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find((e=>r.hasKey&&r.key===e.key));i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:s}=e;return s.map((e=>{const s=mz(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)})).filter((e=>!!e))},c=e=>{let{components:t,hidden:n,layoutFn:r,ordered:i,rect:o,visible:a}=e;const{visible:s,hidden:l,ordered:u}=r(o,t);a.push(...s),n.push(...l),i.push(...u),s.forEach((e=>{if(e.children){var t,r;const o=vz(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&c({components:e.children,hidden:n,layoutFn:yz,ordered:i,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],i=[]},n.findComponentByKey=e=>mz(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],o=[],a=[],s=vz(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let{components:t}=e;i=t.map((e=>o(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:o,scales:a}=e;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:vj(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:vD(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function S(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(u,...a):n.call(u,...a),i}}const E=()=>{let e;i.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=i.dockLayout):e=i.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return w.layout({layoutSettings:e,rect:t})},C=S("created"),_=S("beforeMount"),M=S("mounted"),k=S("beforeUpdate"),R=S("updated"),A=S("beforeRender"),I=S("beforeDestroy"),L=S("destroyed"),D=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:i={},scroll:o={}}=t;y=function(e,t){let{types:n,logger:r}=t;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach(((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}})),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(v).forEach((e=>v[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:SN;const i={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=vD(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:lF;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:y,collection:b},ED(ED({},c),{},{scale:a.scale})),f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:EN;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(r,{dataset:y,collection:b},ED(ED({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=fF(e[r],t?t[r]:null));return n}(o,m)};function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));g.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),g=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(u,d,n);return r.set(e),r}))}const O=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return p.forEach((e=>{const t=e.instance.getRect();jj(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)})),a},T=()=>{if(c.length||!n)return;Object.keys(o).forEach((e=>{const t=o[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=O(e)},r=t=>{const n=e.comps||O(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=CD(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=O(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),i.forEach((e=>{n.addEventListener(e.key,e.listener),c.push(e)}))},N=()=>{c.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),c.length=0},q=()=>{n.innerHTML="",(()=>{const{components:e=[]}=i;A(),D(r,i),w.set({components:e});const{visible:t,hidden:o,ordered:a}=E();p=t,o.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),wz(n,a)})(),T(),P(i.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(i=e.settings,P(e.settings.interactions)),k(),D(r,i);const{formatters:n,scales:o,components:a=[]}=i;w.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:o}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),E()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:o=[]}=e;let a;e.data&&(r=e.data),e.settings&&(i=e.settings,P(e.settings.interactions)),k(),D(r,i,{partialData:t});const{formatters:s,scales:l,components:c=[]}=i;w.update({components:c,data:r,excludeFromUpdate:o,formatters:s,scales:l}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const u=[],d=[];let h;if(t)w.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),h=u;else{const{visible:e,hidden:t,ordered:n}=E();p=e,h=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?u.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),h.forEach((e=>e.instance.beforeRender())),h.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||wz(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),p.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),R()},u.destroy=()=>{I(),w.destroy(),N(),P(),delete u.update,delete u.destroy,L()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return p.filter((e=>null==r||e.key===r)).forEach((r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]})),i},u.findShapes=e=>{let t=[];return p.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},u.componentsFromPoint=e=>O(e).map((e=>e.instance.ctx)),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=p;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));o=p.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=xz(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;p.filter((e=>r===e.key)).forEach((r=>{let i=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(i,t.components[n])}))}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=hF()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>b(e),u.scales=function(){return h.all()},u.formatters=function(){return f.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return v[e]||(v[e]=IF()),v[e]},u.scale=function(e){return h.get(e)},u.formatter=function(e){return f.get(e)},u.toggleBrushing=function(e){x=void 0!==e?e:!x},u.component=e=>{const t=w.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>s,u.theme=()=>l,u.storage=xj({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:g,on(){T(),g.forEach((e=>e.on()))},off(){N(),g.forEach((e=>e.off()))}})}),C(),n&&(_(),q(),M(n),u.element=n),u}const Ez=e=>{let t=NP(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var Cz=NP();function _z(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const Mz=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const kz=e=>{let{key:t,data:n,cache:r,config:i}=e;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,{source:n,data:r,cache:i,config:o}=e,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?c=u.map((()=>[])):(c={},u.forEach((e=>{c[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=Mz(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(lN(vD({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:r,source:t,config:i})};function Rz(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},i={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r,matrix:t}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:o,main:a}=hN(e,t),s=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],p=n.items(),h=[];for(let t=0;t<p.length;t++){const n=p[t];if(a.filter&&!a.filter(n))continue;const r=_z(a,n,{key:i});s.forEach((e=>{const a=o[e];let s=a.field?a.field.items()[t]:n;r[e]=_z(a,s,{key:i})})),l&&gN({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),h.push(r)}r=l?[...r,...mN(d,{main:a,propsArr:s,props:o})]:[...r,...h]}})),r}(e,i),hierarchy:()=>null};return kz({key:e,data:t,config:n,cache:r}),i}Rz.util={normalizeConfig:hN,collect:mN,track:gN};const Az=NP();Az.default("matrix"),Az("matrix",Rz),Az("default",Rz);const Iz=NP();function Lz(e,t,n){return Math.max(e,Math.min(t,n))}function Dz(e){let{item:t,value:n,boxCenter:r,rendWidth:i,rendHeight:o,flipXY:a,symbol:s}=e,l="x",c="y",u=i,d=o,p=n<.5?90:-90;return a&&(l="y",c="x",u=o,d=i,p=n<.5?180:0),s(vD({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function Pz(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:i,rendHeight:o,flipXY:a}=e,s="x",l="y",c="width",u="height",d=i,p=o;a&&(s="y",l="x",c="height",u="width",d=o,p=i);const{actualDiff:h,actualLow:f}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:i=1}=e;const o=Math.max(t,n),a=Math.min(t,n),s=Lz(-.1,1.2,o),l=Lz(-.1,1.2,a),c=s*i-l*i,u=Math.max(r,c),d=(u-c)/2;return{actualDiff:u,startModifier:d,actualLow:l*i-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return vD({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:f,[u]:h,[c]:n*d,data:t.data||{},collider:{type:null}})}function Oz(e){let{item:t,from:n,to:r,boxCenter:i,rendWidth:o,rendHeight:a,flipXY:s}=e,l="x1",c="y1",u="x2",d="y2",p=o,h=a;return s&&(l="y1",c="x1",u="y2",d="x2",p=a,h=o),vD({},t.line,{type:"line",[d]:Math.floor(n*h),[l]:i*p,[c]:Math.floor(r*h),[u]:i*p,data:t.data||{},collider:{type:null}})}function Tz(e){let{item:t,key:n,position:r,width:i,boxCenter:o,rendWidth:a,rendHeight:s,flipXY:l}=e,c="x1",u="y1",d="x2",p="y2",h=a,f=s;l&&(c="y1",u="x1",d="y2",p="x2",h=s,f=a);const m=i/2;return vD({type:"line"},t[n],{[u]:Math.floor(r*f),[c]:(o-m)*h,[p]:Math.floor(r*f),[d]:(o+m)*h,r:m*h,cx:o*h,cy:r*f,width:i*h,data:t.data||{},collider:{type:null}})}function Nz(e,t,n){const{width:r,maxWidthPx:i,minWidthPx:o}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(i)?n:i/n);return s=isNaN(o)?s:Math.max(o/n,s),s*a}Iz("native",(function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function c(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}}));const qz={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},Fz=Object.keys(qz),jz={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,i="horizontal"===this.settings.settings.orientation,{style:o,resolver:a,symbol:s}=this,l=Fz.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=qz[e]));const u=function(e){let{keys:t,data:n,defaultSettings:r,style:i,settings:o,width:a,height:s,resolver:l}=e;const c=vD(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:vD(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:vD(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const h=o.minor||{},f={};["start","end","min","max","med"].forEach((e=>{(h[e]||n.items&&n.items.length&&n.items[0][e])&&(f[e]={scale:h.scale,ref:e})}));let m,g={major:p,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:vD(!0,{},f,h)})};for(let e=0,r=t.length;e<r;e++)o[m]&&!1===o[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:o[m],scaled:u}));return g}({keys:l,data:t,defaultSettings:c,style:o,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:p}=u,h=function(e){let{width:t,height:n,flipXY:r,resolved:i,keys:o,symbol:a}=e;const s=[],l=i.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,p=i.major.settings,h=["start","end","min","max","med"].filter((e=>void 0!==i.minor.settings[e])),f=h.length,m=o.filter((e=>"oob"!==e));let g,y,b,v,x,w,S,E,C;const _=o?o.length:0,M=m?m.length:0,k={box:function(){b.box&&_D(b.start)&&_D(b.end)&&g.push(Pz({item:b,boxWidth:v,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){_D(b.min)&&_D(b.start)&&g.push(Oz({item:b,from:b.min,to:b.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),_D(b.max)&&_D(b.end)&&g.push(Oz({item:b,from:b.max,to:b.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){b.median&&_D(b.med)&&g.push(Tz({item:b,key:"median",position:b.med,width:v,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;_D(b.min)&&g.push(Tz({item:b,key:"whisker",position:b.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),_D(b.max)&&g.push(Tz({item:b,key:"whisker",position:b.max,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))}}};function R(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<f;r++)e=b[h[r]],_D(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,E=n>1&&n!==Number.MAX_VALUE,C=S||E}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let h=null,f=null;void 0!==p.binStart?(h=t.binStart,f=t.binEnd,y=p.binStart.scale):(y=p.major.scale,h=y?t.major:0);let A=0;y?y.bandwidth?(A=y.bandwidth(),h-=A/2):A=f-h:A=1,b=vD({},{major:h,majorEnd:f},i.minor.items[e]);for(let t=0;t<_;t++)b[o[t]]=i[o[t]].items[e];if(v=Nz(A,b,d),x=(A-v)/2,w=x+b.major+v/2,R(),C)b.oob&&(S?g.push(Dz({item:b,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):E&&g.push(Dz({item:b,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<M;e++)b[m[e]]&&!1===b[m[e]].show||k[m[e]]();const I={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(I)}return s}({items:p,settings:d,width:n,height:r,flipXY:i,resolved:u,keys:l,symbol:s});return h}};const zz={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},Bz=/px$/,Wz={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},$z={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function Hz(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function Gz(e,t,n,r){let{width:i,height:o}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=Bz.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);MD(a)&&(t=zz,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=Wz.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=ED(ED({},l),{},{type:s,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(c.width=t.width);const u=r(c);return u.data=e.data,u}))}const Vz={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:vD({},Wz,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:i}=this.rect,o=vD({},$z,this.settings.settings.sizeLimits),a=n.items,s=function(e,t,n,r,i){const o=Hz(e?e.scale:void 0,n),a=Hz(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,r,i,o);return Gz(a,this.rect,s,this.settings.shapeFn||this.symbol)}};Math.PI;const Uz={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function Yz(e,t,n,r){let{x:i,y:o,width:a,height:s}=t;const l=oP(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,p=d/100;return e.map(((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=p*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const h=l.centroid(e),f=i.offset?function(e,t,n,r){let[i,o]=e;const a=Math.sqrt(i*i+o*o);i/=a,o/=a;const s=n-r;return{x:i*t*s,y:o*t*s}}(h,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(f.x,", ").concat(f.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+f.x,y:c.y+f.y}}},i}))}function Kz(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const Xz={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],i=this.settings.settings,{items:o}=this.resolver.resolve({data:t,defaults:vD({},Uz,this.style.slice),settings:i.slice});let a=0;for(let e=0,t=o.length;e<t;e++){const t=Kz(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=pP,t=dP,n=null,r=zD(0),i=zD(JD),o=zD(0);function a(a){var s,l,c,u,d,p=a.length,h=0,f=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min(JD,Math.max(-JD,i.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/p,o.apply(this,arguments)),v=b*(y<0?-1:1);for(s=0;s<p;++s)(d=m[f[s]=s]=+e(a[s],s,a))>0&&(h+=d);for(null!=t?f.sort((function(e,n){return t(m[e],m[n])})):null!=n&&f.sort((function(e,t){return n(a[e],a[t])})),s=0,c=h?(y-p*v)/h:0;s<p;++s,g=u)l=f[s],u=g+((d=m[l])>0?d*c:0)+v,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:zD(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:zD(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:zD(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:zD(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return Yz(s(n),vD({},this.rect,{x:0,y:0}),r,a)}};const Jz=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class Zz{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[Zz.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=Zz.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&Jz(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function Qz(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Zz(...t)}function eB(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const tB={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=Qz(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,WF(this,"x",this.rect.width),WF(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=vD({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=vD({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=eB(this.x,this.rect.width),this.lines.y=eB(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>vD(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function nB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function rB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function iB(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function oB(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function aB(e){let{chart:t,blueprint:n,renderer:r,p:i,settings:o,items:a,slopeLine:s}=e,l=!0,c=!1,u=!1,d=!1,p=!1,h=vD(!0,{},o.style.line,i.line||{}),f=vD(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},o.style.label||{},{fill:h.stroke});if(c=s?n.processItem({type:"line",x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,stroke:h.stroke||"black",strokeWidth:h.strokeWidth||1,strokeDasharray:h.strokeDasharray,flipXY:!1,value:i.valueInfo?i.valueInfo.id:i.value}):n.processItem({type:"line",x1:i.position,y1:0,x2:i.position,y2:1,stroke:h.stroke||"black",strokeWidth:h.strokeWidth||1,strokeDasharray:h.strokeDasharray,flipXY:i.flipXY||!1,value:i.valueInfo?i.valueInfo.id:i.value}),i.label){const e=vD(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},o.style.label||{},{fill:h.stroke},i.label);let s,c={width:0,height:0},f="";s=iB(i,t),!1!==i.label.showValue&&(s?f=" (".concat(s(i.value),")"):i.scale&&(f=" (".concat(i.value,")"))),f&&(c=r.measureText({text:f,fontFamily:e.fontFamily,fontSize:e.fontSize}));let m=r.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:m.width+c.width,height:Math.max(m.height,c.height)},y=e.padding,b=oB(i.flipXY?e.vAlign:e.align),v=oB(i.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*n.width,e.maxWidthPx),w=g.height+2*y,S=i.flipXY?w:x,E=i.flipXY?x:w;if(u=n.processItem({fn:t=>{let{width:r,height:o}=t,a=i.position*r-(i.flipXY?w:x)*(1-b);a=i.flipXY?a:Math.max(a,0);return{type:"rect",x:a,y:Math.max(Math.abs(v*o-E*v),0),width:i.flipXY?S:Math.min(S,n.width-a),height:E,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:i.flipXY||!1}),u.x<-1||u.x+u.width>n.width+1||u.y<-1||u.y+u.height>n.height+1)u=void 0;else{d={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:u.x+y,y:u.y+u.height/2+g.height/3,maxWidth:u.width-2*y-c.width,anchor:"start"},f&&(p={type:"text",text:f||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:d.x+3+(u.width-(c.width+2*y)),y:d.y});for(let e=0,t=a.length;e<t;e++){let t=a[e];"rect"===t.type?qj(u,t)&&(l=!1):"line"===t.type&&i.flipXY===t.flipXY&&zj(u,t)&&(l=!1)}}}if(a.push(c),0!==(null==s?void 0:s.slope)&&(null!=s&&s.showLabel||null!=s&&s.showValue)){let e,o;const l=120;let u=s.showLabel?s.refLineLabel:"";if(s.showValue){const n=iB(i,t),r=n?n(s.value):s.value;e="(".concat(s.slope,"x + ").concat(r,")"),u+=s.refLineLabel?" ".concat(e):e}if(u.length>1){var m;const e=r.measureText({text:u,fontFamily:f.fontFamily,fontSize:f.fontSize});e.width=e.width>l?l:e.width;const i=s.slope>0&&!s.isRtl?4*f.padding:f.padding/2,d=s.slope>0?3*f.padding:f.padding,p=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.max()*t+n<=i.min())return!0;return!1}(t,s.slope,s.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r(t<0?(i.min()-n)/t:(i.max()-n)/t)}(t,s.slope,s.value):void 0,g=void 0===p?Math.abs(c.y2):1,y=function(e,t,n,r,i,o){return e.slope>0?n<.8?e.isRtl?n*i.width-(r.width+o.padding):n*i.width:n>.8?e.isRtl?n*i.width+(r.width+2*o.padding):n*i.width-(r.width+6*o.padding):1===n?e.isRtl?n*i.width+(r.width+3*o.padding):n*i.width-(r.width+6*o.padding):t.x2-(r.width+2*o.padding):e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(s,c,p,e,n,f),b=s.slope>0?g:c.y1;s.labelStroke&&(o={type:"rect",x:s.isRtl?Math.max(y,i)-2:Math.max(y,i)+2,y:Math.abs(Math.max(b,d)-e.height),rx:3,ry:3,width:e.width+f.padding,height:e.height-2,stroke:h.stroke,fill:h.stroke});const v={type:"text",text:u,fill:null!==(m=s.labelStroke)&&void 0!==m?m:h.stroke,opacity:f.opacity,fontFamily:f.fontFamily,fontSize:f.fontSize,x:o?o.x+2:Math.max(y,i)+2,y:o?o.y+e.height-f.padding:Math.abs(Math.max(b,d)-f.padding/2),anchor:"start",title:u,maxWidth:l,width:e.width};(function(e,t,n,r,i,o,a){for(let s=0,l=e.length;s<l;s++){const l=e[s];if("text"===(null==l?void 0:l.type))if(n>0&&void 0!==i){if(Math.abs(l.x-t.x)<l.width+o&&Math.abs(l.y-t.y)<r.height+a)return!0}else if(Math.abs(l.y-t.y)<r.height+a)return!0}return!1})(a,v,s.slope,e,p,i,d)||(o&&a.push(o),a.push(v))}}l&&u&&d&&(a.push(u,d),p&&a.push(p))}function sB(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function lB(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function cB(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}const uB={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=Qz(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(lB).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=cB(t,e.value);return vD(e,{scale:t,position:n})}return vD(e,{position:e.value})})),this.lines.y=this.lines.y.filter(lB).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=cB(t,e.value);return vD(e,{scale:t,position:n,flipXY:!0})}return vD(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(sB(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(sB(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max();i=ED({},r),i.x1=cB(e,o),i.x2=cB(e,a);const s=o*r.slope+r.value,l=a*r.slope+r.value;if(i.y1=cB(n,s),i.y2=cB(n,l),i.y1>1&&i.y2>1)return r.slope,void t["y".concat(i.y1>1?1:0)].push(sB(r));if(i.y1<0)return void t["y".concat(i.y1>1?1:0)].push(sB(r))}else i=void 0;aB({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:i}=e;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:r,height:i}=t,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:nB(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,p=u.cy||u.y,h={type:"text",text:s.length||"",x:d-.4*a.width,y:p+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},f={type:"path",d:rB(d,p,a.width,c),x:d,y:p,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,h,f)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function dB(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){vD(e,t.style)}(t,e),t}function pB(e){return"string"==typeof e||"number"==typeof e?e:"-"}function hB(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map((e=>uj(e,r,{x:t.x,y:t.y}))),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},p=r>=0?[u,d]:[d,u];c.push(...p),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function fB(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function mB(e,t){var n,r;const i={type:"text",text:pB(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+fB(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+fB(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),hB(e,i,t),i}function gB(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){vD(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function yB(e){return!e.isMinor&&e.position>=0&&e.position<=1}function bB(e){let{rect:t,state:n,majorTicks:r,measure:i,horizontal:o}=e;return o?function(e){let{majorTicks:t,measureText:n,rect:r,state:i}=e;const o="layered"===i.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(o*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const i=r.height,o=n("M").height;return!(t.length<2)&&i*Math.abs(t[0].position-t[1].position)<o}({majorTicks:r,measureText:i,rect:t,state:n})}function vB(e){let{value:t,maxValue:n,minValue:r,range:i,modifier:o}=e;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function xB(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,p="top"===e||"bottom"===e,h=p?n.inner.width:n.inner.height,f=o.ticks({settings:a,distance:h,formatter:r}).filter(yB),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=vB({value:t.width,maxValue:u,minValue:d}),t};if(t&&p&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:i,settings:o}=e;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,p=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(p=s*u*Math.abs(r.start-r.end),o+c>p)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(p=s*u*e,d=n("M").width*l*a,d+c>p)return!0}return!1}({majorTicks:f,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&bB({rect:n.inner,state:s,majorTicks:f,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>vB({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>vB({value:e.width,maxValue:u,minValue:d});if(p&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=f.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const b=y.map(m),v=b.map(g),x=Math.max(...v,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=f[r]?f[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:i,angle:o}=e;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:f,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const wB=(e,t,n)=>e.width*Math.abs(t.position-n.position);function SB(e){let{layered:t,major:n,innerRect:r,outerRect:i,tick:o,index:a}=e;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?wB(r,o,l)/2-2:1/0,d=c?wB(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:i}=e;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:i}=e;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function EB(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function CB(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=EB(e)+e.labels.margin,t}function _B(e,t){return e.map((e=>gB(e,t)))}function MB(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function kB(e){let{textMetrics:t,settings:n,innerRect:r,scale:i,tilted:o,layered:a,tick:s}=e;const l=t.height,c=MB(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-CB(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-CB(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=vB({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function RB(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:i,tilted:o,layered:a,tick:s,index:l,major:c}=e;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-CB(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-CB(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=SB({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=vB({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function AB(e){let t;function n(){return t=RB,n}function r(){return t=kB,r}function i(e){let{settings:n,scale:r,innerRect:i,outerRect:o,measureText:a,ticks:s,state:l,textBounds:c}=e;const u=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),p=function(e){return e.filter((e=>e.isMinor))}(s),h={innerRect:i,align:n.align,outerRect:o},f="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.line.show&&(h.style=n.line,h.padding=n.paddingStart,u.push(dB(h))),n.ticks.show&&(h.style=n.ticks,h.tickSize=n.ticks.tickSize,h.padding=EB(n),g=_B(d,h)),n.labels.show){const e=CB(n);h.style=n.labels,h.padding=e,h.tilted=f,h.layered=m,h.angle=n.labels.tiltAngle,h.paddingEnd=n.paddingEnd,h.textBounds=c;const l=(e,l)=>{h.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:h.style});const c=t({textMetrics:h.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:f,layered:m,tick:e,major:d,index:l});h.maxWidth=c.width,h.maxHeight=c.height,h.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:i}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*MB(n,i)}({innerRect:i,scale:r,ticks:s,settings:n,tick:e})};let p=[];p=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=mB(e,t);return i.data=e.data,i}))}(d,h,l):function(e,t,n,r){const i=t.padding,o=CB(n);return e.map(((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=mB(e,t);return l.data=e.data,l}))}(d,h,n,l),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>qj(PD(1,e[t].boundingRect),PD(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(p,g,h),u.push(...p)}return n.minorTicks&&n.minorTicks.show&&p.length>0&&(h.style=n.minorTicks,h.tickSize=n.minorTicks.tickSize,h.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(..._B(p,h))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const IB={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},LB={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const DB={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const i=vD(!0,{},t.isDiscrete?IB:LB,n),o=vD(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=o;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=AB(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=$F(r,i);const o=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const{size:c,edgeBleed:u,isToLarge:d}=xB({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s});if(l+=c,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=vD({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return vD(this.state.innerRect,r),vD(this.state.outerRect,i),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=$F(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),Jz.multiple(t),t}};const PB={render:()=>[]};function OB(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function TB(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const NB={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=OB(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:i,measureText:o,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:TB(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};vD(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(vD(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=OB(t,n,this.scale)}};function qB(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function FB(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const jB={require:["chart","renderer"],on:{panStart(e){const t=FB(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=qB(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=FB(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=FB(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=FB(e,this.renderer);qB(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function zB(e){let{h:t,isVertical:n,value:r,pos:i,align:o,borderHit:a,state:s,idx:l}=e;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",h="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(p="".concat(s.targetRect.x+s.targetRect.width,"px"),h="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,p="".concat(s.rect.width-d,"px"),h="".concat(s.rect.height-d,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:i,"px"),top:"".concat(n?i:d,"px"),height:n?"".concat(a,"px"):h,width:n?p:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:vD({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function BB(e){let{h:t,isVertical:n,label:r,otherValue:i,rangeIdx:o,idx:a,pos:s,align:l,state:c,value:u}=e;const d="end"!==l,p="outside"===c.settings.bubbles.placement;let h,f="none";n?(h=d?"left":"right",p&&(f=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(h=d?"top":"bottom",p&&(f=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const b=m?t("input",{type:"text",value:u,style:ED(ED({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[h]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:f}},[b])}function WB(e){let{h:t,isVertical:n,top:r,height:i,color:o,on:a,opacity:s}=e;return t("div",vD({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function $B(e){let{borderHit:t,els:n,isVertical:r,state:i,vStart:o,vEnd:a,idx:s}=e,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,p=Math.abs(u-d),h=Math.min(u,d)+l,f=h+p;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),p={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(p.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[WB(p)]))}const m=u<d?o:a,g=u<d?a:o,[y,b]=c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],v=m+1e-5>=y&&m-1e-5<=b,x=g-1e-5<=b&&g+1e-5>=y;v&&n.push(zB({h:i.h,isVertical:r,borderHit:t,value:m,pos:h,align:"start",state:i,idx:s})),x&&n.push(zB({h:i.h,isVertical:r,borderHit:t,value:g,pos:f,align:"end",state:i,idx:s}));const w=i.settings.bubbles;if(w&&w.show){const e={fontSize:w.fontSize,fontFamily:w.fontFamily,color:w.fill},t=[o,a];v&&n.push(BB({h:i.h,isVertical:r,align:w.align,style:e,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,t)),pos:h,state:i})),x&&n.push(BB({h:i.h,isVertical:r,align:w.align,style:e,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(i.format(g,t)),pos:f,state:i}))}}function HB(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function GB(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,i)=>{e.active&&i===e.active.idx||$B({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})})),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=HB(e);r=e.active.start+t,i=e.active.end+t}$B({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function VB(e){return{min:e.scale.min(),max:e.scale.max()}}function UB(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function YB(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function KB(e){e.renderer.render(GB(e))}function XB(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}function JB(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function ZB(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function QB(e){const t=e.reduce(((e,t)=>(e.push(...AD(t.bounds)),e)),[]);return ID(t)}const eW={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=XB(this.state,this.state.brushInstance),this.state.active=null,KB(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=$F(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=QB(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=$F(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=QB(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map((e=>({min:e.min,max:e.max})));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=ED({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)}))}(this.state,e,t,n),this.emit("bubbleEnd"),KB(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,KB(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=Vq(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>ZB(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(JB(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=IF(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach((e=>{if(!ZB(r,[e.min,e.max]))return;const o=n.indexOf(JB(e.min,t)),a=n.indexOf(JB(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))})),i}(e,i);return this.state.ranges=XB(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[GB(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=vD({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(h/t.size),c.start=t.scale.normInvert(p/t.size);let f=t.ranges;const m=VB(t);let g,y,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),m.min=b>0?f[b-1].max:m.min,m.max=b+1<f.length?f[b+1].min:m.max;else{for(g=0;g<f.length;g++){if(f[g].min<=c.start&&c.start<=f[g].max){b=g,m.min=g?f[g-1].max:m.min,m.max=g+1<f.length?f[g+1].min:m.max;break}if(c.start<f[g].min){m.max=f[g].min,m.min=g?f[g-1].max:m.min;break}}-1===b&&f.length&&g>=f.length&&(m.min=f[f.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==b)if(y={idx:b,start:f[b].min,end:f[b].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(p-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(p-n)<=o&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!jj(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:XB,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=VB(e);YB(e,e.current,n)}(this.state,XB),KB(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=HB(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=XB(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter((e=>-1===i.indexOf(e))),s=i.filter((e=>-1===o.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),c=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),KB(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;KB(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function tW(e){e.renderer.render(GB(e))}function nW(e){return e.rc.ranges()}function rW(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const iW={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=o[0]?o.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=bF(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let f=h,m=p;c.start=p,c.current=h;let g=t.ranges;const y=UB(t);let b,v,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(b=0;b<g.length;b++){if(g[b].min<=m&&m<=g[b].max){x=b,y.min=b?g[b-1].max:y.min,y.max=b+1<g.length?g[b+1].min:y.max;break}if(m<g[b].min){y.max=g[b].min,y.min=b?g[b-1].max:y.min;break}}-1===x&&g.length&&b>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(v={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=v.start,t=v.end;Math.abs(p-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(p-t)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:m,end:f,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!jj(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:nW,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=UB(e);YB(e,e.current,n)}(this.state,nW),tW(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=HB(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...rW(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),tW(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function oW(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}(e).map((i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function aW(e,t,n,r){function i(){!function(e){e.renderer.render(oW(e))}(e)}function o(){!function(e){e.renderer.render(oW(e))}(e)}function a(){!function(e){e.renderer.render(oW(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function sW(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const lW={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=$F(this.chart.scale(e.scale),r);return sW(this.state),aW(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,oW(this.state)},beforeDestroy(){sW(this.state)}};function cW(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function uW(e,t,n){return sj(e,t.points[0])<n.settings.snapIndicator.threshold**2}function dW(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function pW(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function hW(e,t){e.snapIndicator.visible=t}const fW={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})))}(this.settings);const n=cW(this.state.rendererBounds,e);dW(this.state,n),pW({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=cW(this.state.rendererBounds,e);uW(t,this.state,this.settings)?hW(this.state,!0):hW(this.state,!1),dW(this.state,t),pW({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;hW(this.state,!1);uW(cW(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map((e=>({x:e.x+n,y:e.y+r}))),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function mW(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function gW(e){let{orientation:t,targetNodes:n,labels:r,container:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mW;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:p}=r[t];if(d[s]<i[s]||d[s]+d[l]>i[s]+i[l])return!1;for(let e=o(d,a,s,l,c);e<a.length;e++)if(qj(d,a[e].textBounds))return!1;const h=o(d,n,s,l,u),f=d[s]+d[l];for(let e=h;e<n.length;e++){const t=n[e].node;if(f<t.localBounds[s])break;if(qj(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const yW=4;function bW(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function vW(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function xW(e){return ED(ED({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function wW(e,t,n){return n?e.width>=t.height:e.width>=t.width}function SW(e,t,n){return n?e.height>=t.width:e.height>=t.height}function EW(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||wW(t,n,!0),a=SW(t,n,!r)):(o=wW(t,n),a=i||SW(t,n,!1)),o&&a}function CW(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function _W(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return wW(e,t,n.rotate)&&SW(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=CW(e.x,e.width,i.height,n.align)+o,r.y=CW(e.y,e.height,i.width,n.justify),r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=CW(e.x,e.width,i.width,n.align),r.y=CW(e.y,e.height,i.height,n.justify)+o),r}function MW(e){let{bar:t,view:n,direction:r,position:i,padding:o=yW}=e;const a={};if(vD(a,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(a.y=0,a.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(a.y=o,a.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(a.x=0,a.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(a.x=o,a.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(a,n),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{top:n=yW,bottom:r=yW,left:i=yW,right:o=yW}=t;e.x+=i,e.width-=i+o,e.y+=n,e.height-=n+r}(a,o),a}function kW(e){let t,n,r,i,o,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:p}=e,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:MW;const f=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=h({bar:c.localBounds,view:p,direction:a,position:r.position,padding:r.padding}),f.push(i),t=!o||i[m]>t[m]?i:t,EW(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=f.indexOf(n)),r=d[o],{bounds:n,placement:r}}function RW(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=yW,bottom:a=yW,left:s=yW,right:l=yW}=i,c=e.x+e.dx,u=e.y+e.dy,d=n?Math.min(t.width,r.height):Math.min(t.height,r.width),p=n?Math.min(t.height,r.height):Math.min(t.width,r.width),h=.5*t.height,f=1e-9;return{x:(n?c-h:c)-s-f,y:(n?u:u-h)-o-f,width:p+(s+l)-f,height:d+(o+a)-f}}function AW(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:i,collectiveOrientation:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kW,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_W,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:gW;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,p,h,f,m,g,y,b,v,x,w,S,E,C;for(let e=0,l=n.length;e<l;e++){g=null,p=n[e],h=p.node,E=bW(h,t),v=p.direction,C="left"===v||"right"===v?"h":"v";for(let t=0;t<p.texts.length;t++){if(f=p.texts[t],!vW(f))continue;x=p.labelSettings[t],b=p.measurements[t],S=x.placements;const n=a({direction:v,fitsHorizontally:i,lblStngs:x,measured:b,node:h,orientation:C,placements:S,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){m=w.justify;const t="function"==typeof x.linkData?x.linkData(E,e):void 0,n="function"==typeof w.overflow?w.overflow(E,e):w.overflow;"up"===v&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===o||i);if(d=s(g,f,{justify:"h"===C?w.align:m,align:"h"===C?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n}),d){const n=RW(d,b,r,g,w.padding);y="function"==typeof w.fill?w.fill(ED(ED({},E),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(ED(ED({},E),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=RW(d,b,r,g,w.background.padding))),c.push(d),u.labels.push({node:h,textBounds:n})}}}}const _=c.filter(l(u));return[..._.filter((e=>void 0!==e.backgroundBounds)).map(xW),..._]}function IW(e){const t=2*Math.PI;return(e%t+t)%t}function LW(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function DW(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function PW(e,t,n){let{x:r,y:i}=t;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function OW(e){let t,n,{radius:r,size:i,angle:o}=e,{width:a,height:s}=i,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=PW(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=PW(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=PW(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=PW(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function TW(e){let{slice:t,measured:n,padding:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=IW((i+o)/2);let d=s-r,p={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(p.angle=u-Math.PI/2,p.anchor="end"):(p.angle=u+Math.PI/2,p.anchor="start"),p}function NW(e){let{context:t,node:n,bounds:r}=e;let{start:i,end:o}=n.desc.slice;const a=IW((i+o)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function qW(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function FW(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function jW(e){let t,n,{slice:r,direction:i,position:o,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:p,innerRadius:h,offset:f}=r;switch(o){case"into":t="rotate"===i?TW({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t;const l=IW((i+o)/2);let c=OW({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",zj(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||zj(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||Lj({cx:0,cy:0,r:a},c)?null:(LW(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:h},t="rotate"===i?TW({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:i}=e;const{start:o,end:a,outerRadius:s}=t,l=IW((o+a)/2);let c=OW({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",LW(c,n),i.insideLabelBounds.some((e=>qj(e,c)))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let{slice:t,measured:n,padding:r,view:i}=e,{start:o,end:a,outerRadius:s,offset:l}=t,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=IW((o+a)/2);let p=Math.sin(d)*c,h=-Math.cos(d)*c,f=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=h<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<f&&(f=t)}if(Math.sin(m)>.001){let e=p<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<f&&(f=t)}if(f<=0||f<n.minReqWidth)return null;let g={x:p,y:h,width:f,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:i,context:o}=e,{start:a,end:s,outerRadius:l,offset:c}=t;const u=IW((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,p=Math.sin(u)*d,h=-Math.cos(u)*d,f=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(p+c.x));e<f&&(f=e)}else{let e=Math.abs(i.x-(p+c.x));e<f&&(f=e)}if(f<n.minReqWidth)return null;let m={x:p,y:h,width:f,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=f.x,t.y+=f.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const{start:r,end:i,offset:o,outerRadius:a}=n,s=IW((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function zW(e){let{context:t,direction:n,measured:r,node:i,placementSettings:o,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jW;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function BW(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const WW=/\n+|\r+|\r\n/,$W=/\s/,HW=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function GW(e){return"string"==typeof e?-1!==e.search(WW):-1!==String(e).search(WW)}function VW(e){return-1!==e.search($W)}function UW(e){return-1!==e.search(HW)}function YW(e,t,n){return Math.max(t,Math.min(n,e))}function KW(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:i=[GW],noBreakAllowedIdentifiers:o=[],suppressIdentifier:a=[VW,GW,e=>""===e],hyphenationIdentifiers:s=[UW]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let d=n?c:-1;function p(e){const t=YW(e,0,c-1),n=l[t],u=r(n),d=function(e,t,n,r,i){return r.some((r=>r(e,t,n)))?1:i.some((r=>r(e,t,n)))?0:2}(n,t,l,i,o);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=YW(e,0,c-1),u(d)?p(d):{done:!0}},peek:p,length:c}}const XW="…",JW=/^\s*\d+(\.\d+)?px\s*$/i;function ZW(e){return"string"===typeof e&&JW.test(e)}function QW(e){const t=e["font-size"]||e.fontSize;return ZW(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function e$(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=QW(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function t$(e,t){return{lines:[],line:"",width:0,maxLines:e$(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function n$(e){e.lines.push(e.line),e.line="",e.width=0}function r$(e,t){e.line+=t.value,e.width+=t.width}function i$(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function o$(e,t,n){const r=KW({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?i$(e,t,r):t,n$(e),r$(e,t)):r$(e,t)}}function a$(e,t){const n=KW({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=t$(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){n$(r),i=!1;break}1===e.breakOpportunity?n$(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?i$(r,e,n):e,n$(r),r$(r,e)):r$(r,e)}return{lines:r.lines,reduced:i}}function s$(e,t){const n=KW({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=t$(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){n$(r),i=!1;break}1===e.breakOpportunity?n$(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?n$(r):e.width>r.maxWidth?o$(r,e,t):(n$(r),r$(r,e)):r$(r,e)}return{lines:r.lines,reduced:i}}function l$(e){return{"break-all":a$,"break-word":s$}[e.wordBreak]}function c$(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=l$(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||GW(n.text)){const o=(QW(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach(((a,s)=>{const l=vD({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=XW:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)})),i}(a,n,o,i.height)}}}}function u$(e,t){let{text:n,"font-size":r,"font-family":i,maxWidth:o}=e;if(n="string"==typeof n?n:"".concat(n),void 0===o)return n;let a=t({text:n,fontSize:r,fontFamily:i}).width;if(a<=o)return n;let s=0,l=n.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:n.substr(0,e)+XW,fontSize:r,fontFamily:i}).width,a<=o?s=e+1:l=e-1}return n.substr(0,l)+XW}function d$(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const p$={},h$={},f$={fontSize:void 0,fontFamily:void 0};let m$;function g$(e,t,n){const r=e+t+n;return"number"!=typeof h$[r]&&(m$=m$||document.createElement("canvas").getContext("2d"),function(e,t){f$.fontSize===e&&f$.fontFamily===t||(m$.font=e+" "+t,f$.fontSize=e,f$.fontFamily=t)}(t,n),h$[r]=m$.measureText(e).width),h$[r]}function y$(e){return"number"!=typeof p$[e]&&(p$[e]=function(e){if(ZW(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),p$[e]}function b$(e){let{text:t,fontSize:n,fontFamily:r}=e;return{width:g$(t,n,r),height:y$(n)}}function v$(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b$;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+d$(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function x$(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b$;const n=l$(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||GW(e.text))){const o=n(e,(e=>t({text:e,fontFamily:i,fontSize:r}))),a=vD({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?XW:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=v$(a,t);return c.height=QW(e)*o.lines.length,c}return v$(e,t)}function w$(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function S$(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function E$(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function C$(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:i,offset:o}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return E$({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?E$(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var _$={bar:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:AW;const l=vD({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>vD({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>vD({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:p,targetNodes:h}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:i,placementSettings:o,settings:a,renderer:s}=e;const l={},c=[];let u,d,p,h,f,m,g,y=!0,b=!1;for(let e=0;e<t.length;e++){if(d=t[e],h=d.localBounds,!qj(h,n))continue;let v=bW(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],p="function"==typeof m.label?m.label(v,e):void 0,vW(p)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=p,f=s.measureText(l),u.measurements.push(f),u.texts.push(p),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&f.width<=h.width-2*yW);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:b}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:u}),f=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),m="h"===f?"y":"x",g="h"===f?"height":"width";return h.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:h,stngs:t,rect:i,fitsHorizontally:d,collectiveOrientation:f})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zW,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:FW;const c=vD({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>vD({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>vD({},c,t,e,n))))),p=[],h={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const{start:a,end:s}=e[o].desc.slice,l=IW((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>IW((e.desc.slice.start+e.desc.slice.end)/2)-IW((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const f={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=qW(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=BW(c,r,o),b=s({context:f,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:h}),v=b.bounds,x=b.placement;if(v&&x){if("outside"===x.position&&"rotate"!==m){NW({context:f,node:t,bounds:v});if(!Ej(DW(v),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(v,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),p.push(o),v.line&&(v.line.stroke=n,p.push(v.line)))}}}return p},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:i,style:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S$;const s=vD({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=vD({},s,t),c=t.labels.map((e=>vD({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=w$(t,n),{type:s,bounds:p}=C$(t);if(!p)continue;let h,f=0,m=[],g=[],y="circle"===s?2*p.r*.9:p.height;for(f+=l.padding,h=0;h<c.length;h++){let t=c[h],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=i.measureText(u);if(f+=r.height+t.padding,f>y)break;g.push(n),m.push(r)}const b=h,v=Math.max(0,y-f);let x;for(x="circle"===s?p.cy-.9*p.r:p.y,x+=l.justify*v+l.padding,h=0;h<b;h++){let t,n=c[h];if("circle"===s){let e=Math.max(Math.abs(x-p.cy),Math.abs(x+m[h].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[h].height}}else t={x:p.x+l.padding,y:x,width:p.width-2*l.padding,height:m[h].height};x+=m[h].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const u="function"==typeof n.linkData?n.linkData(o,e):void 0;let f=a(t,g[h],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[h]});if(f){if(f.text&&f.text!==XW){const e=u$(f,i.measureText);if(XW===e)continue;f.ellipsed=e}void 0!==u&&(f.data=u),d.push(f)}}}return d}};const M$={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&_$[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:i,renderer:o,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},_$[e.strategy.type]))})),t}};const k$={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,justify:.5,align:.5,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25},navigation:{button:{class:void 0,content:void 0,tabIndex:void 0},disabled:!1}};function R$(e){let{x:t=0,y:n,item:r,globalMetrics:i,createSymbol:o,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,c=r.symbol.meta;const u="rtl"===a;let d={x:u?t+i.maxLabelBounds.width:t+i.maxSymbolSize+i.spacing,y:n,width:i.maxLabelBounds.width,height:Math.max(i.maxSymbolSize,i.maxLabelBounds.height)},p=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:u?t+i.maxLabelBounds.width+i.spacing:t,y:n,width:i.maxSymbolSize,height:d.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const h=o(vD({},c,p));return delete h.collider,s.anchor=u?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[h,s],collider:{type:"rect",x:t,y:n,width:i.maxItemBounds.width,height:i.maxItemBounds.height}},metrics:d}}function A$(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function I$(e,t){let n,r,i,o,{onScroll:a=()=>{}}=t,s=null,l=0;const c={itemize:t=>{n=function(e,t){let n,r,{resolved:i,dock:o}=e,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,d=0,p=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=vD({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),p=Math.max(r.label.bounds.height,p)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,p),width:u+8+d},maxLabelBounds:{width:d,height:p}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,l=c.getContentOverflow(i);const a=c.extent();s=Math.max(0,Math.min(s,l)),o=vD({},i);const u="horizontal"===c.orientation()?"x":"y";return o[u]-=s,o["x"===u?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:i,create:o=R$,parallels:a,createSymbol:s}=n;const l=i.layout.direction,c=i.globalMetrics,u=i.items,d="horizontal"===i.layout.orientation;let p=0;const h=[],f=c.maxItemBounds.height,m=c.maxItemBounds.width,g=i.layout.margin.vertical+f,y=i.layout.margin.horizontal+m;let b=t.x,v=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:v,x:"rtl"===l?r.x+x+r.width-m-(b-t.x):b,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&b>=r.x-m||!d&&v>=r.y-f)&&h.push(n.item),p++,p>=a?(p=0,d?(b+=y,v=t.y):(v+=g,b=t.x)):d?v+=g:b+=y,!d&&v>r.y+r.height)break;if(d&&b>r.x+r.width)break}return h}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return A$(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,A$(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===c.orientation()?o.x<i.x:o.y<i.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>A$(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return c}function L$(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const D$={up:"▲",right:"▶",down:"▼",left:"◀"};function P$(e,t){let{size:n,isActive:r,direction:i,nav:o,attrs:a}=t,s={},l="";const c=a;o&&o.button&&("function"==typeof o.button.class?s=o.button.class({direction:i}):o.button.class&&(s=o.button.class),"function"==typeof o.button.content&&(l=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(c.tabindex=o.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(u.border="0",u.background="none"),(!r||o&&o.disabled)&&(c.disabled="disabled"),e("button",vD({class:L$(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[D$[i]])])}function O$(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:i,itemRenderer:o}=t;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[P$(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),P$(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(p)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function T$(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=vD({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(vD({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function N$(e,t,n,r){let i,o,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){i={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-i.width-(i.width?t.spacing:0),n=p.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,h=s.spread(),f=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:p.y+Math.max(0,(f-h)/2),width:p.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},i.y=o.y;"rtl"===s.direction()&&(a.x=p.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),d=Math.max(i.height,f,s.spread())}else{const e=p.height-i.height-(i.height?t.spacing:0),n=p.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},o={x:p.x,y:i.y+i.height+(i.height?t.spacing:0),width:p.width,height:p.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=vD({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:vD({},e,i),content:vD({},e,o),navigation:vD({},e,a),orientation:n,preferredSize:d}}function q$(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const i=e.scale.datum?vD({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i}))}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:vD(!0,{},k$.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:k$.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:vD(!0,{},k$.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=vD(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:vD(!0,{},k$.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:vD(!0,{},{show:k$.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function F$(e){const{rect:t,settings:n,state:r,itemRenderer:i,navigationRenderer:o,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=N$(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:vD({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},u}const j$={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=F$(this);this.update(e)},this.itemRenderer=I$(this,{onScroll:this.onScroll}),this.navigationRenderer=O$(this),this.titleRenderer=T$(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),q$(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=N$(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){q$(this)},render(){return F$(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function z$(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function B$(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function W$(e){return B$(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function $$(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function H$(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map(((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return o}(e,i),a=function(e){return B$(e.layout.dock,e.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"})}(e.settings);if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const s=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),l=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),c={isVertical:t,nodes:[],title:{anchor:W$(e.settings),textMetrics:s,textBounds:l,requiredWidth:()=>{if(!n.show)return 0;let e=l.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,c.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=l.height;return t&&(e+=n.padding),Math.min(e,c.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...c.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...o.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(c.rect[n],c.rect[n]*e.stgns.length)-c.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return c}const G$={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=$$(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=H$(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=H$(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=$$(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return z$(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return z$(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}}));return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const V$={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},connect:!1,orientation:"horizontal",layers:{curve:"linear",show:!0,sort:void 0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function U$(e,t){let{generatorType:n,item:r,data:i,major:o,minor:a,layerObj:s,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function Y$(e){const{metaLayers:t,coordinates:n,layers:r,lines:i,areas:o}=function(e){let{data:t,stngs:n,rect:r,resolver:i,style:o,domain:a}=e;const{width:s,height:l}=r,c=i.resolve({data:t,defaults:V$.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let p=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:p++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const h=Object.keys(d).map((e=>(d[e].consumableData=ED({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),f={items:h.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:c,metaLayers:h,layers:i.resolve({data:f,defaults:{curve:V$.layers.curve,show:V$.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:f,defaults:vD({},V$.layers.line,o.line),settings:m.line}),areas:i.resolve({data:f,defaults:vD({},V$.layers.area,o.area),settings:m.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,p;for(let r=0;r<t.items.length;r++){if(d=t.items[r],p=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(p.minor0?p.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const h=c.sort(((e,t)=>e-t))[Math.floor((c.length-1)/2)];a.push({layerObj:l,lineObj:i.items[s],areaObj:o.items[s],median:h,points:u,consumableData:t.consumableData})})),a}const K$={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const i=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=Y$({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:i,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=o.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));o.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else o.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:i,stngs:o}=t;const a=[],s=o.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===o.orientation){const e=vD(!0,{},p);p=vD(!0,{},d),d=vD(!0,{},e)}s.area&&!1!==c.show&&a.push(U$(u,{data:e.consumableData,item:c,generatorType:"area",major:p,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(U$(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(U$(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:l,stngs:o},"none")))})),a}(o,{width:n,height:r,missingMinor0:i,stngs:this.stngs})}};function X$(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function J$(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function Z$(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const Q$={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=X$(this,e,!1);jj({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})))}(this.settings),this.state.start=X$(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=X$(this,e),function(e){if(e.state.active){const t=J$(e,e.state.start),n=J$(e,e.state.end),r=e.chart.shapesAt(Z$(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([vD({type:"rect"},Z$(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function eH(e,t,n){let{renderer:r,style:i,props:o,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:L$(vD({"pic-tooltip":!0},s.tooltip)),style:vD({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:L$(vD({"pic-tooltip-content":!0},s.content))},l),a("div",{class:L$(vD({"pic-tooltip-arrow":!0},s.arrow)),style:vD({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function tH(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),o=!0,r=null,a.set("active")}),c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function nH(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function rH(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function iH(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function oH(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function aH(e){let{area:t,vx:n,vy:r,width:i,height:o,offset:a}=e;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,p=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,p+=l+u>t.height?-(l+u-t.height):0,{x:d,y:p}}function sH(e){let{options:t,pointer:n,width:r,height:i,dockOrder:o,x:a,y:s}=e;const{targetBounds:l}=n,c=nH(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:iH(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},p=rH(r,i,t.offset),h=[],f="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=aH({area:d,vx:f,vy:m,width:r,height:i,offset:p[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=iH(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,h.push(y)}return h.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),h[0]}function lH(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return vD({scaleRatio:i.scaleRatio},i.computedInner)}const cH={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:i,height:o,options:a}=e;const{targetBounds:s}=r,{x:l,y:c,width:u,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:l,y:c+d/2},right:{x:l+u,y:c+d/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+d},inside:{x:l+u/2,y:c+d/2}},h=nH(a.offset),f=h[a.dock];if(f)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:f},computedArrowStyle:iH(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=rH(i,o,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(oH(m,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,i,o,g[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:h[t]},computedArrowStyle:iH(a.offset)[t],dock:t}}const b=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:i,area:o,width:a,height:s}=e;const l="top",c="target"===t.area?n[l].x:i.left+n[l].x,u=("target"===t.area?n[l].y:(i.top,n[l].y),r[l]),d=c+u.x,p=(u.y,a);let h=n.top.x;return d<0&&d+p>o.width||(d<0?h-=d:d+p>o.width&&(h-=d+p-o.width)),h}({options:a,docks:p,dockOffsets:g,targetBounds:s,area:m,width:i,height:o});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(p.top.y,"px"),transform:h.top},computedArrowStyle:iH(a.offset+b-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:i}=e;const{x:o,y:a}=n;return sH({x:o,y:a,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:i,nodes:o,resources:a}=e;const s=o[0],{dx:l,dy:c}=n,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,p=c+u.y+u.height/2,{start:h,end:f,outerRadius:m}=s.desc.slice,g=(h+f)/2-Math.PI/2,y=2*Math.PI,b=(g%y+y)%y;let v=["top","left","right","bottom"];return"auto"===t.dock&&(v=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),sH({x:d+m*u.scaleRatio.x*Math.cos(b),y:p+m*u.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:i,options:t,dockOrder:v})}};function uH(e,t){let{width:n,height:r}=e,{chart:i,state:o,props:a}=t;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>lH(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=lH(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=vD(c,a.placement(s))),"object"===l&&cH[a.placement.type]?c=vD(c,a.placement):"string"===l&&cH[a.placement]&&(c=vD(c,{type:a.placement})),s.options=c;const u=cH[c.type](s);let{x:d,y:p,width:h,height:f}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,h+=d,p+=s.pointer.dy,f+=p,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),h),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(u.computedTooltipStyle.top)),f),"px"),u}let dH;function pH(){dH=null}const hH={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const fH={require:["chart","renderer"],defaultSettings:{settings:hH,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,p=i-a.left,h=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:p,cy:h,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,i)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=tH({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){dH&&dH!==e&&dH()}(t),dH=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,vD({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,vD({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),dH===t&&(dH=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),pH()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),pH()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:i,h:o}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach((e=>{if("function"==typeof i.extract){const t=vD({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=uH(eH(t,{style:{left:"0px",top:"0px",visibility:"hidden"}},this).getBoundingClientRect(),this);this.state.tooltipElm=eH(t,n,this)}};const mH={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var gH={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},yH=/([astvzqmhlc])([^astvzqmhlc]*)/gi,bH=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function vH(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(yH,((e,n,r)=>{const i=function(e){const t=e.match(bH);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<gH[o])return"";for(t.push([a,...i.splice(0,gH[o])]);i.length>=gH[o]&&i.length&&gH[o];)t.push([a,...i.splice(0,gH[o])]);return""})),t}const xH=2*Math.PI;function wH(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function SH(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function EH(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=wH(e,t),s=wH(t,n),l=wH(n,r),c={x:SH(.5,e.x,t.x,n.x,r.x),y:SH(.5,e.y,t.y,n.y,r.y)},u=wH(a,s),d=wH(s,l);return EH(e,a,u,c,i,o-1),EH(c,d,l,r,i,o-1),i}function CH(e,t,n){const{cp1:r,cp2:i}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return EH(e,r,i,n)}function _H(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],p=e[7],h=e[1],f=e[2];if("a"===e[0]&&(d+=t,p+=n),t===p&&n===p)return r;if(!h||!f)return r.push({x:d,y:p}),r;({cx:s,cy:l,rx:h,ry:f,sweepAngle:c,startAngle:u}=function(e,t,n,r,i,o,a,s,l){let c,u,d,p,h,f;const m=ej(n%360),g=Math.cos(m),y=Math.sin(m),b=(s-o)/2,v=(l-a)/2,x=g*b+y*v,w=g*v-y*b;f=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,f>1&&(f=Math.sqrt(f),e*=f,t*=f);const S=e*w,E=t*x,C=S**2+E**2,_=(e*t)**2-C;let M=Math.sqrt(Math.max(_/C,0));r===i&&(M=-M);const k=M*(S/t),R=M*(-E/e);p=g*k-y*R+(s+o)/2,h=y*k+g*R+(l+a)/2;const A=(x-k)/e,I=(w-R)/t,L=(-x-k)/e,D=(-w-R)/t;return c=Math.atan2(I,A),c+=c<0?xH:0,u=Math.atan2(D,L),u+=u<0?xH:0,d=u-c,!i&&c<u?d-=xH:i&&u<c&&(d+=xH),d%=xH,{startAngle:c,sweepAngle:d,cx:p,cy:h,rx:e,ry:t}}(h,f,a,i,o,d,p,t,n));const m=Math.abs(c*Math.sqrt((h**2+f**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%xH,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*h+-i*n,y:l+i*f+n*i})}return r}function MH(e){const t=vH(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(..._H(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(..._H(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...EH({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...EH({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...EH({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...EH({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...CH({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...CH({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...CH({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...CH({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const kH={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{MH(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var RH=[function(e){e.component("box",jz),e.component("box-marker",jz)},function(e){e.component("point",Vz),e.component("point-marker",Vz)},function(e){e.component("pie",Xz)},function(e){e.component("grid-line",tB)},function(e){e.component("ref-line",uB)},function(e){e.component("axis",DB)},function(e){e.component("container",PB)},function(e){e.component("text",NB)},function(e){e.component("scrollbar",jB)},function(e){e.component("brush-range",eW),e.component("brush-area-dir",iW)},function(e){e.component("range",lW)},function(e){e.component("brush-lasso",fW)},function(e){e.component("labels",M$)},function(e){e.component("legend-cat",j$)},function(e){e.component("legend-seq",G$)},function(e){e.component("line",K$)},function(e){e.component("brush-area",Q$)},function(e){e.component("tooltip",fH)},function(e){e.component("debug-collider",mH)},function(e){e.component("debug-path-to-points",kH)}];class AH{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}}class IH{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:i,minHeight:o})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,i)):(this.x=e+Math.min(n,-i),this.width=-Math.min(n,-i)),r>=0?(this.y=t,this.height=Math.max(r,o)):(this.y=t+Math.min(r,-o),this.height=-Math.min(r,-o))}containsPoint(e){return jj(this,e)}intersectsLine(e){return zj(this,LD(e))}intersectsRect(e){return qj(this,ID(e))}intersectsCircle(e){return Lj(e,this)}intersectsPolygon(e){return Nj(e,this)}intersectsGeoPolygon(e){return Yj(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class LH{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return Ij(this,e)}intersectsLine(e){return Dj(this,LD(e))}intersectsRect(e){return Lj(this,ID(e))}intersectsCircle(e){return n=e,!Mj(t=this)&&!Mj(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return Pj(this,e)}intersectsGeoPolygon(e){return Gj(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class DH{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:i})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(i)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return Dj({cx:e.x,cy:e.y,r:this.tolerance},this)}return Wj(this,e)}intersectsLine(e){return Bj(this,LD(e))}intersectsRect(e){return zj(ID(e),this)}intersectsCircle(e){return Dj(e,this)}intersectsPolygon(e){return Tj(e,this)}intersectsGeoPolygon(e){return Uj(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class PH{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return Oj(this,e)}intersectsCircle(e){return Pj(e,this)}intersectsLine(e){return Tj(this,LD(e))}intersectsRect(e){return Nj(this,ID(e))}intersectsPolygon(e){return $j(this,e)}intersectsGeoPolygon(e){return Hj(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function OH(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new PH(...t)}function TH(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function NH(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class qH{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)NH(this.vertices[e]),this.vertices[e].length>2&&TH(this.vertices[e]),this.polygons[e]=OH({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return Vj(this,e)}intersectsCircle(e){return Gj(e,this)}intersectsLine(e){return Uj(this,LD(e))}intersectsRect(e){return Yj(this,ID(e))}intersectsPolygon(e){return Hj(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!qj(n,r)&&(Fj(r,n)?Aj(t,e):Aj(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function FH(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qH(...t)}class jH{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>Wj(t,e)))}intersectsCircle(e){return this.segments.some((t=>Dj(e,t)))}intersectsLine(e){const t=LD(e);return this.segments.some((e=>Bj(e,t)))}intersectsRect(e){const t=ID(e);return this.segments.some((e=>zj(t,e)))}intersectsPolygon(e){return this.segments.some((t=>Tj(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>Uj(e,t)))}points(){return this._points}}const zH=NP();function BH(e,t){return zH.get(e)(t)}zH.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new IH(...t)})),zH.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new LH(...t)})),zH.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new DH(...t)})),zH.add("polygon",OH),zH.add("geopolygon",FH),zH.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new jH(...t)}));class WH{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=BH(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class $H{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new $H).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof $H&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const HH=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function GH(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function VH(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function UH(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function YH(e,t){t.args.length>=6&&e.transform(...t.args)}function KH(e,t){const n=function(e){let t,n=[];for(;null!==(t=HH.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?GH(t,r):"scale"===r.cmd?VH(t,r):"matrix"===r.cmd?YH(t,r):"translate"===r.cmd&&UH(t,r)}const XH={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},JH={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function ZH(e,t){if(!t||!t.length||!e||"function"!=typeof JH[e.type])return[];switch(e.type){case"type":case"tag":return JH[e.type](e.value,t);case"attr":return JH[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return JH[e.type](t);default:return[]}}var QH={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{i=e.match(XH[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(XH).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););})),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=ZH(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function eG(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every((e=>Array.isArray(e)))?i.map((e=>n.transformPoints(e))):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=ID(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=LD(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:ZF(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=ZF(i[t],!0);o={type:"path",d:e}}return o}class tG{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:i,height:o}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:i,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>eG(e,t,n)))}:eG(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new tG(e))),this._parent=()=>e.parent?new tG(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();i-=t,o-=n}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function nG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new tG(...t)}class rG{constructor(e){this._node=nG(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function iG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new rG(...t)}function oG(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=iG(n);const e=n.parent;e&&"stage"!==e.type&&oG(e,t.parent)}}function aG(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?FH(n):OH(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=iG(i);return oG(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=iG(e);return oG(e,t),t}return null}(e,t,r)}function sG(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=aG(i,t,r);a&&n.push(a),!i.children||a||i.collider||sG(i.children,t,n,r)}}function lG(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==aG(r,t,n))return!0;if(r.children&&!r.collider)return lG(r.children,t,n)}return!1}function cG(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(DD(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=AD(e).map((e=>ij(e,t))),["intersectsRect",n];case"line":return n=RD(e).map((e=>ij(e,t))),["intersectsLine",n];case"point":return n=ij(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>ij(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>ij(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function uG(e,t){const[n,r]=cG(t,e.dpi),i=[];return n&&(sG([e],n,i,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,i)),i}function dG(e,t){const[n,r]=cG(t,e.dpi);return lG([e],n,r)}class pG extends AH{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:i,fillReference:o}=e;var a,s;a=this.attrs,s=e,Object.keys(JF).forEach((e=>{const t=s[e];void 0!==t&&(a[JF[e]]=t)})),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=vD(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return QH.find(e,this).map((e=>nG(e)))}getItemsFrom(e){return uG(this,e)}containsPoint(e){return dG(this,e)}intersectsLine(e){return dG(this,e)}intersectsRect(e){return dG(this,e)}intersectsCircle(e){return dG(this,e)}intersectsPolygon(e){return dG(this,e)}intersectsGeoPolygon(e){return dG(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new $H;void 0!==this.attrs.transform&&KH(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new $H;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new WH(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=BH("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=BH(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class hG extends AH{addChild(e){if(!(e&&e instanceof AH))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const fG=hG.prototype;class mG extends pG{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=vD({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,i]=e.bounds(t),{x:o,y:a}=r,{x:s,y:l}=i,c=isNaN(n.width)?s:Math.max(s,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=vD({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=fG.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=vD({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=fG.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=vD({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(fG.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=vD(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(fG.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=vD(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function gG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new mG(...t)}class yG extends mG{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const bG=hG.prototype,vG=["x1","x2","y1","y2","id","offset","style"];class xG extends pG{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=vG.length;r!==i;r++)n=vG[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return bG.addChild.call(this,e)}addChildren(e){return bG.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return bG.removeChild.call(this,e),this}removeChildren(e){return bG.removeChildren.call(this,e),this}}function wG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new xG(...t)}const SG=hG.prototype,EG=["patternUnits","x","y","width","height","id"];class CG extends pG{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=EG.length;r!==i;r++)n=EG[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return SG.addChild.call(this,e)}addChildren(e){return SG.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return SG.removeChild.call(this,e),this}removeChildren(e){return SG.removeChildren.call(this,e),this}}class _G extends pG{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,collider:s}=e,l=vD({type:"rect",x:t,y:n,width:r,height:i},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=AD(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=kD(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class MG extends pG{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:i}=e,o=vD({type:"circle",cx:t,cy:n,r:r},i);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=o,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:i}=this.attrs,o=t-r,a=n-i;let s=2*r,l=2*i,c=[{x:o,y:a},{x:o+s,y:a},{x:o+s,y:a+l},{x:o,y:a+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,r,i]=kD(c);s=r-t,l=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class kG extends pG{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:i=0,collider:o}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=i;const a={type:"line",x1:t,y1:n,x2:r,y2:i};this.collider=vD(a,o),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=RD(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,i,o]=kD(t),a=n!==i||r!==o;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,i-n):0,height:a?Math.max(1,o-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const RG=Math.PI/2;function AG(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function IG(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const LG={step:function(e){return new IP(e,.5)},stepAfter:function(e){return new IP(e,1)},stepBefore:function(e){return new IP(e,0)},linear:sP,basis:function(e){return new mP(e)},cardinal:bP.tension(0),catmullRom:xP,monotonex:function(e){return new _P(e)},monotoney:function(e){return new MP(e)},natural:function(e){return new RP(e)}};function DG(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class PG extends pG{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=oP();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:i,stngs:o,generatorType:a}=e,s=uP(),l=o.coordinates?o.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(LG["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=MH(this.attrs.d),this.segments.length>1&&this.segments.every((e=>DG(e))))return void(this.collider=vD({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(DG(t))this.collider=vD({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=AG(s,a),u=AG(s,l),d=(c+u)/2,p=d+Math.PI,h=Math.max(d,p),f=Math.min(d,p),m=c>u;if(1===n){const e=AG(a,s);r.push(IG(a,e-RG,t)),i.unshift(IG(a,e+RG,t))}const g=m?h:f,y=m?f:h;if(r.push(IG(s,g,t)),i.unshift(IG(s,y,t)),n===o-1){const e=AG(l,s);r.push(IG(l,e+RG,t)),i.unshift(IG(l,e-RG,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=vD({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:MH(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,i,o]=kD(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function OG(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}let TG=class extends pG{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:i=0,textBoundsFn:o,text:a,title:s,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=i,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof o&&(this._textBoundsFn=o),"string"==typeof u&&(this.ellipsed=u),this.collider=vD({type:OG(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=AD(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[i,o,a,s]=kD(r);return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}};const NG=NP();function qG(e,t){return NG.get(e)(t)}NG.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _G(...t)})),NG.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new MG(...t)})),NG.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new TG(...t)})),NG.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kG(...t)})),NG.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new PG(...t)})),NG.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yG(...t)})),NG.add("container",gG),NG.add("defs",gG),NG.add("linearGradient",wG),NG.add("radialGradient",wG),NG.add("stop",wG),NG.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new CG(...t)}));const FG=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return vD(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function jG(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function zG(e,t,n){e.node=n[t],e.index=t}function BG(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(zG(o,a,e),jG(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=FG.save(o.node);const s=qG(o.node.type,o.node);s&&(o.node.transform&&(n.save(),KH(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&BG(o.node.children,s,n,r),o.node.transform&&n.restore()),FG.restore()}}function WG(e){let{items:t,stage:n,dpi:r,on:i={}}=e;return n||(n=qG("stage",r)),BG(t,n,new $H,i),n}function $G(e,t,n){const{orientation:r,degree:i,stops:o=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else{const r=tj(i);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const o=t.boundingRect();a=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=o.length;e<t;e++){let t=o[e];a.addColorStop(t.offset,t.color)}return a}function HG(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function GG(){let{x:e,y:t,width:n,height:r,scaleRatio:i,margin:o,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==i&&(s.scaleRatio.x=isNaN(i.x)?s.scaleRatio.x:i.x,s.scaleRatio.y=isNaN(i.y)?s.scaleRatio.y:i.y),void 0!==o&&(s.margin.left=isNaN(o.left)?0:o.left,s.margin.top=isNaN(o.top)?0:o.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function VG(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:b$,textBounds:x$,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function UG(e){return t=>{let{node:n}=t;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=e.textBounds)}}const YG=200,KG=200;class XG{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:i}=e;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*YG,height:n.computedPhysical.height+2*KG},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const JG=NP();function ZG(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function QG(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function eV(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function tV(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function nV(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=$G(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=$G(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),tV(t,o,n,a),o.modelViewMatrix&&eV(o.modelViewMatrix.elements,t),JG.has(o.type)&&JG.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&nV(o.children,t,n,r),t.restore()}}function rV(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:WG;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=GG();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",ZG]];let l;const c=VG();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new XG(e)),n.appendChild(e),e),c.getScene=r=>{const i=QG(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[c$(c.measureText),UG(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||HG(e,t,n),r[i]):HG(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=QG(u),p=t&&r.transform();if(p)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:p}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const h=c.getScene(n),f=!i||!h.equals(i);l.clear();const m=o||f,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),nV(h.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&h.children.unshift(...i.children),i=h,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=GG(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function iV(e,t){JG.add(e,t)}function oV(e,t){return Math.max(0,Math.min(e,t))}const aV=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),sV=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),lV=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function cV(e){return aV.test(e)}function uV(e){return sV.test(e)||lV.test(e)}function dV(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],cV(n))return"ltr";if(uV(n))return"rtl"}return"ltr"}const pV={start:"end",end:"start",center:"center",middle:"middle"};function hV(e,t){return"rtl"===t?pV[e]:e}function fV(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=fV([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=fV(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function mV(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function gV(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function yV(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(mV(i.diff.added,i.object,t),gV(i.diff.removed,r),yV(i.diff.items,t,n,r)))}function bV(e,t,n,r,i,o){const a=fV(e,t);return mV(a.added,n,r),gV(a.removed,o),yV(a.items,r,i,o),a.items}iV("rect",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=oV(r/2,o>0?o:a),a=oV(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()})),iV("circle",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()})),iV("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),iV("path",(function(e,t){let{g:n,doStroke:r,doFill:i}=t;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)})),iV("text",(function(e,t){let{g:n,ellipsed:r,doStroke:i}=t;const o=r||u$(e,b$);e["font-weight"]?n.font="".concat(e["font-weight"]," ").concat(e["font-size"]," ").concat(e["font-family"]):n.font="".concat(e["font-size"]," ").concat(e["font-family"]);const a=dV(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=hV("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=d$(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)}));const vV="http://www.w3.org/2000/svg",xV=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(vV,"container"===e?"g":e);return t.appendChild(n),n},wV=e=>{e.parentNode&&e.parentNode.removeChild(e)},SV=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||u$(t.attrs,b$);const n=dV(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",hV(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(vV,"title");n.textContent=t.attrs.title,e.appendChild(n)}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?d$(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class EV{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function CV(){return new EV(bV,xV,SV,wV)}function _V(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function MV(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vV,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:WG;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:CV)();let r,i,o,a=!1,s=GG();const l={transform:void 0},c=VG(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_V,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach((a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")}))},clear(){n={}}};return i}(u.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_V,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=i[o],c={};void 0===r&&(r=90),"radial"===t?c.type="radialGradient":(c=tj(r),["x1","x2","y1","y2"].forEach((e=>{e in i[o]&&(c[e]=i[o][e])})),c.type="linearGradient"),c.id=l,c.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(c),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},p.onCreate,d.onCreate,c$(c.measureText),UG(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="",a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),p.clear(),d.clear(),u.children.length=0;const h=c.getScene(e),f=!o||!h.equals(o),m=a||f;return m&&(c.clear(),n.render(h.children,i)),a=!1,o=h,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=GG(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var kV,RV,AV,IV,LV,DV,PV,OV={},TV=[],NV=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function qV(e,t){for(var n in t)e[n]=t[n];return e}function FV(e){var t=e.parentNode;t&&t.removeChild(e)}function jV(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?kV.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return zV(e,a,r,i,null)}function zV(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++AV:i};return null==i&&null!=RV.vnode&&RV.vnode(o),o}function BV(e){return e.children}function WV(e,t){this.props=e,this.context=t}function $V(e,t){if(null==t)return e.__?$V(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?$V(e):null}function HV(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return HV(e)}}function GV(e){(!e.__d&&(e.__d=!0)&&IV.push(e)&&!VV.__r++||LV!==RV.debounceRendering)&&((LV=RV.debounceRendering)||DV)(VV)}function VV(){var e,t,n,r,i,o,a,s;for(IV.sort(PV);e=IV.shift();)e.__d&&(t=IV.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=qV({},o)).__v=o.__v+1,tU(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?$V(o):a,o.__h),nU(r,o),o.__e!=a&&HV(o)),IV.length>t&&IV.sort(PV));VV.__r=0}function UV(e,t,n,r,i,o,a,s,l,c){var u,d,p,h,f,m,g,y=r&&r.__k||TV,b=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?zV(null,h,null,null,h):Array.isArray(h)?zV(BV,{children:h},null,null,null):h.__b>0?zV(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=y[u])||p&&h.key==p.key&&h.type===p.type)y[u]=void 0;else for(d=0;d<b;d++){if((p=y[d])&&h.key==p.key&&h.type===p.type){y[d]=void 0;break}p=null}tU(e,h,p=p||OV,i,o,a,s,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=YV(h,l,e):l=KV(e,h,p,y,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=$V(p))}for(n.__e=m,u=b;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=XV(r).nextSibling),oU(y[u],y[u]));if(g)for(u=0;u<g.length;u++)iU(g[u],g[++u],g[++u])}function YV(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?YV(r,t,n):KV(n,r,r,i,r.__e,t));return t}function KV(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function XV(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=XV(n)))return r;return null}function JV(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||NV.test(t)?n:n+"px"}function ZV(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||JV(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||JV(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?eU:QV,o):e.removeEventListener(t,o?eU:QV,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function QV(e){return this.l[e.type+!1](RV.event?RV.event(e):e)}function eU(e){return this.l[e.type+!0](RV.event?RV.event(e):e)}function tU(e,t,n,r,i,o,a,s,l){var c,u,d,p,h,f,m,g,y,b,v,x,w,S,E,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=RV.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,b):(t.__c=u=new WV(g,b),u.constructor=C,u.render=aU),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=qV({},u.__s)),qV(u.__s,C.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,b),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}if(u.context=b,u.props=g,u.__P=e,x=RV.__r,w=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=qV(qV({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),E=null!=c&&c.type===BV&&null==c.key?c.props.children:c,UV(e,Array.isArray(E)?E:[E],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=rU(n.__e,t,n,r,i,o,a,l);(c=RV.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),RV.__e(e,t,n)}}function nU(e,t){RV.__c&&RV.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){RV.__e(e,t.__v)}}))}function rU(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,s=!1}if(null===h)d===p||s&&e.data===p||(e.data=p);else{if(o=o&&kV.call(e.childNodes),c=(d=n.props||OV).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||ZV(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||ZV(e,o,t[o],n[o],r)}(e,p,d,i,s),u)t.__k=[];else if(f=t.props.children,UV(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,a,o?o[0]:n.__k&&$V(n,0),s),null!=o)for(f=o.length;f--;)null!=o[f]&&FV(o[f]);s||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===h&&!f||"option"===h&&f!==d.value)&&ZV(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&ZV(e,"checked",f,d.checked,!1))}return e}function iU(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){RV.__e(e,n)}}function oU(e,t,n){var r,i;if(RV.unmount&&RV.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||iU(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){RV.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&oU(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||FV(e.__e),e.__=e.__e=e.__d=void 0}function aU(e,t,n){return this.constructor(e,n)}function sU(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,i=GG();const o={transform:void 0},a=VG();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach((t=>{void 0!==e[t]&&(o[t]=e[t])})),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:i,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}let a;return n.style.transform="",n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?jV("div",null,e):e,r=function(e,t,n){var r,i,o;RV.__&&RV.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],tU(t,e=(!r&&n||t).__k=jV(BV,null,[e]),i||OV,OV,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?kV.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),nU(o,e)}(a,n,r),!0},a.renderArgs=[jV],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=GG(e)),i),a}kV=TV.slice,RV={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},AV=0,WV.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=qV({},this.state),"function"==typeof e&&(e=e(qV({},n),this.props)),e&&qV(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),GV(this))},WV.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),GV(this))},WV.prototype.render=BV,IV=[],DV="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,PV=function(e,t){return e.__v.__b-t.__v.__b},VV.__r=0;var lU=[function(e){e.renderer("svg",MV)},function(e){e.renderer("canvas",rV)},function(e){e.renderer("dom",sU)}];const cU={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const uU=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=cU.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[cU.OFF]:()=>{},[cU.ERROR]:function(){return t.error(...arguments)},[cU.WARN]:function(){return t.warn(...arguments)},[cU.INFO]:function(){return t.info(...arguments)},[cU.DEBUG]:function(){return t.log(...arguments)}},i=function(e){if(e&&!(n<e)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];(r[e]||r[cU.DEBUG])(...i)}};return{log:i,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(cU.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(cU.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(cU.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(cU.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:cU}}(t.logger),i={component:NP(n.component,"component",r),data:NP(n.data,"data",r),formatter:NP(n.formatter,"formatter",r),interaction:NP(n.interaction,"interaction",r),renderer:Ez(n.renderer),scale:NP(n.scale,"scale",r),symbol:NP(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:vD({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>Sz(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach((e=>{o[e]=i[e]})),o.version=xD,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:Cz,data:Az,formatter:aN,interaction:Iz,renderer:Ez(),scale:sF,symbol:hj});RH.forEach(uU.use),lU.forEach(uU.use),[].forEach(uU.use);const dU=uU();dU.use(uD),dU.renderer.prio(["canvas"]);const pU=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,hU=({href:e,text:t,labelStructure:n,interactions:r,color:i})=>Ws.jsxs("span",{children:[Ws.jsx(VR,{...SI({href:e,text:t,interactions:r,color:i}),children:null!=n&&n.maskedValue?n.maskedValue:null==n?void 0:n.originalValue}),!!n&&pU(n)]}),fU=({children:e,textStyle:t})=>Ws.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box"},children:e}),mU=({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>{const{isActive:i}=AM(),{interactions:o}=rE();let a=r?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:i,suffix:o,delimeter:a}=n;return`${0!==i.length?i:r} ${o?a:""} ${o}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const s=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>({...pg,...hg(r?Math.max(t.grid.lineClamp,e.leafCount*t.grid.lineClamp):t.grid.columnLineClamp),color:TM({cell:e,styleService:t,isCellSelected:n}),fontWeight:NM({cell:e,styleService:t}),fontStyle:qM({cell:e,styleService:t}),textDecoration:FM({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r});if(e.representation.type===Dt.Image&&!e.isTotal)return Ws.jsx(YM,{representation:e.representation,isLeftColumn:r,styleService:t,textStyle:s,leafCount:e.leafCount,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand});if(e.representation.type===Dt.Link&&!i&&!e.isTotal){const t=r&&e.representation.labelStructure?hU:EI;a=Ws.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:o,color:e.expressionColor.color})}return Ws.jsx(fU,{textStyle:s,children:a})},gU=e=>{const t=e.isLeftColumn?"flex-start":"center";var n;return e.representation.type!==Dt.Image||(e=>"fill"===e.representation.imageSize)(e)?t:null===(n=e.representation.resolvedImagePosition)||void 0===n?void 0:n.vertical},yU=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:i}=aE(),{isSelected:o}=AM(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=mk([n]),h=yI(e,n),f=a?e===l-1:c,m=a?c:e===l-1,g=gM(h,u,i.isIndentModeEnabled);if(void 0===h){const{background:n}=r.dimensionValues;return Ws.jsx(yM,{style:{...t,background:n},index:e,isLastRow:f,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const y=o(h);return Ws.jsxs(xI,{text:h.representation.text,reactWindowStyle:t,isLeftColumn:a,isLastRow:f,isLastColumn:m,isCellSelected:y,showTotalCellDivider:g,cell:h,data:n,isAdjustingWidth:d,index:e,children:[Ws.jsxs(bM,{verticalAlign:gU(h),width:vM(h.representation),right:h.isLeftColumn?void 0:4,children:[Ws.jsx(WM,{isLeftColumn:a,isCellSelected:y,cell:h}),Ws.jsx(mU,{isLeftColumn:a,isCellSelected:y,cell:h,styleService:r})]}),Ws.jsx(bk,{cellInfo:{...h,columnWidthLocation:h.isPseudoDimension?Bt.Measures:Bt.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var bU=t.memo(yU,tM);const vU=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>i=>{var o;const a=n?e[i]:t.at(i);return a&&0===i&&a.x>0?(a.leafCount+a.x+a.distanceToNextCell)*r():!n&&a?(a.leafCount+a.distanceToNextCell)*r():r(null!==(o=null==a?void 0:a.x)&&void 0!==o?o:i)},xU=(e,t,n,r)=>{const i=Object.values(e);let o,a=i.length;return r&&(a=n,o=t/a),{itemCount:a,estimatedItemSize:o,listValues:i}},wU=(e,t)=>n=>{e.current&&(e.current[t]=n)},SU={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...ug},EU={overflow:"hidden",willChange:"auto",flexShrink:0},CU=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:i})=>{const{pageInfo:o}=eE(),{layoutService:a,styleService:{contentCellHeight:s,grid:{divider:l}}}=aE(),{qSize:c}=a.layout.qHyperCube,{gridSectionsData:{leftDimensionData:u},visibleDimensionsInfo:{visibleLeftDimensionInfo:d}}=VC();gI(e,u),mI(e,t,n,s);const p=o.rowsOnCurrentPage*s,h={...SU,borderColor:l,width:r.reduce(((e,t)=>e+t),0)};return Ws.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:u.grid.map(((t,l)=>{const h=l===u.columnCount-1,f=vE(d[l]),{itemCount:m,estimatedItemSize:g,listValues:y}=xU(t,p,o.rowsOnCurrentPage,h),b=a.isIndentModeEnabled?()=>s:((e,t,n,r,i)=>o=>{const a=r?e[o]:t.at(o);if(a&&0===o&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===i-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,y,s,h,c.qcy);return Ws.jsx(J_,{ref:wU(e,l),style:{...EU,flexGrow:h?1:0},height:n,width:r[l],itemCount:m,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:m,showLastBorder:i,listValues:y,totalDividerIndex:u.totalDividerIndex},itemKey:sk,estimatedItemSize:g,children:bU},f)}))})};var _U=f(CU);const MU={overflow:"hidden",willChange:"auto"},kU={...ug,borderWidth:"0px 0px 0px 1px"},RU=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:i,getRightGridColumnWidth:o})=>{const{layoutService:a,styleService:{grid:{divider:s},headerCellHeight:l}}=aE(),{gridSectionsData:{headersData:c,topDimensionData:u}}=VC(),d={...kU,borderColor:s,height:r};gI(e,u),mI(e,n,r,l);const p=a.size.x*o();return 0===u.rowCount?Ws.jsx("div",{style:{width:n,height:r,...kU}}):Ws.jsx("div",{style:d,"data-section-id":"TOP_GRID",children:u.grid.map(((r,s)=>{const l=s===u.rowCount-1,{itemCount:d,estimatedItemSize:h,listValues:f}=xU(r,p,a.size.x,l),m=(({layoutService:e,headersData:t,topRowIndex:n})=>{var r;const i=t.data[n],o=t.size.x-1,a=e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y?null===(r=i[0][o])||void 0===r?void 0:r.dimensionInfoIndex:null==i?void 0:i[o].dimensionInfoIndex;return void 0!==a?e.getDimensionInfo(a):void 0})({layoutService:a,headersData:c,topRowIndex:s}),g=m?vE(m):`empty ${s}`;return Ws.jsx(J_,{ref:wU(e,s),style:MU,height:t(),width:n,itemCount:d,itemSize:vU({list:r,listValues:f,isLastRow:l,getRightGridColumnWidth:o}),layout:"horizontal",itemData:{list:r,isLast:l,itemCount:d,showLastBorder:i,listValues:f,totalDividerIndex:u.totalDividerIndex},itemKey:sk,estimatedItemSize:h,children:bU},g)}))})};var AU=f(RU);const IU=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=aE(),n=g_(),r=(()=>{const{model:e}=rE(),t=d((async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:i,sortDirection:o}=t,a=[];if(n===o)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}}),[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:i,topGridWrapperRef:o,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:u},scrollDirectionRefs:{verticalScrollDirection:h,horizontalScrollDirection:f},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:y}}=m_(),{leftGridWidth:b,leftGridFullWidth:v,leftGridColumnWidths:x,rightGridFullWidth:w,showLastRightBorder:S,getRightGridColumnWidth:E,getHeaderCellsIconsVisibilityStatus:C,overrideLeftGridWidth:_}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:i}=aE(),{gridSectionsData:{headersData:o}}=VC(),{measureText:a}=jg(i.header),s=l_({tableWidth:e}),l=c_({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=s.leftGridWidth+l.rightGridFullWidth+1<e,u=d(((e,t,n="")=>{let i=e;r.isIndentModeEnabled&&(i=1,1===o.size.x&&(i=0));const l=s.leftGridColumnWidths[i];let c=!1,u=!1,d=a(n)+YC;return t&&d+20<=l&&(u=!0,d+=20),d+20<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}}),[s.leftGridColumnWidths,a,r.isIndentModeEnabled,o.size.x]);return p((()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()}),[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:c,getHeaderCellsIconsVisibilityStatus:u}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:y}),{gridScaffoldDimensions:M,headerGridDims:k,topGridDims:R,leftGridDims:A,dataGridDims:I,metadata:{everyThingFitsInTableRectHeight:L,scrollbarsVisibilityStatus:D}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:i},scrollBarsDimensions:{verticalScrollbarWidth:o,horizontalScrollbarHeight:a}})=>{const s=g_(),{pageInfo:l}=eE(),{gridSectionsData:{headersData:c,topDimensionData:u}}=VC(),d=Math.min(s.height*KC,Math.max(s.height*KC-25,s.height-t-a)),p=s.width*KC,h=l.rowsOnCurrentPage*t,f=Math.max(c.size.y,u.rowCount,1),m=e*f,g=e*f,y=Math.min(p,n),b=s.width-p,v=Math.max(b,s.width-y),x=Math.min(d,m,g),{availableHeight:w,everyThingFitsInTableRectHeight:S,everyThingFitsInTableRectWidth:E}=((e,t,n)=>{const r=t+1+n+o<=s.width,i=e+1+h+a,l=i-s.height<a||i<=s.height;return{availableHeight:l?i:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,y,v),C=w-d,_=Math.max(C,w-x),M=Math.min(_,h),k=Math.min(_,h),R=m+1+h,{visibilityStatus:A,metadata:{hasLeftGridOverflowX:I,hasDataGridOverflowX:L}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:i}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:o,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=o>t,d=a>n,p=l>i;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:y,rightSectionWidth:v},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:_}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:i},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${y}px ${v}px`,gridTemplateRows:`${x}px ${_}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:i-o+(L?o:0),height:g},stickyWrapper:{width:v-1-o,height:-1},self:{width:Math.min(i,v)-(E?1:0)-o,height:g}},leftGridDims:{fullSizeWrapper:{width:y,height:R-g+(!I&&L?a:0)},stickyWrapper:{width:y,height:_-1-a},self:{width:y,height:Math.max(t,M-(S?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:i-o+(L?o:0),height:R-g+(!L&&I?a:0)},stickyWrapper:{width:v-1-o,height:_-1-a},self:{width:Math.min(i,v)-(E?1:0)-o,height:Math.max(t,k-(S?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:S,scrollbarsVisibilityStatus:A}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:b,leftGridOriginalWidth:v,rightGridOriginalWidth:w},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),P=d((()=>e),[e]),O=d((()=>t),[t]);return(()=>{const{downloadService:e}=aE();p((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))})(),Ws.jsxs(b_,{style:M,children:[Ws.jsx("div",{style:{overflow:"hidden"},ref:i,children:Ws.jsx(fI,{tableWidth:n.width,leftGridWidth:b,columnWidths:x,getHeaderCellsIconsVisibilityStatus:C,rowHight:e,height:k.height,changeSortOrder:r,overrideLeftGridWidth:_})}),Ws.jsx(w_,{style:D.topGrid,origin:$t.TopGrid,ref:o,children:Ws.jsx(y_,{style:R.fullSizeWrapper,children:Ws.jsx(S_,{style:R.stickyWrapper,children:Ws.jsx(AU,{topGridRef:l,rowHightCallback:P,...R.self,showLastBorder:{right:S,bottom:!1},getRightGridColumnWidth:E})})})}),Ws.jsx(w_,{style:D.leftGrid,origin:$t.LeftGrid,ref:a,children:Ws.jsx(y_,{style:A.fullSizeWrapper,children:Ws.jsx(S_,{style:A.stickyWrapper,children:Ws.jsx(_U,{leftGridRef:c,...A.self,columnWidths:x,showLastBorder:{right:!1,bottom:L}})})})}),Ws.jsx(w_,{style:D.dataGrid,origin:$t.DataGrid,ref:s,children:Ws.jsx(y_,{style:I.fullSizeWrapper,children:Ws.jsx(S_,{style:I.stickyWrapper,children:Ws.jsx(dk,{dataGridRef:u,rowHightCallback:O,...I.self,showLastBorder:{right:S,bottom:L},getRightGridColumnWidth:E,verticalScrollDirection:h,horizontalScrollDirection:f})})})})]})},LU=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=rE(),{pageInfo:i,updatePageInfo:o,rect:a}=eE(),{layoutService:s}=aE(),{layout:l,hasData:c}=s;return Ws.jsxs(Ws.Fragment,{children:[c?Ws.jsx(IU,{}):null,Ws.jsx(lE,{}),Ws.jsx(ZS,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{o({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:l})]})},DU={WHITE:"#FFFFFF",GREY:"#999999",GREY_PALE:"#B2B2B2",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF",GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_25:"rgba(0, 0, 0, 0.25)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_0_65:"rgba(0, 0, 0, 0.65)",GREYSCALE_100_05:"rgba(255, 255, 255, 0.05)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_25:"rgba(255, 255, 255, 0.25)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},PU=12,OU=14,TU=16,NU=24,qU=3,FU=300,jU=400,zU=600,BU=700,WU={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};yn(DU.GREYSCALE_0,.05),yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5),yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5),yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5);var $U;function HU(){return HU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HU.apply(null,arguments)}yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5),yn(DU.GREEN_PALE,.5),yn(DU.BLUE_PALE,.5);var GU,VU=function(t){return e.createElement("svg",HU({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),$U||($U=e.createElement("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})))};function UU(){return UU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UU.apply(null,arguments)}var YU=function(t){return e.createElement("svg",UU({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor"},t),GU||(GU=e.createElement("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345z"})))};function KU({fontSize:e="medium",children:t=null,className:n=""}={}){const r="small"===e?"16px":"20px",i="small"===e?"-2px 0":void 0;return Ws.jsx("i",{style:{fontSize:r,margin:i,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})}function XU(e={}){return Ws.jsx(KU,{...e,children:Ws.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[Ws.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),Ws.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function JU(e={}){return Ws.jsx(KU,{...e,children:Ws.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Ws.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[Ws.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),Ws.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function ZU(e={}){return Ws.jsx(KU,{fontSize:"medium",...e,children:Ws.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Ws.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Ws.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function QU(e={}){return Ws.jsx(KU,{fontSize:"medium",...e,children:Ws.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ws.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),Ws.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function eY({className:e}){return Ws.jsx(KU,{fontSize:"small",className:e,children:Ws.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:Ws.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Ws.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:Ws.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[Ws.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),Ws.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function tY(e={}){return Ws.jsx(KU,{...e,children:Ws.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Ws.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Ws.jsx("rect",{stroke:DU.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}Ws.jsx(YU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),Ws.jsx(VU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),Ws.jsx(ZU,{}),Ws.jsx(QU,{}),Ws.jsx((function(e={}){return Ws.jsx(KU,{...e,children:Ws.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Ws.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Ws.jsx("rect",{stroke:"#000000",fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}),{}),Ws.jsx(XU,{}),Ws.jsx(JU,{}),Ws.jsx(VU,{style:{color:DU.TEXT_PRIMARY},"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16});const nY={MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{}}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:qU,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transition:"unset",color:"var(--sprout-common-foreground-color-default)",boxShadow:"none","&:hover":{backgroundColor:"var(--sprout-common-background-color-hover)"},"&:active":{backgroundColor:"var(--sprout-common-background-color-pressed)"},"&.Mui-disabled":{backgroundColor:"var(--sprout-common-background-color-disabled)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"calc(var(--sprout-focus-border-default-width) / -2)",backgroundColor:"var(--sprout-focus-background-color-default)",zIndex:100}},text:{padding:"8px 16px",backgroundColor:"transparent"},textPrimary:{color:"var(--sprout-brand-primary-color-default)"},textSecondary:{color:"var(--sprout-info-color-default)"},textWarning:{color:"var(--sprout-warning-color-default)"},textError:{color:"var(--sprout-danger-color-default)"},outlined:{padding:"7px 16px",border:"var(--sprout-common-border-moderate)",backgroundColor:"var(--sprout-common-background-color-enabled)","&.Mui-focusVisible":{borderColor:"transparent"},"&:hover":{border:"var(--sprout-common-border-moderate)"}},outlinedPrimary:{borderColor:"var(--sprout-brand-primary-color-default)",color:"var(--sprout-brand-primary-color-default)","&:hover":{borderColor:"var(--sprout-brand-primary-color-default)"}},outlinedSecondary:{borderColor:"var(--sprout-info-color-default)",color:"var(--sprout-info-color-default)","&:hover":{borderColor:"var(--sprout-info-color-default)"}},outlinedWarning:{borderColor:"var(--sprout-warning-color-default)",color:"var(--sprout-warning-color-default)","&:hover":{borderColor:"var(--sprout-warning-color-default)"}},outlinedError:{borderColor:"var(--sprout-danger-color-default)",color:"var(--sprout-danger-color-default)","&:hover":{borderColor:"var(--sprout-danger-color-default)"}},contained:{color:"var(--sprout-brand-primary-color-inverse)",backgroundColor:"var(--sprout-brand-primary-color-default)",padding:"8px 16px","&:hover":{backgroundColor:"var(--sprout-brand-primary-color-hover)"},"&:active":{backgroundColor:"var(--sprout-brand-primary-color-pressed)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"var(--sprout-focus-border-default-width)",background:"var(--sprout-brand-primary-color-focus)"}},containedError:{backgroundColor:"var(--sprout-danger-color-default)","&:hover":{backgroundColor:"var(--sprout-danger-color-hover)"},"&:active":{backgroundColor:"var(--sprout-danger-color-pressed)"},"&.Mui-focusVisible":{outlineColor:"var(--sprout-danger-color-inverse)",backgroundColor:"var(--sprout-danger-color-focus)"}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]}};var rY=(e,t)=>(e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:DU.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:DU.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:Ws.jsx(VU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${DU.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`,borderRadius:qU,backgroundColor:DU.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${DU.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:DU.WHITE,color:DU.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:qU},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${DU.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:DU.GREYSCALE_0_15,backgroundColor:DU.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${DU.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:DU.GREEN_PALE},"&:active":{backgroundColor:DU.GREEN_DARK},"&.Mui-focusVisible":{borderColor:DU.GREEN_PALE,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:DU.BLUE_PALE},"&:active":{backgroundColor:DU.BLUE_DARK},"&.Mui-focusVisible":{borderColor:DU.BLUE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:qU,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:DU.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${DU.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:DU.GREYSCALE_0_15,backgroundColor:DU.GREYSCALE_100_60,"&:active":{backgroundColor:DU.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${DU.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:DU.PURPLE,"&.Mui-focusVisible":{borderColor:DU.PURPLE,boxShadow:`0 0 0 3px ${Rb(DU.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:DU.GREEN,"&.Mui-focusVisible":{borderColor:DU.GREEN,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:DU.BLUE,"&.Mui-focusVisible":{borderColor:DU.BLUE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:DU.ORANGE,"&.Mui-focusVisible":{borderColor:DU.ORANGE,boxShadow:`0 0 0 3px ${Rb(DU.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:DU.RED,"&.Mui-focusVisible":{borderColor:DU.RED,boxShadow:`0 0 0 3px ${Rb(DU.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:DU.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:DU.PURPLE_PALE},"&:active":{backgroundColor:DU.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:DU.PURPLE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:DU.GREEN_PALE},"&:active":{backgroundColor:DU.GREEN_DARK},"&.Mui-focusVisible":{borderColor:DU.GREEN_PALE,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:DU.BLUE_PALE},"&:active":{backgroundColor:DU.BLUE_DARK},"&.Mui-focusVisible":{borderColor:DU.BLUE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:DU.ORANGE_PALE},"&:active":{backgroundColor:DU.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:DU.ORANGE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:DU.RED_PALE},"&:active":{backgroundColor:DU.RED_DARK},"&.Mui-focusVisible":{borderColor:DU.RED_PALE,boxShadow:`0 0 0 3px ${Rb(DU.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:DU.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:DU.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:qU,boxShadow:`inset 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:Ws.jsx(YU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:PU,borderRadius:qU,color:DU.TEXT_PRIMARY,backgroundColor:DU.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:DU.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:DU.GREYSCALE_0_05,color:DU.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:DU.GREEN,borderColor:DU.GREEN},"&.MuiChip-outlinedInfo":{color:DU.BLUE,borderColor:DU.BLUE},"&.MuiChip-outlinedWarning":{color:DU.ORANGE,borderColor:DU.ORANGE},"&.MuiChip-outlinedError":{color:DU.RED,borderColor:DU.RED}},outlined:{border:`solid 1px ${DU.GREYSCALE_0_15}`,backgroundColor:DU.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:qU,boxShadow:"none",backgroundColor:DU.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:DU.GREEN,borderColor:DU.GREEN},outlinedSecondary:{color:DU.BLUE,borderColor:DU.BLUE},label:{fontFamily:WU.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:Ws.jsx(YU,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:Ws.jsx(VU,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:qU},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:qU,fontSize:OU,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:DU.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${DU.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:DU.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:DU.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:DU.GREYSCALE_0_05}}},popupIndicator:{borderRadius:qU,border:`solid 1px ${DU.GREYSCALE_0_15}`,color:DU.GREYSCALE_0_60,marginRight:0,width:NU,height:NU},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${DU.GREYSCALE_0_15}`},clearIndicator:{borderRadius:qU,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:DU.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:OU}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:PU,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:DU.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:DU.GREYSCALE_25,fontSize:PU,fontFamily:WU.FONT_FAMILY,fontWeight:zU,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:DU.TEXT_PRIMARY},"&.Mui-error":{color:DU.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:DU.TEXT_SECONDARY,content:"'(optional)'",fontWeight:jU,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:DU.TEXT_SECONDARY,content:"'(required)'",fontWeight:jU,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:OU,lineHeight:"16px",backgroundColor:DU.WHITE,borderRadius:qU,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${DU.GREYSCALE_0_05}`,borderColor:DU.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${DU.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${DU.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${DU.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${DU.RED}`,boxShadow:`0px 0px 0px 1px ${DU.RED}, inset 0 2px 0 0 ${DU.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${DU.GREYSCALE_0_10}`,borderColor:DU.GREYSCALE_0_10,backgroundColor:DU.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:DU.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:DU.GREYSCALE_0_15,borderRadius:qU,boxShadow:`inset 0 2px 0 0 ${DU.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>Ws.jsx(VU,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:DU.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:DU.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:DU.GREYSCALE_0_03},"&:active":{backgroundColor:DU.GREYSCALE_0_10},"&:focus":{backgroundColor:DU.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${DU.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:DU.GREYSCALE_0_30,"&:hover":{backgroundColor:DU.GREYSCALE_0_0,borderColor:DU.GREYSCALE_0_15},"& ~svg":{color:DU.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${DU.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:qU}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:DU.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${DU.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:DU.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:OU,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:PU,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:PU,fontWeight:zU,color:DU.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:zU}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${DU.GREYSCALE_0_15}, 0px 0px 0px 1px ${DU.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:Ws.jsx(ZU,{}),checkedIcon:Ws.jsx(QU,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:DU.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:DU.GREEN_PALE,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:DU.BLUE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:DU.GREYSCALE_0_20}},"&.Mui-disabled":{fill:DU.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:Ws.jsx(tY,{}),checkedIcon:Ws.jsx(XU,{}),indeterminateIcon:Ws.jsx(JU,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:qU,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:DU.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:DU.GREYSCALE_0_55,color:DU.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:DU.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:DU.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:DU.GREYSCALE_0_55,"&:hover":{color:DU.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:DU.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:DU.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:OU,color:DU.TEXT_PRIMARY,lineHeight:"16px",fontWeight:zU},secondary:{fontSize:PU,color:DU.GREYSCALE_45,fontWeight:jU,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:OU,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:OU,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:DU.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:PU,borderBottom:`solid 1px ${DU.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:OU,color:DU.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:DU.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:DU.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:DU.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:"url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%228px%22%20height%3D%227px%22%20viewBox%3D%220%200%208%207%22%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-labelledby%3D%22Tick%22%3E%20%20%3Cg%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cg%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M7.51662484%2C1.29325%20C7.12545778%2C0.90225%206.49218732%2C0.90225%206.10202068%2C1.29325%20L2.73658335%2C4.65725%20L1.90722914%2C3.82925%20C1.5170625%2C3.43825%200.883792042%2C3.43825%200.492624979%2C3.82925%20C0.102458344%2C4.21925%200.102458344%2C4.85225%200.492624979%2C5.24325%20L2.02928127%2C6.77825%20C2.4194479%2C7.16925%203.05271836%2C7.16925%203.44388542%2C6.77825%20L7.51662484%2C2.70725%20C7.9077919%2C2.31725%207.9077919%2C1.68425%207.51662484%2C1.29325%22%3E%3C%2Fpath%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E')",fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:DU.RED}}},"&.Mui-focusVisible":{backgroundColor:DU.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:DU.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:DU.GREEN,height:"24px","&.Mui-disabled":{color:DU.GREYSCALE_0_15}},rail:{backgroundColor:DU.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${DU.GREYSCALE_0_05}`,borderRadius:qU,boxShadow:`inset 0px 0px 0px 1px ${DU.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${DU.GREYSCALE_0_05}`,borderRadius:qU},thumb:{height:"16px",width:"16px",borderRadius:qU,backgroundColor:DU.WHITE,boxShadow:`0px 1px 2px 0px ${DU.GREYSCALE_0_15}, 0px 0px 0px 1px ${DU.GREYSCALE_0_05}`,"&:hover":{borderRadius:qU,boxShadow:`0 2px 4px 0 ${DU.GREYSCALE_0_30}, 0 0 0 1px ${DU.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${DU.GREYSCALE_0_15}, 0 0 0 1px ${DU.GREYSCALE_0_06}, 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${DU.GREYSCALE_0_15}, 0 0 0 1px ${DU.GREYSCALE_0_06}, 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:DU.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:DU.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:DU.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:DU.GREYSCALE_0_15},markLabel:{color:DU.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:DU.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:DU.WHITE,color:DU.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:DU.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:DU.GREEN_PALE,boxShadow:`0 0 0 3px ${Rb(DU.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:DU.BLUE_PALE,boxShadow:`0 0 0 3px ${Rb(DU.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:DU.GREYSCALE_0_15,borderRadius:qU},thumb:{height:"16px",width:"16px",borderRadius:qU,backgroundColor:DU.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:OU,fontWeight:zU,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${DU.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${DU.MISC_FOCUS_BORDER}`,backgroundColor:DU.GREYSCALE_0_03,borderRadius:qU},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:DU.GREYSCALE_25,"&.Mui-selected":{color:DU.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:OU,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:qU,"&:hover":{backgroundColor:DU.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${DU.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${DU.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:qU,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:DU.GREYSCALE_0_05},"&:hover":{backgroundColor:DU.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${DU.GREYSCALE_85}`,borderRight:`1px solid ${DU.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:zU,backgroundColor:DU.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:DU.GREYSCALE_98,borderBottom:`1px solid ${DU.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${DU.GREYSCALE_85}`,borderTop:`1px solid ${DU.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:DU.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:DU.GREYSCALE_0_05,"&:hover":{backgroundColor:DU.GREYSCALE_0_03}},"&&:hover":{backgroundColor:DU.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>Ws.jsx(eY,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${DU.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:OU,borderRadius:qU,padding:"7px 16px",border:`1px solid ${DU.GREYSCALE_0_15}`,backgroundColor:DU.GREYSCALE_100_60,color:DU.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:DU.GREYSCALE_0_10,border:`1px solid ${DU.GREYSCALE_0_30}`},"&:hover":{backgroundColor:DU.GREYSCALE_0_03,border:`1px solid ${DU.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:DU.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${DU.MISC_FOCUS_BORDER}`,border:`1px solid ${DU.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:DU.GREYSCALE_25,backgroundColor:DU.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:DU.GREYSCALE_0_10,border:`1px solid ${DU.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:PU,height:24,width:24,padding:7},sizeLarge:{fontSize:TU,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:OU,borderRadius:qU}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:DU.GREYSCALE_20},tooltip:{backgroundColor:DU.GREYSCALE_20,fontSize:PU,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}},...e?{...nY}:{}}))(t);const iY=e=>({mode:"light",primary:{ultraLight:DU.GREEN_ULTRA_LIGHT,light:DU.GREEN_PALE,main:DU.GREEN,dark:DU.GREEN_DARK,extraDark:DU.GREEN_EXTRA_DARK,contrastText:DU.WHITE},secondary:{ultraLight:DU.BLUE_ULTRA_LIGHT,light:DU.BLUE_PALE,main:DU.BLUE,dark:DU.BLUE_DARK,extraDark:DU.BLUE_EXTRA_DARK,contrastText:DU.WHITE},error:{ultraLight:DU.RED_ULTRA_LIGHT,light:DU.RED_PALE,main:DU.RED,dark:DU.RED_DARK,extraDark:DU.RED_EXTRA_DARK,contrastText:DU.WHITE},warning:{ultraLight:DU.ORANGE_ULTRA_LIGHT,light:DU.ORANGE_PALE,main:DU.ORANGE,dark:DU.ORANGE_DARK,extraDark:DU.ORANGE_EXTRA_DARK,contrastText:DU.WHITE},success:{ultraLight:DU.GREEN_ULTRA_LIGHT,light:DU.GREEN_PALE,main:DU.GREEN,dark:DU.GREEN_DARK,extraDark:DU.GREEN_EXTRA_DARK,contrastText:DU.WHITE},info:{ultraLight:DU.BLUE_ULTRA_LIGHT,light:DU.BLUE_PALE,main:DU.BLUE,dark:DU.BLUE_DARK,extraDark:DU.BLUE_EXTRA_DARK,contrastText:DU.WHITE},text:{primary:DU.TEXT_PRIMARY,secondary:DU.TEXT_SECONDARY,disabled:DU.GREYSCALE_0_30},action:{hover:DU.GREYSCALE_0_03,hoverOpacity:.03,selected:DU.GREYSCALE_0_05,selectedOpacity:.05,focus:DU.MISC_FOCUS_BORDER},amethyst:{ultraLight:DU.WHITE,main:DU.PURPLE,light:DU.PURPLE_PALE,dark:DU.PURPLE_DARK,extraDark:DU.GREYSCALE_0_0,contrastText:DU.WHITE},background:{paper:DU.WHITE,default:DU.GREYSCALE_95},divider:DU.GREYSCALE_0_15}),oY=(e="light",t=!1)=>((e,t=!1)=>({components:rY(0,t),palette:iY(),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:OU,fontWeightLight:FU,fontWeightRegular:jU,fontWeightMedium:zU,fontWeightBold:BU,htmlFontSize:OU,fontFamily:WU.FONT_FAMILY,button:{fontWeight:zU,fontSize:OU,textTransform:"none"},body1:{fontSize:TU,lineHeight:"24px"},body2:{fontSize:OU,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:NU,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:TU,fontWeight:zU,lineHeight:"16px"},h6:{fontSize:OU,fontWeight:zU,lineHeight:"16px"},caption:{color:DU.TEXT_SECONDARY},subtitle1:{fontSize:OU,color:DU.TEXT_SECONDARY},subtitle2:{fontSize:PU,color:DU.TEXT_SECONDARY}},shape:{borderRadius:qU}}))(0,t);const aY=(e,{selections:n,baseObjects:r,coreServices:i,nebulaObjects:o})=>{const a=function(e){var t;const n=oY();return null!=n&&null!==(t=n.components)&&void 0!==t&&null!==(t=t.MuiTable)&&void 0!==t&&t.styleOverrides&&(n.components.MuiTable.styleOverrides.root={}),hx({...n,direction:e})}("ltr");e.render(Ws.jsx(t.StrictMode,{children:Ws.jsx(Yx,{theme:a,children:Ws.jsx(iE,{...o,children:Ws.jsx(tE,{...r,children:Ws.jsx(IM,{selections:n,children:Ws.jsx(sE,{...i,children:Ws.jsx(UC,{children:Ws.jsx(LU,{})})})})})})})}))};var sY,lY,cY,uY;!function(e){e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider"}(sY||(sY={})),function(e){e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2"}(lY||(lY={})),function(e){e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value"}(cY||(cY={})),function(e){e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor"}(uY||(uY={}));const dY=e=>e?`${parseInt(e,10)}px`:void 0,pY=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?sg.Transparent:n}},hY=(e,t)=>+(parseInt(e,10)*ag*t+8).toFixed(2),fY=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?ig:"normal",mY=e=>null!=e&&e.some((e=>"italic"===e))?"italic":"normal",gY=e=>null!=e&&e.some((e=>"underline"===e))?"underline":"none",yY=document.createElement("textarea");function bY(e){yY.value=e,document.body.appendChild(yY),yY.select(),yY.setSelectionRange(0,yY.value.length),document.execCommand("copy"),document.body.removeChild(yY)}yY.style.position="absolute",yY.style.left="-9999px",yY.setAttribute("readonly","");function vY(e){null==C||C(((t,n)=>{const r=n.target,i=null==r?void 0:r.closest(`.${Ut}`);null!=i&&i.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:async()=>{(e=>{var t;const n=e.title;n&&(null!==(t=navigator.clipboard)&&void 0!==t&&t.writeText?navigator.clipboard.writeText(n).catch((()=>{bY(n)})):bY(n))})(i)}}),null==e||e.forEach((e=>{e(t,n,i)}))}))}const xY=({model:e,env:t,layoutService:n,effectivePropertiesService:r,translator:i})=>Rg(((o,a,s)=>{if(!e||r.qAlwaysFullyExpanded||!t.flags.isEnabled("CLIENT_IM_6273_EXPAND_OR_COLLAPSE_DIM"))return;const l=e,c=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group"}),{qDimName:u,label:d}=((e,t)=>{const n=((e,t)=>{const n=null==e?void 0:e.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qDimName:n.qGroupFieldDefs.at(n.qGroupPos),label:n.qFallbackTitle}:{qDimName:void 0,label:void 0}})(s,n);c.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(cE,0,0,!0),await e.expandLeft(cE,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(l)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qDimName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--plus",translation:i.get("SNPivotTable.ContextMenu.ExpandDimension",[null!=r?r:""]),tid:"expand-dimension",select:YA({model:e,qExpansionState:t.qExpansionState,qDimName:n,action:GA.Expand})}))({model:l,effectivePropertiesService:r,qDimName:u,label:d,translator:i})),c.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(cE,0,0,!0),await e.collapseLeft(cE,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(l)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qDimName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--minus",translation:i.get("SNPivotTable.ContextMenu.CollapseDimension",[null!=r?r:""]),tid:"collapse-dimension",select:YA({model:e,qExpansionState:t.qExpansionState,qDimName:n,action:GA.Collapse})}))({model:l,effectivePropertiesService:r,qDimName:u,label:d,translator:i}))}),[e,n,r]),wY=(e,t)=>b((()=>(({layout:e,flags:t})=>{var n,r,i,o;const{qHyperCube:a,nullValueRepresentation:s,snapshotData:l}=e,{qNoOfLeftDims:c,qEffectiveInterColumnSortOrder:u,qMeasureInfo:d,qDimensionInfo:p}=a,h=!!l,f=null!==(n=null==l||null===(r=l.content)||void 0===r?void 0:r.rowsPerPage)&&void 0!==n?n:15e3,m={x:Math.min(e.qHyperCube.qSize.qcx,og),y:Math.min(e.qHyperCube.qSize.qcy,f)},g=u.slice(0,c),y=e=>g.some((t=>t===e)),b=y(uE),v=new Map(u.map((e=>{var t;return[null!==(t=p[e])&&void 0!==t?t:uE,e]}))),x=d.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return{layout:e,getNullValueText:()=>{var e;return null!==(e=null==s?void 0:s.text)&&void 0!==e?e:"-"},getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(b)return 0;const n=e%x.length;return t?n:d.findIndex((e=>e===x[n]))},getDimensionInfo:e=>e===uE?uE:p[e],getDimensionInfoIndex:e=>{var t;return null!==(t=v.get(e))&&void 0!==t?t:-1},size:m,isSnapshot:h,hasLimitedData:!h&&m.x<e.qHyperCube.qSize.qcx,hasData:m.x>0&&m.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:b,leftDimensionInfoIndexes:g,isLeftDimension:y,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:x,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode)&&t.isEnabled("CLIENT_IM_5975_INDENT_MODE"),indentModeFeatures:{isLinksSupported:t.isEnabled("CLIENT_IM_5975_INDENT_MODE_LINKS")},indentModeColumnWidth:null!==(i=e.qHyperCube.indentModeColumnWidth)&&void 0!==i?i:{type:Jt.Auto,pixels:Xt.PixelsDefault,percentage:Xt.PercentageDefault},searchSortFromDimension:"inherit"===(null===(o=e.search)||void 0===o?void 0:o.sorting)}})({layout:e,flags:t})),[e,t]),SY=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:i})=>{const{layout:o,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=Ig(e);return t.current=e,t})(zC(i));return Ng((async()=>{var t;const{qHyperCube:i}=o,{maxNumberOfVisibleRows:c,maxNumberOfVisibleColumns:u}=l.current;var d,p;if(a)return null!==(d=null===(p=o.snapshotData)||void 0===p||null===(p=p.content)||void 0===p?void 0:p.qPivotDataPages)&&void 0!==d?d:[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,c,u)||((e,t,n,r)=>{var i,o;const{qHyperCube:{qPivotDataPages:a,qSize:s}}=e,{qTop:l,qWidth:c,qHeight:u}=null!==(i=null===(o=a[0])||void 0===o?void 0:o.qArea)&&void 0!==i?i:{qTop:0,qWidth:0,qHeight:0};return l<t.page*t.rowsPerPage||c<Math.min(r,s.qcx)||u<Math.min(n,s.qcy)})(o,r,c,u))){const t=((e,t,n,r,i,o)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(og,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-i)),n>l&&(c=Math.max(0,l-o))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,o),qHeight:Math.min(s-u,i)}})(s,n,o.qHyperCube.qSize,r,c,u);return t?e.getHyperCubePivotData(cE,BC(t)):[]}return null!==(t=i.qPivotDataPages)&&void 0!==t?t:[]}),[o,a,e,n,r.page,r.rowsPerPage,l,s])},EY=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),CY=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:EY({rowsPerPage:n,totalRowCount:e,page:t})}),_Y=15,MY=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:i})=>{var o;return _((async e=>{const o=e;if(!o.snapshotData||!r||o.snapshotData.content)return o;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-_Y,0),c=Math.max(s+i-_Y,s,0),u=og-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=zC(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,o+30),qHeight:Math.min(d,a+30)}})(t,i,n),u=BC(c),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};o.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(cE,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:i.page,rowsPerPage:i.rowsPerPage},o.snapshotData.object.size.w=n.width,o.snapshotData.object.size.h=n.height}return o})),M((()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,i)})),[t]),null!==(o=e.layout.snapshotData)&&void 0!==o&&o.content?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var kY={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const RY=()=>{const e=k(),t=e.language();return b((()=>{!function(e){if(e.get&&e.add){const t="SNPivotTable_LimitedData";if(e.get(t)!==t)return;Object.keys(kY).forEach((t=>{e.add(kY[t])}))}}(e)}),[e]),{translator:e,language:t}},AY=e=>{const{flags:t}=e,n=R(),r=(e=>{const t=b((()=>zg(e)),[e]);return S((()=>()=>{t.unmount()}),[t]),t})(n),i=A(),o=I(),a=L(),s=D(),l=P(),c=O(),u=Lg(),d=((e,t)=>{const[n]=Ng((async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}}),[e,t]),r=b((()=>{var e,t;const r=void 0!==(null==n?void 0:n.qHyperCubeDef.qSortbyYValue)&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),i=null!==(e=null==n?void 0:n.qHyperCubeDef.qDimensions.map((e=>e.qDef.qSortCriterias)))&&void 0!==e?e:[];return{qAlwaysFullyExpanded:null!==(t=null==n?void 0:n.qHyperCubeDef.qAlwaysFullyExpanded)&&void 0!==t&&t,qExpansionState:null==n?void 0:n.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:r,getSortCriteriaForDimension:e=>i[e]}}),[n]);return r})(o,i),p=wY(i,t),h=T(),f=Tg(i,n),{translator:m,language:g}=RY(),{pageInfo:y,updatePageInfo:v}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,i=t.isDownloadedAsPDForImage||e.isSnapshot,o=(e=>{var t;return null===(t=e.layout.snapshotData)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.rowsPerPage})(e),[a,s]=w((()=>{const a=((e,t)=>{var n,r,i,o;return t.isDownloadedAsPDForImage?null!==(n=null===(r=t.viewState)||void 0===r?void 0:r.renderPage)&&void 0!==n?n:0:e.isSnapshot&&null!==(i=null===(o=e.layout.snapshotData)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.page)&&void 0!==i?i:0})(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!i,...CY(r.qcy,a,o)}})),l=e.layout.qHyperCube.qSize.qcy;return S((()=>{s((t=>({...t,...CY(l,t.page,o),shouldShowPagination:l>e.size.y&&!i})))}),[l,e.size.y,s,i,o]),S((()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=EY({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}}),[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:EY({...a,...e})})}}})(p,u),x=((e,t,n)=>b((()=>((e,t)=>{var n,r,i,o,a,s,l,c;if(e.isDownloadedAsPDForImage){var u,d,p,h;const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:null!==(u=null==t?void 0:t.scrollTop)&&void 0!==u?u:0,scrollLeft:null!==(d=null==t?void 0:t.scrollLeft)&&void 0!==d?d:0,leftGridScrollLeft:null!==(p=null==t?void 0:t.leftGridScrollLeft)&&void 0!==p?p:0,topGridScrollTop:null!==(h=null==t?void 0:t.topGridScrollTop)&&void 0!==h?h:0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:null!==(n=null==t||null===(r=t.content)||void 0===r?void 0:r.scrollTop)&&void 0!==n?n:0,scrollLeft:null!==(i=null==t||null===(o=t.content)||void 0===o?void 0:o.scrollLeft)&&void 0!==i?i:0,leftGridScrollLeft:null!==(a=null==t||null===(s=t.content)||void 0===s?void 0:s.leftGridScrollLeft)&&void 0!==a?a:0,topGridScrollTop:null!==(l=null==t||null===(c=t.content)||void 0===c?void 0:c.topGridScrollTop)&&void 0!==l?l:0}})(n,t.snapshotData)),[n,e.page,t.snapshotData]))(y,i,u),E=MY({rect:N(),layoutService:p,viewService:x,model:o,pageInfo:y}),[C,_]=SY({model:o,layoutService:p,viewService:x,pageInfo:y,rect:E}),M=b((()=>((e,t,n)=>{var r,i,o,a,s,l,c,u,d,p,h,f,m,g,y,b,v,x,w,S,E,C,_,M,k,R,A,I,L,D,P,O,T,N,q,F,j,z,B,W,$,H,G,V,U,Y,K;const X=null===(r=t.layout.components)||void 0===r?void 0:r.find((e=>"theme"===e.key)),J=null==X?void 0:X.header,Z=null==X?void 0:X.dimensionValues,Q=null==X?void 0:X.measureValues,ee=null==X?void 0:X.measureLabels,te=null==X?void 0:X.totalValues,ne=null==X?void 0:X.nullValues,re=null==X?void 0:X.grid,ie=(t,n,r)=>e.getStyle(t,n,r),oe=+(null!==(i=null!==(o=null==re?void 0:re[sY.LineClamp])&&void 0!==o?o:ie(lY.Grid,cY.Grid,uY.LineClamp))&&void 0!==i?i:1),ae=n.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")?+(null!==(a=null!==(s=null==re?void 0:re[sY.ColumnLineClamp])&&void 0!==s?s:ie(lY.Grid,cY.Grid,uY.ColumnLineClamp))&&void 0!==a?a:1):1,se=null!==(l=null!==(c=pY(e,null==J?void 0:J[sY.Background]))&&void 0!==c?c:ie(lY.Dimension,cY.LabelName,uY.BackgroundColor))&&void 0!==l?l:sg.Transparent,le={header:{fontSize:null!==(u=null!==(d=dY(null==J?void 0:J[sY.FontSize]))&&void 0!==d?d:ie(lY.Dimension,cY.LabelName,uY.FontSize))&&void 0!==u?u:ng,fontFamily:null!==(p=null!==(h=null==J?void 0:J[sY.FontFamily])&&void 0!==h?h:ie(lY.Dimension,cY.LabelName,uY.FontFamily))&&void 0!==p?p:rg,fontWeight:fY(null==J?void 0:J[sY.FontStyle],ig),fontStyle:mY(null==J?void 0:J[sY.FontStyle]),textDecoration:gY(null==J?void 0:J[sY.FontStyle]),color:null!==(f=null!==(m=pY(e,null==J?void 0:J[sY.FontColor]))&&void 0!==m?m:ie(lY.Dimension,cY.LabelName,uY.FontColor))&&void 0!==f?f:hf.TEXT,background:se,hoverBackground:Hm(se,Zt),activeBackground:Hm(se,Qt)},dimensionValues:{fontSize:null!==(g=null!==(y=dY(null==Z?void 0:Z[sY.FontSize]))&&void 0!==y?y:ie(lY.Dimension,cY.LabelValue,uY.FontSize))&&void 0!==g?g:ng,fontFamily:null!==(b=null!==(v=null==Z?void 0:Z[sY.FontFamily])&&void 0!==v?v:ie(lY.Dimension,cY.LabelValue,uY.FontFamily))&&void 0!==b?b:rg,fontWeight:fY(null==Z?void 0:Z[sY.FontStyle],void 0),fontStyle:mY(null==Z?void 0:Z[sY.FontStyle]),textDecoration:gY(null==Z?void 0:Z[sY.FontStyle]),color:null!==(x=null!==(w=pY(e,null==Z?void 0:Z[sY.FontColor]))&&void 0!==w?w:ie(lY.Dimension,cY.LabelValue,uY.FontColor))&&void 0!==x?x:hf.TEXT,background:null!==(S=null!==(E=pY(e,null==Z?void 0:Z[sY.Background]))&&void 0!==E?E:ie(lY.Dimension,cY.LabelValue,uY.BackgroundColor))&&void 0!==S?S:sg.Transparent},measureValues:{fontSize:null!==(C=null!==(_=dY(null==Q?void 0:Q[sY.FontSize]))&&void 0!==_?_:ie(lY.Measure,cY.LabelValue,uY.FontSize))&&void 0!==C?C:ng,fontFamily:null!==(M=null!==(k=null==Q?void 0:Q[sY.FontFamily])&&void 0!==k?k:ie(lY.Measure,cY.LabelValue,uY.FontFamily))&&void 0!==M?M:rg,fontWeight:fY(null==Q?void 0:Q[sY.FontStyle],"normal"),fontStyle:mY(null==Q?void 0:Q[sY.FontStyle]),textDecoration:gY(null==Q?void 0:Q[sY.FontStyle]),color:null!==(R=null!==(A=pY(e,null==Q?void 0:Q[sY.FontColor]))&&void 0!==A?A:ie(lY.Measure,cY.LabelValue,uY.FontColor))&&void 0!==R?R:sg.FontSecondary,background:null!==(I=null!==(L=pY(e,null==Q?void 0:Q[sY.Background]))&&void 0!==L?L:ie(lY.Measure,cY.LabelValue,uY.BackgroundColor))&&void 0!==I?I:sg.Transparent},measureLabels:{fontWeight:fY(null==ee?void 0:ee[sY.FontStyle],"normal"),fontStyle:mY(null==ee?void 0:ee[sY.FontStyle]),textDecoration:gY(null==ee?void 0:ee[sY.FontStyle]),color:null!==(D=null!==(P=pY(e,null==ee?void 0:ee[sY.FontColor]))&&void 0!==P?P:ie(lY.Measure,cY.LabelName,uY.FontColor))&&void 0!==D?D:sg.FontSecondary,background:null!==(O=null!==(T=pY(e,null==ee?void 0:ee[sY.Background]))&&void 0!==T?T:ie(lY.Measure,cY.LabelName,uY.BackgroundColor))&&void 0!==O?O:sg.Transparent},totalValues:{fontWeight:fY(null==te?void 0:te[sY.FontStyle],ig),fontStyle:mY(null==te?void 0:te[sY.FontStyle]),textDecoration:gY(null==te?void 0:te[sY.FontStyle]),color:null!==(N=null!==(q=pY(e,null==te?void 0:te[sY.FontColor]))&&void 0!==q?q:ie(lY.Total,cY.LabelValue,uY.FontColor))&&void 0!==N?N:hf.TEXT,background:null!==(F=null!==(j=pY(e,null==te?void 0:te[sY.Background]))&&void 0!==j?j:ie(lY.Total,cY.LabelValue,uY.BackgroundColor))&&void 0!==F?F:sg.Transparent},nullValues:{fontWeight:fY(null==ne?void 0:ne[sY.FontStyle],"normal"),fontStyle:mY(null==ne?void 0:ne[sY.FontStyle]),textDecoration:gY(null==ne?void 0:ne[sY.FontStyle]),color:null!==(z=null!==(B=pY(e,null==ne?void 0:ne[sY.FontColor]))&&void 0!==B?B:ie(lY.Null,cY.LabelValue,uY.FontColor))&&void 0!==z?z:hf.TEXT,background:null!==(W=null!==($=pY(e,null==ne?void 0:ne[sY.Background]))&&void 0!==$?$:ie(lY.Null,cY.LabelValue,uY.BackgroundColor))&&void 0!==W?W:sg.NullValueBackground},grid:{columnLineClamp:ae,lineClamp:oe,border:null!==(H=null!==(G=pY(e,null==re?void 0:re[sY.Border]))&&void 0!==G?G:ie(lY.Grid,cY.Grid,uY.BorderColor))&&void 0!==H?H:sg.DividerLight,divider:null!==(V=null!==(U=pY(e,null==re?void 0:re[sY.Divider]))&&void 0!==U?U:ie(lY.Grid,cY.Divider,uY.BorderColor))&&void 0!==V?V:sg.DividerDark,background:null!==(Y=null!==(K=pY(e,null==re?void 0:re[sY.Background]))&&void 0!==K?K:ie(lY.Grid,cY.Grid,uY.BackgroundColor))&&void 0!==Y?Y:sg.Transparent},selectedColors:$m(e)};return le.headerCellHeight=Math.max(hY(le.header.fontSize,ae),hY(le.dimensionValues.fontSize,ae),32),le.contentCellHeight=Math.max(hY(le.measureValues.fontSize,oe),hY(le.dimensionValues.fontSize,oe),24),le.dimensionValueTextHeight=hY(le.dimensionValues.fontSize,1),le})(f,p,t)),[f,p,t]),k=((e,t,n)=>{const[,r,i]=Ng((async()=>{var t;const r=Of(n.flags),i=e.getStyle("","","fontFamily"),o=e.getStyle("object","label.name","fontFamily"),a=e.getStyle("object","label.value","fontFamily"),s=null!==(t=e.getStyle("","","fontFamilies"))&&void 0!==t?t:[];return Promise.all([...r,...s,i,o,a,Wg].filter((e=>void 0!==e)).map((async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)})))}),[t,e,n]);return i?(console.warn("Failed to load fonts:",i),!0):!r})(f,i,e);vY([xY({model:o,env:e,layoutService:p,effectivePropertiesService:d,translator:m})]),S((()=>{!_&&o&&!!C&&k&&aY(r,{selections:h,baseObjects:{rect:E,pageInfo:y,qPivotDataPages:C,updatePageInfo:v},nebulaObjects:{env:e,app:a,model:o,embed:s,theme:f,keyboard:l,translator:m,interactions:c},coreServices:{styleService:M,viewService:x,layoutService:p,downloadService:u,effectivePropertiesService:d}})}),[o,a,E,c,h,x,p,u,_,C,M,r,k,m,g,y,v,d,s,l,f,e])},IY={version:"4.1.1",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]};function LY(e){return{qae:{properties:{initial:{...IY,qHyperCubeDef:{...IY.qHyperCubeDef,qIndentMode:!1}}},data:Et(e)},ext:Mg(e),component(){AY(e)}}}export{LY as default};