@nebula.js/sn-tabbed-container 2.15.0 → 2.16.0

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-tabbed-container v2.15.0
2
+ * @nebula.js/sn-tabbed-container v2.16.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -95,4 +95,4 @@
95
95
  }
96
96
  `),za.rippleVisible,qa,550,({theme:e})=>e.transitions.easing.easeInOut,za.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,za.child,za.childLeaving,Ya,550,({theme:e})=>e.transitions.easing.easeInOut,za.childPulsate,Ka,({theme:e})=>e.transitions.easing.easeInOut),Za=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=p(n,$a),[l,s]=y.useState([]),u=y.useRef(0),c=y.useRef(null);y.useEffect(()=>{c.current&&(c.current(),c.current=null)},[l]);const f=y.useRef(!1),h=Pr(),m=y.useRef(null),g=y.useRef(null),b=y.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;s(e=>[...e,Et.jsx(Qa,{classes:{ripple:Kn(o.ripple,za.ripple),rippleVisible:Kn(o.rippleVisible,za.rippleVisible),ripplePulsate:Kn(o.ripplePulsate,za.ripplePulsate),child:Kn(o.child,za.child),childLeaving:Kn(o.childLeaving,za.childLeaving),childPulsate:Kn(o.childPulsate,za.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)]),u.current+=1,c.current=a},[o]),v=y.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&f.current)return void(f.current=!1);"touchstart"===(null==e?void 0:e.type)&&(f.current=!0);const l=a?null:g.current,s=l?l.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(s.width/2),c=Math.round(s.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-s.left),c=Math.round(n-s.top)}if(i)d=Math.sqrt((2*s.width**2+s.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((l?l.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((l?l.clientHeight:0)-c),c)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===m.current&&(m.current=()=>{b({pulsate:o,rippleX:u,rippleY:c,rippleSize:d,cb:n})},h.start(80,()=>{m.current&&(m.current(),m.current=null)})):b({pulsate:o,rippleX:u,rippleY:c,rippleSize:d,cb:n})},[r,b,h]),E=y.useCallback(()=>{v({},{pulsate:!0})},[v]),C=y.useCallback((e,t)=>{if(h.clear(),"touchend"===(null==e?void 0:e.type)&&m.current)return m.current(),m.current=null,void h.start(0,()=>{C(e,t)});m.current=null,s(e=>e.length>0?e.slice(1):e),c.current=t},[h]);return y.useImperativeHandle(t,()=>({pulsate:E,start:v,stop:C}),[E,v,C]),Et.jsx(Xa,d({className:Kn(za.root,o.root,i),ref:g},a,{children:Et.jsx(Ta,{component:null,exit:!0,children:l})}))});function Ja(e){return Zn("MuiButtonBase",e)}const el=Jn("MuiButtonBase",["root","disabled","focusVisible"]),tl=["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"],nl=Ni("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"},[`&.${el.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),rl=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:s=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:f=!1,LinkComponent:h="a",onBlur:m,onClick:g,onContextMenu:b,onDragLeave:v,onFocus:E,onFocusVisible:C,onKeyDown:x,onKeyUp:D,onMouseDown:w,onMouseLeave:S,onMouseUp:A,onTouchEnd:k,onTouchMove:R,onTouchStart:_,tabIndex:F=0,TouchRippleProps:P,touchRippleRef:L,type:T}=n,I=p(n,tl),M=y.useRef(null),O=y.useRef(null),B=kr(O,L),{isFocusVisibleRef:N,onFocus:j,onBlur:z,ref:$}=zr(),[U,H]=y.useState(!1);s&&U&&H(!1),y.useImperativeHandle(r,()=>({focusVisible:()=>{H(!0),M.current.focus()}}),[]);const[V,G]=y.useState(!1);y.useEffect(()=>{G(!0)},[]);const W=V&&!u&&!s;function q(e,t,n=c){return Ar(r=>{t&&t(r);return!n&&O.current&&O.current[e](r),!0})}y.useEffect(()=>{U&&f&&!u&&V&&O.current.pulsate()},[u,f,U,V]);const Y=q("start",w),K=q("stop",b),X=q("stop",v),Q=q("stop",A),Z=q("stop",e=>{U&&e.preventDefault(),S&&S(e)}),J=q("start",_),ee=q("stop",k),te=q("stop",R),ne=q("stop",e=>{z(),!1===N.current&&H(!1),m&&m(e)},!1),re=Ar(e=>{M.current||(M.current=e.currentTarget),j(e),!0===N.current&&(H(!0),C&&C(e)),E&&E(e)}),oe=()=>{const e=M.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},ie=y.useRef(!1),ae=Ar(e=>{f&&!ie.current&&U&&O.current&&" "===e.key&&(ie.current=!0,O.current.stop(e,()=>{O.current.start(e)})),e.target===e.currentTarget&&oe()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&oe()&&"Enter"===e.key&&!s&&(e.preventDefault(),g&&g(e))}),le=Ar(e=>{f&&" "===e.key&&O.current&&U&&!e.defaultPrevented&&(ie.current=!1,O.current.stop(e,()=>{O.current.pulsate(e)})),D&&D(e),g&&e.target===e.currentTarget&&oe()&&" "===e.key&&!e.defaultPrevented&&g(e)});let se=l;"button"===se&&(I.href||I.to)&&(se=h);const ue={};"button"===se?(ue.type=void 0===T?"button":T,ue.disabled=s):(I.href||I.to||(ue.role="button"),s&&(ue["aria-disabled"]=s));const ce=kr(t,$,M),de=d({},n,{centerRipple:o,component:l,disabled:s,disableRipple:u,disableTouchRipple:c,focusRipple:f,tabIndex:F,focusVisible:U}),pe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Gr({root:["root",t&&"disabled",n&&"focusVisible"]},Ja,o);return n&&r&&(i.root+=` ${r}`),i})(de);return Et.jsxs(nl,d({as:se,className:Kn(pe.root,a),ownerState:de,onBlur:ne,onClick:g,onContextMenu:K,onFocus:re,onKeyDown:ae,onKeyUp:le,onMouseDown:Y,onMouseLeave:Z,onMouseUp:Q,onDragLeave:X,onTouchEnd:ee,onTouchMove:te,onTouchStart:J,ref:ce,tabIndex:s?-1:F,type:T},ue,I,{children:[i,W?Et.jsx(Za,d({ref:B,center:o},P)):null]}))});function ol(e){return Zn("MuiTypography",e)}Jn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const il=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],al=Ni("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${jt(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>d({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})),ll={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},sl={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},ul=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiTypography"}),r=(e=>sl[e]||e)(n.color),o=Vn(d({},n,{color:r})),{align:i="inherit",className:a,component:l,gutterBottom:s=!1,noWrap:u=!1,paragraph:c=!1,variant:f="body1",variantMapping:h=ll}=o,m=p(o,il),g=d({},o,{align:i,color:r,className:a,component:l,gutterBottom:s,noWrap:u,paragraph:c,variant:f,variantMapping:h}),b=l||(c?"p":h[f]||ll[f])||"span",v=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Gr({root:["root",i,"inherit"!==e.align&&`align${jt(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},ol,a)})(g);return Et.jsx(al,d({as:b,ref:t,ownerState:g,className:Kn(v.root,a)},m))});const cl=y.forwardRef(function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=y.useState(null),l=kr(y.isValidElement(n)?Qr(n):null,t);if(fr(()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,o]),fr(()=>{if(i&&!o)return xr(t,i),()=>{xr(t,null)}},[t,i,o]),o){if(y.isValidElement(n)){const e={ref:l};return y.cloneElement(n,e)}return Et.jsx(y.Fragment,{children:n})}return Et.jsx(y.Fragment,{children:i?va.createPortal(n,i):i})}),dl=["onChange","maxRows","minRows","style","value"];function pl(e){return parseInt(e,10)||0}const fl={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function hl(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const ml=y.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a}=e,l=p(e,dl),{current:s}=y.useRef(null!=a),u=y.useRef(null),c=kr(t,u),f=y.useRef(null),h=y.useRef(null),m=y.useCallback(()=>{const t=u.current,n=h.current;if(!t||!n)return;const i=Cr(t).getComputedStyle(t);if("0px"===i.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=i.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=i.boxSizing,l=pl(i.paddingBottom)+pl(i.paddingTop),s=pl(i.borderBottomWidth)+pl(i.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;o&&(p=Math.max(Number(o)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?l+s:0),overflowing:Math.abs(p-c)<=1}},[r,o,e.placeholder]),g=Ar(()=>{const e=u.current,t=m();if(!e||!t||hl(t))return!1;const n=t.outerHeightStyle;return null!=f.current&&f.current!==n}),b=y.useCallback(()=>{const e=u.current,t=m();if(!e||!t||hl(t))return;const n=t.outerHeightStyle;f.current!==n&&(f.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[m]),v=y.useRef(-1);fr(()=>{const e=yr(b),t=null==u?void 0:u.current;if(!t)return;const n=Cr(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{g()&&(r.unobserve(t),cancelAnimationFrame(v.current),b(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[m,b,g]),fr(()=>{b()});return Et.jsxs(y.Fragment,{children:[Et.jsx("textarea",d({value:a,onChange:e=>{s||b(),n&&n(e)},ref:c,rows:o,style:i},l)),Et.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:d({},fl,i,{paddingTop:0,paddingBottom:0})})]})});const gl=y.createContext(void 0);function bl(){return y.useContext(gl)}function vl(e){return Et.jsx(Un,d({},e,{defaultTheme:xi,themeId:c}))}function yl(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function El(e){return Zn("MuiInputBase",e)}const Cl=Jn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),xl=["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"],Dl=Ni("div",{name:"MuiInputBase",slot:"Root",overridesResolver:(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${jt(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]}})(({theme:e,ownerState:t})=>d({},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",[`&.${Cl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&d({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),wl=Ni("input",{name:"MuiInputBase",slot:"Input",overridesResolver:(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]}})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=d({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return d({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] + .${Cl.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Cl.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"})}),Sl=Et.jsx(vl,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Al=y.forwardRef(function(e,t){var n;const r=Ji({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:l,components:u={},componentsProps:c={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:g,fullWidth:b=!1,id:v,inputComponent:E="input",inputProps:C={},inputRef:x,maxRows:D,minRows:w,multiline:S=!1,name:A,onBlur:k,onChange:R,onClick:_,onFocus:F,onKeyDown:P,onKeyUp:L,placeholder:T,readOnly:I,renderSuffix:M,rows:O,slotProps:B={},slots:N={},startAdornment:j,type:z="text",value:$}=r,U=p(r,xl),H=null!=C.value?C.value:$,{current:V}=y.useRef(null!=H),G=y.useRef(),W=y.useCallback(e=>{},[]),q=kr(G,x,C.ref,W),[Y,K]=y.useState(!1),X=bl(),Q=function({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),{})}({props:r,muiFormControl:X,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Q.focused=X?X.focused:Y,y.useEffect(()=>{!X&&h&&Y&&(K(!1),k&&k())},[X,h,Y,k]);const Z=X&&X.onFilled,J=X&&X.onEmpty,ee=y.useCallback(e=>{!function(e,t=!1){return e&&(yl(e.value)&&""!==e.value||t&&yl(e.defaultValue)&&""!==e.defaultValue)}(e)?J&&J():Z&&Z()},[Z,J]);fr(()=>{V&&ee({value:H})},[H,ee,V]);y.useEffect(()=>{ee(G.current)},[]);let te=E,ne=C;S&&"input"===te&&(ne=d(O?{type:void 0,minRows:O,maxRows:O}:{type:void 0,maxRows:D,minRows:w},ne),te=ml);y.useEffect(()=>{X&&X.setAdornedStart(Boolean(j))},[X,j]);const re=d({},r,{color:Q.color||"primary",disabled:Q.disabled,endAdornment:g,error:Q.error,focused:Q.focused,formControl:X,fullWidth:b,hiddenLabel:Q.hiddenLabel,multiline:S,size:Q.size,startAdornment:j,type:z}),oe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:s,hiddenLabel:u,multiline:c,readOnly:d,size:p,startAdornment:f,type:h}=e;return Gr({root:["root",`color${jt(n)}`,r&&"disabled",o&&"error",s&&"fullWidth",a&&"focused",l&&"formControl",p&&"medium"!==p&&`size${jt(p)}`,c&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",c&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},El,t)})(re),ie=N.root||u.Root||Dl,ae=B.root||c.root||{},le=N.input||u.Input||wl;return ne=d({},ne,null!=(n=B.input)?n:c.input),Et.jsxs(y.Fragment,{children:[!m&&Sl,Et.jsxs(ie,d({},ae,!Wr(ie)&&{ownerState:d({},re,ae.ownerState)},{ref:t,onClick:e=>{G.current&&e.currentTarget===e.target&&G.current.focus(),_&&_(e)}},U,{className:Kn(oe.root,ae.className,l,I&&"MuiInputBase-readOnly"),children:[j,Et.jsx(gl.Provider,{value:null,children:Et.jsx(le,d({ownerState:re,"aria-invalid":Q.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:f,disabled:Q.disabled,id:v,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?G.current:{value:"x"})},name:A,placeholder:T,readOnly:I,required:Q.required,rows:O,value:H,onKeyDown:P,onKeyUp:L,type:z},ne,!Wr(le)&&{as:te,ownerState:d({},re,ne.ownerState)},{ref:q,className:Kn(oe.input,ne.className,I&&"MuiInputBase-readOnly"),onBlur:e=>{k&&k(e),C.onBlur&&C.onBlur(e),X&&X.onBlur?X.onBlur(e):K(!1)},onChange:(e,...t)=>{if(!V){const t=e.target||G.current;if(null==t)throw new Error(s(1));ee({value:t.value})}C.onChange&&C.onChange(e,...t),R&&R(e,...t)},onFocus:e=>{Q.disabled?e.stopPropagation():(F&&F(e),C.onFocus&&C.onFocus(e),X&&X.onFocus?X.onFocus(e):K(!0))}}))}),g,M?M(d({},Q,{startAdornment:j})):null]}))]})}),kl=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Rl={entering:{opacity:1},entered:{opacity:1}},_l=y.forwardRef(function(e,t){const n=Di(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:l,in:s,onEnter:u,onEntered:c,onEntering:f,onExit:h,onExited:m,onExiting:g,style:b,timeout:v=r,TransitionComponent:E=ka}=e,C=p(e,kl),x=y.useRef(null),D=kr(x,Qr(a),t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=w(f),A=w((e,t)=>{Ia(e);const r=Ma({style:b,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)}),k=w(c),R=w(g),_=w(e=>{const t=Ma({style:b,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),h&&h(e)}),F=w(m);return Et.jsx(E,d({appear:i,in:s,nodeRef:x,onEnter:A,onEntered:k,onEntering:S,onExit:_,onExited:F,onExiting:R,addEndListener:e=>{o&&o(x.current,e)},timeout:v},C,{children:(e,t)=>y.cloneElement(a,d({style:d({opacity:0,visibility:"exited"!==e||s?void 0:"hidden"},Rl[e],b,a.props.style),ref:D},t))}))});function Fl(e){return Zn("MuiBackdrop",e)}Jn("MuiBackdrop",["root","invisible"]);const Pl=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Ll=Ni("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>d({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"})),Tl=y.forwardRef(function(e,t){var n,r,o;const i=Ji({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:s="div",components:u={},componentsProps:c={},invisible:f=!1,open:h,slotProps:m={},slots:g={},TransitionComponent:b=_l,transitionDuration:v}=i,y=p(i,Pl),E=d({},i,{component:s,invisible:f}),C=(e=>{const{classes:t,invisible:n}=e;return Gr({root:["root",n&&"invisible"]},Fl,t)})(E),x=null!=(n=m.root)?n:c.root;return Et.jsx(b,d({in:h,timeout:v},y,{children:Et.jsx(Ll,d({"aria-hidden":!0},x,{as:null!=(r=null!=(o=g.root)?o:u.Root)?r:s,className:Kn(C.root,l,null==x?void 0:x.className),ownerState:d({},E,null==x?void 0:x.ownerState),classes:C,ref:t,children:a}))}))}),Il=Jn("MuiBox",["root"]),Ml=Ci(),Ol=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=Dt("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Tn);return y.forwardRef(function(e,a){const l=zn(n),s=Vn(e),{className:u,component:c="div"}=s,f=p(s,Xn);return Et.jsx(i,d({as:c,ref:a,className:Kn(u,o?o(r):r),theme:t&&l[t]||l},f))})}({themeId:c,defaultTheme:Ml,defaultClassName:Il.root,generateClassName:qn.generate});function Bl(e){return Zn("MuiButton",e)}const Nl=Jn("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","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),jl=y.createContext({}),zl=y.createContext(void 0),$l=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Ul=e=>d({},"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}}),Hl=Ni(rl,{shouldForwardProp:e=>Bi(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${jt(n.color)}`],t[`size${jt(n.size)}`],t[`${n.variant}Size${jt(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return d({},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":d({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Co.alpha(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})`:Co.alpha(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})`:Co.alpha(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:i,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":d({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Nl.focusVisible}`]:d({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Nl.disabled}`]:d({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 ${Co.alpha(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:o,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"},[`&.${Nl.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Nl.disabled}`]:{boxShadow:"none"}}),Vl=Ni("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${jt(n.size)}`]]}})(({ownerState:e})=>d({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},Ul(e))),Gl=Ni("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${jt(n.size)}`]]}})(({ownerState:e})=>d({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},Ul(e))),Wl=y.forwardRef(function(e,t){const n=y.useContext(jl),r=y.useContext(zl),o=Ji({props:pr(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:l="button",className:s,disabled:u=!1,disableElevation:c=!1,disableFocusRipple:f=!1,endIcon:h,focusVisibleClassName:m,fullWidth:g=!1,size:b="medium",startIcon:v,type:E,variant:C="text"}=o,x=p(o,$l),D=d({},o,{color:a,component:l,disabled:u,disableElevation:c,disableFocusRipple:f,fullWidth:g,size:b,type:E,variant:C}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return d({},a,Gr({root:["root",i,`${i}${jt(t)}`,`size${jt(o)}`,`${i}Size${jt(o)}`,`color${jt(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${jt(o)}`],endIcon:["icon","endIcon",`iconSize${jt(o)}`]},Bl,a))})(D),S=v&&Et.jsx(Vl,{className:w.startIcon,ownerState:D,children:v}),A=h&&Et.jsx(Gl,{className:w.endIcon,ownerState:D,children:h}),k=r||"";return Et.jsxs(Hl,d({ownerState:D,className:Kn(n.className,w.root,s,k),component:l,disabled:u,focusRipple:!f,focusVisibleClassName:Kn(w.focusVisible,m),ref:t,type:E},x,{classes:w,children:[S,i,A]}))});function ql(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Yl(e){return parseInt(Cr(e).getComputedStyle(e).paddingRight,10)||0}function Kl(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===i.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&&ql(e,o)})}function Xl(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Ql(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Er(e);return t.body===e?Cr(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=$r(Er(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Yl(r)+e}px`;const t=Er(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Yl(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Er(r).body;else{const t=r.parentElement,n=Cr(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 Zl=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Jl(e){const t=[],n=[];return Array.from(e.querySelectorAll(Zl)).forEach((e,r)=>{const o=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!==o&&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===o?t.push(e):n.push({documentOrder:r,tabIndex:o,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 es(){return!0}function ts(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Jl,isEnabled:a=es,open:l}=e,s=y.useRef(!1),u=y.useRef(null),c=y.useRef(null),d=y.useRef(null),p=y.useRef(null),f=y.useRef(!1),h=y.useRef(null),m=kr(Qr(t),h),g=y.useRef(null);y.useEffect(()=>{l&&h.current&&(f.current=!n)},[n,l]),y.useEffect(()=>{if(!l||!h.current)return;const e=Er(h.current);return h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(s.current=!0,d.current.focus()),d.current=null)}},[l]),y.useEffect(()=>{if(!l||!h.current)return;const e=Er(h.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===h.current&&t.shiftKey&&(s.current=!0,c.current&&c.current.focus())},n=()=>{const t=h.current;if(null===t)return;if(!e.hasFocus()||!a()||s.current)return void(s.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==c.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==c.current||(n=i(h.current)),n.length>0){var o,l;const e=Boolean((null==(o=g.current)?void 0:o.shiftKey)&&"Tab"===(null==(l=g.current)?void 0:l.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,o,a,l,i]);const b=e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0};return Et.jsxs(y.Fragment,{children:[Et.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),y.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),Et.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:c,"data-testid":"sentinelEnd"})]})}const ns=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&&ql(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);Kl(t,e.mount,e.modalRef,r,!0);const o=Xl(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Xl(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=Ql(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Xl(this.containers,t=>-1!==t.modals.indexOf(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&ql(e.modalRef,t),Kl(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&ql(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function rs(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=ns,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:l,children:s,onClose:u,open:c,rootRef:p}=e,f=y.useRef({}),h=y.useRef(null),m=y.useRef(null),g=kr(m,p),[b,v]=y.useState(!c),E=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let C=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(C=!1);const x=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),D=()=>{o.mount(x(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},w=Ar(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Er(h.current).body;o.add(x(),e),m.current&&D()}),S=y.useCallback(()=>o.isTopModal(x()),[o]),A=Ar(e=>{h.current=e,e&&(c&&S()?D():m.current&&ql(m.current,C))}),k=y.useCallback(()=>{o.remove(x(),C)},[C,o]);y.useEffect(()=>()=>{k()},[k]),y.useEffect(()=>{c?w():E&&i||k()},[c,k,E,i,w]);const R=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},_=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=qr(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=d({},n,t);return d({role:"presentation"},r,{onKeyDown:R(r),ref:g})},getBackdropProps:(e={})=>d({"aria-hidden":!0},e,{onClick:_(e),open:c}),getTransitionProps:()=>({onEnter:vr(()=>{v(!1),a&&a()},null==s?void 0:s.props.onEnter),onExited:vr(()=>{v(!0),l&&l(),i&&k()},null==s?void 0:s.props.onExited)}),rootRef:g,portalRef:A,isTopModal:S,exited:b,hasTransition:E}}function os(e){return Zn("MuiModal",e)}Jn("MuiModal",["root","hidden","backdrop"]);const is=["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"],as=Ni("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})=>d({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),ls=Ni(Tl,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),ss=y.forwardRef(function(e,t){var n,r,o,i,a,l;const s=Ji({name:"MuiModal",props:e}),{BackdropComponent:u=ls,BackdropProps:c,className:f,closeAfterTransition:h=!1,children:m,container:g,component:b,components:v={},componentsProps:E={},disableAutoFocus:C=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:D=!1,disablePortal:w=!1,disableRestoreFocus:S=!1,disableScrollLock:A=!1,hideBackdrop:k=!1,keepMounted:R=!1,onBackdropClick:_,open:F,slotProps:P,slots:L}=s,T=p(s,is),I=d({},s,{closeAfterTransition:h,disableAutoFocus:C,disableEnforceFocus:x,disableEscapeKeyDown:D,disablePortal:w,disableRestoreFocus:S,disableScrollLock:A,hideBackdrop:k,keepMounted:R}),{getRootProps:M,getBackdropProps:O,getTransitionProps:B,portalRef:N,isTopModal:j,exited:z,hasTransition:$}=rs(d({},I,{rootRef:t})),U=d({},I,{exited:z}),H=(e=>{const{open:t,exited:n,classes:r}=e;return Gr({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},os,r)})(U),V={};if(void 0===m.props.tabIndex&&(V.tabIndex="-1"),$){const{onEnter:e,onExited:t}=B();V.onEnter=e,V.onExited=t}const G=null!=(n=null!=(r=null==L?void 0:L.root)?r:v.Root)?n:as,W=null!=(o=null!=(i=null==L?void 0:L.backdrop)?i:v.Backdrop)?o:u,q=null!=(a=null==P?void 0:P.root)?a:E.root,Y=null!=(l=null==P?void 0:P.backdrop)?l:E.backdrop,K=Xr({elementType:G,externalSlotProps:q,externalForwardedProps:T,getSlotProps:M,additionalProps:{ref:t,as:b},ownerState:U,className:Kn(f,null==q?void 0:q.className,null==H?void 0:H.root,!U.open&&U.exited&&(null==H?void 0:H.hidden))}),X=Xr({elementType:W,externalSlotProps:Y,additionalProps:c,getSlotProps:e=>O(d({},e,{onClick:t=>{_&&_(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Kn(null==Y?void 0:Y.className,null==c?void 0:c.className,null==H?void 0:H.backdrop),ownerState:U});return R||F||$&&!z?Et.jsx(cl,{ref:N,container:g,disablePortal:w,children:Et.jsxs(G,d({},K,{children:[!k&&u?Et.jsx(W,d({},X)):null,Et.jsx(ts,{disableEnforceFocus:x,disableAutoFocus:C,disableRestoreFocus:S,isEnabled:j,open:F,children:y.cloneElement(m,V)})]}))}):null});function us(e){return Zn("MuiDivider",e)}const cs=Jn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),ds=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],ps=Ni("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})=>d({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)`:Co.alpha(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})=>d({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>d({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>d({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>d({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),fs=Ni("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>d({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)`})),hs=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:l=!1,light:s=!1,orientation:u="horizontal",role:c=("hr"!==a?"separator":void 0),textAlign:f="center",variant:h="fullWidth"}=n,m=p(n,ds),g=d({},n,{absolute:r,component:a,flexItem:l,light:s,orientation:u,role:c,textAlign:f,variant:h}),b=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:l,variant:s}=e;return Gr({root:["root",t&&"absolute",s,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===l&&"vertical"!==a&&"textAlignRight","left"===l&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},us,r)})(g);return Et.jsx(ps,d({as:a,className:Kn(b.root,i),role:c,ref:t,ownerState:g},m,{children:o?Et.jsx(fs,{className:b.wrapper,ownerState:g,children:o}):null}))});hs.muiSkipListHighlight=!0;const ms=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function gs(e){return`scale(${e}, ${e**2})`}const bs={entering:{opacity:1,transform:gs(1)},entered:{opacity:1,transform:"none"}},vs="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),ys=y.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:l,onEntered:s,onEntering:u,onExit:c,onExited:f,onExiting:h,style:m,timeout:g="auto",TransitionComponent:b=ka}=e,v=p(e,ms),E=Pr(),C=y.useRef(),x=Di(),D=y.useRef(null),w=kr(D,Qr(o),t),S=e=>t=>{if(e){const n=D.current;void 0===t?e(n):e(n,t)}},A=S(u),k=S((e,t)=>{Ia(e);const{duration:n,delay:r,easing:o}=Ma({style:m,timeout:g,easing:i},{mode:"enter"});let a;"auto"===g?(a=x.transitions.getAutoHeightDuration(e.clientHeight),C.current=a):a=n,e.style.transition=[x.transitions.create("opacity",{duration:a,delay:r}),x.transitions.create("transform",{duration:vs?a:.666*a,delay:r,easing:o})].join(","),l&&l(e,t)}),R=S(s),_=S(h),F=S(e=>{const{duration:t,delay:n,easing:r}=Ma({style:m,timeout:g,easing:i},{mode:"exit"});let o;"auto"===g?(o=x.transitions.getAutoHeightDuration(e.clientHeight),C.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:vs?o:.666*o,delay:vs?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=gs(.75),c&&c(e)}),P=S(f);return Et.jsx(b,d({appear:r,in:a,nodeRef:D,onEnter:k,onEntered:R,onEntering:A,onExit:F,onExited:P,onExiting:_,addEndListener:e=>{"auto"===g&&E.start(C.current||0,e),n&&n(D.current,e)},timeout:"auto"===g?null:g},v,{children:(e,t)=>y.cloneElement(o,d({style:d({opacity:0,transform:gs(.75),visibility:"exited"!==e||a?void 0:"hidden"},bs[e],m,o.props.style),ref:w},t))}))});function Es(e){return Zn("MuiInputAdornment",e)}ys.muiSupportAuto=!0;const Cs=Jn("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var xs;const Ds=["children","className","component","disablePointerEvents","disableTypography","position","variant"],ws=Ni("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${jt(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(({theme:e,ownerState:t})=>d({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Cs.positionStart}&:not(.${Cs.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})),Ss=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:s,variant:u}=n,c=p(n,Ds),f=bl()||{};let h=u;u&&f.variant,f&&!h&&(h=f.variant);const m=d({},n,{hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:a,position:s,variant:h}),g=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Gr({root:["root",n&&"disablePointerEvents",o&&`position${jt(o)}`,a,r&&"hiddenLabel",i&&`size${jt(i)}`]},Es,t)})(m);return Et.jsx(gl.Provider,{value:null,children:Et.jsx(ws,d({as:i,ownerState:m,className:Kn(g.root,o),ref:t},c,{children:"string"!=typeof r||l?Et.jsxs(y.Fragment,{children:["start"===s?xs||(xs=Et.jsx("span",{className:"notranslate",children:"​"})):null,r]}):Et.jsx(ul,{color:"text.secondary",children:r})}))})}),As=y.createContext({});function ks(e){return Zn("MuiList",e)}Jn("MuiList",["root","padding","dense","subheader"]);const Rs=["children","className","component","dense","disablePadding","subheader"],_s=Ni("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})=>d({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Fs=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:l=!1,subheader:s}=n,u=p(n,Rs),c=y.useMemo(()=>({dense:a}),[a]),f=d({},n,{component:i,dense:a,disablePadding:l}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Gr({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},ks,t)})(f);return Et.jsx(As.Provider,{value:c,children:Et.jsxs(_s,d({as:i,className:Kn(h.root,o),ref:t,ownerState:f},u,{children:[s,r]}))})});function Ps(e){return Zn("MuiListItem",e)}const Ls=Jn("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function Ts(e){return Zn("MuiListItemButton",e)}const Is=Jn("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Ms=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Os=Ni(rl,{shouldForwardProp:e=>Bi(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>d({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Is.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Is.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Is.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Co.alpha(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})`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Is.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Is.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Bs=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:o=!1,component:i="div",children:a,dense:l=!1,disableGutters:s=!1,divider:u=!1,focusVisibleClassName:c,selected:f=!1,className:h}=n,m=p(n,Ms),g=y.useContext(As),b=y.useMemo(()=>({dense:l||g.dense||!1,alignItems:r,disableGutters:s}),[r,g.dense,l,s]),v=y.useRef(null);fr(()=>{o&&v.current&&v.current.focus()},[o]);const E=d({},n,{alignItems:r,dense:b.dense,disableGutters:s,divider:u,selected:f}),C=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:l}=e;return d({},n,Gr({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",l&&"selected"]},Ts,n))})(E),x=kr(v,t);return Et.jsx(As.Provider,{value:b,children:Et.jsx(Os,d({ref:x,href:m.href||m.to,component:(m.href||m.to)&&"div"===i?"button":i,focusVisibleClassName:Kn(C.focusVisible,c),ownerState:E,className:Kn(C.root,h)},m,{classes:C,children:a}))})});function Ns(e){return Zn("MuiListItemSecondaryAction",e)}Jn("MuiListItemSecondaryAction",["root","disableGutters"]);const js=["className"],zs=Ni("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>d({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),$s=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,o=p(n,js),i=d({},n,{disableGutters:y.useContext(As).disableGutters}),a=(e=>{const{disableGutters:t,classes:n}=e;return Gr({root:["root",t&&"disableGutters"]},Ns,n)})(i);return Et.jsx(zs,d({className:Kn(a.root,r),ownerState:i,ref:t},o))});$s.muiName="ListItemSecondaryAction";const Us=["className"],Hs=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Vs=Ni("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>d({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&d({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Is.root}`]:{paddingRight:48}},{[`&.${Ls.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ls.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ls.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ls.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ls.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Co.alpha(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})`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Gs=Ni("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Ws=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:o=!1,button:i=!1,children:a,className:l,component:s,components:u={},componentsProps:c={},ContainerComponent:f="li",ContainerProps:{className:h}={},dense:m=!1,disabled:g=!1,disableGutters:b=!1,disablePadding:v=!1,divider:E=!1,focusVisibleClassName:C,secondaryAction:x,selected:D=!1,slotProps:w={},slots:S={}}=n,A=p(n.ContainerProps,Us),k=p(n,Hs),R=y.useContext(As),_=y.useMemo(()=>({dense:m||R.dense||!1,alignItems:r,disableGutters:b}),[r,R.dense,m,b]),F=y.useRef(null);fr(()=>{o&&F.current&&F.current.focus()},[o]);const P=y.Children.toArray(a),L=P.length&&(T=P[P.length-1],I=["ListItemSecondaryAction"],y.isValidElement(T)&&-1!==I.indexOf(null!=(M=T.type.muiName)?M:null==(O=T.type)||null==(O=O._payload)||null==(O=O.value)?void 0:O.muiName));var T,I,M,O;const B=d({},n,{alignItems:r,autoFocus:o,button:i,dense:_.dense,disabled:g,disableGutters:b,disablePadding:v,divider:E,hasSecondaryAction:L,selected:D}),N=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:s,hasSecondaryAction:u,selected:c}=e;return Gr({root:["root",o&&"dense",!a&&"gutters",!l&&"padding",s&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",u&&"secondaryAction",c&&"selected"],container:["container"]},Ps,r)})(B),j=kr(F,t),z=S.root||u.Root||Vs,$=w.root||c.root||{},U=d({className:Kn(N.root,$.className,l),disabled:g},k);let H=s||"li";return i&&(U.component=s||"div",U.focusVisibleClassName=Kn(Ls.focusVisible,C),H=rl),L?(H=U.component||s?H:"div","li"===f&&("li"===H?H="div":"li"===U.component&&(U.component="div")),Et.jsx(As.Provider,{value:_,children:Et.jsxs(Gs,d({as:f,className:Kn(N.container,h),ref:j,ownerState:B},A,{children:[Et.jsx(z,d({},$,!Wr(z)&&{as:H,ownerState:d({},B,$.ownerState)},U,{children:P})),P.pop()]}))})):Et.jsx(As.Provider,{value:_,children:Et.jsxs(z,d({},$,{as:H,ref:j},!Wr(z)&&{ownerState:d({},B,$.ownerState)},U,{children:[P,x&&Et.jsx($s,{children:x})]}))})});function qs(e){return Zn("MuiListItemIcon",e)}const Ys=Jn("MuiListItemIcon",["root","alignItemsFlexStart"]),Ks=["className"],Xs=Ni("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})=>d({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),Qs=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=p(n,Ks),i=d({},n,{alignItems:y.useContext(As).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return Gr({root:["root","flex-start"===t&&"alignItemsFlexStart"]},qs,n)})(i);return Et.jsx(Xs,d({className:Kn(a.root,r),ownerState:i,ref:t},o))}),Zs=Jn("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Js=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function eu(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function tu(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function nu(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 ru(e,t,n,r,o,i){let a=!1,l=o(e,t,!!t&&n);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const t=!r&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&nu(l,i)&&!t)return l.focus(),!0;l=o(e,l,n)}return!1}const ou=y.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:l=!1,disableListWrap:s=!1,onKeyDown:u,variant:c="selectedMenu"}=e,f=p(e,Js),h=y.useRef(null),m=y.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});fr(()=>{r&&h.current.focus()},[r]),y.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&n){const n=`${$r(Er(e))}px`;h.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,h.current.style.width=`calc(100% + ${n})`}return h.current}}),[]);const g=kr(h,t);let b=-1;y.Children.forEach(i,(e,t)=>{y.isValidElement(e)?(e.props.disabled||("selectedMenu"===c&&e.props.selected||-1===b)&&(b=t),b===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(b+=1,b>=i.length&&(b=-1))):b===t&&(b+=1,b>=i.length&&(b=-1))});const v=y.Children.map(i,(e,t)=>{if(t===b){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===c&&(t.tabIndex=0),y.cloneElement(e,t)}return e});return Et.jsx(Fs,d({role:"menu",ref:g,className:a,onKeyDown:e=>{const t=h.current,n=e.key,r=Er(t).activeElement;if("ArrowDown"===n)e.preventDefault(),ru(t,r,s,l,eu);else if("ArrowUp"===n)e.preventDefault(),ru(t,r,s,l,tu);else if("Home"===n)e.preventDefault(),ru(t,null,s,l,eu);else if("End"===n)e.preventDefault(),ru(t,null,s,l,tu);else if(1===n.length){const o=m.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&nu(r,o);o.previousKeyMatched&&(s||ru(t,r,!1,l,eu,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},f,{children:v}))});function iu(e){return Zn("MuiPopover",e)}Jn("MuiPopover",["root","paper"]);const au=["onEntering"],lu=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],su=["slotProps"];function uu(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function cu(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function du(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function pu(e){return"function"==typeof e?e():e}const fu=Ni(ss,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),hu=Ni(ja,{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}),mu=y.forwardRef(function(e,t){var n,r,o;const i=Ji({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:c="anchorEl",children:f,className:h,container:m,elevation:g=8,marginThreshold:b=16,open:v,PaperProps:E={},slots:C,slotProps:x,transformOrigin:D={vertical:"top",horizontal:"left"},TransitionComponent:w=ys,transitionDuration:S="auto",TransitionProps:{onEntering:A}={},disableScrollLock:k=!1}=i,R=p(i.TransitionProps,au),_=p(i,lu),F=null!=(n=null==x?void 0:x.paper)?n:E,P=y.useRef(),L=kr(P,F.ref),T=d({},i,{anchorOrigin:s,anchorReference:c,elevation:g,marginThreshold:b,externalPaperSlotProps:F,transformOrigin:D,TransitionComponent:w,transitionDuration:S,TransitionProps:R}),I=(e=>{const{classes:t}=e;return Gr({root:["root"],paper:["paper"]},iu,t)})(T),M=y.useCallback(()=>{if("anchorPosition"===c)return u;const e=pu(l),t=(e&&1===e.nodeType?e:Er(P.current).body).getBoundingClientRect();return{top:t.top+uu(t,s.vertical),left:t.left+cu(t,s.horizontal)}},[l,s.horizontal,s.vertical,u,c]),O=y.useCallback(e=>({vertical:uu(e,D.vertical),horizontal:cu(e,D.horizontal)}),[D.horizontal,D.vertical]),B=y.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=O(t);if("none"===c)return{top:null,left:null,transformOrigin:du(n)};const r=M();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,u=Cr(pu(l)),d=u.innerHeight-b,p=u.innerWidth-b;if(null!==b&&o<b){const e=o-b;o-=e,n.vertical+=e}else if(null!==b&&a>d){const e=a-d;o-=e,n.vertical+=e}if(null!==b&&i<b){const e=i-b;i-=e,n.horizontal+=e}else if(s>p){const e=s-p;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:du(n)}},[l,c,M,O,b]),[N,j]=y.useState(v),z=y.useCallback(()=>{const e=P.current;if(!e)return;const t=B(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,j(!0)},[B]);y.useEffect(()=>(k&&window.addEventListener("scroll",z),()=>window.removeEventListener("scroll",z)),[l,k,z]);y.useEffect(()=>{v&&z()}),y.useImperativeHandle(a,()=>v?{updatePosition:()=>{z()}}:null,[v,z]),y.useEffect(()=>{if(!v)return;const e=yr(()=>{z()}),t=Cr(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[l,v,z]);let $=S;"auto"!==S||w.muiSupportAuto||($=void 0);const U=m||(l?Er(pu(l)).body:void 0),H=null!=(r=null==C?void 0:C.root)?r:fu,V=null!=(o=null==C?void 0:C.paper)?o:hu,G=Xr({elementType:V,externalSlotProps:d({},F,{style:N?F.style:d({},F.style,{opacity:0})}),additionalProps:{elevation:g,ref:L},ownerState:T,className:Kn(I.paper,null==F?void 0:F.className)}),W=Xr({elementType:H,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:_,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:U,open:v},ownerState:T,className:Kn(I.root,h)}),{slotProps:q}=W,Y=p(W,su);return Et.jsx(H,d({},Y,!Wr(H)&&{slotProps:q,disableScrollLock:k},{children:Et.jsx(w,d({appear:!0,in:v,onEntering:(e,t)=>{A&&A(e,t),z()},onExited:()=>{j(!1)},timeout:$},R,{children:Et.jsx(V,d({},G,{children:f}))}))}))});function gu(e){return Zn("MuiMenu",e)}Jn("MuiMenu",["root","paper","list"]);const bu=["onEntering"],vu=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],yu={vertical:"top",horizontal:"right"},Eu={vertical:"top",horizontal:"left"},Cu=Ni(mu,{shouldForwardProp:e=>Bi(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xu=Ni(hu,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Du=Ni(ou,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),wu=y.forwardRef(function(e,t){var n,r;const o=Ji({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:l,disableAutoFocusItem:s=!1,MenuListProps:u={},onClose:c,open:f,PaperProps:h={},PopoverClasses:m,transitionDuration:g="auto",TransitionProps:{onEntering:b}={},variant:v="selectedMenu",slots:E={},slotProps:C={}}=o,x=p(o.TransitionProps,bu),D=p(o,vu),w=io(),S=d({},o,{autoFocus:i,disableAutoFocusItem:s,MenuListProps:u,onEntering:b,PaperProps:h,transitionDuration:g,TransitionProps:x,variant:v}),A=(e=>{const{classes:t}=e;return Gr({root:["root"],paper:["paper"],list:["list"]},gu,t)})(S),k=i&&!s&&f,R=y.useRef(null);let _=-1;y.Children.map(a,(e,t)=>{y.isValidElement(e)&&(e.props.disabled||("selectedMenu"===v&&e.props.selected||-1===_)&&(_=t))});const F=null!=(n=E.paper)?n:xu,P=null!=(r=C.paper)?r:h,L=Xr({elementType:E.root,externalSlotProps:C.root,ownerState:S,className:[A.root,l]}),T=Xr({elementType:F,externalSlotProps:P,ownerState:S,className:A.paper});return Et.jsx(Cu,d({onClose:c,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?yu:Eu,slots:{paper:F,root:E.root},slotProps:{root:L,paper:T},open:f,ref:t,transitionDuration:g,TransitionProps:d({onEntering:(e,t)=>{R.current&&R.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),b&&b(e,t)}},x),ownerState:S},D,{classes:m,children:Et.jsx(Du,d({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))},actions:R,autoFocus:i&&(-1===_||s),autoFocusItem:k,variant:v},u,{className:Kn(A.list,u.className),children:a}))}))});function Su(e){return Zn("MuiMenuItem",e)}const Au=Jn("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ku=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Ru=Ni(rl,{shouldForwardProp:e=>Bi(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})=>d({},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"}},[`&.${Au.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Au.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Au.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Co.alpha(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})`:Co.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Au.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Au.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${cs.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${cs.inset}`]:{marginLeft:52},[`& .${Zs.root}`]:{marginTop:0,marginBottom:0},[`& .${Zs.inset}`]:{paddingLeft:36},[`& .${Ys.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&d({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Ys.root} svg`]:{fontSize:"1.25rem"}}))),_u=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:s,role:u="menuitem",tabIndex:c,className:f}=n,h=p(n,ku),m=y.useContext(As),g=y.useMemo(()=>({dense:i||m.dense||!1,disableGutters:l}),[m.dense,i,l]),b=y.useRef(null);fr(()=>{r&&b.current&&b.current.focus()},[r]);const v=d({},n,{dense:g.dense,divider:a,disableGutters:l}),E=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return d({},a,Gr({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Su,a))})(n),C=kr(b,t);let x;return n.disabled||(x=void 0!==c?c:-1),Et.jsx(As.Provider,{value:g,children:Et.jsx(Ru,d({ref:C,role:u,tabIndex:x,component:o,focusVisibleClassName:Kn(E.focusVisible,s),className:Kn(E.root,f)},h,{ownerState:v,classes:E}))})});function Fu(e){return Zn("MuiTab",e)}const Pu=Jn("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Lu=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Tu=Ni(rl,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${jt(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Pu.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>d({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Pu.iconWrapper}`]:d({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${Pu.selected}`]:{opacity:1},[`&.${Pu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${Pu.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Pu.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${Pu.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Pu.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),Iu=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiTab"}),{className:r,disabled:o=!1,disableFocusRipple:i=!1,fullWidth:a,icon:l,iconPosition:s="top",indicator:u,label:c,onChange:f,onClick:h,onFocus:m,selected:g,selectionFollowsFocus:b,textColor:v="inherit",value:E,wrapped:C=!1}=n,x=p(n,Lu),D=d({},n,{disabled:o,disableFocusRipple:i,selected:g,icon:!!l,iconPosition:s,label:!!c,fullWidth:a,textColor:v,wrapped:C}),w=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:l,disabled:s}=e;return Gr({root:["root",i&&a&&"labelIcon",`textColor${jt(n)}`,r&&"fullWidth",o&&"wrapped",l&&"selected",s&&"disabled"],iconWrapper:["iconWrapper"]},Fu,t)})(D),S=l&&c&&y.isValidElement(l)?y.cloneElement(l,{className:Kn(w.iconWrapper,l.props.className)}):l;return Et.jsxs(Tu,d({focusRipple:!i,className:Kn(w.root,r),ref:t,role:"tab","aria-selected":g,disabled:o,onClick:e=>{!g&&f&&f(e,E),h&&h(e)},onFocus:e=>{b&&!g&&f&&f(e,E),m&&m(e)},ownerState:D,tabIndex:g?0:-1},x,{children:["top"===s||"start"===s?Et.jsxs(y.Fragment,{children:[S,c]}):Et.jsxs(y.Fragment,{children:[c,S]}),u]}))});var Mu=oa(Et.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Ou=oa(Et.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Bu(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const Nu=["onChange"],ju={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function zu(e){return Zn("MuiTabScrollButton",e)}const $u=Jn("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Uu=["className","slots","slotProps","direction","orientation","disabled"],Hu=Ni(rl,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>d({width:40,flexShrink:0,opacity:.8,[`&.${$u.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Vu=y.forwardRef(function(e,t){var n,r;const o=Ji({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:l={},direction:s}=o,u=p(o,Uu),c=d({isRtl:io()},o),f=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Gr({root:["root",n,r&&"disabled"]},zu,t)})(c),h=null!=(n=a.StartScrollButtonIcon)?n:Mu,m=null!=(r=a.EndScrollButtonIcon)?r:Ou,g=Xr({elementType:h,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:c}),b=Xr({elementType:m,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:c});return Et.jsx(Hu,d({component:"div",className:Kn(f.root,i),ref:t,role:null,ownerState:c,tabIndex:null},u,{children:"left"===s?Et.jsx(h,d({},g)):Et.jsx(m,d({},b))}))});function Gu(e){return Zn("MuiTabs",e)}const Wu=Jn("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),qu=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Yu=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Ku=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Xu=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},Qu=Ni("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Wu.scrollButtons}`]:t.scrollButtons},{[`& .${Wu.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>d({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${Wu.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Zu=Ni("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>d({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Ju=Ni("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>d({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),ec=Ni("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>d({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),tc=Ni(function(e){const{onChange:t}=e,n=p(e,Nu),r=y.useRef(),o=y.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return fr(()=>{const e=yr(()=>{const e=r.current;i(),e!==r.current&&t(r.current)}),n=Cr(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),y.useEffect(()=>{i(),t(r.current)},[t]),Et.jsx("div",d({style:ju},n,{ref:o}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),nc={},rc=y.forwardRef(function(e,t){const n=Ji({props:e,name:"MuiTabs"}),r=Di(),o=io(),{"aria-label":i,"aria-labelledby":a,action:l,centered:s=!1,children:u,className:c,component:f="div",allowScrollButtonsMobile:h=!1,indicatorColor:m="primary",onChange:g,orientation:b="horizontal",ScrollButtonComponent:v=Vu,scrollButtons:E="auto",selectionFollowsFocus:C,slots:x={},slotProps:D={},TabIndicatorProps:w={},TabScrollButtonProps:S={},textColor:A="primary",value:k,variant:R="standard",visibleScrollbar:_=!1}=n,F=p(n,qu),P="scrollable"===R,L="vertical"===b,T=L?"scrollTop":"scrollLeft",I=L?"top":"left",M=L?"bottom":"right",O=L?"clientHeight":"clientWidth",B=L?"height":"width",N=d({},n,{component:f,allowScrollButtonsMobile:h,indicatorColor:m,orientation:b,vertical:L,scrollButtons:E,textColor:A,variant:R,visibleScrollbar:_,fixed:!P,hideScrollbar:P&&!_,scrollableX:P&&!L,scrollableY:P&&L,centered:s&&!P,scrollButtonsHideMobile:!h}),j=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:l,classes:s}=e;return Gr({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Gu,s)})(N),z=Xr({elementType:x.StartScrollButtonIcon,externalSlotProps:D.startScrollButtonIcon,ownerState:N}),$=Xr({elementType:x.EndScrollButtonIcon,externalSlotProps:D.endScrollButtonIcon,ownerState:N}),[U,H]=y.useState(!1),[V,G]=y.useState(nc),[W,q]=y.useState(!1),[Y,K]=y.useState(!1),[X,Q]=y.useState(!1),[Z,J]=y.useState({overflow:"hidden",scrollbarWidth:0}),ee=new Map,te=y.useRef(null),ne=y.useRef(null),re=()=>{const e=te.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Vr(e,o?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==k){const e=ne.current.children;if(e.length>0){const t=e[ee.get(k)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},oe=Ar(()=>{const{tabsMeta:e,tabMeta:t}=re();let n,r=0;if(L)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[B]:t?t[B]:0};if(isNaN(V[n])||isNaN(V[B]))G(i);else{const e=Math.abs(V[n]-i[n]),t=Math.abs(V[B]-i[B]);(e>=1||t>=1)&&G(i)}}),ie=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=Bu,duration:a=300}=r;let l=null;const s=t[e];let u=!1;const c=()=>{u=!0},d=r=>{if(u)return void o(new Error("Animation cancelled"));null===l&&(l=r);const c=Math.min(1,(r-l)/a);t[e]=i(c)*(n-s)+s,c>=1?requestAnimationFrame(()=>{o(null)}):requestAnimationFrame(d)};s===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(T,te.current,e,{duration:r.transitions.duration.standard}):te.current[T]=e},ae=e=>{let t=te.current[T];L?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Hr()?-1:1),ie(t)},le=()=>{const e=te.current[O];let t=0;const n=Array.from(ne.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[O]>e){0===r&&(t=e);break}t+=o[O]}return t},se=()=>{ae(-1*le())},ue=()=>{ae(le())},ce=y.useCallback(e=>{J({overflow:null,scrollbarWidth:e})},[]),de=Ar(e=>{const{tabsMeta:t,tabMeta:n}=re();if(n&&t)if(n[I]<t[I]){const r=t[T]+(n[I]-t[I]);ie(r,{animation:e})}else if(n[M]>t[M]){const r=t[T]+(n[M]-t[M]);ie(r,{animation:e})}}),pe=Ar(()=>{P&&!1!==E&&Q(!X)});y.useEffect(()=>{const e=yr(()=>{te.current&&oe()});let t;const n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{var n;null==(n=t)||n.unobserve(e)}),e.addedNodes.forEach(e=>{var n;null==(n=t)||n.observe(e)})}),e(),pe()},r=Cr(te.current);let o;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ne.current.children).forEach(e=>{t.observe(e)})),"undefined"!=typeof MutationObserver&&(o=new MutationObserver(n),o.observe(ne.current,{childList:!0})),()=>{var n,i;e.clear(),r.removeEventListener("resize",e),null==(n=o)||n.disconnect(),null==(i=t)||i.disconnect()}},[oe,pe]),y.useEffect(()=>{const e=Array.from(ne.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&P&&!1!==E){const n=e[0],r=e[t-1],o={root:te.current,threshold:.99},i=new IntersectionObserver(e=>{q(!e[0].isIntersecting)},o);i.observe(n);const a=new IntersectionObserver(e=>{K(!e[0].isIntersecting)},o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}},[P,E,X,null==u?void 0:u.length]),y.useEffect(()=>{H(!0)},[]),y.useEffect(()=>{oe()}),y.useEffect(()=>{de(nc!==V)},[de,V]),y.useImperativeHandle(l,()=>({updateIndicator:oe,updateScrollButtons:pe}),[oe,pe]);const fe=Et.jsx(ec,d({},w,{className:Kn(j.indicator,w.className),ownerState:N,style:d({},V,w.style)}));let he=0;const me=y.Children.map(u,e=>{if(!y.isValidElement(e))return null;const t=void 0===e.props.value?he:e.props.value;ee.set(t,he);const n=t===k;return he+=1,y.cloneElement(e,d({fullWidth:"fullWidth"===R,indicator:n&&!U&&fe,selected:n,selectionFollowsFocus:C,onChange:g,textColor:A,value:t},1!==he||!1!==k||e.props.tabIndex?{}:{tabIndex:0}))}),ge=(()=>{const e={};e.scrollbarSizeListener=P?Et.jsx(tc,{onChange:ce,className:Kn(j.scrollableX,j.hideScrollbar)}):null;const t=P&&("auto"===E&&(W||Y)||!0===E);return e.scrollButtonStart=t?Et.jsx(v,d({slots:{StartScrollButtonIcon:x.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:z},orientation:b,direction:o?"right":"left",onClick:se,disabled:!W},S,{className:Kn(j.scrollButtons,S.className)})):null,e.scrollButtonEnd=t?Et.jsx(v,d({slots:{EndScrollButtonIcon:x.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:$},orientation:b,direction:o?"left":"right",onClick:ue,disabled:!Y},S,{className:Kn(j.scrollButtons,S.className)})):null,e})();return Et.jsxs(Qu,d({className:Kn(j.root,c),ownerState:N,ref:t,as:f},F,{children:[ge.scrollButtonStart,ge.scrollbarSizeListener,Et.jsxs(Zu,{className:j.scroller,ownerState:N,style:{overflow:Z.overflow,[L?"margin"+(o?"Left":"Right"):"marginBottom"]:_?void 0:-Z.scrollbarWidth},ref:te,children:[Et.jsx(Ju,{"aria-label":i,"aria-labelledby":a,"aria-orientation":"vertical"===b?"vertical":null,className:j.flexContainer,ownerState:N,onKeyDown:e=>{const t=ne.current,n=Er(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===b?"ArrowLeft":"ArrowUp",i="horizontal"===b?"ArrowRight":"ArrowDown";switch("horizontal"===b&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),Xu(t,n,Ku);break;case i:e.preventDefault(),Xu(t,n,Yu);break;case"Home":e.preventDefault(),Xu(t,null,Yu);break;case"End":e.preventDefault(),Xu(t,null,Ku)}},ref:ne,role:"tablist",children:me}),U&&fe]}),ge.scrollButtonEnd]}))});function oc(e){return Et.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Et.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}function ic({fontSize:e="medium",children:t=null,className:n=""}={}){return Et.jsx("i",{style:{fontSize:"small"===e?"16px":"20px",margin:"small"===e?"-2px 0":void 0,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})}function ac(e={}){return Et.jsx(ic,{...e,children:Et.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[Et.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),Et.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 lc(e={}){return Et.jsx(ic,{fontSize:"medium",...e,children:Et.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Et.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),Et.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 sc(e){return Et.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Et.jsx("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.345L9.345 8Z"})})}function uc(e={}){return Et.jsx(ic,{...e,children:Et.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Et.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[Et.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),Et.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function cc(e={}){return Et.jsx(ic,{fontSize:"medium",...e,children:Et.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Et.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Et.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function dc({className:e}){return Et.jsx(ic,{fontSize:"small",className:e,children:Et.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:Et.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Et.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:Et.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[Et.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"}),Et.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 pc(e={}){return Et.jsx(ic,{...e,children:Et.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Et.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Et.jsx("rect",{stroke:Ui.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}var fc=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:Ui.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:Ui.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:Et.jsx(oc,{"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 ${Ui.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:Ui.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`,borderRadius:qi,backgroundColor:Ui.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 ${Ui.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:Ui.WHITE,color:Ui.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:qi},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:Ui.GREYSCALE_0_15,backgroundColor:Ui.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:Ui.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${Ui.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:Ui.GREEN_PALE},"&:active":{backgroundColor:Ui.GREEN_DARK},"&.Mui-focusVisible":{borderColor:Ui.GREEN_PALE,boxShadow:`0 0 0 3px ${br(Ui.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:Ui.BLUE_PALE},"&:active":{backgroundColor:Ui.BLUE_DARK},"&.Mui-focusVisible":{borderColor:Ui.BLUE_PALE,boxShadow:`0 0 0 3px ${br(Ui.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:qi,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:Ui.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:Ui.GREYSCALE_0_42,backgroundColor:Ui.GREYSCALE_100_60,"&:active":{backgroundColor:Ui.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:Ui.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${Ui.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:Ui.PURPLE,"&.Mui-focusVisible":{borderColor:Ui.PURPLE,boxShadow:`0 0 0 3px ${br(Ui.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:Ui.GREEN,"&.Mui-focusVisible":{borderColor:Ui.GREEN,boxShadow:`0 0 0 3px ${br(Ui.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:Ui.BLUE,"&.Mui-focusVisible":{borderColor:Ui.BLUE,boxShadow:`0 0 0 3px ${br(Ui.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:Ui.ORANGE,"&.Mui-focusVisible":{borderColor:Ui.ORANGE,boxShadow:`0 0 0 3px ${br(Ui.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:Ui.RED,"&.Mui-focusVisible":{borderColor:Ui.RED,boxShadow:`0 0 0 3px ${br(Ui.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:Ui.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:Ui.PURPLE_PALE},"&:active":{backgroundColor:Ui.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:Ui.PURPLE_PALE,boxShadow:`0 0 0 3px ${br(Ui.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:Ui.GREEN_PALE},"&:active":{backgroundColor:Ui.GREEN_DARK},"&.Mui-focusVisible":{borderColor:Ui.GREEN_PALE,boxShadow:`0 0 0 3px ${br(Ui.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:Ui.BLUE_PALE},"&:active":{backgroundColor:Ui.BLUE_DARK},"&.Mui-focusVisible":{borderColor:Ui.BLUE_PALE,boxShadow:`0 0 0 3px ${br(Ui.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:Ui.ORANGE_PALE},"&:active":{backgroundColor:Ui.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:Ui.ORANGE_PALE,boxShadow:`0 0 0 3px ${br(Ui.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:Ui.RED_PALE},"&:active":{backgroundColor:Ui.RED_DARK},"&.Mui-focusVisible":{borderColor:Ui.RED_PALE,boxShadow:`0 0 0 3px ${br(Ui.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:Ui.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:Ui.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:qi,boxShadow:`inset 0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:Et.jsx(sc,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:Hi,borderRadius:qi,color:Ui.TEXT_PRIMARY,backgroundColor:Ui.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:Ui.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${Ui.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:Ui.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:Ui.GREYSCALE_0_05,color:Ui.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:Ui.GREEN,borderColor:Ui.GREEN},"&.MuiChip-outlinedInfo":{color:Ui.BLUE,borderColor:Ui.BLUE},"&.MuiChip-outlinedWarning":{color:Ui.ORANGE,borderColor:Ui.ORANGE},"&.MuiChip-outlinedError":{color:Ui.RED,borderColor:Ui.RED}},outlined:{border:`solid 1px ${Ui.GREYSCALE_0_15}`,backgroundColor:Ui.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:qi,boxShadow:"none",backgroundColor:Ui.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:Ui.GREEN,borderColor:Ui.GREEN},outlinedSecondary:{color:Ui.BLUE,borderColor:Ui.BLUE},label:{fontFamily:Zi.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:Et.jsx(sc,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:Et.jsx(oc,{"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:qi},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:qi,fontSize:Vi,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:Ui.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${Ui.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:Ui.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:Ui.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:Ui.GREYSCALE_0_05}}},popupIndicator:{borderRadius:qi,border:`solid 1px ${Ui.GREYSCALE_0_15}`,color:Ui.GREYSCALE_0_60,marginRight:0,width:Wi,height:Wi},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${Ui.GREYSCALE_0_15}`},clearIndicator:{borderRadius:qi,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:Ui.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:Vi}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:Hi,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:Ui.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:Ui.GREYSCALE_25,fontSize:Hi,fontFamily:Zi.FONT_FAMILY,fontWeight:Xi,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:Ui.TEXT_PRIMARY},"&.Mui-error":{color:Ui.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:Ui.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Ki,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:Ui.TEXT_SECONDARY,content:"'(required)'",fontWeight:Ki,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:Vi,lineHeight:"16px",backgroundColor:Ui.WHITE,borderRadius:qi,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Ui.GREYSCALE_0_05}`,borderColor:Ui.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Ui.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${Ui.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${Ui.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Ui.RED}`,boxShadow:`0px 0px 0px 1px ${Ui.RED}, inset 0 2px 0 0 ${Ui.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Ui.GREYSCALE_0_10}`,borderColor:Ui.GREYSCALE_0_10,backgroundColor:Ui.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:Ui.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:Ui.GREYSCALE_0_15,borderRadius:qi,boxShadow:`inset 0 2px 0 0 ${Ui.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>Et.jsx(oc,{...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:Ui.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:Ui.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:Ui.GREYSCALE_0_03},"&:active":{backgroundColor:Ui.GREYSCALE_0_10},"&:focus":{backgroundColor:Ui.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${Ui.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${Ui.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:Ui.GREYSCALE_0_30,"&:hover":{backgroundColor:Ui.GREYSCALE_0_0,borderColor:Ui.GREYSCALE_0_15},"& ~svg":{color:Ui.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${Ui.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:qi}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:Ui.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:Ui.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:Vi,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:Hi,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:Hi,fontWeight:Xi,color:Ui.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Xi}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${Ui.GREYSCALE_0_15}, 0px 0px 0px 1px ${Ui.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:Et.jsx(cc,{}),checkedIcon:Et.jsx(lc,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:Ui.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:Ui.GREEN_PALE,boxShadow:`0 0 0 3px ${br(Ui.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:Ui.BLUE_PALE,boxShadow:`0 0 0 3px ${br(Ui.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:Ui.GREYSCALE_0_20}},"&.Mui-disabled":{fill:Ui.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:Et.jsx(pc,{}),checkedIcon:Et.jsx(ac,{}),indeterminateIcon:Et.jsx(uc,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:qi,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:Ui.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:Ui.GREYSCALE_0_55,color:Ui.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:Ui.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:Ui.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:Ui.GREYSCALE_0_55,"&:hover":{color:Ui.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:Ui.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:Ui.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:Vi,color:Ui.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Xi},secondary:{fontSize:Hi,color:Ui.GREYSCALE_45,fontWeight:Ki,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:Vi,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:Vi,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:Ui.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:Hi,borderBottom:`solid 1px ${Ui.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:Vi,color:Ui.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:Ui.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:Ui.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:Ui.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:'url(\'data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A\')',fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:Ui.RED}}},"&.Mui-focusVisible":{backgroundColor:Ui.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:Ui.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:Ui.GREEN,height:"24px","&.Mui-disabled":{color:Ui.GREYSCALE_0_15}},rail:{backgroundColor:Ui.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${Ui.GREYSCALE_0_05}`,borderRadius:qi,boxShadow:`inset 0px 0px 0px 1px ${Ui.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${Ui.GREYSCALE_0_05}`,borderRadius:qi},thumb:{height:"16px",width:"16px",borderRadius:qi,backgroundColor:Ui.WHITE,boxShadow:`0px 1px 2px 0px ${Ui.GREYSCALE_0_15}, 0px 0px 0px 1px ${Ui.GREYSCALE_0_05}`,"&:hover":{borderRadius:qi,boxShadow:`0 2px 4px 0 ${Ui.GREYSCALE_0_30}, 0 0 0 1px ${Ui.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${Ui.GREYSCALE_0_15}, 0 0 0 1px ${Ui.GREYSCALE_0_06}, 0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${Ui.GREYSCALE_0_15}, 0 0 0 1px ${Ui.GREYSCALE_0_06}, 0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:Ui.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:Ui.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:Ui.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:Ui.GREYSCALE_0_15},markLabel:{color:Ui.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:Ui.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:Ui.WHITE,color:Ui.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:Ui.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:Ui.GREEN_PALE,boxShadow:`0 0 0 3px ${br(Ui.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:Ui.BLUE_PALE,boxShadow:`0 0 0 3px ${br(Ui.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:Ui.GREYSCALE_0_15,borderRadius:qi},thumb:{height:"16px",width:"16px",borderRadius:qi,backgroundColor:Ui.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:Vi,fontWeight:Xi,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${Ui.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${Ui.MISC_FOCUS_BORDER}`,backgroundColor:Ui.GREYSCALE_0_03,borderRadius:qi},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:Ui.GREYSCALE_25,"&.Mui-selected":{color:Ui.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:Vi,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:qi,"&:hover":{backgroundColor:Ui.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 ${Ui.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${Ui.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:qi,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:Ui.GREYSCALE_0_05},"&:hover":{backgroundColor:Ui.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${Ui.GREYSCALE_85}`,borderRight:`1px solid ${Ui.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Xi,backgroundColor:Ui.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:Ui.GREYSCALE_98,borderBottom:`1px solid ${Ui.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${Ui.GREYSCALE_85}`,borderTop:`1px solid ${Ui.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:Ui.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:Ui.GREYSCALE_0_05,"&:hover":{backgroundColor:Ui.GREYSCALE_0_03}},"&&:hover":{backgroundColor:Ui.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>Et.jsx(dc,{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 ${Ui.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:Vi,borderRadius:qi,padding:"7px 16px",border:`1px solid ${Ui.GREYSCALE_0_15}`,backgroundColor:Ui.GREYSCALE_100_60,color:Ui.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:Ui.GREYSCALE_0_10,border:`1px solid ${Ui.GREYSCALE_0_30}`},"&:hover":{backgroundColor:Ui.GREYSCALE_0_03,border:`1px solid ${Ui.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:Ui.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${Ui.MISC_FOCUS_BORDER}`,border:`1px solid ${Ui.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:Ui.GREYSCALE_25,backgroundColor:Ui.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:Ui.GREYSCALE_0_10,border:`1px solid ${Ui.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:Hi,height:24,width:24,padding:7},sizeLarge:{fontSize:Gi,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:Vi,borderRadius:qi}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:Ui.GREYSCALE_20},tooltip:{backgroundColor:Ui.GREYSCALE_20,fontSize:Hi,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}});const hc=e=>({mode:"light",primary:{ultraLight:Ui.GREEN_ULTRA_LIGHT,light:Ui.GREEN_PALE,main:Ui.GREEN,dark:Ui.GREEN_DARK,extraDark:Ui.GREEN_EXTRA_DARK,contrastText:Ui.WHITE},secondary:{ultraLight:Ui.BLUE_ULTRA_LIGHT,light:Ui.BLUE_PALE,main:Ui.BLUE,dark:Ui.BLUE_DARK,extraDark:Ui.BLUE_EXTRA_DARK,contrastText:Ui.WHITE},error:{ultraLight:Ui.RED_ULTRA_LIGHT,light:Ui.RED_PALE,main:Ui.RED,dark:Ui.RED_DARK,extraDark:Ui.RED_EXTRA_DARK,contrastText:Ui.WHITE},warning:{ultraLight:Ui.ORANGE_ULTRA_LIGHT,light:Ui.ORANGE_PALE,main:Ui.ORANGE,dark:Ui.ORANGE_DARK,extraDark:Ui.ORANGE_EXTRA_DARK,contrastText:Ui.WHITE},success:{ultraLight:Ui.GREEN_ULTRA_LIGHT,light:Ui.GREEN_PALE,main:Ui.GREEN,dark:Ui.GREEN_DARK,extraDark:Ui.GREEN_EXTRA_DARK,contrastText:Ui.WHITE},info:{ultraLight:Ui.BLUE_ULTRA_LIGHT,light:Ui.BLUE_PALE,main:Ui.BLUE,dark:Ui.BLUE_DARK,extraDark:Ui.BLUE_EXTRA_DARK,contrastText:Ui.WHITE},text:{primary:Ui.TEXT_PRIMARY,secondary:Ui.TEXT_SECONDARY,disabled:Ui.GREYSCALE_0_30},action:{hover:Ui.GREYSCALE_0_03,hoverOpacity:.03,selected:Ui.GREYSCALE_0_05,selectedOpacity:.05,focus:Ui.MISC_FOCUS_BORDER},amethyst:{ultraLight:Ui.WHITE,main:Ui.PURPLE,light:Ui.PURPLE_PALE,dark:Ui.PURPLE_DARK,extraDark:Ui.GREYSCALE_0_0,contrastText:Ui.WHITE},background:{paper:Ui.WHITE,default:Ui.GREYSCALE_95},divider:Ui.GREYSCALE_0_15});function mc(e){return Ci({components:fc(),palette:hc(),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:Vi,fontWeightLight:Yi,fontWeightRegular:Ki,fontWeightMedium:Xi,fontWeightBold:Qi,htmlFontSize:Vi,fontFamily:Zi.FONT_FAMILY,button:{fontWeight:Xi,fontSize:Vi,textTransform:"none"},body1:{fontSize:Gi,lineHeight:"24px"},body2:{fontSize:Vi,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:Wi,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:Gi,fontWeight:Xi,lineHeight:"16px"},h6:{fontSize:Vi,fontWeight:Xi,lineHeight:"16px"},caption:{color:Ui.TEXT_SECONDARY},subtitle1:{fontSize:Vi,color:Ui.TEXT_SECONDARY},subtitle2:{fontSize:Hi,color:Ui.TEXT_SECONDARY}},shape:{borderRadius:qi},direction:e})}const gc=["container","sn-layout-container","sn-tabbed-container","listbox","qlik-tabbed-container","qlik-show-hide-container","qlik-trellis-container","qlik-on-demand-reporting","sn-analysis-autochart"];class bc{embed;translator;charts={};constructor(e,t){this.embed=e,this.translator=t}getCharts=()=>(this.charts=(this.embed?.getRegisteredTypes()??[]).reduce((e,t)=>{if(!gc.includes(t.id)&&!1!==t.libraryInfo?.isLibraryItem&&!t.libraryInfo?.deprecated){const n=t;n.libraryInfo?.translationKey&&(n.libraryInfo.translation=this.translator.get(n.libraryInfo.translationKey)),e[t.id||t.type]=n}return e},{}),this.charts);getChart=e=>(this.charts[e]||this.getCharts(),this.charts[e])}var vc,yc={};var Ec=function(){if(vc)return yc;vc=1;var e=ba();return yc.createRoot=e.createRoot,yc.hydrateRoot=e.hydrateRoot,yc}();const Cc=(e,t)=>Et.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Et.jsx("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"})}),xc=y.forwardRef(Cc),Dc="rgb(89, 89, 89)",wc=mt(Ol)({display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}),Sc=mt(Ol)({display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}),Ac=mt(Fs,{shouldForwardProp:e=>"width"!==e})(({width:e})=>({"&.MuiList-root":{paddingTop:0,paddingBottom:0,width:e||250,maxHeight:250,overflow:"auto"}})),kc=mt(ul)({color:Dc,fontSize:"12px",fontFamily:"inherit",lineHeight:"24px",margin:"0px"}),Rc=mt(Qs)({"&.MuiListItemIcon-root":{minWidth:32,color:Dc,marginRight:"0px"}}),_c=mt(hs)({"&.MuiDivider-root":{borderBottom:"3px solid #595959"}}),Fc=mt(Wl)({"&.MuiButton-contained":{backgroundColor:Dc,color:"rgb(255, 255, 255)"},"&.MuiButton-outlined":{backgroundColor:"rgb(255, 255, 255)",borderColor:Dc,color:Dc,border:"1px solid rgb(179, 179, 179)","&:hover":{backgroundColor:"rgb(255, 255, 255)",border:`1px solid ${Dc}`}}}),Pc=mt(ra)({width:"1em",height:"1em",paddingBottom:"8px"}),Lc=mt(ra)({width:"16px",height:"16px"}),Tc=({name:e,items:t,onSelect:n})=>Et.jsxs(Et.Fragment,{children:[Et.jsx(Ws,{dense:!0,children:Et.jsx(kc,{noWrap:!0,fontWeight:"bold",children:e})},e),Et.jsx(_c,{}),t.map(e=>Et.jsx(Ws,{divider:!0,disablePadding:!0,disableGutters:!0,children:Et.jsxs(Bs,{sx:{minHeight:"32px",height:"auto"},onClick:()=>{n(e)},disableRipple:!0,dense:!0,children:[e.iconPath?Et.jsx(Rc,{children:e.IconDefinition?Et.jsx(e.IconDefinition,{}):Et.jsx(Lc,{viewBox:"0 0 16 16",children:Et.jsx("path",{d:e.iconPath})})}):null,Et.jsx(kc,{noWrap:!0,title:e.translation||e.name,children:e.translation||e.name})]})},e.qExtendsId??e.name))]}),Ic=({categories:e,anchorEl:t,onClose:n,onSelect:r,width:o})=>{const[i,a]=y.useState(""),l=!!t;return Et.jsxs(mu,{open:l,anchorEl:t,onClose:()=>{a(""),n()},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},sx:{marginTop:"5px"},children:[Et.jsx(Al,{fullWidth:!0,onChange:e=>{a(e.target.value)},startAdornment:Et.jsx(Ss,{position:"start",children:Et.jsx(xc,{})})}),Et.jsx(_c,{}),Et.jsx(Ac,{width:o,children:e.map(e=>{const t=e.items.filter(e=>{const t=e.translation||e.name;return t?.toLocaleLowerCase().indexOf(i.toLocaleLowerCase())>-1});return t.length>0&&Et.jsx(Tc,{name:e.name,items:t,onSelect:r},e.name)})})]})},Mc=({anchorEl:e,onClose:t,dataHandler:n,translator:r,sharedContainerUtilities:o,width:i})=>{const[a,l]=y.useState([]),[s,u]=y.useState({});y.useEffect(()=>{if(e&&n){(async()=>{const e=await n.getMasterVizList();l(e),u(n.getCharts())})().catch(()=>{})}},[e,n]);const c=[],d=[],p=new Map,f=Object.values(s);if(0===f.length&&0===a.length)return null;f.forEach(e=>{if(!e.libraryInfo||!e.libraryInfo.isThirdParty&&e.libraryInfo.visible)c.push(e);else if(e.libraryInfo.visible)if(e.libraryInfo.bundle?.name){const t=e.libraryInfo.bundle.name,n=p.get(t);n?n.push(e):p.set(t,[e])}else d.push(e)});const h=e=>e.map(e=>({iconPath:e.libraryInfo?.iconPath,IconDefinition:e.libraryInfo?.IconDefinition,name:e.id,translation:e.libraryInfo?.translation||e.libraryInfo?.name||e.id||"",type:e.id})).toSorted((e,t)=>(e.translation||e.name).localeCompare(t.translation||t.name)),m=[{name:r.get("LayoutContainer.Object.MasterItems"),items:a.map(e=>({qExtendsId:e.qExtendsId,iconPath:s[e.visualization]?.libraryInfo?.iconPath,IconDefinition:s[e.visualization]?.libraryInfo?.IconDefinition,name:e.name,type:e.visualization})).toSorted((e,t)=>e.name.localeCompare(t.name))},{name:r.get("LayoutContainer.Object.Charts"),items:c.map(e=>({iconPath:e.libraryInfo?.iconPath||"",IconDefinition:e.libraryInfo?.IconDefinition,name:e.libraryInfo?.name||e.id,type:e.libraryInfo?.template||e.id,translation:e.libraryInfo?.translation||e.id||""})).toSorted((e,t)=>e.translation.localeCompare(t.translation))},{name:r.get("LayoutContainer.Object.CustomObjects"),items:h(d)}];for(const[e,t]of p)m.push({name:e,items:h(t)});return Et.jsx(Ic,{categories:m,anchorEl:e,onSelect:e=>{if(!n)return;const{qExtendsId:r}=e;(r?n.addMasterObjectAsChild({initProps:{qExtendsId:r,qInfo:{qType:"undefined"}}}):n.addVizAsChild({type:e.type,objectInitProps:{label:e.translation}})).then(e=>{e?.id&&o?.setSelected([e.id])}).catch(e=>{console.warn(e)}).finally(()=>{t()})},onClose:t,width:i})},Oc=e=>{const t=Nc(e);return e.objects?.map(e=>{const{childRefId:n}=e;if(!n)return e;const r=t[n];return r?{...e,id:r}:e})??[]},Bc=(e,t)=>e?.qChildList?.qItems?.find(e=>e?.qData?.childRefId===t),Nc=e=>e?.qChildList?.qItems?.reduce((e,t)=>{const n=t?.qData?.childRefId;return e[n]=t?.qInfo?.qId,e},{});var jc=Bc,zc=e=>{const t={...e};return t.objects=Oc(t),t},$c=e=>e?.qChildList?.qItems?.reduce((e,t)=>{const n=t?.qInfo?.qId;return e[n]=t.qData?.childRefId,e},{}),Uc=e=>e.objects.reduce((e,t)=>(e[t.childRefId]=t,e),{}),Hc=(e,t)=>{if(!e)return t;const n=Bc(e,t);return n?.qInfo?.qId};class Vc{layout;app;activeId="";data;properties=void 0;constructor({app:e,data:t}){this.app=e,this.data=t}get activeContainer(){return this.data.containers[this.activeId]}setSelectedChild=e=>{this.activeContainer?.sharedContainerUtilities?.setSelected(e)};addChild=({initProps:e,objectInitProps:t,children:n})=>{if(!this.activeContainer)return;const{dataHandler:r}=this.activeContainer;if(e?.qExtendsId){const{qExtendsId:o,qInfo:i}=e;return r?.addMasterObjectAsChild({initProps:{qExtendsId:o,qInfo:i},objectInitProps:t,children:n})}return r?.addVizAsChild({type:e?.visualization,initProps:e,objectInitProps:t,children:n})};deleteChild=async e=>{if(!this.activeContainer)return;const{dataHandler:t}=this.activeContainer;await(t?.deleteChildren([e]))};duplicateChild=async e=>{const{childRefId:t,...n}=e,r=this.getEngineId(t);if(!r)return;const o=await(this.app?.getObject(r));if(o&&this.activeContainer){const{sharedContainerUtilities:e}=this.activeContainer,t=await o.getFullPropertyTree(),r=t.qProperty,i=t.qChildren,a=await this.addChild({initProps:r,children:i,objectInitProps:n});a&&e?.setSelected([a.id])}};openAddChildPopover=e=>{if(this.activeContainer&&this.activeContainer.dataHandler&&this.data.muiTheme&&this.data.translator){const t=((e,t)=>{const n=e.getElementsByClassName(t);let r;return 0===n.length?(r=document.createElement("div"),r.className=t,e.appendChild(r)):r=n[0],Ec.createRoot(r)})(this.activeContainer.element,"add-child-popover"),n=()=>{t.unmount()};t?.render(Et.jsx(zi,{theme:this.data.muiTheme,children:Et.jsx(Mc,{translator:this.data.translator,anchorEl:e,dataHandler:this.activeContainer.dataHandler,onClose:n,width:220,sharedContainerUtilities:this.activeContainer.sharedContainerUtilities})}))}};getObject(e){const t=this.getEngineId(e);if(t)return this.activeContainer?.renderHelper.objectMap.get(t)}getChartIcon(e){const t=this.getEngineId(e);if(!t)return;const n=this.activeContainer?.renderHelper.getChildLayout(t),r=n?.qData.visualization;return r?this.activeContainer?.chartList?.getChart(r)?.libraryInfo?.icon:void 0}setModel=e=>{this.activeId=e.id};setLayout=e=>{this.layout=e};getLayout=()=>this.layout;getEngineId=e=>Hc(this.layout,e);setProperties=e=>{this.properties=e};canAddDimension=()=>!1;canAddMeasure=()=>!1;canColorBy=()=>!1;getDimensions=()=>[];getMeasures=()=>[];minDimensions=()=>0;minMeasures=()=>0;maxDimensions=()=>0;maxMeasures=()=>0}const Gc="object",Wc=["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"];const qc=e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}});function Yc({theme:e,translator:t,id:n,path:r}){const o=()=>e.getStyle(n,r,"fontFamily");return{getDefaultValue:()=>o(),getOptions:()=>function({theme:e,translator:t,defaultValue:n}){const r=[],o=e.getStyle("","","fontFamilies");return Array.isArray(o)&&o.length?r.push(...new Set([n,...o.map(e=>e.split(",").map(e=>e.trim()).map(e=>e.replace(/\s+/g," ").trim()).filter(Boolean).join(", "))])):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFonts"),metaText:t.get("properties.theme"),groupHeader:!0},...r.map(e=>qc(e)),{value:"DefaultHeader",label:t.get("properties.allFonts"),metaText:t.get("properties.default"),groupHeader:!0},...Wc.map(e=>qc(e))]}({theme:e,translator:t,defaultValue:o()})}}var Kc=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"];const Xc=e=>({value:e,label:e,groupHeader:!1,disabled:!1});function Qc({theme:e,translator:t,id:n,path:r}){const o=()=>e.getStyle(n,r,"fontSize");return{getDefaultValue:()=>o(),getOptions:()=>function({theme:e,translator:t,defaultValue:n}){const r=[],o=e.getStyle("","","fontSizes");return Array.isArray(o)&&o.length?r.push(...new Set([n,...o])):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0},...r.map(e=>Xc(e)),{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0},...Kc.map(e=>Xc(e))]}({theme:e,translator:t,defaultValue:o()})}}function Zc({theme:e,translator:t,id:n,path:r}){return{fontFamily:Yc({theme:e,translator:t,id:n,path:r}),fontSize:Qc({theme:e,translator:t,id:n,path:r})}}const Jc=["__proto__","constructor"],ed=e=>{if(Jc.some(t=>e.includes(t)))throw new Error("font-resolver: Forbidden property.")};var td,nd,rd,od=function(){if(nd)return td;nd=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)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},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return td=function e(){var t,n,r,s,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(i(s)||(u=o(s)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,c,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},td}();function id(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ad(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ld(){}(rd=od)&&rd.__esModule&&Object.prototype.hasOwnProperty.call(rd,"default")&&rd.default;var sd=.7,ud=1/sd,cd="\\s*([+-]?\\d+)\\s*",dd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fd=/^#([0-9a-f]{3,8})$/,hd=new RegExp(`^rgb\\(${cd},${cd},${cd}\\)$`),md=new RegExp(`^rgb\\(${pd},${pd},${pd}\\)$`),gd=new RegExp(`^rgba\\(${cd},${cd},${cd},${dd}\\)$`),bd=new RegExp(`^rgba\\(${pd},${pd},${pd},${dd}\\)$`),vd=new RegExp(`^hsl\\(${dd},${pd},${pd}\\)$`),yd=new RegExp(`^hsla\\(${dd},${pd},${pd},${dd}\\)$`),Ed={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 Cd(){return this.rgb().formatHex()}function xd(){return this.rgb().formatRgb()}function Dd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=fd.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?wd(t):3===n?new Rd(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Sd(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Sd(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=hd.exec(e))?new Rd(t[1],t[2],t[3],1):(t=md.exec(e))?new Rd(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gd.exec(e))?Sd(t[1],t[2],t[3],t[4]):(t=bd.exec(e))?Sd(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=vd.exec(e))?Id(t[1],t[2]/100,t[3]/100,1):(t=yd.exec(e))?Id(t[1],t[2]/100,t[3]/100,t[4]):Ed.hasOwnProperty(e)?wd(Ed[e]):"transparent"===e?new Rd(NaN,NaN,NaN,0):null}function wd(e){return new Rd(e>>16&255,e>>8&255,255&e,1)}function Sd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rd(e,t,n,r)}function Ad(e){return e instanceof ld||(e=Dd(e)),e?new Rd((e=e.rgb()).r,e.g,e.b,e.opacity):new Rd}function kd(e,t,n,r){return 1===arguments.length?Ad(e):new Rd(e,t,n,null==r?1:r)}function Rd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function _d(){return`#${Td(this.r)}${Td(this.g)}${Td(this.b)}`}function Fd(){const e=Pd(this.opacity);return`${1===e?"rgb(":"rgba("}${Ld(this.r)}, ${Ld(this.g)}, ${Ld(this.b)}${1===e?")":`, ${e})`}`}function Pd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ld(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Td(e){return((e=Ld(e))<16?"0":"")+e.toString(16)}function Id(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Od(e,t,n,r)}function Md(e){if(e instanceof Od)return new Od(e.h,e.s,e.l,e.opacity);if(e instanceof ld||(e=Dd(e)),!e)return new Od;if(e instanceof Od)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new Od(a,l,s,e.opacity)}function Od(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Bd(e){return(e=(e||0)%360)<0?e+360:e}function Nd(e){return Math.max(0,Math.min(1,e||0))}function jd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}id(ld,Dd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cd,formatHex:Cd,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Md(this).formatHsl()},formatRgb:xd,toString:xd}),id(Rd,kd,ad(ld,{brighter(e){return e=null==e?ud:Math.pow(ud,e),new Rd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?sd:Math.pow(sd,e),new Rd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rd(Ld(this.r),Ld(this.g),Ld(this.b),Pd(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:_d,formatHex:_d,formatHex8:function(){return`#${Td(this.r)}${Td(this.g)}${Td(this.b)}${Td(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Fd,toString:Fd})),id(Od,function(e,t,n,r){return 1===arguments.length?Md(e):new Od(e,t,n,null==r?1:r)},ad(ld,{brighter(e){return e=null==e?ud:Math.pow(ud,e),new Od(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?sd:Math.pow(sd,e),new Od(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,o=2*n-r;return new Rd(jd(e>=240?e-240:e+120,o,r),jd(e,o,r),jd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Od(Bd(this.h),Nd(this.s),Nd(this.l),Pd(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=Pd(this.opacity);return`${1===e?"hsl(":"hsla("}${Bd(this.h)}, ${100*Nd(this.s)}%, ${100*Nd(this.l)}%${1===e?")":`, ${e})`}`}}));const zd=Math.PI/180,$d=180/Math.PI,Ud=.96422,Hd=.82521,Vd=4/29,Gd=6/29,Wd=3*Gd*Gd,qd=Gd*Gd*Gd;function Yd(e){if(e instanceof Kd)return new Kd(e.l,e.a,e.b,e.opacity);if(e instanceof ep)return tp(e);e instanceof Rd||(e=Ad(e));var t,n,r=Jd(e.r),o=Jd(e.g),i=Jd(e.b),a=Xd((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Xd((.4360747*r+.3850649*o+.1430804*i)/Ud),n=Xd((.0139322*r+.0971045*o+.7141733*i)/Hd)),new Kd(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Kd(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Xd(e){return e>qd?Math.pow(e,1/3):e/Wd+Vd}function Qd(e){return e>Gd?e*e*e:Wd*(e-Vd)}function Zd(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Jd(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ep(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function tp(e){if(isNaN(e.h))return new Kd(e.l,0,0,e.opacity);var t=e.h*zd;return new Kd(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}id(Kd,function(e,t,n,r){return 1===arguments.length?Yd(e):new Kd(e,t,n,null==r?1:r)},ad(ld,{brighter(e){return new Kd(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Kd(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 Rd(Zd(3.1338561*(t=Ud*Qd(t))-1.6168667*(e=1*Qd(e))-.4906146*(n=Hd*Qd(n))),Zd(-.9787684*t+1.9161415*e+.033454*n),Zd(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),id(ep,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof ep)return new ep(e.h,e.c,e.l,e.opacity);if(e instanceof Kd||(e=Yd(e)),0===e.a&&0===e.b)return new ep(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*$d;return new ep(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new ep(e,t,n,null==r?1:r)},ad(ld,{brighter(e){return new ep(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new ep(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return tp(this).rgb()}}));var np=e=>()=>e;function rp(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):np(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?rp: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):np(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=kd(e)).r,(t=kd(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=rp(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var op="center",ip="bottom";function ap(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===o[t])return n;o=o[t]}return o}[{key:"NoDataExist",alignment:op,condition:({layoutService:e})=>{if(!e)return!1;const{x:t,y:n}=e.meta.size;return t*n===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:op,condition:({layoutService:e})=>!!e&&e.getHyperCubeValue("qMeasureInfo").every(e=>"NaN"===e.qMin&&"NaN"===e.qMax)},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:op,condition:({layoutService:e})=>{if(!e)return!1;const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:op},{key:"DataRangeIncludingZero",alignment:ip},{key:"LimitedData",alignment:ip},{key:"NegativeOrZeroValues",alignment:ip}].reduce((e,t)=>(e[t.key]=t,e),{});const lp=["__proto__","constructor"];function sp(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),o=r[r.length-1];if(lp.some(e=>r.includes(e)))return;let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===i[t]&&(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n?i[o]=n:delete i[o]}function up(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 cp(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=pp)):void 0===t&&(t=dp);for(var n,r,o,i,a,l=new mp(e),s=[l];n=s.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)s.push(r=o[i]=new mp(o[i])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(hp)}function dp(e){return e.children}function pp(e){return Array.isArray(e)?e[1]:null}function fp(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function hp(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function mp(e){this.data=e,this.depth=this.height=0,this.parent=null}var gp;mp.prototype=cp.prototype={constructor:mp,count:function(){return this.eachAfter(up)},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,o,i=this,a=[i],l=[],s=-1;i=a.pop();)if(l.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=l.pop();)e.call(t,i,++s,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.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,o=r&&r.length;--o>=0;)n+=r[o].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(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,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 cp(this).eachBefore(fp)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},gp=function(e){
97
97
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
98
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,l,s,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=p-g,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),E=g>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0===+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],s=c[1]&&c[c.length-1].length){for(m="",b=(d=t[0]).length%s,p=d.length,y=0;y<p;y++)m+=d.charAt(y),!((y-b+1)%s)&&y<p-s&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+E}},gp({exports:{}});const bp="'Source Sans Pro', 'Arial', 'sans-serif'",vp="#333333",yp="#595959",Ep="#737373",Cp="#cccccc",xp="#e6e6e6";function Dp(e){const t={};return[...e,["","","color"],["object","","fontFamily"],["object","axis.label.name","color",yp],["object","axis.label.name","fontFamily",bp],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Cp],["object","axis.line.minor","color",xp],["object","axis.title","color"],["object","axis.title","fontFamily",bp],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",xp],["object","grid.line.major","color",Cp],["object","grid.line.minor","color",xp],["object","label.value","color",yp],["object","label.value","fontFamily",bp],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",yp],[!1,"label.value","lightColor",xp],["object","outOfRange","color","#999"],["object","legend.title","color",vp],["object","legend.title","fontFamily",bp],["object","legend.title","fontSize","15px"],["object","legend.label","color",yp],["object","legend.label","fontFamily",bp],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",vp],["object","referenceLine.label.name","fontFamily",bp],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",xp],["object","referenceLine.outOfBounds","fontFamily",bp],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Ep,e=>"transparent"===e?Ep:e]].reduce((e,n)=>{const r=`${n[0]}-${n[1]}-${n[2]}}`;return t[r]||(t[r]=!0,e.push(n)),e},[]).toSorted((e,t)=>(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0))}const wp="object",Sp=e=>e;function Ap({theme:e,id:t,transform:n,extend:r,matrix:o}){const i={},a=n.reduce((e,t)=>{const[n,r]=t;return e[n]=r,e},{});return o.forEach(n=>{const[r,o,l,s,u=e=>e]=n,c=function({theme:e,base:t,path:n,attribute:r,defaultValue:o}){if(!e||!1===t)return o;const i=e.getStyle(t,n,r);return void 0===i?o:i}({theme:e,base:r===wp&&t?`${wp}.${t}`:r,path:o,attribute:l,defaultValue:s}),d=(a[`${o}.${l}`]||Sp)(u(c));sp(i,[o,l].filter(Boolean).join("."),d)}),r.forEach(e=>{const[t,n]=e;sp(i,t,n)}),i}const kp={qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",containerChildId:"/containerChildId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition",visible:"/visible"}};function Rp(e){if(!e.objects)return{};const t=Uc(e);return{container_id:e.qInfo.qId,objects:e.qChildList.qItems.map(n=>({chart_type:n.qData.visualization,chart_id:n.qInfo.qId,chart_isMaster:!!n.qData.qExtendsId,tab_isVisible:0!==t[n.qData.childRefId]?.condition&&!1!==t[n.qData.childRefId]?.visible,tab_isActive:n.qData.childRefId===e.cachedTabId}))}}const _p=({ref:e,theme:t,change:n})=>({component:"inline-wrapper",items:{bgColorDropdown:{ref:`${e}.useColorExpression`,width:9,component:"dropdown",change(t){(ap(t,`${e}.color`)||ap(t,`${e}.colorExpression`))&&(sp(t,`${e}.color`,void 0),sp(t,`${e}.colorExpression`,void 0)),n?.(t)},options:[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],defaultValue:!1,placeholder:"properties.colorMode.primary"},bgColorPicker:{component:"color-picker",ref:`${e}.color`,width:3,show:t=>!ap(t,`${e}.useColorExpression`),disableNone:!1,defaultValue:()=>({color:t?.getStyle("object.tabbedContainer",e,"color")??"none"}),showAlpha:!0,change:e=>{n?.(e)}},bgColorExpression:{component:"input-field-expression",ref:`${e}.colorExpression`,show:t=>ap(t,`${e}.useColorExpression`)}}}),Fp=({theme:e})=>({bgColorAllWrapper:_p({ref:"background.unselected"}),selectedTab:{translation:"properties.chartType.selected",component:"text"},bgColorSelectedWrapper:_p({ref:"background.selected"}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:_p({ref:"background.hover",theme:e,change:e=>{sp(e,"indicator.hover.color",ap(e,"background.hover.color")),sp(e,"indicator.hover.useColorExpression",ap(e,"background.hover.useColorExpression"))}})},show:(e,t)=>"left"===t.layout.orientation}}),Pp=({paths:e,fontResolver:t,theme:n})=>{const r=`${e.theme}.fontSize`;return{fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.size`,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r),show:e=>!1!==e.icon?.show},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:n.getStyle("object.tabbedContainer",e.theme,"color")}),show:e=>!1!==e.icon?.show}}},position:{type:"string",ref:"icon.position",component:"dropdown",options:[{value:"start",translation:"properties.dock.start"},{value:"top",translation:"properties.dock.top"},{value:"end",translation:"properties.dock.end"},{value:"bottom",translation:"properties.dock.bottom"}],defaultValue:(e,{layout:t})=>"left"===t.orientation?"top":"start",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"icon.show",component:"switch",defaultValue:!0,show:e=>"tab"===e.key}}},Lp=({theme:e})=>({colorWrapper:_p({ref:"indicator.selected",theme:e}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:_p({ref:"indicator.hover",theme:e,change:e=>{sp(e,"background.hover.color",ap(e,"indicator.hover.color")),sp(e,"background.hover.useColorExpression",ap(e,"indicator.hover.useColorExpression"))}})},show:(e,t)=>"left"!==t.layout.orientation}}),Tp=({paths:e,fontResolver:t,theme:n})=>{const r=`${e.theme}.fontFamily`,o=`${e.theme}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e.ref}.fontFamily`,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r),change:(e,t,n)=>{const r=e.label?.fontFamily,o=(e=>{const t=[];return e.objects.forEach(e=>{const n=e.components?.find(e=>"tab"===e.key),r=n?.label?.fontFamily;r&&-1===t.indexOf(r)&&t.push(r)}),t})(n);r&&-1===o.indexOf(r)&&o.push(r),n.fontsUsed=o}},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.fontSize`,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:n.getStyle("object.tabbedContainer",e.theme,"color")})}}},alignment:{component:"text-align-buttons",ref:"label.alignment",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"label.show",component:"switch",defaultValue:!0}}},Ip=({ref:e,key:t,fontResolver:n,theme:r})=>({translation:"Object.Container.Props.Label",component:"panel-section",items:{label:{component:"items",ref:e,key:t,items:Tp({paths:{ref:"label",theme:"label.value"},fontResolver:n,theme:r})}}}),Mp=({ref:e,key:t})=>({translation:"Visualizations.Descriptions.Width",component:"panel-section",items:{width:{component:"items",ref:e,key:t,items:{unit:{type:"string",ref:"width.unit",component:"dropdown",options:[{value:"%",translation:"Object.Table.Column.Percentage"},{value:"px",translation:"Object.Table.Column.Pixels"}],defaultValue:"%",change:e=>{if(void 0!==e.width?.value&&"%"===e.width?.unit)for(let t=0;t<e.width.value.length;t++)e.width.value[t]>100?e.width.value[t]=100:e.width.value[t]<5&&(e.width.value[t]=5)}},valuePixel:{translation:"properties.axis.minMax",component:"slider",ref:"width.value",range:!0,step:1,min:0,max:800,show:e=>"px"===e.width?.unit,defaultValue:[0,360]},valuePercentage:{translation:"properties.axis.minMax",component:"slider",type:"array",ref:"width.value",range:!0,step:1,min:5,max:100,show:e=>!e.width?.unit||"px"!==e.width?.unit,defaultValue:[5,20]}}}}}),Op=({theme:e,ref:t,key:n})=>({translation:"Object.TabbedContainer.Indicator",component:"panel-section",items:{indicator:{component:"items",ref:t,key:n,items:Lp({theme:e})}}}),Bp=({ref:e,key:t,fontResolver:n,theme:r})=>({translation:"properties.icon",component:"panel-section",items:{icon:{component:"items",ref:e,key:t,items:Pp({paths:{ref:"icon",theme:"icon.value"},fontResolver:n,theme:r})}},show:(e,{layout:t})=>t.showIcons}),Np=({theme:e,ref:t,key:n})=>({translation:"Object.OrgChart.BackgroundColor",component:"panel-section",items:{background:{component:"items",ref:t,key:n,items:"tab"===n?{bgColorWrapper:_p({ref:"background"})}:Fp({theme:e})}}}),jp=({fontResolver:e,theme:t})=>{const n="components",r="tab";return{component:"styling-panel",chartTitle:"Object.Container",tabTitle:"scripteditor.dataconnectors.delimiter.tab",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:n,items:{label:Ip({ref:n,key:r,fontResolver:e,theme:t}),width:{...Mp({ref:n,key:r}),show:(e,{layout:t})=>"left"!==t.orientation},icon:Bp({ref:n,key:r,fontResolver:e,theme:t}),background:Np({ref:n,key:r,theme:t})}}},zp={ref:"label",type:"string",translation:"Object.Container.Props.Label",defaultValue:"",expression:"optional"},$p={ref:"condition",translation:"Object.Container.Props.ShowCondition",component:"expression",defaultValue:{qValueExpression:{qExpr:""}},expressionType:"ValueExpression",expression:"always"},Up=(e,t)=>"object"==typeof e.label?t.objects.find(t=>t.childRefId===e.childRefId)?.label||e.label.qValueExpression.qExpr:e.label,Hp=e=>({component:"button",translation:"Object.Container.Props.EditProperties",disabled:(e,t)=>{const n=t.getLayout(),r=jc(n,e.childRefId)?.qMeta;return!r?.privileges?.includes("update")||!n.permissions?.update},action(t,n,{app:r}){const{sense:o}=e.env.anything,i=n.getEngineId(t.childRefId);i&&(o.propertyPanel.show({id:i,app:r,parent:"current",headerLabel:Up(t,n.getLayout())}),n.setSelectedChild([i]))}}),Vp=e=>{const{sense:t}=e.env.anything;return{label:zp,condition:$p,styling:jp({fontResolver:e.fontResolver,theme:t?.theme}),editProperties:Hp(e)}},Gp={translation:"Object.Container.Props.Chart",component:"text",show:e=>e.objects?e.objects.length<=1:e.children.length<=1},Wp={translation:"Common.Charts",component:"text",show:e=>e.objects?e.objects.length>1:e.children.length>1},qp=e=>({type:"array",ref:"objects",itemTitleRef:e=>e.label,allowAdd:!0,customAdd:!0,allowMove:!0,allowRemove:!0,customRemove:!0,addTranslation:"Object.Container.Props.Add",cId:"childRefId",grouped:!0,add(e,t,n){const r=document.querySelector(".pp-toplist-add-button");null!==r&&n.openAddChildPopover(r)},remove(e,t,n){n.deleteChild(e.childRefId).catch(()=>{})},items:Vp(e)}),Yp=e=>({type:"items",translation:"Object.Container.Props.Content",items:{chartLabel:Gp,chartsLabel:Wp,chartList:qp(e)}}),Kp={type:"boolean",translation:"Object.Container.Props.ShowTabs",ref:"showTabs",defaultValue:!0,component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},Xp={type:"boolean",translation:"Object.Container.Props.UseDropdown",label:"Menu",ref:"useDropdown",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},Qp={type:"boolean",translation:"Object.Container.Props.UseScrollButtons",ref:"useScrollButton",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!0,show:e=>e.showTabs},Zp={type:"boolean",translation:"Object.Container.Props.ShowIcons",ref:"showIcons",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},Jp={type:"string",translation:"Object.Container.Props.DefaultTab",ref:"defaultTabId",component:"dropdown",defaultValue:void 0,options(e,t){const n=t.getLayout();return n?n.objects.map(e=>({translation:e.label,value:e.childRefId})):[]},change(e,t){const n=Hc(t.getLayout(),e.defaultTabId);n&&t.setSelectedChild([n])},show:e=>e.objects.length>0},ef={type:"string",translation:"properties.orientation",ref:"orientation",component:"dropdown",options:[{value:"top",translation:"properties.orientation.horizontal"},{value:"left",translation:"properties.orientation.vertical"}],defaultValue:"top",show:e=>e.showTabs},tf=({fontResolver:e,theme:t})=>{const n="components",r="tabs";return{component:"styling-panel",chartTitle:"Object.TabContainer",tabTitle:"Object.Container.Props.ShowTabs",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{label:Ip({ref:n,key:r,fontResolver:e,theme:t}),width:Mp({ref:n,key:r}),indicator:Op({ref:n,key:r,theme:t}),icon:Bp({ref:n,key:r,fontResolver:e,theme:t}),background:Np({ref:n,key:r,theme:t})}}},nf={items:{details:{show:e=>!0===e.showDetails}}},rf=e=>{const{sense:t}=e.env.anything;return{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:tf({fontResolver:e.fontResolver,theme:t?.theme}),container:{type:"items",items:{showTabs:Kp,useDropdown:Xp,useScrollButton:Qp,showIcons:Zp,orientation:ef,defaultTabId:Jp}}}}},of=e=>({uses:"settings",items:{general:nf,presentation:rf(e)}}),af=e=>({type:"items",component:"accordion",items:{content:Yp(e),settings:of(e)}}),lf=e=>{const{sense:t}=e.env.anything,n=function({theme:e,translator:t,config:n={}}){const{id:r,paths:o}=function({config:e={}}){const{id:t,paths:n}=e;return{id:void 0===t?Gc:`${Gc}.${t}`,paths:Array.isArray(n)?n:[]}}({config:n}),i={};o.forEach(n=>{const o=n.split(".");ed(o);let a=i;for(let i=0;i<o.length;i++){const l=o[i];i===o.length-1?a[l]=Zc({theme:e,translator:t,id:r,path:n}):void 0===a[l]&&(a[l]={}),a=a[l]}});const a=e=>{const t=e.split(".");ed(t);let n=i;for(let r=0;r<t.length;r++){const o=t[r];if(void 0===n[o])throw new Error(`font-resolver: Path '${e}' could not be resolved.`);n=n[o]}return n};return i.getDefaultValue=e=>a(e).getDefaultValue(),i.getOptions=e=>a(e).getOptions(),i}({theme:t?.theme,translator:e.env.translator,flags:e.env.flags,config:{id:"tabbedContainer",paths:["label.value","icon.value"]}}),r=function(e){return{async getDropOptions(e,t,n){const{item:r}=t,o=e.getCreatePropertyHandler();if(o.setModel(e.model),"state"===t.item.type){const r=await e.model.getProperties();return o.setProperties(r),o.setLayout(e.model?.layout),this.getDropStateOptions(t,o,e.model,n)}if("visualization"===r.type)return t.menu.addItem({translation:["Object.Container.DropItem",r.name],tid:"addvisualization",select(){o.addChild({initProps:{qExtendsId:r.id,qInfo:{qType:"undefined"}}})?.then(e=>{e&&o.setSelectedChild([e.id])})}}),void n();const i=await t.item.getDropOption(t.item);"newObject"===i?.id&&t.menu.addItem({translation:["Object.Container.DropItem",r.name],tid:"createvisualization",select(){o.addChild({initProps:{...i.args.init,visualization:i.args.template},children:i.args.children?.map(e=>({qProperty:e}))})?.then(e=>{e&&o.setSelectedChild([e.id])})}}),n()},async addChild(t,n){const{model:r}=this,o=new Vc({app:r.app,data:e.propertyHandlerData});return o.setModel(r),{childModel:await o.addChild({initProps:t,children:n}),handler:o}},canReceive(e){if(this.model.layout.qExtendsId)return!1;if("libraryitem"===e.type){const{item:t}=e;if("template"===t.type&&gc.includes(t.template))return!1;if("visualization"===t.type&&gc.includes(t.visualization))return!1}return"gridcell"!==e.type||!gc.includes(e.cell.model.layout.visualization)}}}(e);return{definition:af({...e,fontResolver:n}),support:{snapshot:!1,export:!0,sharing:!1,exportData:!1,viewData:!1},hidePatchPanel:()=>!0,getCreatePropertyHandler:t=>new Vc({app:t,data:e.propertyHandlerData}),...r,addChild:async function(e,t){const{childModel:n,handler:o}=await r.addChild.apply(this,[e,t]);n&&o.setSelectedChild([n.id])},migrate:{properties:(e,t)=>((async(e,t)=>{if(!e.objects){const{objects:n,defaultTabId:r,components:o,orientation:i,showDetails:a}=await t.getEffectiveProperties(),l=await t.getFullPropertyTree();if(!l.qProperty.objects&&n){const s=[];l.qChildren.forEach(e=>{const n=e.qProperty;if(n.qInfo.qId){const r=async r=>{const o=await t.getChild(r),i=await o.getEffectiveProperties();return{...e,qProperty:{...n,childRefId:i.childRefId}}};s.push(r(n.qInfo.qId))}});const u=await Promise.all(s),c={...e,objects:n,defaultTabId:r??"",components:o,qChildListDef:kp,orientation:i,showDetails:a};t.clearSoftPatches(),await t.setFullPropertyTree({...l,qProperty:c,qChildren:u})}}})(e,t),e)},exportProperties:null,importProperties:(e,t)=>{const n={...e.properties};return"masterobject"!==e.properties.qInfo.qType&&(n.qInfo.qType=t.qInfo.qType),n.visualization=t.visualization,{qProperty:n,qChildren:e.qChildren}},extendMetrics:Rp}},sf=e=>e.reduce((e,{id:t,data:n})=>(n&&(e[t]=n),e),{}),uf=async e=>{const t=[];for(const[n,r]of e){const e={id:n,data:void 0},o=r;t.push(o.getViewState().then(e=>({id:n,data:e})).catch(()=>e))}const n=await Promise.all(t);return{viewStates:sf(n)}},cf=async e=>{const t=[];for(const[n,r]of e){const e={id:n,data:void 0},o=r;o.getSnapshotLayout?t.push(o.getSnapshotLayout().then(e=>({id:n,data:e})).catch(()=>e)):o.takeSnapshot&&t.push(o.takeSnapshot().then(e=>({id:n,data:e?.layout})).catch(()=>e))}const n=await Promise.all(t);return sf(n)},df=(t,n)=>(e.onTakeSnapshot(async e=>{const r=e,{snapshotData:o}=r;if(o){const e=zc(r),i=n(t.objectMap,e),[a,l]=await Promise.all([cf(i.objectMap),uf(i.objectMap)]);o.objectsData={layouts:a},r.objects=i.objects,o.viewState=l}return e}),{getViewState:()=>uf(t.objectMap)});let pf=function(e){return e.OPEN_CONTEXT_MENU="shift+F10",e.ESCAPE="Escape",e.SPACE=" ",e.ENTER="Enter",e.BACKSPACE="Backspace",e.DELETE="Delete",e}({}),ff=function(e){return e.KEY_DOWN="keydown",e.FOCUS_OUT="focusout",e}({}),hf=function(e){return e.TAB_MENU="tab-menu",e.TAB_MENU_ITEM="tab-menu-item",e.ACTIVE_TAB="active-tab-button",e.TAB_WRAPPER="tab-wrapper",e.TAB="tab-button",e.TAB_EXTRA_PRIO="MuiTab-root",e.TAB_LABEL="tab-label",e.TABS_ICON="tab-icon",e.ACTIVE_TAB_PANEL="active-tab-panel",e.TAB_INDICATOR="MuiTabs-indicator",e}({});const mf=`& .${hf.TAB}.${hf.TAB_EXTRA_PRIO}, .${hf.TAB}.${hf.ACTIVE_TAB}`,gf=`& .${hf.TAB}.${hf.TAB_EXTRA_PRIO}:hover`,bf=`& .${hf.TAB_LABEL}`,vf=`& .${hf.TABS_ICON} svg`,yf=`& .${hf.TAB_WRAPPER}`,Ef=`& .${hf.TAB_INDICATOR}`,Cf=e=>e.getElementsByClassName(hf.ACTIVE_TAB)?.[0],xf=e=>e.getElementsByClassName(hf.ACTIVE_TAB_PANEL)?.[0],Df=({element:t,setAccessibility:n,accessibility:r,renderHelper:o,interactions:i,env:a,models:l})=>{const{modifiedLayout:{showTabs:s,objects:u,orientation:c},translator:d}=l;e.useEffect(()=>{(()=>{const e="top"===c?d.get("TabContainer.Navigation.Horizontal"):d.get("TabContainer.Navigation.Vertical"),n=((e,t)=>e.map(e=>e.label||t.get("TabContainer.Object.Untitled")).join(", "))(u,d);t.setAttribute("aria-label",d.get("TabContainer.Object.Description",[n,s?e:""]))})()},[t,s,u,d,c]);const p=a.flags.isEnabled("VIZ-7_NEW_SHEET")||a.flags.isEnabled("VIZ-7_NEW_SHEET_EDIT"),f=e.useKeyboard(),h=e.useMemo(()=>()=>{n(!1),f.enabled&&f.blur?.(!0)},[f,n]),m=e.useMemo(()=>e=>{switch(e.shiftKey?`shift+${e.key}`:e.key){case pf.ESCAPE:e.stopPropagation(),f.blur?.(!0);break;case pf.ENTER:case pf.SPACE:{e.stopPropagation();const n=e.target;n?.classList.contains(hf.ACTIVE_TAB)&&xf(t)?.focus();break}}},[t,f]),g=e.useMemo(()=>e=>{const n=e.shiftKey?`shift+${e.key}`:e.key,r=o.objectMap.values().next().value,i=o.objectApis.values().next().value;switch(n){case pf.ESCAPE:{const n=Cf(t);p?(({event:e,objectApi:t,activeTab:n})=>{e.stopPropagation(),t?.viewDataToggled&&t.support?.("viewData")?t.toggleDataView():n?.focus()})({event:e,objectApi:i,activeTab:n}):(({event:e,objectApi:t,activeTab:n})=>{e.stopPropagation(),t?.viewDataToggled&&t.supportViewData?.()?t.toggleDataView?.():n?.focus()})({event:e,objectApi:r,activeTab:n});break}case pf.ENTER:case pf.SPACE:{const n=xf(t);p?(({event:e,objectApi:t,activeTab:n})=>{if(!t)return;e.stopPropagation(),t.setOnBlurHandler?.(()=>{n?.focus(),t.setOnBlurHandler?.(void 0)}),!t.viewDataToggled&&t.support?.("viewData")?t.toggleDataView():t.toggleFocus?.(!0)})({event:e,objectApi:i,activeTab:n}):(({event:e,objectApi:t,activeTab:n})=>{if(!t)return;e.stopPropagation(),t.setOnBlurHandler?.(()=>{n?.focus(),t.setOnBlurHandler?.(void 0)}),!t.viewDataToggled&&t.supportViewData?.()?t.toggleDataView?.():t.viewDataToggled&&"function"==typeof t.dataViewObject?.focus?t.dataViewObject.focus():"function"==typeof t.focus&&t.focus()})({event:e,objectApi:r,activeTab:n});break}case pf.OPEN_CONTEXT_MENU:e.stopPropagation(),r?.viewDataToggled||t!==document.activeElement&&(h(),t.focus())}},[t,h,p,o]),b=e.useMemo(()=>e=>{const t=e.target;t?.classList.contains(hf.ACTIVE_TAB_PANEL)?g(e):m(e)},[m,g]);e.useEffect(()=>(r&&t.addEventListener(ff.KEY_DOWN,b),()=>{t.removeEventListener(ff.KEY_DOWN,b)}),[t,r,b]);const[v,y]=e.useState(!1);e.useEffect(()=>{v&&(y(!1),window.setTimeout(()=>((e=>e.getElementsByClassName(hf.TAB_MENU)?.[0])(t)??Cf(t))?.focus(),0))},[t,v]),e.useEffect(()=>{n(!1)},[i.edit,n]),e.useEffect(()=>{const e=e=>{const n=e.relatedTarget;t?.contains(n)||n?.classList.contains(hf.TAB_MENU_ITEM)||h?.()};return f.enabled&&f.active&&!i.edit&&(n(!0),y(!0),t.addEventListener(ff.FOCUS_OUT,e)),()=>{t.removeEventListener(ff.FOCUS_OUT,e)}},[f])},wf=t=>{const[n]=e.useState(t);return[n,function(e){Object.assign(n,e)}]},Sf=({isContainerActive:t,activeTabId:n,modifiedLayout:r,renderHelper:o,activeCharts:i,sharedContainerUtilities:a})=>{const l={modifiedLayout:r,activeTabId:n,renderHelper:o,isContainerActive:t},[s,u]=wf(l);u(l);const c=e.useMemo(()=>()=>{const e=$c(s.modifiedLayout);for(const[t,n]of s.renderHelper.objectMap.entries()){const r=s.isContainerActive&&s.activeTabId===e[t];"setIsActive"in n&&n.setIsActive(r)}},[s]);e.useEffect(()=>{s.isContainerActive&&c()},[o.objectMap,c,s]),e.useEffect(()=>{c()},[t,c]),(({activeCharts:t,onSetActiveCharts:n,canSetActiveChart:r=!0})=>{const[o,i]=wf({onSetActiveCharts:n});i({onSetActiveCharts:n}),e.useEffect(()=>{if(!r)return;const e=e=>{o.onSetActiveCharts(e)};t.on("setActiveCharts",e);const n=t.getActiveCharts();return n.length>0&&e(n),()=>t.removeListener("setActiveCharts",e)},[t,o,r])})({activeCharts:i,onSetActiveCharts:e=>{if(0===e.length)return;const t=s.modifiedLayout.objects.find(t=>t.id===e[0])?.childRefId;t&&t!==s.activeTabId&&a.setSelected(e)}})},Af={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),!t||[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};const kf={qInfo:{qId:"MasterObjectList",qType:"MasterObjectList"},qAppObjectListDef:{qType:"masterobject",qData:{name:"/qMetaDef/title",labelExpression:"/labelExpression",visualization:"/visualization",tags:"/qMetaDef/tags"}}};class Rf{sessionObject;constructor(e){this.getOrCreateSessionObject(e).catch(()=>{})}getOrCreateSessionObject=async e=>{const t=kf.qInfo.qId;this.sessionObject=await e.getObject(t).catch(()=>e.createSessionObject(kf))};getMasterVisualizations=async()=>{try{if(!this.sessionObject)return[];const e=await this.sessionObject.getLayout();return("qAppObjectList"in e?e.qAppObjectList.qItems:e).map(e=>({...e.qData,qExtendsId:e.qInfo.qId})).filter(e=>!gc.includes(e.visualization))}catch{return[]}}}let _f=function(e){return e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.UP=2]="UP",e[e.DOWN=3]="DOWN",e}({});class Ff{model;embed;app;undoRedoModel;chartList;masterVizList;mutex;constructor({embed:e,model:t,app:n,translator:r,mutex:o}){this.model=t,this.embed=e,this.app=n;const i=n;i&&i.getUndoInfoObject&&i.getUndoInfoObject().then(e=>{this.undoRedoModel=e}).catch(()=>{}),n&&(this.masterVizList=new Rf(n)),e&&r&&(this.chartList=new bc(e,r)),this.mutex=o}rememberAsGroup=async e=>{let t;this.undoRedoModel&&(t=await this.undoRedoModel.startGroup());const n=await e();return t&&this.undoRedoModel&&await this.undoRedoModel.endGroup(t),n};generateProperties=async(e,t)=>await this.embed.generateProperties({type:e,properties:t});async addChild(e,t,n){if(this.model&&!gc.includes(e.visualization))try{await this.mutex.lock();const{model:r}=this,o=async()=>{e.childRefId=Af.id();const o=await r.createChild(e);if(o){const t=await r.getProperties();t.objects.unshift({childRefId:e.childRefId,...n,condition:{qValueExpression:{qExpr:""}}}),await r.setProperties(t)}return t&&o&&await Promise.all(t.map(({qProperty:e})=>o.createChild(e))),o};return await this.rememberAsGroup(o)}catch{return}finally{this.mutex.unlock()}}addVizAsChild=async({type:e,initProps:t,objectInitProps:n,children:r})=>{try{const o=await this.generateProperties(e,t);let i=n?.label||t?.title;if(!i){const n=this.getChart(t?.visualization),r=n?.libraryInfo;i=r?.translation||r?.name||e}const a={...n,label:i};return await this.addChild(o,r,a)}catch{return}};addMasterObjectAsChild=async({initProps:e,objectInitProps:t,children:n})=>{try{if(!e||!e.qExtendsId||!this.app)return;const r=await this.app.getObject(e.qExtendsId),o=await r.getProperties(),i=t?.label||o.title||o.qMetaDef.title,a={...e,qInfo:{qType:"childObject"}},l={...t,label:i};return await this.addChild(a,n,l)}catch{return}};deleteChildren=async e=>{const{model:t}=this;if(0===e.length||!t)return!1;try{await this.mutex.lock();const n=await t.getFullPropertyTree(),{qChildren:r,qProperty:o}=n,i=new Set(e);return n.qChildren=r.filter(({qProperty:e})=>{const t=e.childRefId;return!t||!i.has(t)}),n.qProperty.objects=o.objects.filter(e=>!i.has(e.childRefId)),await t.setFullPropertyTree(n),!0}catch{return!1}finally{this.mutex.unlock()}};moveChild=async(e,t)=>{if(this.model)try{await this.mutex.lock();const n=await this.model.getProperties(),{objects:r}=n,o=r.findIndex(e=>e.childRefId===t);let i=!1;switch(e){case _f.TOP:{if(0===o)break;const e=r.splice(o,1)[0];r.unshift(e),i=!0;break}case _f.BOTTOM:{if(o===r.length-1)break;const e=r.splice(o,1)[0];r.push(e),i=!0;break}case _f.UP:{if(0===o)break;const e=r.splice(o,1)[0];r.splice(o-1,0,e),i=!0;break}case _f.DOWN:{if(o===r.length-1)break;const e=r.splice(o,1)[0];r.splice(o+1,0,e),i=!0;break}}i&&await this.model.setProperties(n)}finally{this.mutex.unlock()}};getCharts=()=>this.chartList?.getCharts()||{};getMasterVizList=()=>this.masterVizList?.getMasterVisualizations()||Promise.resolve([]);getChart=e=>this.chartList?.getChart(e);getChartLabelById=(e,t)=>{const n=e?.qChildList?.qItems.find(e=>e.qInfo.qId===t);if(!n)return"";const{visualization:r,title:o}=n.qData;if(o)return o;const i=this.getChart(r);return i?.libraryInfo?.translation||r}}class Pf{locked=!1;tasks=[];id;constructor(e){this.id=e}lock=async()=>this.locked?new Promise(e=>{this.tasks.push(e)}):(this.locked=!0,!0);unlock=()=>{if(this.tasks.length>0){const e=this.tasks.shift();e?.(!0)}else this.locked=!1}}const Lf={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},rebeccapurple:{r:102,g:51,b:153},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:255,g:255,b:255,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}},Tf={index:-1,color:"none",alpha:1},If=e=>{let t=parseFloat(e[1]),n=parseFloat(e[3]),r=parseFloat(e[5]);return t%=360,n/=100,r/=100,t=Math.max(0,Math.min(t,360)),n=Math.max(0,Math.min(n,1)),r=Math.max(0,Math.min(r,1)),{h:t,s:n,l:r,v:r}},Mf=(e,t,n,r,o=1)=>{let i,a,l,s;switch(n=Math.floor(n)){case 0:s=[e,t,0];break;case 1:s=[t,e,0];break;case 2:s=[0,e,t];break;case 3:s=[0,t,e];break;case 4:s=[t,0,e];break;case 5:s=[e,0,t];break;default:s=[0,0,0]}return i=s[0]+r,a=s[1]+r,l=s[2]+r,i=Math.round(255*i),a=Math.round(255*a),l=Math.round(255*l),`rgba(${i},${a},${l},${o})`},Of=e=>{const{h:t,s:n,l:r}=If(e),o=e.length>7?parseFloat(e[7]):1,i=r<=.5?2*r*n:(2-2*r)*n,a=t/60,l=i*(1-Math.abs(a%2-1));return Mf(i,l,a,r-.5*i,o)},Bf={resolveExpression:({colorExpression:e=""})=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(Number(t[1])/255*100)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return Of(t);if(t=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return Of(t);if(t=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return(e=>{const{h:t,s:n,v:r}=If(e),o=r*n,i=t/60,a=o*(1-Math.abs(i%2-1));return Mf(o,a,i,r-o)})(t);if(t=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e),t)return e;if(t=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e),t)return e;const n=e&&Lf[e.toLowerCase()];if(n){const e=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${e})`}return"none"},getColor({style:e,defaultColor:t,theme:n}){const r=e?.color||Tf;let o;return o=e?.useColorExpression?Bf.resolveExpression(e):"string"==typeof r?r:n?.getColorPickerColor(r)||"",o&&"none"!==o?o:t}},Nf=()=>Et.jsx(Pc,{viewBox:"0 0 16 16",children:Et.jsx("path",{d:"M15 6V5H5V2H1.5a.5.5 0 0 0-.5.5V6H0V2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4h-1Zm-5-4H6v2h4V2Zm4.5 0H11v2h4V2.5a.5.5 0 0 0-.5-.5Zm1.5 9h-1V8h1v3Zm0 3a1 1 0 0 1-1 1h-1v-1h.6a.4.4 0 0 0 .4-.4V13h1v1Zm-7 1v-1h3v1H9Zm-5 0v-1h3v1H4Zm-3 0a1 1 0 0 1-1-1v-1h1v.6c0 .22.18.4.4.4H2v1H1ZM0 8h1v3H0V8Zm4-.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4ZM5 11h6V8H5v3Z"})}),jf=({libraryInfo:e,style:t,id:n})=>Et.jsx("div",{style:t,"data-testid":"tab-chart-icon",id:n,className:hf.TABS_ICON,children:Et.jsx(e.IconDefinition,{})}),zf=({style:e,id:t})=>Et.jsx("div",{style:e,"data-testid":"tab-hidden-icon",id:t,children:Et.jsx(Lc,{viewBox:"0 0 16 16",children:Et.jsx("path",{d:"m13.441.795.764.646-1.839 2.174c.568.434 1.076.914 1.522 1.385a13.79 13.79 0 0 1 2.109 3 13.798 13.798 0 0 1-2.108 3c-1.382 1.457-3.345 3-5.89 3-1.34 0-2.52-.428-3.536-1.045l-1.904 2.25-.764-.646L13.441.795ZM11.72 4.379l-1.427 1.686a3 3 0 0 1-3.82 4.516l-1.354 1.6c.86.497 1.819.819 2.88.819 2.121 0 3.834-1.287 5.161-2.685A12.666 12.666 0 0 0 14.857 8a12.691 12.691 0 0 0-1.697-2.315c-.35-.37-.727-.73-1.132-1.063l-.308-.243ZM8 2a6.428 6.428 0 0 1 2.242.412l.305.123-.681.805A5.359 5.359 0 0 0 8 3C5.877 3 4.164 4.287 2.837 5.685A12.664 12.664 0 0 0 1.14 8a12.66 12.66 0 0 0 1.697 2.315l.301.308.311.299-.646.765A14.567 14.567 0 0 1 2.109 11 13.791 13.791 0 0 1 0 8a13.801 13.801 0 0 1 2.109-3C3.49 3.543 5.454 2 8 2Zm1.633 4.845-2.5 2.956a1.999 1.999 0 0 0 2.5-2.956Zm-3.917-.793a3 3 0 0 1 2.692-1.025l.202.035-.809.948A2 2 0 0 0 6 7.967l.003.152-.808.947a3 3 0 0 1 .521-3.014Z"})})}),$f=()=>Et.jsx(Lc,{viewBox:"0 0 16 16",children:Et.jsx("path",{d:"M12 4H6V3h6v1ZM6 8.5h4v-1H6v1Zm9 4.5H6v-1h9v1ZM3 11a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1Zm0-5.5a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1ZM3 2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h1Zm0 1H2v1h1V3Z"})}),Uf=Ni(Vu)({width:28,overflow:"hidden"}),Hf=Ni(Vu)({height:28,width:"100%",overflow:"hidden",alignItems:"center","&::before":{visibility:"hidden"}}),Vf=(e,t)=>e.find(e=>e.childRefId===t),Gf=(e,t)=>!t.edit&&(0===e.condition||!1===e.visible),Wf=e=>{const{objects:t,defaultTabId:n,cachedTabId:r}=e;return r||(n&&t.some(e=>e.childRefId===n)?n:t[0]?.childRefId||"")};class qf{modifiedLayout;themeStyle;style;objectMap;activeTabId;theme;constructor({modifiedLayout:e,themeService:t}){this.modifiedLayout=e,this.activeTabId=Wf(this.modifiedLayout),this.themeStyle=t.getStyles(),this.theme=t.getTheme(),this.objectMap=Uc(this.modifiedLayout),this.style=this.createStyleClasses()}getTabsWidth=e=>{const t=this.resolveComponentStyle({compPath:"width.value",themePath:"tabWidth.value"});if(void 0===t||2!==t.length||e!==this.modifiedLayout.orientation)return{};const n=this.resolveComponentStyle({compPath:"width.unit",themePath:"tabWidth.unit",defaultValue:"%"});return{minWidth:`${t[0]}${n}`,maxWidth:`${t[1]}${n}`}};getTabWidth=e=>{const t=e?.value,n=e?.unit??"%";if(void 0===t||2!==t.length||"left"===this.modifiedLayout.orientation)return{};return{minWidth:`${t[0]}${n}`,maxWidth:`${t[1]}${n}`}};getColorStyle=(e,t=e)=>{const n=this.resolveComponentStyle({compPath:e,themePath:t});return Bf.getColor({style:n,theme:this.theme})??n};getTabBackgroundStyle=(e,t)=>{let n;if(this.activeTabId===e){const e=this.resolveComponentStyle({compPath:"background.selected",themePath:""});n=Bf.getColor({style:e,theme:this.theme})}return n??Bf.getColor({style:t,theme:this.theme})};createTabClasses=()=>this.modifiedLayout.objects?.reduce((e,t)=>{const n=t?.childRefId,r=t?.components?.find(e=>"tab"===e.key);return e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}`]={textAlign:ap(r,"label.alignment"),backgroundColor:this.getTabBackgroundStyle(n,r?.background),...this.getTabWidth(r?.width)},e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}:hover`]={..."left"===this.modifiedLayout.orientation&&{backgroundColor:this.getColorStyle("background.hover","background.hover.color")}},e[`#tab-label-${this.modifiedLayout.qInfo.qId}-${n}`]={fontSize:ap(r,"label.fontSize"),fontFamily:ap(r,"label.fontFamily"),color:Bf.getColor({style:ap(r,"label.color"),theme:this.theme})},e[`#tab-icon-${this.modifiedLayout.qInfo.qId}-${n} svg`]={height:ap(r,"icon.size"),color:Bf.getColor({style:ap(r,"icon.color"),theme:this.theme})},e},{});createTabsClasses=()=>({[bf]:{fontSize:this.resolveComponentStyle({compPath:"label.fontSize",themePath:"label.value.fontSize"}),fontFamily:this.resolveComponentStyle({compPath:"label.fontFamily",themePath:"label.value.fontFamily"}),color:this.resolveComponentStyle({compPath:"label.color.color",themePath:"label.value.color"})},[vf]:{height:this.resolveComponentStyle({compPath:"icon.size",themePath:"icon.value.fontSize"}),color:this.getColorStyle("icon.color","icon.value.color")},[mf]:{textAlign:this.resolveComponentStyle({compPath:"label.alignment",themePath:"label.textAlignment"}),...this.getTabsWidth("top")},[gf]:{..."top"===this.modifiedLayout.orientation&&{borderBottomColor:this.getColorStyle("indicator.hover","indicator.hover.color")}},[yf]:{...this.getTabsWidth("left"),backgroundColor:this.getColorStyle("background.unselected","")},[Ef]:{backgroundColor:this.getColorStyle("indicator.selected","indicator.selected.color")}});createStyleClasses=()=>({...this.createTabsClasses(),...this.createTabClasses()});getStyleClasses(){return this.style}resolveComponentStyle=({key:e="tabs",compPath:t,themePath:n=t,defaultValue:r})=>{const o=this.modifiedLayout.components?.find(t=>t.key===e);return ap(o,t)??ap(this.themeStyle,n)??r};getTabStyle(e){return this.objectMap[e].components?.find(e=>"tab"===e.key)}}const Yf=()=>{const t=e.useElement(),n=e.useApp(),r=e.useStaleLayout(),o=e.useEmbed(),i=e.useModel(),a=e.useTranslator(),l=e.useOptions(),s=e.useEmitter(),u=e.useInteractionState(),c=function({theme:e,config:t={}}){const{id:n,resolve:r=[],transform:o=[],extend:i=[]}=t,a={theme:e,matrix:Dp(r),styles:void 0};return a.styles=Ap({theme:e,id:n,transform:o,extend:i,matrix:a.matrix}),{getStyles:()=>a.styles,getTheme:()=>a.theme,setTheme:e=>{a.theme=e,a.styles=Ap({theme:e,id:n,transform:o,extend:i,matrix:a.matrix})}}}({theme:e.useTheme(),config:{id:"tabbedContainer",resolve:[["object.tabbedContainer","indicator.selected","color"],["object.tabbedContainer","indicator.hover","color"],["object.tabbedContainer","background.hover","color"],["object.tabbedContainer","icon.value","color"],["object.tabbedContainer","icon.value","fontSize"]]}}),d=e.useMemo(()=>new bc(o,a),[o,a]),[p]=e.useState(()=>new Pf(i?.id)),[f,h]=e.useState(!1),m=e.useMemo(()=>o&&i&&n?new Ff({embed:o,model:i,app:n,translator:a,mutex:p}):void 0,[o,i,n,a,p]),g=e.useMemo(()=>zc(r),[r]),b=e.useMemo(()=>new qf({modifiedLayout:g,themeService:c}),[g,c]);return e.useMemo(()=>({app:n,modifiedLayout:g,embed:o,model:i,emitter:s,interactions:u,dataHandler:m,chartList:d,styleModel:b,mutex:p,options:l,accessibility:f,setAccessibility:h,translator:a,element:t}),[g,o,i,n,s,u,m,d,b,p,l,f,a,t])},Kf=({dataHandler:e,modifiedLayout:t,translator:n,sharedContainerUtilities:r,Icon:o})=>{const[i,a]=y.useState(void 0);if(!e||!t)return null;const l=!t.qExtendsId;return Et.jsx(Sc,{children:Et.jsxs(wc,{children:[Et.jsx(o,{}),l?Et.jsxs(Et.Fragment,{children:[Et.jsx(Fc,{sx:{width:250,height:32,fontFamily:"inherit"},className:"init-button",variant:i?"contained":"outlined",onClick:e=>{a(e.currentTarget)},"aria-label":n.get("LayoutContainer.EmptyList.AddContent"),disableRipple:!0,children:n.get("LayoutContainer.EmptyList.AddContent")}),Et.jsx(Mc,{translator:n,anchorEl:i,dataHandler:e,onClose:()=>{a(void 0)},sharedContainerUtilities:r})]}):Et.jsx(ul,{variant:"inherit",children:n.get("LayoutContainer.EmptyList.EmptyHint")})]})})};class Xf{_rendered=new Set;_objectMap=new Map;_objectApis=new Map;_resolver;_dependencyData;_recreateMap=new Map;constructor(e){this._dependencyData=e}set dependencyData(e){this._dependencyData=e}get dependencyData(){return this._dependencyData}get rendered(){return this._rendered}get objectMap(){return this._objectMap}get objectApis(){return this._objectApis}get resolver(){return this._resolver}get recreateMap(){return this._recreateMap}createTimerForRendering=()=>{if(!this.resolver){let e;const t=setTimeout(()=>{this._dependencyData.options.onRenderStatusUpdate?.("Layout container rendering timeout reached after 90 seconds. Resolving anyway."),this.doResolve()},9e4),n=new Promise(t=>{e=t});this._resolver={promise:n,resolve:e,timer:t}}return this._resolver};doResolve=()=>{this.resolver&&(clearTimeout(this.resolver?.timer),this.resolver.resolve?.(!0),this._resolver=void 0)};tryToResolve=()=>{const{visibleLayoutObjects:e}=this._dependencyData;if(this.resolver){e.every(e=>this.rendered.has(e.id))&&(this._dependencyData.options.onRenderStatusUpdate?.("All layout container children rendered"),this.doResolve())}};syncObjects(e){const t=new Set,n=new Set([...Array.from(this.objectMap.keys()),...Array.from(this.objectApis.keys()),...this.rendered]),r=new Set(n);let o=!1;return e.forEach(e=>{n.has(e.id)?(this.rendered.has(e.id)&&t.add(e.id),r.delete(e.id)):o=!0}),r.forEach(e=>{const t=this.objectMap.get(e);t&&(this.confirmPotentialSelections(t),t.destroy?.(),this.objectMap.delete(e)),this.objectApis.get(e)?.destroy(),this.objectApis.delete(e)}),this._rendered=t,this.tryToResolve(),o}destroy(){for(const e of this.objectApis.values())e.destroy();this._objectMap=new Map,this._objectApis=new Map}saveObject(e,t){this.objectMap.set(e,t)}saveObjectApi(e,t){this._objectApis.set(e,t)}onRendered(e){this._dependencyData.options.onRenderStatusUpdate?.(`Layout container child rendered: ${this.rendered.size+1}/${this._dependencyData.visibleLayoutObjects.length} ${e}`),this.rendered.add(e),this.tryToResolve()}getChildrenObjects(){const{visibleLayoutObjects:e}=this._dependencyData,t=[];return e.forEach(e=>{const n=this.objectMap.get(e.id);n&&t.push(n)}),t}getChildLayout(e){const{modifiedLayout:t}=this._dependencyData;return t.qChildList.qItems.find(t=>t.qInfo.qId===e)}shouldRenderWithQmfeEmbed(e){return!!this._dependencyData.options.useQlikEmbedChildRendering&&!!e}getNebulaOptions(e){const{viewState:t,modifiedLayout:n,options:r}=this._dependencyData;return{isReadonly:!1,isParentMaster:!!n?.qExtendsId,isSnapshot:!!n.snapshotData,...!!t?.viewStates?.[e]&&{viewState:t?.viewStates[e]},...!!t?.layouts?.[e]&&{layout:t.layouts[e]},direction:r.direction,chartAnimations:r.chartAnimations,progressiveRendering:r.progressiveRendering,freeResize:r.freeResize,navigation:r.navigation,disableThemeBorder:r.disableThemeBorder??!1,fallbackToClient:r.fallbackToClient}}getNebulaEmbedOptions(e){const{useQlikEmbedChildRendering:t,getContextMenuParent:n,embedProps:r}=this._dependencyData.options;return{...this.getNebulaOptions(e),setController:t=>{this.saveObject(e,t)},onRendered:()=>{this.onRendered(e)},onInitialRender:()=>{this.onRendered(e)},useQlikEmbedChildRendering:t,getContextMenuParent:n,embedProps:r}}getQmfeEmbedProps(e,t){const{options:n,containerMenu:r={id:"container-menu",icon:"ChartObject"},translator:o}=this._dependencyData,{embedProps:i,getContextMenuParent:a}=n;return{...i,ui:"analytics/chart",objectId:e,preview:!0,appId:t,onRender:()=>{this.onRendered(e)},options:{...i?.options,...this.getNebulaOptions(e)},onError:t=>{const n=this.getChildLayout(e)?.qInfo.qType;console.error("Could not render chart with id",e,n,t)},exposeRefApi:({getVisualizationApi:t})=>{t().then(t=>{const n=t;this.saveObjectApi(e,n),this.saveObject(e,{...n,getViewState:()=>n.getImperativeHandle().then(e=>e.getViewState())})})},onContextMenu:async e=>{try{const t=await(i?.onContextMenu?i.onContextMenu(e):e.contextMenuItems)??[],n=await(a?.(e));return n&&"contextMenuItems"in e&&t.push({id:r.id,icon:{value:r.icon,type:"sprout"},label:o?.get("contextMenu.subMenuContainerOptions")??"Container options",onClick:()=>{},items:n}),t}catch(e){return console.error("Error getting context menu parent options",e),[]}}}}confirmPotentialSelections(e){e&&"selectionsApi"in e&&e.selectionsApi.active&&e.selectionsApi.confirm()}}var Qf=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Zf=Qf((e,t)=>{t.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,t.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,t.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/}),Jf=Qf((e,t)=>{const n=Zf();t.exports={isSpaceSeparator:e=>"string"==typeof e&&n.Space_Separator.test(e),isIdStartChar:e=>"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||"$"===e||"_"===e||n.ID_Start.test(e)),isIdContinueChar:e=>"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"$"===e||"_"===e||"‌"===e||"‍"===e||n.ID_Continue.test(e)),isDigit:e=>"string"==typeof e&&/[0-9]/.test(e),isHexDigit:e=>"string"==typeof e&&/[0-9A-Fa-f]/.test(e)}}),eh=Qf((e,t)=>{const n=Jf();let r,o,i,a,l,s,u,c,d,p,f,h,m,g;function b(e,t,n){const r=e[t];if(null!=r&&"object"==typeof r)if(Array.isArray(r))for(let e=0;e<r.length;e++){const t=String(e),o=b(r,t,n);void 0===o?delete r[t]:Object.defineProperty(r,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const e in r){const t=b(r,e,n);void 0===t?delete r[e]:Object.defineProperty(r,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}function v(){for(p="default",f="",h=!1,m=1;;){g=y();const e=C[p]();if(e)return e}}function y(){if(r[a])return String.fromCodePoint(r.codePointAt(a))}function E(){const e=y();return"\n"===e?(l++,s=0):e?s+=e.length:s++,e&&(a+=e.length),e}t.exports=function(e,t){r=String(e),o="start",i=[],a=0,l=1,s=0,u=void 0,c=void 0,d=void 0;do{u=v(),S[o]()}while("eof"!==u.type);return"function"==typeof t?b({"":d},"",t):d};const C={default(){switch(g){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void E();case"/":return E(),void(p="comment");case void 0:return E(),x("eof")}if(!n.isSpaceSeparator(g))return C[o]();E()},comment(){switch(g){case"*":return E(),void(p="multiLineComment");case"/":return E(),void(p="singleLineComment")}throw R(E())},multiLineComment(){switch(g){case"*":return E(),void(p="multiLineCommentAsterisk");case void 0:throw R(E())}E()},multiLineCommentAsterisk(){switch(g){case"*":return void E();case"/":return E(),void(p="default");case void 0:throw R(E())}E(),p="multiLineComment"},singleLineComment(){switch(g){case"\n":case"\r":case"\u2028":case"\u2029":return E(),void(p="default");case void 0:return E(),x("eof")}E()},value(){switch(g){case"{":case"[":return x("punctuator",E());case"n":return E(),D("ull"),x("null",null);case"t":return E(),D("rue"),x("boolean",!0);case"f":return E(),D("alse"),x("boolean",!1);case"-":case"+":return"-"===E()&&(m=-1),void(p="sign");case".":return f=E(),void(p="decimalPointLeading");case"0":return f=E(),void(p="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return f=E(),void(p="decimalInteger");case"I":return E(),D("nfinity"),x("numeric",1/0);case"N":return E(),D("aN"),x("numeric",NaN);case'"':case"'":return h='"'===E(),f="",void(p="string")}throw R(E())},identifierNameStartEscape(){if("u"!==g)throw R(E());E();const e=w();switch(e){case"$":case"_":break;default:if(!n.isIdStartChar(e))throw F()}f+=e,p="identifierName"},identifierName(){switch(g){case"$":case"_":case"‌":case"‍":return void(f+=E());case"\\":return E(),void(p="identifierNameEscape")}if(!n.isIdContinueChar(g))return x("identifier",f);f+=E()},identifierNameEscape(){if("u"!==g)throw R(E());E();const e=w();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!n.isIdContinueChar(e))throw F()}f+=e,p="identifierName"},sign(){switch(g){case".":return f=E(),void(p="decimalPointLeading");case"0":return f=E(),void(p="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return f=E(),void(p="decimalInteger");case"I":return E(),D("nfinity"),x("numeric",m*(1/0));case"N":return E(),D("aN"),x("numeric",NaN)}throw R(E())},zero(){switch(g){case".":return f+=E(),void(p="decimalPoint");case"e":case"E":return f+=E(),void(p="decimalExponent");case"x":case"X":return f+=E(),void(p="hexadecimal")}return x("numeric",0*m)},decimalInteger(){switch(g){case".":return f+=E(),void(p="decimalPoint");case"e":case"E":return f+=E(),void(p="decimalExponent")}if(!n.isDigit(g))return x("numeric",m*Number(f));f+=E()},decimalPointLeading(){if(n.isDigit(g))return f+=E(),void(p="decimalFraction");throw R(E())},decimalPoint(){switch(g){case"e":case"E":return f+=E(),void(p="decimalExponent")}return n.isDigit(g)?(f+=E(),void(p="decimalFraction")):x("numeric",m*Number(f))},decimalFraction(){switch(g){case"e":case"E":return f+=E(),void(p="decimalExponent")}if(!n.isDigit(g))return x("numeric",m*Number(f));f+=E()},decimalExponent(){switch(g){case"+":case"-":return f+=E(),void(p="decimalExponentSign")}if(n.isDigit(g))return f+=E(),void(p="decimalExponentInteger");throw R(E())},decimalExponentSign(){if(n.isDigit(g))return f+=E(),void(p="decimalExponentInteger");throw R(E())},decimalExponentInteger(){if(!n.isDigit(g))return x("numeric",m*Number(f));f+=E()},hexadecimal(){if(n.isHexDigit(g))return f+=E(),void(p="hexadecimalInteger");throw R(E())},hexadecimalInteger(){if(!n.isHexDigit(g))return x("numeric",m*Number(f));f+=E()},string(){switch(g){case"\\":return E(),void(f+=function(){switch(y()){case"b":return E(),"\b";case"f":return E(),"\f";case"n":return E(),"\n";case"r":return E(),"\r";case"t":return E(),"\t";case"v":return E(),"\v";case"0":if(E(),n.isDigit(y()))throw R(E());return"\0";case"x":return E(),function(){let e="",t=y();if(!n.isHexDigit(t))throw R(E());if(e+=E(),t=y(),!n.isHexDigit(t))throw R(E());return e+=E(),String.fromCodePoint(parseInt(e,16))}();case"u":return E(),w();case"\n":case"\u2028":case"\u2029":return E(),"";case"\r":return E(),"\n"===y()&&E(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw R(E())}return E()}());case'"':return h?(E(),x("string",f)):void(f+=E());case"'":return h?void(f+=E()):(E(),x("string",f));case"\n":case"\r":throw R(E());case"\u2028":case"\u2029":!function(e){console.warn(`JSON5: '${P(e)}' in strings is not valid ECMAScript; consider escaping`)}(g);break;case void 0:throw R(E())}f+=E()},start(){switch(g){case"{":case"[":return x("punctuator",E())}p="value"},beforePropertyName(){switch(g){case"$":case"_":return f=E(),void(p="identifierName");case"\\":return E(),void(p="identifierNameStartEscape");case"}":return x("punctuator",E());case'"':case"'":return h='"'===E(),void(p="string")}if(n.isIdStartChar(g))return f+=E(),void(p="identifierName");throw R(E())},afterPropertyName(){if(":"===g)return x("punctuator",E());throw R(E())},beforePropertyValue(){p="value"},afterPropertyValue(){switch(g){case",":case"}":return x("punctuator",E())}throw R(E())},beforeArrayValue(){if("]"===g)return x("punctuator",E());p="value"},afterArrayValue(){switch(g){case",":case"]":return x("punctuator",E())}throw R(E())},end(){throw R(E())}};function x(e,t){return{type:e,value:t,line:l,column:s}}function D(e){for(const t of e){if(y()!==t)throw R(E());E()}}function w(){let e="",t=4;for(;t-- >0;){const t=y();if(!n.isHexDigit(t))throw R(E());e+=E()}return String.fromCodePoint(parseInt(e,16))}const S={start(){if("eof"===u.type)throw _();A()},beforePropertyName(){switch(u.type){case"identifier":case"string":return c=u.value,void(o="afterPropertyName");case"punctuator":return void k();case"eof":throw _()}},afterPropertyName(){if("eof"===u.type)throw _();o="beforePropertyValue"},beforePropertyValue(){if("eof"===u.type)throw _();A()},beforeArrayValue(){if("eof"===u.type)throw _();"punctuator"!==u.type||"]"!==u.value?A():k()},afterPropertyValue(){if("eof"===u.type)throw _();switch(u.value){case",":return void(o="beforePropertyName");case"}":k()}},afterArrayValue(){if("eof"===u.type)throw _();switch(u.value){case",":return void(o="beforeArrayValue");case"]":k()}},end(){}};function A(){let e;switch(u.type){case"punctuator":switch(u.value){case"{":e={};break;case"[":e=[]}break;case"null":case"boolean":case"numeric":case"string":e=u.value}if(void 0===d)d=e;else{const t=i[i.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,c,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(null!==e&&"object"==typeof e)i.push(e),o=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{const e=i[i.length-1];o=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function k(){i.pop();const e=i[i.length-1];o=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}function R(e){return L(void 0===e?`JSON5: invalid end of input at ${l}:${s}`:`JSON5: invalid character '${P(e)}' at ${l}:${s}`)}function _(){return L(`JSON5: invalid end of input at ${l}:${s}`)}function F(){return s-=5,L(`JSON5: invalid identifier character at ${l}:${s}`)}function P(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function L(e){const t=new SyntaxError(e);return t.lineNumber=l,t.columnNumber=s,t}}),th=Qf((e,t)=>{const n=Jf();t.exports=function(e,t,r){const o=[];let i,a,l,s="",u="";if(null==t||"object"!=typeof t||Array.isArray(t)||(r=t.space,l=t.quote,t=t.replacer),"function"==typeof t)a=t;else if(Array.isArray(t)){i=[];for(const e of t){let t;"string"==typeof e?t=e:("number"==typeof e||e instanceof String||e instanceof Number)&&(t=String(e)),void 0!==t&&i.indexOf(t)<0&&i.push(t)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),"number"==typeof r?r>0&&(r=Math.min(10,Math.floor(r)),u=" ".substr(0,r)):"string"==typeof r&&(u=r.substr(0,10)),c("",{"":e});function c(e,t){let n=t[e];switch(null!=n&&("function"==typeof n.toJSON5?n=n.toJSON5(e):"function"==typeof n.toJSON&&(n=n.toJSON(e))),a&&(n=a.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof n?d(n):"number"==typeof n?String(n):"object"==typeof n?Array.isArray(n)?function(e){if(o.indexOf(e)>=0)throw TypeError("Converting circular structure to JSON5");o.push(e);let t=s;s+=u;let n,r=[];for(let t=0;t<e.length;t++){const n=c(String(t),e);r.push(void 0!==n?n:"null")}if(0===r.length)n="[]";else if(""===u)n="["+r.join(",")+"]";else{let e=",\n"+s,o=r.join(e);n="[\n"+s+o+",\n"+t+"]"}return o.pop(),s=t,n}(n):function(e){if(o.indexOf(e)>=0)throw TypeError("Converting circular structure to JSON5");o.push(e);let t=s;s+=u;let n,r=i||Object.keys(e),a=[];for(const t of r){const n=c(t,e);if(void 0!==n){let e=p(t)+":";""!==u&&(e+=" "),e+=n,a.push(e)}}if(0===a.length)n="{}";else{let e;if(""===u)e=a.join(","),n="{"+e+"}";else{let r=",\n"+s;e=a.join(r),n="{\n"+s+e+",\n"+t+"}"}}return o.pop(),s=t,n}(n):void 0}function d(e){const t={"'":.1,'"':.2},r={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let o="";for(let i=0;i<e.length;i++){const a=e[i];switch(a){case"'":case'"':t[a]++,o+=a;continue;case"\0":if(n.isDigit(e[i+1])){o+="\\x00";continue}}if(r[a])o+=r[a];else{if(a<" "){let e=a.charCodeAt(0).toString(16);o+="\\x"+("00"+e).substring(e.length);continue}o+=a}}const i=l||Object.keys(t).reduce((e,n)=>t[e]<t[n]?e:n);return o=o.replace(new RegExp(i,"g"),r[i]),i+o+i}function p(e){if(0===e.length)return d(e);const t=String.fromCodePoint(e.codePointAt(0));if(!n.isIdStartChar(t))return d(e);for(let r=t.length;r<e.length;r++)if(!n.isIdContinueChar(String.fromCodePoint(e.codePointAt(r))))return d(e);return e}}});async function nh(e,t){return t?.runtimeModuleMocks?.[e]?t.runtimeModuleMocks?.[e]:(function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");const t=function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");let t,n=e?.embedRuntimeUrl||e?.url||e?.host;if(n||"noauth"!==e?.authType||(n="https://cdn.qlikcloud.com/qmfe"),n){for(t=n.toLowerCase().startsWith("https://")||n.toLowerCase().startsWith("http://")?n:`https://${n}`;t.endsWith("/");)t=t.slice(0,-1);return`${t}/qlik-embed/main.js`}}(e);t&&window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig&&window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig({url:t,hostConfig:e}),t&&window.__qlikMainPrivateResolvers.resolveMainJsUrl&&(window.__qlikMainPrivateResolvers.forwardCompatibleHostConfig=e,window.__qlikMainPrivateResolvers.resolveMainJsUrl(t))}(t),async function(e){if(!window.__qlikMainPrivateResolvers?.qlikMainPromise)throw new Error("No main url resolver found");return(await window.__qlikMainPrivateResolvers.qlikMainPromise).import(e)}(e))}Qf((e,t)=>{t.exports={parse:eh(),stringify:th()}})(),window.__qlikMainPrivateResolvers||(window.__qlikMainPrivateResolvers={}),window.__qlikMainPrivateResolvers.mainUrlPromise||(window.__qlikMainPrivateResolvers.mainUrlPromise=new Promise(e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrl=t=>{e(t)})})),window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise||(window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise=new Promise(e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig=t=>{e(t)})})),window.__qlikMainPrivateResolvers.qlikMainPromise||(window.__qlikMainPrivateResolvers.qlikMainPromise=(async()=>{if(window.QlikMain)return window.QlikMain;if(!window.__qlikMainPrivateResolvers?.mainJsUrlAndHostConfigPromise||!window.__qlikMainPrivateResolvers.mainUrlPromise)throw new Error("No main url promise found, report this issue");const e=setTimeout(()=>{console.warn("Waiting for a host parameter pointing to a Qlik runtime system")},5e3),{url:t,hostConfig:n}=await Promise.race([window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise,window.__qlikMainPrivateResolvers.mainUrlPromise.then(e=>({url:e,hostConfig:window.__qlikMainPrivateResolvers?.forwardCompatibleHostConfig}))]);clearTimeout(e);const r=await async function(e,t){if("windowscookie"===t?.authType){if(t.getAccessToken){const n=await async function(e){if("function"==typeof e)return e();if("string"==typeof e){const t=function(e){return globalThis[e]}(e);if("function"!=typeof t)throw new Error(`getAccessToken function "${e}" not found on globalThis. Please make sure it is defined.`);return t()}}(t.getAccessToken);return n&&await fetch(e,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},cache:"no-cache"}),!0}if(t.loginUri&&!(await fetch(e,{method:"GET",mode:"cors",credentials:"include",redirect:"manual"}).catch(()=>({ok:!1}))).ok)return window.location.replace(t.loginUri),new Promise(()=>{})}return!1}(t,n);return new Promise(e=>{if(window.QlikMain)e(window.QlikMain);else{const n=window.document.createElement("script");t&&(n.src=t),r&&(n.crossOrigin="use-credentials"),n.addEventListener("error",()=>{console.error(`Qlik runtime system not found: ${t}`)}),n.addEventListener("load",()=>{window.QlikMain&&e(window.QlikMain)}),window.document.head.appendChild(n)}})})());const rh=y.createContext(void 0),oh=e=>{const t=y.useRef(null),n=y.useRef(void 0),{vanillaEmbedFn:r,hostConfig:o,...i}=e;return y.useEffect(()=>(t.current&&(n.current=r({target:t.current,props:{hostConfig:o,...i}})),()=>{n.current&&n.current.$destroy()}),[]),y.useEffect(()=>{n.current&&n.current.$set({hostConfig:o,...i})},[i,o]),Et.jsx("qlik-embed-react",{style:{display:"contents"},ref:t})},ih=e=>{const t=y.useContext(rh),{vanillaEmbedFn:n}=function(e){const[t,n]=y.useState({});return y.useEffect(()=>{e&&nh("embed-vanilla@v1",e).then(({mountVanillaEmbedComponent:e})=>{n({vanillaEmbedFn:e})}).catch(e=>{n({vanillaError:e instanceof Error?e:new Error(String(e))})})},[e]),t}(t);return n?Et.jsx(oh,{hostConfig:t,...e,vanillaEmbedFn:n}):null};const ah=y.forwardRef(function(e,t){const[n,r]=y.useState(null),o=function(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e},[e]),y.useCallback(e=>{t.current(e)},[])}(e=>{r(()=>e)});return y.useImperativeHandle(t,()=>n,[n]),Et.jsx(ih,{exposeRefApi:o,...e})}),lh=new Map,sh=e=>{const t=lh.get(e);t&&(t.unmount(),lh.delete(e))},uh=({chartObject:e,embed:t,renderHelper:n,direction:r,interactions:o,env:i,app:a})=>{const l=y.useRef(null),{id:s}=e;y.useEffect(()=>(s&&l.current&&(async(e,t,n,r,o)=>{const i=o?.id;if(r.shouldRenderWithQmfeEmbed(i))try{const n=Ec.createRoot(e);return lh.set(t,n),void n.render(Et.jsx(rh.Provider,{value:{},children:Et.jsx(ah,{...r.getQmfeEmbedProps(t,i)})}))}catch(e){console.warn("QlikEmbed mount failed, falling back to embed.render()",t,e),sh(t)}n.render({element:e,id:t,options:r.getNebulaEmbedOptions(t)}).then(e=>{r.saveObjectApi(t,e)}).catch(e=>{const n=r.getChildLayout(t)?.qInfo.qType;console.error("Could not render chart with id",t,n,e)})})(l.current,s,t,n,a),()=>{s&&sh(s)}),[s,t,n,r,a]);const u=y.useMemo(()=>()=>{if(e?.id&&i.anything){const t=e?.label,{sense:r}=i.anything,o="current",a=n.objectMap.get(e.id);a&&r.propertyPanel.show({model:a.model,parent:o,headerLabel:t,keepCurrentActiveCell:!0})}},[i,e,n]);return y.useEffect(()=>{const e=l?.current;return e&&o?.edit&&e.addEventListener("dblclick",u),()=>{e?.removeEventListener("dblclick",u)}},[l,u,o]),Et.jsx("div",{ref:l,style:{position:"relative",height:"100%",width:"100%"},"data-testid":`tab-panel-${e.childRefId}`})};let ch=function(e){return e.TABS_HEIGHT="36px",e}({});const dh=({charts:e,handleChangeTab:t,activeTabId:n,element:r,translator:o,accessibility:i,disabled:a})=>{const[l,s]=E.useState(null),u=Boolean(l),c=()=>{s(null)},d=y.useCallback(e=>{e?.focus()},[]);return Et.jsxs(Et.Fragment,{children:[Et.jsx(Wl,{onClick:e=>{s(e.currentTarget)},disabled:a,"aria-haspopup":"menu","data-testid":"chartTabMenuDropdownButton",tabIndex:i?0:-1,"aria-label":o.get("Container.Label.Visualizations"),className:hf.TAB_MENU,sx:{m:"2px"},children:Et.jsx($f,{})}),Et.jsx(wu,{anchorEl:l,open:u,onClose:c,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},MenuListProps:{sx:{py:0}},slotProps:{paper:{sx:{maxHeight:"500px",maxWidth:"500px"}}},children:e.map(e=>Et.jsx(_u,{className:hf.TAB_MENU_ITEM,ref:n===e.childRefId&&u?d:null,onClick:()=>{(e=>{t(e.childRefId),c(),window.setTimeout(()=>{r.getElementsByClassName(hf.ACTIVE_TAB_PANEL)?.[0]?.focus()},0)})(e)},sx:n===e.childRefId?{backgroundColor:"rgba(0, 0, 0, 0.1)"}:{},"aria-label":e.label,title:e.label,children:Et.jsx(ul,{variant:"inherit",noWrap:!0,children:e.label})},`chartTabMenu-${e.childRefId}`))})]})},ph=({label:e,id:t})=>Et.jsx(Ol,{className:hf.TAB_LABEL,id:`tab-label-${t}`,sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",overflow:"hidden",flexWrap:"wrap"},children:Et.jsx("span",{style:{width:"100%",overflowWrap:"break-word",hyphens:"auto",fontWeight:"bold",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",lineHeight:"normal",overflow:"hidden"},children:e})}),fh=({libraryInfo:e,chart:t,iconPosition:n,id:r})=>{let o;switch(n){case"bottom":o={marginTop:"6px"};break;case"top":o={marginBottom:"6px"};break;case"end":o={marginInlineStart:"8px"};break;default:o={marginInlineEnd:"8px"}}o.display="flex",o.alignItems="center",o.height="100%",o.flex="1 0 0";return 0===t.condition||!1===t.visible?Et.jsx(zf,{id:`${hf.TABS_ICON}-${r}`,style:o}):e?Et.jsx(jf,{id:`${hf.TABS_ICON}-${r}`,libraryInfo:e,style:o}):null},hh=({models:e,activeTabId:t,handleChangeTab:n})=>{const{modifiedLayout:r,chartList:o,interactions:i,accessibility:a}=e,l=o?.getCharts(),s=r.objects.filter(e=>!Gf(e,i)),{orientation:u,tabContainerStyle:c,ScrollButtonComponent:d}=(({orientation:e})=>"left"===e?{orientation:"vertical",tabContainerStyle:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"25%",flexShrink:0},ScrollButtonComponent:Hf}:{orientation:"horizontal",tabContainerStyle:{display:"flex",flexDirection:"row",alignItems:"center"},ScrollButtonComponent:Uf})(r),p=!1===i.active&&!i.edit,[f,h]=y.useState(!1),m=y.useCallback(e=>{if(e){const t=e.getElementsByClassName("MuiTabs-flexContainer")[0];if(t)return void h("vertical"===u?t.scrollHeight>t.offsetHeight:t.scrollWidth>t.offsetWidth)}h(!1)},[u]);return Et.jsxs(Ol,{className:hf.TAB_WRAPPER,sx:c,ref:e=>{m(e)},children:[r.useDropdown&&f?Et.jsx(dh,{charts:s,handleChangeTab:n,activeTabId:t,accessibility:a,translator:e.translator,element:e.element,disabled:p}):null,Et.jsx(rc,{value:t,onChange:(e,t)=>{n(t)},ScrollButtonComponent:d,variant:"scrollable",orientation:u,scrollButtons:!!r.useScrollButton&&"auto",TabScrollButtonProps:{...p&&{disabled:!0}},sx:{height:"100%",width:"100%",minHeight:ch.TABS_HEIGHT},children:s.map(n=>{const o=jc(r,n.childRefId)?.qData?.visualization,i=o&&l?.[o]?.libraryInfo,s=e.styleModel.getTabStyle(n.childRefId),c=0===n.condition||r.showIcons&&i&&!1!==s?.icon?.show||!1===n.visible,d="vertical"===u?"top":"start",f=e.styleModel.resolveComponentStyle({compPath:"icon.position",defaultValue:d}),h=e.styleModel.resolveComponentStyle({compPath:"label.show"}),m=n.label&&(s?.label?.show??!1!==h),g=`${r.qInfo.qId}-${n.childRefId}`;return Et.jsx(Iu,{className:`${hf.TAB} ${t===n.childRefId?hf.ACTIVE_TAB:""}`,disabled:p,id:`tab-${g}`,value:n.childRefId,title:n.label,label:m?Et.jsx(ph,{label:n.label,id:g}):void 0,icon:c?Et.jsx(fh,{libraryInfo:i,chart:n,iconPosition:f,id:g}):"",iconPosition:f,"data-testid":`container-tab-${n.childRefId}`,sx:{textAlign:"vertical"!==u||r.showIcons?"center":"start",minWidth:"vertical"===u?"100%":void 0,minHeight:ch.TABS_HEIGHT,padding:"6px 16px","&:hover":{paddingBottom:"4px"},"&.Mui-disabled":{opacity:"inherit"}},"aria-label":n.label,"aria-controls":`tab-panel-${g}`,tabIndex:a&&t===n.childRefId?0:-1},n.childRefId)})})]})},mh=({models:e,renderHelper:t,activeTabId:n,handleChangeTab:r,env:o})=>{const{modifiedLayout:i,embed:a,interactions:l,options:s,styleModel:u,accessibility:c,app:d}=e,p=i.objects,f=l.edit||!!p.find(e=>0!==e.condition&&!1!==e.visible),h=i.showTabs&&f,m="left"===i.orientation?"row":"column",g=u.getStyleClasses();return Et.jsxs(Ol,{sx:{display:"flex",flexDirection:m,height:"100%",width:"100%",direction:s.direction,...g},children:[h?Et.jsx(hh,{models:e,activeTabId:n,handleChangeTab:r}):null,p.map(e=>{const r=`tab-panel-${i.qInfo.qId}-${e.childRefId}`,u=n===e.childRefId&&!Gf(e,l);return Et.jsx(Ol,{role:"tabpanel",id:r,"aria-label":e.label,sx:{flex:"1 1 auto",minHeight:0,width:"100%",padding:"2px",boxSizing:"border-box",direction:"ltr","&:focus-visible":{boxShadow:"inset 0 0 0 2px #0275D9",borderRadius:"3px",zIndex:1200}},...u?{className:hf.ACTIVE_TAB_PANEL,tabIndex:c?0:-1}:{hidden:!0},children:u?Et.jsx(uh,{chartObject:e,renderHelper:t,direction:s.direction,embed:a,interactions:l,env:o,app:d}):null},r)})]})};let gh=function(e){return e.COPY="copy",e.PASTE="paste",e.RESET_COPY_BUFFER="resetCopyBuffer",e}({}),bh=function(e){return e.COPY="copy",e.PASTE_AND_REPLACE="paste-and-replace",e.PASTE="paste",e.DUPLICATE="duplicate",e.DELETE="delete",e.CUT="cut",e.EDIT_PROPERTIES="edit",e.ZOOM_IN="zoom-in",e.VISUAL_EXPLORATION="visual-exploration",e.MONITOR_IN_HUB="addto",e.REORDER_LAYERS_GROUP="reorder-layers-group",e.BRING_TO_FRONT="bring-to-front",e.BRING_FORWARD="bring-forward",e.SEND_TO_BACK="send-to-back",e.SEND_BACKWARDS="send-backwards",e.CONTAINER_HEADER="container-header",e.CHART_HEADER="chart-header",e.ALERT_GROUP="alertGroup",e.ADD_TO_MASTER_ITEMS="add-to-master-items",e.UNLINK_VISUALIZATION="unlink",e.DEVELOPER="object-developer",e.SHOW_DETAILS="object-info",e.EXPLAIN_KEY_DRIVERS_OLD_ID="explainKeyDrivers",e.EXPLAIN_KEY_DRIVERS="key-driver",e.SUBSCRIBE="subscribe",e.NOTES_GROUP="notesGroup",e.DOWNLOAD="download",e.SHARE_IMAGE="share",e}({});const vh=[bh.PASTE_AND_REPLACE,bh.ZOOM_IN,bh.VISUAL_EXPLORATION],yh=[bh.VISUAL_EXPLORATION,bh.ALERT_GROUP,bh.SHOW_DETAILS,bh.EXPLAIN_KEY_DRIVERS,bh.EXPLAIN_KEY_DRIVERS_OLD_ID],Eh=[bh.DELETE,bh.CUT,bh.ADD_TO_MASTER_ITEMS,bh.UNLINK_VISUALIZATION],Ch=[bh.PASTE_AND_REPLACE],xh=(e,t)=>{const{childRefId:n}=e.model.layout,r=t.objects.find(e=>e.childRefId===n);return{...e,additionalData:{label:r?.label}}},Dh=(e,t,n,r,o)=>{const i=t.getSupportFunction(bh.COPY);if(!i)return void e.deleteItem(bh.COPY);const a=()=>{i(xh(n,r)).catch(()=>{})},l=e.items.find(e=>e.id===bh.COPY);if(l)l.updateItem({select:a});else if(o){const t=e.items.findIndex(e=>e.id===bh.CUT),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.copy",tid:bh.COPY,id:bh.COPY,icon:"copy",select:a,items:[]},n)}},wh=e=>e.interactions.edit&&!e.modifiedLayout.qExtendsId,Sh=async(e,t,n,r,o)=>{if(o.flags.isEnabled("GVC_48_CHART_CONTEXT_MENU_ITEM_GENERATION"))return;const i=t.getBuilder("default");if(!i)return;const a=await i();a.addItem({translation:"contextMenu.containerOptionsHeader",tid:bh.CONTAINER_HEADER,id:bh.CONTAINER_HEADER,bold:!0,items:[]},0);const l=wh(n);a.items.forEach(e=>{(yh.includes(e.id)||!l&&Ch.includes(e.id))&&a.deleteItem(e.id)}),l&&await(async(e,t,n)=>{const r=t.getSupportFunction(gh.PASTE),o=await(r?.()?.catch(()=>{}));if(!o||gc.includes(o.template))return void e.deleteItem(bh.PASTE_AND_REPLACE);const i=()=>{n()},a=e.items.find(e=>e.id===bh.PASTE_AND_REPLACE||e.id===bh.PASTE);if(a)a.updateItem({translation:"contextMenu.paste",select:i});else{const t=e.items.findLastIndex(e=>e.id===bh.COPY||e.id===bh.DEVELOPER||e.id===bh.CONTAINER_HEADER),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.paste",tid:bh.PASTE_AND_REPLACE,id:bh.PASTE_AND_REPLACE,icon:"paste",select:i,items:[]},n)}})(a,t,r),e.updateItem({items:a.items}),1===e.items.length&&e.deleteItem(bh.CONTAINER_HEADER)},Ah="tabbed-container-menu",kh=e=>{const t={[bh.MONITOR_IN_HUB]:!0,[bh.SUBSCRIBE]:!0,[bh.NOTES_GROUP]:!0,[bh.DOWNLOAD]:!0,[bh.SHARE_IMAGE]:!0};e.items.forEach(n=>{t[n.id]?e.deleteItem(n.id):n.items&&kh(n)})},Rh=(e,t,n,r,o,i)=>a=>{const{dataHandler:l,modifiedLayout:s}=r;if(wh(r)){n.isInvalid||(((e,t,n,r)=>{const{model:o,modifiedLayout:i}=n,a=e.items.findLastIndex(e=>e.id===bh.CHART_HEADER||e.id===bh.REORDER_LAYERS_GROUP),l=a>=0?1+a:void 0;e.addItem({translation:"Object.Container.Props.EditProperties",tid:bh.EDIT_PROPERTIES,id:bh.EDIT_PROPERTIES,icon:bh.EDIT_PROPERTIES,items:[],select:()=>{const{childRefId:e}=t.model.layout,n=i.objects.find(t=>t.childRefId===e),a=n?.label,{sense:l}=r.anything,s=o;l.propertyPanel.show({model:t.model,parent:s,headerLabel:a})}},l)})(a,n,r,o),((e,t,n,r,o,i)=>{const a=r.getSupportFunction(bh.COPY);if(!a)return void e.deleteItem(bh.CUT);const l=()=>{o&&a(xh(n,i)).then(async()=>{await(o?.deleteChildren([t]))}).catch(()=>{})},s=e.items.find(e=>e.id===bh.CUT);if(s)s.updateItem({select:l});else{const t=e.items.findLastIndex(e=>e.id===bh.ADD_TO_MASTER_ITEMS||e.id===bh.UNLINK_VISUALIZATION||e.id===bh.EDIT_PROPERTIES||e.id===bh.REORDER_LAYERS_GROUP||e.id===bh.DEVELOPER),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.cut",tid:bh.CUT,id:bh.CUT,icon:"cut",select:l,items:[]},n)}})(a,t,n,e,l,s),Dh(a,e,n,s,!0),((e,t,n,r,o)=>{const i=t.getSupportFunction(gh.COPY),a=t.getSupportFunction(gh.PASTE);if(!i||!a)return void e.deleteItem(bh.DUPLICATE);const l=()=>{i(xh(n,r)).then(()=>{o()}).catch(()=>{})},s=e.items.find(e=>e.id===bh.DUPLICATE);if(s)s.updateItem({select:l});else{const t=e.items.findIndex(e=>e.id===bh.COPY),n=t>=0?1+t:void 0;e.addItem({translation:"Common.Duplicate",tid:bh.DUPLICATE,id:bh.DUPLICATE,icon:bh.DUPLICATE,items:[],select:l},n)}})(a,e,n,s,i)),((e,t,n)=>{const r=()=>{n&&n.deleteChildren([t]).catch(()=>{})},o=e.items.find(e=>e.id===bh.DELETE);if(o)o.updateItem({select:r});else{const t=e.items.findLastIndex(e=>e.id===bh.DUPLICATE||e.id===bh.ADD_TO_MASTER_ITEMS||e.id===bh.UNLINK_VISUALIZATION||e.id===bh.REORDER_LAYERS_GROUP||e.id===bh.DEVELOPER),n=t>=0?1+t:void 0;e.addItem({translation:"Common.Delete",tid:bh.DELETE,id:bh.DELETE,icon:"bin",items:[],select:r},n)}})(a,t,l)}else Dh(a,e,n,s,!1)},_h=(t,n,r,o)=>{e.onContextMenu(async(e,i,a)=>{if(!a)return!1;const l=((e,t)=>()=>{if(!e)return;const n=t.getSupportFunction(gh.PASTE);n&&n().then(async({template:t,init:n,children:r,additionalData:o})=>{const{label:i}=o,a={label:i};n.qExtendsId?await e.addMasterObjectAsChild({initProps:n,children:r,objectInitProps:a}):await e.addVizAsChild({type:t,initProps:n,children:r,objectInitProps:a})}).catch(e=>{e&&t.getSupportFunction(gh.RESET_COPY_BUFFER)})})(r.dataHandler,a);if(await Sh(e,a,r,l,o),kh(e),!(e=>{let t;t="qv-radial-contextmenu"===e.type?e.touches[0]?.target:e.target;return t&&((e,t)=>{let n=e;for(;n;){if(n.classList?.contains(t))return n;n=n.parentNode}return null})(t,hf.ACTIVE_TAB_PANEL)})(i))return!0;const s=r.modifiedLayout.objects.find(e=>e.childRefId===t)?.id;if(!s)return!0;const u=n.objectMap.get(s);if(!u)return!0;const c=Rh(a,t,u,r,o,l),d=await(async(e,t,n,r)=>{const o=wh(n),i=e.getBuilder("object");if(!i)return;const a=await i(t);return a.addItem({translation:"contextMenu.chartOptionsHeader",tid:bh.CHART_HEADER,id:bh.CHART_HEADER,bold:!0,items:[]},0),r(a),a.items.forEach(e=>{(vh.includes(e.id)||!o&&Eh.includes(e.id))&&a.deleteItem(e.id)}),1===a.items.length&&a.deleteItem(bh.CHART_HEADER),a})(a,u,r,c);return!d||(e.items.length>0&&d.addItem({translation:"contextMenu.subMenuContainerOptions",tid:Ah,id:Ah,icon:"tabbed-container",items:[...e.items]},d.items.length),e.updateItem({items:d.items}),!0)})},Fh=({element:t,models:n,env:r,activeCharts:o})=>{const i=((t,n)=>{const[r,o]=e.useState(void 0);return e.useEffect(()=>{if(0===t.getElementsByClassName(n).length){const e=document.createElement("div");e.className=n,t.appendChild(e);const r=Ec.createRoot(e);o(r)}return()=>{r?.unmount()}},[t,n,r]),r})(t,"init-component"),{options:a,modifiedLayout:l,interactions:s,model:u}=n,{qChildList:c}=l,d=mc(a.direction),p=(t=>{const{viewState:n}=e.useOptions(),{snapshotData:r}=t;if(r){const{layouts:e}=r.objectsData,t=r.viewState?.viewStates;return{layouts:e,viewStates:t}}if(n){const{viewStates:e}=n;return{viewStates:e}}})(l),f=e.useMemo(()=>Wf(l),[l]),h={modifiedLayout:l,activeTabId:f,env:r},[m,g]=wf(h);g(h);const b=e.useMemo(()=>l.objects.filter(e=>f===e.childRefId),[f,l.objects]),v=e.useMemo(()=>({...a,disableThemeBorder:!0}),[a]),{renderHelper:y}=(t=>{const{visibleLayoutObjects:n,options:r}=t,[o]=e.useState(()=>new Xf(t)),[,i]=e.useState(r);return o.dependencyData=t,e.usePromise(async()=>(i(e=>(e!==r&&n.forEach(e=>o.recreateMap.set(e.id,!0)),r)),o.syncObjects(n)?o.createTimerForRendering()?.promise:o.resolver?.promise),[n,r]),e.useEffect(()=>()=>{o.destroy()},[o]),{renderHelper:o}})({modifiedLayout:l,visibleLayoutObjects:b,viewState:p,options:v,containerMenu:{id:Ah,icon:"TabbedContainerOutline"},translator:n.translator});_h(f,y,n,r);const[E]=e.useState({current:void 0}),C=e.useMemo(()=>e=>{(async({model:e,patchList:t})=>{if(e?.applyPatches){const n=await e.getEffectiveProperties(),r=[];t.forEach(e=>{const{newValue:t,propertyName:o}=e,i=void 0!==n[o]?"Replace":"Add";t?r.push({qPath:`/${o}`,qOp:i,qValue:JSON.stringify(t)}):"Replace"===i&&r.push({qPath:`/${o}`,qOp:"Remove"})}),r.length>0&&await e.applyPatches(r,!0)}})({model:u,patchList:[{newValue:e,propertyName:"cachedTabId"}]}).then(()=>{const t=m.modifiedLayout.objects.find(t=>t.childRefId===e)?.id;o.updateActiveCharts(t?[t]:[])})},[o,u,m.modifiedLayout.objects]),x=e.useMemo(()=>({setSelected:e=>{const t=m.modifiedLayout.objects.find(t=>t.id===e[0])?.childRefId;t?C(t):E.current=e[0]}}),[C,m,E]);e.useEffect(()=>{const e=(({chartObjects:e,activeTabId:t})=>!Vf(e,t)&&e.length>0?e[0]?.childRefId:t)({chartObjects:m.modifiedLayout.objects,activeTabId:m.activeTabId});if(e!==m.activeTabId)C(e);else if(E.current){const e=m.modifiedLayout.objects.find(e=>e.id===E.current)?.childRefId;e&&C(e)}E.current=void 0},[l?.objects.length,m,E,C]),e.useEffect(()=>{const e=(({chartObjects:e,activeTabId:t,interactions:n})=>{const r=Vf(e,t);if(!r||Gf(r,n)){const n=e.find(e=>0!==e.condition&&!1!==e.visible);return n?.childRefId||t}return t})({chartObjects:m.modifiedLayout.objects,activeTabId:m.activeTabId,interactions:s});e!==m.activeTabId&&C(e)},[s,l?.objects,m,C]);const D=0===c.qItems.length&&s.edit;return e.useEffect(()=>{i?.render(Et.jsxs(zi,{theme:d,children:[D?Et.jsx(Kf,{Icon:Nf,dataHandler:n.dataHandler,modifiedLayout:n.modifiedLayout,translator:n.translator,sharedContainerUtilities:x}):null,!D&&Et.jsx(mh,{models:n,renderHelper:y,activeTabId:f,handleChangeTab:C,env:r})]}))},[i,n,d,D,y,f,x,C,r]),{renderHelper:y,sharedContainerUtilities:x,activeTabId:f}};var Ph={targets:[]};const Lh={showTitles:!0,title:"",subtitle:"",footnote:"",disableNavMenu:!0,showDetails:!1,objects:[],qChildListDef:{qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition",visible:"/visible"}},showTabs:!0,useScrollButton:!0,useDropdown:!1,showIcons:!1,components:[],defaultTabId:"",orientation:"top",fontsUsed:[]};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".init-component {\n height: 100%;\n overflow: hidden;\n}\n");const Th=(e,t)=>{let n=!0;const r=t.objects.reduce((t,r)=>{const o=r.id;if(0!==r.condition&&!1!==r.visible){const i=e.get(o);return i&&(e=>e.supportExport())(i)&&(n=!1,t.objectMap.set(o,i)),t.objects.push(r),t}return t},{objects:[],objectMap:new Map});return n?{objects:[],objectMap:new Map}:r},Ih=new class{translator;muiTheme;containers={};sync=({element:e,sharedContainerUtilities:t,translator:n,containerId:r,dataHandler:o,renderHelper:i,chartList:a})=>{this.translator=n,this.containers[r]={element:e,sharedContainerUtilities:t,dataHandler:o,renderHelper:i,chartList:a}};setMuiTheme=e=>{this.muiTheme=mc(e)};destroy=e=>{delete this.containers[e]}};return function(t){return{qae:{properties:Lh,data:Ph},ext:lf({env:t,propertyHandlerData:Ih}),component(){const n=Yf(),r=e.useTranslator();e.useMemo(()=>{!function(e){if(e&&e.get&&e.add){const t="LayoutContainer.EmptyList.AddContent";if(e.get(t)!==t)return;Object.keys(o).forEach(t=>{e.add(o[t])})}}(r)},[r]);const{dataHandler:i,model:a,accessibility:s,setAccessibility:u,interactions:c,element:d,modifiedLayout:p}=n,f=e.useMemo(()=>function(){const e=new l.EventEmitter;let t=[];return e.updateActiveCharts=n=>{t=n.slice(),e.emit("activeChartsChange",t.slice())},e.setActiveCharts=n=>{t=n.slice(),e.emit("setActiveCharts",t.slice())},e.getActiveCharts=()=>[...t],e}(),[]),{renderHelper:h,sharedContainerUtilities:m,activeTabId:g}=Fh({element:d,models:n,env:t,activeCharts:f});(({propertyHandlerData:t,element:n,sharedContainerUtilities:r,translator:o,containerId:i,dataHandler:a,renderHelper:l,chartList:s})=>{const u=e.useOptions();i&&t.sync({containerId:i,element:n,sharedContainerUtilities:r,translator:o,dataHandler:a,renderHelper:l,chartList:s}),e.useEffect(()=>{t.setMuiTheme(u.direction)},[u.direction,t]),e.useEffect(()=>()=>{i&&t.destroy(i)},[i,t,u.direction])})({containerId:a?.id||"",element:d,sharedContainerUtilities:m,translator:r,dataHandler:i,propertyHandlerData:Ih,renderHelper:h});const[b,v]=e.useState(!0);Sf({isContainerActive:b,activeTabId:g,renderHelper:h,modifiedLayout:p,activeCharts:f,sharedContainerUtilities:m}),Df({element:d,accessibility:s,setAccessibility:u,renderHelper:h,interactions:c,env:t,models:n});const{getViewState:y}=df(h,Th);e.useImperativeHandle(()=>({getViewState:y,getChildrenObjects:()=>(e=>e.map(e=>{if("canReceive"in e){const t=e=>"libraryitem"===e.type&&("field"===e.item.type||"measure"===e.item.type||"dimension"===e.item.type);return{...e,canReceive:n=>t(n)&&e.canReceive(n)}}return e}))(h.getChildrenObjects()),updateActiveState(e){v(e)},activeCharts:f}),[])}}}});
98
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,l,s,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=p-g,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),E=g>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0===+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],s=c[1]&&c[c.length-1].length){for(m="",b=(d=t[0]).length%s,p=d.length,y=0;y<p;y++)m+=d.charAt(y),!((y-b+1)%s)&&y<p-s&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+E}},gp({exports:{}});const bp="'Source Sans Pro', 'Arial', 'sans-serif'",vp="#333333",yp="#595959",Ep="#737373",Cp="#cccccc",xp="#e6e6e6";function Dp(e){const t={};return[...e,["","","color"],["object","","fontFamily"],["object","axis.label.name","color",yp],["object","axis.label.name","fontFamily",bp],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Cp],["object","axis.line.minor","color",xp],["object","axis.title","color"],["object","axis.title","fontFamily",bp],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",xp],["object","grid.line.major","color",Cp],["object","grid.line.minor","color",xp],["object","label.value","color",yp],["object","label.value","fontFamily",bp],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",yp],[!1,"label.value","lightColor",xp],["object","outOfRange","color","#999"],["object","legend.title","color",vp],["object","legend.title","fontFamily",bp],["object","legend.title","fontSize","15px"],["object","legend.label","color",yp],["object","legend.label","fontFamily",bp],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",vp],["object","referenceLine.label.name","fontFamily",bp],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",xp],["object","referenceLine.outOfBounds","fontFamily",bp],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Ep,e=>"transparent"===e?Ep:e]].reduce((e,n)=>{const r=`${n[0]}-${n[1]}-${n[2]}}`;return t[r]||(t[r]=!0,e.push(n)),e},[]).toSorted((e,t)=>(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0))}const wp="object",Sp=e=>e;function Ap({theme:e,id:t,transform:n,extend:r,matrix:o}){const i={},a=n.reduce((e,t)=>{const[n,r]=t;return e[n]=r,e},{});return o.forEach(n=>{const[r,o,l,s,u=e=>e]=n,c=function({theme:e,base:t,path:n,attribute:r,defaultValue:o}){if(!e||!1===t)return o;const i=e.getStyle(t,n,r);return void 0===i?o:i}({theme:e,base:r===wp&&t?`${wp}.${t}`:r,path:o,attribute:l,defaultValue:s}),d=(a[`${o}.${l}`]||Sp)(u(c));sp(i,[o,l].filter(Boolean).join("."),d)}),r.forEach(e=>{const[t,n]=e;sp(i,t,n)}),i}const kp={qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",containerChildId:"/containerChildId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition",visible:"/visible"}};function Rp(e){if(!e.objects)return{};const t=Uc(e);return{container_id:e.qInfo.qId,objects:e.qChildList.qItems.map(n=>({chart_type:n.qData.visualization,chart_id:n.qInfo.qId,chart_isMaster:!!n.qData.qExtendsId,tab_isVisible:0!==t[n.qData.childRefId]?.condition&&!1!==t[n.qData.childRefId]?.visible,tab_isActive:n.qData.childRefId===e.cachedTabId}))}}const _p=({ref:e,theme:t,change:n})=>({component:"inline-wrapper",items:{bgColorDropdown:{ref:`${e}.useColorExpression`,width:9,component:"dropdown",change(t){(ap(t,`${e}.color`)||ap(t,`${e}.colorExpression`))&&(sp(t,`${e}.color`,void 0),sp(t,`${e}.colorExpression`,void 0)),n?.(t)},options:[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],defaultValue:!1,placeholder:"properties.colorMode.primary"},bgColorPicker:{component:"color-picker",ref:`${e}.color`,width:3,show:t=>!ap(t,`${e}.useColorExpression`),disableNone:!1,defaultValue:()=>({color:t?.getStyle("object.tabbedContainer",e,"color")??"none"}),showAlpha:!0,change:e=>{n?.(e)}},bgColorExpression:{component:"input-field-expression",ref:`${e}.colorExpression`,show:t=>ap(t,`${e}.useColorExpression`)}}}),Fp=({theme:e})=>({bgColorAllWrapper:_p({ref:"background.unselected"}),selectedTab:{translation:"properties.chartType.selected",component:"text"},bgColorSelectedWrapper:_p({ref:"background.selected"}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:_p({ref:"background.hover",theme:e,change:e=>{sp(e,"indicator.hover.color",ap(e,"background.hover.color")),sp(e,"indicator.hover.useColorExpression",ap(e,"background.hover.useColorExpression"))}})},show:(e,t)=>"left"===t.layout.orientation}}),Pp=({paths:e,fontResolver:t,theme:n})=>{const r=`${e.theme}.fontSize`;return{fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.size`,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r),show:e=>!1!==e.icon?.show},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:n.getStyle("object.tabbedContainer",e.theme,"color")}),show:e=>!1!==e.icon?.show}}},position:{type:"string",ref:"icon.position",component:"dropdown",options:[{value:"start",translation:"properties.dock.start"},{value:"top",translation:"properties.dock.top"},{value:"end",translation:"properties.dock.end"},{value:"bottom",translation:"properties.dock.bottom"}],defaultValue:(e,{layout:t})=>"left"===t.orientation?"top":"start",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"icon.show",component:"switch",defaultValue:!0,show:e=>"tab"===e.key}}},Lp=({theme:e})=>({colorWrapper:_p({ref:"indicator.selected",theme:e}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:_p({ref:"indicator.hover",theme:e,change:e=>{sp(e,"background.hover.color",ap(e,"indicator.hover.color")),sp(e,"background.hover.useColorExpression",ap(e,"indicator.hover.useColorExpression"))}})},show:(e,t)=>"left"!==t.layout.orientation}}),Tp=({paths:e,fontResolver:t,theme:n})=>{const r=`${e.theme}.fontFamily`,o=`${e.theme}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e.ref}.fontFamily`,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r),change:(e,t,n)=>{const r=e.label?.fontFamily,o=(e=>{const t=[];return e.objects.forEach(e=>{const n=e.components?.find(e=>"tab"===e.key),r=n?.label?.fontFamily;r&&-1===t.indexOf(r)&&t.push(r)}),t})(n);r&&-1===o.indexOf(r)&&o.push(r),n.fontsUsed=o}},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.fontSize`,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:n.getStyle("object.tabbedContainer",e.theme,"color")})}}},alignment:{component:"text-align-buttons",ref:"label.alignment",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"label.show",component:"switch",defaultValue:!0}}},Ip=({ref:e,key:t,fontResolver:n,theme:r})=>({translation:"Object.Container.Props.Label",component:"panel-section",items:{label:{component:"items",ref:e,key:t,items:Tp({paths:{ref:"label",theme:"label.value"},fontResolver:n,theme:r})}}}),Mp=({ref:e,key:t})=>({translation:"Visualizations.Descriptions.Width",component:"panel-section",items:{width:{component:"items",ref:e,key:t,items:{unit:{type:"string",ref:"width.unit",component:"dropdown",options:[{value:"%",translation:"Object.Table.Column.Percentage"},{value:"px",translation:"Object.Table.Column.Pixels"}],defaultValue:"%",change:e=>{if(void 0!==e.width?.value&&"%"===e.width?.unit)for(let t=0;t<e.width.value.length;t++)e.width.value[t]>100?e.width.value[t]=100:e.width.value[t]<5&&(e.width.value[t]=5)}},valuePixel:{translation:"properties.axis.minMax",component:"slider",ref:"width.value",range:!0,step:1,min:0,max:800,show:e=>"px"===e.width?.unit,defaultValue:[0,360]},valuePercentage:{translation:"properties.axis.minMax",component:"slider",type:"array",ref:"width.value",range:!0,step:1,min:5,max:100,show:e=>!e.width?.unit||"px"!==e.width?.unit,defaultValue:[5,20]}}}}}),Op=({theme:e,ref:t,key:n})=>({translation:"Object.TabbedContainer.Indicator",component:"panel-section",items:{indicator:{component:"items",ref:t,key:n,items:Lp({theme:e})}}}),Bp=({ref:e,key:t,fontResolver:n,theme:r})=>({translation:"properties.icon",component:"panel-section",items:{icon:{component:"items",ref:e,key:t,items:Pp({paths:{ref:"icon",theme:"icon.value"},fontResolver:n,theme:r})}},show:(e,{layout:t})=>t.showIcons}),Np=({theme:e,ref:t,key:n})=>({translation:"Object.OrgChart.BackgroundColor",component:"panel-section",items:{background:{component:"items",ref:t,key:n,items:"tab"===n?{bgColorWrapper:_p({ref:"background"})}:Fp({theme:e})}}}),jp=({fontResolver:e,theme:t})=>{const n="components",r="tab";return{component:"styling-panel",chartTitle:"Object.Container",tabTitle:"scripteditor.dataconnectors.delimiter.tab",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:n,items:{label:Ip({ref:n,key:r,fontResolver:e,theme:t}),width:{...Mp({ref:n,key:r}),show:(e,{layout:t})=>"left"!==t.orientation},icon:Bp({ref:n,key:r,fontResolver:e,theme:t}),background:Np({ref:n,key:r,theme:t})}}},zp={ref:"label",type:"string",translation:"Object.Container.Props.Label",defaultValue:"",expression:"optional"},$p={ref:"condition",translation:"Object.Container.Props.ShowCondition",component:"expression",defaultValue:{qValueExpression:{qExpr:""}},expressionType:"ValueExpression",expression:"always"},Up=(e,t)=>"object"==typeof e.label?t.objects.find(t=>t.childRefId===e.childRefId)?.label||e.label.qValueExpression.qExpr:e.label,Hp=e=>({component:"button",translation:"Object.Container.Props.EditProperties",disabled:(e,t)=>{const n=t.getLayout(),r=jc(n,e.childRefId)?.qMeta;return!r?.privileges?.includes("update")||!n.permissions?.update},action(t,n,{app:r}){const{sense:o}=e.env.anything,i=n.getEngineId(t.childRefId);i&&(o.propertyPanel.show({id:i,app:r,parent:"current",headerLabel:Up(t,n.getLayout())}),n.setSelectedChild([i]))}}),Vp=e=>{const{sense:t}=e.env.anything;return{label:zp,condition:$p,styling:jp({fontResolver:e.fontResolver,theme:t?.theme}),editProperties:Hp(e)}},Gp={translation:"Object.Container.Props.Chart",component:"text",show:e=>e.objects?e.objects.length<=1:e.children.length<=1},Wp={translation:"Common.Charts",component:"text",show:e=>e.objects?e.objects.length>1:e.children.length>1},qp=e=>({type:"array",ref:"objects",itemTitleRef:e=>e.label,allowAdd:!0,customAdd:!0,allowMove:!0,allowRemove:!0,customRemove:!0,addTranslation:"Object.Container.Props.Add",cId:"childRefId",grouped:!0,add(e,t,n){const r=document.querySelector(".pp-toplist-add-button");null!==r&&n.openAddChildPopover(r)},remove(e,t,n){n.deleteChild(e.childRefId).catch(()=>{})},items:Vp(e)}),Yp=e=>({type:"items",translation:"Object.Container.Props.Content",items:{chartLabel:Gp,chartsLabel:Wp,chartList:qp(e)}}),Kp={type:"boolean",translation:"Object.Container.Props.ShowTabs",ref:"showTabs",defaultValue:!0,component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},Xp={type:"boolean",translation:"Object.Container.Props.UseDropdown",label:"Menu",ref:"useDropdown",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},Qp={type:"boolean",translation:"Object.Container.Props.UseScrollButtons",ref:"useScrollButton",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!0,show:e=>e.showTabs},Zp={type:"boolean",translation:"Object.Container.Props.ShowIcons",ref:"showIcons",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},Jp={type:"string",translation:"Object.Container.Props.DefaultTab",ref:"defaultTabId",component:"dropdown",defaultValue:void 0,options(e,t){const n=t.getLayout();return n?n.objects.map(e=>({translation:e.label,value:e.childRefId})):[]},change(e,t){const n=Hc(t.getLayout(),e.defaultTabId);n&&t.setSelectedChild([n])},show:e=>e.objects.length>0},ef={type:"string",translation:"properties.orientation",ref:"orientation",component:"dropdown",options:[{value:"top",translation:"properties.orientation.horizontal"},{value:"left",translation:"properties.orientation.vertical"}],defaultValue:"top",show:e=>e.showTabs},tf=({fontResolver:e,theme:t})=>{const n="components",r="tabs";return{component:"styling-panel",chartTitle:"Object.TabContainer",tabTitle:"Object.Container.Props.ShowTabs",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{label:Ip({ref:n,key:r,fontResolver:e,theme:t}),width:Mp({ref:n,key:r}),indicator:Op({ref:n,key:r,theme:t}),icon:Bp({ref:n,key:r,fontResolver:e,theme:t}),background:Np({ref:n,key:r,theme:t})}}},nf={items:{details:{show:e=>!0===e.showDetails}}},rf=e=>{const{sense:t}=e.env.anything;return{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:tf({fontResolver:e.fontResolver,theme:t?.theme}),container:{type:"items",items:{showTabs:Kp,useDropdown:Xp,useScrollButton:Qp,showIcons:Zp,orientation:ef,defaultTabId:Jp}}}}},of=e=>({uses:"settings",items:{general:nf,presentation:rf(e)}}),af=e=>({type:"items",component:"accordion",items:{content:Yp(e),settings:of(e)}}),lf=e=>{const{sense:t}=e.env.anything,n=function({theme:e,translator:t,config:n={}}){const{id:r,paths:o}=function({config:e={}}){const{id:t,paths:n}=e;return{id:void 0===t?Gc:`${Gc}.${t}`,paths:Array.isArray(n)?n:[]}}({config:n}),i={};o.forEach(n=>{const o=n.split(".");ed(o);let a=i;for(let i=0;i<o.length;i++){const l=o[i];i===o.length-1?a[l]=Zc({theme:e,translator:t,id:r,path:n}):void 0===a[l]&&(a[l]={}),a=a[l]}});const a=e=>{const t=e.split(".");ed(t);let n=i;for(let r=0;r<t.length;r++){const o=t[r];if(void 0===n[o])throw new Error(`font-resolver: Path '${e}' could not be resolved.`);n=n[o]}return n};return i.getDefaultValue=e=>a(e).getDefaultValue(),i.getOptions=e=>a(e).getOptions(),i}({theme:t?.theme,translator:e.env.translator,flags:e.env.flags,config:{id:"tabbedContainer",paths:["label.value","icon.value"]}}),r=function(e){return{async getDropOptions(e,t,n){const{item:r}=t,o=e.getCreatePropertyHandler();if(o.setModel(e.model),"state"===t.item.type){const r=await e.model.getProperties();return o.setProperties(r),o.setLayout(e.model?.layout),this.getDropStateOptions(t,o,e.model,n)}if("visualization"===r.type)return t.menu.addItem({translation:["Object.Container.DropItem",r.name],tid:"addvisualization",select(){o.addChild({initProps:{qExtendsId:r.id,qInfo:{qType:"undefined"}}})?.then(e=>{e&&o.setSelectedChild([e.id])})}}),void n();const i=await t.item.getDropOption(t.item);"newObject"===i?.id&&t.menu.addItem({translation:["Object.Container.DropItem",r.name],tid:"createvisualization",select(){o.addChild({initProps:{...i.args.init,visualization:i.args.template},children:i.args.children?.map(e=>({qProperty:e}))})?.then(e=>{e&&o.setSelectedChild([e.id])})}}),n()},async addChild(t,n){const{model:r}=this,o=new Vc({app:r.app,data:e.propertyHandlerData});return o.setModel(r),{childModel:await o.addChild({initProps:t,children:n}),handler:o}},canReceive(e){if(this.model.layout.qExtendsId)return!1;if("libraryitem"===e.type){const{item:t}=e;if("template"===t.type&&gc.includes(t.template))return!1;if("visualization"===t.type&&gc.includes(t.visualization))return!1}return"gridcell"!==e.type||!gc.includes(e.cell.model.layout.visualization)}}}(e);return{definition:af({...e,fontResolver:n}),support:{snapshot:!1,export:!0,sharing:!1,exportData:!1,viewData:!1},hidePatchPanel:()=>!0,getCreatePropertyHandler:t=>new Vc({app:t,data:e.propertyHandlerData}),...r,addChild:async function(e,t){const{childModel:n,handler:o}=await r.addChild.apply(this,[e,t]);n&&o.setSelectedChild([n.id])},migrate:{properties:(e,t)=>((async(e,t)=>{if(!e.objects){const{objects:n,defaultTabId:r,components:o,orientation:i,showDetails:a}=await t.getEffectiveProperties(),l=await t.getFullPropertyTree();if(!l.qProperty.objects&&n){const s=[];l.qChildren.forEach(e=>{const n=e.qProperty;if(n.qInfo.qId){const r=async r=>{const o=await t.getChild(r),i=await o.getEffectiveProperties();return{...e,qProperty:{...n,childRefId:i.childRefId}}};s.push(r(n.qInfo.qId))}});const u=await Promise.all(s),c={...e,objects:n,defaultTabId:r??"",components:o,qChildListDef:kp,orientation:i,showDetails:a};t.clearSoftPatches(),await t.setFullPropertyTree({...l,qProperty:c,qChildren:u})}}})(e,t),e)},exportProperties:null,importProperties:(e,t)=>{const n={...e.properties};return"masterobject"!==e.properties.qInfo.qType&&(n.qInfo.qType=t.qInfo.qType),n.visualization=t.visualization,{qProperty:n,qChildren:e.qChildren}},extendMetrics:Rp}},sf=e=>e.reduce((e,{id:t,data:n})=>(n&&(e[t]=n),e),{}),uf=async e=>{const t=[];for(const[n,r]of e){const e={id:n,data:void 0},o=r;t.push(o.getViewState().then(e=>({id:n,data:e})).catch(()=>e))}const n=await Promise.all(t);return{viewStates:sf(n)}},cf=async e=>{const t=[];for(const[n,r]of e){const e={id:n,data:void 0},o=r;o.getSnapshotLayout?t.push(o.getSnapshotLayout().then(e=>({id:n,data:e})).catch(()=>e)):o.takeSnapshot&&t.push(o.takeSnapshot().then(e=>({id:n,data:e?.layout})).catch(()=>e))}const n=await Promise.all(t);return sf(n)},df=(t,n)=>(e.onTakeSnapshot(async e=>{const r=e,{snapshotData:o}=r;if(o){const e=zc(r),i=n(t.objectMap,e),[a,l]=await Promise.all([cf(i.objectMap),uf(i.objectMap)]);o.objectsData={layouts:a},r.objects=i.objects,o.viewState=l}return e}),{getViewState:()=>uf(t.objectMap)});let pf=function(e){return e.OPEN_CONTEXT_MENU="shift+F10",e.ESCAPE="Escape",e.SPACE=" ",e.ENTER="Enter",e.BACKSPACE="Backspace",e.DELETE="Delete",e}({}),ff=function(e){return e.KEY_DOWN="keydown",e.FOCUS_OUT="focusout",e}({}),hf=function(e){return e.TAB_MENU="tab-menu",e.TAB_MENU_ITEM="tab-menu-item",e.ACTIVE_TAB="active-tab-button",e.TAB_WRAPPER="tab-wrapper",e.TAB="tab-button",e.TAB_EXTRA_PRIO="MuiTab-root",e.TAB_LABEL="tab-label",e.TABS_ICON="tab-icon",e.ACTIVE_TAB_PANEL="active-tab-panel",e.TAB_INDICATOR="MuiTabs-indicator",e}({});const mf=`& .${hf.TAB}.${hf.TAB_EXTRA_PRIO}, .${hf.TAB}.${hf.ACTIVE_TAB}`,gf=`& .${hf.TAB}.${hf.TAB_EXTRA_PRIO}:hover`,bf=`& .${hf.TAB_LABEL}`,vf=`& .${hf.TABS_ICON} svg`,yf=`& .${hf.TAB_WRAPPER}`,Ef=`& .${hf.TAB_INDICATOR}`,Cf=e=>e.getElementsByClassName(hf.ACTIVE_TAB)?.[0],xf=e=>e.getElementsByClassName(hf.ACTIVE_TAB_PANEL)?.[0],Df=({element:t,setAccessibility:n,accessibility:r,renderHelper:o,interactions:i,env:a,models:l})=>{const{modifiedLayout:{showTabs:s,objects:u,orientation:c},translator:d}=l;e.useEffect(()=>{(()=>{const e="top"===c?d.get("TabContainer.Navigation.Horizontal"):d.get("TabContainer.Navigation.Vertical"),n=((e,t)=>e.map(e=>e.label||t.get("TabContainer.Object.Untitled")).join(", "))(u,d);t.setAttribute("aria-label",d.get("TabContainer.Object.Description",[n,s?e:""]))})()},[t,s,u,d,c]);const p=a.flags.isEnabled("VIZ-7_NEW_SHEET")||a.flags.isEnabled("VIZ-7_NEW_SHEET_EDIT"),f=e.useKeyboard(),h=e.useMemo(()=>()=>{n(!1),f.enabled&&f.blur?.(!0)},[f,n]),m=e.useMemo(()=>e=>{switch(e.shiftKey?`shift+${e.key}`:e.key){case pf.ESCAPE:e.stopPropagation(),f.blur?.(!0);break;case pf.ENTER:case pf.SPACE:{e.stopPropagation();const n=e.target;n?.classList.contains(hf.ACTIVE_TAB)&&xf(t)?.focus();break}}},[t,f]),g=e.useMemo(()=>e=>{const n=e.shiftKey?`shift+${e.key}`:e.key,r=o.objectMap.values().next().value,i=o.objectApis.values().next().value;switch(n){case pf.ESCAPE:{const n=Cf(t);p?(({event:e,objectApi:t,activeTab:n})=>{e.stopPropagation(),t?.viewDataToggled&&t.support?.("viewData")?t.toggleDataView():n?.focus()})({event:e,objectApi:i,activeTab:n}):(({event:e,objectApi:t,activeTab:n})=>{e.stopPropagation(),t?.viewDataToggled&&t.supportViewData?.()?t.toggleDataView?.():n?.focus()})({event:e,objectApi:r,activeTab:n});break}case pf.ENTER:case pf.SPACE:{const n=xf(t);p?(({event:e,objectApi:t,activeTab:n})=>{if(!t)return;e.stopPropagation(),t.setOnBlurHandler?.(()=>{n?.focus(),t.setOnBlurHandler?.(void 0)}),!t.viewDataToggled&&t.support?.("viewData")?t.toggleDataView():t.toggleFocus?.(!0)})({event:e,objectApi:i,activeTab:n}):(({event:e,objectApi:t,activeTab:n})=>{if(!t)return;e.stopPropagation(),t.setOnBlurHandler?.(()=>{n?.focus(),t.setOnBlurHandler?.(void 0)}),!t.viewDataToggled&&t.supportViewData?.()?t.toggleDataView?.():t.viewDataToggled&&"function"==typeof t.dataViewObject?.focus?t.dataViewObject.focus():"function"==typeof t.focus&&t.focus()})({event:e,objectApi:r,activeTab:n});break}case pf.OPEN_CONTEXT_MENU:e.stopPropagation(),r?.viewDataToggled||t!==document.activeElement&&(h(),t.focus())}},[t,h,p,o]),b=e.useMemo(()=>e=>{const t=e.target;t?.classList.contains(hf.ACTIVE_TAB_PANEL)?g(e):m(e)},[m,g]);e.useEffect(()=>(r&&t.addEventListener(ff.KEY_DOWN,b),()=>{t.removeEventListener(ff.KEY_DOWN,b)}),[t,r,b]);const[v,y]=e.useState(!1);e.useEffect(()=>{v&&(y(!1),window.setTimeout(()=>((e=>e.getElementsByClassName(hf.TAB_MENU)?.[0])(t)??Cf(t))?.focus(),0))},[t,v]),e.useEffect(()=>{n(!1)},[i.edit,n]),e.useEffect(()=>{const e=e=>{const n=e.relatedTarget;t?.contains(n)||n?.classList.contains(hf.TAB_MENU_ITEM)||h?.()};return f.enabled&&f.active&&!i.edit&&(n(!0),y(!0),t.addEventListener(ff.FOCUS_OUT,e)),()=>{t.removeEventListener(ff.FOCUS_OUT,e)}},[f])},wf=t=>{const[n]=e.useState(t);return[n,function(e){Object.assign(n,e)}]},Sf=({isContainerActive:t,activeTabId:n,modifiedLayout:r,renderHelper:o,activeCharts:i,sharedContainerUtilities:a})=>{const l={modifiedLayout:r,activeTabId:n,renderHelper:o,isContainerActive:t},[s,u]=wf(l);u(l);const c=e.useMemo(()=>()=>{const e=$c(s.modifiedLayout);for(const[t,n]of s.renderHelper.objectMap.entries()){const r=s.isContainerActive&&s.activeTabId===e[t];"setIsActive"in n&&n.setIsActive(r)}},[s]);e.useEffect(()=>{s.isContainerActive&&c()},[o.objectMap,c,s]),e.useEffect(()=>{c()},[t,c]),(({activeCharts:t,onSetActiveCharts:n,canSetActiveChart:r=!0})=>{const[o,i]=wf({onSetActiveCharts:n});i({onSetActiveCharts:n}),e.useEffect(()=>{if(!r)return;const e=e=>{o.onSetActiveCharts(e)};t.on("setActiveCharts",e);const n=t.getActiveCharts();return n.length>0&&e(n),()=>t.removeListener("setActiveCharts",e)},[t,o,r])})({activeCharts:i,onSetActiveCharts:e=>{if(0===e.length)return;const t=s.modifiedLayout.objects.find(t=>t.id===e[0])?.childRefId;t&&t!==s.activeTabId&&a.setSelected(e)}})},Af={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),!t||[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};const kf={qInfo:{qId:"MasterObjectList",qType:"MasterObjectList"},qAppObjectListDef:{qType:"masterobject",qData:{name:"/qMetaDef/title",labelExpression:"/labelExpression",visualization:"/visualization",tags:"/qMetaDef/tags"}}};class Rf{sessionObject;constructor(e){this.getOrCreateSessionObject(e).catch(()=>{})}getOrCreateSessionObject=async e=>{const t=kf.qInfo.qId;this.sessionObject=await e.getObject(t).catch(()=>e.createSessionObject(kf))};getMasterVisualizations=async()=>{try{if(!this.sessionObject)return[];const e=await this.sessionObject.getLayout();return("qAppObjectList"in e?e.qAppObjectList.qItems:e).map(e=>({...e.qData,qExtendsId:e.qInfo.qId})).filter(e=>!gc.includes(e.visualization))}catch{return[]}}}let _f=function(e){return e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.UP=2]="UP",e[e.DOWN=3]="DOWN",e}({});class Ff{model;embed;app;undoRedoModel;chartList;masterVizList;mutex;constructor({embed:e,model:t,app:n,translator:r,mutex:o}){this.model=t,this.embed=e,this.app=n;const i=n;i&&i.getUndoInfoObject&&i.getUndoInfoObject().then(e=>{this.undoRedoModel=e}).catch(()=>{}),n&&(this.masterVizList=new Rf(n)),e&&r&&(this.chartList=new bc(e,r)),this.mutex=o}rememberAsGroup=async e=>{let t;this.undoRedoModel&&(t=await this.undoRedoModel.startGroup());const n=await e();return t&&this.undoRedoModel&&await this.undoRedoModel.endGroup(t),n};generateProperties=async(e,t)=>await this.embed.generateProperties({type:e,properties:t});async addChild(e,t,n){if(this.model&&!gc.includes(e.visualization))try{await this.mutex.lock();const{model:r}=this,o=async()=>{e.childRefId=Af.id();const o=await r.createChild(e);if(o){const t=await r.getProperties();t.objects.unshift({childRefId:e.childRefId,...n,condition:{qValueExpression:{qExpr:""}}}),await r.setProperties(t)}return t&&o&&await Promise.all(t.map(({qProperty:e})=>o.createChild(e))),o};return await this.rememberAsGroup(o)}catch{return}finally{this.mutex.unlock()}}addVizAsChild=async({type:e,initProps:t,objectInitProps:n,children:r})=>{try{const o=await this.generateProperties(e,t);let i=n?.label||t?.title;if(!i){const n=this.getChart(t?.visualization),r=n?.libraryInfo;i=r?.translation||r?.name||e}const a={...n,label:i};return await this.addChild(o,r,a)}catch{return}};addMasterObjectAsChild=async({initProps:e,objectInitProps:t,children:n})=>{try{if(!e||!e.qExtendsId||!this.app)return;const r=await this.app.getObject(e.qExtendsId),o=await r.getProperties(),i=t?.label||o.title||o.qMetaDef.title,a={...e,qInfo:{qType:"childObject"}},l={...t,label:i};return await this.addChild(a,n,l)}catch{return}};deleteChildren=async e=>{const{model:t}=this;if(0===e.length||!t)return!1;try{await this.mutex.lock();const n=await t.getFullPropertyTree(),{qChildren:r,qProperty:o}=n,i=new Set(e);return n.qChildren=r.filter(({qProperty:e})=>{const t=e.childRefId;return!t||!i.has(t)}),n.qProperty.objects=o.objects.filter(e=>!i.has(e.childRefId)),await t.setFullPropertyTree(n),!0}catch{return!1}finally{this.mutex.unlock()}};moveChild=async(e,t)=>{if(this.model)try{await this.mutex.lock();const n=await this.model.getProperties(),{objects:r}=n,o=r.findIndex(e=>e.childRefId===t);let i=!1;switch(e){case _f.TOP:{if(0===o)break;const e=r.splice(o,1)[0];r.unshift(e),i=!0;break}case _f.BOTTOM:{if(o===r.length-1)break;const e=r.splice(o,1)[0];r.push(e),i=!0;break}case _f.UP:{if(0===o)break;const e=r.splice(o,1)[0];r.splice(o-1,0,e),i=!0;break}case _f.DOWN:{if(o===r.length-1)break;const e=r.splice(o,1)[0];r.splice(o+1,0,e),i=!0;break}}i&&await this.model.setProperties(n)}finally{this.mutex.unlock()}};getCharts=()=>this.chartList?.getCharts()||{};getMasterVizList=()=>this.masterVizList?.getMasterVisualizations()||Promise.resolve([]);getChart=e=>this.chartList?.getChart(e);getChartLabelById=(e,t)=>{const n=e?.qChildList?.qItems.find(e=>e.qInfo.qId===t);if(!n)return"";const{visualization:r,title:o}=n.qData;if(o)return o;const i=this.getChart(r);return i?.libraryInfo?.translation||r}}class Pf{locked=!1;tasks=[];id;constructor(e){this.id=e}lock=async()=>this.locked?new Promise(e=>{this.tasks.push(e)}):(this.locked=!0,!0);unlock=()=>{if(this.tasks.length>0){const e=this.tasks.shift();e?.(!0)}else this.locked=!1}}const Lf={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},rebeccapurple:{r:102,g:51,b:153},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:255,g:255,b:255,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}},Tf={index:-1,color:"none",alpha:1},If=e=>{let t=parseFloat(e[1]),n=parseFloat(e[3]),r=parseFloat(e[5]);return t%=360,n/=100,r/=100,t=Math.max(0,Math.min(t,360)),n=Math.max(0,Math.min(n,1)),r=Math.max(0,Math.min(r,1)),{h:t,s:n,l:r,v:r}},Mf=(e,t,n,r,o=1)=>{let i,a,l,s;switch(n=Math.floor(n)){case 0:s=[e,t,0];break;case 1:s=[t,e,0];break;case 2:s=[0,e,t];break;case 3:s=[0,t,e];break;case 4:s=[t,0,e];break;case 5:s=[e,0,t];break;default:s=[0,0,0]}return i=s[0]+r,a=s[1]+r,l=s[2]+r,i=Math.round(255*i),a=Math.round(255*a),l=Math.round(255*l),`rgba(${i},${a},${l},${o})`},Of=e=>{const{h:t,s:n,l:r}=If(e),o=e.length>7?parseFloat(e[7]):1,i=r<=.5?2*r*n:(2-2*r)*n,a=t/60,l=i*(1-Math.abs(a%2-1));return Mf(i,l,a,r-.5*i,o)},Bf={resolveExpression:({colorExpression:e=""})=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(Number(t[1])/255*100)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return Of(t);if(t=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return Of(t);if(t=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return(e=>{const{h:t,s:n,v:r}=If(e),o=r*n,i=t/60,a=o*(1-Math.abs(i%2-1));return Mf(o,a,i,r-o)})(t);if(t=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e),t)return e;if(t=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e),t)return e;const n=e&&Lf[e.toLowerCase()];if(n){const e=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${e})`}return"none"},getColor({style:e,defaultColor:t,theme:n}){const r=e?.color||Tf;let o;return o=e?.useColorExpression?Bf.resolveExpression(e):"string"==typeof r?r:n?.getColorPickerColor(r)||"",o&&"none"!==o?o:t}},Nf=()=>Et.jsx(Pc,{viewBox:"0 0 16 16",children:Et.jsx("path",{d:"M15 6V5H5V2H1.5a.5.5 0 0 0-.5.5V6H0V2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4h-1Zm-5-4H6v2h4V2Zm4.5 0H11v2h4V2.5a.5.5 0 0 0-.5-.5Zm1.5 9h-1V8h1v3Zm0 3a1 1 0 0 1-1 1h-1v-1h.6a.4.4 0 0 0 .4-.4V13h1v1Zm-7 1v-1h3v1H9Zm-5 0v-1h3v1H4Zm-3 0a1 1 0 0 1-1-1v-1h1v.6c0 .22.18.4.4.4H2v1H1ZM0 8h1v3H0V8Zm4-.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4ZM5 11h6V8H5v3Z"})}),jf=({libraryInfo:e,style:t,id:n})=>Et.jsx("div",{style:t,"data-testid":"tab-chart-icon",id:n,className:hf.TABS_ICON,children:Et.jsx(e.IconDefinition,{})}),zf=({style:e,id:t})=>Et.jsx("div",{style:e,"data-testid":"tab-hidden-icon",id:t,children:Et.jsx(Lc,{viewBox:"0 0 16 16",children:Et.jsx("path",{d:"m13.441.795.764.646-1.839 2.174c.568.434 1.076.914 1.522 1.385a13.79 13.79 0 0 1 2.109 3 13.798 13.798 0 0 1-2.108 3c-1.382 1.457-3.345 3-5.89 3-1.34 0-2.52-.428-3.536-1.045l-1.904 2.25-.764-.646L13.441.795ZM11.72 4.379l-1.427 1.686a3 3 0 0 1-3.82 4.516l-1.354 1.6c.86.497 1.819.819 2.88.819 2.121 0 3.834-1.287 5.161-2.685A12.666 12.666 0 0 0 14.857 8a12.691 12.691 0 0 0-1.697-2.315c-.35-.37-.727-.73-1.132-1.063l-.308-.243ZM8 2a6.428 6.428 0 0 1 2.242.412l.305.123-.681.805A5.359 5.359 0 0 0 8 3C5.877 3 4.164 4.287 2.837 5.685A12.664 12.664 0 0 0 1.14 8a12.66 12.66 0 0 0 1.697 2.315l.301.308.311.299-.646.765A14.567 14.567 0 0 1 2.109 11 13.791 13.791 0 0 1 0 8a13.801 13.801 0 0 1 2.109-3C3.49 3.543 5.454 2 8 2Zm1.633 4.845-2.5 2.956a1.999 1.999 0 0 0 2.5-2.956Zm-3.917-.793a3 3 0 0 1 2.692-1.025l.202.035-.809.948A2 2 0 0 0 6 7.967l.003.152-.808.947a3 3 0 0 1 .521-3.014Z"})})}),$f=()=>Et.jsx(Lc,{viewBox:"0 0 16 16",children:Et.jsx("path",{d:"M12 4H6V3h6v1ZM6 8.5h4v-1H6v1Zm9 4.5H6v-1h9v1ZM3 11a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1Zm0-5.5a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1ZM3 2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h1Zm0 1H2v1h1V3Z"})}),Uf=Ni(Vu)({width:28,overflow:"hidden"}),Hf=Ni(Vu)({height:28,width:"100%",overflow:"hidden",alignItems:"center","&::before":{visibility:"hidden"}}),Vf=(e,t)=>e.find(e=>e.childRefId===t),Gf=(e,t)=>!t.edit&&(0===e.condition||!1===e.visible),Wf=e=>{const{objects:t,defaultTabId:n,cachedTabId:r}=e;return r||(n&&t.some(e=>e.childRefId===n)?n:t[0]?.childRefId||"")};class qf{modifiedLayout;themeStyle;style;objectMap;activeTabId;theme;constructor({modifiedLayout:e,themeService:t}){this.modifiedLayout=e,this.activeTabId=Wf(this.modifiedLayout),this.themeStyle=t.getStyles(),this.theme=t.getTheme(),this.objectMap=Uc(this.modifiedLayout),this.style=this.createStyleClasses()}getTabsWidth=e=>{const t=this.resolveComponentStyle({compPath:"width.value",themePath:"tabWidth.value"});if(void 0===t||2!==t.length||e!==this.modifiedLayout.orientation)return{};const n=this.resolveComponentStyle({compPath:"width.unit",themePath:"tabWidth.unit",defaultValue:"%"});return{minWidth:`${t[0]}${n}`,maxWidth:`${t[1]}${n}`}};getTabWidth=e=>{const t=e?.value,n=e?.unit??"%";if(void 0===t||2!==t.length||"left"===this.modifiedLayout.orientation)return{};return{minWidth:`${t[0]}${n}`,maxWidth:`${t[1]}${n}`}};getColorStyle=(e,t=e)=>{const n=this.resolveComponentStyle({compPath:e,themePath:t});return Bf.getColor({style:n,theme:this.theme})??n};getTabBackgroundStyle=(e,t)=>{let n;if(this.activeTabId===e){const e=this.resolveComponentStyle({compPath:"background.selected",themePath:""});n=Bf.getColor({style:e,theme:this.theme})}return n??Bf.getColor({style:t,theme:this.theme})};createTabClasses=()=>this.modifiedLayout.objects?.reduce((e,t)=>{const n=t?.childRefId,r=t?.components?.find(e=>"tab"===e.key);return e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}`]={textAlign:ap(r,"label.alignment"),backgroundColor:this.getTabBackgroundStyle(n,r?.background),...this.getTabWidth(r?.width)},e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}:hover`]={..."left"===this.modifiedLayout.orientation&&{backgroundColor:this.getColorStyle("background.hover","background.hover.color")}},e[`#tab-label-${this.modifiedLayout.qInfo.qId}-${n}`]={fontSize:ap(r,"label.fontSize"),fontFamily:ap(r,"label.fontFamily"),color:Bf.getColor({style:ap(r,"label.color"),theme:this.theme})},e[`#tab-icon-${this.modifiedLayout.qInfo.qId}-${n} svg`]={height:ap(r,"icon.size"),color:Bf.getColor({style:ap(r,"icon.color"),theme:this.theme})},e},{});createTabsClasses=()=>({[bf]:{fontSize:this.resolveComponentStyle({compPath:"label.fontSize",themePath:"label.value.fontSize"}),fontFamily:this.resolveComponentStyle({compPath:"label.fontFamily",themePath:"label.value.fontFamily"}),color:this.resolveComponentStyle({compPath:"label.color.color",themePath:"label.value.color"})},[vf]:{height:this.resolveComponentStyle({compPath:"icon.size",themePath:"icon.value.fontSize"}),color:this.getColorStyle("icon.color","icon.value.color")},[mf]:{textAlign:this.resolveComponentStyle({compPath:"label.alignment",themePath:"label.textAlignment"}),...this.getTabsWidth("top")},[gf]:{..."top"===this.modifiedLayout.orientation&&{borderBottomColor:this.getColorStyle("indicator.hover","indicator.hover.color")}},[yf]:{...this.getTabsWidth("left"),backgroundColor:this.getColorStyle("background.unselected","")},[Ef]:{backgroundColor:this.getColorStyle("indicator.selected","indicator.selected.color")}});createStyleClasses=()=>({...this.createTabsClasses(),...this.createTabClasses()});getStyleClasses(){return this.style}resolveComponentStyle=({key:e="tabs",compPath:t,themePath:n=t,defaultValue:r})=>{const o=this.modifiedLayout.components?.find(t=>t.key===e);return ap(o,t)??ap(this.themeStyle,n)??r};getTabStyle(e){return this.objectMap[e].components?.find(e=>"tab"===e.key)}}const Yf=()=>{const t=e.useElement(),n=e.useApp(),r=e.useStaleLayout(),o=e.useEmbed(),i=e.useModel(),a=e.useTranslator(),l=e.useOptions(),s=e.useEmitter(),u=e.useInteractionState(),c=function({theme:e,config:t={}}){const{id:n,resolve:r=[],transform:o=[],extend:i=[]}=t,a={theme:e,matrix:Dp(r),styles:void 0};return a.styles=Ap({theme:e,id:n,transform:o,extend:i,matrix:a.matrix}),{getStyles:()=>a.styles,getTheme:()=>a.theme,setTheme:e=>{a.theme=e,a.styles=Ap({theme:e,id:n,transform:o,extend:i,matrix:a.matrix})}}}({theme:e.useTheme(),config:{id:"tabbedContainer",resolve:[["object.tabbedContainer","indicator.selected","color"],["object.tabbedContainer","indicator.hover","color"],["object.tabbedContainer","background.hover","color"],["object.tabbedContainer","icon.value","color"],["object.tabbedContainer","icon.value","fontSize"]]}}),d=e.useMemo(()=>new bc(o,a),[o,a]),[p]=e.useState(()=>new Pf(i?.id)),[f,h]=e.useState(!1),m=e.useMemo(()=>o&&i&&n?new Ff({embed:o,model:i,app:n,translator:a,mutex:p}):void 0,[o,i,n,a,p]),g=e.useMemo(()=>zc(r),[r]),b=e.useMemo(()=>new qf({modifiedLayout:g,themeService:c}),[g,c]);return e.useMemo(()=>({app:n,modifiedLayout:g,embed:o,model:i,emitter:s,interactions:u,dataHandler:m,chartList:d,styleModel:b,mutex:p,options:l,accessibility:f,setAccessibility:h,translator:a,element:t}),[g,o,i,n,s,u,m,d,b,p,l,f,a,t])},Kf=({dataHandler:e,modifiedLayout:t,translator:n,sharedContainerUtilities:r,Icon:o})=>{const[i,a]=y.useState(void 0);if(!e||!t)return null;const l=!t.qExtendsId;return Et.jsx(Sc,{children:Et.jsxs(wc,{children:[Et.jsx(o,{}),l?Et.jsxs(Et.Fragment,{children:[Et.jsx(Fc,{sx:{width:250,height:32,fontFamily:"inherit"},className:"init-button",variant:i?"contained":"outlined",onClick:e=>{a(e.currentTarget)},"aria-label":n.get("LayoutContainer.EmptyList.AddContent"),disableRipple:!0,children:n.get("LayoutContainer.EmptyList.AddContent")}),Et.jsx(Mc,{translator:n,anchorEl:i,dataHandler:e,onClose:()=>{a(void 0)},sharedContainerUtilities:r})]}):Et.jsx(ul,{variant:"inherit",children:n.get("LayoutContainer.EmptyList.EmptyHint")})]})})};class Xf{_rendered=new Set;_objectMap=new Map;_objectApis=new Map;_resolver;_dependencyData;_recreateMap=new Map;constructor(e){this._dependencyData=e}set dependencyData(e){this._dependencyData=e}get dependencyData(){return this._dependencyData}get rendered(){return this._rendered}get objectMap(){return this._objectMap}get objectApis(){return this._objectApis}get resolver(){return this._resolver}get recreateMap(){return this._recreateMap}createTimerForRendering=()=>{if(!this.resolver){let e;const t=setTimeout(()=>{this._dependencyData.options.onRenderStatusUpdate?.("Layout container rendering timeout reached after 90 seconds. Resolving anyway."),this.doResolve()},9e4),n=new Promise(t=>{e=t});this._resolver={promise:n,resolve:e,timer:t}}return this._resolver};doResolve=()=>{this.resolver&&(clearTimeout(this.resolver?.timer),this.resolver.resolve?.(!0),this._resolver=void 0)};tryToResolve=()=>{const{visibleLayoutObjects:e}=this._dependencyData;if(this.resolver){e.every(e=>this.rendered.has(e.id))&&(this._dependencyData.options.onRenderStatusUpdate?.("All layout container children rendered"),this.doResolve())}};syncObjects(e){const t=new Set,n=new Set([...Array.from(this.objectMap.keys()),...Array.from(this.objectApis.keys()),...this.rendered]),r=new Set(n);let o=!1;return e.forEach(e=>{n.has(e.id)?(this.rendered.has(e.id)&&t.add(e.id),r.delete(e.id)):o=!0}),r.forEach(e=>{const t=this.objectMap.get(e);t&&(this.confirmPotentialSelections(t),t.destroy?.(),this.objectMap.delete(e)),this.objectApis.get(e)?.destroy(),this.objectApis.delete(e)}),this._rendered=t,this.tryToResolve(),o}destroy(){for(const e of this.objectApis.values())e.destroy();this._objectMap=new Map,this._objectApis=new Map}saveObject(e,t){this.objectMap.set(e,t)}saveObjectApi(e,t){this._objectApis.set(e,t)}onRendered(e){this._dependencyData.options.onRenderStatusUpdate?.(`Layout container child rendered: ${this.rendered.size+1}/${this._dependencyData.visibleLayoutObjects.length} ${e}`),this.rendered.add(e),this.tryToResolve()}getChildrenObjects(){const{visibleLayoutObjects:e}=this._dependencyData,t=[];return e.forEach(e=>{const n=this.objectMap.get(e.id);n&&t.push(n)}),t}getChildLayout(e){const{modifiedLayout:t}=this._dependencyData;return t.qChildList.qItems.find(t=>t.qInfo.qId===e)}shouldRenderWithQmfeEmbed(e){return!!this._dependencyData.options.useQlikEmbedChildRendering&&!!e}getNebulaOptions(e){const{viewState:t,modifiedLayout:n,options:r}=this._dependencyData;return{isReadonly:!1,isParentMaster:!!n?.qExtendsId,isSnapshot:!!n.snapshotData,...!!t?.viewStates?.[e]&&{viewState:t?.viewStates[e]},...!!t?.layouts?.[e]&&{layout:t.layouts[e]},direction:r.direction,chartAnimations:r.chartAnimations,progressiveRendering:r.progressiveRendering,freeResize:r.freeResize,navigation:r.navigation,disableThemeBorder:r.disableThemeBorder??!1,fallbackToClient:r.fallbackToClient}}getNebulaEmbedOptions(e){const{useQlikEmbedChildRendering:t,getContextMenuParent:n,embedProps:r}=this._dependencyData.options;return{...this.getNebulaOptions(e),setController:t=>{this.saveObject(e,t)},onRendered:()=>{this.onRendered(e)},onInitialRender:()=>{this.onRendered(e)},useQlikEmbedChildRendering:t,getContextMenuParent:n,embedProps:r}}getQmfeEmbedProps(e,t){const{options:n,containerMenu:r={id:"container-menu",icon:"ChartObject"},translator:o}=this._dependencyData,{embedProps:i,getContextMenuParent:a}=n;return{...i,ui:"analytics/chart",objectId:e,preview:!0,appId:t,onRender:()=>{this.onRendered(e)},options:{...i?.options,...this.getNebulaOptions(e)},onError:t=>{const n=this.getChildLayout(e)?.qInfo.qType;console.error("Could not render chart with id",e,n,t)},exposeRefApi:({getVisualizationApi:t})=>{t().then(t=>{const n=t;this.saveObjectApi(e,n),this.saveObject(e,{...n,getViewState:()=>n.getImperativeHandle().then(e=>e.getViewState())})})},onContextMenu:async e=>{try{const t=await(i?.onContextMenu?i.onContextMenu(e):e.contextMenuItems)??[],n=await(a?.(e));return n&&"contextMenuItems"in e&&t.push({id:r.id,icon:{value:r.icon,type:"sprout"},label:o?.get("contextMenu.subMenuContainerOptions")??"Container options",onClick:()=>{},items:n}),t}catch(e){return console.error("Error getting context menu parent options",e),[]}}}}confirmPotentialSelections(e){e&&"selectionsApi"in e&&e.selectionsApi.active&&e.selectionsApi.confirm()}}var Qf=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),Zf=Qf((e,t)=>{t.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,t.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,t.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/}),Jf=Qf((e,t)=>{const n=Zf();t.exports={isSpaceSeparator:e=>"string"==typeof e&&n.Space_Separator.test(e),isIdStartChar:e=>"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||"$"===e||"_"===e||n.ID_Start.test(e)),isIdContinueChar:e=>"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"$"===e||"_"===e||"‌"===e||"‍"===e||n.ID_Continue.test(e)),isDigit:e=>"string"==typeof e&&/[0-9]/.test(e),isHexDigit:e=>"string"==typeof e&&/[0-9A-Fa-f]/.test(e)}}),eh=Qf((e,t)=>{const n=Jf();let r,o,i,a,l,s,u,c,d,p,f,h,m,g;function b(e,t,n){const r=e[t];if(null!=r&&"object"==typeof r)if(Array.isArray(r))for(let e=0;e<r.length;e++){const t=String(e),o=b(r,t,n);void 0===o?delete r[t]:Object.defineProperty(r,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const e in r){const t=b(r,e,n);void 0===t?delete r[e]:Object.defineProperty(r,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}function v(){for(p="default",f="",h=!1,m=1;;){g=y();const e=C[p]();if(e)return e}}function y(){if(r[a])return String.fromCodePoint(r.codePointAt(a))}function E(){const e=y();return"\n"===e?(l++,s=0):e?s+=e.length:s++,e&&(a+=e.length),e}t.exports=function(e,t){r=String(e),o="start",i=[],a=0,l=1,s=0,u=void 0,c=void 0,d=void 0;do{u=v(),S[o]()}while("eof"!==u.type);return"function"==typeof t?b({"":d},"",t):d};const C={default(){switch(g){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void E();case"/":return E(),void(p="comment");case void 0:return E(),x("eof")}if(!n.isSpaceSeparator(g))return C[o]();E()},comment(){switch(g){case"*":return E(),void(p="multiLineComment");case"/":return E(),void(p="singleLineComment")}throw R(E())},multiLineComment(){switch(g){case"*":return E(),void(p="multiLineCommentAsterisk");case void 0:throw R(E())}E()},multiLineCommentAsterisk(){switch(g){case"*":return void E();case"/":return E(),void(p="default");case void 0:throw R(E())}E(),p="multiLineComment"},singleLineComment(){switch(g){case"\n":case"\r":case"\u2028":case"\u2029":return E(),void(p="default");case void 0:return E(),x("eof")}E()},value(){switch(g){case"{":case"[":return x("punctuator",E());case"n":return E(),D("ull"),x("null",null);case"t":return E(),D("rue"),x("boolean",!0);case"f":return E(),D("alse"),x("boolean",!1);case"-":case"+":return"-"===E()&&(m=-1),void(p="sign");case".":return f=E(),void(p="decimalPointLeading");case"0":return f=E(),void(p="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return f=E(),void(p="decimalInteger");case"I":return E(),D("nfinity"),x("numeric",1/0);case"N":return E(),D("aN"),x("numeric",NaN);case'"':case"'":return h='"'===E(),f="",void(p="string")}throw R(E())},identifierNameStartEscape(){if("u"!==g)throw R(E());E();const e=w();switch(e){case"$":case"_":break;default:if(!n.isIdStartChar(e))throw F()}f+=e,p="identifierName"},identifierName(){switch(g){case"$":case"_":case"‌":case"‍":return void(f+=E());case"\\":return E(),void(p="identifierNameEscape")}if(!n.isIdContinueChar(g))return x("identifier",f);f+=E()},identifierNameEscape(){if("u"!==g)throw R(E());E();const e=w();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!n.isIdContinueChar(e))throw F()}f+=e,p="identifierName"},sign(){switch(g){case".":return f=E(),void(p="decimalPointLeading");case"0":return f=E(),void(p="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return f=E(),void(p="decimalInteger");case"I":return E(),D("nfinity"),x("numeric",m*(1/0));case"N":return E(),D("aN"),x("numeric",NaN)}throw R(E())},zero(){switch(g){case".":return f+=E(),void(p="decimalPoint");case"e":case"E":return f+=E(),void(p="decimalExponent");case"x":case"X":return f+=E(),void(p="hexadecimal")}return x("numeric",0*m)},decimalInteger(){switch(g){case".":return f+=E(),void(p="decimalPoint");case"e":case"E":return f+=E(),void(p="decimalExponent")}if(!n.isDigit(g))return x("numeric",m*Number(f));f+=E()},decimalPointLeading(){if(n.isDigit(g))return f+=E(),void(p="decimalFraction");throw R(E())},decimalPoint(){switch(g){case"e":case"E":return f+=E(),void(p="decimalExponent")}return n.isDigit(g)?(f+=E(),void(p="decimalFraction")):x("numeric",m*Number(f))},decimalFraction(){switch(g){case"e":case"E":return f+=E(),void(p="decimalExponent")}if(!n.isDigit(g))return x("numeric",m*Number(f));f+=E()},decimalExponent(){switch(g){case"+":case"-":return f+=E(),void(p="decimalExponentSign")}if(n.isDigit(g))return f+=E(),void(p="decimalExponentInteger");throw R(E())},decimalExponentSign(){if(n.isDigit(g))return f+=E(),void(p="decimalExponentInteger");throw R(E())},decimalExponentInteger(){if(!n.isDigit(g))return x("numeric",m*Number(f));f+=E()},hexadecimal(){if(n.isHexDigit(g))return f+=E(),void(p="hexadecimalInteger");throw R(E())},hexadecimalInteger(){if(!n.isHexDigit(g))return x("numeric",m*Number(f));f+=E()},string(){switch(g){case"\\":return E(),void(f+=function(){switch(y()){case"b":return E(),"\b";case"f":return E(),"\f";case"n":return E(),"\n";case"r":return E(),"\r";case"t":return E(),"\t";case"v":return E(),"\v";case"0":if(E(),n.isDigit(y()))throw R(E());return"\0";case"x":return E(),function(){let e="",t=y();if(!n.isHexDigit(t))throw R(E());if(e+=E(),t=y(),!n.isHexDigit(t))throw R(E());return e+=E(),String.fromCodePoint(parseInt(e,16))}();case"u":return E(),w();case"\n":case"\u2028":case"\u2029":return E(),"";case"\r":return E(),"\n"===y()&&E(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw R(E())}return E()}());case'"':return h?(E(),x("string",f)):void(f+=E());case"'":return h?void(f+=E()):(E(),x("string",f));case"\n":case"\r":throw R(E());case"\u2028":case"\u2029":!function(e){console.warn(`JSON5: '${P(e)}' in strings is not valid ECMAScript; consider escaping`)}(g);break;case void 0:throw R(E())}f+=E()},start(){switch(g){case"{":case"[":return x("punctuator",E())}p="value"},beforePropertyName(){switch(g){case"$":case"_":return f=E(),void(p="identifierName");case"\\":return E(),void(p="identifierNameStartEscape");case"}":return x("punctuator",E());case'"':case"'":return h='"'===E(),void(p="string")}if(n.isIdStartChar(g))return f+=E(),void(p="identifierName");throw R(E())},afterPropertyName(){if(":"===g)return x("punctuator",E());throw R(E())},beforePropertyValue(){p="value"},afterPropertyValue(){switch(g){case",":case"}":return x("punctuator",E())}throw R(E())},beforeArrayValue(){if("]"===g)return x("punctuator",E());p="value"},afterArrayValue(){switch(g){case",":case"]":return x("punctuator",E())}throw R(E())},end(){throw R(E())}};function x(e,t){return{type:e,value:t,line:l,column:s}}function D(e){for(const t of e){if(y()!==t)throw R(E());E()}}function w(){let e="",t=4;for(;t-- >0;){const t=y();if(!n.isHexDigit(t))throw R(E());e+=E()}return String.fromCodePoint(parseInt(e,16))}const S={start(){if("eof"===u.type)throw _();A()},beforePropertyName(){switch(u.type){case"identifier":case"string":return c=u.value,void(o="afterPropertyName");case"punctuator":return void k();case"eof":throw _()}},afterPropertyName(){if("eof"===u.type)throw _();o="beforePropertyValue"},beforePropertyValue(){if("eof"===u.type)throw _();A()},beforeArrayValue(){if("eof"===u.type)throw _();"punctuator"!==u.type||"]"!==u.value?A():k()},afterPropertyValue(){if("eof"===u.type)throw _();switch(u.value){case",":return void(o="beforePropertyName");case"}":k()}},afterArrayValue(){if("eof"===u.type)throw _();switch(u.value){case",":return void(o="beforeArrayValue");case"]":k()}},end(){}};function A(){let e;switch(u.type){case"punctuator":switch(u.value){case"{":e={};break;case"[":e=[]}break;case"null":case"boolean":case"numeric":case"string":e=u.value}if(void 0===d)d=e;else{const t=i[i.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,c,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(null!==e&&"object"==typeof e)i.push(e),o=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{const e=i[i.length-1];o=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function k(){i.pop();const e=i[i.length-1];o=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}function R(e){return L(void 0===e?`JSON5: invalid end of input at ${l}:${s}`:`JSON5: invalid character '${P(e)}' at ${l}:${s}`)}function _(){return L(`JSON5: invalid end of input at ${l}:${s}`)}function F(){return s-=5,L(`JSON5: invalid identifier character at ${l}:${s}`)}function P(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function L(e){const t=new SyntaxError(e);return t.lineNumber=l,t.columnNumber=s,t}}),th=Qf((e,t)=>{const n=Jf();t.exports=function(e,t,r){const o=[];let i,a,l,s="",u="";if(null==t||"object"!=typeof t||Array.isArray(t)||(r=t.space,l=t.quote,t=t.replacer),"function"==typeof t)a=t;else if(Array.isArray(t)){i=[];for(const e of t){let t;"string"==typeof e?t=e:("number"==typeof e||e instanceof String||e instanceof Number)&&(t=String(e)),void 0!==t&&i.indexOf(t)<0&&i.push(t)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),"number"==typeof r?r>0&&(r=Math.min(10,Math.floor(r)),u=" ".substr(0,r)):"string"==typeof r&&(u=r.substr(0,10)),c("",{"":e});function c(e,t){let n=t[e];switch(null!=n&&("function"==typeof n.toJSON5?n=n.toJSON5(e):"function"==typeof n.toJSON&&(n=n.toJSON(e))),a&&(n=a.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof n?d(n):"number"==typeof n?String(n):"object"==typeof n?Array.isArray(n)?function(e){if(o.indexOf(e)>=0)throw TypeError("Converting circular structure to JSON5");o.push(e);let t=s;s+=u;let n,r=[];for(let t=0;t<e.length;t++){const n=c(String(t),e);r.push(void 0!==n?n:"null")}if(0===r.length)n="[]";else if(""===u)n="["+r.join(",")+"]";else{let e=",\n"+s,o=r.join(e);n="[\n"+s+o+",\n"+t+"]"}return o.pop(),s=t,n}(n):function(e){if(o.indexOf(e)>=0)throw TypeError("Converting circular structure to JSON5");o.push(e);let t=s;s+=u;let n,r=i||Object.keys(e),a=[];for(const t of r){const n=c(t,e);if(void 0!==n){let e=p(t)+":";""!==u&&(e+=" "),e+=n,a.push(e)}}if(0===a.length)n="{}";else{let e;if(""===u)e=a.join(","),n="{"+e+"}";else{let r=",\n"+s;e=a.join(r),n="{\n"+s+e+",\n"+t+"}"}}return o.pop(),s=t,n}(n):void 0}function d(e){const t={"'":.1,'"':.2},r={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let o="";for(let i=0;i<e.length;i++){const a=e[i];switch(a){case"'":case'"':t[a]++,o+=a;continue;case"\0":if(n.isDigit(e[i+1])){o+="\\x00";continue}}if(r[a])o+=r[a];else{if(a<" "){let e=a.charCodeAt(0).toString(16);o+="\\x"+("00"+e).substring(e.length);continue}o+=a}}const i=l||Object.keys(t).reduce((e,n)=>t[e]<t[n]?e:n);return o=o.replace(new RegExp(i,"g"),r[i]),i+o+i}function p(e){if(0===e.length)return d(e);const t=String.fromCodePoint(e.codePointAt(0));if(!n.isIdStartChar(t))return d(e);for(let r=t.length;r<e.length;r++)if(!n.isIdContinueChar(String.fromCodePoint(e.codePointAt(r))))return d(e);return e}}});function nh(e){if("undefined"==typeof window)throw new Error(`Cannot load runtime module "${e}" outside a browser (no window available)`)}async function rh(e,t){return t?.runtimeModuleMocks?.[e]?t.runtimeModuleMocks?.[e]:(nh(e),function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");const t=function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");let t,n=e?.embedRuntimeUrl||e?.url||e?.host;if(n||"noauth"!==e?.authType||(n="https://cdn.qlikcloud.com/qmfe"),n){for(t=n.toLowerCase().startsWith("https://")||n.toLowerCase().startsWith("http://")?n:`https://${n}`;t.endsWith("/");)t=t.slice(0,-1);return`${t}/qlik-embed/main.js`}}(e);t&&window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig&&window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig({url:t,hostConfig:e}),t&&window.__qlikMainPrivateResolvers.resolveMainJsUrl&&(window.__qlikMainPrivateResolvers.forwardCompatibleHostConfig=e,window.__qlikMainPrivateResolvers.resolveMainJsUrl(t))}(t),async function(e){if(nh(e),!window.__qlikMainPrivateResolvers?.qlikMainPromise)throw new Error("No main url resolver found");return(await window.__qlikMainPrivateResolvers.qlikMainPromise).import(e)}(e))}Qf((e,t)=>{t.exports={parse:eh(),stringify:th()}})(),"undefined"!=typeof window&&(window.__qlikMainPrivateResolvers||(window.__qlikMainPrivateResolvers={}),window.__qlikMainPrivateResolvers.mainUrlPromise||(window.__qlikMainPrivateResolvers.mainUrlPromise=new Promise(e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrl=t=>{e(t)})})),window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise||(window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise=new Promise(e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig=t=>{e(t)})})),window.__qlikMainPrivateResolvers.qlikMainPromise||(window.__qlikMainPrivateResolvers.qlikMainPromise=(async()=>{if(window.QlikMain)return window.QlikMain;if(!window.__qlikMainPrivateResolvers?.mainJsUrlAndHostConfigPromise||!window.__qlikMainPrivateResolvers.mainUrlPromise)throw new Error("No main url promise found, report this issue");const e=setTimeout(()=>{console.warn("Waiting for a host parameter pointing to a Qlik runtime system")},5e3),{url:t,hostConfig:n}=await Promise.race([window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise,window.__qlikMainPrivateResolvers.mainUrlPromise.then(e=>({url:e,hostConfig:window.__qlikMainPrivateResolvers?.forwardCompatibleHostConfig}))]);clearTimeout(e);const r=await async function(e,t){if("windowscookie"===t?.authType){if(t.getAccessToken){const n=await async function(e){if("function"==typeof e)return e();if("string"==typeof e){const t=function(e){return globalThis[e]}(e);if("function"!=typeof t)throw new Error(`getAccessToken function "${e}" not found on globalThis. Please make sure it is defined.`);return t()}}(t.getAccessToken);return n&&await fetch(e,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},cache:"no-cache"}),!0}if(t.loginUri&&!(await fetch(e,{method:"GET",mode:"cors",credentials:"include",redirect:"manual"}).catch(()=>({ok:!1}))).ok)return window.location.replace(t.loginUri),new Promise(()=>{})}return!1}(t,n);return new Promise(e=>{if(window.QlikMain)e(window.QlikMain);else{const n=window.document.createElement("script");t&&(n.src=t),r&&(n.crossOrigin="use-credentials"),n.addEventListener("error",()=>{console.error(`Qlik runtime system not found: ${t}`)}),n.addEventListener("load",()=>{window.QlikMain&&e(window.QlikMain)}),window.document.head.appendChild(n)}})})()));const oh=y.createContext(void 0),ih=e=>{const t=y.useRef(null),n=y.useRef(void 0),{vanillaEmbedFn:r,hostConfig:o,...i}=e;return y.useEffect(()=>(t.current&&(n.current=r({target:t.current,props:{hostConfig:o,...i}})),()=>{n.current&&n.current.$destroy()}),[]),y.useEffect(()=>{n.current&&n.current.$set({hostConfig:o,...i})},[i,o]),Et.jsx("qlik-embed-react",{style:{display:"contents"},ref:t})},ah=e=>{const t=y.useContext(oh),{vanillaEmbedFn:n}=function(e){const[t,n]=y.useState({});return y.useEffect(()=>{let t=!1;const r=e=>{t||n({vanillaError:e instanceof Error?e:new Error(String(e))})},o=e=>rh("embed-vanilla@v1",e).then(({mountVanillaEmbedComponent:e})=>{t||n({vanillaEmbedFn:e})});return e?o(e).catch(r):rh("auth@v1").then(e=>{if(!t&&e.getDefaultHostConfig?.())return o(void 0)}).catch(r),()=>{t=!0}},[e]),t}(t);return n?Et.jsx(ih,{hostConfig:t,...e,vanillaEmbedFn:n}):null};const lh=y.forwardRef(function(e,t){const[n,r]=y.useState(null),o=function(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e},[e]),y.useCallback(e=>{t.current(e)},[])}(e=>{r(()=>e)});return y.useImperativeHandle(t,()=>n,[n]),Et.jsx(ah,{exposeRefApi:o,...e})}),sh=new Map,uh=e=>{const t=sh.get(e);t&&(t.unmount(),sh.delete(e))},ch=({chartObject:e,embed:t,renderHelper:n,direction:r,interactions:o,env:i,app:a})=>{const l=y.useRef(null),{id:s}=e;y.useEffect(()=>(s&&l.current&&(async(e,t,n,r,o)=>{const i=o?.id;if(r.shouldRenderWithQmfeEmbed(i))try{const n=Ec.createRoot(e);return sh.set(t,n),void n.render(Et.jsx(oh.Provider,{value:{},children:Et.jsx(lh,{...r.getQmfeEmbedProps(t,i)})}))}catch(e){console.warn("QlikEmbed mount failed, falling back to embed.render()",t,e),uh(t)}n.render({element:e,id:t,options:r.getNebulaEmbedOptions(t)}).then(e=>{r.saveObjectApi(t,e)}).catch(e=>{const n=r.getChildLayout(t)?.qInfo.qType;console.error("Could not render chart with id",t,n,e)})})(l.current,s,t,n,a),()=>{s&&uh(s)}),[s,t,n,r,a]);const u=y.useMemo(()=>()=>{if(e?.id&&i.anything){const t=e?.label,{sense:r}=i.anything,o="current",a=n.objectMap.get(e.id);a&&r.propertyPanel.show({model:a.model,parent:o,headerLabel:t,keepCurrentActiveCell:!0})}},[i,e,n]);return y.useEffect(()=>{const e=l?.current;return e&&o?.edit&&e.addEventListener("dblclick",u),()=>{e?.removeEventListener("dblclick",u)}},[l,u,o]),Et.jsx("div",{ref:l,style:{position:"relative",height:"100%",width:"100%"},"data-testid":`tab-panel-${e.childRefId}`})};let dh=function(e){return e.TABS_HEIGHT="36px",e}({});const ph=({charts:e,handleChangeTab:t,activeTabId:n,element:r,translator:o,accessibility:i,disabled:a})=>{const[l,s]=E.useState(null),u=Boolean(l),c=()=>{s(null)},d=y.useCallback(e=>{e?.focus()},[]);return Et.jsxs(Et.Fragment,{children:[Et.jsx(Wl,{onClick:e=>{s(e.currentTarget)},disabled:a,"aria-haspopup":"menu","data-testid":"chartTabMenuDropdownButton",tabIndex:i?0:-1,"aria-label":o.get("Container.Label.Visualizations"),className:hf.TAB_MENU,sx:{m:"2px"},children:Et.jsx($f,{})}),Et.jsx(wu,{anchorEl:l,open:u,onClose:c,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},MenuListProps:{sx:{py:0}},slotProps:{paper:{sx:{maxHeight:"500px",maxWidth:"500px"}}},children:e.map(e=>Et.jsx(_u,{className:hf.TAB_MENU_ITEM,ref:n===e.childRefId&&u?d:null,onClick:()=>{(e=>{t(e.childRefId),c(),window.setTimeout(()=>{r.getElementsByClassName(hf.ACTIVE_TAB_PANEL)?.[0]?.focus()},0)})(e)},sx:n===e.childRefId?{backgroundColor:"rgba(0, 0, 0, 0.1)"}:{},"aria-label":e.label,title:e.label,children:Et.jsx(ul,{variant:"inherit",noWrap:!0,children:e.label})},`chartTabMenu-${e.childRefId}`))})]})},fh=({label:e,id:t})=>Et.jsx(Ol,{className:hf.TAB_LABEL,id:`tab-label-${t}`,sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",overflow:"hidden",flexWrap:"wrap"},children:Et.jsx("span",{style:{width:"100%",overflowWrap:"break-word",hyphens:"auto",fontWeight:"bold",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",lineHeight:"normal",overflow:"hidden"},children:e})}),hh=({libraryInfo:e,chart:t,iconPosition:n,id:r})=>{let o;switch(n){case"bottom":o={marginTop:"6px"};break;case"top":o={marginBottom:"6px"};break;case"end":o={marginInlineStart:"8px"};break;default:o={marginInlineEnd:"8px"}}o.display="flex",o.alignItems="center",o.height="100%",o.flex="1 0 0";return 0===t.condition||!1===t.visible?Et.jsx(zf,{id:`${hf.TABS_ICON}-${r}`,style:o}):e?Et.jsx(jf,{id:`${hf.TABS_ICON}-${r}`,libraryInfo:e,style:o}):null},mh=({models:e,activeTabId:t,handleChangeTab:n})=>{const{modifiedLayout:r,chartList:o,interactions:i,accessibility:a}=e,l=o?.getCharts(),s=r.objects.filter(e=>!Gf(e,i)),{orientation:u,tabContainerStyle:c,ScrollButtonComponent:d}=(({orientation:e})=>"left"===e?{orientation:"vertical",tabContainerStyle:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"25%",flexShrink:0},ScrollButtonComponent:Hf}:{orientation:"horizontal",tabContainerStyle:{display:"flex",flexDirection:"row",alignItems:"center"},ScrollButtonComponent:Uf})(r),p=!1===i.active&&!i.edit,[f,h]=y.useState(!1),m=y.useCallback(e=>{if(e){const t=e.getElementsByClassName("MuiTabs-flexContainer")[0];if(t)return void h("vertical"===u?t.scrollHeight>t.offsetHeight:t.scrollWidth>t.offsetWidth)}h(!1)},[u]);return Et.jsxs(Ol,{className:hf.TAB_WRAPPER,sx:c,ref:e=>{m(e)},children:[r.useDropdown&&f?Et.jsx(ph,{charts:s,handleChangeTab:n,activeTabId:t,accessibility:a,translator:e.translator,element:e.element,disabled:p}):null,Et.jsx(rc,{value:t,onChange:(e,t)=>{n(t)},ScrollButtonComponent:d,variant:"scrollable",orientation:u,scrollButtons:!!r.useScrollButton&&"auto",TabScrollButtonProps:{...p&&{disabled:!0}},sx:{height:"100%",width:"100%",minHeight:dh.TABS_HEIGHT},children:s.map(n=>{const o=jc(r,n.childRefId)?.qData?.visualization,i=o&&l?.[o]?.libraryInfo,s=e.styleModel.getTabStyle(n.childRefId),c=0===n.condition||r.showIcons&&i&&!1!==s?.icon?.show||!1===n.visible,d="vertical"===u?"top":"start",f=e.styleModel.resolveComponentStyle({compPath:"icon.position",defaultValue:d}),h=e.styleModel.resolveComponentStyle({compPath:"label.show"}),m=n.label&&(s?.label?.show??!1!==h),g=`${r.qInfo.qId}-${n.childRefId}`;return Et.jsx(Iu,{className:`${hf.TAB} ${t===n.childRefId?hf.ACTIVE_TAB:""}`,disabled:p,id:`tab-${g}`,value:n.childRefId,title:n.label,label:m?Et.jsx(fh,{label:n.label,id:g}):void 0,icon:c?Et.jsx(hh,{libraryInfo:i,chart:n,iconPosition:f,id:g}):"",iconPosition:f,"data-testid":`container-tab-${n.childRefId}`,sx:{textAlign:"vertical"!==u||r.showIcons?"center":"start",minWidth:"vertical"===u?"100%":void 0,minHeight:dh.TABS_HEIGHT,padding:"6px 16px","&:hover":{paddingBottom:"4px"},"&.Mui-disabled":{opacity:"inherit"}},"aria-label":n.label,"aria-controls":`tab-panel-${g}`,tabIndex:a&&t===n.childRefId?0:-1},n.childRefId)})})]})},gh=({models:e,renderHelper:t,activeTabId:n,handleChangeTab:r,env:o})=>{const{modifiedLayout:i,embed:a,interactions:l,options:s,styleModel:u,accessibility:c,app:d}=e,p=i.objects,f=l.edit||!!p.find(e=>0!==e.condition&&!1!==e.visible),h=i.showTabs&&f,m="left"===i.orientation?"row":"column",g=u.getStyleClasses();return Et.jsxs(Ol,{sx:{display:"flex",flexDirection:m,height:"100%",width:"100%",direction:s.direction,...g},children:[h?Et.jsx(mh,{models:e,activeTabId:n,handleChangeTab:r}):null,p.map(e=>{const r=`tab-panel-${i.qInfo.qId}-${e.childRefId}`,u=n===e.childRefId&&!Gf(e,l);return Et.jsx(Ol,{role:"tabpanel",id:r,"aria-label":e.label,sx:{flex:"1 1 auto",minHeight:0,width:"100%",padding:"2px",boxSizing:"border-box",direction:"ltr","&:focus-visible":{boxShadow:"inset 0 0 0 2px #0275D9",borderRadius:"3px",zIndex:1200}},...u?{className:hf.ACTIVE_TAB_PANEL,tabIndex:c?0:-1}:{hidden:!0},children:u?Et.jsx(ch,{chartObject:e,renderHelper:t,direction:s.direction,embed:a,interactions:l,env:o,app:d}):null},r)})]})};let bh=function(e){return e.COPY="copy",e.PASTE="paste",e.RESET_COPY_BUFFER="resetCopyBuffer",e}({}),vh=function(e){return e.COPY="copy",e.PASTE_AND_REPLACE="paste-and-replace",e.PASTE="paste",e.DUPLICATE="duplicate",e.DELETE="delete",e.CUT="cut",e.EDIT_PROPERTIES="edit",e.ZOOM_IN="zoom-in",e.VISUAL_EXPLORATION="visual-exploration",e.MONITOR_IN_HUB="addto",e.REORDER_LAYERS_GROUP="reorder-layers-group",e.BRING_TO_FRONT="bring-to-front",e.BRING_FORWARD="bring-forward",e.SEND_TO_BACK="send-to-back",e.SEND_BACKWARDS="send-backwards",e.CONTAINER_HEADER="container-header",e.CHART_HEADER="chart-header",e.ALERT_GROUP="alertGroup",e.ADD_TO_MASTER_ITEMS="add-to-master-items",e.UNLINK_VISUALIZATION="unlink",e.DEVELOPER="object-developer",e.SHOW_DETAILS="object-info",e.EXPLAIN_KEY_DRIVERS_OLD_ID="explainKeyDrivers",e.EXPLAIN_KEY_DRIVERS="key-driver",e.SUBSCRIBE="subscribe",e.NOTES_GROUP="notesGroup",e.DOWNLOAD="download",e.SHARE_IMAGE="share",e}({});const yh=[vh.PASTE_AND_REPLACE,vh.ZOOM_IN,vh.VISUAL_EXPLORATION],Eh=[vh.VISUAL_EXPLORATION,vh.ALERT_GROUP,vh.SHOW_DETAILS,vh.EXPLAIN_KEY_DRIVERS,vh.EXPLAIN_KEY_DRIVERS_OLD_ID],Ch=[vh.DELETE,vh.CUT,vh.ADD_TO_MASTER_ITEMS,vh.UNLINK_VISUALIZATION],xh=[vh.PASTE_AND_REPLACE],Dh=(e,t)=>{const{childRefId:n}=e.model.layout,r=t.objects.find(e=>e.childRefId===n);return{...e,additionalData:{label:r?.label}}},wh=(e,t,n,r,o)=>{const i=t.getSupportFunction(vh.COPY);if(!i)return void e.deleteItem(vh.COPY);const a=()=>{i(Dh(n,r)).catch(()=>{})},l=e.items.find(e=>e.id===vh.COPY);if(l)l.updateItem({select:a});else if(o){const t=e.items.findIndex(e=>e.id===vh.CUT),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.copy",tid:vh.COPY,id:vh.COPY,icon:"copy",select:a,items:[]},n)}},Sh=e=>e.interactions.edit&&!e.modifiedLayout.qExtendsId,Ah=async(e,t,n,r,o)=>{if(o.flags.isEnabled("GVC_48_CHART_CONTEXT_MENU_ITEM_GENERATION"))return;const i=t.getBuilder("default");if(!i)return;const a=await i();a.addItem({translation:"contextMenu.containerOptionsHeader",tid:vh.CONTAINER_HEADER,id:vh.CONTAINER_HEADER,bold:!0,items:[]},0);const l=Sh(n);a.items.forEach(e=>{(Eh.includes(e.id)||!l&&xh.includes(e.id))&&a.deleteItem(e.id)}),l&&await(async(e,t,n)=>{const r=t.getSupportFunction(bh.PASTE),o=await(r?.()?.catch(()=>{}));if(!o||gc.includes(o.template))return void e.deleteItem(vh.PASTE_AND_REPLACE);const i=()=>{n()},a=e.items.find(e=>e.id===vh.PASTE_AND_REPLACE||e.id===vh.PASTE);if(a)a.updateItem({translation:"contextMenu.paste",select:i});else{const t=e.items.findLastIndex(e=>e.id===vh.COPY||e.id===vh.DEVELOPER||e.id===vh.CONTAINER_HEADER),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.paste",tid:vh.PASTE_AND_REPLACE,id:vh.PASTE_AND_REPLACE,icon:"paste",select:i,items:[]},n)}})(a,t,r),e.updateItem({items:a.items}),1===e.items.length&&e.deleteItem(vh.CONTAINER_HEADER)},kh="tabbed-container-menu",Rh=e=>{const t={[vh.MONITOR_IN_HUB]:!0,[vh.SUBSCRIBE]:!0,[vh.NOTES_GROUP]:!0,[vh.DOWNLOAD]:!0,[vh.SHARE_IMAGE]:!0};e.items.forEach(n=>{t[n.id]?e.deleteItem(n.id):n.items&&Rh(n)})},_h=(e,t,n,r,o,i)=>a=>{const{dataHandler:l,modifiedLayout:s}=r;if(Sh(r)){n.isInvalid||(((e,t,n,r)=>{const{model:o,modifiedLayout:i}=n,a=e.items.findLastIndex(e=>e.id===vh.CHART_HEADER||e.id===vh.REORDER_LAYERS_GROUP),l=a>=0?1+a:void 0;e.addItem({translation:"Object.Container.Props.EditProperties",tid:vh.EDIT_PROPERTIES,id:vh.EDIT_PROPERTIES,icon:vh.EDIT_PROPERTIES,items:[],select:()=>{const{childRefId:e}=t.model.layout,n=i.objects.find(t=>t.childRefId===e),a=n?.label,{sense:l}=r.anything,s=o;l.propertyPanel.show({model:t.model,parent:s,headerLabel:a})}},l)})(a,n,r,o),((e,t,n,r,o,i)=>{const a=r.getSupportFunction(vh.COPY);if(!a)return void e.deleteItem(vh.CUT);const l=()=>{o&&a(Dh(n,i)).then(async()=>{await(o?.deleteChildren([t]))}).catch(()=>{})},s=e.items.find(e=>e.id===vh.CUT);if(s)s.updateItem({select:l});else{const t=e.items.findLastIndex(e=>e.id===vh.ADD_TO_MASTER_ITEMS||e.id===vh.UNLINK_VISUALIZATION||e.id===vh.EDIT_PROPERTIES||e.id===vh.REORDER_LAYERS_GROUP||e.id===vh.DEVELOPER),n=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.cut",tid:vh.CUT,id:vh.CUT,icon:"cut",select:l,items:[]},n)}})(a,t,n,e,l,s),wh(a,e,n,s,!0),((e,t,n,r,o)=>{const i=t.getSupportFunction(bh.COPY),a=t.getSupportFunction(bh.PASTE);if(!i||!a)return void e.deleteItem(vh.DUPLICATE);const l=()=>{i(Dh(n,r)).then(()=>{o()}).catch(()=>{})},s=e.items.find(e=>e.id===vh.DUPLICATE);if(s)s.updateItem({select:l});else{const t=e.items.findIndex(e=>e.id===vh.COPY),n=t>=0?1+t:void 0;e.addItem({translation:"Common.Duplicate",tid:vh.DUPLICATE,id:vh.DUPLICATE,icon:vh.DUPLICATE,items:[],select:l},n)}})(a,e,n,s,i)),((e,t,n)=>{const r=()=>{n&&n.deleteChildren([t]).catch(()=>{})},o=e.items.find(e=>e.id===vh.DELETE);if(o)o.updateItem({select:r});else{const t=e.items.findLastIndex(e=>e.id===vh.DUPLICATE||e.id===vh.ADD_TO_MASTER_ITEMS||e.id===vh.UNLINK_VISUALIZATION||e.id===vh.REORDER_LAYERS_GROUP||e.id===vh.DEVELOPER),n=t>=0?1+t:void 0;e.addItem({translation:"Common.Delete",tid:vh.DELETE,id:vh.DELETE,icon:"bin",items:[],select:r},n)}})(a,t,l)}else wh(a,e,n,s,!1)},Fh=(t,n,r,o)=>{e.onContextMenu(async(e,i,a)=>{if(!a)return!1;const l=((e,t)=>()=>{if(!e)return;const n=t.getSupportFunction(bh.PASTE);n&&n().then(async({template:t,init:n,children:r,additionalData:o})=>{const{label:i}=o,a={label:i};n.qExtendsId?await e.addMasterObjectAsChild({initProps:n,children:r,objectInitProps:a}):await e.addVizAsChild({type:t,initProps:n,children:r,objectInitProps:a})}).catch(e=>{e&&t.getSupportFunction(bh.RESET_COPY_BUFFER)})})(r.dataHandler,a);if(await Ah(e,a,r,l,o),Rh(e),!(e=>{let t;t="qv-radial-contextmenu"===e.type?e.touches[0]?.target:e.target;return t&&((e,t)=>{let n=e;for(;n;){if(n.classList?.contains(t))return n;n=n.parentNode}return null})(t,hf.ACTIVE_TAB_PANEL)})(i))return!0;const s=r.modifiedLayout.objects.find(e=>e.childRefId===t)?.id;if(!s)return!0;const u=n.objectMap.get(s);if(!u)return!0;const c=_h(a,t,u,r,o,l),d=await(async(e,t,n,r)=>{const o=Sh(n),i=e.getBuilder("object");if(!i)return;const a=await i(t);return a.addItem({translation:"contextMenu.chartOptionsHeader",tid:vh.CHART_HEADER,id:vh.CHART_HEADER,bold:!0,items:[]},0),r(a),a.items.forEach(e=>{(yh.includes(e.id)||!o&&Ch.includes(e.id))&&a.deleteItem(e.id)}),1===a.items.length&&a.deleteItem(vh.CHART_HEADER),a})(a,u,r,c);return!d||(e.items.length>0&&d.addItem({translation:"contextMenu.subMenuContainerOptions",tid:kh,id:kh,icon:"tabbed-container",items:[...e.items]},d.items.length),e.updateItem({items:d.items}),!0)})},Ph=({element:t,models:n,env:r,activeCharts:o})=>{const i=((t,n)=>{const[r,o]=e.useState(void 0);return e.useEffect(()=>{if(0===t.getElementsByClassName(n).length){const e=document.createElement("div");e.className=n,t.appendChild(e);const r=Ec.createRoot(e);o(r)}return()=>{r?.unmount()}},[t,n,r]),r})(t,"init-component"),{options:a,modifiedLayout:l,interactions:s,model:u}=n,{qChildList:c}=l,d=mc(a.direction),p=(t=>{const{viewState:n}=e.useOptions(),{snapshotData:r}=t;if(r){const{layouts:e}=r.objectsData,t=r.viewState?.viewStates;return{layouts:e,viewStates:t}}if(n){const{viewStates:e}=n;return{viewStates:e}}})(l),f=e.useMemo(()=>Wf(l),[l]),h={modifiedLayout:l,activeTabId:f,env:r},[m,g]=wf(h);g(h);const b=e.useMemo(()=>l.objects.filter(e=>f===e.childRefId),[f,l.objects]),v=e.useMemo(()=>({...a,disableThemeBorder:!0}),[a]),{renderHelper:y}=(t=>{const{visibleLayoutObjects:n,options:r}=t,[o]=e.useState(()=>new Xf(t)),[,i]=e.useState(r);return o.dependencyData=t,e.usePromise(async()=>(i(e=>(e!==r&&n.forEach(e=>o.recreateMap.set(e.id,!0)),r)),o.syncObjects(n)?o.createTimerForRendering()?.promise:o.resolver?.promise),[n,r]),e.useEffect(()=>()=>{o.destroy()},[o]),{renderHelper:o}})({modifiedLayout:l,visibleLayoutObjects:b,viewState:p,options:v,containerMenu:{id:kh,icon:"TabbedContainerOutline"},translator:n.translator});Fh(f,y,n,r);const[E]=e.useState({current:void 0}),C=e.useMemo(()=>e=>{(async({model:e,patchList:t})=>{if(e?.applyPatches){const n=await e.getEffectiveProperties(),r=[];t.forEach(e=>{const{newValue:t,propertyName:o}=e,i=void 0!==n[o]?"Replace":"Add";t?r.push({qPath:`/${o}`,qOp:i,qValue:JSON.stringify(t)}):"Replace"===i&&r.push({qPath:`/${o}`,qOp:"Remove"})}),r.length>0&&await e.applyPatches(r,!0)}})({model:u,patchList:[{newValue:e,propertyName:"cachedTabId"}]}).then(()=>{const t=m.modifiedLayout.objects.find(t=>t.childRefId===e)?.id;o.updateActiveCharts(t?[t]:[])})},[o,u,m.modifiedLayout.objects]),x=e.useMemo(()=>({setSelected:e=>{const t=m.modifiedLayout.objects.find(t=>t.id===e[0])?.childRefId;t?C(t):E.current=e[0]}}),[C,m,E]);e.useEffect(()=>{const e=(({chartObjects:e,activeTabId:t})=>!Vf(e,t)&&e.length>0?e[0]?.childRefId:t)({chartObjects:m.modifiedLayout.objects,activeTabId:m.activeTabId});if(e!==m.activeTabId)C(e);else if(E.current){const e=m.modifiedLayout.objects.find(e=>e.id===E.current)?.childRefId;e&&C(e)}E.current=void 0},[l?.objects.length,m,E,C]),e.useEffect(()=>{const e=(({chartObjects:e,activeTabId:t,interactions:n})=>{const r=Vf(e,t);if(!r||Gf(r,n)){const n=e.find(e=>0!==e.condition&&!1!==e.visible);return n?.childRefId||t}return t})({chartObjects:m.modifiedLayout.objects,activeTabId:m.activeTabId,interactions:s});e!==m.activeTabId&&C(e)},[s,l?.objects,m,C]);const D=0===c.qItems.length&&s.edit;return e.useEffect(()=>{i?.render(Et.jsxs(zi,{theme:d,children:[D?Et.jsx(Kf,{Icon:Nf,dataHandler:n.dataHandler,modifiedLayout:n.modifiedLayout,translator:n.translator,sharedContainerUtilities:x}):null,!D&&Et.jsx(gh,{models:n,renderHelper:y,activeTabId:f,handleChangeTab:C,env:r})]}))},[i,n,d,D,y,f,x,C,r]),{renderHelper:y,sharedContainerUtilities:x,activeTabId:f}};var Lh={targets:[]};const Th={showTitles:!0,title:"",subtitle:"",footnote:"",disableNavMenu:!0,showDetails:!1,objects:[],qChildListDef:{qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition",visible:"/visible"}},showTabs:!0,useScrollButton:!0,useDropdown:!1,showIcons:!1,components:[],defaultTabId:"",orientation:"top",fontsUsed:[]};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".init-component {\n height: 100%;\n overflow: hidden;\n}\n");const Ih=(e,t)=>{let n=!0;const r=t.objects.reduce((t,r)=>{const o=r.id;if(0!==r.condition&&!1!==r.visible){const i=e.get(o);return i&&(e=>e.supportExport())(i)&&(n=!1,t.objectMap.set(o,i)),t.objects.push(r),t}return t},{objects:[],objectMap:new Map});return n?{objects:[],objectMap:new Map}:r},Mh=new class{translator;muiTheme;containers={};sync=({element:e,sharedContainerUtilities:t,translator:n,containerId:r,dataHandler:o,renderHelper:i,chartList:a})=>{this.translator=n,this.containers[r]={element:e,sharedContainerUtilities:t,dataHandler:o,renderHelper:i,chartList:a}};setMuiTheme=e=>{this.muiTheme=mc(e)};destroy=e=>{delete this.containers[e]}};return function(t){return{qae:{properties:Th,data:Lh},ext:lf({env:t,propertyHandlerData:Mh}),component(){const n=Yf(),r=e.useTranslator();e.useMemo(()=>{!function(e){if(e&&e.get&&e.add){const t="LayoutContainer.EmptyList.AddContent";if(e.get(t)!==t)return;Object.keys(o).forEach(t=>{e.add(o[t])})}}(r)},[r]);const{dataHandler:i,model:a,accessibility:s,setAccessibility:u,interactions:c,element:d,modifiedLayout:p}=n,f=e.useMemo(()=>function(){const e=new l.EventEmitter;let t=[];return e.updateActiveCharts=n=>{t=n.slice(),e.emit("activeChartsChange",t.slice())},e.setActiveCharts=n=>{t=n.slice(),e.emit("setActiveCharts",t.slice())},e.getActiveCharts=()=>[...t],e}(),[]),{renderHelper:h,sharedContainerUtilities:m,activeTabId:g}=Ph({element:d,models:n,env:t,activeCharts:f});(({propertyHandlerData:t,element:n,sharedContainerUtilities:r,translator:o,containerId:i,dataHandler:a,renderHelper:l,chartList:s})=>{const u=e.useOptions();i&&t.sync({containerId:i,element:n,sharedContainerUtilities:r,translator:o,dataHandler:a,renderHelper:l,chartList:s}),e.useEffect(()=>{t.setMuiTheme(u.direction)},[u.direction,t]),e.useEffect(()=>()=>{i&&t.destroy(i)},[i,t,u.direction])})({containerId:a?.id||"",element:d,sharedContainerUtilities:m,translator:r,dataHandler:i,propertyHandlerData:Mh,renderHelper:h});const[b,v]=e.useState(!0);Sf({isContainerActive:b,activeTabId:g,renderHelper:h,modifiedLayout:p,activeCharts:f,sharedContainerUtilities:m}),Df({element:d,accessibility:s,setAccessibility:u,renderHelper:h,interactions:c,env:t,models:n});const{getViewState:y}=df(h,Ih);e.useImperativeHandle(()=>({getViewState:y,getChildrenObjects:()=>(e=>e.map(e=>{if("canReceive"in e){const t=e=>"libraryitem"===e.type&&("field"===e.item.type||"measure"===e.item.type||"dimension"===e.item.type);return{...e,canReceive:n=>t(n)&&e.canReceive(n)}}return e}))(h.getChildrenObjects()),updateActiveState(e){v(e)},activeCharts:f}),[])}}}});