@nebula.js/stardust 4.0.1 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stardust.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v4.0.1
2
+ * @nebula.js/stardust v4.0.3
3
3
  * Copyright (c) 2023 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -103,7 +103,7 @@
103
103
  animation-iteration-count: infinite;
104
104
  animation-delay: 200ms;
105
105
  }
106
- `),BS.rippleVisible,KS,550,(({theme:e})=>e.transitions.easing.easeInOut),BS.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),BS.child,BS.childLeaving,ZS,550,(({theme:e})=>e.transitions.easing.easeInOut),BS.childPulsate,XS,(({theme:e})=>e.transitions.easing.easeInOut)),YS=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=If(n,$S),[l,s]=U.useState([]),c=U.useRef(0),u=U.useRef(null);U.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[l]);const d=U.useRef(!1),p=U.useRef(null),f=U.useRef(null),h=U.useRef(null);U.useEffect((()=>()=>{clearTimeout(p.current)}),[]);const m=U.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;s((e=>[...e,Vg.jsx(JS,{classes:{ripple:my(o.ripple,BS.ripple),rippleVisible:my(o.rippleVisible,BS.rippleVisible),ripplePulsate:my(o.ripplePulsate,BS.ripplePulsate),child:my(o.child,BS.child),childLeaving:my(o.childLeaving,BS.childLeaving),childPulsate:my(o.childPulsate,BS.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},c.current)])),c.current+=1,u.current=a}),[o]),g=U.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)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const l=a?null:h.current,s=l?l.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(s.width/2),u=Math.round(s.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-s.left),u=Math.round(n-s.top)}if(i)g=Math.sqrt((2*s.width**2+s.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((l?l.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((l?l.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},p.current=setTimeout((()=>{f.current&&(f.current(),f.current=null)}),80)):m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,m]),v=U.useCallback((()=>{g({},{pulsate:!0})}),[g]),b=U.useCallback(((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void(p.current=setTimeout((()=>{b(e,t)})));f.current=null,s((e=>e.length>0?e.slice(1):e)),u.current=t}),[]);return U.useImperativeHandle(t,(()=>({pulsate:v,start:g,stop:b})),[v,g,b]),Vg.jsx(QS,Of({className:my(BS.root,o.root,i),ref:h},a,{children:Vg.jsx(FS,{component:null,exit:!0,children:l})}))}));var ew=YS;function tw(e){return kf("MuiButtonBase",e)}var nw=Rf("MuiButtonBase",["root","disabled","focusVisible"]);const rw=["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"],ow=uy("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"},[`&.${nw.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),iw=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:s=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:h,onContextMenu:m,onDragLeave:g,onFocus:v,onFocusVisible:b,onKeyDown:y,onKeyUp:x,onMouseDown:S,onMouseLeave:w,onMouseUp:E,onTouchEnd:C,onTouchMove:k,onTouchStart:R,tabIndex:L=0,TouchRippleProps:O,touchRippleRef:I,type:T}=n,P=If(n,rw),_=U.useRef(null),N=U.useRef(null),M=sf(N,I),{isFocusVisibleRef:q,onFocus:z,onBlur:A,ref:D}=vf(),[j,F]=U.useState(!1);s&&j&&F(!1),U.useImperativeHandle(r,(()=>({focusVisible:()=>{F(!0),_.current.focus()}})),[]);const[B,$]=U.useState(!1);U.useEffect((()=>{$(!0)}),[]);const W=B&&!c&&!s;function H(e,t,n=u){return lf((r=>{t&&t(r);return!n&&N.current&&N.current[e](r),!0}))}U.useEffect((()=>{j&&d&&!c&&B&&N.current.pulsate()}),[c,d,j,B]);const V=H("start",S),G=H("stop",m),K=H("stop",g),Z=H("stop",E),X=H("stop",(e=>{j&&e.preventDefault(),w&&w(e)})),Q=H("start",R),J=H("stop",C),Y=H("stop",k),ee=H("stop",(e=>{A(e),!1===q.current&&F(!1),f&&f(e)}),!1),te=lf((e=>{_.current||(_.current=e.currentTarget),z(e),!0===q.current&&(F(!0),b&&b(e)),v&&v(e)})),ne=()=>{const e=_.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=U.useRef(!1),oe=lf((e=>{d&&!re.current&&j&&N.current&&" "===e.key&&(re.current=!0,N.current.stop(e,(()=>{N.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),y&&y(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!s&&(e.preventDefault(),h&&h(e))})),ie=lf((e=>{d&&" "===e.key&&N.current&&j&&!e.defaultPrevented&&(re.current=!1,N.current.stop(e,(()=>{N.current.pulsate(e)}))),x&&x(e),h&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&h(e)}));let ae=l;"button"===ae&&(P.href||P.to)&&(ae=p);const le={};"button"===ae?(le.type=void 0===T?"button":T,le.disabled=s):(P.href||P.to||(le.role="button"),s&&(le["aria-disabled"]=s));const se=sf(t,D,_),ce=Of({},n,{centerRipple:o,component:l,disabled:s,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:L,focusVisible:j}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Sf({root:["root",t&&"disabled",n&&"focusVisible"]},tw,o);return n&&r&&(i.root+=` ${r}`),i})(ce);return Vg.jsxs(ow,Of({as:ae,className:my(ue.root,a),ownerState:ce,onBlur:ee,onClick:h,onContextMenu:G,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:V,onMouseLeave:X,onMouseUp:Z,onDragLeave:K,onTouchEnd:J,onTouchMove:Y,onTouchStart:Q,ref:se,tabIndex:s?-1:L,type:T},le,P,{children:[i,W?Vg.jsx(ew,Of({ref:M,center:o},O)):null]}))}));var aw=iw;function lw(e){return kf("MuiButton",e)}var sw=Rf("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var cw=U.createContext({});const uw=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],dw=e=>Of({},"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}}),pw=uy(aw,{shouldForwardProp:e=>sy(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Kp(n.color)}`],t[`size${Kp(n.size)}`],t[`${n.variant}Size${Kp(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 Of({},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":Of({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:xb(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})`:xb(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})`:xb(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":Of({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${sw.focusVisible}`]:Of({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${sw.disabled}`]:Of({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 ${xb(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"},[`&.${sw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${sw.disabled}`]:{boxShadow:"none"}})),fw=uy("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Kp(n.size)}`]]}})((({ownerState:e})=>Of({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},dw(e)))),hw=uy("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Kp(n.size)}`]]}})((({ownerState:e})=>Of({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},dw(e)))),mw=U.forwardRef((function(e,t){const n=U.useContext(cw),r=ly({props:xf(n,e),name:"MuiButton"}),{children:o,color:i="primary",component:a="button",className:l,disabled:s=!1,disableElevation:c=!1,disableFocusRipple:u=!1,endIcon:d,focusVisibleClassName:p,fullWidth:f=!1,size:h="medium",startIcon:m,type:g,variant:v="text"}=r,b=If(r,uw),y=Of({},r,{color:i,component:a,disabled:s,disableElevation:c,disableFocusRipple:u,fullWidth:f,size:h,type:g,variant:v}),x=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return Of({},a,Sf({root:["root",i,`${i}${Kp(t)}`,`size${Kp(o)}`,`${i}Size${Kp(o)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Kp(o)}`],endIcon:["endIcon",`iconSize${Kp(o)}`]},lw,a))})(y),S=m&&Vg.jsx(fw,{className:x.startIcon,ownerState:y,children:m}),w=d&&Vg.jsx(hw,{className:x.endIcon,ownerState:y,children:d});return Vg.jsxs(pw,Of({ownerState:y,className:my(n.className,x.root,l),component:a,disabled:s,focusRipple:!u,focusVisibleClassName:my(x.focusVisible,p),ref:t,type:g},b,{classes:x,children:[S,o,w]}))}));var gw=mw,vw={typography:{fontSize:14,htmlFontSize:16,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontFamily:['"Source Sans Pro"','"Segoe UI"','"Helvetica Neue"',"-apple-system","Arial","sans-serif"].join(","),button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},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)"],props:{MuiButtonBase:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},MuiCheckbox:{color:"secondary"},MuiRadio:{color:"secondary"},MuiTabs:{indicatorColor:"secondary"}}};const bw="#009845",yw="#3F8AB3",xw="#ffffff",Sw="#404040",ww="#333333",Ew="#1A1A1A",Cw={mode:"light",palette:{primary:{main:Sw,contrastText:xw},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Sw,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{active:"#545454",hover:"rgba(0, 0, 0, 0.03)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.05)",disabled:"rgba(0, 0, 0, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},background:{paper:xw,default:xw,lightest:xw,lighter:"#FBFBFB",darker:"#F2F2F2",darkest:"#E6E6E6"},custom:{focusBorder:yw,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)"},selected:{main:bw,alternative:"#E4E4E4",excluded:"#BEBEBE",mainContrastText:xw,alternativeContrastText:Sw,excludedContrastText:Sw},btn:{normal:"rgba(255, 255, 255, 0.6)",hover:"rgba(0, 0, 0, 0.03)",active:"rgba(0, 0, 0, 0.1)",disabled:"rgba(255, 255, 255, 0.6)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.15)"}}},kw={mode:"dark",palette:{primary:{main:ww,contrastText:xw},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:xw,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)"},action:{active:xw,hover:"rgba(255, 255, 255, 0.05)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.03)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},divider:"rgba(0,0,0,0.3)",background:{default:"#323232",paper:"#323232",lightest:Sw,lighter:ww,darker:"#262626",darkest:Ew},custom:{focusBorder:yw,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)"},selected:{main:bw,alternative:ww,excluded:Ew,mainContrastText:xw,alternativeContrastText:xw,excludedContrastText:xw},btn:{normal:"rgba(255, 255, 255, 0.15)",hover:"rgba(255, 255, 255, 0.25)",active:"rgba(0, 0, 0, 0.6)",disabled:"rgba(255, 255, 255, 0.15)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.30)"}}},Rw={},Lw=e=>({MuiTypography:{root:{color:e.palette.text.primary}},MuiGrid:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]},MuiButtonBase:{root:{borderRadius:2,border:"1px solid transparent","&:focus":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}},MuiIconButton:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.btn.hover},"&:focus-visible":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:active":{borderColor:"transparent",boxShadow:"none",backgroundColor:e.palette.btn.active},"&:not(:active):not(:focus-visible)":{borderColor:"transparent",boxShadow:"none"}}},MuiOutlinedInput:{root:{backgroundColor:e.palette.custom.inputBackground,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.btn.border},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.custom.focusBorder,borderWidth:2}}},MuiButton:{outlined:{padding:"3px 11px",["&.".concat(sw.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:"1px solid ".concat(e.palette.btn.border),backgroundColor:e.palette.btn.normal,boxShadow:"none",["&.".concat(sw.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",["&.".concat(sw.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&:active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(sw.disabled)]:{backgroundColor:e.palette.btn.disabled}}},MuiAccordionSummary:{content:{margin:"8px 0"}}});function Ow(e){let t=Cw,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=kw));const r=JSON.stringify(t);if(Rw[r])return Rw[r];const o={palette:i(i({type:t.mode},vw.palette),t.palette),typography:i({},vw.typography),shadows:vw.shadows,props:i({},vw.props),shape:i({},vw.shape)};return Rw[r]=oy(function(e){const{defaultProps:t={},mixins:n={},overrides:r={},palette:o={},props:i={},styleOverrides:a={}}=e,l=Of({},If(e,Ib),{components:{}});Object.keys(t).forEach((e=>{const n=l.components[e]||{};n.defaultProps=t[e],l.components[e]=n})),Object.keys(i).forEach((e=>{const t=l.components[e]||{};t.defaultProps=i[e],l.components[e]=t})),Object.keys(a).forEach((e=>{const t=l.components[e]||{};t.styleOverrides=a[e],l.components[e]=t})),Object.keys(r).forEach((e=>{const t=l.components[e]||{};t.styleOverrides=r[e],l.components[e]=t})),l.spacing=Ev(e.spacing);const s=ev(e.breakpoints||{}),c=l.spacing;l.mixins=Of({gutters:(e={})=>Of({paddingLeft:c(2),paddingRight:c(2)},e,{[s.up("sm")]:Of({paddingLeft:c(3),paddingRight:c(3)},e[s.up("sm")])})},n);const{type:u,mode:d}=o,p=If(o,Tb),f=d||u||"light";return l.palette=Of({text:{hint:"dark"===f?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:f,type:f},p),l}(i(i({},o),{},{overrides:Lw(o)}))),Rw[r].name=n,Rw[r]}Ef.configure((e=>"njs-".concat("23fb","-").concat(e.replace("Mui",""))));var Iw=H.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null}),Tw=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const n=e,r=[],o={get:e=>n[e],set:(e,r)=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));return n[e]=r,t({type:"SET",value:r}),r},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));n[e]=null},dispatch:e=>{r.forEach((t=>t(e?{}:n)))}},i=()=>{const[,e]=U.useState(n);return U.useEffect((()=>(r.push(e),()=>{const t=r.indexOf(e);r.splice(t,1)})),[e]),[o]};return[i,o]};const[Pw,_w]=Tw({}),[Nw,Mw]=Tw({}),[qw,zw]=Tw({}),[Aw,Dw]=Tw({});function jw(e){if(!e.session)return[];const[t]=Pw(),n=e?e.id:null;let r=t.get(n);return U.useEffect((()=>{e&&!r&&(r=function(e){let{app:t}=e;const n="".concat(t.id),r=async function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=Dw.get(n);t&&(await t.endSelections(e),Dw.clear(n),zw.get(t.id).emit("deactivated"))},o={begin:async function(e,o){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e===Dw.get(n))return;r(i),Dw.set(n,e);const a=Array.isArray(o)?o:[o],l=async r=>{try{await e.beginSelections(a),Dw.set(n,e)}catch(e){6003!==e.code||r?Dw.clear(n):(await t.abortModal(i),l(!0))}};await l()},end:r};Mw.set(n,o);const i={model:t,isInModal:()=>!!Dw.get(n),isModal:e=>e?Dw.get(n)===e:!!Dw.get(n),forward:()=>o.end().then((()=>t.forward())),back:()=>o.end().then((()=>t.back())),clear:()=>o.end().then((()=>t.clearAll())),clearField(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$";return o.end().then((()=>t.getField(e,n).then((e=>e.clear()))))}};return i}({app:e}),t.set(n,r),t.dispatch(!0))}),[e]),[r]}const Fw={active:!0,select:!0,passive:!0,edit:!1};function Bw(e){const t={},n={},r=function(e){const{constraints:t={},interactions:n={}}=e;if(Object.keys(n).length>0)return n;const r={};return Object.keys(t).forEach((e=>{r[e]=!t[e]})),r}(e);Object.keys(Fw).forEach((e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Fw[e],n[e]=!Fw[e])})),e.constraints=n,e.interactions=t}const $w=U.forwardRef(((e,t)=>{let{initialContext:n,app:r,renderCallback:o}=e;const[i]=jw(r),[a,l]=U.useState(n),[s,c]=U.useState(),{theme:u}=U.useMemo((()=>({theme:Ow(s)})),[s]),[d,p]=U.useState([]);return U.useEffect((()=>{o&&o()}),[]),U.useImperativeHandle(t,(()=>({setComps(e){p([...e])},setMuiThemeName:c,setContext:e=>l((t=>JSON.stringify(t)!==JSON.stringify(e)?e:t)),getAppSelections:()=>i})),[]),H.createElement(Kg,{injectFirst:!0},H.createElement(py,{theme:u},H.createElement(Iw.Provider,{value:a},d)))}));function Ww(e){let t,{app:n,context:r}=e;const o=new Promise((e=>{t=e})),i=H.createRef(),a=document.createElement("div");a.style.display="none",a.setAttribute("data-nebulajs-version","4.0.1"),a.setAttribute("data-app-id",n.id),document.body.appendChild(a),r&&Bw(r);ft.createRoot(a).render(H.createElement($w,{ref:i,app:n,initialContext:r,renderCallback:t}));const l={},s=[];return[{toggleFocusOfCells(e){Object.keys(l).forEach((t=>{l[t].current.toggleFocus(t===e)}))},cells:l,addCell(e,t){l[e]=t},removeCell(e){delete l[e]},add(e){(async()=>{await o,s.push(e),i.current.setComps(s)})()},remove(e){(async()=>{await o;const t=s.indexOf(e);-1!==t&&s.splice(t,1),i.current.setComps(s)})()},setMuiThemeName(e){(async()=>{await o,i.current.setMuiThemeName(e)})()},context(e){(async()=>{await o,e&&Bw(e),i.current.setContext(e)})()},getAppSelections:async()=>(await o,i.current.getAppSelections())},i,o]}function Uw(e){return kf("MuiSvgIcon",e)}Rf("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Hw=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Vw=uy("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Kp(n.color)}`],t[`fontSize${Kp(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var n,r,o,i,a,l,s,c,u,d,p,f,h,m,g,v,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=e.transitions)||null==(i=o.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(a=e.typography)||null==(l=a.pxToRem)?void 0:l.call(a,20))||"1.25rem",medium:(null==(s=e.typography)||null==(c=s.pxToRem)?void 0:c.call(s,24))||"1.5rem",large:(null==(u=e.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[t.fontSize],color:null!=(p=null==(f=(e.vars||e).palette)||null==(h=f[t.color])?void 0:h.main)?p:{action:null==(m=(e.vars||e).palette)||null==(g=m.action)?void 0:g.active,disabled:null==(v=(e.vars||e).palette)||null==(b=v.action)?void 0:b.disabled,inherit:void 0}[t.color]}})),Gw=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:i="inherit",component:a="svg",fontSize:l="medium",htmlColor:s,inheritViewBox:c=!1,titleAccess:u,viewBox:d="0 0 24 24"}=n,p=If(n,Hw),f=Of({},n,{color:i,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d}),h={};c||(h.viewBox=d);const m=(e=>{const{color:t,fontSize:n,classes:r}=e;return Sf({root:["root","inherit"!==t&&`color${Kp(t)}`,`fontSize${Kp(n)}`]},Uw,r)})(f);return Vg.jsxs(Vw,Of({as:a,className:my(m.root,o),focusable:"false",color:s,"aria-hidden":!u||void 0,role:u?"img":void 0,ref:t},h,p,{ownerState:f,children:[r,u?Vg.jsx("title",{children:u}):null]}))}));Gw.muiName="SvgIcon";var Kw=Gw;function Zw(e,t){function n(n,r){return Vg.jsx(Kw,Of({"data-testid":`${t}Icon`,ref:r},n,{children:e}))}return n.muiName=Kw.muiName,U.memo(U.forwardRef(n))}const Xw={configure:e=>{Ef.configure(e)}};var Qw=Object.freeze({__proto__:null,capitalize:Kp,createChainedFunction:Zp,createSvgIcon:Zw,debounce:Xp,deprecatedPropType:function(e,t){return()=>null},isMuiElement:Qp,ownerDocument:Jp,ownerWindow:Yp,requirePropFactory:function(e,t){return()=>null},setRef:ef,unstable_ClassNameGenerator:Xw,unstable_useEnhancedEffect:tf,unstable_useId:of,unsupportedProp:function(e,t,n,r,o){return null},useControlled:af,useEventCallback:lf,useForkRef:sf,useIsFocusVisible:vf});const Jw=e=>e.scrollTop;function Yw(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}function eE(e){return kf("MuiPaper",e)}Rf("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const tE=["className","component","elevation","square","variant"],nE=uy("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return Of({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&Of({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${xb("#fff",fy(t.elevation))}, ${xb("#fff",fy(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),rE=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:l="elevation"}=n,s=If(n,tE),c=Of({},n,{component:o,elevation:i,square:a,variant:l}),u=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return Sf({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},eE,o)})(c);return Vg.jsx(nE,Of({as:o,ownerState:c,className:my(u.root,r),ref:t},s))}));var oE=rE;function iE(e){return kf("MuiIconButton",e)}var aE=Rf("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);const lE=["edge","children","className","color","disabled","disableFocusRipple","size"],sE=uy(aw,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Kp(n.color)}`],n.edge&&t[`edge${Kp(n.edge)}`],t[`size${Kp(n.size)}`]]}})((({theme:e,ownerState:t})=>Of({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:xb(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return Of({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&Of({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":Of({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xb(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${aE.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),cE=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:l=!1,disableFocusRipple:s=!1,size:c="medium"}=n,u=If(n,lE),d=Of({},n,{edge:r,color:a,disabled:l,disableFocusRipple:s,size:c}),p=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e;return Sf({root:["root",n&&"disabled","default"!==r&&`color${Kp(r)}`,o&&`edge${Kp(o)}`,`size${Kp(i)}`]},iE,t)})(d);return Vg.jsx(sE,Of({className:my(p.root,i),centerRipple:!0,focusRipple:!s,disabled:l,ref:t,ownerState:d},u,{children:o}))}));var uE=cE;function dE(e){return kf("MuiTypography",e)}Rf("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pE=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],fE=uy("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${Kp(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>Of({margin:0},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}))),hE={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},mE={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},gE=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiTypography"}),r=(e=>mE[e]||e)(n.color),o=ob(Of({},n,{color:r})),{align:i="inherit",className:a,component:l,gutterBottom:s=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=hE}=o,f=If(o,pE),h=Of({},o,{align:i,color:r,className:a,component:l,gutterBottom:s,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=l||(u?"p":p[d]||hE[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Sf({root:["root",i,"inherit"!==e.align&&`align${Kp(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},dE,a)})(h);return Vg.jsx(fE,Of({as:m,ref:t,ownerState:h,className:my(g.root,a)},f))}));var vE=gE;const bE=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],yE=uy(rS,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xE=U.forwardRef((function(e,t){var n;const r=Yv(),o=ly({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:l,componentsProps:s,container:c,disablePortal:u,keepMounted:d,modifiers:p,open:f,placement:h,popperOptions:m,popperRef:g,transition:v,slots:b,slotProps:y}=o,x=If(o,bE),S=null!=(n=null==b?void 0:b.root)?n:null==l?void 0:l.Root,w=Of({anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:p,open:f,placement:h,popperOptions:m,popperRef:g,transition:v},x);return Vg.jsx(yE,Of({as:a,direction:null==r?void 0:r.direction,slots:{root:S},slotProps:null!=y?y:s},w,{ref:t}))}));var SE=xE;function wE({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}var EE=U.createContext(void 0);function CE(){return U.useContext(EE)}function kE(e){return Vg.jsx(nb,Of({},e,{defaultTheme:iy,themeId:Lf}))}function RE(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function LE(e){return kf("MuiInputBase",e)}var OE=Rf("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);const IE=["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"],TE=(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${Kp(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},PE=(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]},_E=uy("div",{name:"MuiInputBase",slot:"Root",overridesResolver:TE})((({theme:e,ownerState:t})=>Of({},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",[`&.${OE.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&Of({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),NE=uy("input",{name:"MuiInputBase",slot:"Input",overridesResolver:PE})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=Of({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 Of({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] + .${OE.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},[`&.${OE.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"})})),ME=Vg.jsx(kE,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),qE=U.forwardRef((function(e,t){var n;const r=ly({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:l,components:s={},componentsProps:c={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:p,endAdornment:f,fullWidth:h=!1,id:m,inputComponent:g="input",inputProps:v={},inputRef:b,maxRows:y,minRows:x,multiline:S=!1,name:w,onBlur:E,onChange:C,onClick:k,onFocus:R,onKeyDown:L,onKeyUp:O,placeholder:I,readOnly:T,renderSuffix:P,rows:_,slotProps:N={},slots:M={},startAdornment:q,type:z="text",value:A}=r,D=If(r,IE),j=null!=v.value?v.value:A,{current:F}=U.useRef(null!=j),B=U.useRef(),$=U.useCallback((e=>{}),[]),W=sf(B,b,v.ref,$),[H,V]=U.useState(!1),G=CE(),K=wE({props:r,muiFormControl:G,states:["color","disabled","error","hiddenLabel","size","required","filled"]});K.focused=G?G.focused:H,U.useEffect((()=>{!G&&d&&H&&(V(!1),E&&E())}),[G,d,H,E]);const Z=G&&G.onFilled,X=G&&G.onEmpty,Q=U.useCallback((e=>{!function(e,t=!1){return e&&(RE(e.value)&&""!==e.value||t&&RE(e.defaultValue)&&""!==e.defaultValue)}(e)?X&&X():Z&&Z()}),[Z,X]);tf((()=>{F&&Q({value:j})}),[j,Q,F]);U.useEffect((()=>{Q(B.current)}),[]);let J=g,Y=v;S&&"input"===J&&(Y=Of(_?{type:void 0,minRows:_,maxRows:_}:{type:void 0,maxRows:y,minRows:x},Y),J=yS);U.useEffect((()=>{G&&G.setAdornedStart(Boolean(q))}),[G,q]);const ee=Of({},r,{color:K.color||"primary",disabled:K.disabled,endAdornment:f,error:K.error,focused:K.focused,formControl:G,fullWidth:h,hiddenLabel:K.hiddenLabel,multiline:S,size:K.size,startAdornment:q,type:z}),te=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:s,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e;return Sf({root:["root",`color${Kp(n)}`,r&&"disabled",o&&"error",s&&"fullWidth",a&&"focused",l&&"formControl","small"===p&&"sizeSmall",u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},LE,t)})(ee),ne=M.root||s.Root||_E,re=N.root||c.root||{},oe=M.input||s.Input||NE;return Y=Of({},Y,null!=(n=N.input)?n:c.input),Vg.jsxs(U.Fragment,{children:[!p&&ME,Vg.jsxs(ne,Of({},re,!vy(ne)&&{ownerState:Of({},ee,re.ownerState)},{ref:t,onClick:e=>{B.current&&e.currentTarget===e.target&&B.current.focus(),k&&!K.disabled&&k(e)}},D,{className:my(te.root,re.className,l,T&&"MuiInputBase-readOnly"),children:[q,Vg.jsx(EE.Provider,{value:null,children:Vg.jsx(oe,Of({ownerState:ee,"aria-invalid":K.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:u,disabled:K.disabled,id:m,onAnimationStart:e=>{Q("mui-auto-fill-cancel"===e.animationName?B.current:{value:"x"})},name:w,placeholder:I,readOnly:T,required:K.required,rows:_,value:j,onKeyDown:L,onKeyUp:O,type:z},Y,!vy(oe)&&{as:J,ownerState:Of({},ee,Y.ownerState)},{ref:W,className:my(te.input,Y.className,T&&"MuiInputBase-readOnly"),onBlur:e=>{E&&E(e),v.onBlur&&v.onBlur(e),G&&G.onBlur?G.onBlur(e):V(!1)},onChange:(e,...t)=>{if(!F){const t=e.target||B.current;if(null==t)throw new Error(Op(1));Q({value:t.value})}v.onChange&&v.onChange(e,...t),C&&C(e,...t)},onFocus:e=>{K.disabled?e.stopPropagation():(R&&R(e),v.onFocus&&v.onFocus(e),G&&G.onFocus?G.onFocus(e):V(!0))}}))}),f,P?P(Of({},K,{startAdornment:q})):null]}))]})}));var zE=qE;function AE(e){return kf("MuiOutlinedInput",e)}var DE=Of({},OE,Rf("MuiOutlinedInput",["root","notchedOutline","input"]));const jE=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],FE={entering:{opacity:1},entered:{opacity:1}},BE=U.forwardRef((function(e,t){const n=ay(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:l,in:s,onEnter:c,onEntered:u,onEntering:d,onExit:p,onExited:f,onExiting:h,style:m,timeout:g=r,TransitionComponent:v=NS}=e,b=If(e,jE),y=U.useRef(null),x=sf(y,a.ref,t),S=e=>t=>{if(e){const n=y.current;void 0===t?e(n):e(n,t)}},w=S(d),E=S(((e,t)=>{Jw(e);const r=Yw({style:m,timeout:g,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)})),C=S(u),k=S(h),R=S((e=>{const t=Yw({style:m,timeout:g,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),L=S(f);return Vg.jsx(v,Of({appear:i,in:s,nodeRef:y,onEnter:E,onEntered:C,onEntering:w,onExit:R,onExited:L,onExiting:k,addEndListener:e=>{o&&o(y.current,e)},timeout:g},b,{children:(e,t)=>U.cloneElement(a,Of({style:Of({opacity:0,visibility:"exited"!==e||s?void 0:"hidden"},FE[e],m,a.props.style),ref:x},t))}))}));var $E=BE;function WE(e){return kf("MuiBackdrop",e)}Rf("MuiBackdrop",["root","invisible"]);const UE=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],HE=uy("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>Of({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"}))),VE=U.forwardRef((function(e,t){var n,r,o;const i=ly({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:s="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=$E,transitionDuration:g}=i,v=If(i,UE),b=Of({},i,{component:s,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return Sf({root:["root",n&&"invisible"]},WE,t)})(b),x=null!=(n=f.root)?n:u.root;return Vg.jsx(m,Of({in:p,timeout:g},v,{children:Vg.jsx(HE,Of({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:s,className:my(y.root,l,null==x?void 0:x.className),ownerState:Of({},b,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}));var GE=VE;function KE(e){return kf("MuiBadge",e)}var ZE=Rf("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);const XE=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],QE=uy("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),JE=uy("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Kp(n.anchorOrigin.vertical)}${Kp(n.anchorOrigin.horizontal)}${Kp(n.overlap)}`],"default"!==n.color&&t[`color${Kp(n.color)}`],n.invisible&&t.invisible]}})((({theme:e,ownerState:t})=>Of({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},"dot"===t.variant&&{borderRadius:4,height:8,minWidth:8,padding:0},"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.invisible&&{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}))),YE=U.forwardRef((function(e,t){var n,r,o,i,a,l;const s=ly({props:e,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:u,component:d,components:p={},componentsProps:f={},children:h,overlap:m="rectangular",color:g="default",invisible:v=!1,max:b=99,badgeContent:y,slots:x,slotProps:S,showZero:w=!1,variant:E="standard"}=s,C=If(s,XE),{badgeContent:k,invisible:R,max:L,displayValue:O}=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=yf({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:l,max:s=r}=a?i:e;return{badgeContent:l,invisible:a,max:s,displayValue:l&&Number(l)>s?`${s}+`:l}}({max:b,invisible:v,badgeContent:y,showZero:w}),I=yf({anchorOrigin:c,color:g,overlap:m,variant:E,badgeContent:y}),T=R||null==k&&"dot"!==E,{color:P=g,overlap:_=m,anchorOrigin:N=c,variant:M=E}=T?I:s,q="dot"!==M?O:void 0,z=Of({},s,{badgeContent:k,invisible:T,max:L,displayValue:q,showZero:w,anchorOrigin:N,color:P,overlap:_,variant:M}),A=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e;return Sf({root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Kp(n.vertical)}${Kp(n.horizontal)}`,`anchorOrigin${Kp(n.vertical)}${Kp(n.horizontal)}${Kp(o)}`,`overlap${Kp(o)}`,"default"!==t&&`color${Kp(t)}`]},KE,a)})(z),D=null!=(n=null!=(r=null==x?void 0:x.root)?r:p.Root)?n:QE,j=null!=(o=null!=(i=null==x?void 0:x.badge)?i:p.Badge)?o:JE,F=null!=(a=null==S?void 0:S.root)?a:f.root,B=null!=(l=null==S?void 0:S.badge)?l:f.badge,$=Iy({elementType:D,externalSlotProps:F,externalForwardedProps:C,additionalProps:{ref:t,as:d},ownerState:z,className:my(null==F?void 0:F.className,A.root,u)}),W=Iy({elementType:j,externalSlotProps:B,ownerState:z,className:my(A.badge,null==B?void 0:B.className)});return Vg.jsxs(D,Of({},$,{children:[h,Vg.jsx(j,Of({},W,{children:q}))]}))}));var eC=YE;const tC=oy(),nC=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=Xg("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Xv),a=U.forwardRef((function(e,a){const l=tb(n),s=ob(e),{className:c,component:u="div"}=s,d=Jg(s,lb);return Vg.jsx(i,Qg({as:u,ref:a,className:ab(c,o?o(r):r),theme:t&&l[t]||l},d))}));return a}({themeId:Lf,defaultTheme:tC,defaultClassName:"MuiBox-root",generateClassName:Ef.generate});var rC=nC;function oC(e){return kf("PrivateSwitchBase",e)}Rf("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const iC=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],aC=uy(aw)((({ownerState:e})=>Of({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12}))),lC=uy("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),sC=U.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:l,disableFocusRipple:s=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:h,onBlur:m,onChange:g,onFocus:v,readOnly:b,required:y=!1,tabIndex:x,type:S,value:w}=e,E=If(e,iC),[C,k]=af({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),R=CE();let L=l;R&&void 0===L&&(L=R.disabled);const O="checkbox"===S||"radio"===S,I=Of({},e,{checked:C,disabled:L,disableFocusRipple:s,edge:c}),T=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Sf({root:["root",n&&"checked",r&&"disabled",o&&`edge${Kp(o)}`],input:["input"]},oC,t)})(I);return Vg.jsxs(aC,Of({component:"span",className:my(T.root,i),centerRipple:!0,focusRipple:!s,disabled:L,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),R&&R.onFocus&&R.onFocus(e)},onBlur:e=>{m&&m(e),R&&R.onBlur&&R.onBlur(e)},ownerState:I,ref:t},E,{children:[Vg.jsx(lC,Of({autoFocus:n,checked:r,defaultChecked:a,className:T.input,disabled:L,id:O?d:void 0,name:h,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;k(t),g&&g(e,t)},readOnly:b,ref:f,required:y,ownerState:I,tabIndex:x,type:S},"checkbox"===S&&void 0===w?{}:{value:w},p)),C?o:u]}))}));var cC=sC,uC=Zw(Vg.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),dC=Zw(Vg.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),pC=Zw(Vg.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function fC(e){return kf("MuiCheckbox",e)}var hC=Rf("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]);const mC=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],gC=uy(cC,{shouldForwardProp:e=>sy(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${Kp(n.color)}`]]}})((({theme:e,ownerState:t})=>Of({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xb("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${hC.checked}, &.${hC.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${hC.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),vC=Vg.jsx(dC,{}),bC=Vg.jsx(uC,{}),yC=Vg.jsx(pC,{}),xC=U.forwardRef((function(e,t){var n,r;const o=ly({props:e,name:"MuiCheckbox"}),{checkedIcon:i=vC,color:a="primary",icon:l=bC,indeterminate:s=!1,indeterminateIcon:c=yC,inputProps:u,size:d="medium",className:p}=o,f=If(o,mC),h=s?c:l,m=s?c:i,g=Of({},o,{color:a,indeterminate:s,size:d}),v=(e=>{const{classes:t,indeterminate:n,color:r}=e;return Of({},t,Sf({root:["root",n&&"indeterminate",`color${Kp(r)}`]},fC,t))})(g);return Vg.jsx(gC,Of({type:"checkbox",inputProps:Of({"data-indeterminate":s},u),icon:U.cloneElement(h,{fontSize:null!=(n=h.props.fontSize)?n:d}),checkedIcon:U.cloneElement(m,{fontSize:null!=(r=m.props.fontSize)?r:d}),ownerState:g,ref:t,className:my(v.root,p)},f,{classes:v}))}));var SC=xC;function wC(e){return kf("MuiCircularProgress",e)}Rf("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const EC=["className","color","disableShrink","size","style","thickness","value","variant"];let CC,kC,RC,LC,OC=e=>e;const IC=44,TC=dm(CC||(CC=OC`
106
+ `),BS.rippleVisible,KS,550,(({theme:e})=>e.transitions.easing.easeInOut),BS.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),BS.child,BS.childLeaving,ZS,550,(({theme:e})=>e.transitions.easing.easeInOut),BS.childPulsate,XS,(({theme:e})=>e.transitions.easing.easeInOut)),YS=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i}=n,a=If(n,$S),[l,s]=U.useState([]),c=U.useRef(0),u=U.useRef(null);U.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[l]);const d=U.useRef(!1),p=U.useRef(null),f=U.useRef(null),h=U.useRef(null);U.useEffect((()=>()=>{clearTimeout(p.current)}),[]);const m=U.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;s((e=>[...e,Vg.jsx(JS,{classes:{ripple:my(o.ripple,BS.ripple),rippleVisible:my(o.rippleVisible,BS.rippleVisible),ripplePulsate:my(o.ripplePulsate,BS.ripplePulsate),child:my(o.child,BS.child),childLeaving:my(o.childLeaving,BS.childLeaving),childPulsate:my(o.childPulsate,BS.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},c.current)])),c.current+=1,u.current=a}),[o]),g=U.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)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const l=a?null:h.current,s=l?l.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(s.width/2),u=Math.round(s.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-s.left),u=Math.round(n-s.top)}if(i)g=Math.sqrt((2*s.width**2+s.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((l?l.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((l?l.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},p.current=setTimeout((()=>{f.current&&(f.current(),f.current=null)}),80)):m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,m]),v=U.useCallback((()=>{g({},{pulsate:!0})}),[g]),b=U.useCallback(((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void(p.current=setTimeout((()=>{b(e,t)})));f.current=null,s((e=>e.length>0?e.slice(1):e)),u.current=t}),[]);return U.useImperativeHandle(t,(()=>({pulsate:v,start:g,stop:b})),[v,g,b]),Vg.jsx(QS,Of({className:my(BS.root,o.root,i),ref:h},a,{children:Vg.jsx(FS,{component:null,exit:!0,children:l})}))}));var ew=YS;function tw(e){return kf("MuiButtonBase",e)}var nw=Rf("MuiButtonBase",["root","disabled","focusVisible"]);const rw=["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"],ow=uy("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"},[`&.${nw.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),iw=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:s=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:h,onContextMenu:m,onDragLeave:g,onFocus:v,onFocusVisible:b,onKeyDown:y,onKeyUp:x,onMouseDown:S,onMouseLeave:w,onMouseUp:E,onTouchEnd:C,onTouchMove:k,onTouchStart:R,tabIndex:L=0,TouchRippleProps:O,touchRippleRef:I,type:T}=n,P=If(n,rw),_=U.useRef(null),N=U.useRef(null),M=sf(N,I),{isFocusVisibleRef:q,onFocus:z,onBlur:A,ref:D}=vf(),[j,F]=U.useState(!1);s&&j&&F(!1),U.useImperativeHandle(r,(()=>({focusVisible:()=>{F(!0),_.current.focus()}})),[]);const[B,$]=U.useState(!1);U.useEffect((()=>{$(!0)}),[]);const W=B&&!c&&!s;function H(e,t,n=u){return lf((r=>{t&&t(r);return!n&&N.current&&N.current[e](r),!0}))}U.useEffect((()=>{j&&d&&!c&&B&&N.current.pulsate()}),[c,d,j,B]);const V=H("start",S),G=H("stop",m),K=H("stop",g),Z=H("stop",E),X=H("stop",(e=>{j&&e.preventDefault(),w&&w(e)})),Q=H("start",R),J=H("stop",C),Y=H("stop",k),ee=H("stop",(e=>{A(e),!1===q.current&&F(!1),f&&f(e)}),!1),te=lf((e=>{_.current||(_.current=e.currentTarget),z(e),!0===q.current&&(F(!0),b&&b(e)),v&&v(e)})),ne=()=>{const e=_.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=U.useRef(!1),oe=lf((e=>{d&&!re.current&&j&&N.current&&" "===e.key&&(re.current=!0,N.current.stop(e,(()=>{N.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),y&&y(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!s&&(e.preventDefault(),h&&h(e))})),ie=lf((e=>{d&&" "===e.key&&N.current&&j&&!e.defaultPrevented&&(re.current=!1,N.current.stop(e,(()=>{N.current.pulsate(e)}))),x&&x(e),h&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&h(e)}));let ae=l;"button"===ae&&(P.href||P.to)&&(ae=p);const le={};"button"===ae?(le.type=void 0===T?"button":T,le.disabled=s):(P.href||P.to||(le.role="button"),s&&(le["aria-disabled"]=s));const se=sf(t,D,_),ce=Of({},n,{centerRipple:o,component:l,disabled:s,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:L,focusVisible:j}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Sf({root:["root",t&&"disabled",n&&"focusVisible"]},tw,o);return n&&r&&(i.root+=` ${r}`),i})(ce);return Vg.jsxs(ow,Of({as:ae,className:my(ue.root,a),ownerState:ce,onBlur:ee,onClick:h,onContextMenu:G,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:V,onMouseLeave:X,onMouseUp:Z,onDragLeave:K,onTouchEnd:J,onTouchMove:Y,onTouchStart:Q,ref:se,tabIndex:s?-1:L,type:T},le,P,{children:[i,W?Vg.jsx(ew,Of({ref:M,center:o},O)):null]}))}));var aw=iw;function lw(e){return kf("MuiButton",e)}var sw=Rf("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var cw=U.createContext({});const uw=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],dw=e=>Of({},"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}}),pw=uy(aw,{shouldForwardProp:e=>sy(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Kp(n.color)}`],t[`size${Kp(n.size)}`],t[`${n.variant}Size${Kp(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 Of({},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":Of({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:xb(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})`:xb(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})`:xb(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":Of({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${sw.focusVisible}`]:Of({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${sw.disabled}`]:Of({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 ${xb(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"},[`&.${sw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${sw.disabled}`]:{boxShadow:"none"}})),fw=uy("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Kp(n.size)}`]]}})((({ownerState:e})=>Of({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},dw(e)))),hw=uy("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Kp(n.size)}`]]}})((({ownerState:e})=>Of({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},dw(e)))),mw=U.forwardRef((function(e,t){const n=U.useContext(cw),r=ly({props:xf(n,e),name:"MuiButton"}),{children:o,color:i="primary",component:a="button",className:l,disabled:s=!1,disableElevation:c=!1,disableFocusRipple:u=!1,endIcon:d,focusVisibleClassName:p,fullWidth:f=!1,size:h="medium",startIcon:m,type:g,variant:v="text"}=r,b=If(r,uw),y=Of({},r,{color:i,component:a,disabled:s,disableElevation:c,disableFocusRipple:u,fullWidth:f,size:h,type:g,variant:v}),x=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return Of({},a,Sf({root:["root",i,`${i}${Kp(t)}`,`size${Kp(o)}`,`${i}Size${Kp(o)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Kp(o)}`],endIcon:["endIcon",`iconSize${Kp(o)}`]},lw,a))})(y),S=m&&Vg.jsx(fw,{className:x.startIcon,ownerState:y,children:m}),w=d&&Vg.jsx(hw,{className:x.endIcon,ownerState:y,children:d});return Vg.jsxs(pw,Of({ownerState:y,className:my(n.className,x.root,l),component:a,disabled:s,focusRipple:!u,focusVisibleClassName:my(x.focusVisible,p),ref:t,type:g},b,{classes:x,children:[S,o,w]}))}));var gw=mw,vw={typography:{fontSize:14,htmlFontSize:16,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontFamily:['"Source Sans Pro"','"Segoe UI"','"Helvetica Neue"',"-apple-system","Arial","sans-serif"].join(","),button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},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)"],props:{MuiButtonBase:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},MuiCheckbox:{color:"secondary"},MuiRadio:{color:"secondary"},MuiTabs:{indicatorColor:"secondary"}}};const bw="#009845",yw="#3F8AB3",xw="#ffffff",Sw="#404040",ww="#333333",Ew="#1A1A1A",Cw={mode:"light",palette:{primary:{main:Sw,contrastText:xw},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Sw,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{active:"#545454",hover:"rgba(0, 0, 0, 0.03)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.05)",disabled:"rgba(0, 0, 0, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},background:{paper:xw,default:xw,lightest:xw,lighter:"#FBFBFB",darker:"#F2F2F2",darkest:"#E6E6E6"},custom:{focusBorder:yw,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)"},selected:{main:bw,alternative:"#E4E4E4",excluded:"#BEBEBE",mainContrastText:xw,alternativeContrastText:Sw,excludedContrastText:Sw},btn:{normal:"rgba(255, 255, 255, 0.6)",hover:"rgba(0, 0, 0, 0.03)",active:"rgba(0, 0, 0, 0.1)",disabled:"rgba(255, 255, 255, 0.6)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.15)"}}},kw={mode:"dark",palette:{primary:{main:ww,contrastText:xw},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:xw,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)"},action:{active:xw,hover:"rgba(255, 255, 255, 0.05)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.03)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},divider:"rgba(0,0,0,0.3)",background:{default:"#323232",paper:"#323232",lightest:Sw,lighter:ww,darker:"#262626",darkest:Ew},custom:{focusBorder:yw,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)"},selected:{main:bw,alternative:ww,excluded:Ew,mainContrastText:xw,alternativeContrastText:xw,excludedContrastText:xw},btn:{normal:"rgba(255, 255, 255, 0.15)",hover:"rgba(255, 255, 255, 0.25)",active:"rgba(0, 0, 0, 0.6)",disabled:"rgba(255, 255, 255, 0.15)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.30)"}}},Rw={},Lw=e=>({MuiTypography:{root:{color:e.palette.text.primary}},MuiGrid:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]},MuiButtonBase:{root:{borderRadius:2,border:"1px solid transparent","&:focus":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}},MuiIconButton:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.btn.hover},"&:focus-visible":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:active":{borderColor:"transparent",boxShadow:"none",backgroundColor:e.palette.btn.active},"&:not(:active):not(:focus-visible)":{borderColor:"transparent",boxShadow:"none"}}},MuiOutlinedInput:{root:{backgroundColor:e.palette.custom.inputBackground,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.btn.border},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.custom.focusBorder,borderWidth:2}}},MuiButton:{outlined:{padding:"3px 11px",["&.".concat(sw.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:"1px solid ".concat(e.palette.btn.border),backgroundColor:e.palette.btn.normal,boxShadow:"none",["&.".concat(sw.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",["&.".concat(sw.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&:active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(sw.disabled)]:{backgroundColor:e.palette.btn.disabled}}},MuiAccordionSummary:{content:{margin:"8px 0"}}});function Ow(e){let t=Cw,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=kw));const r=JSON.stringify(t);if(Rw[r])return Rw[r];const o={palette:i(i({type:t.mode},vw.palette),t.palette),typography:i({},vw.typography),shadows:vw.shadows,props:i({},vw.props),shape:i({},vw.shape)};return Rw[r]=oy(function(e){const{defaultProps:t={},mixins:n={},overrides:r={},palette:o={},props:i={},styleOverrides:a={}}=e,l=Of({},If(e,Ib),{components:{}});Object.keys(t).forEach((e=>{const n=l.components[e]||{};n.defaultProps=t[e],l.components[e]=n})),Object.keys(i).forEach((e=>{const t=l.components[e]||{};t.defaultProps=i[e],l.components[e]=t})),Object.keys(a).forEach((e=>{const t=l.components[e]||{};t.styleOverrides=a[e],l.components[e]=t})),Object.keys(r).forEach((e=>{const t=l.components[e]||{};t.styleOverrides=r[e],l.components[e]=t})),l.spacing=Ev(e.spacing);const s=ev(e.breakpoints||{}),c=l.spacing;l.mixins=Of({gutters:(e={})=>Of({paddingLeft:c(2),paddingRight:c(2)},e,{[s.up("sm")]:Of({paddingLeft:c(3),paddingRight:c(3)},e[s.up("sm")])})},n);const{type:u,mode:d}=o,p=If(o,Tb),f=d||u||"light";return l.palette=Of({text:{hint:"dark"===f?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:f,type:f},p),l}(i(i({},o),{},{overrides:Lw(o)}))),Rw[r].name=n,Rw[r]}Ef.configure((e=>"njs-".concat("f855","-").concat(e.replace("Mui",""))));var Iw=H.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null}),Tw=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const n=e,r=[],o={get:e=>n[e],set:(e,r)=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));return n[e]=r,t({type:"SET",value:r}),r},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));n[e]=null},dispatch:e=>{r.forEach((t=>t(e?{}:n)))}},i=()=>{const[,e]=U.useState(n);return U.useEffect((()=>(r.push(e),()=>{const t=r.indexOf(e);r.splice(t,1)})),[e]),[o]};return[i,o]};const[Pw,_w]=Tw({}),[Nw,Mw]=Tw({}),[qw,zw]=Tw({}),[Aw,Dw]=Tw({});function jw(e){if(!e.session)return[];const[t]=Pw(),n=e?e.id:null;let r=t.get(n);return U.useEffect((()=>{e&&!r&&(r=function(e){let{app:t}=e;const n="".concat(t.id),r=async function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=Dw.get(n);t&&(await t.endSelections(e),Dw.clear(n),zw.get(t.id).emit("deactivated"))},o={begin:async function(e,o){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e===Dw.get(n))return;r(i),Dw.set(n,e);const a=Array.isArray(o)?o:[o],l=async r=>{try{await e.beginSelections(a),Dw.set(n,e)}catch(e){6003!==e.code||r?Dw.clear(n):(await t.abortModal(i),l(!0))}};await l()},end:r};Mw.set(n,o);const i={model:t,isInModal:()=>!!Dw.get(n),isModal:e=>e?Dw.get(n)===e:!!Dw.get(n),forward:()=>o.end().then((()=>t.forward())),back:()=>o.end().then((()=>t.back())),clear:()=>o.end().then((()=>t.clearAll())),clearField(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$";return o.end().then((()=>t.getField(e,n).then((e=>e.clear()))))}};return i}({app:e}),t.set(n,r),t.dispatch(!0))}),[e]),[r]}const Fw={active:!0,select:!0,passive:!0,edit:!1};function Bw(e){const t={},n={},r=function(e){const{constraints:t={},interactions:n={}}=e;if(Object.keys(n).length>0)return n;const r={};return Object.keys(t).forEach((e=>{r[e]=!t[e]})),r}(e);Object.keys(Fw).forEach((e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Fw[e],n[e]=!Fw[e])})),e.constraints=n,e.interactions=t}const $w=U.forwardRef(((e,t)=>{let{initialContext:n,app:r,renderCallback:o}=e;const[i]=jw(r),[a,l]=U.useState(n),[s,c]=U.useState(),{theme:u}=U.useMemo((()=>({theme:Ow(s)})),[s]),[d,p]=U.useState([]);return U.useEffect((()=>{o&&o()}),[]),U.useImperativeHandle(t,(()=>({setComps(e){p([...e])},setMuiThemeName:c,setContext:e=>l((t=>JSON.stringify(t)!==JSON.stringify(e)?e:t)),getAppSelections:()=>i})),[]),H.createElement(Kg,{injectFirst:!0},H.createElement(py,{theme:u},H.createElement(Iw.Provider,{value:a},d)))}));function Ww(e){let t,{app:n,context:r}=e;const o=new Promise((e=>{t=e})),i=H.createRef(),a=document.createElement("div");a.style.display="none",a.setAttribute("data-nebulajs-version","4.0.3"),a.setAttribute("data-app-id",n.id),document.body.appendChild(a),r&&Bw(r);ft.createRoot(a).render(H.createElement($w,{ref:i,app:n,initialContext:r,renderCallback:t}));const l={},s=[];return[{toggleFocusOfCells(e){Object.keys(l).forEach((t=>{l[t].current.toggleFocus(t===e)}))},cells:l,addCell(e,t){l[e]=t},removeCell(e){delete l[e]},add(e){(async()=>{await o,s.push(e),i.current.setComps(s)})()},remove(e){(async()=>{await o;const t=s.indexOf(e);-1!==t&&s.splice(t,1),i.current.setComps(s)})()},setMuiThemeName(e){(async()=>{await o,i.current.setMuiThemeName(e)})()},context(e){(async()=>{await o,e&&Bw(e),i.current.setContext(e)})()},getAppSelections:async()=>(await o,i.current.getAppSelections())},i,o]}function Uw(e){return kf("MuiSvgIcon",e)}Rf("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Hw=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Vw=uy("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Kp(n.color)}`],t[`fontSize${Kp(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var n,r,o,i,a,l,s,c,u,d,p,f,h,m,g,v,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=e.transitions)||null==(i=o.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(a=e.typography)||null==(l=a.pxToRem)?void 0:l.call(a,20))||"1.25rem",medium:(null==(s=e.typography)||null==(c=s.pxToRem)?void 0:c.call(s,24))||"1.5rem",large:(null==(u=e.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[t.fontSize],color:null!=(p=null==(f=(e.vars||e).palette)||null==(h=f[t.color])?void 0:h.main)?p:{action:null==(m=(e.vars||e).palette)||null==(g=m.action)?void 0:g.active,disabled:null==(v=(e.vars||e).palette)||null==(b=v.action)?void 0:b.disabled,inherit:void 0}[t.color]}})),Gw=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:i="inherit",component:a="svg",fontSize:l="medium",htmlColor:s,inheritViewBox:c=!1,titleAccess:u,viewBox:d="0 0 24 24"}=n,p=If(n,Hw),f=Of({},n,{color:i,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d}),h={};c||(h.viewBox=d);const m=(e=>{const{color:t,fontSize:n,classes:r}=e;return Sf({root:["root","inherit"!==t&&`color${Kp(t)}`,`fontSize${Kp(n)}`]},Uw,r)})(f);return Vg.jsxs(Vw,Of({as:a,className:my(m.root,o),focusable:"false",color:s,"aria-hidden":!u||void 0,role:u?"img":void 0,ref:t},h,p,{ownerState:f,children:[r,u?Vg.jsx("title",{children:u}):null]}))}));Gw.muiName="SvgIcon";var Kw=Gw;function Zw(e,t){function n(n,r){return Vg.jsx(Kw,Of({"data-testid":`${t}Icon`,ref:r},n,{children:e}))}return n.muiName=Kw.muiName,U.memo(U.forwardRef(n))}const Xw={configure:e=>{Ef.configure(e)}};var Qw=Object.freeze({__proto__:null,capitalize:Kp,createChainedFunction:Zp,createSvgIcon:Zw,debounce:Xp,deprecatedPropType:function(e,t){return()=>null},isMuiElement:Qp,ownerDocument:Jp,ownerWindow:Yp,requirePropFactory:function(e,t){return()=>null},setRef:ef,unstable_ClassNameGenerator:Xw,unstable_useEnhancedEffect:tf,unstable_useId:of,unsupportedProp:function(e,t,n,r,o){return null},useControlled:af,useEventCallback:lf,useForkRef:sf,useIsFocusVisible:vf});const Jw=e=>e.scrollTop;function Yw(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}function eE(e){return kf("MuiPaper",e)}Rf("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const tE=["className","component","elevation","square","variant"],nE=uy("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return Of({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&Of({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${xb("#fff",fy(t.elevation))}, ${xb("#fff",fy(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),rE=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:l="elevation"}=n,s=If(n,tE),c=Of({},n,{component:o,elevation:i,square:a,variant:l}),u=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return Sf({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},eE,o)})(c);return Vg.jsx(nE,Of({as:o,ownerState:c,className:my(u.root,r),ref:t},s))}));var oE=rE;function iE(e){return kf("MuiIconButton",e)}var aE=Rf("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);const lE=["edge","children","className","color","disabled","disableFocusRipple","size"],sE=uy(aw,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Kp(n.color)}`],n.edge&&t[`edge${Kp(n.edge)}`],t[`size${Kp(n.size)}`]]}})((({theme:e,ownerState:t})=>Of({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:xb(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return Of({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&Of({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":Of({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xb(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${aE.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),cE=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:l=!1,disableFocusRipple:s=!1,size:c="medium"}=n,u=If(n,lE),d=Of({},n,{edge:r,color:a,disabled:l,disableFocusRipple:s,size:c}),p=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e;return Sf({root:["root",n&&"disabled","default"!==r&&`color${Kp(r)}`,o&&`edge${Kp(o)}`,`size${Kp(i)}`]},iE,t)})(d);return Vg.jsx(sE,Of({className:my(p.root,i),centerRipple:!0,focusRipple:!s,disabled:l,ref:t,ownerState:d},u,{children:o}))}));var uE=cE;function dE(e){return kf("MuiTypography",e)}Rf("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pE=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],fE=uy("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${Kp(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>Of({margin:0},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}))),hE={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},mE={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},gE=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiTypography"}),r=(e=>mE[e]||e)(n.color),o=ob(Of({},n,{color:r})),{align:i="inherit",className:a,component:l,gutterBottom:s=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=hE}=o,f=If(o,pE),h=Of({},o,{align:i,color:r,className:a,component:l,gutterBottom:s,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=l||(u?"p":p[d]||hE[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Sf({root:["root",i,"inherit"!==e.align&&`align${Kp(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},dE,a)})(h);return Vg.jsx(fE,Of({as:m,ref:t,ownerState:h,className:my(g.root,a)},f))}));var vE=gE;const bE=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],yE=uy(rS,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xE=U.forwardRef((function(e,t){var n;const r=Yv(),o=ly({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:l,componentsProps:s,container:c,disablePortal:u,keepMounted:d,modifiers:p,open:f,placement:h,popperOptions:m,popperRef:g,transition:v,slots:b,slotProps:y}=o,x=If(o,bE),S=null!=(n=null==b?void 0:b.root)?n:null==l?void 0:l.Root,w=Of({anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:p,open:f,placement:h,popperOptions:m,popperRef:g,transition:v},x);return Vg.jsx(yE,Of({as:a,direction:null==r?void 0:r.direction,slots:{root:S},slotProps:null!=y?y:s},w,{ref:t}))}));var SE=xE;function wE({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}var EE=U.createContext(void 0);function CE(){return U.useContext(EE)}function kE(e){return Vg.jsx(nb,Of({},e,{defaultTheme:iy,themeId:Lf}))}function RE(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function LE(e){return kf("MuiInputBase",e)}var OE=Rf("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);const IE=["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"],TE=(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${Kp(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},PE=(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]},_E=uy("div",{name:"MuiInputBase",slot:"Root",overridesResolver:TE})((({theme:e,ownerState:t})=>Of({},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",[`&.${OE.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&Of({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),NE=uy("input",{name:"MuiInputBase",slot:"Input",overridesResolver:PE})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=Of({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 Of({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] + .${OE.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},[`&.${OE.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"})})),ME=Vg.jsx(kE,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),qE=U.forwardRef((function(e,t){var n;const r=ly({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:l,components:s={},componentsProps:c={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:p,endAdornment:f,fullWidth:h=!1,id:m,inputComponent:g="input",inputProps:v={},inputRef:b,maxRows:y,minRows:x,multiline:S=!1,name:w,onBlur:E,onChange:C,onClick:k,onFocus:R,onKeyDown:L,onKeyUp:O,placeholder:I,readOnly:T,renderSuffix:P,rows:_,slotProps:N={},slots:M={},startAdornment:q,type:z="text",value:A}=r,D=If(r,IE),j=null!=v.value?v.value:A,{current:F}=U.useRef(null!=j),B=U.useRef(),$=U.useCallback((e=>{}),[]),W=sf(B,b,v.ref,$),[H,V]=U.useState(!1),G=CE(),K=wE({props:r,muiFormControl:G,states:["color","disabled","error","hiddenLabel","size","required","filled"]});K.focused=G?G.focused:H,U.useEffect((()=>{!G&&d&&H&&(V(!1),E&&E())}),[G,d,H,E]);const Z=G&&G.onFilled,X=G&&G.onEmpty,Q=U.useCallback((e=>{!function(e,t=!1){return e&&(RE(e.value)&&""!==e.value||t&&RE(e.defaultValue)&&""!==e.defaultValue)}(e)?X&&X():Z&&Z()}),[Z,X]);tf((()=>{F&&Q({value:j})}),[j,Q,F]);U.useEffect((()=>{Q(B.current)}),[]);let J=g,Y=v;S&&"input"===J&&(Y=Of(_?{type:void 0,minRows:_,maxRows:_}:{type:void 0,maxRows:y,minRows:x},Y),J=yS);U.useEffect((()=>{G&&G.setAdornedStart(Boolean(q))}),[G,q]);const ee=Of({},r,{color:K.color||"primary",disabled:K.disabled,endAdornment:f,error:K.error,focused:K.focused,formControl:G,fullWidth:h,hiddenLabel:K.hiddenLabel,multiline:S,size:K.size,startAdornment:q,type:z}),te=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:s,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e;return Sf({root:["root",`color${Kp(n)}`,r&&"disabled",o&&"error",s&&"fullWidth",a&&"focused",l&&"formControl","small"===p&&"sizeSmall",u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},LE,t)})(ee),ne=M.root||s.Root||_E,re=N.root||c.root||{},oe=M.input||s.Input||NE;return Y=Of({},Y,null!=(n=N.input)?n:c.input),Vg.jsxs(U.Fragment,{children:[!p&&ME,Vg.jsxs(ne,Of({},re,!vy(ne)&&{ownerState:Of({},ee,re.ownerState)},{ref:t,onClick:e=>{B.current&&e.currentTarget===e.target&&B.current.focus(),k&&!K.disabled&&k(e)}},D,{className:my(te.root,re.className,l,T&&"MuiInputBase-readOnly"),children:[q,Vg.jsx(EE.Provider,{value:null,children:Vg.jsx(oe,Of({ownerState:ee,"aria-invalid":K.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:u,disabled:K.disabled,id:m,onAnimationStart:e=>{Q("mui-auto-fill-cancel"===e.animationName?B.current:{value:"x"})},name:w,placeholder:I,readOnly:T,required:K.required,rows:_,value:j,onKeyDown:L,onKeyUp:O,type:z},Y,!vy(oe)&&{as:J,ownerState:Of({},ee,Y.ownerState)},{ref:W,className:my(te.input,Y.className,T&&"MuiInputBase-readOnly"),onBlur:e=>{E&&E(e),v.onBlur&&v.onBlur(e),G&&G.onBlur?G.onBlur(e):V(!1)},onChange:(e,...t)=>{if(!F){const t=e.target||B.current;if(null==t)throw new Error(Op(1));Q({value:t.value})}v.onChange&&v.onChange(e,...t),C&&C(e,...t)},onFocus:e=>{K.disabled?e.stopPropagation():(R&&R(e),v.onFocus&&v.onFocus(e),G&&G.onFocus?G.onFocus(e):V(!0))}}))}),f,P?P(Of({},K,{startAdornment:q})):null]}))]})}));var zE=qE;function AE(e){return kf("MuiOutlinedInput",e)}var DE=Of({},OE,Rf("MuiOutlinedInput",["root","notchedOutline","input"]));const jE=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],FE={entering:{opacity:1},entered:{opacity:1}},BE=U.forwardRef((function(e,t){const n=ay(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:l,in:s,onEnter:c,onEntered:u,onEntering:d,onExit:p,onExited:f,onExiting:h,style:m,timeout:g=r,TransitionComponent:v=NS}=e,b=If(e,jE),y=U.useRef(null),x=sf(y,a.ref,t),S=e=>t=>{if(e){const n=y.current;void 0===t?e(n):e(n,t)}},w=S(d),E=S(((e,t)=>{Jw(e);const r=Yw({style:m,timeout:g,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)})),C=S(u),k=S(h),R=S((e=>{const t=Yw({style:m,timeout:g,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),L=S(f);return Vg.jsx(v,Of({appear:i,in:s,nodeRef:y,onEnter:E,onEntered:C,onEntering:w,onExit:R,onExited:L,onExiting:k,addEndListener:e=>{o&&o(y.current,e)},timeout:g},b,{children:(e,t)=>U.cloneElement(a,Of({style:Of({opacity:0,visibility:"exited"!==e||s?void 0:"hidden"},FE[e],m,a.props.style),ref:x},t))}))}));var $E=BE;function WE(e){return kf("MuiBackdrop",e)}Rf("MuiBackdrop",["root","invisible"]);const UE=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],HE=uy("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>Of({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"}))),VE=U.forwardRef((function(e,t){var n,r,o;const i=ly({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:s="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=$E,transitionDuration:g}=i,v=If(i,UE),b=Of({},i,{component:s,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return Sf({root:["root",n&&"invisible"]},WE,t)})(b),x=null!=(n=f.root)?n:u.root;return Vg.jsx(m,Of({in:p,timeout:g},v,{children:Vg.jsx(HE,Of({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:s,className:my(y.root,l,null==x?void 0:x.className),ownerState:Of({},b,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}));var GE=VE;function KE(e){return kf("MuiBadge",e)}var ZE=Rf("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);const XE=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],QE=uy("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),JE=uy("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Kp(n.anchorOrigin.vertical)}${Kp(n.anchorOrigin.horizontal)}${Kp(n.overlap)}`],"default"!==n.color&&t[`color${Kp(n.color)}`],n.invisible&&t.invisible]}})((({theme:e,ownerState:t})=>Of({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},"dot"===t.variant&&{borderRadius:4,height:8,minWidth:8,padding:0},"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}},"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}},"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}},"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ZE.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}},t.invisible&&{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}))),YE=U.forwardRef((function(e,t){var n,r,o,i,a,l;const s=ly({props:e,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:u,component:d,components:p={},componentsProps:f={},children:h,overlap:m="rectangular",color:g="default",invisible:v=!1,max:b=99,badgeContent:y,slots:x,slotProps:S,showZero:w=!1,variant:E="standard"}=s,C=If(s,XE),{badgeContent:k,invisible:R,max:L,displayValue:O}=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=yf({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:l,max:s=r}=a?i:e;return{badgeContent:l,invisible:a,max:s,displayValue:l&&Number(l)>s?`${s}+`:l}}({max:b,invisible:v,badgeContent:y,showZero:w}),I=yf({anchorOrigin:c,color:g,overlap:m,variant:E,badgeContent:y}),T=R||null==k&&"dot"!==E,{color:P=g,overlap:_=m,anchorOrigin:N=c,variant:M=E}=T?I:s,q="dot"!==M?O:void 0,z=Of({},s,{badgeContent:k,invisible:T,max:L,displayValue:q,showZero:w,anchorOrigin:N,color:P,overlap:_,variant:M}),A=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e;return Sf({root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Kp(n.vertical)}${Kp(n.horizontal)}`,`anchorOrigin${Kp(n.vertical)}${Kp(n.horizontal)}${Kp(o)}`,`overlap${Kp(o)}`,"default"!==t&&`color${Kp(t)}`]},KE,a)})(z),D=null!=(n=null!=(r=null==x?void 0:x.root)?r:p.Root)?n:QE,j=null!=(o=null!=(i=null==x?void 0:x.badge)?i:p.Badge)?o:JE,F=null!=(a=null==S?void 0:S.root)?a:f.root,B=null!=(l=null==S?void 0:S.badge)?l:f.badge,$=Iy({elementType:D,externalSlotProps:F,externalForwardedProps:C,additionalProps:{ref:t,as:d},ownerState:z,className:my(null==F?void 0:F.className,A.root,u)}),W=Iy({elementType:j,externalSlotProps:B,ownerState:z,className:my(A.badge,null==B?void 0:B.className)});return Vg.jsxs(D,Of({},$,{children:[h,Vg.jsx(j,Of({},W,{children:q}))]}))}));var eC=YE;const tC=oy(),nC=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=Xg("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Xv),a=U.forwardRef((function(e,a){const l=tb(n),s=ob(e),{className:c,component:u="div"}=s,d=Jg(s,lb);return Vg.jsx(i,Qg({as:u,ref:a,className:ab(c,o?o(r):r),theme:t&&l[t]||l},d))}));return a}({themeId:Lf,defaultTheme:tC,defaultClassName:"MuiBox-root",generateClassName:Ef.generate});var rC=nC;function oC(e){return kf("PrivateSwitchBase",e)}Rf("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const iC=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],aC=uy(aw)((({ownerState:e})=>Of({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12}))),lC=uy("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),sC=U.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:l,disableFocusRipple:s=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:h,onBlur:m,onChange:g,onFocus:v,readOnly:b,required:y=!1,tabIndex:x,type:S,value:w}=e,E=If(e,iC),[C,k]=af({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),R=CE();let L=l;R&&void 0===L&&(L=R.disabled);const O="checkbox"===S||"radio"===S,I=Of({},e,{checked:C,disabled:L,disableFocusRipple:s,edge:c}),T=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Sf({root:["root",n&&"checked",r&&"disabled",o&&`edge${Kp(o)}`],input:["input"]},oC,t)})(I);return Vg.jsxs(aC,Of({component:"span",className:my(T.root,i),centerRipple:!0,focusRipple:!s,disabled:L,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),R&&R.onFocus&&R.onFocus(e)},onBlur:e=>{m&&m(e),R&&R.onBlur&&R.onBlur(e)},ownerState:I,ref:t},E,{children:[Vg.jsx(lC,Of({autoFocus:n,checked:r,defaultChecked:a,className:T.input,disabled:L,id:O?d:void 0,name:h,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;k(t),g&&g(e,t)},readOnly:b,ref:f,required:y,ownerState:I,tabIndex:x,type:S},"checkbox"===S&&void 0===w?{}:{value:w},p)),C?o:u]}))}));var cC=sC,uC=Zw(Vg.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),dC=Zw(Vg.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),pC=Zw(Vg.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function fC(e){return kf("MuiCheckbox",e)}var hC=Rf("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]);const mC=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],gC=uy(cC,{shouldForwardProp:e=>sy(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${Kp(n.color)}`]]}})((({theme:e,ownerState:t})=>Of({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xb("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${hC.checked}, &.${hC.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${hC.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),vC=Vg.jsx(dC,{}),bC=Vg.jsx(uC,{}),yC=Vg.jsx(pC,{}),xC=U.forwardRef((function(e,t){var n,r;const o=ly({props:e,name:"MuiCheckbox"}),{checkedIcon:i=vC,color:a="primary",icon:l=bC,indeterminate:s=!1,indeterminateIcon:c=yC,inputProps:u,size:d="medium",className:p}=o,f=If(o,mC),h=s?c:l,m=s?c:i,g=Of({},o,{color:a,indeterminate:s,size:d}),v=(e=>{const{classes:t,indeterminate:n,color:r}=e;return Of({},t,Sf({root:["root",n&&"indeterminate",`color${Kp(r)}`]},fC,t))})(g);return Vg.jsx(gC,Of({type:"checkbox",inputProps:Of({"data-indeterminate":s},u),icon:U.cloneElement(h,{fontSize:null!=(n=h.props.fontSize)?n:d}),checkedIcon:U.cloneElement(m,{fontSize:null!=(r=m.props.fontSize)?r:d}),ownerState:g,ref:t,className:my(v.root,p)},f,{classes:v}))}));var SC=xC;function wC(e){return kf("MuiCircularProgress",e)}Rf("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const EC=["className","color","disableShrink","size","style","thickness","value","variant"];let CC,kC,RC,LC,OC=e=>e;const IC=44,TC=dm(CC||(CC=OC`
107
107
  0% {
108
108
  transform: rotate(0deg);
109
109
  }
@@ -130,5 +130,5 @@
130
130
  animation: ${0} 1.4s linear infinite;
131
131
  `),TC))),NC=uy("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),MC=uy("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Kp(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((({ownerState:e,theme:t})=>Of({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&um(LC||(LC=OC`
132
132
  animation: ${0} 1.4s ease-in-out infinite;
133
- `),PC))),qC=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,size:a=40,style:l,thickness:s=3.6,value:c=0,variant:u="indeterminate"}=n,d=If(n,EC),p=Of({},n,{color:o,disableShrink:i,size:a,thickness:s,value:c,variant:u}),f=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Sf({root:["root",n,`color${Kp(r)}`],svg:["svg"],circle:["circle",`circle${Kp(n)}`,o&&"circleDisableShrink"]},wC,t)})(p),h={},m={},g={};if("determinate"===u){const e=2*Math.PI*((IC-s)/2);h.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),h.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,m.transform="rotate(-90deg)"}return Vg.jsx(_C,Of({className:my(f.root,r),style:Of({width:a,height:a},m,l),ownerState:p,ref:t,role:"progressbar"},g,d,{children:Vg.jsx(NC,{className:f.svg,ownerState:p,viewBox:"22 22 44 44",children:Vg.jsx(MC,{className:f.circle,style:h,ownerState:p,cx:IC,cy:IC,r:(IC-s)/2,fill:"none",strokeWidth:s})})}))}));var zC=qC;const AC=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","open","slotProps","slots","theme"],DC=uy("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})=>Of({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),jC=uy(GE,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),FC=U.forwardRef((function(e,t){var n,r,o,i,a,l;const s=ly({name:"MuiModal",props:e}),{BackdropComponent:c=jC,BackdropProps:u,classes:d,className:p,closeAfterTransition:f=!1,children:h,container:m,component:g,components:v={},componentsProps:b={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:S=!1,disablePortal:w=!1,disableRestoreFocus:E=!1,disableScrollLock:C=!1,hideBackdrop:k=!1,keepMounted:R=!1,onBackdropClick:L,onClose:O,open:I,slotProps:T,slots:P,theme:_}=s,N=If(s,AC),[M,q]=U.useState(!0),z={container:m,closeAfterTransition:f,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:S,disablePortal:w,disableRestoreFocus:E,disableScrollLock:C,hideBackdrop:k,keepMounted:R,onBackdropClick:L,onClose:O,open:I},A=Of({},s,z,{exited:M}),D=null!=(n=null!=(r=null==P?void 0:P.root)?r:v.Root)?n:DC,j=null!=(o=null!=(i=null==P?void 0:P.backdrop)?i:v.Backdrop)?o:c,F=null!=(a=null==T?void 0:T.root)?a:b.root,B=null!=(l=null==T?void 0:T.backdrop)?l:b.backdrop;return Vg.jsx(fS,Of({slots:{root:D,backdrop:j},slotProps:{root:()=>Of({},wy(F,A),!vy(D)&&{as:g,theme:_},{className:my(p,null==F?void 0:F.className,null==d?void 0:d.root,!A.open&&A.exited&&(null==d?void 0:d.hidden))}),backdrop:()=>Of({},u,wy(B,A),{className:my(null==B?void 0:B.className,null==d?void 0:d.backdrop)})},onTransitionEnter:()=>q(!1),onTransitionExited:()=>q(!0),ref:t},N,z,{children:h}))}));var BC=FC;function $C(e){return kf("MuiDivider",e)}var WC=Rf("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const UC=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],HC=uy("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})=>Of({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)`:xb(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})=>Of({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>Of({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>Of({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>Of({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),VC=uy("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>Of({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)`}))),GC=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:l=!1,light:s=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=n,f=If(n,UC),h=Of({},n,{absolute:r,component:a,flexItem:l,light:s,orientation:c,role:u,textAlign:d,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:l,variant:s}=e;return Sf({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"]},$C,r)})(h);return Vg.jsx(HC,Of({as:a,className:my(m.root,i),role:u,ref:t,ownerState:h},f,{children:o?Vg.jsx(VC,{className:m.wrapper,ownerState:h,children:o}):null}))}));var KC=GC;function ZC(e){return kf("MuiFormControlLabel",e)}var XC=Rf("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);const QC=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],JC=uy("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${XC.label}`]:t.label},t.root,t[`labelPlacement${Kp(n.labelPlacement)}`]]}})((({theme:e,ownerState:t})=>Of({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${XC.disabled}`]:{cursor:"default"}},"start"===t.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===t.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===t.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${XC.label}`]:{[`&.${XC.disabled}`]:{color:(e.vars||e).palette.text.disabled}}}))),YC=uy("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${XC.error}`]:{color:(e.vars||e).palette.error.main}}))),ek=U.forwardRef((function(e,t){var n,r;const o=ly({props:e,name:"MuiFormControlLabel"}),{className:i,componentsProps:a={},control:l,disabled:s,disableTypography:c,label:u,labelPlacement:d="end",required:p,slotProps:f={}}=o,h=If(o,QC),m=CE(),g=null!=(n=null!=s?s:l.props.disabled)?n:null==m?void 0:m.disabled,v=null!=p?p:l.props.required,b={disabled:g,required:v};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===l.props[e]&&void 0!==o[e]&&(b[e]=o[e])}));const y=wE({props:o,muiFormControl:m,states:["error"]}),x=Of({},o,{disabled:g,labelPlacement:d,required:v,error:y.error}),S=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e;return Sf({root:["root",n&&"disabled",`labelPlacement${Kp(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]},ZC,t)})(x),w=null!=(r=f.typography)?r:a.typography;let E=u;return null==E||E.type===vE||c||(E=Vg.jsx(vE,Of({component:"span"},w,{className:my(S.label,null==w?void 0:w.className),children:E}))),Vg.jsxs(JC,Of({className:my(S.root,i),ownerState:x,ref:t},h,{children:[U.cloneElement(l,b),E,v&&Vg.jsxs(YC,{ownerState:x,"aria-hidden":!0,className:S.asterisk,children:[" ","*"]})]}))}));var tk=ek;var nk=U.createContext();function rk(e){return kf("MuiGrid",e)}const ok=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],ik=Rf("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...ok.map((e=>`grid-xs-${e}`)),...ok.map((e=>`grid-sm-${e}`)),...ok.map((e=>`grid-md-${e}`)),...ok.map((e=>`grid-lg-${e}`)),...ok.map((e=>`grid-xl-${e}`))]),ak=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function lk(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function sk({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const ck=uy("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:l,zeroMinWidth:s,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,s&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==l&&t[`wrap-xs-${String(l)}`],...d]}})((({ownerState:e})=>Of({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){return iv({theme:e},av({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${ik.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=av({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=sk({breakpoints:e.breakpoints.values,values:t})),o=iv({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{marginTop:`-${lk(i)}`,[`& > .${ik.item}`]:{paddingTop:lk(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${ik.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=av({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=sk({breakpoints:e.breakpoints.values,values:t})),o=iv({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${lk(i)})`,marginLeft:`-${lk(i)}`,[`& > .${ik.item}`]:{paddingLeft:lk(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${ik.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=av({values:t.columns,breakpoints:e.breakpoints.values}),l="object"==typeof a?a[o]:a;if(null==l)return r;const s=Math.round(n/l*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${s} + ${lk(n)})`;c={flexBasis:e,maxWidth:e}}}i=Of({flexBasis:s,flexGrow:0,maxWidth:s},c)}return 0===e.breakpoints.values[o]?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r}),{})}));const uk=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:l,breakpoints:s}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,s));const u=[];s.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Sf({root:["root",n&&"container",o&&"item",l&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]},rk,t)},dk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiGrid"}),{breakpoints:r}=ay(),o=ob(n),{className:i,columns:a,columnSpacing:l,component:s="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:p,spacing:f=0,wrap:h="wrap",zeroMinWidth:m=!1}=o,g=If(o,ak),v=p||f,b=l||f,y=U.useContext(nk),x=c?a||12:y,S={},w=Of({},g);r.keys.forEach((e=>{null!=g[e]&&(S[e]=g[e],delete w[e])}));const E=Of({},o,{columns:x,container:c,direction:u,item:d,rowSpacing:v,columnSpacing:b,wrap:h,zeroMinWidth:m,spacing:f},S,{breakpoints:r.keys}),C=uk(E);return Vg.jsx(nk.Provider,{value:x,children:Vg.jsx(ck,Of({ownerState:E,className:my(C.root,i),as:s,ref:t},w))})}));var pk=dk;const fk=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function hk(e){return`scale(${e}, ${e**2})`}const mk={entering:{opacity:1,transform:hk(1)},entered:{opacity:1,transform:"none"}},gk="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),vk=U.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:l,onEntered:s,onEntering:c,onExit:u,onExited:d,onExiting:p,style:f,timeout:h="auto",TransitionComponent:m=NS}=e,g=If(e,fk),v=U.useRef(),b=U.useRef(),y=ay(),x=U.useRef(null),S=sf(x,o.ref,t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=w(c),C=w(((e,t)=>{Jw(e);const{duration:n,delay:r,easing:o}=Yw({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[y.transitions.create("opacity",{duration:a,delay:r}),y.transitions.create("transform",{duration:gk?a:.666*a,delay:r,easing:o})].join(","),l&&l(e,t)})),k=w(s),R=w(p),L=w((e=>{const{duration:t,delay:n,easing:r}=Yw({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[y.transitions.create("opacity",{duration:o,delay:n}),y.transitions.create("transform",{duration:gk?o:.666*o,delay:gk?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=hk(.75),u&&u(e)})),O=w(d);return U.useEffect((()=>()=>{clearTimeout(v.current)}),[]),Vg.jsx(m,Of({appear:r,in:a,nodeRef:x,onEnter:C,onEntered:k,onEntering:E,onExit:L,onExited:O,onExiting:R,addEndListener:e=>{"auto"===h&&(v.current=setTimeout(e,b.current||0)),n&&n(x.current,e)},timeout:"auto"===h?null:h},g,{children:(e,t)=>U.cloneElement(o,Of({style:Of({opacity:0,transform:hk(.75),visibility:"exited"!==e||a?void 0:"hidden"},mk[e],f,o.props.style),ref:S},t))}))}));vk.muiSupportAuto=!0;var bk=vk;function yk(e){return kf("MuiIcon",e)}Rf("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const xk=["baseClassName","className","color","component","fontSize"],Sk=uy("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Kp(n.color)}`],t[`fontSize${Kp(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[t.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[t.color]}))),wk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiIcon"}),{baseClassName:r="material-icons",className:o,color:i="inherit",component:a="span",fontSize:l="medium"}=n,s=If(n,xk),c=Of({},n,{baseClassName:r,color:i,component:a,fontSize:l}),u=(e=>{const{color:t,fontSize:n,classes:r}=e;return Sf({root:["root","inherit"!==t&&`color${Kp(t)}`,`fontSize${Kp(n)}`]},yk,r)})(c);return Vg.jsx(Sk,Of({as:a,className:my(r,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t},s))}));wk.muiName="Icon";var Ek=wk;function Ck(e){return kf("MuiInputAdornment",e)}var kk,Rk=Rf("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);const Lk=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Ok=uy("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Kp(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>Of({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Rk.positionStart}&:not(.${Rk.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),Ik=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:s,variant:c}=n,u=If(n,Lk),d=CE()||{};let p=c;c&&d.variant,d&&!p&&(p=d.variant);const f=Of({},n,{hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:a,position:s,variant:p}),h=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Sf({root:["root",n&&"disablePointerEvents",o&&`position${Kp(o)}`,a,r&&"hiddenLabel",i&&`size${Kp(i)}`]},Ck,t)})(f);return Vg.jsx(EE.Provider,{value:null,children:Vg.jsx(Ok,Of({as:i,ownerState:f,className:my(h.root,o),ref:t},u,{children:"string"!=typeof r||l?Vg.jsxs(U.Fragment,{children:["start"===s?kk||(kk=Vg.jsx("span",{className:"notranslate",children:"​"})):null,r]}):Vg.jsx(vE,{color:"text.secondary",children:r})}))})}));var Tk=Ik;var Pk=U.createContext({});function _k(e){return kf("MuiList",e)}Rf("MuiList",["root","padding","dense","subheader"]);const Nk=["children","className","component","dense","disablePadding","subheader"],Mk=uy("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})=>Of({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),qk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:l=!1,subheader:s}=n,c=If(n,Nk),u=U.useMemo((()=>({dense:a})),[a]),d=Of({},n,{component:i,dense:a,disablePadding:l}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Sf({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},_k,t)})(d);return Vg.jsx(Pk.Provider,{value:u,children:Vg.jsxs(Mk,Of({as:i,className:my(p.root,o),ref:t,ownerState:d},c,{children:[s,r]}))})}));var zk=qk;function Ak(e){return kf("MuiListItem",e)}var Dk=Rf("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var jk=Rf("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Fk(e){return kf("MuiListItemSecondaryAction",e)}Rf("MuiListItemSecondaryAction",["root","disableGutters"]);const Bk=["className"],$k=uy("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})((({ownerState:e})=>Of({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0}))),Wk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,o=If(n,Bk),i=Of({},n,{disableGutters:U.useContext(Pk).disableGutters}),a=(e=>{const{disableGutters:t,classes:n}=e;return Sf({root:["root",t&&"disableGutters"]},Fk,n)})(i);return Vg.jsx($k,Of({className:my(a.root,r),ownerState:i,ref:t},o))}));Wk.muiName="ListItemSecondaryAction";var Uk=Wk;const Hk=["className"],Vk=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Gk=uy("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})=>Of({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&Of({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${jk.root}`]:{paddingRight:48}},{[`&.${Dk.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Dk.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xb(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Dk.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xb(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Dk.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"}},[`&.${Dk.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xb(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})`:xb(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48}))),Kk=uy("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Zk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:o=!1,button:i=!1,children:a,className:l,component:s,components:c={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:p}={},dense:f=!1,disabled:h=!1,disableGutters:m=!1,disablePadding:g=!1,divider:v=!1,focusVisibleClassName:b,secondaryAction:y,selected:x=!1,slotProps:S={},slots:w={}}=n,E=If(n.ContainerProps,Hk),C=If(n,Vk),k=U.useContext(Pk),R=U.useMemo((()=>({dense:f||k.dense||!1,alignItems:r,disableGutters:m})),[r,k.dense,f,m]),L=U.useRef(null);tf((()=>{o&&L.current&&L.current.focus()}),[o]);const O=U.Children.toArray(a),I=O.length&&Qp(O[O.length-1],["ListItemSecondaryAction"]),T=Of({},n,{alignItems:r,autoFocus:o,button:i,dense:R.dense,disabled:h,disableGutters:m,disablePadding:g,divider:v,hasSecondaryAction:I,selected:x}),P=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:s,hasSecondaryAction:c,selected:u}=e;return Sf({root:["root",o&&"dense",!a&&"gutters",!l&&"padding",s&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Ak,r)})(T),_=sf(L,t),N=w.root||c.Root||Gk,M=S.root||u.root||{},q=Of({className:my(P.root,M.className,l),disabled:h},C);let z=s||"li";return i&&(q.component=s||"div",q.focusVisibleClassName=my(Dk.focusVisible,b),z=aw),I?(z=q.component||s?z:"div","li"===d&&("li"===z?z="div":"li"===q.component&&(q.component="div")),Vg.jsx(Pk.Provider,{value:R,children:Vg.jsxs(Kk,Of({as:d,className:my(P.container,p),ref:_,ownerState:T},E,{children:[Vg.jsx(N,Of({},M,!vy(N)&&{as:z,ownerState:Of({},T,M.ownerState)},q,{children:O})),O.pop()]}))})):Vg.jsx(Pk.Provider,{value:R,children:Vg.jsxs(N,Of({},M,{as:z,ref:_},!vy(N)&&{ownerState:Of({},T,M.ownerState)},q,{children:[O,y&&Vg.jsx(Uk,{children:y})]}))})}));var Xk=Zk;function Qk(e){return kf("MuiListItemIcon",e)}var Jk=Rf("MuiListItemIcon",["root","alignItemsFlexStart"]);const Yk=["className"],eR=uy("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})=>Of({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),tR=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=If(n,Yk),i=Of({},n,{alignItems:U.useContext(Pk).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return Sf({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Qk,n)})(i);return Vg.jsx(eR,Of({className:my(a.root,r),ownerState:i,ref:t},o))}));var nR=tR;var rR=Rf("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const oR=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function iR(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function aR(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function lR(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 sR(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")&&lR(l,i)&&!t)return l.focus(),!0;l=o(e,l,n)}return!1}const cR=U.forwardRef((function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:l=!1,disableListWrap:s=!1,onKeyDown:c,variant:u="selectedMenu"}=e,d=If(e,oR),p=U.useRef(null),f=U.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});tf((()=>{r&&p.current.focus()}),[r]),U.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${bf(Jp(e))}px`;p.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}})),[]);const h=sf(p,t);let m=-1;U.Children.forEach(i,((e,t)=>{U.isValidElement(e)&&(e.props.disabled||("selectedMenu"===u&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=i.length&&(m=-1)))}));const g=U.Children.map(i,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===u&&(t.tabIndex=0),U.cloneElement(e,t)}return e}));return Vg.jsx(zk,Of({role:"menu",ref:h,className:a,onKeyDown:e=>{const t=p.current,n=e.key,r=Jp(t).activeElement;if("ArrowDown"===n)e.preventDefault(),sR(t,r,s,l,iR);else if("ArrowUp"===n)e.preventDefault(),sR(t,r,s,l,aR);else if("Home"===n)e.preventDefault(),sR(t,null,s,l,iR);else if("End"===n)e.preventDefault(),sR(t,null,s,l,aR);else if(1===n.length){const o=f.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&&lR(r,o);o.previousKeyMatched&&(s||sR(t,r,!1,l,iR,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1},d,{children:g}))}));var uR=cR;function dR(e){return kf("MuiPopover",e)}Rf("MuiPopover",["root","paper"]);const pR=["onEntering"],fR=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function hR(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function mR(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function gR(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function vR(e){return"function"==typeof e?e():e}const bR=uy(BC,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yR=uy(oE,{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}),xR=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:l="anchorEl",children:s,className:c,container:u,elevation:d=8,marginThreshold:p=16,open:f,PaperProps:h={},transformOrigin:m={vertical:"top",horizontal:"left"},TransitionComponent:g=bk,transitionDuration:v="auto",TransitionProps:{onEntering:b}={}}=n,y=If(n.TransitionProps,pR),x=If(n,fR),S=U.useRef(),w=sf(S,h.ref),E=Of({},n,{anchorOrigin:i,anchorReference:l,elevation:d,marginThreshold:p,PaperProps:h,transformOrigin:m,TransitionComponent:g,transitionDuration:v,TransitionProps:y}),C=(e=>{const{classes:t}=e;return Sf({root:["root"],paper:["paper"]},dR,t)})(E),k=U.useCallback((()=>{if("anchorPosition"===l)return a;const e=vR(o),t=(e&&1===e.nodeType?e:Jp(S.current).body).getBoundingClientRect();return{top:t.top+hR(t,i.vertical),left:t.left+mR(t,i.horizontal)}}),[o,i.horizontal,i.vertical,a,l]),R=U.useCallback((e=>({vertical:hR(e,m.vertical),horizontal:mR(e,m.horizontal)})),[m.horizontal,m.vertical]),L=U.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=R(t);if("none"===l)return{top:null,left:null,transformOrigin:gR(n)};const r=k();let i=r.top-n.vertical,a=r.left-n.horizontal;const s=i+t.height,c=a+t.width,u=Yp(vR(o)),d=u.innerHeight-p,f=u.innerWidth-p;if(i<p){const e=i-p;i-=e,n.vertical+=e}else if(s>d){const e=s-d;i-=e,n.vertical+=e}if(a<p){const e=a-p;a-=e,n.horizontal+=e}else if(c>f){const e=c-f;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:gR(n)}}),[o,l,k,R,p]),[O,I]=U.useState(f),T=U.useCallback((()=>{const e=S.current;if(!e)return;const t=L(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,I(!0)}),[L]);U.useEffect((()=>{f&&T()})),U.useImperativeHandle(r,(()=>f?{updatePosition:()=>{T()}}:null),[f,T]),U.useEffect((()=>{if(!f)return;const e=Xp((()=>{T()})),t=Yp(o);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[o,f,T]);let P=v;"auto"!==v||g.muiSupportAuto||(P=void 0);const _=u||(o?Jp(vR(o)).body:void 0);return Vg.jsx(bR,Of({BackdropProps:{invisible:!0},className:my(C.root,c),container:_,open:f,ref:t,ownerState:E},x,{children:Vg.jsx(g,Of({appear:!0,in:f,onEntering:(e,t)=>{b&&b(e,t),T()},onExited:()=>{I(!1)},timeout:P},y,{children:Vg.jsx(yR,Of({elevation:d},h,{ref:w,className:my(C.paper,h.className)},O?void 0:{style:Of({},h.style,{opacity:0})},{ownerState:E,children:s}))}))}))}));var SR=xR;function wR(e){return kf("MuiMenuItem",e)}var ER=Rf("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const CR=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],kR=uy(aw,{shouldForwardProp:e=>sy(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})=>Of({},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"}},[`&.${ER.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xb(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ER.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xb(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ER.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xb(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})`:xb(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ER.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ER.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${WC.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${WC.inset}`]:{marginLeft:52},[`& .${rR.root}`]:{marginTop:0,marginBottom:0},[`& .${rR.inset}`]:{paddingLeft:36},[`& .${Jk.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&Of({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Jk.root} svg`]:{fontSize:"1.25rem"}})))),RR=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:s,role:c="menuitem",tabIndex:u,className:d}=n,p=If(n,CR),f=U.useContext(Pk),h=U.useMemo((()=>({dense:i||f.dense||!1,disableGutters:l})),[f.dense,i,l]),m=U.useRef(null);tf((()=>{r&&m.current&&m.current.focus()}),[r]);const g=Of({},n,{dense:h.dense,divider:a,disableGutters:l}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return Of({},a,Sf({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},wR,a))})(n),b=sf(m,t);let y;return n.disabled||(y=void 0!==u?u:-1),Vg.jsx(Pk.Provider,{value:h,children:Vg.jsx(kR,Of({ref:b,role:c,tabIndex:y,component:o,focusVisibleClassName:my(v.focusVisible,s),className:my(v.root,d)},p,{ownerState:g,classes:v}))})}));var LR,OR=RR;const IR=["children","classes","className","label","notched"],TR=uy("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),PR=uy("legend")((({ownerState:e,theme:t})=>Of({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&Of({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))));const _R=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],NR=uy(_E,{shouldForwardProp:e=>sy(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:TE})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Of({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${DE.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${DE.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${DE.focused} .${DE.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${DE.error} .${DE.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${DE.disabled} .${DE.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&Of({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))})),MR=uy((function(e){const{className:t,label:n,notched:r}=e,o=If(e,IR),i=null!=n&&""!==n,a=Of({},e,{notched:r,withLabel:i});return Vg.jsx(TR,Of({"aria-hidden":!0,className:t,ownerState:a},o,{children:Vg.jsx(PR,{ownerState:a,children:i?Vg.jsx("span",{children:n}):LR||(LR=Vg.jsx("span",{className:"notranslate",children:"​"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),qR=uy(NE,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:PE})((({theme:e,ownerState:t})=>Of({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0}))),zR=U.forwardRef((function(e,t){var n,r,o,i,a;const l=ly({props:e,name:"MuiOutlinedInput"}),{components:s={},fullWidth:c=!1,inputComponent:u="input",label:d,multiline:p=!1,notched:f,slots:h={},type:m="text"}=l,g=If(l,_R),v=(e=>{const{classes:t}=e;return Of({},t,Sf({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},AE,t))})(l),b=CE(),y=wE({props:l,muiFormControl:b,states:["required"]}),x=Of({},l,{color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:b,fullWidth:c,hiddenLabel:y.hiddenLabel,multiline:p,size:y.size,type:m}),S=null!=(n=null!=(r=h.root)?r:s.Root)?n:NR,w=null!=(o=null!=(i=h.input)?i:s.Input)?o:qR;return Vg.jsx(zE,Of({slots:{root:S,input:w},renderSuffix:e=>Vg.jsx(MR,{ownerState:x,className:v.notchedOutline,label:null!=d&&""!==d&&y.required?a||(a=Vg.jsxs(U.Fragment,{children:[d," ","*"]})):d,notched:void 0!==f?f:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:c,inputComponent:u,multiline:p,ref:t,type:m},g,{classes:Of({},v,{notchedOutline:null})}))}));zR.muiName="Input";var AR=zR,DR=Zw(Vg.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),jR=Zw(Vg.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");const FR=uy("span")({position:"relative",display:"flex"}),BR=uy(DR)({transform:"scale(1)"}),$R=uy(jR)((({theme:e,ownerState:t})=>Of({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})})));function WR(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o=Of({},e,{checked:t});return Vg.jsxs(FR,{className:n.root,ownerState:o,children:[Vg.jsx(BR,{fontSize:r,className:n.background,ownerState:o}),Vg.jsx($R,{fontSize:r,className:n.dot,ownerState:o})]})}var UR=U.createContext(void 0);function HR(e){return kf("MuiRadio",e)}var VR=Rf("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary"]);const GR=["checked","checkedIcon","color","icon","name","onChange","size","className"],KR=uy(cC,{shouldForwardProp:e=>sy(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Kp(n.color)}`]]}})((({theme:e,ownerState:t})=>Of({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xb("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${VR.checked}`]:{color:(e.vars||e).palette[t.color].main}},{[`&.${VR.disabled}`]:{color:(e.vars||e).palette.action.disabled}})));const ZR=Vg.jsx(WR,{checked:!0}),XR=Vg.jsx(WR,{}),QR=U.forwardRef((function(e,t){var n,r;const o=ly({props:e,name:"MuiRadio"}),{checked:i,checkedIcon:a=ZR,color:l="primary",icon:s=XR,name:c,onChange:u,size:d="medium",className:p}=o,f=If(o,GR),h=Of({},o,{color:l,size:d}),m=(e=>{const{classes:t,color:n}=e;return Of({},t,Sf({root:["root",`color${Kp(n)}`]},HR,t))})(h),g=U.useContext(UR);let v=i;const b=Zp(u,g&&g.onChange);let y=c;return g&&(void 0===v&&(v=function(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}(g.value,o.value)),void 0===y&&(y=g.name)),Vg.jsx(KR,Of({type:"radio",icon:U.cloneElement(s,{fontSize:null!=(n=XR.props.fontSize)?n:d}),checkedIcon:U.cloneElement(a,{fontSize:null!=(r=ZR.props.fontSize)?r:d}),ownerState:h,classes:m,name:y,checked:v,onChange:b,ref:t,className:my(m.root,p)},f))}));var JR=QR;function YR(e){return kf("MuiTooltip",e)}var eL=Rf("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const tL=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const nL=uy(SE,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((({theme:e,ownerState:t,open:n})=>Of({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${eL.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${eL.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${eL.arrow}`]:Of({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${eL.arrow}`]:Of({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),rL=uy("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Kp(n.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>{return Of({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:xb(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(n=16/14,Math.round(1e5*n)/1e5)+"em",fontWeight:e.typography.fontWeightRegular},{[`.${eL.popper}[data-popper-placement*="left"] &`]:Of({transformOrigin:"right center"},t.isRtl?Of({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):Of({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${eL.popper}[data-popper-placement*="right"] &`]:Of({transformOrigin:"left center"},t.isRtl?Of({marginRight:"14px"},t.touch&&{marginRight:"24px"}):Of({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${eL.popper}[data-popper-placement*="top"] &`]:Of({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${eL.popper}[data-popper-placement*="bottom"] &`]:Of({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var n})),oL=uy("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:xb(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let iL=!1,aL=null,lL={x:0,y:0};function sL(e,t){return n=>{t&&t(n),e(n)}}const cL=U.forwardRef((function(e,t){var n,r,o,i,a,l,s,c,u,d,p,f,h,m,g,v,b,y,x;const S=ly({props:e,name:"MuiTooltip"}),{arrow:w=!1,children:E,components:C={},componentsProps:k={},describeChild:R=!1,disableFocusListener:L=!1,disableHoverListener:O=!1,disableInteractive:I=!1,disableTouchListener:T=!1,enterDelay:P=100,enterNextDelay:_=0,enterTouchDelay:N=700,followCursor:M=!1,id:q,leaveDelay:z=0,leaveTouchDelay:A=1500,onClose:D,onOpen:j,open:F,placement:B="bottom",PopperComponent:$,PopperProps:W={},slotProps:H={},slots:V={},title:G,TransitionComponent:K=bk,TransitionProps:Z}=S,X=If(S,tL),Q=ay(),J="rtl"===Q.direction,[Y,ee]=U.useState(),[te,ne]=U.useState(null),re=U.useRef(!1),oe=I||M,ie=U.useRef(),ae=U.useRef(),le=U.useRef(),se=U.useRef(),[ce,ue]=af({controlled:F,default:!1,name:"Tooltip",state:"open"});let de=ce;const pe=of(q),fe=U.useRef(),he=U.useCallback((()=>{void 0!==fe.current&&(document.body.style.WebkitUserSelect=fe.current,fe.current=void 0),clearTimeout(se.current)}),[]);U.useEffect((()=>()=>{clearTimeout(ie.current),clearTimeout(ae.current),clearTimeout(le.current),he()}),[he]);const me=e=>{clearTimeout(aL),iL=!0,ue(!0),j&&!de&&j(e)},ge=lf((e=>{clearTimeout(aL),aL=setTimeout((()=>{iL=!1}),800+z),ue(!1),D&&de&&D(e),clearTimeout(ie.current),ie.current=setTimeout((()=>{re.current=!1}),Q.transitions.duration.shortest)})),ve=e=>{re.current&&"touchstart"!==e.type||(Y&&Y.removeAttribute("title"),clearTimeout(ae.current),clearTimeout(le.current),P||iL&&_?ae.current=setTimeout((()=>{me(e)}),iL?_:P):me(e))},be=e=>{clearTimeout(ae.current),clearTimeout(le.current),le.current=setTimeout((()=>{ge(e)}),z)},{isFocusVisibleRef:ye,onBlur:xe,onFocus:Se,ref:we}=vf(),[,Ee]=U.useState(!1),Ce=e=>{xe(e),!1===ye.current&&(Ee(!1),be(e))},ke=e=>{Y||ee(e.currentTarget),Se(e),!0===ye.current&&(Ee(!0),ve(e))},Re=e=>{re.current=!0;const t=E.props;t.onTouchStart&&t.onTouchStart(e)},Le=ve,Oe=be,Ie=e=>{Re(e),clearTimeout(le.current),clearTimeout(ie.current),he(),fe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",se.current=setTimeout((()=>{document.body.style.WebkitUserSelect=fe.current,ve(e)}),N)},Te=e=>{E.props.onTouchEnd&&E.props.onTouchEnd(e),he(),clearTimeout(le.current),le.current=setTimeout((()=>{ge(e)}),A)};U.useEffect((()=>{if(de)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||ge(e)}}),[ge,de]);const Pe=sf(E.ref,we,ee,t);G||0===G||(de=!1);const _e=U.useRef(),Ne={},Me="string"==typeof G;R?(Ne.title=de||!Me||O?null:G,Ne["aria-describedby"]=de?pe:null):(Ne["aria-label"]=Me?G:null,Ne["aria-labelledby"]=de&&!Me?pe:null);const qe=Of({},Ne,X,E.props,{className:my(X.className,E.props.className),onTouchStart:Re,ref:Pe},M?{onMouseMove:e=>{const t=E.props;t.onMouseMove&&t.onMouseMove(e),lL={x:e.clientX,y:e.clientY},_e.current&&_e.current.update()}}:{}),ze={};T||(qe.onTouchStart=Ie,qe.onTouchEnd=Te),O||(qe.onMouseOver=sL(Le,qe.onMouseOver),qe.onMouseLeave=sL(Oe,qe.onMouseLeave),oe||(ze.onMouseOver=Le,ze.onMouseLeave=Oe)),L||(qe.onFocus=sL(ke,qe.onFocus),qe.onBlur=sL(Ce,qe.onBlur),oe||(ze.onFocus=ke,ze.onBlur=Ce));const Ae=U.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(te),options:{element:te,padding:4}}];return null!=(e=W.popperOptions)&&e.modifiers&&(t=t.concat(W.popperOptions.modifiers)),Of({},W.popperOptions,{modifiers:t})}),[te,W]),De=Of({},S,{isRtl:J,arrow:w,disableInteractive:oe,placement:B,PopperComponentProp:$,touch:re.current}),je=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e;return Sf({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Kp(i.split("-")[0])}`],arrow:["arrow"]},YR,t)})(De),Fe=null!=(n=null!=(r=V.popper)?r:C.Popper)?n:nL,Be=null!=(o=null!=(i=null!=(a=V.transition)?a:C.Transition)?i:K)?o:bk,$e=null!=(l=null!=(s=V.tooltip)?s:C.Tooltip)?l:rL,We=null!=(c=null!=(u=V.arrow)?u:C.Arrow)?c:oL,Ue=by(Fe,Of({},W,null!=(d=H.popper)?d:k.popper,{className:my(je.popper,null==W?void 0:W.className,null==(p=null!=(f=H.popper)?f:k.popper)?void 0:p.className)}),De),He=by(Be,Of({},Z,null!=(h=H.transition)?h:k.transition),De),Ve=by($e,Of({},null!=(m=H.tooltip)?m:k.tooltip,{className:my(je.tooltip,null==(g=null!=(v=H.tooltip)?v:k.tooltip)?void 0:g.className)}),De),Ge=by(We,Of({},null!=(b=H.arrow)?b:k.arrow,{className:my(je.arrow,null==(y=null!=(x=H.arrow)?x:k.arrow)?void 0:y.className)}),De);return Vg.jsxs(U.Fragment,{children:[U.cloneElement(E,qe),Vg.jsx(Fe,Of({as:null!=$?$:SE,placement:B,anchorEl:M?{getBoundingClientRect:()=>({top:lL.y,left:lL.x,right:lL.x,bottom:lL.y,width:0,height:0})}:Y,popperRef:_e,open:!!Y&&de,id:pe,transition:!0},ze,Ue,{popperOptions:Ae,children:({TransitionProps:e})=>Vg.jsx(Be,Of({timeout:Q.transitions.duration.shorter},e,He,{children:Vg.jsxs($e,Of({},Ve,{children:[G,w?Vg.jsx(We,Of({},Ge,{ref:ne})):null]}))}))}))]})}));var uL=cL;const[dL,pL]=Tw({}),[fL,hL]=Tw({}),[mL,gL]=Tw({}),[vL,bL]=Tw({}),[yL,xL]=Tw({}),[,SL]=Tw({}),wL=e=>{let{type:t,value:n}=e;const r=SL.get(n.id);SL.set(n.id,{});const o=()=>{hL.clear(n.id),xL.set(n.id,{}),xL.dispatch(!0)},i=()=>{n.removeListener("changed",o),pL.clear(n.id),hL.clear(n.id),gL.clear(n.id),bL.clear(n.id),xL.clear(n.id),SL.clear(n.id)};if("SET"===t)r||(n.on("changed",o),n.once("closed",(()=>{i()})));return i},[EL,CL]=Tw({},wL);function kL(e,t){const n=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[r]=EL(),[o]=mL(),[i,a]=U.useState();let l;n&&(l=o.get(n));for(var s=arguments.length,c=new Array(s>2?s-2:0),u=2;u<s;u++)c[u-2]=arguments[u];return U.useEffect((()=>{if(!t)return;(async()=>{if(!l){const r=t.createSessionObject(e);l=r,o.set(n,l)}const i=await l;r.set(n,i),a(i)})()}),[t,...c]),[i]}const RL={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function LL(e){return kL(RL,e)}const OL=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let a;switch(t.type){case"INVALID":a=i(i({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":a={result:i({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":a=i(i({},e),{},{invalid:!0,valid:!1,validating:!1,canCancel:!1,canRetry:!0,rpcRetry:!1});break;default:throw new Error("Undefined action")}let l=n.get(r);return l||(l={}),l[o]=a,n.set(r,l),a};function IL(e,t){const n=e?"".concat(e.id):null,[r]=dL(),[o,i]=U.useReducer(OL,n?r.get(n):null),[a]=yL(),[l]=fL();let s;n&&(s=l.get(n),s||(s={},l.set(n,s)));const c=async o=>{let a=s[t];if(!a||a&&a.rpcRetry){a={rpc:e[t](),rpcRetry:!1},s[t]=a,i({type:"INVALID",method:t,key:n,model:e,rpcResultStore:r,canCancel:!0})}try{const o=await a.rpc;i({type:"VALID",result:o,key:n,method:t,model:e,rpcResultStore:r})}catch(e){15!==e.code||o||(a.rpcRetry||(a.rpcRetry=!0),c(!0))}},u={cancel:async()=>{const o=e.session.getObjectApi({handle:-1});await o.cancelRequest(s[t].rpc.requestId),i({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:r})},retry:()=>{s[t].rpcRetry=!0,c()}};return U.useEffect((()=>{e&&c()}),[e,a.get(e&&e.id),n,t]),[o&&o.result,{validating:o&&o.validating,canCancel:o&&o.canCancel,canRetry:o&&o.canRetry},u]}function TL(e){return IL(e,"getLayout")}function PL(e){return IL(e,"getAppLayout")}function _L(){const[e,t]=U.useState(),[n,r]=U.useState(),o=U.useCallback((e=>{e&&t(e)}),[]),i=()=>{const{left:t,top:n,width:o,height:i}=e.getBoundingClientRect();r({left:t,top:n,width:o,height:i})};return U.useLayoutEffect((()=>{if(e){if("function"==typeof ResizeObserver){let t=new ResizeObserver(i);return t.observe(e),()=>{t.unobserve(e),t.disconnect(e),t=null}}return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}}}),[e]),[o,n,e]}function NL(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function ML(e){let{size:t,style:n={},viewBox:r="0 0 16 16",shapes:o=[]}=e;const a=i({fontSize:NL(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},n);return H.createElement("i",{style:a},H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.map(((e,t)=>{let{type:n,attrs:r}=e;return H.createElement(n,l({key:t},r))}))))}var qL=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M9.41421356,8 L11.8890873,5.52512627 C12.065864,5.34834957 12.0305087,4.95944084 11.8183766,4.74730881 L11.2526912,4.18162338 C11.0405592,3.96949135 10.6516504,3.93413601 10.4748737,4.1109127 L8,6.58578644 L5.52512627,4.1109127 C5.34834957,3.93413601 4.95944084,3.96949135 4.74730881,4.18162338 L4.25233406,4.67659813 C3.96949135,4.95944084 3.93413601,5.34834957 4.1109127,5.52512627 L6.58578644,8 L4.1109127,10.4748737 C3.93413601,10.6516504 3.96949135,11.0405592 4.18162338,11.2526912 L4.67659813,11.7476659 C4.95944084,12.0305087 5.34834957,12.065864 5.52512627,11.8890873 L8,9.41421356 L10.4748737,11.8890873 C10.6516504,12.065864 11.0405592,12.0305087 11.2526912,11.8183766 L11.8183766,11.2526912 C12.0305087,11.0405592 12.065864,10.6516504 11.8890873,10.4748737 L9.41421356,8 Z M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z"}}]}))(e));var zL=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10ZM3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0v1.652ZM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9Zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0Z"}}]}))(e));var AL=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M2.5,7 L11,7 C11.5522847,7 12,7.44771525 12,8 L12,15 C12,15.5522847 11.5522847,16 11,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,8 C0,7.44771525 0.44771525,7 1,7 L1,4.98151367 C1,2.23029964 3.23857625,0 6,0 C8.4241995,0 10.4454541,1.71883353 10.9029715,4 L9.34209114,4 C8.9671727,2.54028848 7.9088888,1.5 6,1.5 C3.54860291,1.5 2.5,3.21561511 2.5,5.33193359 L2.5,7 Z"}}]}))(e));var DL=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},jL=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),FL=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},BL=function(e){function t(){var e,n,r;DL(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=FL(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},FL(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),jL(t,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,a=void 0===i?10:i,l=n.threshold,s=void 0===l?15:l,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],l=null,s=null,c=o;c<=i;c++)t(c)?null!==s&&(a.push(l,s),l=s=null):(s=c,null===l&&(l=c));if(null!==s){for(var u=Math.min(Math.max(s,l+r-1),n-1),d=s+1;d<=u&&!t(d);d++)s=d;a.push(l,s)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var p=a[0]-1;if(t(p))break;a[0]=p}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-s),stopIndex:Math.min(o-1,t+s)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],a=n(o,i);null!=a&&a.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:o,stopIndex:i})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(o,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}}))},o=0;o<e.length;o+=2)r(o)}}]),t}(U.PureComponent);const $L=["S","XS"],WL=e=>e.reduce(((e,t)=>e.concat(t)));function UL(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[t]=e;return n=t.qState,!!$L.includes(n)&&t.qElemNumber;var n}));return t.filter((e=>!1!==e))}));return WL(t)}async function HL(e){let{selections:t,elemNumbers:n,toggle:r,isSingleSelect:o}=e;if(0===n.length)return!1;let i=!1;if(!n.some((e=>Number.isNaN(e)))){const e=n;try{i=!1!==await t.select({method:"selectListObjectValues",params:["/qListObjectDef",e,r]})}catch(e){i=!1}i||(o?t.cancel():t.clear())}return i}const VL="RowColumn",GL={row:"".concat(VL,"-row"),rowBorderBottom:"".concat(VL,"-rowBorderBottom"),column:"".concat(VL,"-column"),fieldRoot:"".concat(VL,"-fieldRoot"),cell:"".concat(VL,"-cell"),labelText:"".concat(VL,"-labelText"),labelDense:"".concat(VL,"-labelDense"),highlighted:"".concat(VL,"-highlighted"),checkboxLabel:"".concat(VL,"-checkboxLabel"),icon:"".concat(VL,"-icon"),S:"".concat(VL,"-S"),XS:"".concat(VL,"-XS"),A:"".concat(VL,"-A"),X:"".concat(VL,"-X"),frequencyCount:"".concat(VL,"-frequencyCount"),barContainer:"".concat(VL,"-barContainer"),bar:"".concat(VL,"-bar"),barSelected:"".concat(VL,"-barSelected"),barWithCheckbox:"".concat(VL,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(VL,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(VL,"-excludedTextWithCheckbox")},KL=".".concat(GL.fieldRoot),ZL=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function XL(e){var t,n;let{selectionState:r,selections:o,checkboxes:i=!1,doc:a=document,loaderRef:l}=e;const s=U.useRef({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});U.useEffect((()=>{var e,t;if(null===(e=l.current)||void 0===e||null===(t=e._listRef)||void 0===t||!t._outerRef)return;const n=e=>e.preventDefault(),r=e=>e.preventDefault(),o=e=>e.preventDefault(),i=l.current._listRef._outerRef;return i.addEventListener("gesturestart",n),i.addEventListener("gesturechange",r),i.addEventListener("gestureend",o),()=>{i.removeEventListener("gesturestart",n),i.removeEventListener("gesturechange",r),i.removeEventListener("gestureend",o)}}),[null===(t=l.current)||void 0===t||null===(n=t._listRef)||void 0===n?void 0:n._outerRef]);const c=()=>(r.setSelectableValuesUpdating(),HL({selections:o,elemNumbers:s.current.elemNumbers,isSingleSelect:r.isSingleSelect,toggle:s.current.toggle})),u=(e,t)=>{const n=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[{qElemNumber:t}]=e;return t}));return t}));return WL(t)}(r.enginePages);return function(e,t){if(!e)return[];if(e.length<=1)return e;const{min:n,max:r}=function(e,t){let n=1/0,r=-1/0;return e.forEach((e=>{const o=t.indexOf(e);n=o<n?o:n,r=o>r?o:r})),{min:n,max:r}}(e,t);return t.slice(n,r+1)}([e,t],n)},d=e=>{const{startElemNumber:t}=s.current;if(t===e)return;const n=u(s.current.startElemNumber,e);r.updateItems(n,!0,s.current.elemNumbers)},p=U.useCallback((e=>{if(r.selectDisabled())return;const t=+e.target.getAttribute("data-n"),n=!r.isSingleSelect&&ZL(e.nativeEvent);s.current.elemNumbers=[t],s.current.toggle=n,n||r.clearItemStates(!0),r.updateItem(t),s.current.active=!1,c()}),[]),f=U.useCallback((e=>{if(0!==e.button||r.selectDisabled())return;const t=+e.currentTarget.getAttribute("data-n"),n=!r.isSingleSelect&&ZL(e);s.current.isRange=!1,s.current.startElemNumber=t,s.current.elemNumbers=[t],s.current.toggle=n,s.current.active=!0,n||r.clearItemStates(!0),r.updateItem(t),r.isSingleSelect&&(s.current.active=!1,c()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(e,e.currentTarget)}),[]),h=U.useCallback((e=>{if(0===e.button&&s.current.active){if(s.current.active=!1,s.current.isRange){const t=+e.currentTarget.getAttribute("data-n");d(t)}c()}}),[]),m=U.useCallback((e=>{0===e.button&&s.current.active&&(s.current.active=!1,c())}),[]),g=U.useCallback((e=>{if(!s.current.active)return;s.current.isRange||(s.current.isRange=!0,r.isSelected(s.current.startElemNumber)||(r.updateItem(s.current.startElemNumber,!0),s.current.elemNumbers=[]));const t=+e.currentTarget.getAttribute("data-n");d(t)}),[]),v=U.useCallback((e=>{var t,n,o,i;if(s.current.active||s.current.isRange||r.isSingleSelect||e.touches.length<=1)return;if(e.touches.length>2)return void c();const a=Number(null===(t=e.touches[0].target)||void 0===t||null===(n=t.closest(KL))||void 0===n?void 0:n.getAttribute("data-n")),l=Number(null===(o=e.touches[1].target)||void 0===o||null===(i=o.closest(KL))||void 0===i?void 0:i.getAttribute("data-n"));if(Number.isNaN(a)||Number.isNaN(a))return void c();s.current.active=!0;u(a,l).length<7&&(s.current.touchRangeSmall=!0),s.current.elemNumbers=[],s.current.touchElemNumbers=[a,l]}),[]),b=U.useCallback((()=>{if(2!==s.current.touchElemNumbers.length)return;if(s.current.touchRangeSmall)return s.current.touchRangeSmall=!1,s.current.touchElemNumbers=[],void(s.current.active=!1);const[e,t]=s.current.touchElemNumbers;s.current.startElemNumber=e,d(t),s.current.touchElemNumbers=[],s.current.active=!1,s.current.toggle=!0,c()}),[]);U.useEffect((()=>(a.addEventListener("mouseup",m),()=>{a.removeEventListener("mouseup",m)})),[m]),U.useEffect((()=>{const e=()=>{r.clearItemStates(!1)},t=()=>{r.clearItemStates(!0),r.triggerStateChanged()};return o.on("clearItemStates",e),o.on("deactivated",e),o.on("cleared",t),()=>{o.removeListener("clearItemStates",e),o.removeListener("deactivated",e),o.removeListener("cleared",t)}}),[o]);const y={};return i?Object.assign(y,{onChange:p}):Object.assign(y,{onMouseUp:h,onMouseDown:f,onMouseEnter:g,onTouchStart:v,onTouchEnd:b}),{interactionEvents:y,select:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const i=!r.isSingleSelect&&ZL(null==n?void 0:n.nativeEvent);i||r.clearItemStates(!0);const a=[];return r.updateItems(e,t,a),r.setSelectableValuesUpdating(),HL({selections:o,elemNumbers:t?a:e,isSingleSelect:r.isSingleSelect,toggle:i})}}}const QL=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var JL=e=>ML(QL(e));const YL=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,eO=e=>e?"A"===e.qState:null,tO=e=>{let{cell:t,checkboxes:n}=e;return(eO(t)||YL(t))&&n},nO=e=>e.filter((e=>!!e)).join(" ").trim(),rO=e=>e||"-",oO=e=>{let{theme:t}=e;return{background:t.palette.selected.main,color:t.palette.selected.mainContrastText,"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder),outline:"none"},"& $cell":{paddingRight:0}}},iO={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},aO=uy("div",{shouldForwardProp:e=>!["flexBasisProp","isGridMode","isGridCol","dense","frequencyWidth","direction"].includes(e)})((e=>{var t,n,r,o,a,l,s,c,u,d;let{theme:p,flexBasisProp:f,isGridMode:h,isGridCol:m,dense:g,frequencyWidth:v,direction:b}=e;return{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(p.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"},"& .value":{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(p.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(GL.row)]:{flexWrap:"nowrap",color:null!==(t=null===(n=p.listBox)||void 0===n||null===(r=n.content)||void 0===r?void 0:r.color)&&void 0!==t?t:p.palette.text.primary},["& .".concat(GL.rowBorderBottom)]:{borderBottom:m?"none":"1px solid ".concat(p.palette.divider),borderLeft:m?"1px solid ".concat(p.palette.divider):"none"},["& .".concat(GL.column)]:{flexWrap:"nowrap",borderRight:"1px solid ".concat(p.palette.divider),color:null!==(o=null===(a=p.listBox)||void 0===a||null===(l=a.content)||void 0===l?void 0:l.color)&&void 0!==o?o:p.palette.text.primary},["& .".concat(GL.cell)]:{display:"flex",alignItems:"center",minWidth:0,flexGrow:1,paddingLeft:"".concat(9,"px"),paddingRight:0},["& .".concat(GL.labelText)]:i(i({flexBasis:f,lineHeight:"16px",userSelect:"none",paddingRight:"1px"},iO),{},{fontSize:null===(s=p.listBox)||void 0===s||null===(c=s.content)||void 0===c?void 0:c.fontSize,fontFamily:null===(u=p.listBox)||void 0===u||null===(d=u.content)||void 0===d?void 0:d.fontFamily}),["& .".concat(GL.labelDense)]:{fontSize:12},["& .".concat(GL.highlighted)]:{backgroundColor:"#FFC72A"},["& .".concat(GL.checkboxLabel)]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":i(i({},iO),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},["& .".concat(GL.icon)]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24},["& .".concat(GL.S)]:i(i({},oO({theme:p})),{},{border:h?"none":void 0}),["& .".concat(GL.XS)]:i(i({},oO({theme:p})),{},{background:p.palette.selected.excluded,color:p.palette.selected.excludedContrastText,border:h?"none":void 0}),["& .".concat(GL.A)]:{background:p.palette.selected.alternative,color:p.palette.selected.alternativeContrastText,border:h?"none":void 0},["& .".concat(GL.X)]:{background:p.palette.selected.excluded,color:p.palette.selected.excludedContrastText,border:h?"none":void 0},["& .".concat(GL.frequencyCount)]:i(i({justifyContent:"flex-end"},iO),{},{flex:"0 1 ".concat(v,"px"),textAlign:"rtl"===b?"left":"right",paddingLeft:"2px"}),["&.".concat(GL.barContainer)]:{height:"100%",display:"flex",alignItems:"center"},["& .".concat(GL.bar)]:{height:g?"16px":"20px",position:"absolute",zIndex:"-1",alignSelf:"center",left:4,width:"calc(100% - ".concat(8,"px)"),display:"flex",alignItems:"center","& .bar-filled":{border:"".concat(1,"px solid"),borderColor:"#D9D9D9",transition:"width 0.2s",backgroundColor:"#FAFAFA",height:"100%"}},["& .".concat(GL.barSelected)]:{zIndex:"0","& .bar-filled":{opacity:"30%",background:p.palette.background.lighter}},["& .".concat(GL.barWithCheckbox)]:{left:"rtl"===b?4:29,width:"calc(100% - ".concat(33,"px)")},["& .".concat(GL.barSelectedWithCheckbox)]:{"& .bar-filled":{background:"#BFE5D0",borderColor:"#BFE5D0"}},["& .".concat(GL.excludedTextWithCheckbox)]:{color:"#828282",fontStyle:"italic"}}}));var lO=H.memo(aO);const sO="ListBoxCheckbox",cO={cbIcon:"".concat(sO,"-cbIcon"),cbIconChecked:"".concat(sO,"-cbIconChecked"),cbIconExcluded:"".concat(sO,"-cbIconExcluded"),cbIconAlternative:"".concat(sO,"-cbIconAlternative"),checkbox:"".concat(sO,"-checkbox"),dense:"".concat(sO,"-dense")},uO=uy(SC)((e=>{let{theme:t}=e;return{["& .".concat(cO.cbIcon)]:{borderRadius:3,width:16,height:16,boxShadow:"inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)",backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))",display:"flex",alignItems:"center",justifyContent:"center"},["& .".concat(cO.cbIconChecked)]:{borderRadius:3,backgroundColor:t.palette.selected.main,backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}},["& .".concat(cO.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.excluded},["& .".concat(cO.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.alternative},["&.".concat(cO.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(cO.dense)]:{padding:"4px 8px"}}})),dO=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return H.createElement("span",{className:e.cbIcon},n&&H.createElement("span",{className:t&&n?e.cbIconExcluded:""}))};function pO(e){let{onChange:t,checked:n,label:r,dense:o,excluded:i,showGray:a=!0,dataN:l}=e;return H.createElement(uO,{edge:"start",onChange:t,checked:n,disableRipple:!0,className:[cO.checkbox,o&&cO.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":r,"data-n":l},name:r,icon:dO(cO,a,i),checkedIcon:H.createElement("span",{className:cO.cbIconChecked})})}const fO="ListBoxRadioButton",hO={denseRadioButton:"".concat(fO,"-denseRadioButton"),radioButton:"".concat(fO,"-radioButton")},mO=uy(JR)((e=>{let{theme:t,checked:n}=e;return{["&.".concat(hO.radioButton)]:{right:"5px",color:n?t.palette.selected.main:t.palette.main}}}));function gO(e){let{onChange:t,checked:n,label:r,dense:o,dataN:i}=e;return H.createElement(mO,{checked:n,onChange:t,value:r,name:r,className:hO.radioButton,inputProps:{"data-n":i},style:{backgroundColor:"transparent"},disableRipple:!0,size:o?"small":"medium",sx:o&&{padding:"0px 0px 0px 12px"}})}function vO(e){let{label:t,color:n,dense:r,showGray:o=!0,checkboxes:i,cell:a,valueTextAlign:l}=e;return H.createElement(vE,{component:"span",variant:"body2",className:nO([GL.labelText,r&&GL.labelDense,o&&tO({cell:a,checkboxes:i})&&GL.excludedTextWithCheckbox]),color:n,align:l,dir:"auto"},H.createElement("span",null,t))}function bO(e){let{label:t,color:n,dense:r,showGray:o,checkboxes:i,cell:a,valueTextAlign:l}=e;return"string"==typeof t?H.createElement(vO,{label:t,color:n,dense:r,showGray:o,checkboxes:i,cell:a,valueTextAlign:l}):t}function yO(e){let{onChange:t,label:n,color:r,qElemNumber:o,isSelected:i,dense:a,cell:l,isGridCol:s,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:p}=e;const f=H.createElement(pO,{onChange:t,label:n,checked:i,dense:a,excluded:YL(l),isGridCol:s,showGray:c,dataN:o}),h=H.createElement(gO,{onChange:t,label:n,checked:i,dense:a,dataN:o});return H.createElement(tk,{color:r,control:u?h:f,className:GL.checkboxLabel,label:H.createElement(bO,{label:n,color:r,dense:a,showGray:c,checkboxes:d,cell:l,valueTextAlign:p}),key:o})}function xO(e){let{labels:t,dense:n,showGray:r,checkboxes:o}=e;const i=t.map(((e,t)=>{let[n,r]=e;return H.createElement("span",{id:t,className:r?GL.highlighted:""},n)}));return H.createElement(vO,{label:i,dense:n,showGray:r,checkboxes:o})}function SO(e){let{onChange:t,labels:n,checkboxes:r,dense:o,showGray:i,color:a,qElemNumber:l,isSelected:s,cell:c,isGridCol:u,isSingleSelect:d,valueTextAlign:p}=e;const f=H.createElement(xO,{labels:n,dense:o,showGray:i,checkboxes:r});return r?H.createElement(yO,{onChange:t,label:f,color:a,qElemNumber:l,isSelected:s,dense:o,cell:c,isGridCol:u,showGray:i,isSingleSelect:d,checkboxes:r,valueTextAlign:p}):f}var wO=H.memo((function(e){let{onChange:t,label:n,color:r,qElemNumber:o,isSelected:i,dense:a,cell:l,isGridCol:s,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:p}=e;return d?H.createElement(yO,{onChange:t,label:n,color:r,qElemNumber:o,isSelected:i,dense:a,cell:l,isGridCol:s,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:p}):H.createElement(vO,{label:n,color:r,dense:a,showGray:!0,checkboxes:d,cell:l,valueTextAlign:p})}));function EO(e){let{qFrequency:t,histogram:n,checkboxes:r,isSelected:o,frequencyMax:i}=e;if(!(t&&n&&"-"!==rO(t)))return;const a=(e=>{let{qFrequency:t,frequencyMax:n}=e;const r=String(t),o="%"===r.substring(r.length-1),i=parseFloat(o?r:t);return"".concat(o?i:i/n*100,"%")})({qFrequency:t,checkboxes:r,frequencyMax:i});return H.createElement(rC,{className:nO([GL.bar,r&&GL.barWithCheckbox,o&&(r?GL.barSelectedWithCheckbox:GL.barSelected)])},H.createElement(rC,{className:"bar-filled",width:a}))}function CO(e){let{cell:t,checkboxes:n,dense:r,showGray:o}=e;const i=rO(null==t?void 0:t.qFrequency);return H.createElement(pk,{item:!0,style:{display:"flex",alignItems:"center"},className:GL.frequencyCount,"aria-label":i},H.createElement(vE,{noWrap:!0,color:"inherit",variant:"body2",className:nO([r&&GL.labelDense,GL.labelText,o&&tO({cell:t,checkboxes:n})&&GL.excludedTextWithCheckbox])},i))}function kO(e){let{dataLayout:t,layoutOrder:n,itemPadding:r}=e;if("singleColumn"===t)return{height:"100%",width:"100%"};switch(n){case"row":case"column":return{height:"calc(100% - ".concat(r,"px)"),width:"calc(100% - ".concat(2*r,"px)"),position:"absolute",left:4};default:return{}}}const RO=uy(pk,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction"].includes(e)})((e=>{let{dataLayout:t,layoutOrder:n,itemPadding:r,cellPaddingRight:o,direction:a}=e;const l="padding".concat("rtl"===a?"Left":"Right");return{["&.".concat(GL.fieldRoot)]:i(i({},kO({dataLayout:t,layoutOrder:n,itemPadding:r})),{},{[l]:o?"8px":void 0})}}));const LO={S:"Object.Listbox.Selected",A:"Object.Listbox.Alternative",O:"Object.Listbox.Optional",XS:"Object.Listbox.SelectedExcluded",L:"Object.Listbox.Locked",X:"Object.Listbox.Excluded",XL:"Object.Listbox.ExcludedLock"};function OO(e){var t;let{layout:n}=e;const{translator:r}=U.useContext(Iw),{qStateCounts:o={}}=(null==n||null===(t=n.qListObject)||void 0===t?void 0:t.qDimensionInfo)||{},i=o.qSelected+o.qSelectedExcluded+o.qLocked+o.qLockedExcluded;let a;switch(i){case 0:a="ScreenReader.ZeroSelected";break;case 1:a="ScreenReader.OneSelected";break;default:a="ScreenReader.ManySelected"}const l=r.get(a,[i]);return H.createElement("div",{className:"screenReaderOnly","aria-live":"assertive"},l)}const IO=Object.freeze({ENTER:13,ESCAPE:27,SPACE:32,TAB:9,BACKSPACE:8,DELETE:46,ALT:18,CTRL:17,SHIFT:16,ARROW_UP:38,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,PAGE_DOWN:34,PAGE_UP:33,HOME:36,END:35,F10:121,A:65,F:70,ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,SUBTRACTION:189,DECIMAL:190,NUMPAD_DECIMAL:110,isArrow:e=>e===IO.ARROW_UP||e===IO.ARROW_DOWN||e===IO.ARROW_LEFT||e===IO.ARROW_RIGHT}),TO=e=>+e.getAttribute("data-n"),PO=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},_O=e=>{const t=null==e?void 0:e.querySelector(".value.last-focused, .value.selector, .value");return null==t||t.setAttribute("tabIndex",0),null==t||t.focus(),t},NO=e=>{let{rowIndex:t,columnIndex:n,rowCount:r,columnCount:o,layoutOrder:i,keyCode:a,numCells:l}=e;const s=e=>{let t;return"row"===i?(t=l%o,e<t?r:r-1):(t=l%r,e<o-1?r:t)};let c=t,u=n;if(a===IO.ARROW_DOWN)if(t>=s(n)-1){if(n===o-1)return-1;c=0,u=n+1}else c=t+1;else if(0===t){if(0===n)return-1;c=s(n-1)-1,u=n-1}else c=t-1;if("row"===i)return c*o+u;const d=l%r;return 0===d||c<d?c*o+u:(c-d)*(o-1)+u+d*o};function MO(e){var t,n,r;let{index:o,rowIndex:a,columnIndex:l,style:s,data:c}=e;const{onChange:u,onClick:d,onMouseDown:p,onMouseUp:f,onMouseEnter:h,onTouchStart:m,onTouchEnd:g,pages:v,isLocked:b,column:y=!1,checkboxes:x=!1,textAlign:S,direction:w,layoutOptions:E={},freqIsAllowed:C,isSingleSelect:k,actions:R,frequencyMax:L="",histogram:O=!1,keyboard:I,showGray:T=!0,showTick:P=!0,columnCount:_=1,rowCount:N=1,dataOffset:M,focusListItems:q,listCount:z,itemPadding:A,frequencyWidth:D,translator:j,showSearch:F,isModal:B}=c,{dense:$=!1,dataLayout:W="singleColumn",layoutOrder:V}=E;let G,K;const Z={max:null,currentIndex:null};if("number"==typeof a&&"number"==typeof l){"row"===V?(G=a*_+l,Z.max=N,Z.currentIndex=a):(G=l*N+a,Z.max=_,Z.currentIndex=l);const e=0;K=i(i({},s),{},{left:e+(0===l?s.left:Number(s.left)+l*e),top:0===a?s.top:Number(s.top)+a*e})}else G=o,Z.max=z,Z.currentIndex=o,K=i({},s);G+=M;const[X,Q]=U.useState(null);U.useEffect((()=>{null!==X&&(0===Z.currentIndex&&q.first&&(X.focus(),q.setFirst(!1)),Z.currentIndex===Z.max-1&&q.last&&(X.focus(),q.setLast(!1)))}),[X,q.first,q.last]);const J=U.useCallback(function(e){let{select:t,selectAll:n,onCtrlF:r,confirm:o,cancel:i,setScrollPosition:a,focusListItems:l,keyboard:s,isModal:c,rowCount:u,columnCount:d,rowIndex:p,columnIndex:f,layoutOrder:h}=e;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e===IO.ARROW_LEFT||e===IO.ARROW_RIGHT||"number"!=typeof p||"number"!=typeof f){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=NO({rowIndex:p,columnIndex:f,rowCount:u,columnCount:d,layoutOrder:h,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let g=!1;const v=e=>{g=e};return e=>{let u;const{currentTarget:d,nativeEvent:p}=e,{keyCode:f,shiftKey:h=!1,ctrlKey:b=!1,metaKey:y=!1}=p;switch(f){case IO.TAB:{const e=d.closest(".listbox-container"),t=c();if(d.classList.add("last-focused"),h){PO(e)||(t?s.focusSelection():s.blur(!0));break}t?s.focusSelection():(d.blur(),s.blur());break}case IO.SHIFT:v(!0);break;case IO.SPACE:t([TO(d)],!1,e);break;case IO.ARROW_DOWN:case IO.ARROW_RIGHT:u=m(f,d,!0),h&&u&&(g&&(t([TO(d)],!0),v(!1)),t([TO(u)],!0));break;case IO.ARROW_UP:case IO.ARROW_LEFT:u=m(f,d,!1),h&&u&&(g&&(t([TO(d)],!0),v(!1)),t([TO(u)],!0));break;case IO.ENTER:o();break;case IO.ESCAPE:if(!c())return;i();break;case IO.HOME:if(l.setFirst(!0),b){null==a||a("overflowStart");break}null==a||a("start");break;case IO.END:if(l.setLast(!0),b){null==a||a("overflowEnd");break}null==a||a("end");break;case IO.A:if(b||y){n();break}return;case IO.F:if(b||y){r();break}return;default:return}u&&u.focus(),e.preventDefault(),e.stopPropagation()}}(i(i({},R),{},{focusListItems:q,keyboard:I,isModal:B,rowCount:N,columnCount:_,rowIndex:a,columnIndex:l,layoutOrder:V})),[R,null==I?void 0:I.innerTabStops,N,_,a,l,V]),Y=U.useMemo((()=>function(e){let t,{pages:n,cellIndex:r}=e;const o=n.filter((e=>e.qArea.qTop<=r&&r<e.qArea.qTop+e.qArea.qHeight))[0];if(o){const e=o.qArea;r>=e.qTop&&r<e.qTop+e.qHeight&&([t]=o.qMatrix[r-e.qTop])}return t}({pages:v,cellIndex:G})),[v,G]),ee="S"===(null==Y?void 0:Y.qState)||"XS"===(null==Y?void 0:Y.qState)||"L"===(null==Y?void 0:Y.qState)||"XL"===(null==Y?void 0:Y.qState),te=U.useMemo((()=>(e=>{let{column:t,histogram:n,checkboxes:r,cell:o,showGray:i}=e;const a=[t?GL.column:GL.row];return n||a.push(GL.rowBorderBottom),o?(r||("XS"===o.qState?a.push(i?GL.XS:GL.S):"S"===o.qState||"L"===o.qState?a.push(GL.S):i&&eO(o)?a.push(GL.A):i&&YL(o)&&a.push(GL.X)),a):[]})({column:y,histogram:O,checkboxes:x,cell:Y,showGray:T})),[null==Y?void 0:Y.qState,O,$,x]),ne=U.useCallback((e=>{e.preventDefault()}),[x]);if(!Y)return null;const re=!["NaN",void 0].includes(null==Y?void 0:Y.qNum);let oe;oe=!S||S.auto?re?"rtl"===w?"left":"right":{rtl:"right",ltr:"left"}[w]:(null==S?void 0:S.align)||"left";const ie="grid"===W&&"column"===V,ae=null!==(t=null==Y?void 0:Y.qText)&&void 0!==t?t:"";let le;if(null!==(n=Y.qHighlightRanges)&&void 0!==n&&null!==(r=n.qRanges)&&void 0!==r&&r.length){const e=Y.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[];le=function(e,t){if(!t.length)return[];const n=t.reduce(((n,r,o)=>{const i=0===o?0:t[o-1].qCharPos+t[o-1].qCharCount;n.push(...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{qCharPos:r,qCharCount:o}=t,i=[];return r>n&&i.push([e.slice(n,r),!1]),i.push([e.slice(r,r+o),!0]),i}(e,r,i));const a=o===t.length-1,l=t[o].qCharPos+t[o].qCharCount;return a&&l<e.length&&n.push([e.slice(l),!1]),n}),[]);return n}(ae,e)}const se={alignItems:"center",display:"flex",fontSize:"8px"},ce={display:"flex",alignItems:"center",minWidth:0,flexGrow:1,paddingLeft:"rtl"===w?8:x?0:void 0,paddingRight:x?0:"rtl"===w?8:0,justifyContent:oe},ue=0===o,de=x?"auto":"max-content",pe=ee&&b,fe=!x&&ee&&!b,he=!x&&P,me=x||!P,ge=function(e){let{translator:t,label:n,qState:r,isSelected:o,currentIndex:i,maxIndex:a,showSearch:l}=e;const s=LO[r],c=t.get(s),u=[];if(o){const e=l?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=t.get(e);u.push(n)}const d="".concat(n," ").concat(c),p=t.get("CurrentSelections.Of",[i+1,a+1]);return u.unshift(d,p),u.join(". ").trim()}({translator:j,label:ae,qState:Y.qState,currentIndex:Z.currentIndex,maxIndex:Z.max,showSearch:F});return H.createElement(lO,{className:GL.barContainer,flexBasisProp:de,style:K,isGridCol:ie,isGridMode:"grid"===W,dense:$,frequencyWidth:D,direction:w,"data-testid":"listbox.item"},H.createElement(RO,{role:"row","aria-label":ge,"aria-selected":ee,"aria-setsize":Z.max,"aria-rowindex":Z.currentIndex,ref:Q,container:!0,dataLayout:W,cellPaddingRight:me,layoutOrder:V,itemPadding:A,gap:0,className:nO(["value",...te]),classes:{root:GL.fieldRoot},onClick:d,onMouseDown:p,onMouseUp:f,onMouseEnter:h,onKeyDown:J,onTouchStart:m,onTouchEnd:g,onContextMenu:ne,tabIndex:ue&&I.innerTabStops?0:-1,"data-n":null==Y?void 0:Y.qElemNumber,direction:w},(null==Y?void 0:Y.qFrequency)&&H.createElement(EO,{qFrequency:null==Y?void 0:Y.qFrequency,histogram:O,checkboxes:x,isSelected:ee,frequencyMax:L}),H.createElement(pk,{item:!0,style:ce,className:nO([GL.cell,GL.selectedCell]),title:"".concat(ae)},le?H.createElement(SO,{onChange:u,labels:le,checkboxes:x,dense:$,showGray:T,color:"inherit",qElemNumber:Y.qElemNumber,isSelected:ee,cell:Y,isGridCol:ie,isSingleSelect:k,valueTextAlign:oe}):H.createElement(wO,{onChange:u,label:ae,color:"inherit",qElemNumber:Y.qElemNumber,isSelected:ee,dense:$,cell:Y,isGridCol:ie,showGray:T,isSingleSelect:k,checkboxes:x,valueTextAlign:oe})),C&&H.createElement(CO,{cell:Y,checkboxes:x,dense:$,showGray:T}),he&&H.createElement(pk,{item:!0,className:GL.icon},pe&&H.createElement(zL,{style:se,size:"small"}),fe&&H.createElement(JL,{style:se,size:"small"}))))}var qO=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function zO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||qO(r)&&qO(o)))return!1;var r,o;return!0}function AO(e,t){var n;void 0===t&&(t=zO);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var DO="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function jO(e){cancelAnimationFrame(e.id)}function FO(e,t){var n=DO();var r={id:requestAnimationFrame((function o(){DO()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var BO=-1;function $O(e){if(void 0===e&&(e=!1),-1===BO||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),BO=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return BO}var WO=null;function UO(e){if(void 0===e&&(e=!1),null===WO||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?WO="positive-descending":(t.scrollLeft=1,WO=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),WO}return WO}var HO=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function VO(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,s=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,MS(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:MS(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=AO((function(e,t,n,o,i,a,l,s){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})})),r._callOnScroll=void 0,r._callOnScroll=AO((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,l=a.columnWidth,s=a.direction,c=a.rowHeight,p=r._getItemStyleCache(m&&l,m&&s,m&&c),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===s;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=AO((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,l=t.scrollHeight,s=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(UO()){case"negative":c=-i;break;case"positive-descending":c=s-o-i}c=Math.max(0,Math.min(c,s-o));var u=Math.max(0,Math.min(a,l-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&jO(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=FO(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}ES(t,e),t.getDerivedStateFromProps=function(e,t){return GO(e,t),g(e),null};var v=t.prototype;return v.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},v.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,u=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=$O();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=a(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?v:0,x=b>d?v:0;this.scrollTo({scrollLeft:void 0!==r?s(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,y):g})},v.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},v.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(UO()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},v.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&jO(this._resetIsScrollingTimeoutId)},v.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,s=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?HO:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,v=e.style,b=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),w=S[0],E=S[1],C=this._getVerticalRangeToRender(),k=C[0],R=C[1],L=[];if(r>0&&g)for(var O=k;O<=R;O++)for(var I=w;I<=E;I++)L.push(U.createElement(t,{columnIndex:I,data:d,isScrolling:b?x:void 0,key:f({columnIndex:I,data:d,rowIndex:O}),rowIndex:O,style:this._getItemStyle(O,I)}));var T=a(this.props,this._instanceProps),P=l(this.props,this._instanceProps);return U.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:xS({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},U.createElement(c||u||"div",{children:L,ref:s,style:{height:T,pointerEvents:x?"none":void 0,width:P}}))},v._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],l=i[1],s=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,l,d,p,s,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,b=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,b,g,x,y)}},v._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,l=e.rowCount,s=this.state,c=s.horizontalScrollDirection,u=s.isScrolling,d=s.scrollLeft,p=n||i||a||1;if(0===t||0===l)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},v._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,l=a.isScrolling,s=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,c,this._instanceProps),h=f(this.props,d,c,this._instanceProps),m=l&&"backward"!==s?1:Math.max(1,u),g=l&&"forward"!==s?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(U.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var GO=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},KO=function(e,t){return e};function ZO(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=s(r.props,MS(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:MS(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=AO((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=AO((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,l=i.itemSize,s=i.layout,u=r._getItemStyleCache(c&&l,c&&s,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===s,h="rtl"===a,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=AO((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(UO()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&jO(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=FO(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}ES(t,e),t.getDerivedStateFromProps=function(e,t){return XO(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===o?s.scrollWidth>s.clientWidth?$O():0:s.scrollHeight>s.clientHeight?$O():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,l))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(UO()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&jO(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,l=e.innerElementType,s=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?KO:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,v=e.useIsScrolling,b=e.width,y=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,S=x?this._onScrollHorizontal:this._onScrollVertical,w=this._getRangeToRender(),E=w[0],C=w[1],k=[];if(c>0)for(var R=E;R<=C;R++)k.push(U.createElement(t,{data:u,key:p(R,u),index:R,isScrolling:v?y:void 0,style:this._getItemStyle(R)}));var L=r(this.props,this._instanceProps);return U.createElement(h||m||"div",{className:n,onScroll:S,ref:this._outerRefSetter,style:xS({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},U.createElement(l||s||"div",{children:k,ref:a,style:{height:x?"100%":L,pointerEvents:y?"none":void 0,width:x?L:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,s=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,s,this._instanceProps),u=l(this.props,c,s,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(U.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var XO=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},QO=VO({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){var a=e.columnCount,l=e.columnWidth,s=e.width,c=Math.max(0,a*l-s),u=Math.min(c,t*l),d=Math.max(0,t*l-s+i+l);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(s/2)?0:p>c+Math.floor(s/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){var a=e.rowHeight,l=e.height,s=e.rowCount,c=Math.max(0,s*a-l),u=Math.min(c,t*a),d=Math.max(0,t*a-l+i+a);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(l/2)?0:p>c+Math.floor(l/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getColumnStartIndexForOffset:function(e,t){var n=e.columnWidth,r=e.columnCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getColumnStopIndexForStartIndex:function(e,t,n){var r=e.columnWidth,o=e.columnCount,i=e.width,a=t*r,l=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+l-1))},getRowStartIndexForOffset:function(e,t){var n=e.rowHeight,r=e.rowCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getRowStopIndexForStartIndex:function(e,t,n){var r=e.rowHeight,o=e.rowCount,i=e.height,a=t*r,l=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+l-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),JO=ZO({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,l=e.height,s=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,p="horizontal"===a||"horizontal"===u?d:l,f=Math.max(0,s*c-p),h=Math.min(f,t*c),m=Math.max(0,t*c-p+c+i);switch("smart"===n&&(n=r>=m-p&&r<=h+p?"auto":"center"),n){case"start":return h;case"end":return m;case"center":var g=Math.round(m+(h-m)/2);return g<Math.ceil(p/2)?0:g>f+Math.floor(p/2)?f:g;default:return r>=m&&r<=h?r:r<m?m:h}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,l=e.layout,s=e.width,c=t*a,u="horizontal"===r||"horizontal"===l?s:o,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});const YO="#BBB",eI="#f1f1f1",tI={styledScrollbars:"".concat("ListBox","-styledScrollbars")};function nI(e){let{renderProps:t,layoutOptions:n,maxCount:r,columnCount:o,rowCount:i,overflowDisclaimer:a,qCardinal:l,dataOffset:s}=e;const c="column"===(null==n?void 0:n.layoutOrder)&&"singleColumn"!==n.dataLayout,u=((e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex)(t,c),d=c?r.column:r.row,p=(c?o:i)>=d,f=((e,t,n,r)=>e===t*n+r+n)(l,u,c?i:o,s),h=!!s&&((e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex)(t,c),m=p&&!f&&u>=d-1||h||a.state.show;a.set(m)}const{StyledFixedSizeList:rI,StyledFixedSizeGrid:oI}=function(){const e=e=>({scrollbarColor:"".concat(YO," ").concat(eI),overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:eI},"&::-webkit-scrollbar-thumb":{backgroundColor:YO,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:_m(JO,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(tI.styledScrollbars)]:e(n)}})),StyledFixedSizeGrid:_m(QO,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(tI.styledScrollbars)]:e(n)}}))}}();function iI(e){let{layout:t,width:n,height:r,listCount:o,count:i,textWidth:a,freqIsAllowed:l,checkboxes:s}=e;const{layoutOptions:c={}}=t||{},{layoutOrder:u,maxVisibleRows:d={},maxVisibleColumns:p,dense:f,dataLayout:h}=c,m=l?40:0,g=s?20:0;let v=56+m+g;!s&&v>=80&&(v+=20);let b,y,x,S,w=a+18+m+g;!s&&w>=80&&(w+=20),w=Math.min(150,Math.max(w,v));const E="grid"===h;let C=f?20:E?32:29;E&&(C+=4);const k=null!=r?r:8*C;if(u){let e=n;"row"===u?(b={overflowX:"hidden"},e+=8,({rowCount:S,columnWidth:x,columnCount:y}=function(e){let{maxVisibleColumns:t,listCount:n,containerWidth:r,columnAutoWidth:o,itemMinWidth:i}=e;const a=(null==t?void 0:t.maxColumns)||3,l=r-10;let s;const c=Math.min(n,Math.max(1,Math.round(l/Math.max(i,o))));s=!1!==(null==t?void 0:t.auto)?c:Math.min(n,a,c);const u=l/s;return{rowCount:Math.ceil(n/s),columnWidth:u,columnCount:s}}({maxVisibleColumns:p,listCount:o,containerWidth:e,columnAutoWidth:w,itemMinWidth:v}))):(b={overflowY:"hidden"},({rowCount:S,columnWidth:x,columnCount:y}=function(e){let t,{maxVisibleRows:n,itemHeight:r,listCount:o,listHeight:i,columnAutoWidth:a,containerWidth:l,itemMinWidth:s}=e;const c=(null==n?void 0:n.maxRows)||3,u=Math.floor(i/r);t=!1!==n.auto?u:Math.min(o,c,u);const d=Math.ceil(o/t);return{columnWidth:Math.max(a,l/d,s),columnCount:d,rowCount:t}}({maxVisibleRows:d,itemHeight:C,listCount:o,listHeight:k,columnAutoWidth:w,containerWidth:e,itemMinWidth:v})))}y=("singleColumn"===h?1:y)||1,S=("singleColumn"===h?i:S)||o;const R=c.dense?838e3:577e3;S=Math.min(S,R);const L=Math.floor(3355e4/x);y=Math.min(y,L)||1;const O=S*y;return{columnCount:y,columnWidth:x,rowCount:S,overflowStyling:b,itemHeight:C,listHeight:k,scrollBarWidth:10,count:i,listCount:Math.min(o,O),maxCount:{row:R,column:L},itemPadding:4,frequencyWidth:40}}const aI=(e,t)=>{const n=(()=>{const e=document.createDocumentFragment(),t=document.createElement("canvas");return e.appendChild(t),t.getContext("2d")})();if(n.font=t,Array.isArray(e))return Math.max(...e.map((e=>n.measureText(e).width)));return n.measureText(e).width};function lI(e){if(!e)return"";const t=e.qListObject.qDimensionInfo.qApprMaxGlyphCount;let n="";for(let e=0;e<t;e++)n+="M";return n}function sI(e){let{pages:t,minimumBatchSize:n,count:r,calculatePagesHeight:o=!1}=e;const i=null!=t&&t.length&&o?(e=>{let{pages:t=[],minimumBatchSize:n,count:r}=e;const o=t.some((e=>e.qArea.qHeight<n)),i=Math.max(...t.map((e=>e.qArea.qTop+e.qArea.qHeight)));return o?i:r})({pages:t,minimumBatchSize:n,count:r}):r;return i||0}const[cI,uI]=Tw({});function dI(e){const t="".concat(e.id),[n]=cI();return{setStoreValue:(e,r)=>n.set("".concat(t,"/").concat(e),r),getStoreValue:e=>n.get("".concat(t,"/").concat(e))}}const pI=uy(vE,{shouldForwardProp:e=>!["width","dense"].includes(e)})((e=>{let{width:t,dense:n}=e;return i({minWidth:"".concat(t,"px"),textAlign:"center",fontSize:"".concat(n?"12px":"14px")},n&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:t})}));function fI(e){let{width:t,text:n,dense:r,tooltip:o}=e;const{translator:i}=U.useContext(Iw);return H.createElement(uL,{title:o?i.get(n):""},H.createElement(pI,{width:t,dense:r,component:"div",variant:"body1",py:"12px"},i.get(n)))}var hI={},mI={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(mI);var gI,vI=mI.exports,bI={},yI=r(Qw);var xI=vI;Object.defineProperty(hI,"__esModule",{value:!0});var SI=hI.default=void 0,wI=xI((gI||(gI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=yI}(bI)),bI)),EI=Vg,CI=(0,wI.default)((0,EI.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");SI=hI.default=CI;const kI=uy(oE)((e=>{let{theme:t,left:n}=e;return{position:"absolute",bottom:"12px",display:"flex",border:"1px solid ".concat(t.palette.divider),width:"calc(100% - 11px)",left:n}})),RI=uy("div")((()=>({paddingLeft:"6px",flexGrow:1}))),LI=uy("div")((e=>{let{dense:t}=e;return{display:"flex",alignItems:"".concat(t?"center":"flex-start")}})),OI=uy(SI)((()=>({fontSize:"14px"})));function II(e){let{text:t,dismiss:n,dense:r,parentWidth:o=0}=e;const i="function"==typeof n,a=r?370:282,l=Math.max(o/2-a/2,0),s=Math.min(a,o)-42,c=r&&o<a;return H.createElement(kI,{left:l,style:{maxWidth:a}},H.createElement(RI,null,H.createElement(fI,{text:t,dense:r,width:s,tooltip:c})),H.createElement(LI,{dense:r},i&&H.createElement(uE,{"aria-label":"close",onClick:()=>n()},H.createElement(OI,null))))}function TI(e){let{itemWidth:t,layout:n,frequencyMode:r}=e;const o=t>80,{frequencyEnabled:i=!1}=(null==n?void 0:n.qListObject)||{},a=!["none",void 0].includes(r);return!(!o||!a&&!i)}const PI=e=>{const t=(e=>e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:"[".concat(e.replace(/\]/g,"]]"),"]"):e)(e);return"Max(AGGR(Count(".concat(t,"), ").concat(t,"))")},_I=(e,t)=>{const n=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[r,o]=U.useState(),[i,a]=U.useState(n);return U.useEffect((()=>{if(!n)return;(async()=>{const n=await(async(e,t)=>{const n=e.qListObject.qDimensionInfo,r=n.qGroupFieldDefs[n.qGroupPos],o=PI(r);return(await t.evaluateEx(o)).qNumber})(t,e);o(n),a(!1)})()}),[n&&t]),{frequencyMax:n?r:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:i}},NI=["isLoadingData"],MI=uy("div")((()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}})));function qI(e){var t,n,r,o;let{model:a,app:c,constraints:u,layout:d,selections:p,selectionState:f,direction:h,checkboxes:m,height:g,width:v,frequencyMode:b,update:y,fetchStart:x,postProcessPages:S,calculatePagesHeight:w=!1,keyboard:E={},showGray:C=!0,scrollState:k,selectDisabled:R=(()=>!1),keyScroll:L={state:{},reset:()=>{}},currentScrollIndex:O={set:()=>{}},renderedCallback:I,onCtrlF:T,showSearch:P,isModal:_}=e;const{translator:N}=U.useContext(Iw),[M,q]=U.useState(!1),z=!(!d||!d.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:A=m,histogram:D}=null!=d?d:{},j=U.useRef(null),F=U.useRef({queue:[],validPages:!1,dataOffset:0}),B=U.useRef({pages:[]}),{frequencyMax:$,awaitingFrequencyMax:W}=_I(c,d),V=function(e){let{local:t,loaderRef:n,model:r,fetchStart:o,scrollTimeout:i,postProcessPages:a,listData:l}=e;const[s,c]=U.useState(!1),[u,d]=U.useState([]);let[p]=U.useState(0);const f=(e,s)=>{const u=t.current.dataOffset;t.current.queue.push({start:e+u,stop:s+u});const f=!!n.current&&n.current._listRef&&n.current._listRef.state.isScrolling;return t.current.queue.length>10&&t.current.queue.shift(),clearTimeout(t.current.timeout),c(!0),new Promise((e=>{t.current.timeout=setTimeout((()=>{const n=t.current.queue.slice(-1)[0],i=r.getListObjectData("/qListObjectDef",[{qTop:n.start>p?n.start-p:0,qHeight:p,qLeft:0,qWidth:1},{qTop:n.start,qHeight:p,qLeft:0,qWidth:1}]).then((n=>{const r=a?a(n):n;t.current.validPages=!0,l.current.pages=r,d(r),c(!1),e()}));o&&o(i)}),f?i:0)}))};return{loadMoreItems:{with(e){let{minimumBatchSize:t}=e;return t&&(p=t),f}},pages:u,isLoading:s}}({local:F,loaderRef:j,model:a,fetchStart:x,scrollTimeout:0,postProcessPages:S,listData:B}),G=s(V,NI),{setStoreValue:K}=dI(a),Z=U.useCallback(G.loadMoreItems,[d]),[X,Q]=U.useState({show:!1,dismissed:!1}),[J,Y]=U.useState([]);null!=G&&G.pages&&f.update({setPages:Y,pages:G.pages,isSingleSelect:z,selectDisabled:R,layout:d});const ee=null==d?void 0:d.qListObject.qDimensionInfo.qCardinal;(null!=G&&G.pages.length&&!W||0===ee)&&(null==I||I());const te=U.useCallback((e=>{if(null==J||!J.length||!F.current.validPages)return!1;F.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=J.filter((e=>t(e)))[0];return n&&t(n)}),[d,J]),{interactionEvents:ne,select:re}=XL({selectionState:f,selections:p,checkboxes:A,doc:document,loaderRef:j}),{layoutOptions:oe={}}=d||{};let ie=!0;oe.dataLayout&&(ie="singleColumn"===oe.dataLayout||"row"===(null==oe?void 0:oe.layoutOrder));const ae="grid"===(null==oe?void 0:oe.dataLayout),le=e=>{const t=i({},ie?{rowIndex:e}:{columnIndex:e}),n=ae?t:e;j.current._listRef.scrollToItem(n)},se=()=>{if(F.current.queue=[],F.current.validPages=!1,j.current){j.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===L.state.scrollPosition;if(d&&d.qSelectionInfo.qInSelections||e)return void(e&&L.reset());F.current.dataOffset=0,le(0)}};y&&y.call(null,se),U.useEffect((()=>{k&&!M&&j.current&&(j.current._listRef.scrollToItem(k.initScrollPos),q(!0))}),[j.current]),U.useEffect((()=>{se()}),[d,F.current.dataOffset]);const ce=(e=>{const t=U.useMemo((()=>"text"in e?e:{}),[e]);return U.useMemo((()=>aI(t.text,t.font||"14px Source Sans Pro")),[t.text,t.font])})({text:lI(d),font:"14px Source sans pro"});let ue=100;const de="grid"!==oe.dataLayout,pe=null==d||null===(t=d.qListObject.qSize)||void 0===t?void 0:t.qcy,fe=sI({pages:J,minimumBatchSize:ue,count:pe,calculatePagesHeight:w,layoutOptions:oe,model:a});let he=TI({itemWidth:v,layout:d,frequencyMode:b});const me=iI({layout:d,width:v,height:g,listCount:fe,count:pe,textWidth:ce,freqIsAllowed:he,checkboxes:A});me.columnWidth&&(he=TI({itemWidth:me.columnWidth,layout:d,frequencyMode:b}));const{listCount:ge}=me;K("listCount",ge);const ve=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function(e){let t,{position:n,isRow:r,sizes:o,layout:i,offset:a}=e,l=!1,s=null!=a?a:0;switch(n){case"start":t=0;break;case"end":t=r?o.rowCount:o.columnCount;break;case"overflowStart":s=0,t=0,l=!0;break;case"overflowEnd":s=((e,t)=>e.qListObject.qDimensionInfo.qCardinal-t)(i,o.listCount),t=i.qListObject.qDimensionInfo.qCardinal,l=!0}return{scrollIndex:t,offset:s,triggerRerender:l}}({position:e,isRow:ie,sizes:me,layout:d,offset:F.current.dataOffset});F.current.dataOffset=n,r&&f.triggerStateChanged(),le(t)};U.useEffect((()=>{const e=L.state;e.up?le(O.state.start-e.up):e.down?le(O.state.stop+e.down):e.scrollPosition&&ve(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&L.reset()}),[L.state.up,L.state.down,L.state.scrollPosition]);const{textAlign:be}=(null==d?void 0:d.qListObject.qDimensionInfo)||{},[ye,xe]=U.useState({first:!1,last:!1}),{List:Se,Grid:we}=function(e){let{layout:t,width:n,checkboxes:r,local:o,isVertical:a,pages:s,selectDisabled:c,interactionEvents:u,frequencyMode:d,histogram:p,isSingleSelect:f,select:h,selectAll:m,onCtrlF:g,textAlign:v,selections:b,keyboard:y,showGray:x,scrollState:S,direction:w,sizes:E,listCount:C,overflowDisclaimer:k,setScrollPosition:R,focusListItems:L,setCurrentScrollIndex:O,constraints:I,frequencyMax:T,freqIsAllowed:P,translator:_,showSearch:N,isModal:M}=e;const{layoutOptions:q={}}=t||{},{columnWidth:z,itemPadding:A,listHeight:D,itemHeight:j,rowCount:F,columnCount:B,frequencyWidth:$}=E||{},W=("grid"===q.dataLayout?z:n)>80,U={direction:"rtl"===w?"rtl":"ltr",useIsScrolling:!0,className:tI.styledScrollbars},V=null==t?void 0:t.qListObject.qDimensionInfo.qLocked,G=i(i({isLocked:V,column:!a,pages:s},V||c()?{}:u),{},{checkboxes:r,layoutOptions:q,frequencyMode:d,freqIsAllowed:P,isSingleSelect:f,textAlign:v,itemPadding:A,frequencyWidth:$,actions:{select:h,confirm:()=>null==b?void 0:b.confirm.call(b),cancel:()=>null==b?void 0:b.cancel.call(b),setScrollPosition:R,selectAll:m,onCtrlF:g},frequencyMax:T,histogram:p,keyboard:y,showGray:x,showTick:W,dataOffset:o.current.dataOffset,focusListItems:L,direction:w,translator:_,showSearch:N,isModal:M});return{List:e=>{let{onItemsRendered:r,ref:a}=e;return o.current.listRef=a,H.createElement(rI,l({},U,{dataTestid:"fixed-size-list",scrollDisabled:null==I?void 0:I.active,height:D,width:n,itemCount:C,itemData:i(i({},G),{},{listCount:C}),itemSize:j,onItemsRendered:e=>{var n,a;O({start:e.visibleStartIndex,stop:e.visibleStopIndex}),S&&S.setScrollPos(e.visibleStopIndex),nI({renderProps:e,layoutOptions:q,maxCount:E.maxCount,columnCount:B,rowCount:F,overflowDisclaimer:k,qCardinal:null==t||null===(n=t.qListObject)||void 0===n||null===(a=n.qDimensionInfo)||void 0===a?void 0:a.qCardinal,dataOffset:o.current.dataOffset}),r(i({},e))},ref:a}),MO)},Grid:e=>{let{onItemsRendered:r,ref:a}=e;const{overflowStyling:s,scrollBarWidth:c}=E,{layoutOrder:u}=q||{},d=Math.min(D,F*j+c);return o.current.listRef=a,H.createElement(oI,l({},U,{dataTestid:"fixed-size-grid",scrollDisabled:null==I?void 0:I.active,height:d,width:n,columnCount:B,columnWidth:z,rowCount:F,rowHeight:j,style:i({},s),itemData:i(i({},G),{},{column:void 0,columnCount:B,rowCount:F}),onItemsRendered:e=>{var n,i;const a="row"===u;O({start:a?e.visibleRowStartIndex:e.visibleColumnStartIndex,stop:a?e.visibleRowStopIndex:e.visibleColumnStopIndex});const l=function(e){const{renderProps:t,scrollState:n,layoutOrder:r,rowCount:o,columnCount:i}=e,{overscanRowStartIndex:a,overscanRowStopIndex:l,overscanColumnStartIndex:s,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,p,f,h;return n&&n.setScrollPos(u),"column"===r?(d=s*o,p=a,f=c*o,h=l):(d=s,p=a*i,f=c,h=l*i),{visibleStartIndex:d+p,visibleStopIndex:f+h}}({renderProps:e,scrollState:S,layoutOrder:u,rowCount:F,columnCount:B});nI({renderProps:e,layoutOptions:q,maxCount:E.maxCount,columnCount:B,rowCount:F,overflowDisclaimer:k,qCardinal:null==t||null===(n=t.qListObject)||void 0===n||null===(i=n.qDimensionInfo)||void 0===i?void 0:i.qCardinal,dataOffset:o.current.dataOffset}),r(l)},ref:a}),MO)}}}({direction:h,layout:d,height:g,width:v,checkboxes:A,frequencyMode:b,histogram:D,keyboard:E,showGray:C,interactionEvents:ne,select:re,selectAll:()=>{f.clearItemStates(!1),a.selectListObjectAll("/qListObjectDef")},onCtrlF:T,textAlign:be,isVertical:de,pages:J,selectDisabled:R,isSingleSelect:z,selections:p,scrollState:k,local:F,sizes:me,listCount:ge,overflowDisclaimer:{state:X,set:e=>Q((t=>i(i({},t),{},{show:e})))},setScrollPosition:ve,focusListItems:{first:ye.first,setFirst:e=>xe((t=>i(i({},t),{},{first:e}))),last:ye.last,setLast:e=>xe((t=>i(i({},t),{},{last:e})))},setCurrentScrollIndex:O.set,constraints:u,frequencyMax:$,freqIsAllowed:he,translator:N,showSearch:P,isModal:_}),{columnWidth:Ee,listHeight:Ce,itemHeight:ke}=me||{};return de||(ue=function(e){let{width:t,columnWidth:n,listHeight:r,itemHeight:o}=e;return Math.ceil(t/n)*Math.ceil(r/o)*2}({width:v,columnWidth:Ee,listHeight:Ce,itemHeight:ke})),H.createElement(MI,null,H.createElement(OO,{className:"screenReaderOnly",layout:d}),!ge&&ee>0&&H.createElement(fI,{width:v,text:"Listbox.NoMatchesForYourTerms"}),H.createElement(BL,{isItemLoaded:te,itemCount:ge||1,loadMoreItems:Z.with({minimumBatchSize:ue}),threshold:0,minimumBatchSize:ue,ref:j,role:"grid"},de?Se:we),X.show&&!X.dismissed&&H.createElement(II,{text:"Listbox.ItemsOverflow",dismiss:()=>Q((e=>i(i({},e),{},{dismissed:!0}))),parentWidth:null==j||null===(n=j.current)||void 0===n||null===(r=n._listRef)||void 0===r||null===(o=r.props)||void 0===o?void 0:o.width,dense:null==oe?void 0:oe.dense}))}const zI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M15.4,9 C15.8,9 16,9.3 16,9.6 L16,15.4 C16,15.7 15.8,16 15.4,16 L9.6,16 C9.3,16 9,15.8 9,15.4 L9,9.6 C9,9.3 9.3,9 9.6,9 L15.4,9 Z M15,10 L10,10 L10,15 L15,15 L15,10 Z M6.5,0 C6.8,0 7,0.3 7,0.6 L7,6.4 C7,6.8 6.8,7 6.5,7 L0.6,7 C0.3,7 0,6.8 0,6.5 L0,0.6 C0,0.3 0.3,0 0.6,0 L6.5,0 Z M6,2.8 C6.3,2.5 6.3,2.1 6.1,1.8 C5.9,1.5 5.4,1.6 5.1,1.9 L3.1,3.9 L2.4,3.2 C2.1,2.9 1.7,2.9 1.4,3.1 C1.2,3.3 1.2,3.8 1.5,4.1 L2.7,5.3 C3,5.6 3.4,5.6 3.7,5.3 L3.8,5.3 L6,2.8 Z M6.5,9 C6.8,9 7,9.3 7,9.6 L7,15.4 C7,15.8 6.8,16 6.5,16 L0.6,16 C0.3,16 0,15.8 0,15.4 L0,9.6 C0,9.3 0.3,9 0.6,9 L6.5,9 Z M6,11.8 C6.3,11.5 6.3,11.1 6.1,10.8 C5.9,10.6 5.4,10.6 5.1,10.8 L3.1,12.8 L2.3,12 C2,11.7 1.6,11.7 1.3,12 C1.1,12.3 1.1,12.7 1.4,13 L2.6,14.2 C2.9,14.5 3.3,14.5 3.6,14.3 L3.7,14.2 L6,11.8 Z M15.4,0 C15.8,0 16,0.3 16,0.6 L16,6.4 C16,6.8 15.8,7 15.4,7 L9.6,7 C9.3,7 9,6.8 9,6.5 L9,0.6 C9,0.3 9.3,0 9.6,0 L15.4,0 Z M15,2.8 C15.3,2.5 15.3,2.1 15.1,1.8 C14.9,1.5 14.4,1.6 14.1,1.9 L12.1,3.9 L11.3,3.1 C11,2.8 10.6,2.8 10.3,3 C10,3.2 10.1,3.7 10.3,4 L11.5,5.2 C11.8,5.5 12.2,5.5 12.5,5.2 L15,2.8 Z"}}]}),AI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),DI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),jI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]});var FI=e=>{let{layout:t,model:n,translator:r,selectionState:o,isDirectQuery:i=!1}=e;if(t.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];return[{key:"selectAll",type:"menu-icon-button",label:r.get("Selection.SelectAll"),getSvgIconShape:zI,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{o.clearItemStates(!1),n.selectListObjectAll("/qListObjectDef")}},{key:"selectPossible",type:"menu-icon-button",label:r.get("Selection.SelectPossible"),getSvgIconShape:DI,enabled:()=>["qOption"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{o.clearItemStates(!1),n.selectListObjectPossible("/qListObjectDef")}},!i&&{key:"selectAlternative",type:"menu-icon-button",label:r.get("Selection.SelectAlternative"),getSvgIconShape:AI,enabled:()=>["qAlternative"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{o.clearItemStates(!1),n.selectListObjectAlternative("/qListObjectDef")}},!i&&{key:"selectExcluded",type:"menu-icon-button",label:r.get("Selection.SelectExcluded"),getSvgIconShape:jI,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{o.clearItemStates(!1),n.selectListObjectExcluded("/qListObjectDef")}}].filter(Boolean)};const BI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M2,6.5 L3,6.5 C3.55228475,6.5 4,6.94771525 4,7.5 L4,8.5 C4,9.05228475 3.55228475,9.5 3,9.5 L2,9.5 C1.44771525,9.5 1,9.05228475 1,8.5 L1,7.5 C1,6.94771525 1.44771525,6.5 2,6.5 Z M7.5,6.5 L8.5,6.5 C9.05228475,6.5 9.5,6.94771525 9.5,7.5 L9.5,8.5 C9.5,9.05228475 9.05228475,9.5 8.5,9.5 L7.5,9.5 C6.94771525,9.5 6.5,9.05228475 6.5,8.5 L6.5,7.5 C6.5,6.94771525 6.94771525,6.5 7.5,6.5 Z M13,6.5 L14,6.5 C14.5522847,6.5 15,6.94771525 15,7.5 L15,8.5 C15,9.05228475 14.5522847,9.5 14,9.5 L13,9.5 C12.4477153,9.5 12,9.05228475 12,8.5 L12,7.5 C12,6.94771525 12.4477153,6.5 13,6.5 Z"}}]});function $I(e){const t=ay(),n="function"==typeof e.enabled?!e.enabled():!!e.disabled,r="function"==typeof e.getSvgIconShape;return{hidden:!0===e.hidden,disabled:n,style:{backgroundColor:e.active?t.palette.btn.active:void 0},hasSvgIconShape:r}}const WI={className:"njs-cell-action"},UI=H.forwardRef(((e,t)=>{let{ariaExpanded:n=!1,item:r,addAnchor:o=!1}=e;const i=ay(),{hidden:a,disabled:l,style:s,hasSvgIconShape:c}=$I(r);if(a)return null;const u=Number.parseInt(i.spacing(.5),10),d=r.keyboardAction||r.action,p=d?e=>["Enter"].includes(e.key)&&d():null,f=d?e=>[" ","Spacebar"].includes(e.key)&&d():null,h="actions-toolbar-".concat(r.key);return H.createElement(uE,{ref:o?null:t,title:r.label,onClick:r.action,onKeyDown:p,onKeyUp:f,disabled:l,style:s,className:[WI.className,h].join(" "),size:"large",disableRipple:!0,"aria-expanded":n,"aria-controls":"moreMenuList","data-testid":h},c&&ML(r.getSvgIconShape()),o&&H.createElement("div",{ref:t,style:{bottom:-u,right:0,position:"absolute",width:"100%",height:0}}))})),HI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M9.34535242,8 L13.3273238,11.9819714 C13.6988326,12.3534802 13.6988326,12.955815 13.3273238,13.3273238 C12.955815,13.6988326 12.3534802,13.6988326 11.9819714,13.3273238 L8,9.34535242 L4.01802863,13.3273238 C3.64651982,13.6988326 3.04418502,13.6988326 2.67267621,13.3273238 C2.3011674,12.955815 2.3011674,12.3534802 2.67267621,11.9819714 L6.65464758,8 L2.67267621,4.01802863 C2.3011674,3.64651982 2.3011674,3.04418502 2.67267621,2.67267621 C3.04418502,2.3011674 3.64651982,2.3011674 4.01802863,2.67267621 L8,6.65464758 L11.9819714,2.67267621 C12.3534802,2.3011674 12.955815,2.3011674 13.3273238,2.67267621 C13.6988326,3.04418502 13.6988326,3.64651982 13.3273238,4.01802863 L9.34535242,8 Z"}}]}),VI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M9.1661442,6.1661442 C10.7210031,4.61128527 13.2789969,4.61128527 14.8338558,6.1661442 C16.3887147,7.72100313 16.3887147,10.2789969 14.8338558,11.8338558 C13.2789969,13.3887147 10.7210031,13.3887147 9.1661442,11.8338558 C7.61128527,10.2789969 7.61128527,7.77115987 9.1661442,6.1661442 Z M14.1316614,7.72100313 C14.3322884,7.52037618 14.3824451,7.169279 14.1316614,6.9184953 C13.8808777,6.6677116 13.5297806,6.71786834 13.3291536,6.9184953 L12.0250784,8.22257053 L10.7210031,6.9184953 C10.5203762,6.6677116 10.1191223,6.6677116 9.9184953,6.9184953 C9.6677116,7.11912226 9.6677116,7.52037618 9.9184953,7.72100313 L11.2225705,9.02507837 L9.9184953,10.3291536 C9.6677116,10.5297806 9.6677116,10.8808777 9.9184953,11.1316614 C10.169279,11.3824451 10.5203762,11.3824451 10.7210031,11.1316614 L12.0250784,9.82758621 L13.3291536,11.1316614 C13.5297806,11.3824451 13.8808777,11.3824451 14.1316614,11.1316614 C14.3322884,10.9310345 14.3824451,10.5297806 14.1316614,10.3291536 L12.8275862,9.02507837 L14.1316614,7.72100313 Z"}}]});var GI=e=>ML(VI(e));const KI="njs-action-toolbar-more",ZI={icon:"".concat("More","-icon")},XI=uy(SR)((e=>{let{theme:t}=e;return{pointerEvents:"none",["& .".concat(ZI.icon)]:{color:t.palette.text.primary}}}));function QI(e){let{item:t,autoFocus:n,onActionClick:r=(()=>{})}=e;const{hidden:o,disabled:i,hasSvgIconShape:a}=$I(t);return o?null:H.createElement(OR,{autoFocus:n,title:t.label,onClick:()=>{t.action(),r()},disabled:i,tabindex:"0"},a&&H.createElement(nR,{className:ZI.icon},ML(t.getSvgIconShape())),H.createElement(vE,{noWrap:!0},t.label))}const JI=H.forwardRef(((e,t)=>{let{actions:n=[],show:r=!0,alignTo:o,popoverProps:a={},popoverPaperStyle:s={},onCloseOrActionClick:c=(()=>{})}=e;const u=n.length>0,d=n.findIndex((e=>!e.disabled));return u&&H.createElement(XI,l({},a,{onClose:c,ref:t,open:r,anchorEl:o.current,getContentAnchorEl:null,container:o.current,disablePortal:!0,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:KI}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:i({pointerEvents:"auto",maxWidth:"250px"},s)}}),H.createElement(uR,{id:"moreMenuList"},n.map(((e,t)=>H.createElement(QI,{key:t,item:e,autoFocus:t===d,onActionClick:c})))))}));function YI(e){let{keyboardNavigation:t,focusHandler:n,getEnabledButton:r,selections:o}=e;return e=>{const{target:i,nativeEvent:a}=e,{keyCode:l}=a;switch(l){case IO.ARROW_LEFT:case IO.ARROW_DOWN:case IO.ARROW_RIGHT:case IO.ARROW_UP:if(i.classList.contains("njs-cell-action")){const e=(e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)})(i);(e=>{const t=document.querySelector("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");if(!n.length)return;n[Math.min(Math.max(0,e),n.length-1)].focus()})([IO.ARROW_LEFT,IO.ARROW_DOWN].includes(l)?e-1:e+1)}e.stopPropagation(),e.preventDefault();break;case IO.SPACE:e.preventDefault();break;case IO.TAB:if(t&&null!=n&&n.refocusContent){(e.shiftKey&&r(!1)===e.target||!e.shiftKey&&r(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),n.refocusContent())}break;case IO.ESCAPE:o&&(o.onCancel(),o.api.cancel(),e.preventDefault(),e.stopPropagation())}}}const eT="ActionsToolbar",tT={item:"".concat(eT,"-item"),itemSpacing:"".concat(eT,"-itemSpacing"),firstItemSpacing:"".concat(eT,"-firstItemSpacing"),lastItemSpacing:"".concat(eT,"-lastItemSpacing")},nT=uy(SR)((e=>{let{theme:t}=e;return{["& .".concat(tT.itemSpacing)]:{padding:t.spacing(0,.5)},["& .".concat(tT.firstItemSpacing)]:{padding:t.spacing(0,.5,0,0)},["& .".concat(tT.lastItemSpacing)]:{padding:t.spacing(0,0,0,.5)}}})),rT="njs-action-toolbar-popover",oT=H.forwardRef(((e,t)=>{let{className:n,ariaExpanded:r=!1,actions:o=[],first:i=!1,last:a=!1,addAnchor:l=!1,isRtl:s=!1}=e;return o.length>0?H.createElement(pk,{item:!0,container:!0,gap:0,flexDirection:s?"row-reverse":"row",wrap:"nowrap",className:n},o.map(((e,n)=>{let s=[];const c=i&&0===n,u=a&&o.length-1===n;return c&&!u&&(s=[tT.firstItemSpacing,tT.item]),u&&!c&&(s=[...s,tT.lastItemSpacing,tT.item]),c||u||0!==s.length||(s=[tT.itemSpacing,tT.item]),H.createElement(pk,{item:!0,key:e.key,className:s.join(" ").trim()},H.createElement(UI,{ariaExpanded:r,key:e.key,item:e,ref:0===n?t:null,addAnchor:l}))}))):null})),iT={pointerEvents:"none"},aT={vertical:"bottom",horizontal:"right"};function lT(e){var t,n;let{show:r=!0,actions:o=[],maxItems:i=3,selections:a={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},more:l={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{}},popover:s={show:!1,anchorEl:null},focusHandler:c=null,actionsRefMock:u=null,direction:d="ltr"}=e;const p=function(e){let{api:t,onConfirm:n=(()=>{}),onCancel:r=(()=>{}),onKeyDeactivate:o=(()=>{})}=e;const{translator:i}=U.useContext(Iw);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>t.canClear(),action:()=>t.clear(),getSvgIconShape:VI},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>t.canCancel(),action:()=>{r(),t.cancel()},keyboardAction:()=>{o(),r(),t.cancel()},getSvgIconShape:HI},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>t.canConfirm(),action:()=>{n(),t.confirm()},keyboardAction:()=>{o(),n(),t.confirm()},getSvgIconShape:QL}]}(a),{translator:f,keyboardNavigation:h}=U.useContext(Iw),[m,g]=U.useState(!1),v={vertical:7,horizontal:(null!==(t=null===(n=s.anchorEl)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)-7},b=U.useRef(),y=U.useRef(),x=ay(),S=U.useMemo((()=>({margin:x.spacing(.5,0)}))),w=e=>{const t=b.current||u;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},E=U.useMemo((()=>YI({keyboardNavigation:h,focusHandler:c,getEnabledButton:w,selections:a})),[h,c,w,a]);U.useEffect((()=>()=>{g(!1)}),[s.show,r,a.show]),U.useEffect((()=>{if(!c)return;c.on("focus_toolbar_first",(()=>{const e=w(!1);e&&e.focus()})),c.on("focus_toolbar_last",(()=>{const e=w(!0);e&&e.focus()}))}),[]);let C=l.enabled,k=l.actions;const R=l.alignTo||y,L=o.filter((e=>!e.hidden));if(L.length>i){const e=L.splice(-(L.length-i)-1);C=!0,k=[...e,...l.actions]}if(!a.show&&0===L.length)return null;const O={key:"more",label:f.get("Menu.More"),getSvgIconShape:BI,hidden:!1,active:m,enabled:()=>C,action:()=>g(!m)},I=L.length>0,T=k.length>0,P=I&&a.show||T&&a.show,_="rtl"===d,N=H.createElement(pk,{ref:b,onKeyDown:E,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:_?"row-reverse":"row"}},I&&H.createElement(oT,{actions:L,first:!0,last:!T&&!a.show}),T&&H.createElement(oT,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:y,ariaExpanded:m,actions:[O],first:!I,last:!a.show,addAnchor:!0}),P&&H.createElement(pk,{item:!0,className:tT.itemSpacing,style:S},H.createElement(KC,{orientation:"vertical"})),a.show&&H.createElement(oT,{className:"actions-toolbar-default-actions",actions:p,first:!I&&!T,last:!0,isRtl:_}),m&&H.createElement(JI,{show:m,actions:k,alignTo:R,popoverProps:l.popoverProps,popoverPaperStyle:l.popoverPaperStyle,onCloseOrActionClick:()=>{g(!1)}}));return s.show?H.createElement(nT,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:s.show,anchorEl:s.anchorEl,anchorOrigin:v,transformOrigin:aT,hideBackdrop:!0,style:iT,PaperProps:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:rT,style:{pointerEvents:"auto",padding:x.spacing(.8)}}},N):r&&N}var sT=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014l-4.128-4.026ZM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0Zm-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6.034 6.034 0 0 1-1.413 1.415Z"}}]}))(e));const cT="/qListObjectDef",uT=uy(Tk)((e=>{var t,n;let{theme:r}=e;return{color:null===(t=r.listBox)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.color}})),dT=uy(AR)((e=>{var t,n;let{theme:r}=e;return{color:null===(t=r.listBox)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.color,display:"flex"}}));function pT(e){let{selections:t,selectionState:n,model:r,keyboard:o,dense:i=!1,visible:a=!0,autoFocus:l=!0,wildCardSearch:s=!1,searchEnabled:c,direction:u,hide:d}=e;const{translator:p}=U.useContext(Iw),[f,h]=U.useState(""),[m,g]=U.useState(!1),v=U.useRef(),b=ay(),{getStoreValue:y}=dI(r),x="rtl"===u,S=x?"right":"left",w=async()=>{if(t.isModal())try{await r.abortListObjectSearch(cT)}finally{h("")}};U.useEffect((()=>{a||w()}),[a]),U.useEffect((()=>(t.on("deactivated",w),()=>{t.removeListener&&t.removeListener("deactivated",w)})),[]),U.useEffect((()=>{if(m&&v.current){const e=f.length-1;v.current.setSelectionRange(e,e),g(!1)}}),[m,v.current]);const E=async()=>{let e;return await r.searchListObjectFor(cT,f)&&f.length&&y("listCount")>0&&(e=r.acceptListObjectSearch(cT,!0),t.selectionsMade=!0,n.clearItemStates(!1),h("")),e};function C(e){const t=(null==e?void 0:e.querySelector(".last-focused"))||(null==e?void 0:e.querySelector('[role="row"]:first-child'));t.setAttribute("tabIndex",0),null==t||t.focus()}return a&&!1!==c?H.createElement(dT,{startAdornment:H.createElement(uT,{position:"start"},H.createElement(sT,{size:i?"small":"normal"})),className:"search",sx:[{border:"none",fontSize:14,borderRadius:0,backgroundColor:"transparent","& fieldset":{border:"1px solid ".concat(b.palette.divider),borderWidth:"1px 0 1px 0",borderRadius:0},"&:hover":{border:"none"},paddingLeft:"".concat(9,"px")},i&&{fontSize:12,paddingLeft:b.spacing(1),"& input":{paddingTop:"5px",paddingBottom:"5px"}},{flexDirection:x?"row-reverse":"row"}],inputRef:v,size:"small",fullWidth:!0,placeholder:p.get("Listbox.Search"),value:f,onFocus:()=>{s&&(h("**"),g(!0)),t.isModal()||t.begin(["/qListObjectDef"])},onChange:async e=>(h(e.target.value),e.target.value.length?r.searchListObjectFor(cT,e.target.value):w()),onKeyDown:async e=>{const{currentTarget:n}=e,r=n.closest(".listbox-container");switch(e.key){case"Enter":E();break;case"Escape":C(r),t.isActive()&&t.cancel();break;case"Tab":e.shiftKey?o.focusSelection():(C(r),null==r||r.querySelectorAll(".last-focused").forEach((e=>{e.classList.remove("last-focused")})));break;case"f":case"F":if(!e.ctrlKey&&!e.metaKey)return;d&&(d(),C(r));break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:l,inputProps:{tabIndex:o.innerTabStops?0:-1,style:{textAlign:"".concat(S)},"data-testid":"search-input-field"}}):null}function fT(e){return Object.keys(te.prototype).forEach((t=>{e[t]=te.prototype[t]})),te.init(e),e}const hT=e=>{let t,{appSelections:n,appModal:r,model:o}=e,i=!1,a=!1;const l={id:o.id,setLayout(e){t=e},begin(e){const t=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",t),t.isPrevented()?Promise.resolve():(i=!0,this.emit("activated"),r.begin(o,e,!0))},clear(){return a=!1,this.emit("cleared"),t.qListObject?o.clearSelections("/qListObjectDef"):o.resetMadeSelections()},confirm(){return a=!1,i=!1,this.emit("confirmed"),this.emit("deactivated"),r.end(!0)},cancel(){return a=!1,i=!1,this.emit("canceled"),this.emit("deactivated"),r.end(!1)},async select(e){const t=this.begin([e.params[0]]);if(!n.isModal())return!1;await t;const r=await o[e.method](...e.params);return a="resetMadeSelections"!==e.method,!!r||(o.resetMadeSelections(),!1)},canClear:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked&&!t.qListObject.qDimensionInfo.qIsOneAndOnlyOne:a,canConfirm:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked:a,canCancel:()=>!(t&&t.qListObject&&t.qListObject.qDimensionInfo)||!t.qListObject.qDimensionInfo.qLocked,isActive:()=>i,isModal:()=>n.isModal(o),goModal:e=>r.begin(o,e,!1),noModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.end(e)}};return fT(l),l},mT=e=>{let{elements:t,objectSelections:n,options:r={}}=e;const o=function(e){let{elements:t,handleClickOutside:n}=e;return e=>{if(!document.contains(e.target))return;const r=t.map((e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current)).filter((e=>!!e&&!!document.contains(e)));r.length&&!r.some((t=>t.contains(e.target)))&&n(e)}}({elements:t,handleClickOutside:()=>n.confirm.call(n)});return{activateClickOut(){var e;document.addEventListener("mousedown",o),null==r||null===(e=r.onSelectionActivated)||void 0===e||e.call(r)},deactivateClickOut(){var e;document.removeEventListener("mousedown",o),null==r||null===(e=r.onSelectionDeactivated)||void 0===e||e.call(r)}}};function gT(e,t,n,r){const o=Array.isArray(n)?n:[n],[i]=jw(e),[a]=TL(t),l=t?t.id:null,[s]=Nw(),[c]=qw(),u=s.get(e.id);let d=c.get(l);return U.useEffect((()=>{i&&t&&!d&&(d=hT({appSelections:i,appModal:u,model:t}),c.set(l,d),c.dispatch(!0))}),[i,t]),U.useEffect((()=>{if(!d)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=mT({elements:o,objectSelections:d,options:r});return d.addListener("activated",e),d.addListener("deactivated",t),()=>{d.isActive()&&d.confirm(),d.removeListener("activated",e),d.removeListener("deactivated",t)}}),[d]),U.useEffect((()=>{d&&d.setLayout(a)}),[d,a]),[d]}function vT(){const e={itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,update(t){var n,r,o;let{setPages:i,pages:a,isSingleSelect:l,selectDisabled:s,layout:c}=t;this.setPages=i;const u=this.lastRowCount===c.qListObject.qSize.qcy,d=this.lastApprMaxGlyphCount===c.qListObject.qDimensionInfo.qApprMaxGlyphCount;u&&d||(this.lastRowCount=c.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=c.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),e.enginePages!==a&&void 0!==a&&(e.enginePages=null!=a?a:[],e.selectedInEngine=UL(a),e.selectableValuesUpdating=!1,e.triggerStateChanged()),e.isSingleSelect=l,e.selectDisabled=s,e.isDimCalculated=null!==(n=null==c||null===(r=c.qListObject)||void 0===r||null===(o=r.qDimensionInfo)||void 0===o?void 0:o.qIsCalculated)&&void 0!==n&&n},allowedToSelect:()=>!e.selectDisabled()&&!(e.isDimCalculated&&e.selectableValuesUpdating),setSelectableValuesUpdating(){e.selectableValuesUpdating=!0},useClientItemState:t=>e.ignoreSelectionState||t in e.itemStates,isSelected:t=>e.useClientItemState(t)?!!e.itemStates[t]:e.selectedInEngine.includes(t),getState(t){const{qElemNumber:n,qState:r}=t;return e.useClientItemState(n)?e.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(t,n,r){const o=e.isSelected(t);o&&!n?e.itemStates[t]=!1:o||(null==r||r.push(t),e.itemStates[t]=!0)},triggerStateChanged(){if(this.setPages){const t=e.applySelectionsOnPages(e.enginePages);this.setPages(t)}},applySelectionsOnPages(t){const n=t.map((t=>{const n=t.qMatrix.map((t=>{const[n]=t,r=e.getState(n);return[i(i({},n),{},{qState:r}),...t.slice(1)]}));return i(i({},t),{},{qMatrix:n})}));return n},updateItem(t,n,r){e.updateItemNoEvents(t,n,r),e.triggerStateChanged()},updateItems(t,n,r){t.forEach((t=>{e.updateItemNoEvents(t,n,r)})),e.triggerStateChanged()},clearItemStates(t){e.itemStates={},e.ignoreSelectionState=t}};return e}const bT=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:r};function yT(e){let{alignTo:t,anchorOrigin:n={vertical:"bottom",horizontal:"center"},transformOrigin:r={vertical:"top",horizontal:"center"},show:o,close:i,app:a,fieldName:l,stateName:s="$",autoFocus:c}=e;const u=Boolean(null==l?void 0:l.qLibraryId),d=o&&Boolean(t.current),[p,f]=U.useState(0),h=ay(),m=U.useRef(),[g]=kL({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:s,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],qFieldDefs:u?void 0:[l]},qLibraryId:u?l.qLibraryId:void 0}},a,l,s),v=U.useCallback((()=>{g.lock("/qListObjectDef")}),[g]),b=U.useCallback((()=>{g.unlock("/qListObjectDef")}),[g]),{translator:y}=U.useContext(Iw),x=U.useRef(),S=U.useRef(),[w]=gT(a,g,S),[E]=TL(g),[C]=U.useState((()=>vT()));if(U.useEffect((()=>{w&&d&&(w.isModal(g)||w.goModal("/qListObjectDef"))}),[w,d]),!g||!E||!y)return null;const k=!0===E.qListObject.qDimensionInfo.qLocked,R=(e,t)=>{const n="escapeKeyDown"!==t;w.noModal(n),i()},L=FI({layout:E,model:g,translator:y,selectionState:C}),O=function(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return bT(t,"qSelected",0)+bT(t,"qSelectedExcluded",0)+bT(t,"qLocked",0)+bT(t,"qLockedExcluded",0)>0}(E);return H.createElement(SR,{open:d,onClose:R,anchorEl:t.current,anchorOrigin:n,transformOrigin:r,PaperProps:{style:{minWidth:"250px"}}},H.createElement(pk,{container:!0,direction:"column",gap:0,ref:S},H.createElement(pk,{item:!0,container:!0,style:{padding:h.spacing(1)}},H.createElement(pk,{item:!0},k?H.createElement(uE,{onClick:b,disabled:!k,size:"large"},H.createElement(zL,{title:y.get("Listbox.Unlock")})):H.createElement(uE,{onClick:v,disabled:!O,size:"large"},H.createElement(AL,{title:y.get("Listbox.Lock")}))),H.createElement(pk,{item:!0,xs:!0}),H.createElement(pk,{item:!0},H.createElement(lT,{more:{enabled:!k,actions:L,alignTo:x,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:w,onConfirm:R,onCancel:()=>R(0,"escapeKeyDown")}}))),H.createElement(pk,{item:!0,xs:!0},H.createElement("div",{ref:x}),H.createElement(pk,{item:!0,ref:m},H.createElement(pT,{visible:!0,model:g,listCount:p,selections:w,selectionState:C,keyboard:{enabled:!1},autoFocus:null==c||c})),H.createElement(qI,{model:g,app:a,layout:E,selections:w,selectionState:C,direction:"ltr",onSetListCount:e=>f(e),onCtrlF:()=>{const e=m.current.querySelector("input");null==e||e.focus()}}))))}function xT(e){let{field:t,api:n,stateIx:r=0,skipHandleShowListBoxPopover:o=!1,moreAlignTo:i=null,onClose:a=(()=>{})}=e;const{translator:l}=U.useContext(Iw),s=i||U.useRef(),c=ay(),[u,d]=U.useState(!1),p=e=>{e.currentTarget.contains(e.target)&&d(!u)},f=()=>{d(!1),a()},h=t.selections[r];void 0===h.qTotal&&(h.qTotal=0);const m=h.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},g=(m.qSelected+m.qLocked)/h.qTotal,v=m.qAlternative/h.qTotal,b=(m.qExcluded+m.qLockedExcluded+m.qSelectedExcluded)/h.qTotal,y=m.qSelected+m.qSelectedExcluded+m.qLocked+m.qLockedExcluded,x=0===y&&0===h.qTotal;let S="";h.qTotal===y&&h.qTotal>1?S=l.get("CurrentSelections.All"):y>1&&h.qTotal?S=l.get("CurrentSelections.Of",[y,h.qTotal]):h.qSelectedFieldSelectionInfo&&(S=h.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==t.states[r]&&(S="".concat(t.states[r],": ").concat(S));const w=[{color:c.palette.selected.main,ratio:g},{color:c.palette.selected.alternative,ratio:v},{color:c.palette.selected.excluded,ratio:b}];w.forEach(((e,t)=>{e.offset=t?w[t-1].offset+w[t-1].ratio:0}));let E=null,C=null,k=null,R=null;return i||(E=H.createElement(pk,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:h.qLocked?"0.3":""}},H.createElement(vE,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},h.qField),H.createElement(vE,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},S)),h.qLocked?C=H.createElement(pk,{item:!0},H.createElement(uE,{size:"large"},H.createElement(zL,null))):h.qOneAndOnlyOne||(C=H.createElement(pk,{item:!0},H.createElement(uE,{title:l.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),n.clearField(h.qField,t.states[r])},size:"large"},H.createElement(qL,null)))),k=H.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===x&&w.map((e=>H.createElement("div",{key:e.color,style:{position:"absolute",background:e.color,height:"100%",top:0,width:"".concat(100*e.ratio,"%"),left:"".concat(100*e.offset,"%")}})))),R=H.createElement(pk,{container:!0,gap:1,ref:s,sx:{backgroundColor:c.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:c.palette.action.hover}},onClick:!1===o&&p||null},E,C,k,u&&H.createElement(yT,{alignTo:s,show:u,close:f,app:n.model,fieldName:h.qField,stateName:t.states[r]}))),i?H.createElement(yT,{alignTo:s,show:!0,close:f,app:n.model,fieldName:h.qField,stateName:t.states[r]}):R}var ST=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M8,9 L12.5,4.5 L14,6 L9.5,10.5 L8,12 L2,6 L3.5,4.5 L8,9 Z"}}]}))(e));const wT={item:"".concat("MultiState","-item")},ET=uy(pk)((e=>{let{theme:t}=e;return{["&.".concat(wT.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function CT(e){let{field:t,api:n,moreAlignTo:r=null,onClose:o=(()=>{})}=e;const[i,a]=U.useState(!!r),[l,s]=U.useState(-1),[c,u]=U.useState(r?r.current:null),d=r||U.useRef(),{translator:p}=U.useContext(Iw),f=p.get("Selection.ClearAllStates"),h=()=>{s(-1),o()};let m=null;r||(m=H.createElement(H.Fragment,null,H.createElement(pk,{item:!0,xs:!0,zeroMinWidth:!0},H.createElement(eC,{style:{padding:"0px 8px"},color:"secondary",badgeContent:t.states.length},H.createElement(vE,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},t.name))),H.createElement(pk,{item:!0},H.createElement("div",{style:{width:"12px"}})),H.createElement(pk,{item:!0},H.createElement(uE,{size:"large"},H.createElement(ST,null)))));const g=H.createElement(zk,{dense:!0},H.createElement(Xk,{title:f,onClick:()=>{t.states.forEach((e=>n.clearField(t.name,e)))}},H.createElement(gw,{variant:"contained",fullWidth:!0},f)),t.states.map(((e,r)=>H.createElement(Xk,{key:r,title:t.name,onClick:e=>((e,t)=>{e.stopPropagation(),a(!1),s(t)})(e,r)},H.createElement(rC,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},H.createElement(xT,{field:t,api:n,stateIx:r,skipHandleShowListBoxPopover:!0})))))),v=H.createElement(SR,{open:i,onClose:()=>{a(!1),o()},anchorEl:c,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},g),b=r?v:H.createElement(ET,{container:!0,gap:0,className:wT.item,onClick:e=>{e.currentTarget.contains(e.target)&&(u(e.currentTarget),d.current=e.currentTarget,a(!i))}},m,i&&v,l>-1&&H.createElement(yT,{alignTo:d,show:l>-1,close:h,app:n.model,fieldName:t.selections[l].qField,stateName:t.states[l]}));return r&&l>-1?H.createElement(yT,{alignTo:d,show:l>-1,close:h,app:n.model,fieldName:t.selections[l].qField,stateName:t.states[l]}):b}const kT="More",RT={item:"".concat(kT,"-item"),badge:"".concat(kT,"-badge")},LT=uy(pk)((e=>{let{theme:t}=e;return{["&.".concat(RT.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(RT.badge)]:{padding:t.spacing(0,1)}}}));function OT(e){let{items:t=[],api:n}=e;const r=ay(),[o,i]=U.useState(!1),[a,l]=U.useState(-1),[s,c]=U.useState(null),u=U.useRef(),d=()=>{l(-1)};let p=null;return a>-1&&(p=t[a].states.length>1?H.createElement(CT,{field:t[a],api:n,moreAlignTo:u,onClose:d}):H.createElement(xT,{field:t[a],api:n,skipHandleShowListBoxPopover:!0,moreAlignTo:u,onClose:d})),H.createElement(LT,{container:!0,gap:0,className:RT.item,onClick:e=>{e.currentTarget.contains(e.target)&&(c(e.currentTarget),u.current=e.currentTarget,i(!o))}},H.createElement(pk,{item:!0},H.createElement(rC,{borderRadius:r.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:r.palette.selected.main,color:r.palette.selected.mainContrastText}},H.createElement(vE,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",t.length))),H.createElement(pk,{item:!0},H.createElement(uE,{size:"large"},H.createElement(ST,null))),o&&H.createElement(SR,{open:o,onClose:()=>{i(!1)},anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},H.createElement(zk,{dense:!0},t.map(((e,t)=>H.createElement(Xk,{key:t,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),i(!1),l(t)})(e,t)},H.createElement(rC,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?H.createElement(CT,{field:e,api:n}):H.createElement(xT,{field:e,api:n}))))))),p)}function IT(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$";e.qSelections.forEach((e=>{const r=e.qField,o=t[r]=t[r]||{name:r,states:[],selections:[]};-1===o.states.indexOf(n)&&(o.states.push(n),o.selections.push(e))}))}function TT(e){let{api:t,app:n}=e;const r=ay(),[o]=LL(n),[i]=TL(o),[a,l]=U.useState({items:[],more:[]}),[s]=Aw(),[c,u]=_L(),[d,p]=U.useState(0);return U.useEffect((()=>{if(!u)return;const{width:e}=u,t=Math.floor(e)-72,n=Math.floor(t/120);p(n)}),[u]),U.useEffect((()=>{if(!(n&&o&&i&&d))return;const e=function(e){if(!e)return[];const t={};return e.qSelectionObject&&IT(e.qSelectionObject,t),e.alternateStates&&e.alternateStates.forEach((e=>IT(e.qSelectionObject,t,e.stateName))),Object.keys(t).map((e=>t[e])).filter((e=>!e.selections.some((e=>e.qIsHidden))))}(i);l((t=>{const r=e;if((()=>{const e=s.get(n.id);return e&&"njsListbox"===e.genericType})()&&r.length+1===t.items.length){const e=t.items.filter((e=>!1===r.some((t=>e.name===t.name))))[0],{qField:n}=e.selections[0];e.selections=[{qField:n}];const o=t.items.indexOf(e);r.splice(o,0,e)}let o=[];return d<r.length&&(o=r.splice(d-r.length)),{items:r,more:o}}))}),[n,o,i,t.isInModal(),d]),H.createElement(pk,{ref:c,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},a.items.map((e=>H.createElement(pk,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(120,"px"),background:r.palette.background.paper,borderRight:"1px solid ".concat(r.palette.divider)}},e.states.length>1?H.createElement(CT,{field:e,api:t}):H.createElement(xT,{field:e,api:t})))),a.more.length>0&&H.createElement(pk,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(72,"px"),background:r.palette.background.paper,borderRight:"1px solid ".concat(r.palette.divider)}},H.createElement(OT,{items:a.more,api:t})))}var PT=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 Z M16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,-5.07265313e-17 13.5,0 L15,0 C15.5522847,1.01453063e-16 16,0.44771525 16,1 L16,2.5 Z M10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,-5.07265313e-17 6.5,0 L9.5,0 C9.77614237,5.07265313e-17 10,0.223857625 10,0.5 Z M1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 5.18696197e-13,2.77614237 5.18696197e-13,2.5 L5.18696197e-13,1 C5.18696197e-13,0.44771525 0.44771525,-1.01453063e-16 1,0 L2.5,0 C2.77614237,5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 5.18696197e-13,15.5522847 5.18696197e-13,15 L5.18696197e-13,13.5 C5.18696197e-13,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M4,7 C7.49095643,7 10,10.1337595 10,12.1872632 C10,12.1872632 8.16051135,9.86624054 4,10 L4,12 C4,12 2.66666667,10.8333333 -1.0658141e-14,8.5 C-2.59348099e-13,8.5 1.33333333,7.33333333 4,5 C4,5 4,5.66666667 4,7 Z"}}]}))(e));var _T=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M12,7 C12,5.66666667 12,5 12,5 C14.6666667,7.33333333 16,8.5 16,8.5 C13.3333333,10.8333333 12,12 12,12 L12,10 C7.83948865,9.86624054 6,12.1872632 6,12.1872632 C6,10.1337595 8.50904357,7 12,7 Z"}}]}))(e));function NT(e){const[t]=LL(e),[n]=TL(t),[r]=PL(e),[o,i]=U.useState(null);return U.useEffect((()=>{r&&t&&n&&((e,t,n)=>{const r=[...n.qStateNames||[]].map((e=>({stateName:e,qSelectionObjectDef:{qStateName:e}})));(t&&t.alternateStates?t.alternateStates.map((e=>e.stateName)):[]).join("::")!==(n.qStateNames||[]).map((e=>e)).join("::")&&e.applyPatches([{qOp:"replace",qPath:"/alternateStates",qValue:JSON.stringify(r)}],!0)})(t,n,r)}),[r,t,n]),U.useEffect((()=>{if(!n)return;let e=!1,t=!1,r=!1;[n,...n.alternateStates||[]].forEach((n=>{e=e||n.qSelectionObject&&n.qSelectionObject.qBackCount>0,t=t||n.qSelectionObject&&n.qSelectionObject.qForwardCount>0,r=r||(n.qSelectionObject&&n.qSelectionObject.qSelections||[]).filter((e=>!0!==e.qLocked)).length>0})),i({canGoBack:e,canGoForward:t,canClear:r})}),[n]),[o,t,n]}function MT(e){let{api:t,app:n}=e;const{translator:r}=U.useContext(Iw),[o]=NT(n);return H.createElement(pk,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},H.createElement(pk,{item:!0},H.createElement(uE,{style:{marginRight:"8px"},disabled:!o||!o.canGoBack,title:r.get("Navigate.Back"),onClick:()=>t.back(),size:"large"},H.createElement(PT,null))),H.createElement(pk,{item:!0},H.createElement(uE,{style:{marginRight:"8px"},disabled:!o||!o.canGoForward,title:r.get("Navigate.Forward"),onClick:()=>t.forward(),size:"large"},H.createElement(_T,null))),H.createElement(pk,{item:!0},H.createElement(uE,{disabled:!o||!o.canClear,title:r.get("Selection.ClearAll"),onClick:()=>t.clear(),size:"large"},H.createElement(GI,null))))}const qT=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function zT(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function AT(){return qT.map(zT).join("")}function DT(e){let{app:t}=e;const n=ay(),[r]=jw(t);return r?H.createElement(pk,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:n.palette.background.paper,minHeight:"40px"}},H.createElement(pk,{item:!0,style:{borderRight:"1px solid ".concat(n.palette.divider)}},H.createElement(MT,{api:r,app:t})),H.createElement(pk,{item:!0,xs:!0,style:{backgroundColor:n.palette.background.darker,overflow:"hidden"}},H.createElement(TT,{api:r,app:t}))):null}function jT(e){let{element:t,app:n}=e;return wp.createPortal(H.createElement(DT,{app:n}),t,AT())}var FT,BT="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};let $T;$T="undefined"!=typeof window?window:"undefined"!=typeof self?self:BT;let WT=null,UT=null;const HT=$T.clearTimeout,VT=$T.setTimeout,GT=$T.cancelAnimationFrame||$T.mozCancelAnimationFrame||$T.webkitCancelAnimationFrame,KT=$T.requestAnimationFrame||$T.mozRequestAnimationFrame||$T.webkitRequestAnimationFrame;function ZT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}null==GT||null==KT?(WT=HT,UT=function(e){return VT(e,20)}):(WT=function([e,t]){GT(e),HT(t)},UT=function(e){const t=KT((function(){HT(n),e()})),n=VT((function(){GT(t),e()}),20);return[t,n]}),FT={createDetectElementResize:function(e){let t,n,r,o,i,a,l;const s="undefined"!=typeof document&&document.attachEvent;if(!s){a=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},l=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;a(this),this.__resizeRAF__&&WT(this.__resizeRAF__),this.__resizeRAF__=UT((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,s="";r="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<c.length;n++)if(void 0!==t.style[c[n]+"AnimationName"]){d=c[n],s="-"+d.toLowerCase()+"-",r=u[n],e=!0;break}}n="resizeanim",t="@"+s+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=s+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(s)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const s=i.ownerDocument,c=$T.getComputedStyle(i);c&&"static"===c.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(s),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=s.createElement("div")).className="resize-triggers";const u=s.createElement("div");u.className="expand-trigger",u.appendChild(s.createElement("div"));const d=s.createElement("div");d.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(d),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",l,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&a(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(s)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",l,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}};class XT extends U.Component{constructor(...e){super(...e),ZT(this,"state",{height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0}),ZT(this,"_autoSizer",null),ZT(this,"_detectElementResize",null),ZT(this,"_parentNode",null),ZT(this,"_resizeObserver",null),ZT(this,"_onResize",(()=>{const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){var r,o,i,a;const l=window.getComputedStyle(this._parentNode)||{},s=parseInt(null!==(r=l.paddingLeft)&&void 0!==r?r:"0",10),c=parseInt(null!==(o=l.paddingRight)&&void 0!==o?o:"0",10),u=parseInt(null!==(i=l.paddingTop)&&void 0!==i?i:"0",10),d=parseInt(null!==(a=l.paddingBottom)&&void 0!==a?a:"0",10),p=this._parentNode.getBoundingClientRect(),f=p.height-u-d,h=p.width-s-c,m=this._parentNode.offsetHeight-u-d,g=this._parentNode.offsetWidth-s-c;(e||this.state.height===m&&this.state.scaledHeight===f)&&(t||this.state.width===g&&this.state.scaledWidth===h)||(this.setState({height:m,width:g,scaledHeight:f,scaledWidth:h}),"function"==typeof n&&n({height:m,scaledHeight:f,scaledWidth:h,width:g}))}})),ZT(this,"_setRef",(e=>{this._autoSizer=e}))}componentDidMount(){const{nonce:e}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,null!=this._parentNode&&("undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver((()=>{setTimeout(this._onResize,0)})),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=(0,FT.createDetectElementResize)(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r,disableWidth:o,nonce:i,onResize:a,style:l,tagName:s="div",...c}=this.props,{height:u,scaledHeight:d,scaledWidth:p,width:f}=this.state,h={overflow:"visible"},m={};let g=!1;return r||(0===u&&(g=!0),h.height=0,m.height=u,m.scaledHeight=d),o||(0===f&&(g=!0),h.width=0,m.width=f,m.scaledWidth=p),U.createElement(s,{ref:this._setRef,style:{...h,...l},...c},!g&&e(m))}}ZT(XT,"defaultProps",{onResize:()=>{},disableHeight:!1,disableWidth:!1,style:{}});var QT=XT;var JT=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"}}]}))(e));function YT(e){null==e||e.querySelectorAll(".last-focused").forEach((e=>{e.classList.remove("last-focused")}))}function eP(e){return(null==e?void 0:e.closest(".njs-cell"))||(null==e?void 0:e.closest(".qv-gridcell"))}function tP(e){let{keyboard:t,hovering:n,updateKeyScroll:r,containerRef:o,currentScrollIndex:i,isModal:a,constraints:l}=e;return{handleKeyDown:e=>{const{keyCode:n,shiftKey:r=!1}=e.nativeEvent,i=()=>{e.stopPropagation(),e.preventDefault()};if(!t.enabled)return;const l=e.currentTarget.closest(".listbox-container"),s=a();switch(n){case IO.TAB:if(s)r?_O(l)||PO(l):PO(l)||_O(l);else{if(!r)break;t.blur(!0)}i();break;case IO.ENTER:case IO.SPACE:if(!e.target.classList.contains("listbox-container"))break;t.focus(),i();break;case IO.ESCAPE:(e=>{const{currentTarget:n,target:r}=e,i=r.classList.contains("listbox-container"),a=eP(n.closest(".listbox-container")),l=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(i||l)t.blur(!0);else{YT(o.current),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}})(e)}},handleOnMouseEnter:()=>{(()=>{const e=(null==l?void 0:l.select)||(null==l?void 0:l.active),t=a();return e||t})()||(n.current=!0)},handleOnMouseLeave:()=>{n.current&&(n.current=!1)},globalKeyDown:e=>{if(!n.current)return;const{keyCode:t,ctrlKey:o=!1,shiftKey:a=!1}=e;switch(t){case IO.ARROW_UP:r({up:1});break;case IO.ARROW_DOWN:r({down:1});break;case IO.PAGE_UP:r({up:i.stop-i.start});break;case IO.PAGE_DOWN:r({down:i.stop-i.start});break;case IO.HOME:r({scrollPosition:o&&a?"overflowStart":"start"});break;case IO.END:r({scrollPosition:o&&a?"overflowEnd":"end"});break;default:return}e.preventDefault()}}}const nP=uy("div")((()=>({display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"})));function rP(e){let{text:t}=e;const{translator:n}=U.useContext(Iw);return H.createElement(nP,null,n.get(t))}const oP="ListBoxInline",iP={listBoxHeader:"".concat(oP,"-listBoxHeader"),screenReaderOnly:"".concat(oP,"-screenReaderOnly"),listboxWrapper:"".concat(oP,"-listboxWrapper")},aP=uy(pk,{shouldForwardProp:e=>!["containerPadding","isGridMode"].includes(e)})((e=>{var t,n;let{theme:r,containerPadding:o,isGridMode:i}=e;return{backgroundColor:null!==(t=null===(n=r.listBox)||void 0===n?void 0:n.backgroundColor)&&void 0!==t?t:r.palette.background.default,["& .".concat(iP.listBoxHeader)]:{alignSelf:"center",display:"flex"},["& .".concat(iP.screenReaderOnly)]:{position:"absolute",height:0,width:0,overflow:"hidden"},["& .".concat(iP.listboxWrapper)]:{padding:o},"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(r.palette.custom.focusBorder," !important")},"&:focus ::-webkit-scrollbar-track":{boxShadow:i?void 0:"inset -2px -2px 0px #3F8AB3"},"&:focus-visible":{outline:"none"}}})),lP=uy(vE)((e=>{var t,n,r,o,i,a,l,s,c,u,d,p;let{theme:f}=e;return{color:null===(t=f.listBox)||void 0===t||null===(n=t.title)||void 0===n||null===(r=n.main)||void 0===r?void 0:r.color,fontSize:null===(o=f.listBox)||void 0===o||null===(i=o.title)||void 0===i||null===(a=i.main)||void 0===a?void 0:a.fontSize,fontFamily:null===(l=f.listBox)||void 0===l||null===(s=l.title)||void 0===s||null===(c=s.main)||void 0===c?void 0:c.fontFamily,fontWeight:(null===(u=f.listBox)||void 0===u||null===(d=u.title)||void 0===d||null===(p=d.main)||void 0===p?void 0:p.fontWeight)||"bold"}}));const sP=H.memo((function(e){var t,n,r,o,a;let{options:s,layout:c}=e;const{app:u,direction:d,frequencyMode:p,checkboxes:f,search:h=!0,focusSearch:m=!1,rangeSelect:g=!0,model:v,selections:b,update:y,fetchStart:x,selectDisabled:S=(()=>!1),postProcessPages:w,calculatePagesHeight:E,showGray:C=!0,scrollState:k,renderedCallback:R,toolbar:L=!0,isPopover:O=!1}=s,I=ay(),T=U.useCallback((()=>{v.unlock("/qListObjectDef")}),[v]),{translator:P,keyboardNavigation:_,themeApi:N,constraints:M}=U.useContext(Iw);I.listBox=(e=>{const t=(t,n)=>e.getStyle("object.listBox",t,n);return{backgroundColor:t("","backgroundColor"),title:{main:{color:t("title.main","color"),fontSize:t("title.main","fontSize"),fontFamily:t("title.main","fontFamily"),fontWeight:t("title.main","fontWeight")}},content:{color:t("content","color"),fontSize:t("content","fontSize"),fontFamily:t("content","fontFamily")}}})(N);const q=function(e){let{appLayout:t}=e;return!(null==t||!t.qIsDirectQueryMode)}({appLayout:null==u?void 0:u.layout}),z=U.useRef(),[A,D]=_L(),[j,F]=(()=>{const[e,t]=U.useState({}),n=U.useCallback((e=>{t({current:e})}),[t]);return[e,n]})(),[B,$]=U.useState(!1),[W,V]=U.useState(!1),G=U.useRef(!1),[K,Z]=U.useState({down:0,up:0,scrollPosition:""}),X=e=>Z((t=>i(i({},t),e))),[Q,J]=U.useState({start:0,stop:0}),[Y]=jw(u),ee=U.useRef(null),[te]=U.useState((()=>vT())),ne=function(e){let{containerRef:t,enabled:n}=e;const[r,o]=U.useState(!1),i={enabled:n,active:r,innerTabStops:!n||r,blur(e){var r;if(!n)return;o(!1);const i=eP(t.current)||(null===(r=t.current)||void 0===r?void 0:r.parentElement);var a;null==(a=t.current)||a.querySelectorAll('[tabIndex="0"]').forEach((e=>{e.setAttribute("tabIndex",-1)})),YT(t.current),e&&i&&(i.setAttribute("tabIndex",0),i.focus())},focus(){if(!n)return;o(!0);const e=t.current,r=null==e?void 0:e.querySelector(".search input"),i=null==e?void 0:e.querySelector(".value.last-focused"),a=null==e?void 0:e.querySelector(".value.selector, .value"),l=null==e?void 0:e.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),s=r||i||a||l;null==s||s.setAttribute("tabIndex",0),null==s||s.focus()},focusSelection(){const e=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm");null==e||e.setAttribute("tabIndex",0),null==e||e.focus()}};return i}({containerRef:z,enabled:_}),re=U.useCallback((()=>(e=>{var t,n;let{app:r,appSelections:o}=e;return null!==(t=null===(n=r.isInModalSelection)||void 0===n?void 0:n.call(r))&&void 0!==t?t:o.isInModal()})({app:u,appSelections:Y})),[u,Y]),oe=null==c?void 0:c.qListObject.qDimensionInfo.qError,ie=oe&&M.active?"Visualization.Invalid.Dimension":"Visualization.Incomplete",[ae,le]=U.useState(!1),{handleKeyDown:se,handleOnMouseEnter:ce,handleOnMouseLeave:ue,globalKeyDown:de}=U.useMemo((()=>tP({keyboard:ne,hovering:G,updateKeyScroll:X,containerRef:z,currentScrollIndex:Q,app:u,appSelections:Y,constraints:M,isModal:re})),[ne,G,X,z,Q,u,Y,M,re]),pe=L&&(""===(null==c?void 0:c.title)||!1===(null==c?void 0:c.showTitle))&&!O,fe=L&&""!==(null==c?void 0:c.title)&&!1!==(null==c?void 0:c.showTitle)||O;U.useEffect((()=>(document.addEventListener("keydown",de),()=>{document.removeEventListener("keydown",de)})),[de]),U.useEffect((()=>{const e=()=>{$(!0)},t=()=>{$(!1),"toggle"===h&&V(!1)};return O&&(b.isActive()||(b.begin("/qListObjectDef"),b.on("activated",e),b.on("deactivated",t)),$(O)),b&&(b.isModal()||(b.on("activated",e),b.on("deactivated",t)),$(b.isActive())),()=>{b&&b.removeListener&&(b.removeListener("activated",e),b.removeListener("deactivated",t))}}),[b,O]),U.useEffect((()=>{if(j&&j.current&&(h&&m||"toggle"===h&&W)){const e=j.current.querySelector("input");e&&e.focus()}}),[j&&j.current,W,h,m]);const{wildCardSearch:he,searchEnabled:me,layoutOptions:ge={}}=null!=c?c:{},ve=!1!==me&&"toggle"===h,be=!0===(null==c||null===(t=c.qListObject)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.qLocked),ye=be||ve,xe="H"===(null==c||null===(r=c.qListObject)||void 0===r||null===(o=r.qDimensionInfo)||void 0===o?void 0:o.qGrouping),Se=ye||xe,we=(ye?28:0)+(xe?19:0);if(U.useEffect((()=>{if(!ee.current||!D)return;const e=function(e){var t,n,r,o;let{containerRect:i,titleRef:a,iconsWidth:l}=e;const s=i.width<(null!==(t=null==a||null===(n=a.current)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)+l+16+128,c=(null==a||null===(r=a.current)||void 0===r?void 0:r.scrollWidth)>(null==a||null===(o=a.current)||void 0===o?void 0:o.offsetWidth);return!(!s&&!c)}({containerRect:D,titleRef:ee,iconsWidth:we});le(e)}),[ee.current,D]),!v||!c||!P)return null;const Ee="rtl"===d,Ce=FI({layout:c,model:v,translator:P,selectionState:te,isDirectQuery:q}),ke=(!0===h||"toggle"===h&&W)&&!S()&&!1!==me,Re=null!==(a=ge.dense)&&void 0!==a&&a,Le=fe?49+(ke?Re?27:40:0)+(Re?39:49):0,Oe=()=>{V(!W)},Ie=()=>{if("toggle"===h)Oe();else{const e=j.current.querySelector("input");null==e||e.focus()}},Te=e=>function(e){let{isDetached:t,showToolbar:n,containerRef:r,isLocked:o,listboxSelectionToolbarItems:i,selections:a,keyboard:l}=e;return{show:n&&!t,popover:{show:n&&t,anchorEl:r.current},more:{enabled:!o,actions:i,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:n,api:a,onConfirm:()=>{null==l||l.focus()},onCancel:()=>{null==l||l.focus()}}}}({isDetached:!O&&e,showToolbar:B,containerRef:z,isLocked:be,listboxSelectionToolbarItems:Ce,selections:b,keyboard:ne}),Pe=ke&&"toggle"===h,_e=9-(ye?7:0),Ne=Ee?9-(Se?7:0):0,Me="grid"===(null==ge?void 0:ge.dataLayout);let qe;Me&&(qe="row"===ge.layoutOrder?"2px 4px":"2px 6px 2px 4px");const ze=null!=M&&M.active?H.createElement(sT,{title:P.get("Listbox.Search"),size:"large",style:{fontSize:"12px",padding:"7px"}}):H.createElement(uE,{onClick:Oe,tabIndex:-1,title:P.get("Listbox.Search"),size:"large",disableRipple:!0,"data-testid":"search-toggle-btn"},H.createElement(sT,{style:{fontSize:"12px"}})),Ae=S()?H.createElement(zL,{size:"large",style:{fontSize:"12px",padding:"7px"}}):H.createElement(uE,{title:P.get("SelectionToolbar.ClickToUnlock"),tabIndex:-1,onClick:T,size:"large"},H.createElement(zL,{disableRipple:!0,style:{fontSize:"12px"}}));return H.createElement(H.Fragment,null,pe&&H.createElement(lT,l({direction:d},Te(!0))),H.createElement(aP,{className:"listbox-container",container:!0,tabIndex:ne.enabled?-1:void 0,direction:"column",gap:0,containerPadding:qe,style:{height:"100%",minHeight:"".concat(Le,"px"),flexFlow:"column nowrap"},onKeyDown:se,onMouseEnter:ce,onMouseLeave:ue,ref:e=>{z.current=e,A(e)},isGridMode:Me},fe&&H.createElement(pk,{item:!0,container:!0,minHeight:32,flexDirection:Ee?"row-reverse":"row",marginY:1,paddingLeft:"".concat(_e,"px"),paddingRight:"".concat(Ne,"px"),wrap:"nowrap"},Se&&H.createElement(pk,{item:!0,container:!0,alignItems:"center",width:we},be?Ae:ve&&ze,xe&&H.createElement(JT,{tabIndex:-1,title:P.get("Listbox.DrillDown"),size:"large",style:{fontSize:"12px"}})),H.createElement(pk,{item:!0,xs:!0,minWidth:0,justifyContent:Ee?"flex-end":"flex-start",className:iP.listBoxHeader},H.createElement(lP,{variant:"h6",noWrap:!0,ref:ee,title:c.title},c.title)),H.createElement(pk,{item:!0},H.createElement(lT,l({direction:d},Te(ae))))),H.createElement(pk,{item:!0,container:!0,direction:"column",style:{height:"100%",minHeight:"50px"},role:"region","aria-label":P.get("Listbox.ResultFilterLabel")},H.createElement(pk,{item:!0,ref:F},H.createElement("div",{className:iP.screenReaderOnly},P.get("Listbox.Search.ScreenReaderInstructions")),H.createElement(pT,{selections:b,selectionState:te,model:v,dense:Re,keyboard:ne,visible:ke,search:h,autoFocus:Pe,wildCardSearch:he,searchEnabled:me,direction:d,hide:ve&&Oe})),H.createElement(pk,{item:!0,xs:!0,className:iP.listboxWrapper},H.createElement("div",{className:iP.screenReaderOnly},P.get("Listbox.ScreenReaderInstructions")),oe?H.createElement(rP,{text:ie}):H.createElement(QT,null,(e=>{let{height:t,width:n}=e;return H.createElement(qI,{model:v,app:u,constraints:M,layout:c,selections:b,selectionState:te,direction:d,frequencyMode:p,rangeSelect:g,checkboxes:f,height:t,width:n,update:y,fetchStart:x,postProcessPages:w,calculatePagesHeight:E,selectDisabled:S,keyboard:ne,showGray:C,scrollState:k,keyScroll:{state:K,reset:()=>Z({up:0,down:0,scrollPosition:""})},currentScrollIndex:{state:Q,set:J},renderedCallback:R,onCtrlF:Ie,isModal:re})}))))))}));function cP(e){let{options:t={}}=e;const{model:n}=t,[r]=TL(n);return H.createElement(sP,{options:t,layout:r})}const uP={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:"",qShowAlternatives:!0,frequencyEnabled:!1,qFrequencyMode:"N",qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},histogram:!1,frequencyMax:void 0,checkboxes:!1,searchEnabled:!0,showTitle:!0,wildCardSearch:!1,layoutOptions:{dense:!1,dataLayout:"singleColumn",layoutOrder:"row",maxVisibleColumns:{auto:!0,maxColumns:3},maxVisibleRows:{auto:!0,maxRows:3}},title:""};const dP=["__DO_NOT_USE__"],pP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n=s(e,dP),r={update:void 0,fetchStart:void 0,showGray:!0,focusSearch:!1,sessionModel:void 0,selectionsApi:void 0,selectDisabled:void 0,postProcessPages:void 0,calculatePagesHeight:!1},o=i(i(i({},n),r),t);return o};function fP(e){let{app:t,fieldIdentifier:n,qId:r,stateName:o,element:a,options:l,renderedCallback:s}=e;const{isExistingObject:c,hasExternalSelectionsApi:u}=function(e){let{qId:t,options:n}=e;return{isExistingObject:!(!t&&!n.sessionModel),hasExternalSelectionsApi:!!n.selectionsApi}}({qId:r,options:l}),[d,p]=U.useState(0);U.useEffect((()=>{if(d)throw new Error("Source or selection Api can not change after a listbox has been mounted");p(d+1)}),[c,u]);const f=c?function(e){let{app:t,qId:n,options:r={}}=e;const[o,i]=U.useState(),[a]=EL(),{sessionModel:l}=r,s=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],c=Object.keys(r).filter((e=>s.includes(e)));if(c.length)throw new Error('Option "'.concat(c.join(", "),'" is not applicable for existing objects.'));return U.useEffect((()=>{l?i(l):async function(){const e=a.get(n);if(e)i(e);else{const e=await t.getObject(n);a.set(e.id,e),e.once("closed",(()=>{a.clear(e.id)})),i(e)}}()}),[]),o}({app:t,qId:r,options:l}):function(e){var t;let{app:n,fieldIdentifier:r,stateName:o,options:i={}}=e;const[a,l]=U.useState(""),[s,c]=U.useState(!0),[u,d]=U.useState(),[p,f]=U.useState(),h=null!==(t=i.title)&&void 0!==t?t:p;U.useEffect((()=>{const e=i.histogram||"N"!==i.frequencyMode;r.qLibraryId&&e?async function(){try{const e=await n.getDimension(r.qLibraryId),t=await e.getLayout();f(t.qDim.title),"N"===t.qDim.qGrouping?l(t.qDim.qFieldDefs?t.qDim.qFieldDefs[0]:""):l({multiFieldDim:!0}),c(!1)}catch(e){throw c(!1),l({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}():(c(!1),f(r))}),[]);const{dense:m,checkboxes:g,listLayout:v,properties:b={}}=i;let{frequencyMode:y,histogram:x=!1}=i;switch(a&&a.failedToFetchFieldDef&&(x=!1,y="N"),!0){case["none","N","NX_FREQUENCY_NONE"].includes(y):y="N";break;case["value","V","NX_FREQUENCY_VALUE","default"].includes(y):y="V";break;case["percent","P","NX_FREQUENCY_PERCENT"].includes(y):y="P";break;case["relative","R","NX_FREQUENCY_RELATIVE"].includes(y):y="R";break;default:y="N"}const S={dense:m};"horizontal"===v&&(S.dataLayout="grid",S.layoutOrder="column",S.maxVisibleColumns={auto:!0},S.maxVisibleRows={auto:!1,maxRows:1});const w=U.useRef();w.current||(w.current=AT());const E=Ve(!0,{},uP,{qInfo:{qId:w.current},qListObjectDef:{qStateName:o,qFrequencyMode:x&&"N"===y?"V":y},histogram:x,checkboxes:g,layoutOptions:S,title:h});let C;if(Ve(!0,E,b),r.qLibraryId?(E.qListObjectDef.qLibraryId=r.qLibraryId,C=r.qLibraryId):(E.qListObjectDef.qDef.qFieldDefs=[r],C=r),"P"!==y&&x)if(null!=a&&a.multiFieldDim)E.frequencyMax="fetch";else{const e=r.qLibraryId?a:C;E.frequencyMax={qValueExpression:PI(e)}}const[k]=kL(E,s?null:n,C,o);return U.useEffect((()=>{k&&d(k)}),[k]),u}({app:t,fieldIdentifier:n,stateName:o,options:l}),h=U.useRef(a),m=u?l.selectionsApi:gT(t,f,[h,".njs-action-toolbar-more",".njs-action-toolbar-popover"],l)[0],g=U.useMemo((()=>i(i({},l),{},{selections:m,model:f,app:t,renderedCallback:s})),[l,m,f,t]);return m&&f?H.createElement(cP,{options:g}):null}function hP(e){let{element:t,app:n,fieldIdentifier:r,qId:o,stateName:i="$",options:a={},renderedCallback:l}=e;return wp.createPortal(H.createElement(fP,{app:n,element:t,fieldIdentifier:r,qId:o,stateName:i,options:a,renderedCallback:l}),t,AT())}const mP={show:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},gP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=i({},mP);return Ve(!0,t,e),t};function vP(e){let{app:t,fieldIdentifier:n,stateName:r,element:o,options:i={}}=e;const[a,l]=U.useState(!!i.show);return H.createElement(yT,{show:a,app:t,alignTo:{current:o},anchorOrigin:i.anchorOrigin,transformOrigin:i.transformOrigin,close:()=>{l(!1),i.onPopoverClose&&i.onPopoverClose()},fieldName:n,stateName:r,autoFocus:i.autoFocus})}function bP(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function yP(e,t){let n=0;for(let r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}function xP(e){let{dc:t,def:n,properties:r}=e;t.qDimensions=t.qDimensions||[],t.qMeasures=t.qMeasures||[],t.qInterColumnSortOrder=t.qInterColumnSortOrder||[],t.qInitialDataFetch=t.qInitialDataFetch||[],t.qColumnOrder=t.qColumnOrder||[],t.qExpansionState=t.qExpansionState||[];const o=r,a={dimensions:()=>t.qDimensions,measures:()=>t.qMeasures,addDimension(e){const r="string"==typeof e?(e=>({qDef:{qFieldDefs:[e]}}))(e):i(i({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||AT(),r.qDef.qSortCriterias=r.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],r.qOtherTotalSpec=r.qOtherTotalSpec||{},r.qAttributeExpressions=r.qAttributeExpressions||[],r.qAttributeDimensions=r.qAttributeDimensions||[],t.qDimensions.length<a.maxDimensions()?(t.qDimensions.push(r),bP(t.qInterColumnSortOrder,t.qDimensions.length-1),n.dimensions.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qDimensions.push(r)),r},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];return yP(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e),r},addMeasure(e){const r="string"==typeof e?(e=>({qDef:{qDef:e}}))(e):i(i({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||AT(),r.qSortBy=r.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},r.qAttributeDimensions=r.qAttributeDimensions||[],r.qAttributeExpressions=r.qAttributeExpressions||[],t.qMeasures.length<a.maxMeasures()?(t.qMeasures.push(r),bP(t.qInterColumnSortOrder,t.qDimensions.length+t.qMeasures.length-1),n.measures.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qMeasures.push(r))},removeMeasure(e){const r=t.qMeasures.splice(e,1)[0];yP(t.qInterColumnSortOrder,t.qDimensions.length+e),n.measures.removed(r,o,e)},maxDimensions:()=>n.dimensions.max(t.qMeasures.length),maxMeasures:()=>n.measures.max(t.qDimensions.length),canAddDimension:()=>t.qDimensions.length<a.maxDimensions(),canAddMeasure:()=>t.qMeasures.length<a.maxMeasures()};return a}function SP(e){let{dc:t,def:n,properties:r}=e;t.qInitialDataFetch=t.qInitialDataFetch||[];const o=r,a={dimensions:()=>t.qLibraryId||t.qDef&&t.qDef.qFieldDefs&&0!==t.qDef.qFieldDefs.length?[t]:[],measures:()=>[],addDimension(e){const r="string"==typeof e?(e=>({qDef:{qFieldDefs:[e]}}))(e):i(i({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||AT(),r.qDef.qSortCriterias=t.qDef.qSortCriterias||[{qSortByState:1,qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Object.keys(r).forEach((e=>{t[e]=r[e]})),n.dimensions.added(r,o),r},removeDimension(e){const r=t;return delete t.qDef,delete t.qLibraryId,n.dimensions.removed(r,o,e),r},addMeasure(){},removeMeasure(){},maxDimensions:()=>1,maxMeasures:()=>0,canAddDimension:()=>0===a.dimensions().length,canAddMeasure:()=>!1};return a}const wP=e=>({qDef:{qFieldDefs:[e]}});function EP(e){let{children:t,halo:n}=e;const r={async addDimension(e){const r=(e=>{let t;return t="string"==typeof e?Ve(!0,{},uP,{qListObjectDef:wP(e)}):e.qListObjectDef?Ve(!0,{},uP,e):Ve(!0,{},uP,{qListObjectDef:e}),t})(e),o=r.qListObjectDef;if(o.qDef.cId=o.qDef.cId||AT(),!r.title)if(o.qLibraryId){const e=await n.app.getDimension(o.qLibraryId),t=await e.getProperties();t.qDim.qLabelExpression?r.title={qStringExpression:{qExpr:t.qDim.qLabelExpression}}:r.title=t.qDim.title}else{var i,a;r.title=o.qDef.title||(null===(i=o.qDef.qFieldLabels)||void 0===i?void 0:i[0])||(null===(a=o.qDef.qFieldDefs)||void 0===a?void 0:a[0])}t.push({qProperty:r,qChildren:[]})},addMeasure(){}};return r}function CP(e){return"string"==typeof e&&"="===e[0]||"object"==typeof e&&e.qDef&&e.qDef.qDef||"object"==typeof e&&e.qLibraryId&&"measure"===e.type?"measure":"dimension"}async function kP(e,t){let{sn:n,properties:r,fields:o,children:i}=e;if(!o.length)return;const a=n.qae.data.targets[0];if(!a)return;const{propertyPath:l}=a,s=l.split("/");let c=r;for(let e=0;e<s.length;e++){const t=s[e];c=t?c[t]:c}const u=function(e){return e.match("/qListObjectDef")?SP:e.match("/qChildListDef")?EP:xP}(l),d=u({dc:c,def:a,properties:r,children:i,halo:t});for(let e=0;e<o.length;++e){const t=o[e];"measure"===CP(t)?await d.addMeasure(t):await d.addDimension(t)}}var RP=(e,t,n)=>{if(null==e||null==t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(""!==t){if(void 0===o[t]||null===o[t])return n;o=o[t]}}return o},LP=(e,t,n)=>{if(null==e||null==t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n&&"__proto__"!==o&&"constructor"!==o?i[o]=n:delete i[o]},OP=e=>0===Object.keys(e).length&&e.constructor===Object;var IP={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;let n=e.indexOf(t[0]);if(-1!==n){for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){let n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r}};const TP=2**53-1;function PP(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function _P(e,t){const n=Ve(!0,{},t,e);return RP(n,"qOtherTotalSpec.qOtherCounted")||LP(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),RP(n,"qOtherTotalSpec.qOtherLimit")||LP(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function NP(e,t){return Ve(!0,{},t,e)}function MP(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var qP={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===RP(e,t)&&LP(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:PP,importCommonProperties:function(e,t,n){const r="masterobject"===RP(t,"properties.qInfo.qType")?"masterobject":RP(n,"qInfo.qType");LP(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},createDefaultDimension:_P,createDefaultMeasure:NP,resolveValue:MP,getHypercubePath:function(e){const t=RP(e,"data.targets.0.propertyPath","").split("/");return t.length&&"qHyperCubeDef"===t[t.length-1]&&(t.length-=1),t.join(".")},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},setInterColumnSortOrder:function(e){let{exportFormat:t,newHyperCubeDef:n}=e;const r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();let i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(IP.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,IP.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){let{exportFormat:t,initialProperties:n,hypercubePath:r}=e,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((e=>{"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=Ve(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?LP(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||PP(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=Ve(!0,{},n,o),null===o.components&&(o.components=[]),o},getMaxMinDimensionMeasure:function(e){let{exportFormat:t,dataDefinition:n={}}=e;const r=t.data[0],o=n.dimensions||{max:0},i=n.measures||{max:0},a=MP(i.max,r.dimensions.length,TP),l=MP(i.min,r.dimensions.length,0);return{maxDimensions:MP(o.max,a,TP),minDimensions:MP(o.min,l,0),maxMeasures:a,minMeasures:l}},shouldInitLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i}=e;const a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i,newHyperCubeDef:a}=e;const l=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(l.dimensions.length>n&&n>0||l.excludedDimensions&&l.excludedDimensions.length&&l.dimensions.length+l.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(l.measures.length>o&&o>0||l.excludedMeasures&&l.excludedMeasures.length&&l.measures.length+l.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&l.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&l.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},addDefaultDimensions:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,newHyperCubeDef:o,defaultDimension:i}=e;const a=t.data[0];let l;if(n>0)for(l=0;l<a.dimensions.length;++l)o.qDimensions.length<n?o.qDimensions.push(_P(a.dimensions[l],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(_P(a.dimensions[l],i));else if(a.dimensions.length)for(l=0;l<a.dimensions.length;++l)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(_P(a.dimensions[l],i));if(a.excludedDimensions.length)for(l=0;l<a.excludedDimensions.length;++l)o.qDimensions.length<r?o.qDimensions.push(_P(a.excludedDimensions[l],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(_P(a.excludedDimensions[l],i))},addDefaultMeasures:function(e){let{exportFormat:t,maxMeasures:n,minMeasures:r,newHyperCubeDef:o,defaultMeasure:i}=e;const a=t.data[0];let l;if(n>0)for(l=0;l<a.measures.length;++l)o.qMeasures.length<n?o.qMeasures.push(NP(a.measures[l],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(NP(a.measures[l],i));else if(a.measures.length)for(l=0;l<a.measures.length;++l)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(NP(a.measures[l],i));if(a.excludedMeasures.length)for(l=0;l<a.excludedMeasures.length;++l)o.qMeasures.length<r?o.qMeasures.push(NP(a.excludedMeasures[l],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(NP(a.excludedMeasures[l],i))},updateDimensionsOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.dimensions&&"function"==typeof n.dimensions.added){const e=RP(t,r||"").qHyperCubeDef,o=[...e.qDimensions];e.qDimensions=[],o.forEach((r=>{e.qDimensions.push(r),n.dimensions.added(r,t)}))}},updateMeasuresOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.measures&&"function"==typeof n.measures.added){const e=RP(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var zP={exportProperties:e=>function(e){let{propertyTree:t,hypercubePath:n}=e;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),o=t.qProperty,i=RP(o,n||""),a=i.qHyperCubeDef,l=r.data[0];if(a.qInterColumnSortOrder||(a.qInterColumnSortOrder=[]),l.dimensions.push(...a.qDimensions),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qDimensions&&l.excludedDimensions.push(...a.qLayoutExclude.qHyperCubeDef.qDimensions),l.measures.push(...a.qMeasures),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qMeasures&&l.excludedMeasures.push(...a.qLayoutExclude.qHyperCubeDef.qMeasures),l.interColumnSortOrder=a.qInterColumnSortOrder.concat(),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();IP.isOrderedSubset(e,l.interColumnSortOrder)&&(l.interColumnSortOrder=e)}return delete a.qLayoutExclude,Object.keys(o).forEach((e=>{r.properties[e]=o[e]})),n&&(r.properties.qHyperCubeDef=i.qHyperCubeDef,delete i.qHyperCubeDef),o.qLayoutExclude||(o.qLayoutExclude={}),o.qLayoutExclude.disabled&&(Object.keys(o.qLayoutExclude.disabled).forEach((e=>{r.properties.hasOwnProperty(e)||(r.properties[e]=o.qLayoutExclude.disabled[e])})),delete o.qLayoutExclude.disabled),o.qLayoutExclude.changed&&(qP.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!OP(o.qLayoutExclude.quarantine)||delete o.qLayoutExclude,r}(e),importProperties:e=>function(e){let{exportFormat:t,initialProperties:n={},dataDefinition:r={},defaultPropertyValues:o={},hypercubePath:i}=e;const a={qChildren:[]},l=qP.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),s=RP(n,i||"").qHyperCubeDef,c=RP(l,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f}=qP.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:h=qP.getDefaultDimension(),defaultMeasure:m=qP.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,qP.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f})&&qP.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f,newHyperCubeDef:c}),qP.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:d,newHyperCubeDef:c,defaultDimension:h}),qP.addDefaultMeasures({exportFormat:t,maxMeasures:p,minMeasures:f,newHyperCubeDef:c,defaultMeasure:m}),qP.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),qP.copyPropertyIfExist("qMaxStackedCells",s,c),qP.copyPropertyIfExist("qNoOfLeftDims",s,c),qP.copyPropertyOrSetDefault("qInitialDataFetch",s,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),qP.copyPropertyOrSetDefault("qMode",s,c,"S"),qP.copyPropertyOrSetDefault("qReductionMode",s,c,"N"),qP.copyPropertyOrSetDefault("qSortbyYValue",s,c),qP.copyPropertyOrSetDefault("qIndentMode",s,c),qP.copyPropertyOrSetDefault("qShowTotalsAbove",s,c),qP.importCommonProperties(l,t,n),qP.updateDimensionsOnAdded({newProperties:l,dataDefinition:r,hypercubePath:i}),qP.updateMeasuresOnAdded({newProperties:l,dataDefinition:r,hypercubePath:i}),a.qProperty=l,a}(e)};const AP=e=>RP(e,"data.targets.0.propertyPath"),DP=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return zP.exportProperties})(AP(e))},jP=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return zP.importProperties})(AP(e))},FP=async e=>{let{halo:t,model:n,cellRef:r,newType:o}=e;const a=await n.getFullPropertyTree(),l=r.current.getQae(),s=DP(l),c=await(async e=>{let{halo:t,name:n,version:r}=e;const{types:o}=t;return await o.get({name:n,version:r}).supernova()})({halo:t,name:o}),u=c.qae;return jP(u)({exportFormat:s({propertyTree:a,hypercubePath:qP.getHypercubePath(l)}),initialProperties:i({qInfo:{qType:o},visualization:o},RP(u,"properties.initial",{})),dataDefinition:RP(u,"data.targets.0.",{}),hypercubePath:qP.getHypercubePath(u)})},BP={hypercube:zP};var $P=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M8.86225926,1.6 L15.7815749,13.5 C16.2829746,14.3 15.8818548,15 14.9793354,15 L1.04042422,15 C0.0853772072,15 -0.232971797,14.3650794 0.172002787,13.6135407 L7.05722041,1.6 C7.55862009,0.8 8.36085958,0.8 8.86225926,1.6 Z M7.962,2.007 C7.95987183,2.02476599 7.95607967,2.03712023 7.94920396,2.05249845 L1.1033193,14 L14.915544,14 L7.99777452,2.10265906 L7.97779697,2.06138411 L7.96394459,2.01964415 L7.962,2.007 Z M7.5,11 L8.5,11 C8.76666667,11 8.95432099,11.1580247 8.99272977,11.4038409 L9,11.5 L9,12.5 C9,12.7666667 8.84197531,12.954321 8.59615912,12.9927298 L8.5,13 L7.5,13 C7.23333333,13 7.04567901,12.8419753 7.00727023,12.5961591 L7,12.5 L7,11.5 C7,11.2333333 7.15802469,11.045679 7.40384088,11.0072702 L7.5,11 L8.5,11 L7.5,11 Z M7.5,5 L8.5,5 C8.76666667,5 8.95432099,5.15802469 8.99272977,5.40384088 L9,5.5 L9,9.5 C9,9.76666667 8.84197531,9.95432099 8.59615912,9.99272977 L8.5,10 L7.5,10 C7.23333333,10 7.04567901,9.84197531 7.00727023,9.59615912 L7,9.5 L7,5.5 C7,5.23333333 7.15802469,5.04567901 7.40384088,5.00727023 L7.5,5 L8.5,5 L7.5,5 Z"}}]}))(e));function WP(e){let{d:t}=e;const n=ay();let r="inherit",o=n.palette.success.main;t.missing?o=n.palette.warning.main:t.error&&(r="error",o=n.palette.error.main);const i={color:o},a=H.createElement(vE,{style:{lineHeight:"30px",paddingRight:n.spacing(1)}},H.createElement(Ek,null,t.missing||t.error?H.createElement($P,{style:i}):H.createElement(JL,{style:i})));return H.createElement(pk,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},H.createElement(pk,{item:!0},a),H.createElement(pk,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},H.createElement(vE,{noWrap:!0,component:"p"},H.createElement(vE,{component:"span",variant:"subtitle2",color:r},t.description),H.createElement(vE,{component:"span"}," "),H.createElement(vE,{component:"span",variant:"subtitle2",color:t.error?"error":"inherit",style:{fontWeight:400}},t.label))))}function UP(e){let{data:t}=e;const n=ay();return H.createElement(pk,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},t.map(((e,t)=>{const r=e.descriptions.map(((e,t)=>H.createElement(WP,{d:e,key:t})));return r.length>0&&H.createElement(pk,{container:!0,item:!0,key:t,direction:"column",style:{paddingBottom:n.spacing(2)}},H.createElement(vE,{noWrap:!0,key:t,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),r)})))}function HP(e){let{title:t="Error",message:n="",data:r=[]}=e;return H.createElement(pk,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},H.createElement(pk,{item:!0},H.createElement($P,{style:{fontSize:"38px"}})),H.createElement(pk,{item:!0},H.createElement(vE,{variant:"h6",align:"center","data-tid":"error-title"},t)),H.createElement(pk,{item:!0},H.createElement(vE,{variant:"subtitle1",align:"center","data-tid":"error-message"},n)),H.createElement(UP,{data:r}))}const VP=["size"],GP="Progress",KP={root:"".concat(GP,"-root"),front:"".concat(GP,"-front"),back:"".concat(GP,"-back")},ZP=uy("div")((e=>{let{theme:t}=e;return{["&.".concat(KP.root)]:{position:"relative",display:"inline-block"},["& .".concat(KP.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(KP.back)]:{color:t.palette.divider}}})),XP={small:16,medium:32,large:64,xlarge:128};function QP(e){let{size:t="medium"}=e,n=s(e,VP);const r=XP[t];return H.createElement(ZP,{className:KP.root},H.createElement(zC,l({variant:"determinate",value:100,className:KP.back,size:r,thickness:3},n)),H.createElement(zC,l({variant:"indeterminate",disableShrink:!0,className:KP.front,size:r,thickness:3},n)))}const JP=["cancel","translator"],YP=["retry","translator"],e_={stripes:"".concat("LongRunningQuery","-stripes")},t_=uy(pk)((()=>({["& .".concat(e_.stripes)]:{"&::before":{position:"absolute",height:"100%",width:"100%",top:0,left:0,content:'""',backgroundSize:"14.14px 14.14px",backgroundImage:"linear-gradient(135deg, currentColor 10%, rgba(0,0,0,0) 10%, rgba(0,0,0,0) 50%, currentColor 50%, currentColor 59%, rgba(0,0,0,0) 60%, rgba(0,0,0,0) 103%)",opacity:.1}}})));function n_(e){let{cancel:t,translator:n}=e,r=s(e,JP);return H.createElement(H.Fragment,null,H.createElement(t_,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},H.createElement(pk,{item:!0},H.createElement(QP,null)),H.createElement(pk,{item:!0},H.createElement(vE,{variant:"h6",align:"center","data-tid":"update-active"},n.get("Object.Update.Active")))),H.createElement(pk,l({item:!0},r),H.createElement(gw,{variant:"contained",onClick:t},n.get("Cancel"))))}function r_(e){let{retry:t,translator:n}=e,r=s(e,YP);return H.createElement(H.Fragment,null,H.createElement(pk,{item:!0},H.createElement($P,{style:{fontSize:"38px"}})),H.createElement(pk,{item:!0},H.createElement(vE,{variant:"h6",align:"center","data-tid":"update-cancelled"},n.get("Object.Update.Cancelled"))),H.createElement(pk,{item:!0},H.createElement(gw,l({variant:"contained",onClick:t},r),n.get("Retry"))))}function o_(e){let{canCancel:t,canRetry:n,api:r}=e;const{translator:o}=U.useContext(Iw);return H.createElement(pk,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:e_.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t&&H.createElement(n_,{cancel:r.cancel,translator:o,className:e_.cancel}),n&&H.createElement(r_,{retry:r.retry,translator:o,className:e_.retry}))}function i_(){return H.createElement(pk,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},H.createElement(QP,{size:"large"}))}const a_="Header",l_={containerStyle:"".concat(a_,"-containerStyle"),containerTitleStyle:"".concat(a_,"-containerTitleStyle")},s_=uy(pk)((e=>{let{theme:t}=e;return{["&.".concat(l_.containerStyle)]:{flexGrow:0},["&.".concat(l_.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),c_="njs-cell-title",u_="njs-cell-sub-title";function d_(e){let{layout:t,sn:n,anchorEl:r,hovering:o,focusHandler:i,titleStyles:a={}}=e;const l=t.showTitles&&!!t.title,s=t.showTitles&&!!t.subtitle,c=t.qSelectionInfo&&t.qSelectionInfo.qInSelections,[u,d]=U.useState([]),[p,f]=_L(),[h,m]=U.useState(!1);U.useEffect((()=>{n&&n.component&&n.component.isHooked&&n.component.observeActions((e=>{d([...e,...n&&n.selectionToolbar&&n.selectionToolbar.items||[]])}))}),[n]),U.useEffect((()=>{if(!f)return;const{width:e}=f;m(e<221)}),[f]);const g=l||s,v=[l_.containerStyle,...g?[l_.containerTitleStyle]:[]],b=(o||c)&&(h||!g),y=g&&!b&&!h,x=H.createElement(lT,{show:y,selections:{show:c,api:n.component.selections,onKeyDeactivate:i.refocusContent},actions:u,popover:{show:b,anchorEl:r},focusHandler:i});return H.createElement(s_,{ref:p,item:!0,container:!0,wrap:"nowrap",className:v.join(" ")},H.createElement(pk,{item:!0,zeroMinWidth:!0,xs:!0},H.createElement(pk,{container:!0,wrap:"nowrap",direction:"column"},l&&H.createElement(vE,{variant:"h6",noWrap:!0,className:c_,style:a.main},t.title),s&&H.createElement(vE,{variant:"body2",noWrap:!0,className:u_,style:a.subTitle},t.subtitle))),H.createElement(pk,{item:!0},x))}const p_={itemStyle:"".concat("Footer","-itemStyle")},f_=uy(pk)((e=>{let{theme:t}=e;return{["& .".concat(p_.itemStyle)]:{minWidth:0,paddingTop:t.spacing(1)}}})),h_="njs-cell-footer";function m_(e){let{layout:t,titleStyles:n={}}=e;return t&&t.showTitles&&t.footnote?H.createElement(f_,{container:!0},H.createElement(pk,{item:!0,className:p_.itemStyle},H.createElement(vE,{noWrap:!0,variant:"body2",className:h_,style:n.footer},t.footnote))):null}class g_{constructor(){this.timer=null,this.next=null,this.running=!1}start(){this.running||(this.running=!0,this.scheduleNext())}scheduleNext(){this.timer=setTimeout((()=>{this.doNext()}),10)}async doNext(){const e=this.next;this.next=null,e?(await e(),this.scheduleNext()):this.stop()}schedule(e){this.next=e,this.start()}stop(){this.running&&(clearTimeout(this.timer),this.timer=null,this.running=!1)}}const v_="njs-viz";function b_(e){let{sn:t,snOptions:n,snPlugins:r,layout:o,appLayout:a,halo:l}=e;const{component:s}=t,{theme:c,language:u,constraints:d,interactions:p,keyboardNavigation:f}=U.useContext(Iw),[h]=U.useState((()=>new g_)),[m,g]=U.useState(!1),[v,b]=U.useState(0),[y,x,S]=_L(),[w,E]=U.useState(null),C=U.useCallback((e=>{e&&E(e)}),[]);return U.useEffect((()=>{if(w)return s.created({options:n}),s.mounted(w),g(!0),()=>{h.stop(),s.willUnmount()}}),[w,s]),U.useEffect((()=>{m&&w&&x&&(!s.isHooked&&o&&o.qSelectionInfo&&o.qSelectionInfo.qInSelections||h.schedule((()=>{const e=[];return d.passive||e.push("passive"),d.active||e.push("interact"),d.select||e.push("select"),d.edit||e.push("edit"),l.app&&l.app.session&&e.push("fetch"),Promise.resolve(s.render({layout:o,options:n,plugins:r,embed:l.public.nebbie,context:i({constraints:d,interactions:p,theme:l.public.theme,appLayout:a,keyboardNavigation:f},s.isHooked?{}:{logicalSize:t.logicalSize({layout:o}),localeInfo:(a||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===v&&"function"==typeof n.onInitialRender&&n.onInitialRender.call(null),b(v+1))}))})))}),[x,n,r,w,S,o,a,c,u,d,p,m,f]),H.createElement("div",{ref:y,"data-render-count":v,style:{position:"relative",height:"100%"},className:v_},H.createElement("div",{ref:C,style:{position:"absolute",width:"100%",height:"100%"}}))}const y_={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},x_={"top-left":"top left","top-center":"top center","top-right":"top right","center-left":"center left","center-center":"center center","center-right":"center right","bottom-left":"bottom left","bottom-center":"bottom center","bottom-right":"bottom right"};function S_(e,t){return t?function(e){var t;let n,r,o,i;return null!=e&&null!==(t=e.session)&&void 0!==t&&t.config?(n=e.session.config,r=new URL(n.url),i="wss:"===r.protocol,o=i?"https://":"http://",o+r.host):""}(e)+t:void 0}function w_(e,t){const n=null==e?void 0:e.bgImage;if(n){let i="";var r,o;if("media"===n.mode||"media"===e.useImage)i=null!=n&&null!==(r=n.mediaUrl)&&void 0!==r&&null!==(o=r.qStaticContentUrl)&&void 0!==o&&o.qUrl?decodeURIComponent(n.mediaUrl.qStaticContentUrl.qUrl):void 0,i=S_(t,i);"expression"===n.mode&&(i=n.expressionUrl?decodeURIComponent(n.expressionUrl):void 0);const a=function(e){var t;let n="center center";return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.position&&(n=x_[e.bgImage.position]),n}(e),l=function(e){var t;let n=y_.originalSize;return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.sizing&&(n=y_[e.bgImage.sizing]),n}(e);return i?{url:i,pos:a,size:l}:void 0}}function E_(e,t,n){const r=null==e?void 0:e.bgColor;return r&&t?r.useExpression?t.validateColor(r.colorExpression):r.color&&"none"!==r.color.color?t.getColorPickerColor(r.color,!0):void 0:t&&n?t.getStyle("object.".concat(n),"","backgroundColor"):t?t.getStyle("","","backgroundColor"):void 0}function C_(e,t,n,r){var o;const i=(null==e||null===(o=e.title)||void 0===o?void 0:o[t])||{},a=function(e,t){return e&&Array.isArray(e)?e:"main"===t?["bold"]:[]}(i.fontStyle,t);return{fontFamily:i.fontFamily||n.getStyle("object.".concat(r),"title.".concat(t),"fontFamily"),color:i.color&&"none"!==i.color.color?n.getColorPickerColor(i.color,!0):n.getStyle("object.".concat(r),t,"color"),fontWeight:a.includes("bold")?"bold":"normal",fontStyle:a.includes("italic")?"italic":"normal",textDecoration:a.includes("underline")?"underline":"initial"}}const k_="njs-cell",R_=(e,t)=>{switch(t.type){case"LOADING":return i(i({},e),{},{loading:!0});case"LOADED":return i(i({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return i(i({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return i(i({},e),{},{longRunningQuery:!0});case"ERROR":return i(i({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function L_(e){let{delay:t=750}=e;const[n,r]=U.useState(!1);return U.useEffect((()=>{const e=setTimeout((()=>r(!0)),t);return()=>clearTimeout(e)}),[]),n?H.createElement(i_,null):null}const O_=e=>!e.qError||7005===e.qError.qErrorCode,I_=(e,t,n,r,o)=>[...Array(e).keys()].map((e=>{const i=!(!t||!t[e]),a=i&&t[e].qError&&7005===t[e].qError.qErrorCode,l=i&&!a&&t[e].qError,s=a&&t[e].qCalcCondMsg,c="".concat(l?r:a?s||o:i&&t[e].qFallbackTitle||""),u=n(e);return{description:u?"".concat(u).concat(c.length?":":""):null,label:c,missing:t&&!i&&!l&&e>=t.length||a,error:l}})),T_=e=>e&&(Array.isArray(e)?e:[e])||[],P_=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t);return{reqDimErrors:I_(o,T_(a.qDimensionInfo||a.qItems),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),reqMeasErrors:I_(i,T_(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"))}},__=async(e,t,n,r)=>{let{targets:o}=n;const{hasUnfulfilledErrors:i,aggMinD:a,aggMinM:l,hasLayoutErrors:s,layoutErrors:c}=((e,t,n)=>{let r=!1,o=0,i=0,a=!1,l=!1;const s=[];for(let c=0;c<t.length;++c){const u=t[c],d=u.dimensions.min(),p=u.measures.min(),f=u.resolveLayout(n),h=T_(f.qDimensionInfo||f.qItems).filter(O_),m=T_(f.qMeasureInfo).filter(O_);if(o+=d,i+=p,(h.length<d||m.length<p)&&(r=!0),f.qError){a=!0,l=7005===f.qError.qErrorCode;const t=l&&f.qCalcCondMsg?f.qCalcCondMsg:l?e.get("Visualization.UnfulfilledCalculationCondition"):e.get("Visualization.LayoutError");s.push({title:t,descriptions:[]})}}return{hasUnfulfilledErrors:r,aggMinD:o,aggMinM:i,hasLayoutErrors:a,layoutErrors:s}})(e,o,t),u=[],d=[];let p=null;for(let n=0;n<o.length;++n){const a=o[n];if(!s&&i){const n=p||await r.getProperties();p=n;const o=P_(e,t,n,a);u.push(...o.reqDimErrors),d.push(...o.reqMeasErrors)}}const f=u.filter((e=>!(e.missing||e.error))).length,h=e.get("Visualization.Incomplete.Dimensions",[f,a]),m=d.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,l]),v=[{title:h,descriptions:[...u]},{title:g,descriptions:[...d]}],b=s?c:v;return[s||i,{title:s?c[0].title:e.get("Visualization.Incomplete"),data:b}]},N_=U.forwardRef(((e,t)=>{let{halo:n,model:r,initialSnOptions:o,initialSnPlugins:a,initialError:l,onMount:s,currentId:c,emitter:u}=e;const{app:d,types:p}=n,{nebbie:f}=n.public,{theme:h,translator:m,language:g,keyboardNavigation:v,disableCellPadding:b=!1}=U.useContext(Iw),y=ay(),[x,S,w]=_L(),[E,C]=U.useReducer(R_,{loading:!1,loaded:!1,longRunningQuery:!1,error:(k=l)?{title:k.message}:null,sn:null,visualization:null});var k;const[R,{validating:L,canCancel:O,canRetry:I},T]=TL(r),[P]=PL(d),[_,N,M]=_L(),[q,z]=U.useState(o),[A,D]=U.useState(a),j="njs-cell-".concat(c),[F]=gT(d,r,["#".concat(j),".njs-action-toolbar-popover"]),[B,$]=U.useState(!1),W=U.useRef({enter:null,leave:null}),[V,G]=U.useState(void 0),[K,Z]=U.useState(void 0),[X,Q]=U.useState(void 0),J=U.useRef({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});U.useEffect((()=>{fT(J.current)}),[]),U.useEffect((()=>{if(R&&n.public.theme){const e=R.components?R.components.find((e=>"general"===e.key)):null;Q({main:C_(e,"main",n.public.theme,R.visualization),footer:C_(e,"footer",n.public.theme,R.visualization),subTitle:C_(e,"subTitle",n.public.theme,R.visualization)}),G(E_(e,n.public.theme,R.visualization)),Z(w_(e,n.app))}}),[R,n.public.theme,n.app,h]),J.current.blurCallback=e=>{n.root.toggleFocusOfCells(),e&&M&&M.focus()},J.current.refocusContent=()=>{E.sn.component&&"function"==typeof E.sn.component.focus&&E.sn.component.focus()};U.useEffect((()=>{if(l||!P||!R)return;if(E.visualization===R.visualization&&E.sn)return void(async e=>{const[t,n]=await __(m,R,e.generator.qae.data,r);C(t?{type:"ERROR",error:n}:{type:"RENDER"}),(e=>{let{sn:t,layout:n,model:r}=e;const o=t&&t.component&&t.component.selections;if(o&&o.id&&r.id&&o.id===r.id){if(n&&n.qSelectionInfo&&n.qSelectionInfo.qInSelections&&!o.isModal()){const{targets:e}=t.generator.qae.data,n=e[0].propertyPath;o.goModal(n)}n.qSelectionInfo&&n.qSelectionInfo.qInSelections||o.isModal()&&o.noModal()}})({sn:E.sn,layout:R,model:r})})(E.sn);const e=p.getSupportedVersion(R.visualization,R.version);return(async(e,t)=>{C({type:"LOADING"});const n=await(async e=>{let{dispatch:t,types:n,visualization:r,version:o,model:i,app:a,selections:l,nebbie:s,focusHandler:c,emitter:u}=e;try{const e=await(async e=>{let{types:t,name:n,version:r}=e;return await t.get({name:n,version:r}).supernova()})({types:n,name:r,version:o});return e.create({model:i,app:a,selections:l,nebbie:s,focusHandler:c,emitter:u})}catch(e){t(o?{type:"ERROR",error:{title:e.message}}:{type:"ERROR",error:{title:"Could not find a version of '".concat(r,"' that supports current object version. Did you forget to register ").concat(r,"?")}})}})({dispatch:C,types:p,visualization:e,version:t,model:r,app:d,selections:F,nebbie:f,focusHandler:J.current,emitter:u});n&&(C({type:"LOADED",sn:n,visualization:e}),s())})(R.visualization,e),()=>{}}),[p,E.sn,r,F,R,P,g]),U.useEffect((()=>{if(!L)return;const e=setTimeout((()=>C({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[L]),U.useImperativeHandle(t,(()=>({getQae:()=>E.sn.generator.qae,toggleFocus(e){"function"==typeof E.sn.component.focus&&(e?E.sn.component.focus():E.sn.component.blur())},setSnOptions:z,setSnPlugins:D,async takeSnapshot(){const{width:e,height:t}=S;let n=JSON.parse(JSON.stringify(R));return"function"==typeof E.sn.component.setSnapshotData&&(n=await E.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:m.language(),theme:y.name,appLayout:P,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof n.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return n.config.snapshot.capture(e)}})),[E.sn,N,S,R,y.name,P]);let Y=null;return E.loading&&!E.longRunningQuery?Y=H.createElement(L_,null):E.error?Y=H.createElement(HP,E.error):E.loaded&&(Y=H.createElement(b_,{key:R.visualization,sn:E.sn,halo:n,snOptions:q,snPlugins:A,layout:R,appLayout:P})),H.createElement(oE,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:V||"unset",backgroundImage:K&&K.url?"url(".concat(K.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:K&&K.size,backgroundPosition:K&&K.pos},elevation:0,square:!0,className:k_,ref:x,id:j,onMouseEnter:()=>{W.current.leave&&clearTimeout(W.current.leave),W.enter||(W.current.enter=setTimeout((()=>{$(!0),W.current.enter=null}),250))},onMouseLeave:()=>{W.current.enter&&clearTimeout(W.current.enter),W.current.leave||(W.current.leave=setTimeout((()=>{$(!1),W.current.leave=null}),750))}},H.createElement(pk,{container:!0,direction:"column",gap:0,style:i(i({position:"relative",width:"100%",height:"100%"},b?{}:{padding:y.spacing(1)}),E.longRunningQuery?{opacity:"0.3"}:{})},w&&R&&E.sn&&H.createElement(d_,{layout:R,sn:E.sn,anchorEl:w,hovering:B,focusHandler:J.current,titleStyles:X}," "),H.createElement(pk,{tabIndex:v?0:-1,onKeyDown:v?e=>{["Enter"," ","Spacebar"].includes(e.key)&&n.root.toggleFocusOfCells(c)}:null,item:!0,xs:!0,style:{height:"100%"},ref:_},Y),H.createElement(m_,{layout:R,titleStyles:X})),E.longRunningQuery&&H.createElement(o_,{canCancel:O,canRetry:I,api:T}))}));function M_(e){let{halo:t,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,emitter:l,initialError:s}=e;const{root:c}=t,u=H.createRef(),d=AT(),p=wp.createPortal(H.createElement(N_,{ref:u,halo:t,model:r,currentId:d,initialSnOptions:o,initialSnPlugins:i,initialError:s,onMount:a,emitter:l}),n,d),f=()=>{c.remove(p),r.removeListener("closed",f)};return r.on("closed",f),c.add(p),c.addCell(d,u),[f,u]}function q_(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function z_(e,t){return q_(e)&&q_(t)?JSON.stringify(e)===JSON.stringify(t):!Array.isArray(e)&&!Array.isArray(t)&&e===t}function A_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=[];return Object.keys(t).forEach((o=>{const i=t[o];"object"!=typeof n[o]||"object"!=typeof i||Array.isArray(i)?z_(i,n[o])||r.push({qPath:e+o,qOp:"add",qValue:JSON.stringify(t[o])}):r.push(...A_("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function D_(e){if(!Array.isArray(e))throw new Error("Invalid plugin format: plugins should be an array!");e.forEach((e=>{if("object"!=typeof e)throw new Error("Invalid plugin format: a plugin should be an object");if("object"!=typeof e.info||"string"!=typeof e.info.name)throw new Error("Invalid plugin format: a plugin should have an info object containing a name");if("function"!=typeof e.fn)throw new Error('Invalid plugin format: The plugin "'.concat(e.info.name,'" has no "fn" function'))}))}const j_=()=>{};function F_(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=j_,a=null,l=null,s=null;const c=new Promise((e=>{s=e}));let u={},d=[];const p=new te,f=async e=>{l?(async()=>{await c,a.current.setSnOptions(i(i({},u),e))})():u=i(i({},u),e)},h=async e=>{D_(e),l?(async()=>{await c,a.current.setSnPlugins(e)})():d=e},m={id:e.id,model:e,async destroy(){await r(),o(),o=j_},async convertTo(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=await FP({halo:t,model:e,cellRef:a,newType:n});return r&&(e.__snInterceptor?await e.__snInterceptor.setProperties.call(e,o.qProperty):await e.setProperties(o.qProperty)),o},addListener(e,t){p.addListener(e,t)},removeListener(e,t){p.removeListener(e,t)},__DO_NOT_USE__:{mount(r){if(l)throw new Error("Already mounted");return l=r,[o,a]=M_({halo:t,element:r,model:e,initialSnOptions:u,initialSnPlugins:d,initialError:n,onMount:s,emitter:p}),c},async applyProperties(t){const n=A_("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){f(e)},plugins(e){h(e)},exportImage:()=>a.current.exportImage(),takeSnapshot:()=>a.current.takeSnapshot(),getModel:()=>e}};return m}async function B_(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=F_({model:e,halo:n,initialError:r,onDestroy:o});return t.options&&i.__DO_NOT_USE__.options(t.options),t.plugins&&i.__DO_NOT_USE__.plugins(t.plugins),t.element&&await i.__DO_NOT_USE__.mount(t.element),i}async function $_(e,t){let{type:n,version:r,fields:o,properties:i,options:a,plugins:l,element:s,extendProperties:c}=e,u={};const d=[];let p;try{const e=t.types.get({name:n,version:r});u=await e.initialProperties(i,c);const a=await e.supernova();o&&await kP({sn:a,properties:u,fields:o,children:d},t),i&&a&&a.qae.properties.onChange&&a.qae.properties.onChange.call({},u)}catch(e){p=e,u={qInfo:{qType:n},visualization:n}}const f=await t.app.createSessionObject(u);d.length>0&&await f.setFullPropertyTree({qProperty:u,qChildren:d}),CL.set(f.id,f);const h=(e=>{const t=wL({type:"SET",value:e});return()=>{t(),CL.clear(e.id)}})(f);return B_(f,{options:a,plugins:l,element:s},t,p,(async()=>{await t.app.destroySessionObject(f.id),h()}))}async function W_(e,t,n){let{type:r,version:o,fields:i,properties:a,extendProperties:l}=e,s={};const c=[];try{const e=t.types.get({name:r,version:o});s=await e.initialProperties(a,l);const n=await e.supernova();i&&await kP({sn:n,properties:s,fields:i,children:c},t),a&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},s)}catch(e){s=n?null:{qInfo:{qType:r},visualization:r}}if(!n){const e=await t.app.createObject(s);return c.length>0&&await e.setFullPropertyTree({qProperty:s,qChildren:c}),CL.set(e.id,e),e}return s}const U_="njs-sheet";function H_(e){let{model:t,halo:n,initialSnOptions:r,initialSnPlugins:o,initialError:i,onMount:a}=e;const{root:l}=n,[s]=TL(t),{theme:c}=U.useContext(Iw),[u,d]=U.useState([]),[p,f]=U.useState(void 0),[h,m]=U.useState(void 0),[g,v]=U.useState("");U.useEffect((()=>{if(s){const e=JSON.stringify(s.cells);if(e===g)return;v(e);const t=async()=>{u.forEach((e=>{l.removeCell(e.currentId)}));const e=s.cells,t=await Promise.all(e.map((async e=>{let t;const r=new Promise((e=>{t=e})),o=u.find((t=>t.id===e.name));if(o)return o.bounds=e.bounds,delete o.mountedPromise,o;const i=await async function(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let l=bL.get(a);l||(l=t.app.getObject(n),bL.set(a,l));const s=await l;return CL.set(a,s),B_(s,{options:r,plugins:o,element:i},t)}({id:e.name},n);return{model:i.model,id:e.name,bounds:e.bounds,cellRef:H.createRef(),currentId:AT(),mounted:t,mountedPromise:r}})));t.forEach((e=>l.addCell(e.currentId,e.cellRef))),d(t)};t()}}),[s]);const b=U.useMemo((()=>u?u.map((e=>function(e,t,n,r,o,i){const{x:a,y:l,width:s,height:c}=e.bounds;return H.createElement("div",{style:{left:"".concat(a,"%"),top:"".concat(l,"%"),width:"".concat(s,"%"),height:"".concat(c,"%"),position:"absolute"}},H.createElement(N_,{ref:e.cellRef,halo:t,model:e.model,currentId:e.currentId,initialSnOptions:n,initialSnPlugins:r,initialError:o,onMount:i}))}(e,n,r,o,i,e.mounted))):[]),[u]);U.useEffect((()=>{const e=null!=s&&s.components?s.components.find((e=>"general"===e.key)):null;f(E_(e,n.public.theme)),m(w_(e,n.app))}),[s,n.public.theme,n.app,c]);const y=!s||Number.isNaN(s.height)?"100%":"".concat(Number(s.height),"%"),x=u.map((e=>e.mountedPromise)),S=x.filter((e=>!!e));return S.length&&Promise.all(x).then((()=>{a()})),H.createElement("div",{className:U_,style:{width:"100%",height:y,position:"relative",backgroundColor:p,backgroundImage:h&&h.url?"url(".concat(h.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:h&&h.size,backgroundPosition:h&&h.pos}},b)}function V_(e){let{halo:t,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,initialError:l}=e;const{root:s}=t,c=H.createRef(),u=wp.createPortal(H.createElement(H_,{ref:c,halo:t,model:r,initialSnOptions:o,initialSnPlugins:i,initialError:l,onMount:a}),n,r.id),d=()=>{s.remove(u),r.removeListener("closed",d)};return r.on("closed",d),s.add(u),[d,c]}const G_=()=>{};function K_(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=G_,a=null,l=null,s=null;const c=new Promise((e=>{s=e}));let u={},d=[];const p=async e=>{l?(async()=>{await c,a.current.setSnOptions(i(i({},u),e))})():u=i(i({},u),e)},f=async e=>{D_(e),l?(async()=>{await c,a.current.setSnPlugins(e)})():d=e},h={id:e.id,model:e,async destroy(){await r(),o(),o=G_},__DO_NOT_USE__:{mount(r){if(l)throw new Error("Already mounted");return l=r,[o,a]=V_({halo:t,element:r,model:e,initialSnOptions:u,initialSnPlugins:d,initialError:n,onMount:s}),c},async applyProperties(t){const n=A_("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){p(e)},plugins(e){f(e)},exportImage(){throw new Error("Not implemented")},takeSnapshot(){throw new Error("Not implemented")},getModel:()=>e}};return h}async function Z_(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let l=bL.get(a);l||(l=t.app.getObject(n),bL.set(a,l));const s=await l;return CL.set(a,s),"sheet"===s.genericType?async function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=K_({model:e,halo:n,initialError:r,onDestroy:o});return t.options&&i.__DO_NOT_USE__.options(t.options),t.plugins&&i.__DO_NOT_USE__.plugins(t.plugins),t.element&&await i.__DO_NOT_USE__.mount(t.element),i}(s,{options:r,plugins:o,element:i},t):B_(s,{options:r,plugins:o,element:i},t)}function X_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}const Q_=Ve.bind(null,!0),J_={},{isArray:Y_}=Array;function eN(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function tN(e){return void 0===e}function nN(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function rN(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=tN(e[r||t])?i:e[t],e=e[r||t]})),e}function oN(e,t){let n=!0;if(eN(e)&&eN(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{oN(e[r],t[r])||(n=!1)})),n);if(Y_(e)&&Y_(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!oN(e[n],t[n]))return!1;return!0}return e===t}J_.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Q_({},{val:e}).val:e}(t[o]),a=e[o],l="".concat(n,"/").concat(o);oN(i,a)||nN(t,o)||(tN(a)?r.push({op:"add",path:l,value:i}):eN(i)&&eN(a)?r=r.concat(J_.generate(a,i,l)):Y_(i)&&Y_(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&tN(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(oN(t,o))return r;if(!tN(t[0])&&tN(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:"".concat(n,"/").concat(e)}),o.splice(e,1)):r=r.concat(J_.generate(o[e],t[i],"".concat(n,"/").concat(e)));for(let e=0,l=t.length;e<l;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:"".concat(n,"/").concat(e),value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:"".concat(n,"/").concat(e),from:"".concat(n,"/").concat(i)}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,l)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((o=>{tN(t[o])&&!nN(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},J_.apply=function(e,t){t.forEach((t=>{let n=rN(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Y_(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Y_(o)&&Y_(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(eN(o)&&eN(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!nN(a,e)&&delete a[e]})),Q_(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=rN(e,t.from);Y_(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Y_(n)?n.splice(+r,1):delete n[r]);var a}))},J_.clone=function(e){return Q_({},e)},J_.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},J_.updateObject=function(e,t){Object.keys(e).length?J_.apply(e,J_.generate(e,t)):Q_(e,t)};const iN=e=>t=>{const n=(r=i(i({},t),{},{action(){"function"==typeof t.action&&t.action.call(n,e),n.emit("changed")},enabled:()=>"function"!=typeof t.enabled||t.enabled.call(n,e),active:"function"==typeof t.active?function(){return t.active.call(n,e)}:void 0}),Object.keys(te.prototype).forEach((e=>{r[e]=te.prototype[e]})),te.init(r),r);var r;return n};let aN,lN;function sN(e,t){if(!e)return!0;if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!0;return!1}function cN(e){let{explicitResize:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.__hooks={obsolete:!1,error:!1,waitForData:!1,chain:{promise:null,resolve:()=>{}},list:[],snaps:[],menus:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null}}}function uN(e){pN(e.__hooks.list,!0),e.__hooks.obsolete=!0,e.__hooks.list.length=0,e.__hooks.pendingEffects.length=0,e.__hooks.pendingLayoutEffects.length=0,e.__hooks.actions=null,e.__hooks.imperativeHandle=null,e.__hooks.resizer=null,e.__hooks.accessibility=null,e.__actionsDispatch=null,clearTimeout(e.__hooks.micro),cancelAnimationFrame(e.__hooks.macro)}async function dN(e){if(e.__hooks.obsolete)return Promise.resolve();lN=-1,aN=e,aN.__hooks.initiated&&aN.__hooks.list.length;try{aN.fn.call(null)}catch(e){console.error(e)}aN.__hooks.initiated=!0;const t=aN.__hooks;return gN(aN),lN=void 0,aN=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){pN(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){pN(e.pendingEffects),e.macro=null,function(e){if(e.pendingPromises.length||e.micro||e.macro)return;e.chain.promise=null,e.chain.resolve(!e.waitForData)}(e)}(e)}))}(t),t.chain.promise}function pN(e,t){try{e.forEach((e=>{"function"==typeof e.teardown&&e.teardown(),t||(e.teardown=e.value[0]())}))}catch(e){console.error(e)}e.length=0}function fN(e,t){try{return Promise.all(e.__hooks.snaps.map((e=>Promise.resolve(e.fn(t))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function hN(e,t,n){try{return Promise.all(e.__hooks.menus.map((e=>Promise.resolve(e.fn(t,n))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function mN(e){return e.__hooks.imperativeHandle}function gN(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function vN(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,gN(e))}function bN(e){if(void 0===aN)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=aN.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function yN(e){bN(++lN);return aN.context[e]}function xN(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function SN(e){return{__hooked:!0,fn:e,initiate:cN,run:dN,teardown:uN,runSnaps:fN,runMenu:hN,focus:LN,blur:ON,observeActions:vN,getImperativeHandle:mN,updateRectOnNextRun:xN}}function wN(e){const t=bN(++lN);if(!t.value){t.component=aN;const n=e=>{if(t.component.__hooks.obsolete)return;const n="function"==typeof e?e(t.value[0]):e;var r;n!==t.value[0]&&(t.value[0]=n,(r=t.component).__hooks.micro||(r.__hooks.micro=setTimeout((()=>{r.__hooks.micro=null,dN(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function EN(e,t){const n=bN(++lN);sN(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===aN.__hooks.pendingEffects.indexOf(n)&&aN.__hooks.pendingEffects.push(n))}function CN(e,t){const n=bN(++lN);sN(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],aN.__hooks.pendingLayoutEffects.push(n))}function kN(e,t){const n=bN(++lN);return sN(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function RN(){return yN("element")}function LN(e){const t=e.__hooks.accessibility;t.active||(t.active=!0,t&&t.setter&&t.setter({active:!0,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}function ON(e){const t=e.__hooks.accessibility;t&&t.active&&(t.active=!1,t&&t.setter&&t.setter({active:!1,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}const IN={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},TN=Object.keys(IN);function PN(e,t){const n=i({},IN);var r;r=n,Object.keys(te.prototype).forEach((e=>{r[e]=te.prototype[e]})),te.init(r);const o={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==TN.indexOf(t)?n[t]=e.component[t].bind(o):o[t]=e.component[t]}));const a=function(e){let{sn:t,component:n}=e;const r={},o=[],i=iN(n);return((t.definition.selectionToolbar||{}).items||[]).forEach((e=>{const t=i(e);r[e.key]=t,o.push(t)})),(t.definition.actions||[]).forEach((e=>{const t=i(e);r[e.key]=t})),{actions:r,selectionToolbarItems:o,destroy(){o.length=0}}}({sn:e,component:o}),l=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):null;return Object.assign(o,{model:t.model,app:t.app,global:l,selections:t.selections,actions:a.actions}),Object.assign(n,{actions:a.actions,model:t.model,app:t.app,selections:t.selections}),[n,a]}function _N(e,t,n){"function"==typeof e.component&&(e.component=SN(e.component));const[r,o]=e.component&&e.component.__hooked?function(e,t,n){const r=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):void 0;let o=!1;const a={},l=["appLayout","constraints","interactions"],s={},c={};t.model&&t.model.session||(s.select=!0,s.edit=!0,c.select=!1,c.edit=!1);const u={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,emitter:t.emitter,deviceType:n.deviceType,theme:void 0,translator:n.translator,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,focusHandler:t.focusHandler,constraints:s,interactions:c,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(u,{explicitResize:!!t.explicitResize})},render(t){let n=!o||!1;if(t){if(t.layout&&t.layout!==this.context.layout&&(n=!0,this.context.layout=t.layout),t.context&&t.context.theme&&(this.context.theme=t.context.theme),t.context&&!!t.context.keyboardNavigation!=!!this.context.keyboardNavigation&&(this.context.keyboardNavigation=!!t.context.keyboardNavigation,n=!0),t.context&&t.context.focusHandler&&(this.context.focusHandler=t.context.focusHandler),t.options){const e={};let r=!1;Object.keys(t.options).forEach((n=>{e[n]=t.options[n],this.context.options[n]!==t.options[n]&&(r=!0)})),r&&(this.context.options=e,n=!0)}if(t.plugins){let e=this.context.plugins.length!==t.plugins.length;t.plugins.forEach(((t,n)=>{this.context.plugins[n]!==t&&(e=!0)})),e&&(this.context.plugins=[...t.plugins],n=!0)}l.forEach((e=>{const r=t.context;if(r&&Object.prototype.hasOwnProperty.call(r,e)){let t=JSON.stringify(r[e]);"constraints"===e&&(t=JSON.stringify(i(i({},r[e]),s))),"interactions"===e&&(t=JSON.stringify(i(i({},r[e]),c))),t!==a[e]&&(n=!0,a[e]=t,this.context[e]=JSON.parse(t))}}))}else n=!0;return this.context.theme&&this.context.theme.name()!==a.themeName&&(n=!0,a.themeName=this.context.theme.name()),this.context.translator.language()!==a.language&&(n=!0,a.language=u.context.translator.language()),n?(o=!0,this.currentResult=e.component.run(this),this.currentResult):this.currentResult||Promise.resolve()},resize(){return e.component.updateRectOnNextRun(this),this.render()},willUnmount(){e.component.teardown(this)},setSnapshotData(t){return e.component.runSnaps(this,t)},onContextMenu(t,n){return e.component.runMenu(this,t,n)},focus(){e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return l.forEach((e=>{a[e]=JSON.stringify(u.context[e])})),a.themeName=u.context.theme?u.context.theme.name():void 0,a.language=u.context.translator?u.context.translator.language():void 0,Object.assign(u,{selections:t.selections}),[u,null]}(e,t,n):PN(e,t),a=[];return t.model.__snInterceptor&&t.model.__snInterceptor.teardown(),e.qae.properties.onChange&&(t.model.__snInterceptor={setProperties:t.model.setProperties,applyPatches:t.model.applyPatches,teardown:void 0},t.model.setProperties=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.qae.properties.onChange.call({model:t.model},...r),t.model.__snInterceptor.setProperties.call(this,...r)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then((o=>{const i=J_.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));J_.apply(o,a),e.qae.properties.onChange.call({model:t.model},o);const l=J_.generate(i,o).map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})));return t.model.__snInterceptor.applyPatches.call(this,l,r)}))},t.model.__snInterceptor.teardown=()=>{t.model.setProperties=t.model.__snInterceptor.setProperties,delete t.model.__snInterceptor},a.push(t.model.__snInterceptor.teardown)),{generator:e,component:r,selectionToolbar:{items:o?o.selectionToolbarItems:[]},destroy(){a.forEach((e=>e()))},logicalSize:e.definition.logicalSize||(()=>!1)}}const NN=()=>{};function MN(e,t){return void 0===e?()=>t:()=>e}function qN(e){const t=e||{};return{min:"function"==typeof t.min?t.min:MN(t.min,0),max:"function"==typeof t.max?t.max:MN(t.max,1e3),added:t.added||t.add||NN,description:t.description||NN,moved:t.moved||t.move||NN,removed:t.removed||t.remove||NN,replaced:t.replaced||t.replace||NN,isDefined:()=>!!e}}function zN(e){const t=e.path||"/qHyperCubeDef",n=t.slice(0,-3);if(!1===/\/(qHyperCube|qListObject|qChildList)$/.test(n)){const e=n.includes("/qHyperCube")?"qHyperCubeDef":"qListObjectDef";throw new Error("Incorrect definition for ".concat(e," at ").concat(t,". Valid paths include /qHyperCubeDef, /qListObjectDef, or /qChildListDef, e.g. data/qHyperCubeDef"))}return{propertyPath:t,layoutPath:n,resolveLayout:e=>((e,t,n)=>{const r=t.split("/");let o=e;if(void 0===o)return n;for(let e=0;e<r.length;++e)if(""!==r[e]){if(void 0===o[r[e]])return n;o=o[r[e]]}return o})(e,n,{}),dimensions:qN(e.dimensions),measures:qN(e.measures)}}function AN(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.properties||{};t.properties&&(t.properties.initial||t.properties.onChange)&&(n=t.properties.initial,e=t.properties.onChange);const r={properties:{initial:n,onChange:e},data:{targets:((t.data||{}).targets||[]).map(zN)},exportProperties:t.exportProperties,importProperties:t.importProperties};return r}function DN(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:AN(n.qae),component:n.component||{},create:e=>_N(r,e,t),definition:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var jN={exports:{}};!function(e,t){var n;t=e.exports=d,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,o=t.re=[],i=t.src=[],a=t.tokens={},l=0;function s(e){a[e]=l++}s("NUMERICIDENTIFIER"),i[a.NUMERICIDENTIFIER]="0|[1-9]\\d*",s("NUMERICIDENTIFIERLOOSE"),i[a.NUMERICIDENTIFIERLOOSE]="[0-9]+",s("NONNUMERICIDENTIFIER"),i[a.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",s("MAINVERSION"),i[a.MAINVERSION]="("+i[a.NUMERICIDENTIFIER]+")\\.("+i[a.NUMERICIDENTIFIER]+")\\.("+i[a.NUMERICIDENTIFIER]+")",s("MAINVERSIONLOOSE"),i[a.MAINVERSIONLOOSE]="("+i[a.NUMERICIDENTIFIERLOOSE]+")\\.("+i[a.NUMERICIDENTIFIERLOOSE]+")\\.("+i[a.NUMERICIDENTIFIERLOOSE]+")",s("PRERELEASEIDENTIFIER"),i[a.PRERELEASEIDENTIFIER]="(?:"+i[a.NUMERICIDENTIFIER]+"|"+i[a.NONNUMERICIDENTIFIER]+")",s("PRERELEASEIDENTIFIERLOOSE"),i[a.PRERELEASEIDENTIFIERLOOSE]="(?:"+i[a.NUMERICIDENTIFIERLOOSE]+"|"+i[a.NONNUMERICIDENTIFIER]+")",s("PRERELEASE"),i[a.PRERELEASE]="(?:-("+i[a.PRERELEASEIDENTIFIER]+"(?:\\."+i[a.PRERELEASEIDENTIFIER]+")*))",s("PRERELEASELOOSE"),i[a.PRERELEASELOOSE]="(?:-?("+i[a.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+i[a.PRERELEASEIDENTIFIERLOOSE]+")*))",s("BUILDIDENTIFIER"),i[a.BUILDIDENTIFIER]="[0-9A-Za-z-]+",s("BUILD"),i[a.BUILD]="(?:\\+("+i[a.BUILDIDENTIFIER]+"(?:\\."+i[a.BUILDIDENTIFIER]+")*))",s("FULL"),s("FULLPLAIN"),i[a.FULLPLAIN]="v?"+i[a.MAINVERSION]+i[a.PRERELEASE]+"?"+i[a.BUILD]+"?",i[a.FULL]="^"+i[a.FULLPLAIN]+"$",s("LOOSEPLAIN"),i[a.LOOSEPLAIN]="[v=\\s]*"+i[a.MAINVERSIONLOOSE]+i[a.PRERELEASELOOSE]+"?"+i[a.BUILD]+"?",s("LOOSE"),i[a.LOOSE]="^"+i[a.LOOSEPLAIN]+"$",s("GTLT"),i[a.GTLT]="((?:<|>)?=?)",s("XRANGEIDENTIFIERLOOSE"),i[a.XRANGEIDENTIFIERLOOSE]=i[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",s("XRANGEIDENTIFIER"),i[a.XRANGEIDENTIFIER]=i[a.NUMERICIDENTIFIER]+"|x|X|\\*",s("XRANGEPLAIN"),i[a.XRANGEPLAIN]="[v=\\s]*("+i[a.XRANGEIDENTIFIER]+")(?:\\.("+i[a.XRANGEIDENTIFIER]+")(?:\\.("+i[a.XRANGEIDENTIFIER]+")(?:"+i[a.PRERELEASE]+")?"+i[a.BUILD]+"?)?)?",s("XRANGEPLAINLOOSE"),i[a.XRANGEPLAINLOOSE]="[v=\\s]*("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:"+i[a.PRERELEASELOOSE]+")?"+i[a.BUILD]+"?)?)?",s("XRANGE"),i[a.XRANGE]="^"+i[a.GTLT]+"\\s*"+i[a.XRANGEPLAIN]+"$",s("XRANGELOOSE"),i[a.XRANGELOOSE]="^"+i[a.GTLT]+"\\s*"+i[a.XRANGEPLAINLOOSE]+"$",s("COERCE"),i[a.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",s("COERCERTL"),o[a.COERCERTL]=new RegExp(i[a.COERCE],"g"),s("LONETILDE"),i[a.LONETILDE]="(?:~>?)",s("TILDETRIM"),i[a.TILDETRIM]="(\\s*)"+i[a.LONETILDE]+"\\s+",o[a.TILDETRIM]=new RegExp(i[a.TILDETRIM],"g");s("TILDE"),i[a.TILDE]="^"+i[a.LONETILDE]+i[a.XRANGEPLAIN]+"$",s("TILDELOOSE"),i[a.TILDELOOSE]="^"+i[a.LONETILDE]+i[a.XRANGEPLAINLOOSE]+"$",s("LONECARET"),i[a.LONECARET]="(?:\\^)",s("CARETTRIM"),i[a.CARETTRIM]="(\\s*)"+i[a.LONECARET]+"\\s+",o[a.CARETTRIM]=new RegExp(i[a.CARETTRIM],"g");s("CARET"),i[a.CARET]="^"+i[a.LONECARET]+i[a.XRANGEPLAIN]+"$",s("CARETLOOSE"),i[a.CARETLOOSE]="^"+i[a.LONECARET]+i[a.XRANGEPLAINLOOSE]+"$",s("COMPARATORLOOSE"),i[a.COMPARATORLOOSE]="^"+i[a.GTLT]+"\\s*("+i[a.LOOSEPLAIN]+")$|^$",s("COMPARATOR"),i[a.COMPARATOR]="^"+i[a.GTLT]+"\\s*("+i[a.FULLPLAIN]+")$|^$",s("COMPARATORTRIM"),i[a.COMPARATORTRIM]="(\\s*)"+i[a.GTLT]+"\\s*("+i[a.LOOSEPLAIN]+"|"+i[a.XRANGEPLAIN]+")",o[a.COMPARATORTRIM]=new RegExp(i[a.COMPARATORTRIM],"g");s("HYPHENRANGE"),i[a.HYPHENRANGE]="^\\s*("+i[a.XRANGEPLAIN]+")\\s+-\\s+("+i[a.XRANGEPLAIN]+")\\s*$",s("HYPHENRANGELOOSE"),i[a.HYPHENRANGELOOSE]="^\\s*("+i[a.XRANGEPLAINLOOSE]+")\\s+-\\s+("+i[a.XRANGEPLAINLOOSE]+")\\s*$",s("STAR"),i[a.STAR]="(<|>)?=?\\s*\\*";for(var c=0;c<l;c++)n(c,i[c]),o[c]||(o[c]=new RegExp(i[c]));function u(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof d)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?o[a.LOOSE]:o[a.FULL]).test(e))return null;try{return new d(e,t)}catch(e){return null}}function d(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof d){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof d))return new d(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var i=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}t.parse=u,t.valid=function(e,t){var n=u(e,t);return n?n.version:null},t.clean=function(e,t){var n=u(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=d,d.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},d.prototype.toString=function(){return this.version},d.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof d||(e=new d(e,this.options)),this.compareMain(e)||this.comparePre(e)},d.prototype.compareMain=function(e){return e instanceof d||(e=new d(e,this.options)),f(this.major,e.major)||f(this.minor,e.minor)||f(this.patch,e.patch)},d.prototype.comparePre=function(e){if(e instanceof d||(e=new d(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return f(r,o)}while(++t)},d.prototype.compareBuild=function(e){e instanceof d||(e=new d(e,this.options));var t=0;do{var r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return f(r,o)}while(++t)},d.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new d(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(v(e,t))return null;var n=u(e),r=u(t),o="";if(n.prerelease.length||r.prerelease.length){o="pre";var i="prerelease"}for(var a in n)if(("major"===a||"minor"===a||"patch"===a)&&n[a]!==r[a])return o+a;return i},t.compareIdentifiers=f;var p=/^[0-9]+$/;function f(e,t){var n=p.test(e),r=p.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function h(e,t,n){return new d(e,n).compare(new d(t,n))}function m(e,t,n){return h(e,t,n)>0}function g(e,t,n){return h(e,t,n)<0}function v(e,t,n){return 0===h(e,t,n)}function b(e,t,n){return 0!==h(e,t,n)}function y(e,t,n){return h(e,t,n)>=0}function x(e,t,n){return h(e,t,n)<=0}function S(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return v(e,n,r);case"!=":return b(e,n,r);case">":return m(e,n,r);case">=":return y(e,n,r);case"<":return g(e,n,r);case"<=":return x(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function w(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof w){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof w))return new w(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===E?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return f(t,e)},t.major=function(e,t){return new d(e,t).major},t.minor=function(e,t){return new d(e,t).minor},t.patch=function(e,t){return new d(e,t).patch},t.compare=h,t.compareLoose=function(e,t){return h(e,t,!0)},t.compareBuild=function(e,t,n){var r=new d(e,n),o=new d(t,n);return r.compare(o)||r.compareBuild(o)},t.rcompare=function(e,t,n){return h(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compareBuild(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.compareBuild(r,e,n)}))},t.gt=m,t.lt=g,t.eq=v,t.neq=b,t.gte=y,t.lte=x,t.cmp=S,t.Comparator=w;var E={};function C(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof C)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new C(e.raw,t);if(e instanceof w)return new C(e.value,t);if(!(this instanceof C))return new C(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function k(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n}function R(e){return!e||"x"===e.toLowerCase()||"*"===e}function L(e,t,n,r,o,i,a,l,s,c,u,d,p){return((t=R(n)?"":R(r)?">="+n+".0.0":R(o)?">="+n+"."+r+".0":">="+t)+" "+(l=R(s)?"":R(c)?"<"+(+s+1)+".0.0":R(u)?"<"+s+"."+(+c+1)+".0":d?"<="+s+"."+c+"."+u+"-"+d:"<="+l)).trim()}function O(e,t,r){for(var o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(o=0;o<e.length;o++)if(n(e[o].semver),e[o].semver!==E&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function I(e,t,n){try{t=new C(t,n)}catch(e){return!1}return t.test(e)}function T(e,t,n,r){var o,i,a,l,s;switch(e=new d(e,r),t=new C(t,r),n){case">":o=m,i=x,a=g,l=">",s=">=";break;case"<":o=g,i=y,a=m,l="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(I(e,t,r))return!1;for(var c=0;c<t.set.length;++c){var u=t.set[c],p=null,f=null;if(u.forEach((function(e){e.semver===E&&(e=new w(">=0.0.0")),p=p||e,f=f||e,o(e.semver,p.semver,r)?p=e:a(e.semver,f.semver,r)&&(f=e)})),p.operator===l||p.operator===s)return!1;if((!f.operator||f.operator===l)&&i(e,f.semver))return!1;if(f.operator===s&&a(e,f.semver))return!1}return!0}w.prototype.parse=function(e){var t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new d(n[2],this.options.loose):this.semver=E},w.prototype.toString=function(){return this.value},w.prototype.test=function(e){if(n("Comparator.test",e,this.options.loose),this.semver===E||e===E)return!0;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}return S(e,this.operator,this.semver,this.options)},w.prototype.intersects=function(e,t){if(!(e instanceof w))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(n=new C(e.value,t),I(this.value,n,t));if(""===e.operator)return""===e.value||(n=new C(this.value,t),I(e.semver,n,t));var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),l=S(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=S(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||i&&a||l||s},t.Range=C,C.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},C.prototype.toString=function(){return this.range},C.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[a.HYPHENRANGELOOSE]:o[a.HYPHENRANGE];e=e.replace(r,L),n("hyphen replace",e),e=e.replace(o[a.COMPARATORTRIM],"$1$2$3"),n("comparator trim",e,o[a.COMPARATORTRIM]),e=(e=(e=e.replace(o[a.TILDETRIM],"$1~")).replace(o[a.CARETTRIM],"$1^")).split(/\s+/).join(" ");var i=t?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],l=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[a.CARETLOOSE]:o[a.CARET];return e.replace(r,(function(t,r,o,i,a){var l;return n("caret",e,t,r,o,i,a),R(r)?l="":R(o)?l=">="+r+".0.0 <"+(+r+1)+".0.0":R(i)?l="0"===r?">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":">="+r+"."+o+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),l="0"===r?"0"===o?">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+"-"+a+" <"+(+r+1)+".0.0"):(n("no pr"),l="0"===r?"0"===o?">="+r+"."+o+"."+i+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+" <"+(+r+1)+".0.0"),n("caret return",l),l}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?o[a.TILDELOOSE]:o[a.TILDE];return e.replace(r,(function(t,r,o,i,a){var l;return n("tilde",e,t,r,o,i,a),R(r)?l="":R(o)?l=">="+r+".0.0 <"+(+r+1)+".0.0":R(i)?l=">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":a?(n("replaceTilde pr",a),l=">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+(+o+1)+".0"):l=">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0",n("tilde return",l),l}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?o[a.XRANGELOOSE]:o[a.XRANGE];return e.replace(r,(function(r,o,i,a,l,s){n("xRange",e,r,o,i,a,l,s);var c=R(i),u=c||R(a),d=u||R(l),p=d;return"="===o&&p&&(o=""),s=t.includePrerelease?"-0":"",c?r=">"===o||"<"===o?"<0.0.0-0":"*":o&&p?(u&&(a=0),l=0,">"===o?(o=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):"<="===o&&(o="<",u?i=+i+1:a=+a+1),r=o+i+"."+a+"."+l+s):u?r=">="+i+".0.0"+s+" <"+(+i+1)+".0.0"+s:d&&(r=">="+i+"."+a+".0"+s+" <"+i+"."+(+a+1)+".0"+s),n("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[a.STAR],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(l=l.filter((function(e){return!!e.match(i)}))),l=l.map((function(e){return new w(e,this.options)}),this)},C.prototype.intersects=function(e,t){if(!(e instanceof C))throw new TypeError("a Range is required");return this.set.some((function(n){return k(n,t)&&e.set.some((function(e){return k(e,t)&&n.every((function(n){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new C(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},C.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1},t.satisfies=I,t.maxSatisfying=function(e,t,n){var r=null,o=null;try{var i=new C(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&-1!==o.compare(e)||(o=new d(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,o=null;try{var i=new C(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&1!==o.compare(e)||(o=new d(r=e,n)))})),r},t.minVersion=function(e,t){e=new C(e,t);var n=new d("0.0.0");if(e.test(n))return n;if(n=new d("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r){e.set[r].forEach((function(e){var t=new d(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!m(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new C(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return T(e,t,"<",n)},t.gtr=function(e,t,n){return T(e,t,">",n)},t.outside=T,t.prerelease=function(e,t){var n=u(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new C(e,n),t=new C(t,n),e.intersects(t)},t.coerce=function(e,t){if(e instanceof d)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var r;(r=o[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),o[a.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;o[a.COERCERTL].lastIndex=-1}else n=e.match(o[a.COERCE]);if(null===n)return null;return u(n[2]+"."+(n[3]||"0")+"."+(n[4]||"0"),t)}}(jN,jN.exports);var FN=jN.exports;const BN={};async function $N(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!BN[i]){const n="".concat(e).concat(t&&" v".concat(t)||"");if(r&&"function"!=typeof r)throw new Error("load of visualization '".concat(n,"' is not a fuction, wrap load promise in function"));const a=(r||o.load)({name:e,version:t}),l=Promise.resolve(a);BN[i]=l.then((e=>{if(!e)throw new Error("load() of visualization '".concat(n,"' resolved to an invalid object"));return e})).catch((e=>{throw new Error("Failed to load visualization: '".concat(n,"'"))}))}return BN[i]}function WN(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,a)=>{if(n[o])throw new Error("Supernova '".concat(e,"@").concat(o,"' already registered."));n[o]=function(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{meta:a}=o,l={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&a&&a.deps&&a.deps.properties)||FN.satisfies(e,a.deps.properties),supernova:()=>$N(l.name,l.version,t,o.load).then((e=>(n=n||DN(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.supernova().then((()=>{const n=i({qInfo:{qType:l.name},visualization:l.name,version:l.version,showTitles:!0},JSON.parse(r));return t?(Ve(!0,n,e),n):i(i({},n),e)}))}};return l}({name:e,version:o},t,a),r=null},getMatchingVersionFromProperties:e=>{r||(r=function(e){const t=e.filter((e=>"undefined"===e));return[...t,...e.filter((e=>"undefined"!==e)).map((e=>e.split(".").map((e=>parseInt(e,10))))).sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2])).map((e=>e.join(".")))]}(Object.keys(n)));for(let t=r.length-1;t>=0;t--){if(n[r[t]].supportsPropertiesVersion(e))return r[t]}return null},versions:n}}function UN(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=WN(e.name,t)),r[e.name].register(e.version,n)},getSupportedVersion:(e,t)=>r[e]?r[e].getMatchingVersionFromProperties(t):null,get(e){const{name:t}=e;let{version:n}=e;if(r[t]){if(!r[t].versions[n]){n=Object.keys(r[t].versions)[0]}}else this.register({name:t,version:n});return r[t].get(n)||o.get(e)},getList:()=>Object.keys(r).map((e=>({name:e,versions:Object.keys(r[e].versions).map((e=>"undefined"===e?void 0:e))}))),clearFromCache:e=>{r[e]&&(r[e]=void 0),function(e){Object.keys(BN).forEach((t=>{t.split("__")[0]===e&&(BN[t]=void 0)}))}(e)}}}const HN={get:async e=>{const t=await fetch("/njs/snapshot/".concat(e));if(!t.ok)throw new Error(t.statusText);return t.json()},capture:e=>fetch("/njs/capture",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json()))},VN={context:{},load:()=>{},types:[],themes:[],anything:{},snapshot:HN};VN.context={theme:"light",language:"en-US",deviceType:"auto",constraints:{},interactions:{},keyboardNavigation:!1,disableCellPadding:!1};const GN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(i({},e),t)},KN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[...e,...t].filter(((e,t,n)=>n.indexOf(e)===t))},ZN=(e,t)=>({context:GN(e.context,t.context),load:t.load||e.load,loadTheme:t.loadTheme||e.loadTheme,snapshot:i({},t.snapshot||e.snapshot),types:KN(e.types,t.types),themes:KN(e.themes,t.themes),flags:GN(e.flags,t.flags),anything:GN(e.anything,t.anything)});var XN=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Q(t.context.language);function r(e,o){if(o)return r.createConfiguration(o)(e);let a=i(i({},t.context),{},{translator:n.translator});const[l]=Ww({app:e,context:a}),s=dt({themes:t.themes,loadTheme:t.loadTheme,root:l});a.themeApi=s.externalAPI;const c={galaxy:{translator:n.translator,flags:X_(t.flags),deviceType:pt(t.context.deviceType),anything:t.anything},theme:s.externalAPI,translator:n.translator,nebbie:null},u={app:e,root:l,config:t,public:c,context:a,types:null},d=UN({halo:u});t.types.forEach((e=>d.register({name:e.name,version:e.version},{meta:e.meta,load:e.load})));let p=s.setTheme(t.context.theme),f=null,h=null;const m={render:async e=>(await p,e.id?Z_(e,u):$_(e,u)),create:async e=>W_(e,u,!1),generateProperties:async e=>W_(e,u,!0),context:async e=>{let t;["theme","language","constraints","interactions","keyboardNavigation"].forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==a[n]&&(t||(t={}),t[n]=e[n])})),t&&(a=i(i(i({},a),t),{},{translator:n.translator}),t.theme&&(p=s.setTheme(t.theme),await p),t.language&&u.public.translator.language(t.language),l.context(a))},selections:async()=>(f||(f={mount(t){h||(h=jT({element:t,app:e}),l.add(h))},unmount(){h&&(l.remove(h),h=null)}}),f),field:async t=>{let n;const r="string"==typeof t?t:t.qLibraryId;if(t.qId)n=t.qId;else if(!r)throw new Error("Field identifier or object id must be provided");const o={fieldName:r,async mount(a){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a)throw new Error("Element for ".concat(r||n," not provided"));if(this._instance)throw new Error("Field or object ".concat(r||n," already mounted"));const c=()=>o.emit("selectionActivated"),u=()=>o.emit("selectionDeactivated");return new Promise((r=>{this._instance=hP({element:a,app:e,fieldIdentifier:t,qId:n,options:pP(i({onSelectionActivated:c,onSelectionDeactivated:u},s)),stateName:s.stateName||"$",renderedCallback:r}),l.add(this._instance)}))},unmount(){this._instance&&(l.remove(this._instance),this._instance=null)}};return fT(o),o},getRegisteredTypes:d.getList,__DO_NOT_USE__:{types:d,popover(t,n,r){m._popoverInstance&&(l.remove(m._popoverInstance),m._popoverInstance=null);const o=gP(i({onPopoverClose:()=>m.emit("fieldPopoverClose")},r));m._popoverInstance=H.createElement(vP,{element:t,key:AT(),app:e,fieldIdentifier:n,options:o,stateName:r.stateName||"$"}),l.add(m._popoverInstance)}}};return u.public.nebbie=m,u.types=d,fT(m),m}return r.createConfiguration=n=>e(ZN(t,n)),r.config=t,r}(VN);function QN(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}const JN=globalThis.crypto||{getRandomValues:()=>123456};function YN(){return e=>{const t=Ve({},e);t.qInfo=t.qInfo||{},t.qInfo.qId=t.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^JN.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const n=t._mock;let r=t;return n&&(delete t._mock,r=Ve({},t,n)),Promise.resolve(i({on:()=>{},once:()=>{},getLayout:()=>Promise.resolve(r),getProperties:()=>Promise.resolve(t),getEffectiveProperties:()=>Promise.resolve(t),id:t.qInfo.qId},t))}}const eM=function(e){let{args:t=[],defaultValue:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"==typeof e?e(...t):void 0!==e?e:n},tM=function(e){let{defaultValue:t,async:n=!0,delay:r=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const l=eM(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(l)),r)})):l}},nM=["id","session"],rM=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function oM(e){return!rM.includes(e)}function iM(e){const t=eM(e.getLayout);return t.qInfo&&t.qInfo.qId}function aM(e,t){return e.reduce(((e,n)=>i(i({},e),function(e,t){let n=iM(e);const{delay:r}=t,{id:o,session:a}=e,l=s(e,nM);if(o&&n&&o!==n)throw new Error("Generic object has multiple IDs, qInfo.qId: ".concat(n,", id: ").concat(o));return n=n||o||"object - ".concat(+Date.now()),{[n]:i(i({id:n,session:eM(a,{defaultValue:!0}),on:()=>{},once:()=>{}},Object.entries(l).reduce(((e,t)=>{let[n,o]=t;return i(i({},e),{},{[n]:tM(o,{async:oM(n),delay:r})})}),{})),{},{genericType:e.type})}}(n,t))),{})}function lM(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!iM(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function sM(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(lM);const n=aM(e,t);return async e=>Promise.resolve(n[e])}function cM(){return()=>Promise.resolve({id:"app-layout"})}const uM={fromGenericObjects(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new QN,r=new YN,o=new sM(e,t),i=new cM,a={id:"app - ".concat(+Date.now()),session:n,createSessionObject:r,getObject:o,getAppLayout:i};return Promise.resolve(a)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},dM={generator:DN,hook:SN,theme:ct,locale:Z};e.EnigmaMocker=uM,e.__DO_NOT_USE__=dM,e.conversion=BP,e.embed=XN,e.onContextMenu=function(e){const t=bN(++lN);t.value||(t.value=1,aN.__hooks.menus.push(t)),t.fn=e},e.onTakeSnapshot=function(e){const t=bN(++lN);t.value||(t.value=1,aN.__hooks.snaps.push(t)),t.fn=e},e.useAction=function(e,t){const[n]=wN({action(){n._config.action.call(null)}});return n.component||(n.component=aN,aN.__hooks.actions.list.push(n)),kN((()=>{const t=e();n._config=t,n.active=t.active||!1,n.disabled=t.disabled||!1,n.hidden=t.hidden||!1,n.label=t.label||"",n.getSvgIconShape=t.icon?()=>t.icon:void 0,n.key=t.key||n.component.__hooks.actions.list.length,n.component.__hooks.actions.changed=!0}),t),n.action},e.useApp=function(){const e=yN("app");return e&&e.session?e:void 0},e.useAppLayout=function(){return yN("appLayout")},e.useConstraints=function(){return yN("constraints")},e.useDeviceType=function(){return yN("deviceType")},e.useEffect=EN,e.useElement=RN,e.useEmbed=function(){return yN("nebbie")},e.useEmitter=function(){return yN("emitter")},e.useGlobal=function(){const e=yN("global");return e&&e.session?e:void 0},e.useImperativeHandle=function(e,t){const n=bN(++lN);if(n.imperative||(n.imperative=!0),sN(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],aN.__hooks.imperativeHandle=r}},e.useInteractionState=function(){return yN("interactions")},e.useKeyboard=function(){const e=yN("keyboardNavigation"),t=yN("focusHandler");if(!aN.__hooks.accessibility.exitFunction){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.__hooks.accessibility;n.enabled&&n.active&&(ON(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(aN);aN.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),LN(this))}.bind(aN);aN.__hooks.accessibility.focusFunction=n;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.__hooks.accessibility;n.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(aN);aN.__hooks.accessibility.focusSelectionFunction=r}const n=aN.__hooks.accessibility.focusFunction,r=aN.__hooks.accessibility.exitFunction,o=aN.__hooks.accessibility.focusSelectionFunction,[i,a]=wN({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return aN.__hooks.accessibility.setter=a,aN.__hooks.accessibility.enabled=e,EN((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i},e.useLayout=function(){return yN("layout")},e.useMemo=kN,e.useModel=function(){const e=yN("model");return e&&e.session?e:void 0},e.useOptions=function(){return yN("options")},e.usePlugins=function(){return yN("plugins")},e.usePromise=function(e,t){const[n,r]=wN((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=bN(++lN);return o.component||(o.component=aN),CN((()=>{let t=!1;return o.teardown=()=>{t=!0,o.teardown=null;const e=o.component.__hooks.pendingPromises.indexOf(o);e>-1&&o.component.__hooks.pendingPromises.splice(e,1)},e().then((e=>{t||(o.teardown&&o.teardown(),r({resolved:e,rejected:void 0,state:"resolved"}))})).catch((e=>{t||(o.teardown&&o.teardown(),r({resolved:void 0,rejected:e,state:"resolved"}))})),o.component.__hooks.pendingPromises.push(o),()=>{o.teardown&&o.teardown()}}),t),[n.resolved,n.rejected]},e.useRect=function(){const e=RN(),t=aN.__hooks.resizer,[n,r]=wN((()=>{const{left:t,top:n,width:r,height:o}=e.getBoundingClientRect();return{left:t,top:n,width:r,height:o}}));return t.current=n,-1===t.setters.indexOf(r)&&t.setters.push(r),t.update&&t.resize&&(t.update=!1,t.resize()),CN((()=>{if(t.initiated)return;t.initiated=!0;const n=()=>{const{left:n,top:r,width:o,height:i}=e.getBoundingClientRect(),a=t.current;a.width===o&&a.height===i&&a.left===n&&a.top===r||t.setters.forEach((e=>e({left:n,top:r,width:o,height:i})))};if(t.resize=()=>{n()},t.explicitResize)return()=>{t.resize=void 0};if("function"==typeof ResizeObserver){let r=new ResizeObserver(n);return r.observe(e),()=>{r.unobserve(e),r.disconnect(e),r=null,t.resize=void 0}}}),[e]),n},e.useRenderState=function(){bN(++lN);const e=aN.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}},e.useSelections=function(){return yN("selections")},e.useStaleLayout=function(){const e=yN("layout"),[t]=wN({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current},e.useState=wN,e.useTheme=function(){return yN("theme")},e.useTranslator=function(){return yN("translator")}}));
133
+ `),PC))),qC=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,size:a=40,style:l,thickness:s=3.6,value:c=0,variant:u="indeterminate"}=n,d=If(n,EC),p=Of({},n,{color:o,disableShrink:i,size:a,thickness:s,value:c,variant:u}),f=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Sf({root:["root",n,`color${Kp(r)}`],svg:["svg"],circle:["circle",`circle${Kp(n)}`,o&&"circleDisableShrink"]},wC,t)})(p),h={},m={},g={};if("determinate"===u){const e=2*Math.PI*((IC-s)/2);h.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),h.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,m.transform="rotate(-90deg)"}return Vg.jsx(_C,Of({className:my(f.root,r),style:Of({width:a,height:a},m,l),ownerState:p,ref:t,role:"progressbar"},g,d,{children:Vg.jsx(NC,{className:f.svg,ownerState:p,viewBox:"22 22 44 44",children:Vg.jsx(MC,{className:f.circle,style:h,ownerState:p,cx:IC,cy:IC,r:(IC-s)/2,fill:"none",strokeWidth:s})})}))}));var zC=qC;const AC=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","open","slotProps","slots","theme"],DC=uy("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})=>Of({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),jC=uy(GE,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),FC=U.forwardRef((function(e,t){var n,r,o,i,a,l;const s=ly({name:"MuiModal",props:e}),{BackdropComponent:c=jC,BackdropProps:u,classes:d,className:p,closeAfterTransition:f=!1,children:h,container:m,component:g,components:v={},componentsProps:b={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:S=!1,disablePortal:w=!1,disableRestoreFocus:E=!1,disableScrollLock:C=!1,hideBackdrop:k=!1,keepMounted:R=!1,onBackdropClick:L,onClose:O,open:I,slotProps:T,slots:P,theme:_}=s,N=If(s,AC),[M,q]=U.useState(!0),z={container:m,closeAfterTransition:f,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:S,disablePortal:w,disableRestoreFocus:E,disableScrollLock:C,hideBackdrop:k,keepMounted:R,onBackdropClick:L,onClose:O,open:I},A=Of({},s,z,{exited:M}),D=null!=(n=null!=(r=null==P?void 0:P.root)?r:v.Root)?n:DC,j=null!=(o=null!=(i=null==P?void 0:P.backdrop)?i:v.Backdrop)?o:c,F=null!=(a=null==T?void 0:T.root)?a:b.root,B=null!=(l=null==T?void 0:T.backdrop)?l:b.backdrop;return Vg.jsx(fS,Of({slots:{root:D,backdrop:j},slotProps:{root:()=>Of({},wy(F,A),!vy(D)&&{as:g,theme:_},{className:my(p,null==F?void 0:F.className,null==d?void 0:d.root,!A.open&&A.exited&&(null==d?void 0:d.hidden))}),backdrop:()=>Of({},u,wy(B,A),{className:my(null==B?void 0:B.className,null==d?void 0:d.backdrop)})},onTransitionEnter:()=>q(!1),onTransitionExited:()=>q(!0),ref:t},N,z,{children:h}))}));var BC=FC;function $C(e){return kf("MuiDivider",e)}var WC=Rf("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const UC=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],HC=uy("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})=>Of({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)`:xb(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})=>Of({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>Of({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>Of({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>Of({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),VC=uy("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>Of({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)`}))),GC=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:l=!1,light:s=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=n,f=If(n,UC),h=Of({},n,{absolute:r,component:a,flexItem:l,light:s,orientation:c,role:u,textAlign:d,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:l,variant:s}=e;return Sf({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"]},$C,r)})(h);return Vg.jsx(HC,Of({as:a,className:my(m.root,i),role:u,ref:t,ownerState:h},f,{children:o?Vg.jsx(VC,{className:m.wrapper,ownerState:h,children:o}):null}))}));var KC=GC;function ZC(e){return kf("MuiFormControlLabel",e)}var XC=Rf("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);const QC=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],JC=uy("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${XC.label}`]:t.label},t.root,t[`labelPlacement${Kp(n.labelPlacement)}`]]}})((({theme:e,ownerState:t})=>Of({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${XC.disabled}`]:{cursor:"default"}},"start"===t.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===t.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===t.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${XC.label}`]:{[`&.${XC.disabled}`]:{color:(e.vars||e).palette.text.disabled}}}))),YC=uy("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${XC.error}`]:{color:(e.vars||e).palette.error.main}}))),ek=U.forwardRef((function(e,t){var n,r;const o=ly({props:e,name:"MuiFormControlLabel"}),{className:i,componentsProps:a={},control:l,disabled:s,disableTypography:c,label:u,labelPlacement:d="end",required:p,slotProps:f={}}=o,h=If(o,QC),m=CE(),g=null!=(n=null!=s?s:l.props.disabled)?n:null==m?void 0:m.disabled,v=null!=p?p:l.props.required,b={disabled:g,required:v};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===l.props[e]&&void 0!==o[e]&&(b[e]=o[e])}));const y=wE({props:o,muiFormControl:m,states:["error"]}),x=Of({},o,{disabled:g,labelPlacement:d,required:v,error:y.error}),S=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e;return Sf({root:["root",n&&"disabled",`labelPlacement${Kp(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]},ZC,t)})(x),w=null!=(r=f.typography)?r:a.typography;let E=u;return null==E||E.type===vE||c||(E=Vg.jsx(vE,Of({component:"span"},w,{className:my(S.label,null==w?void 0:w.className),children:E}))),Vg.jsxs(JC,Of({className:my(S.root,i),ownerState:x,ref:t},h,{children:[U.cloneElement(l,b),E,v&&Vg.jsxs(YC,{ownerState:x,"aria-hidden":!0,className:S.asterisk,children:[" ","*"]})]}))}));var tk=ek;var nk=U.createContext();function rk(e){return kf("MuiGrid",e)}const ok=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],ik=Rf("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...ok.map((e=>`grid-xs-${e}`)),...ok.map((e=>`grid-sm-${e}`)),...ok.map((e=>`grid-md-${e}`)),...ok.map((e=>`grid-lg-${e}`)),...ok.map((e=>`grid-xl-${e}`))]),ak=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function lk(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function sk({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const ck=uy("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:l,zeroMinWidth:s,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,s&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==l&&t[`wrap-xs-${String(l)}`],...d]}})((({ownerState:e})=>Of({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){return iv({theme:e},av({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${ik.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=av({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=sk({breakpoints:e.breakpoints.values,values:t})),o=iv({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{marginTop:`-${lk(i)}`,[`& > .${ik.item}`]:{paddingTop:lk(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${ik.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=av({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=sk({breakpoints:e.breakpoints.values,values:t})),o=iv({theme:e},t,((t,r)=>{var o;const i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${lk(i)})`,marginLeft:`-${lk(i)}`,[`& > .${ik.item}`]:{paddingLeft:lk(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${ik.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=av({values:t.columns,breakpoints:e.breakpoints.values}),l="object"==typeof a?a[o]:a;if(null==l)return r;const s=Math.round(n/l*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${s} + ${lk(n)})`;c={flexBasis:e,maxWidth:e}}}i=Of({flexBasis:s,flexGrow:0,maxWidth:s},c)}return 0===e.breakpoints.values[o]?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r}),{})}));const uk=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:l,breakpoints:s}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,s));const u=[];s.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Sf({root:["root",n&&"container",o&&"item",l&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]},rk,t)},dk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiGrid"}),{breakpoints:r}=ay(),o=ob(n),{className:i,columns:a,columnSpacing:l,component:s="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:p,spacing:f=0,wrap:h="wrap",zeroMinWidth:m=!1}=o,g=If(o,ak),v=p||f,b=l||f,y=U.useContext(nk),x=c?a||12:y,S={},w=Of({},g);r.keys.forEach((e=>{null!=g[e]&&(S[e]=g[e],delete w[e])}));const E=Of({},o,{columns:x,container:c,direction:u,item:d,rowSpacing:v,columnSpacing:b,wrap:h,zeroMinWidth:m,spacing:f},S,{breakpoints:r.keys}),C=uk(E);return Vg.jsx(nk.Provider,{value:x,children:Vg.jsx(ck,Of({ownerState:E,className:my(C.root,i),as:s,ref:t},w))})}));var pk=dk;const fk=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function hk(e){return`scale(${e}, ${e**2})`}const mk={entering:{opacity:1,transform:hk(1)},entered:{opacity:1,transform:"none"}},gk="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),vk=U.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:l,onEntered:s,onEntering:c,onExit:u,onExited:d,onExiting:p,style:f,timeout:h="auto",TransitionComponent:m=NS}=e,g=If(e,fk),v=U.useRef(),b=U.useRef(),y=ay(),x=U.useRef(null),S=sf(x,o.ref,t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=w(c),C=w(((e,t)=>{Jw(e);const{duration:n,delay:r,easing:o}=Yw({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[y.transitions.create("opacity",{duration:a,delay:r}),y.transitions.create("transform",{duration:gk?a:.666*a,delay:r,easing:o})].join(","),l&&l(e,t)})),k=w(s),R=w(p),L=w((e=>{const{duration:t,delay:n,easing:r}=Yw({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[y.transitions.create("opacity",{duration:o,delay:n}),y.transitions.create("transform",{duration:gk?o:.666*o,delay:gk?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=hk(.75),u&&u(e)})),O=w(d);return U.useEffect((()=>()=>{clearTimeout(v.current)}),[]),Vg.jsx(m,Of({appear:r,in:a,nodeRef:x,onEnter:C,onEntered:k,onEntering:E,onExit:L,onExited:O,onExiting:R,addEndListener:e=>{"auto"===h&&(v.current=setTimeout(e,b.current||0)),n&&n(x.current,e)},timeout:"auto"===h?null:h},g,{children:(e,t)=>U.cloneElement(o,Of({style:Of({opacity:0,transform:hk(.75),visibility:"exited"!==e||a?void 0:"hidden"},mk[e],f,o.props.style),ref:S},t))}))}));vk.muiSupportAuto=!0;var bk=vk;function yk(e){return kf("MuiIcon",e)}Rf("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const xk=["baseClassName","className","color","component","fontSize"],Sk=uy("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Kp(n.color)}`],t[`fontSize${Kp(n.fontSize)}`]]}})((({theme:e,ownerState:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[t.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[t.color]}))),wk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiIcon"}),{baseClassName:r="material-icons",className:o,color:i="inherit",component:a="span",fontSize:l="medium"}=n,s=If(n,xk),c=Of({},n,{baseClassName:r,color:i,component:a,fontSize:l}),u=(e=>{const{color:t,fontSize:n,classes:r}=e;return Sf({root:["root","inherit"!==t&&`color${Kp(t)}`,`fontSize${Kp(n)}`]},yk,r)})(c);return Vg.jsx(Sk,Of({as:a,className:my(r,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t},s))}));wk.muiName="Icon";var Ek=wk;function Ck(e){return kf("MuiInputAdornment",e)}var kk,Rk=Rf("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);const Lk=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Ok=uy("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Kp(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>Of({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Rk.positionStart}&:not(.${Rk.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),Ik=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:s,variant:c}=n,u=If(n,Lk),d=CE()||{};let p=c;c&&d.variant,d&&!p&&(p=d.variant);const f=Of({},n,{hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:a,position:s,variant:p}),h=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Sf({root:["root",n&&"disablePointerEvents",o&&`position${Kp(o)}`,a,r&&"hiddenLabel",i&&`size${Kp(i)}`]},Ck,t)})(f);return Vg.jsx(EE.Provider,{value:null,children:Vg.jsx(Ok,Of({as:i,ownerState:f,className:my(h.root,o),ref:t},u,{children:"string"!=typeof r||l?Vg.jsxs(U.Fragment,{children:["start"===s?kk||(kk=Vg.jsx("span",{className:"notranslate",children:"​"})):null,r]}):Vg.jsx(vE,{color:"text.secondary",children:r})}))})}));var Tk=Ik;var Pk=U.createContext({});function _k(e){return kf("MuiList",e)}Rf("MuiList",["root","padding","dense","subheader"]);const Nk=["children","className","component","dense","disablePadding","subheader"],Mk=uy("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})=>Of({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),qk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:l=!1,subheader:s}=n,c=If(n,Nk),u=U.useMemo((()=>({dense:a})),[a]),d=Of({},n,{component:i,dense:a,disablePadding:l}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Sf({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},_k,t)})(d);return Vg.jsx(Pk.Provider,{value:u,children:Vg.jsxs(Mk,Of({as:i,className:my(p.root,o),ref:t,ownerState:d},c,{children:[s,r]}))})}));var zk=qk;function Ak(e){return kf("MuiListItem",e)}var Dk=Rf("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var jk=Rf("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Fk(e){return kf("MuiListItemSecondaryAction",e)}Rf("MuiListItemSecondaryAction",["root","disableGutters"]);const Bk=["className"],$k=uy("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})((({ownerState:e})=>Of({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0}))),Wk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,o=If(n,Bk),i=Of({},n,{disableGutters:U.useContext(Pk).disableGutters}),a=(e=>{const{disableGutters:t,classes:n}=e;return Sf({root:["root",t&&"disableGutters"]},Fk,n)})(i);return Vg.jsx($k,Of({className:my(a.root,r),ownerState:i,ref:t},o))}));Wk.muiName="ListItemSecondaryAction";var Uk=Wk;const Hk=["className"],Vk=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Gk=uy("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})=>Of({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&Of({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${jk.root}`]:{paddingRight:48}},{[`&.${Dk.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Dk.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xb(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Dk.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xb(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Dk.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"}},[`&.${Dk.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xb(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})`:xb(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48}))),Kk=uy("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Zk=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:o=!1,button:i=!1,children:a,className:l,component:s,components:c={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:p}={},dense:f=!1,disabled:h=!1,disableGutters:m=!1,disablePadding:g=!1,divider:v=!1,focusVisibleClassName:b,secondaryAction:y,selected:x=!1,slotProps:S={},slots:w={}}=n,E=If(n.ContainerProps,Hk),C=If(n,Vk),k=U.useContext(Pk),R=U.useMemo((()=>({dense:f||k.dense||!1,alignItems:r,disableGutters:m})),[r,k.dense,f,m]),L=U.useRef(null);tf((()=>{o&&L.current&&L.current.focus()}),[o]);const O=U.Children.toArray(a),I=O.length&&Qp(O[O.length-1],["ListItemSecondaryAction"]),T=Of({},n,{alignItems:r,autoFocus:o,button:i,dense:R.dense,disabled:h,disableGutters:m,disablePadding:g,divider:v,hasSecondaryAction:I,selected:x}),P=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:s,hasSecondaryAction:c,selected:u}=e;return Sf({root:["root",o&&"dense",!a&&"gutters",!l&&"padding",s&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Ak,r)})(T),_=sf(L,t),N=w.root||c.Root||Gk,M=S.root||u.root||{},q=Of({className:my(P.root,M.className,l),disabled:h},C);let z=s||"li";return i&&(q.component=s||"div",q.focusVisibleClassName=my(Dk.focusVisible,b),z=aw),I?(z=q.component||s?z:"div","li"===d&&("li"===z?z="div":"li"===q.component&&(q.component="div")),Vg.jsx(Pk.Provider,{value:R,children:Vg.jsxs(Kk,Of({as:d,className:my(P.container,p),ref:_,ownerState:T},E,{children:[Vg.jsx(N,Of({},M,!vy(N)&&{as:z,ownerState:Of({},T,M.ownerState)},q,{children:O})),O.pop()]}))})):Vg.jsx(Pk.Provider,{value:R,children:Vg.jsxs(N,Of({},M,{as:z,ref:_},!vy(N)&&{ownerState:Of({},T,M.ownerState)},q,{children:[O,y&&Vg.jsx(Uk,{children:y})]}))})}));var Xk=Zk;function Qk(e){return kf("MuiListItemIcon",e)}var Jk=Rf("MuiListItemIcon",["root","alignItemsFlexStart"]);const Yk=["className"],eR=uy("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})=>Of({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),tR=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=If(n,Yk),i=Of({},n,{alignItems:U.useContext(Pk).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return Sf({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Qk,n)})(i);return Vg.jsx(eR,Of({className:my(a.root,r),ownerState:i,ref:t},o))}));var nR=tR;var rR=Rf("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const oR=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function iR(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function aR(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function lR(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 sR(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")&&lR(l,i)&&!t)return l.focus(),!0;l=o(e,l,n)}return!1}const cR=U.forwardRef((function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:l=!1,disableListWrap:s=!1,onKeyDown:c,variant:u="selectedMenu"}=e,d=If(e,oR),p=U.useRef(null),f=U.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});tf((()=>{r&&p.current.focus()}),[r]),U.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${bf(Jp(e))}px`;p.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}})),[]);const h=sf(p,t);let m=-1;U.Children.forEach(i,((e,t)=>{U.isValidElement(e)&&(e.props.disabled||("selectedMenu"===u&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=i.length&&(m=-1)))}));const g=U.Children.map(i,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===u&&(t.tabIndex=0),U.cloneElement(e,t)}return e}));return Vg.jsx(zk,Of({role:"menu",ref:h,className:a,onKeyDown:e=>{const t=p.current,n=e.key,r=Jp(t).activeElement;if("ArrowDown"===n)e.preventDefault(),sR(t,r,s,l,iR);else if("ArrowUp"===n)e.preventDefault(),sR(t,r,s,l,aR);else if("Home"===n)e.preventDefault(),sR(t,null,s,l,iR);else if("End"===n)e.preventDefault(),sR(t,null,s,l,aR);else if(1===n.length){const o=f.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&&lR(r,o);o.previousKeyMatched&&(s||sR(t,r,!1,l,iR,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1},d,{children:g}))}));var uR=cR;function dR(e){return kf("MuiPopover",e)}Rf("MuiPopover",["root","paper"]);const pR=["onEntering"],fR=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function hR(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function mR(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function gR(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function vR(e){return"function"==typeof e?e():e}const bR=uy(BC,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yR=uy(oE,{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}),xR=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:l="anchorEl",children:s,className:c,container:u,elevation:d=8,marginThreshold:p=16,open:f,PaperProps:h={},transformOrigin:m={vertical:"top",horizontal:"left"},TransitionComponent:g=bk,transitionDuration:v="auto",TransitionProps:{onEntering:b}={}}=n,y=If(n.TransitionProps,pR),x=If(n,fR),S=U.useRef(),w=sf(S,h.ref),E=Of({},n,{anchorOrigin:i,anchorReference:l,elevation:d,marginThreshold:p,PaperProps:h,transformOrigin:m,TransitionComponent:g,transitionDuration:v,TransitionProps:y}),C=(e=>{const{classes:t}=e;return Sf({root:["root"],paper:["paper"]},dR,t)})(E),k=U.useCallback((()=>{if("anchorPosition"===l)return a;const e=vR(o),t=(e&&1===e.nodeType?e:Jp(S.current).body).getBoundingClientRect();return{top:t.top+hR(t,i.vertical),left:t.left+mR(t,i.horizontal)}}),[o,i.horizontal,i.vertical,a,l]),R=U.useCallback((e=>({vertical:hR(e,m.vertical),horizontal:mR(e,m.horizontal)})),[m.horizontal,m.vertical]),L=U.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=R(t);if("none"===l)return{top:null,left:null,transformOrigin:gR(n)};const r=k();let i=r.top-n.vertical,a=r.left-n.horizontal;const s=i+t.height,c=a+t.width,u=Yp(vR(o)),d=u.innerHeight-p,f=u.innerWidth-p;if(i<p){const e=i-p;i-=e,n.vertical+=e}else if(s>d){const e=s-d;i-=e,n.vertical+=e}if(a<p){const e=a-p;a-=e,n.horizontal+=e}else if(c>f){const e=c-f;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:gR(n)}}),[o,l,k,R,p]),[O,I]=U.useState(f),T=U.useCallback((()=>{const e=S.current;if(!e)return;const t=L(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,I(!0)}),[L]);U.useEffect((()=>{f&&T()})),U.useImperativeHandle(r,(()=>f?{updatePosition:()=>{T()}}:null),[f,T]),U.useEffect((()=>{if(!f)return;const e=Xp((()=>{T()})),t=Yp(o);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[o,f,T]);let P=v;"auto"!==v||g.muiSupportAuto||(P=void 0);const _=u||(o?Jp(vR(o)).body:void 0);return Vg.jsx(bR,Of({BackdropProps:{invisible:!0},className:my(C.root,c),container:_,open:f,ref:t,ownerState:E},x,{children:Vg.jsx(g,Of({appear:!0,in:f,onEntering:(e,t)=>{b&&b(e,t),T()},onExited:()=>{I(!1)},timeout:P},y,{children:Vg.jsx(yR,Of({elevation:d},h,{ref:w,className:my(C.paper,h.className)},O?void 0:{style:Of({},h.style,{opacity:0})},{ownerState:E,children:s}))}))}))}));var SR=xR;function wR(e){return kf("MuiMenuItem",e)}var ER=Rf("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const CR=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],kR=uy(aw,{shouldForwardProp:e=>sy(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})=>Of({},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"}},[`&.${ER.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:xb(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ER.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:xb(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ER.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:xb(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})`:xb(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ER.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ER.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${WC.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${WC.inset}`]:{marginLeft:52},[`& .${rR.root}`]:{marginTop:0,marginBottom:0},[`& .${rR.inset}`]:{paddingLeft:36},[`& .${Jk.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&Of({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Jk.root} svg`]:{fontSize:"1.25rem"}})))),RR=U.forwardRef((function(e,t){const n=ly({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:s,role:c="menuitem",tabIndex:u,className:d}=n,p=If(n,CR),f=U.useContext(Pk),h=U.useMemo((()=>({dense:i||f.dense||!1,disableGutters:l})),[f.dense,i,l]),m=U.useRef(null);tf((()=>{r&&m.current&&m.current.focus()}),[r]);const g=Of({},n,{dense:h.dense,divider:a,disableGutters:l}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return Of({},a,Sf({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},wR,a))})(n),b=sf(m,t);let y;return n.disabled||(y=void 0!==u?u:-1),Vg.jsx(Pk.Provider,{value:h,children:Vg.jsx(kR,Of({ref:b,role:c,tabIndex:y,component:o,focusVisibleClassName:my(v.focusVisible,s),className:my(v.root,d)},p,{ownerState:g,classes:v}))})}));var LR,OR=RR;const IR=["children","classes","className","label","notched"],TR=uy("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),PR=uy("legend")((({ownerState:e,theme:t})=>Of({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&Of({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))));const _R=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],NR=uy(_E,{shouldForwardProp:e=>sy(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:TE})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Of({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${DE.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${DE.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${DE.focused} .${DE.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${DE.error} .${DE.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${DE.disabled} .${DE.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&Of({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))})),MR=uy((function(e){const{className:t,label:n,notched:r}=e,o=If(e,IR),i=null!=n&&""!==n,a=Of({},e,{notched:r,withLabel:i});return Vg.jsx(TR,Of({"aria-hidden":!0,className:t,ownerState:a},o,{children:Vg.jsx(PR,{ownerState:a,children:i?Vg.jsx("span",{children:n}):LR||(LR=Vg.jsx("span",{className:"notranslate",children:"​"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),qR=uy(NE,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:PE})((({theme:e,ownerState:t})=>Of({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0}))),zR=U.forwardRef((function(e,t){var n,r,o,i,a;const l=ly({props:e,name:"MuiOutlinedInput"}),{components:s={},fullWidth:c=!1,inputComponent:u="input",label:d,multiline:p=!1,notched:f,slots:h={},type:m="text"}=l,g=If(l,_R),v=(e=>{const{classes:t}=e;return Of({},t,Sf({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},AE,t))})(l),b=CE(),y=wE({props:l,muiFormControl:b,states:["required"]}),x=Of({},l,{color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:b,fullWidth:c,hiddenLabel:y.hiddenLabel,multiline:p,size:y.size,type:m}),S=null!=(n=null!=(r=h.root)?r:s.Root)?n:NR,w=null!=(o=null!=(i=h.input)?i:s.Input)?o:qR;return Vg.jsx(zE,Of({slots:{root:S,input:w},renderSuffix:e=>Vg.jsx(MR,{ownerState:x,className:v.notchedOutline,label:null!=d&&""!==d&&y.required?a||(a=Vg.jsxs(U.Fragment,{children:[d," ","*"]})):d,notched:void 0!==f?f:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:c,inputComponent:u,multiline:p,ref:t,type:m},g,{classes:Of({},v,{notchedOutline:null})}))}));zR.muiName="Input";var AR=zR,DR=Zw(Vg.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),jR=Zw(Vg.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");const FR=uy("span")({position:"relative",display:"flex"}),BR=uy(DR)({transform:"scale(1)"}),$R=uy(jR)((({theme:e,ownerState:t})=>Of({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})})));function WR(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o=Of({},e,{checked:t});return Vg.jsxs(FR,{className:n.root,ownerState:o,children:[Vg.jsx(BR,{fontSize:r,className:n.background,ownerState:o}),Vg.jsx($R,{fontSize:r,className:n.dot,ownerState:o})]})}var UR=U.createContext(void 0);function HR(e){return kf("MuiRadio",e)}var VR=Rf("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary"]);const GR=["checked","checkedIcon","color","icon","name","onChange","size","className"],KR=uy(cC,{shouldForwardProp:e=>sy(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Kp(n.color)}`]]}})((({theme:e,ownerState:t})=>Of({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:xb("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${VR.checked}`]:{color:(e.vars||e).palette[t.color].main}},{[`&.${VR.disabled}`]:{color:(e.vars||e).palette.action.disabled}})));const ZR=Vg.jsx(WR,{checked:!0}),XR=Vg.jsx(WR,{}),QR=U.forwardRef((function(e,t){var n,r;const o=ly({props:e,name:"MuiRadio"}),{checked:i,checkedIcon:a=ZR,color:l="primary",icon:s=XR,name:c,onChange:u,size:d="medium",className:p}=o,f=If(o,GR),h=Of({},o,{color:l,size:d}),m=(e=>{const{classes:t,color:n}=e;return Of({},t,Sf({root:["root",`color${Kp(n)}`]},HR,t))})(h),g=U.useContext(UR);let v=i;const b=Zp(u,g&&g.onChange);let y=c;return g&&(void 0===v&&(v=function(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}(g.value,o.value)),void 0===y&&(y=g.name)),Vg.jsx(KR,Of({type:"radio",icon:U.cloneElement(s,{fontSize:null!=(n=XR.props.fontSize)?n:d}),checkedIcon:U.cloneElement(a,{fontSize:null!=(r=ZR.props.fontSize)?r:d}),ownerState:h,classes:m,name:y,checked:v,onChange:b,ref:t,className:my(m.root,p)},f))}));var JR=QR;function YR(e){return kf("MuiTooltip",e)}var eL=Rf("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const tL=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const nL=uy(SE,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((({theme:e,ownerState:t,open:n})=>Of({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${eL.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${eL.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${eL.arrow}`]:Of({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${eL.arrow}`]:Of({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),rL=uy("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Kp(n.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>{return Of({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:xb(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(n=16/14,Math.round(1e5*n)/1e5)+"em",fontWeight:e.typography.fontWeightRegular},{[`.${eL.popper}[data-popper-placement*="left"] &`]:Of({transformOrigin:"right center"},t.isRtl?Of({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):Of({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${eL.popper}[data-popper-placement*="right"] &`]:Of({transformOrigin:"left center"},t.isRtl?Of({marginRight:"14px"},t.touch&&{marginRight:"24px"}):Of({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${eL.popper}[data-popper-placement*="top"] &`]:Of({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${eL.popper}[data-popper-placement*="bottom"] &`]:Of({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var n})),oL=uy("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:xb(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let iL=!1,aL=null,lL={x:0,y:0};function sL(e,t){return n=>{t&&t(n),e(n)}}const cL=U.forwardRef((function(e,t){var n,r,o,i,a,l,s,c,u,d,p,f,h,m,g,v,b,y,x;const S=ly({props:e,name:"MuiTooltip"}),{arrow:w=!1,children:E,components:C={},componentsProps:k={},describeChild:R=!1,disableFocusListener:L=!1,disableHoverListener:O=!1,disableInteractive:I=!1,disableTouchListener:T=!1,enterDelay:P=100,enterNextDelay:_=0,enterTouchDelay:N=700,followCursor:M=!1,id:q,leaveDelay:z=0,leaveTouchDelay:A=1500,onClose:D,onOpen:j,open:F,placement:B="bottom",PopperComponent:$,PopperProps:W={},slotProps:H={},slots:V={},title:G,TransitionComponent:K=bk,TransitionProps:Z}=S,X=If(S,tL),Q=ay(),J="rtl"===Q.direction,[Y,ee]=U.useState(),[te,ne]=U.useState(null),re=U.useRef(!1),oe=I||M,ie=U.useRef(),ae=U.useRef(),le=U.useRef(),se=U.useRef(),[ce,ue]=af({controlled:F,default:!1,name:"Tooltip",state:"open"});let de=ce;const pe=of(q),fe=U.useRef(),he=U.useCallback((()=>{void 0!==fe.current&&(document.body.style.WebkitUserSelect=fe.current,fe.current=void 0),clearTimeout(se.current)}),[]);U.useEffect((()=>()=>{clearTimeout(ie.current),clearTimeout(ae.current),clearTimeout(le.current),he()}),[he]);const me=e=>{clearTimeout(aL),iL=!0,ue(!0),j&&!de&&j(e)},ge=lf((e=>{clearTimeout(aL),aL=setTimeout((()=>{iL=!1}),800+z),ue(!1),D&&de&&D(e),clearTimeout(ie.current),ie.current=setTimeout((()=>{re.current=!1}),Q.transitions.duration.shortest)})),ve=e=>{re.current&&"touchstart"!==e.type||(Y&&Y.removeAttribute("title"),clearTimeout(ae.current),clearTimeout(le.current),P||iL&&_?ae.current=setTimeout((()=>{me(e)}),iL?_:P):me(e))},be=e=>{clearTimeout(ae.current),clearTimeout(le.current),le.current=setTimeout((()=>{ge(e)}),z)},{isFocusVisibleRef:ye,onBlur:xe,onFocus:Se,ref:we}=vf(),[,Ee]=U.useState(!1),Ce=e=>{xe(e),!1===ye.current&&(Ee(!1),be(e))},ke=e=>{Y||ee(e.currentTarget),Se(e),!0===ye.current&&(Ee(!0),ve(e))},Re=e=>{re.current=!0;const t=E.props;t.onTouchStart&&t.onTouchStart(e)},Le=ve,Oe=be,Ie=e=>{Re(e),clearTimeout(le.current),clearTimeout(ie.current),he(),fe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",se.current=setTimeout((()=>{document.body.style.WebkitUserSelect=fe.current,ve(e)}),N)},Te=e=>{E.props.onTouchEnd&&E.props.onTouchEnd(e),he(),clearTimeout(le.current),le.current=setTimeout((()=>{ge(e)}),A)};U.useEffect((()=>{if(de)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||ge(e)}}),[ge,de]);const Pe=sf(E.ref,we,ee,t);G||0===G||(de=!1);const _e=U.useRef(),Ne={},Me="string"==typeof G;R?(Ne.title=de||!Me||O?null:G,Ne["aria-describedby"]=de?pe:null):(Ne["aria-label"]=Me?G:null,Ne["aria-labelledby"]=de&&!Me?pe:null);const qe=Of({},Ne,X,E.props,{className:my(X.className,E.props.className),onTouchStart:Re,ref:Pe},M?{onMouseMove:e=>{const t=E.props;t.onMouseMove&&t.onMouseMove(e),lL={x:e.clientX,y:e.clientY},_e.current&&_e.current.update()}}:{}),ze={};T||(qe.onTouchStart=Ie,qe.onTouchEnd=Te),O||(qe.onMouseOver=sL(Le,qe.onMouseOver),qe.onMouseLeave=sL(Oe,qe.onMouseLeave),oe||(ze.onMouseOver=Le,ze.onMouseLeave=Oe)),L||(qe.onFocus=sL(ke,qe.onFocus),qe.onBlur=sL(Ce,qe.onBlur),oe||(ze.onFocus=ke,ze.onBlur=Ce));const Ae=U.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(te),options:{element:te,padding:4}}];return null!=(e=W.popperOptions)&&e.modifiers&&(t=t.concat(W.popperOptions.modifiers)),Of({},W.popperOptions,{modifiers:t})}),[te,W]),De=Of({},S,{isRtl:J,arrow:w,disableInteractive:oe,placement:B,PopperComponentProp:$,touch:re.current}),je=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e;return Sf({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Kp(i.split("-")[0])}`],arrow:["arrow"]},YR,t)})(De),Fe=null!=(n=null!=(r=V.popper)?r:C.Popper)?n:nL,Be=null!=(o=null!=(i=null!=(a=V.transition)?a:C.Transition)?i:K)?o:bk,$e=null!=(l=null!=(s=V.tooltip)?s:C.Tooltip)?l:rL,We=null!=(c=null!=(u=V.arrow)?u:C.Arrow)?c:oL,Ue=by(Fe,Of({},W,null!=(d=H.popper)?d:k.popper,{className:my(je.popper,null==W?void 0:W.className,null==(p=null!=(f=H.popper)?f:k.popper)?void 0:p.className)}),De),He=by(Be,Of({},Z,null!=(h=H.transition)?h:k.transition),De),Ve=by($e,Of({},null!=(m=H.tooltip)?m:k.tooltip,{className:my(je.tooltip,null==(g=null!=(v=H.tooltip)?v:k.tooltip)?void 0:g.className)}),De),Ge=by(We,Of({},null!=(b=H.arrow)?b:k.arrow,{className:my(je.arrow,null==(y=null!=(x=H.arrow)?x:k.arrow)?void 0:y.className)}),De);return Vg.jsxs(U.Fragment,{children:[U.cloneElement(E,qe),Vg.jsx(Fe,Of({as:null!=$?$:SE,placement:B,anchorEl:M?{getBoundingClientRect:()=>({top:lL.y,left:lL.x,right:lL.x,bottom:lL.y,width:0,height:0})}:Y,popperRef:_e,open:!!Y&&de,id:pe,transition:!0},ze,Ue,{popperOptions:Ae,children:({TransitionProps:e})=>Vg.jsx(Be,Of({timeout:Q.transitions.duration.shorter},e,He,{children:Vg.jsxs($e,Of({},Ve,{children:[G,w?Vg.jsx(We,Of({},Ge,{ref:ne})):null]}))}))}))]})}));var uL=cL;const[dL,pL]=Tw({}),[fL,hL]=Tw({}),[mL,gL]=Tw({}),[vL,bL]=Tw({}),[yL,xL]=Tw({}),[,SL]=Tw({}),wL=e=>{let{type:t,value:n}=e;const r=SL.get(n.id);SL.set(n.id,{});const o=()=>{hL.clear(n.id),xL.set(n.id,{}),xL.dispatch(!0)},i=()=>{n.removeListener("changed",o),pL.clear(n.id),hL.clear(n.id),gL.clear(n.id),bL.clear(n.id),xL.clear(n.id),SL.clear(n.id)};if("SET"===t)r||(n.on("changed",o),n.once("closed",(()=>{i()})));return i},[EL,CL]=Tw({},wL);function kL(e,t){const n=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[r]=EL(),[o]=mL(),[i,a]=U.useState();let l;n&&(l=o.get(n));for(var s=arguments.length,c=new Array(s>2?s-2:0),u=2;u<s;u++)c[u-2]=arguments[u];return U.useEffect((()=>{if(!t)return;(async()=>{if(!l){const r=t.createSessionObject(e);l=r,o.set(n,l)}const i=await l;r.set(n,i),a(i)})()}),[t,...c]),[i]}const RL={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function LL(e){return kL(RL,e)}const OL=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let a;switch(t.type){case"INVALID":a=i(i({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":a={result:i({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":a=i(i({},e),{},{invalid:!0,valid:!1,validating:!1,canCancel:!1,canRetry:!0,rpcRetry:!1});break;default:throw new Error("Undefined action")}let l=n.get(r);return l||(l={}),l[o]=a,n.set(r,l),a};function IL(e,t){const n=e?"".concat(e.id):null,[r]=dL(),[o,i]=U.useReducer(OL,n?r.get(n):null),[a]=yL(),[l]=fL();let s;n&&(s=l.get(n),s||(s={},l.set(n,s)));const c=async o=>{let a=s[t];if(!a||a&&a.rpcRetry){a={rpc:e[t](),rpcRetry:!1},s[t]=a,i({type:"INVALID",method:t,key:n,model:e,rpcResultStore:r,canCancel:!0})}try{const o=await a.rpc;i({type:"VALID",result:o,key:n,method:t,model:e,rpcResultStore:r})}catch(e){15!==e.code||o||(a.rpcRetry||(a.rpcRetry=!0),c(!0))}},u={cancel:async()=>{const o=e.session.getObjectApi({handle:-1});await o.cancelRequest(s[t].rpc.requestId),i({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:r})},retry:()=>{s[t].rpcRetry=!0,c()}};return U.useEffect((()=>{e&&c()}),[e,a.get(e&&e.id),n,t]),[o&&o.result,{validating:o&&o.validating,canCancel:o&&o.canCancel,canRetry:o&&o.canRetry},u]}function TL(e){return IL(e,"getLayout")}function PL(e){return IL(e,"getAppLayout")}function _L(){const[e,t]=U.useState(),[n,r]=U.useState(),o=U.useCallback((e=>{e&&t(e)}),[]),i=()=>{const{left:t,top:n,width:o,height:i}=e.getBoundingClientRect();r({left:t,top:n,width:o,height:i})};return U.useLayoutEffect((()=>{if(e){if("function"==typeof ResizeObserver){let t=new ResizeObserver(i);return t.observe(e),()=>{t.unobserve(e),t.disconnect(e),t=null}}return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}}}),[e]),[o,n,e]}function NL(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function ML(e){let{size:t,style:n={},viewBox:r="0 0 16 16",shapes:o=[]}=e;const a=i({fontSize:NL(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},n);return H.createElement("i",{style:a},H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.map(((e,t)=>{let{type:n,attrs:r}=e;return H.createElement(n,l({key:t},r))}))))}var qL=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M9.41421356,8 L11.8890873,5.52512627 C12.065864,5.34834957 12.0305087,4.95944084 11.8183766,4.74730881 L11.2526912,4.18162338 C11.0405592,3.96949135 10.6516504,3.93413601 10.4748737,4.1109127 L8,6.58578644 L5.52512627,4.1109127 C5.34834957,3.93413601 4.95944084,3.96949135 4.74730881,4.18162338 L4.25233406,4.67659813 C3.96949135,4.95944084 3.93413601,5.34834957 4.1109127,5.52512627 L6.58578644,8 L4.1109127,10.4748737 C3.93413601,10.6516504 3.96949135,11.0405592 4.18162338,11.2526912 L4.67659813,11.7476659 C4.95944084,12.0305087 5.34834957,12.065864 5.52512627,11.8890873 L8,9.41421356 L10.4748737,11.8890873 C10.6516504,12.065864 11.0405592,12.0305087 11.2526912,11.8183766 L11.8183766,11.2526912 C12.0305087,11.0405592 12.065864,10.6516504 11.8890873,10.4748737 L9.41421356,8 Z M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z"}}]}))(e));var zL=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10ZM3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0v1.652ZM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9Zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0Z"}}]}))(e));var AL=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M2.5,7 L11,7 C11.5522847,7 12,7.44771525 12,8 L12,15 C12,15.5522847 11.5522847,16 11,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,8 C0,7.44771525 0.44771525,7 1,7 L1,4.98151367 C1,2.23029964 3.23857625,0 6,0 C8.4241995,0 10.4454541,1.71883353 10.9029715,4 L9.34209114,4 C8.9671727,2.54028848 7.9088888,1.5 6,1.5 C3.54860291,1.5 2.5,3.21561511 2.5,5.33193359 L2.5,7 Z"}}]}))(e));var DL=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},jL=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),FL=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},BL=function(e){function t(){var e,n,r;DL(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=FL(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},FL(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),jL(t,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,a=void 0===i?10:i,l=n.threshold,s=void 0===l?15:l,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],l=null,s=null,c=o;c<=i;c++)t(c)?null!==s&&(a.push(l,s),l=s=null):(s=c,null===l&&(l=c));if(null!==s){for(var u=Math.min(Math.max(s,l+r-1),n-1),d=s+1;d<=u&&!t(d);d++)s=d;a.push(l,s)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var p=a[0]-1;if(t(p))break;a[0]=p}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-s),stopIndex:Math.min(o-1,t+s)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],a=n(o,i);null!=a&&a.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:o,stopIndex:i})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(o,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}}))},o=0;o<e.length;o+=2)r(o)}}]),t}(U.PureComponent);const $L=["S","XS"],WL=e=>e.reduce(((e,t)=>e.concat(t)));function UL(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[t]=e;return n=t.qState,!!$L.includes(n)&&t.qElemNumber;var n}));return t.filter((e=>!1!==e))}));return WL(t)}async function HL(e){let{selections:t,elemNumbers:n,toggle:r,isSingleSelect:o}=e;if(0===n.length)return!1;let i=!1;if(!n.some((e=>Number.isNaN(e)))){const e=n;try{i=!1!==await t.select({method:"selectListObjectValues",params:["/qListObjectDef",e,r]})}catch(e){i=!1}i||(o?t.cancel():t.clear())}return i}const VL="RowColumn",GL={row:"".concat(VL,"-row"),rowBorderBottom:"".concat(VL,"-rowBorderBottom"),column:"".concat(VL,"-column"),fieldRoot:"".concat(VL,"-fieldRoot"),cell:"".concat(VL,"-cell"),labelText:"".concat(VL,"-labelText"),labelDense:"".concat(VL,"-labelDense"),highlighted:"".concat(VL,"-highlighted"),checkboxLabel:"".concat(VL,"-checkboxLabel"),icon:"".concat(VL,"-icon"),S:"".concat(VL,"-S"),XS:"".concat(VL,"-XS"),A:"".concat(VL,"-A"),X:"".concat(VL,"-X"),frequencyCount:"".concat(VL,"-frequencyCount"),barContainer:"".concat(VL,"-barContainer"),bar:"".concat(VL,"-bar"),barSelected:"".concat(VL,"-barSelected"),barWithCheckbox:"".concat(VL,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(VL,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(VL,"-excludedTextWithCheckbox")},KL=".".concat(GL.fieldRoot),ZL=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function XL(e){var t,n;let{selectionState:r,selections:o,checkboxes:i=!1,doc:a=document,loaderRef:l}=e;const s=U.useRef({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});U.useEffect((()=>{var e,t;if(null===(e=l.current)||void 0===e||null===(t=e._listRef)||void 0===t||!t._outerRef)return;const n=e=>e.preventDefault(),r=e=>e.preventDefault(),o=e=>e.preventDefault(),i=l.current._listRef._outerRef;return i.addEventListener("gesturestart",n),i.addEventListener("gesturechange",r),i.addEventListener("gestureend",o),()=>{i.removeEventListener("gesturestart",n),i.removeEventListener("gesturechange",r),i.removeEventListener("gestureend",o)}}),[null===(t=l.current)||void 0===t||null===(n=t._listRef)||void 0===n?void 0:n._outerRef]);const c=()=>(r.setSelectableValuesUpdating(),HL({selections:o,elemNumbers:s.current.elemNumbers,isSingleSelect:r.isSingleSelect,toggle:s.current.toggle})),u=(e,t)=>{const n=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[{qElemNumber:t}]=e;return t}));return t}));return WL(t)}(r.enginePages);return function(e,t){if(!e)return[];if(e.length<=1)return e;const{min:n,max:r}=function(e,t){let n=1/0,r=-1/0;return e.forEach((e=>{const o=t.indexOf(e);n=o<n?o:n,r=o>r?o:r})),{min:n,max:r}}(e,t);return t.slice(n,r+1)}([e,t],n)},d=e=>{const{startElemNumber:t}=s.current;if(t===e)return;const n=u(s.current.startElemNumber,e);r.updateItems(n,!0,s.current.elemNumbers)},p=U.useCallback((e=>{if(r.selectDisabled())return;const t=+e.target.getAttribute("data-n"),n=!r.isSingleSelect&&ZL(e.nativeEvent);s.current.elemNumbers=[t],s.current.toggle=n,n||r.clearItemStates(!0),r.updateItem(t),s.current.active=!1,c()}),[]),f=U.useCallback((e=>{if(0!==e.button||r.selectDisabled())return;const t=+e.currentTarget.getAttribute("data-n"),n=!r.isSingleSelect&&ZL(e);s.current.isRange=!1,s.current.startElemNumber=t,s.current.elemNumbers=[t],s.current.toggle=n,s.current.active=!0,n||r.clearItemStates(!0),r.updateItem(t),r.isSingleSelect&&(s.current.active=!1,c()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(e,e.currentTarget)}),[]),h=U.useCallback((e=>{if(0===e.button&&s.current.active){if(s.current.active=!1,s.current.isRange){const t=+e.currentTarget.getAttribute("data-n");d(t)}c()}}),[]),m=U.useCallback((e=>{0===e.button&&s.current.active&&(s.current.active=!1,c())}),[]),g=U.useCallback((e=>{if(!s.current.active)return;s.current.isRange||(s.current.isRange=!0,r.isSelected(s.current.startElemNumber)||(r.updateItem(s.current.startElemNumber,!0),s.current.elemNumbers=[]));const t=+e.currentTarget.getAttribute("data-n");d(t)}),[]),v=U.useCallback((e=>{var t,n,o,i;if(s.current.active||s.current.isRange||r.isSingleSelect||e.touches.length<=1)return;if(e.touches.length>2)return void c();const a=Number(null===(t=e.touches[0].target)||void 0===t||null===(n=t.closest(KL))||void 0===n?void 0:n.getAttribute("data-n")),l=Number(null===(o=e.touches[1].target)||void 0===o||null===(i=o.closest(KL))||void 0===i?void 0:i.getAttribute("data-n"));if(Number.isNaN(a)||Number.isNaN(a))return void c();s.current.active=!0;u(a,l).length<7&&(s.current.touchRangeSmall=!0),s.current.elemNumbers=[],s.current.touchElemNumbers=[a,l]}),[]),b=U.useCallback((()=>{if(2!==s.current.touchElemNumbers.length)return;if(s.current.touchRangeSmall)return s.current.touchRangeSmall=!1,s.current.touchElemNumbers=[],void(s.current.active=!1);const[e,t]=s.current.touchElemNumbers;s.current.startElemNumber=e,d(t),s.current.touchElemNumbers=[],s.current.active=!1,s.current.toggle=!0,c()}),[]);U.useEffect((()=>(a.addEventListener("mouseup",m),()=>{a.removeEventListener("mouseup",m)})),[m]),U.useEffect((()=>{const e=()=>{r.clearItemStates(!1)},t=()=>{r.clearItemStates(!0),r.triggerStateChanged()};return o.on("clearItemStates",e),o.on("deactivated",e),o.on("cleared",t),()=>{o.removeListener("clearItemStates",e),o.removeListener("deactivated",e),o.removeListener("cleared",t)}}),[o]);const y={};return i?Object.assign(y,{onChange:p}):Object.assign(y,{onMouseUp:h,onMouseDown:f,onMouseEnter:g,onTouchStart:v,onTouchEnd:b}),{interactionEvents:y,select:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const i=!r.isSingleSelect&&ZL(null==n?void 0:n.nativeEvent);i||r.clearItemStates(!0);const a=[];return r.updateItems(e,t,a),r.setSelectableValuesUpdating(),HL({selections:o,elemNumbers:t?a:e,isSingleSelect:r.isSingleSelect,toggle:i})}}}const QL=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var JL=e=>ML(QL(e));const YL=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,eO=e=>e?"A"===e.qState:null,tO=e=>{let{cell:t,checkboxes:n}=e;return(eO(t)||YL(t))&&n},nO=e=>e.filter((e=>!!e)).join(" ").trim(),rO=e=>e||"-",oO=e=>{let{theme:t}=e;return{background:t.palette.selected.main,color:t.palette.selected.mainContrastText,"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder),outline:"none"},"& $cell":{paddingRight:0}}},iO={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},aO=uy("div",{shouldForwardProp:e=>!["flexBasisProp","isGridMode","isGridCol","dense","frequencyWidth","direction"].includes(e)})((e=>{var t,n,r,o,a,l,s,c,u,d;let{theme:p,flexBasisProp:f,isGridMode:h,isGridCol:m,dense:g,frequencyWidth:v,direction:b}=e;return{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(p.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"},"& .value":{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(p.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(GL.row)]:{flexWrap:"nowrap",color:null!==(t=null===(n=p.listBox)||void 0===n||null===(r=n.content)||void 0===r?void 0:r.color)&&void 0!==t?t:p.palette.text.primary},["& .".concat(GL.rowBorderBottom)]:{borderBottom:m?"none":"1px solid ".concat(p.palette.divider),borderLeft:m?"1px solid ".concat(p.palette.divider):"none"},["& .".concat(GL.column)]:{flexWrap:"nowrap",borderRight:"1px solid ".concat(p.palette.divider),color:null!==(o=null===(a=p.listBox)||void 0===a||null===(l=a.content)||void 0===l?void 0:l.color)&&void 0!==o?o:p.palette.text.primary},["& .".concat(GL.cell)]:{display:"flex",alignItems:"center",minWidth:0,flexGrow:1,paddingLeft:"".concat(9,"px"),paddingRight:0},["& .".concat(GL.labelText)]:i(i({flexBasis:f,lineHeight:"16px",userSelect:"none",paddingRight:"1px"},iO),{},{fontSize:null===(s=p.listBox)||void 0===s||null===(c=s.content)||void 0===c?void 0:c.fontSize,fontFamily:null===(u=p.listBox)||void 0===u||null===(d=u.content)||void 0===d?void 0:d.fontFamily}),["& .".concat(GL.labelDense)]:{fontSize:12},["& .".concat(GL.highlighted)]:{backgroundColor:"#FFC72A"},["& .".concat(GL.checkboxLabel)]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":i(i({},iO),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},["& .".concat(GL.icon)]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24},["& .".concat(GL.S)]:i(i({},oO({theme:p})),{},{border:h?"none":void 0}),["& .".concat(GL.XS)]:i(i({},oO({theme:p})),{},{background:p.palette.selected.excluded,color:p.palette.selected.excludedContrastText,border:h?"none":void 0}),["& .".concat(GL.A)]:{background:p.palette.selected.alternative,color:p.palette.selected.alternativeContrastText,border:h?"none":void 0},["& .".concat(GL.X)]:{background:p.palette.selected.excluded,color:p.palette.selected.excludedContrastText,border:h?"none":void 0},["& .".concat(GL.frequencyCount)]:i(i({justifyContent:"flex-end"},iO),{},{flex:"0 1 ".concat(v,"px"),textAlign:"rtl"===b?"left":"right",paddingLeft:"2px"}),["&.".concat(GL.barContainer)]:{height:"100%",display:"flex",alignItems:"center"},["& .".concat(GL.bar)]:{height:g?"16px":"20px",position:"absolute",zIndex:"-1",alignSelf:"center",left:4,width:"calc(100% - ".concat(8,"px)"),display:"flex",alignItems:"center","& .bar-filled":{border:"".concat(1,"px solid"),borderColor:"#D9D9D9",transition:"width 0.2s",backgroundColor:"#FAFAFA",height:"100%"}},["& .".concat(GL.barSelected)]:{zIndex:"0","& .bar-filled":{opacity:"30%",background:p.palette.background.lighter}},["& .".concat(GL.barWithCheckbox)]:{left:"rtl"===b?4:29,width:"calc(100% - ".concat(33,"px)")},["& .".concat(GL.barSelectedWithCheckbox)]:{"& .bar-filled":{background:"#BFE5D0",borderColor:"#BFE5D0"}},["& .".concat(GL.excludedTextWithCheckbox)]:{color:"#828282",fontStyle:"italic"}}}));var lO=H.memo(aO);const sO="ListBoxCheckbox",cO={cbIcon:"".concat(sO,"-cbIcon"),cbIconChecked:"".concat(sO,"-cbIconChecked"),cbIconExcluded:"".concat(sO,"-cbIconExcluded"),cbIconAlternative:"".concat(sO,"-cbIconAlternative"),checkbox:"".concat(sO,"-checkbox"),dense:"".concat(sO,"-dense")},uO=uy(SC)((e=>{let{theme:t}=e;return{["& .".concat(cO.cbIcon)]:{borderRadius:3,width:16,height:16,boxShadow:"inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)",backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))",display:"flex",alignItems:"center",justifyContent:"center"},["& .".concat(cO.cbIconChecked)]:{borderRadius:3,backgroundColor:t.palette.selected.main,backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}},["& .".concat(cO.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.excluded},["& .".concat(cO.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.alternative},["&.".concat(cO.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(cO.dense)]:{padding:"4px 8px"}}})),dO=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return H.createElement("span",{className:e.cbIcon},n&&H.createElement("span",{className:t&&n?e.cbIconExcluded:""}))};function pO(e){let{onChange:t,checked:n,label:r,dense:o,excluded:i,showGray:a=!0,dataN:l}=e;return H.createElement(uO,{edge:"start",onChange:t,checked:n,disableRipple:!0,className:[cO.checkbox,o&&cO.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":r,"data-n":l},name:r,icon:dO(cO,a,i),checkedIcon:H.createElement("span",{className:cO.cbIconChecked})})}const fO="ListBoxRadioButton",hO={denseRadioButton:"".concat(fO,"-denseRadioButton"),radioButton:"".concat(fO,"-radioButton")},mO=uy(JR)((e=>{let{theme:t,checked:n}=e;return{["&.".concat(hO.radioButton)]:{right:"5px",color:n?t.palette.selected.main:t.palette.main}}}));function gO(e){let{onChange:t,checked:n,label:r,dense:o,dataN:i}=e;return H.createElement(mO,{checked:n,onChange:t,value:r,name:r,className:hO.radioButton,inputProps:{"data-n":i},style:{backgroundColor:"transparent"},disableRipple:!0,size:o?"small":"medium",sx:o&&{padding:"0px 0px 0px 12px"}})}function vO(e){let{label:t,color:n,dense:r,showGray:o=!0,checkboxes:i,cell:a,valueTextAlign:l}=e;return H.createElement(vE,{component:"span",variant:"body2",className:nO([GL.labelText,r&&GL.labelDense,o&&tO({cell:a,checkboxes:i})&&GL.excludedTextWithCheckbox]),color:n,align:l,dir:"auto"},H.createElement("span",null,t))}function bO(e){let{label:t,color:n,dense:r,showGray:o,checkboxes:i,cell:a,valueTextAlign:l}=e;return"string"==typeof t?H.createElement(vO,{label:t,color:n,dense:r,showGray:o,checkboxes:i,cell:a,valueTextAlign:l}):t}function yO(e){let{onChange:t,label:n,color:r,qElemNumber:o,isSelected:i,dense:a,cell:l,isGridCol:s,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:p}=e;const f=H.createElement(pO,{onChange:t,label:n,checked:i,dense:a,excluded:YL(l),isGridCol:s,showGray:c,dataN:o}),h=H.createElement(gO,{onChange:t,label:n,checked:i,dense:a,dataN:o});return H.createElement(tk,{color:r,control:u?h:f,className:GL.checkboxLabel,label:H.createElement(bO,{label:n,color:r,dense:a,showGray:c,checkboxes:d,cell:l,valueTextAlign:p}),key:o})}function xO(e){let{labels:t,dense:n,showGray:r,checkboxes:o}=e;const i=t.map(((e,t)=>{let[n,r]=e;return H.createElement("span",{id:t,className:r?GL.highlighted:""},n)}));return H.createElement(vO,{label:i,dense:n,showGray:r,checkboxes:o})}function SO(e){let{onChange:t,labels:n,checkboxes:r,dense:o,showGray:i,color:a,qElemNumber:l,isSelected:s,cell:c,isGridCol:u,isSingleSelect:d,valueTextAlign:p}=e;const f=H.createElement(xO,{labels:n,dense:o,showGray:i,checkboxes:r});return r?H.createElement(yO,{onChange:t,label:f,color:a,qElemNumber:l,isSelected:s,dense:o,cell:c,isGridCol:u,showGray:i,isSingleSelect:d,checkboxes:r,valueTextAlign:p}):f}var wO=H.memo((function(e){let{onChange:t,label:n,color:r,qElemNumber:o,isSelected:i,dense:a,cell:l,isGridCol:s,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:p}=e;return d?H.createElement(yO,{onChange:t,label:n,color:r,qElemNumber:o,isSelected:i,dense:a,cell:l,isGridCol:s,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:p}):H.createElement(vO,{label:n,color:r,dense:a,showGray:!0,checkboxes:d,cell:l,valueTextAlign:p})}));function EO(e){let{qFrequency:t,histogram:n,checkboxes:r,isSelected:o,frequencyMax:i}=e;if(!(t&&n&&"-"!==rO(t)))return;const a=(e=>{let{qFrequency:t,frequencyMax:n}=e;const r=String(t),o="%"===r.substring(r.length-1),i=parseFloat(o?r:t);return"".concat(o?i:i/n*100,"%")})({qFrequency:t,checkboxes:r,frequencyMax:i});return H.createElement(rC,{className:nO([GL.bar,r&&GL.barWithCheckbox,o&&(r?GL.barSelectedWithCheckbox:GL.barSelected)])},H.createElement(rC,{className:"bar-filled",width:a}))}function CO(e){let{cell:t,checkboxes:n,dense:r,showGray:o}=e;const i=rO(null==t?void 0:t.qFrequency);return H.createElement(pk,{item:!0,style:{display:"flex",alignItems:"center"},className:GL.frequencyCount,"aria-label":i},H.createElement(vE,{noWrap:!0,color:"inherit",variant:"body2",className:nO([r&&GL.labelDense,GL.labelText,o&&tO({cell:t,checkboxes:n})&&GL.excludedTextWithCheckbox])},i))}function kO(e){let{dataLayout:t,layoutOrder:n,itemPadding:r}=e;if("singleColumn"===t)return{height:"100%",width:"100%"};switch(n){case"row":case"column":return{height:"calc(100% - ".concat(r,"px)"),width:"calc(100% - ".concat(2*r,"px)"),position:"absolute",left:4};default:return{}}}const RO=uy(pk,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction"].includes(e)})((e=>{let{dataLayout:t,layoutOrder:n,itemPadding:r,cellPaddingRight:o,direction:a}=e;const l="padding".concat("rtl"===a?"Left":"Right");return{["&.".concat(GL.fieldRoot)]:i(i({},kO({dataLayout:t,layoutOrder:n,itemPadding:r})),{},{[l]:o?"8px":void 0})}}));const LO={S:"Object.Listbox.Selected",A:"Object.Listbox.Alternative",O:"Object.Listbox.Optional",XS:"Object.Listbox.SelectedExcluded",L:"Object.Listbox.Locked",X:"Object.Listbox.Excluded",XL:"Object.Listbox.ExcludedLock"};function OO(e){var t;let{layout:n}=e;const{translator:r}=U.useContext(Iw),{qStateCounts:o={}}=(null==n||null===(t=n.qListObject)||void 0===t?void 0:t.qDimensionInfo)||{},i=o.qSelected+o.qSelectedExcluded+o.qLocked+o.qLockedExcluded;let a;switch(i){case 0:a="ScreenReader.ZeroSelected";break;case 1:a="ScreenReader.OneSelected";break;default:a="ScreenReader.ManySelected"}const l=r.get(a,[i]);return H.createElement("div",{className:"screenReaderOnly","aria-live":"assertive"},l)}const IO=Object.freeze({ENTER:13,ESCAPE:27,SPACE:32,TAB:9,BACKSPACE:8,DELETE:46,ALT:18,CTRL:17,SHIFT:16,ARROW_UP:38,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,PAGE_DOWN:34,PAGE_UP:33,HOME:36,END:35,F10:121,A:65,F:70,ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,SUBTRACTION:189,DECIMAL:190,NUMPAD_DECIMAL:110,isArrow:e=>e===IO.ARROW_UP||e===IO.ARROW_DOWN||e===IO.ARROW_LEFT||e===IO.ARROW_RIGHT}),TO=e=>+e.getAttribute("data-n"),PO=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},_O=e=>{const t=null==e?void 0:e.querySelector(".value.last-focused, .value.selector, .value");return null==t||t.setAttribute("tabIndex",0),null==t||t.focus(),t},NO=e=>{let{rowIndex:t,columnIndex:n,rowCount:r,columnCount:o,layoutOrder:i,keyCode:a,numCells:l}=e;const s=e=>{let t;return"row"===i?(t=l%o,e<t?r:r-1):(t=l%r,e<o-1?r:t)};let c=t,u=n;if(a===IO.ARROW_DOWN)if(t>=s(n)-1){if(n===o-1)return-1;c=0,u=n+1}else c=t+1;else if(0===t){if(0===n)return-1;c=s(n-1)-1,u=n-1}else c=t-1;if("row"===i)return c*o+u;const d=l%r;return 0===d||c<d?c*o+u:(c-d)*(o-1)+u+d*o};function MO(e){var t,n,r;let{index:o,rowIndex:a,columnIndex:l,style:s,data:c}=e;const{onChange:u,onClick:d,onMouseDown:p,onMouseUp:f,onMouseEnter:h,onTouchStart:m,onTouchEnd:g,pages:v,isLocked:b,column:y=!1,checkboxes:x=!1,textAlign:S,direction:w,layoutOptions:E={},freqIsAllowed:C,isSingleSelect:k,actions:R,frequencyMax:L="",histogram:O=!1,keyboard:I,showGray:T=!0,showTick:P=!0,columnCount:_=1,rowCount:N=1,dataOffset:M,focusListItems:q,listCount:z,itemPadding:A,frequencyWidth:D,translator:j,showSearch:F,isModal:B}=c,{dense:$=!1,dataLayout:W="singleColumn",layoutOrder:V}=E;let G,K;const Z={max:null,currentIndex:null};if("number"==typeof a&&"number"==typeof l){"row"===V?(G=a*_+l,Z.max=N,Z.currentIndex=a):(G=l*N+a,Z.max=_,Z.currentIndex=l);const e=0;K=i(i({},s),{},{left:e+(0===l?s.left:Number(s.left)+l*e),top:0===a?s.top:Number(s.top)+a*e})}else G=o,Z.max=z,Z.currentIndex=o,K=i({},s);G+=M;const[X,Q]=U.useState(null);U.useEffect((()=>{null!==X&&(0===Z.currentIndex&&q.first&&(X.focus(),q.setFirst(!1)),Z.currentIndex===Z.max-1&&q.last&&(X.focus(),q.setLast(!1)))}),[X,q.first,q.last]);const J=U.useCallback(function(e){let{select:t,selectAll:n,onCtrlF:r,confirm:o,cancel:i,setScrollPosition:a,focusListItems:l,keyboard:s,isModal:c,rowCount:u,columnCount:d,rowIndex:p,columnIndex:f,layoutOrder:h}=e;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e===IO.ARROW_LEFT||e===IO.ARROW_RIGHT||"number"!=typeof p||"number"!=typeof f){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=NO({rowIndex:p,columnIndex:f,rowCount:u,columnCount:d,layoutOrder:h,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let g=!1;const v=e=>{g=e};return e=>{let u;const{currentTarget:d,nativeEvent:p}=e,{keyCode:f,shiftKey:h=!1,ctrlKey:b=!1,metaKey:y=!1}=p;switch(f){case IO.TAB:{const e=d.closest(".listbox-container"),t=c();if(d.classList.add("last-focused"),h){PO(e)||(t?s.focusSelection():s.blur(!0));break}t?s.focusSelection():(d.blur(),s.blur());break}case IO.SHIFT:v(!0);break;case IO.SPACE:t([TO(d)],!1,e);break;case IO.ARROW_DOWN:case IO.ARROW_RIGHT:u=m(f,d,!0),h&&u&&(g&&(t([TO(d)],!0),v(!1)),t([TO(u)],!0));break;case IO.ARROW_UP:case IO.ARROW_LEFT:u=m(f,d,!1),h&&u&&(g&&(t([TO(d)],!0),v(!1)),t([TO(u)],!0));break;case IO.ENTER:o();break;case IO.ESCAPE:if(!c())return;i();break;case IO.HOME:if(l.setFirst(!0),b){null==a||a("overflowStart");break}null==a||a("start");break;case IO.END:if(l.setLast(!0),b){null==a||a("overflowEnd");break}null==a||a("end");break;case IO.A:if(b||y){n();break}return;case IO.F:if(b||y){r();break}return;default:return}u&&u.focus(),e.preventDefault(),e.stopPropagation()}}(i(i({},R),{},{focusListItems:q,keyboard:I,isModal:B,rowCount:N,columnCount:_,rowIndex:a,columnIndex:l,layoutOrder:V})),[R,null==I?void 0:I.innerTabStops,N,_,a,l,V]),Y=U.useMemo((()=>function(e){let t,{pages:n,cellIndex:r}=e;const o=n.filter((e=>e.qArea.qTop<=r&&r<e.qArea.qTop+e.qArea.qHeight))[0];if(o){const e=o.qArea;r>=e.qTop&&r<e.qTop+e.qHeight&&([t]=o.qMatrix[r-e.qTop])}return t}({pages:v,cellIndex:G})),[v,G]),ee="S"===(null==Y?void 0:Y.qState)||"XS"===(null==Y?void 0:Y.qState)||"L"===(null==Y?void 0:Y.qState)||"XL"===(null==Y?void 0:Y.qState),te=U.useMemo((()=>(e=>{let{column:t,histogram:n,checkboxes:r,cell:o,showGray:i}=e;const a=[t?GL.column:GL.row];return n||a.push(GL.rowBorderBottom),o?(r||("XS"===o.qState?a.push(i?GL.XS:GL.S):"S"===o.qState||"L"===o.qState?a.push(GL.S):i&&eO(o)?a.push(GL.A):i&&YL(o)&&a.push(GL.X)),a):[]})({column:y,histogram:O,checkboxes:x,cell:Y,showGray:T})),[null==Y?void 0:Y.qState,O,$,x]),ne=U.useCallback((e=>{e.preventDefault()}),[x]);if(!Y)return null;const re=!["NaN",void 0].includes(null==Y?void 0:Y.qNum);let oe;oe=!S||S.auto?re?"rtl"===w?"left":"right":{rtl:"right",ltr:"left"}[w]:(null==S?void 0:S.align)||"left";const ie="grid"===W&&"column"===V,ae=null!==(t=null==Y?void 0:Y.qText)&&void 0!==t?t:"";let le;if(null!==(n=Y.qHighlightRanges)&&void 0!==n&&null!==(r=n.qRanges)&&void 0!==r&&r.length){const e=Y.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[];le=function(e,t){if(!t.length)return[];const n=t.reduce(((n,r,o)=>{const i=0===o?0:t[o-1].qCharPos+t[o-1].qCharCount;n.push(...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{qCharPos:r,qCharCount:o}=t,i=[];return r>n&&i.push([e.slice(n,r),!1]),i.push([e.slice(r,r+o),!0]),i}(e,r,i));const a=o===t.length-1,l=t[o].qCharPos+t[o].qCharCount;return a&&l<e.length&&n.push([e.slice(l),!1]),n}),[]);return n}(ae,e)}const se={alignItems:"center",display:"flex",fontSize:"8px"},ce={display:"flex",alignItems:"center",minWidth:0,flexGrow:1,paddingLeft:"rtl"===w?8:x?0:void 0,paddingRight:x?0:"rtl"===w?8:0,justifyContent:oe},ue=0===o,de=x?"auto":"max-content",pe=ee&&b,fe=!x&&ee&&!b,he=!x&&P,me=x||!P,ge=function(e){let{translator:t,label:n,qState:r,isSelected:o,currentIndex:i,maxIndex:a,showSearch:l}=e;const s=LO[r],c=t.get(s),u=[];if(o){const e=l?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=t.get(e);u.push(n)}const d="".concat(n," ").concat(c),p=t.get("CurrentSelections.Of",[i+1,a+1]);return u.unshift(d,p),u.join(". ").trim()}({translator:j,label:ae,qState:Y.qState,currentIndex:Z.currentIndex,maxIndex:Z.max,showSearch:F});return H.createElement(lO,{className:GL.barContainer,flexBasisProp:de,style:K,isGridCol:ie,isGridMode:"grid"===W,dense:$,frequencyWidth:D,direction:w,"data-testid":"listbox.item"},H.createElement(RO,{role:"row","aria-label":ge,"aria-selected":ee,"aria-setsize":Z.max,"aria-rowindex":Z.currentIndex,ref:Q,container:!0,dataLayout:W,cellPaddingRight:me,layoutOrder:V,itemPadding:A,gap:0,className:nO(["value",...te]),classes:{root:GL.fieldRoot},onClick:d,onMouseDown:p,onMouseUp:f,onMouseEnter:h,onKeyDown:J,onTouchStart:m,onTouchEnd:g,onContextMenu:ne,tabIndex:ue&&I.innerTabStops?0:-1,"data-n":null==Y?void 0:Y.qElemNumber,direction:w},(null==Y?void 0:Y.qFrequency)&&H.createElement(EO,{qFrequency:null==Y?void 0:Y.qFrequency,histogram:O,checkboxes:x,isSelected:ee,frequencyMax:L}),H.createElement(pk,{item:!0,style:ce,className:nO([GL.cell,GL.selectedCell]),title:"".concat(ae)},le?H.createElement(SO,{onChange:u,labels:le,checkboxes:x,dense:$,showGray:T,color:"inherit",qElemNumber:Y.qElemNumber,isSelected:ee,cell:Y,isGridCol:ie,isSingleSelect:k,valueTextAlign:oe}):H.createElement(wO,{onChange:u,label:ae,color:"inherit",qElemNumber:Y.qElemNumber,isSelected:ee,dense:$,cell:Y,isGridCol:ie,showGray:T,isSingleSelect:k,checkboxes:x,valueTextAlign:oe})),C&&H.createElement(CO,{cell:Y,checkboxes:x,dense:$,showGray:T}),he&&H.createElement(pk,{item:!0,className:GL.icon},pe&&H.createElement(zL,{style:se,size:"small"}),fe&&H.createElement(JL,{style:se,size:"small"}))))}var qO=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function zO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||qO(r)&&qO(o)))return!1;var r,o;return!0}function AO(e,t){var n;void 0===t&&(t=zO);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var DO="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function jO(e){cancelAnimationFrame(e.id)}function FO(e,t){var n=DO();var r={id:requestAnimationFrame((function o(){DO()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var BO=-1;function $O(e){if(void 0===e&&(e=!1),-1===BO||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),BO=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return BO}var WO=null;function UO(e){if(void 0===e&&(e=!1),null===WO||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?WO="positive-descending":(t.scrollLeft=1,WO=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),WO}return WO}var HO=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function VO(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,s=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,MS(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:MS(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=AO((function(e,t,n,o,i,a,l,s){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})})),r._callOnScroll=void 0,r._callOnScroll=AO((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,l=a.columnWidth,s=a.direction,c=a.rowHeight,p=r._getItemStyleCache(m&&l,m&&s,m&&c),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===s;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=AO((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,l=t.scrollHeight,s=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(UO()){case"negative":c=-i;break;case"positive-descending":c=s-o-i}c=Math.max(0,Math.min(c,s-o));var u=Math.max(0,Math.min(a,l-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&jO(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=FO(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}ES(t,e),t.getDerivedStateFromProps=function(e,t){return GO(e,t),g(e),null};var v=t.prototype;return v.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},v.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,u=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=$O();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=a(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?v:0,x=b>d?v:0;this.scrollTo({scrollLeft:void 0!==r?s(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,y):g})},v.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},v.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(UO()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},v.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&jO(this._resetIsScrollingTimeoutId)},v.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,s=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?HO:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,v=e.style,b=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),w=S[0],E=S[1],C=this._getVerticalRangeToRender(),k=C[0],R=C[1],L=[];if(r>0&&g)for(var O=k;O<=R;O++)for(var I=w;I<=E;I++)L.push(U.createElement(t,{columnIndex:I,data:d,isScrolling:b?x:void 0,key:f({columnIndex:I,data:d,rowIndex:O}),rowIndex:O,style:this._getItemStyle(O,I)}));var T=a(this.props,this._instanceProps),P=l(this.props,this._instanceProps);return U.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:xS({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},U.createElement(c||u||"div",{children:L,ref:s,style:{height:T,pointerEvents:x?"none":void 0,width:P}}))},v._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],l=i[1],s=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,l,d,p,s,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,b=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,b,g,x,y)}},v._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,l=e.rowCount,s=this.state,c=s.horizontalScrollDirection,u=s.isScrolling,d=s.scrollLeft,p=n||i||a||1;if(0===t||0===l)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},v._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,l=a.isScrolling,s=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,c,this._instanceProps),h=f(this.props,d,c,this._instanceProps),m=l&&"backward"!==s?1:Math.max(1,u),g=l&&"forward"!==s?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(U.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var GO=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},KO=function(e,t){return e};function ZO(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=s(r.props,MS(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:MS(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=AO((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=AO((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,l=i.itemSize,s=i.layout,u=r._getItemStyleCache(c&&l,c&&s,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===s,h="rtl"===a,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=AO((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(UO()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&jO(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=FO(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}ES(t,e),t.getDerivedStateFromProps=function(e,t){return XO(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===o?s.scrollWidth>s.clientWidth?$O():0:s.scrollHeight>s.clientHeight?$O():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,l))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(UO()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&jO(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,l=e.innerElementType,s=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?KO:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,v=e.useIsScrolling,b=e.width,y=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,S=x?this._onScrollHorizontal:this._onScrollVertical,w=this._getRangeToRender(),E=w[0],C=w[1],k=[];if(c>0)for(var R=E;R<=C;R++)k.push(U.createElement(t,{data:u,key:p(R,u),index:R,isScrolling:v?y:void 0,style:this._getItemStyle(R)}));var L=r(this.props,this._instanceProps);return U.createElement(h||m||"div",{className:n,onScroll:S,ref:this._outerRefSetter,style:xS({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},U.createElement(l||s||"div",{children:k,ref:a,style:{height:x?"100%":L,pointerEvents:y?"none":void 0,width:x?L:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,s=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,s,this._instanceProps),u=l(this.props,c,s,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(U.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var XO=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},QO=VO({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){var a=e.columnCount,l=e.columnWidth,s=e.width,c=Math.max(0,a*l-s),u=Math.min(c,t*l),d=Math.max(0,t*l-s+i+l);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(s/2)?0:p>c+Math.floor(s/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){var a=e.rowHeight,l=e.height,s=e.rowCount,c=Math.max(0,s*a-l),u=Math.min(c,t*a),d=Math.max(0,t*a-l+i+a);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(l/2)?0:p>c+Math.floor(l/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getColumnStartIndexForOffset:function(e,t){var n=e.columnWidth,r=e.columnCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getColumnStopIndexForStartIndex:function(e,t,n){var r=e.columnWidth,o=e.columnCount,i=e.width,a=t*r,l=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+l-1))},getRowStartIndexForOffset:function(e,t){var n=e.rowHeight,r=e.rowCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getRowStopIndexForStartIndex:function(e,t,n){var r=e.rowHeight,o=e.rowCount,i=e.height,a=t*r,l=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+l-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),JO=ZO({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,l=e.height,s=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,p="horizontal"===a||"horizontal"===u?d:l,f=Math.max(0,s*c-p),h=Math.min(f,t*c),m=Math.max(0,t*c-p+c+i);switch("smart"===n&&(n=r>=m-p&&r<=h+p?"auto":"center"),n){case"start":return h;case"end":return m;case"center":var g=Math.round(m+(h-m)/2);return g<Math.ceil(p/2)?0:g>f+Math.floor(p/2)?f:g;default:return r>=m&&r<=h?r:r<m?m:h}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,l=e.layout,s=e.width,c=t*a,u="horizontal"===r||"horizontal"===l?s:o,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});const YO="#BBB",eI="#f1f1f1",tI={styledScrollbars:"".concat("ListBox","-styledScrollbars")};function nI(e){let{renderProps:t,layoutOptions:n,maxCount:r,columnCount:o,rowCount:i,overflowDisclaimer:a,qCardinal:l,dataOffset:s}=e;const c="column"===(null==n?void 0:n.layoutOrder)&&"singleColumn"!==n.dataLayout,u=((e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex)(t,c),d=c?r.column:r.row,p=(c?o:i)>=d,f=((e,t,n,r)=>e===t*n+r+n)(l,u,c?i:o,s),h=!!s&&((e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex)(t,c),m=p&&!f&&u>=d-1||h||a.state.show;a.set(m)}const{StyledFixedSizeList:rI,StyledFixedSizeGrid:oI}=function(){const e=e=>({scrollbarColor:"".concat(YO," ").concat(eI),overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:eI},"&::-webkit-scrollbar-thumb":{backgroundColor:YO,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:_m(JO,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(tI.styledScrollbars)]:e(n)}})),StyledFixedSizeGrid:_m(QO,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(tI.styledScrollbars)]:e(n)}}))}}();function iI(e){let{layout:t,width:n,height:r,listCount:o,count:i,textWidth:a,freqIsAllowed:l,checkboxes:s}=e;const{layoutOptions:c={}}=t||{},{layoutOrder:u,maxVisibleRows:d={},maxVisibleColumns:p,dense:f,dataLayout:h}=c,m=l?40:0,g=s?20:0;let v=56+m+g;!s&&v>=80&&(v+=20);let b,y,x,S,w=a+18+m+g;!s&&w>=80&&(w+=20),w=Math.min(150,Math.max(w,v));const E="grid"===h;let C=f?20:E?32:29;E&&(C+=4);const k=null!=r?r:8*C;if(u){let e=n;"row"===u?(b={overflowX:"hidden"},e+=8,({rowCount:S,columnWidth:x,columnCount:y}=function(e){let{maxVisibleColumns:t,listCount:n,containerWidth:r,columnAutoWidth:o,itemMinWidth:i}=e;const a=(null==t?void 0:t.maxColumns)||3,l=r-10;let s;const c=Math.min(n,Math.max(1,Math.round(l/Math.max(i,o))));s=!1!==(null==t?void 0:t.auto)?c:Math.min(n,a,c);const u=l/s;return{rowCount:Math.ceil(n/s),columnWidth:u,columnCount:s}}({maxVisibleColumns:p,listCount:o,containerWidth:e,columnAutoWidth:w,itemMinWidth:v}))):(b={overflowY:"hidden"},({rowCount:S,columnWidth:x,columnCount:y}=function(e){let t,{maxVisibleRows:n,itemHeight:r,listCount:o,listHeight:i,columnAutoWidth:a,containerWidth:l,itemMinWidth:s}=e;const c=(null==n?void 0:n.maxRows)||3,u=Math.floor(i/r);t=!1!==n.auto?u:Math.min(o,c,u);const d=Math.ceil(o/t);return{columnWidth:Math.max(a,l/d,s),columnCount:d,rowCount:t}}({maxVisibleRows:d,itemHeight:C,listCount:o,listHeight:k,columnAutoWidth:w,containerWidth:e,itemMinWidth:v})))}y=("singleColumn"===h?1:y)||1,S=("singleColumn"===h?i:S)||o;const R=c.dense?838e3:577e3;S=Math.min(S,R);const L=Math.floor(3355e4/x);y=Math.min(y,L)||1;const O=S*y;return{columnCount:y,columnWidth:x,rowCount:S,overflowStyling:b,itemHeight:C,listHeight:k,scrollBarWidth:10,count:i,listCount:Math.min(o,O),maxCount:{row:R,column:L},itemPadding:4,frequencyWidth:40}}const aI=(e,t)=>{const n=(()=>{const e=document.createDocumentFragment(),t=document.createElement("canvas");return e.appendChild(t),t.getContext("2d")})();if(n.font=t,Array.isArray(e))return Math.max(...e.map((e=>n.measureText(e).width)));return n.measureText(e).width};function lI(e){if(!e)return"";const t=e.qListObject.qDimensionInfo.qApprMaxGlyphCount;let n="";for(let e=0;e<t;e++)n+="M";return n}function sI(e){let{pages:t,minimumBatchSize:n,count:r,calculatePagesHeight:o=!1}=e;const i=null!=t&&t.length&&o?(e=>{let{pages:t=[],minimumBatchSize:n,count:r}=e;const o=t.some((e=>e.qArea.qHeight<n)),i=Math.max(...t.map((e=>e.qArea.qTop+e.qArea.qHeight)));return o?i:r})({pages:t,minimumBatchSize:n,count:r}):r;return i||0}const[cI,uI]=Tw({});function dI(e){const t="".concat(e.id),[n]=cI();return{setStoreValue:(e,r)=>n.set("".concat(t,"/").concat(e),r),getStoreValue:e=>n.get("".concat(t,"/").concat(e))}}const pI=uy(vE,{shouldForwardProp:e=>!["width","dense"].includes(e)})((e=>{let{width:t,dense:n}=e;return i({minWidth:"".concat(t,"px"),textAlign:"center",fontSize:"".concat(n?"12px":"14px")},n&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:t})}));function fI(e){let{width:t,text:n,dense:r,tooltip:o}=e;const{translator:i}=U.useContext(Iw);return H.createElement(uL,{title:o?i.get(n):""},H.createElement(pI,{width:t,dense:r,component:"div",variant:"body1",py:"12px"},i.get(n)))}var hI={},mI={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(mI);var gI,vI=mI.exports,bI={},yI=r(Qw);var xI=vI;Object.defineProperty(hI,"__esModule",{value:!0});var SI=hI.default=void 0,wI=xI((gI||(gI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=yI}(bI)),bI)),EI=Vg,CI=(0,wI.default)((0,EI.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");SI=hI.default=CI;const kI=uy(oE)((e=>{let{theme:t,left:n}=e;return{position:"absolute",bottom:"12px",display:"flex",border:"1px solid ".concat(t.palette.divider),width:"calc(100% - 11px)",left:n}})),RI=uy("div")((()=>({paddingLeft:"6px",flexGrow:1}))),LI=uy("div")((e=>{let{dense:t}=e;return{display:"flex",alignItems:"".concat(t?"center":"flex-start")}})),OI=uy(SI)((()=>({fontSize:"14px"})));function II(e){let{text:t,dismiss:n,dense:r,parentWidth:o=0}=e;const i="function"==typeof n,a=r?370:282,l=Math.max(o/2-a/2,0),s=Math.min(a,o)-42,c=r&&o<a;return H.createElement(kI,{left:l,style:{maxWidth:a}},H.createElement(RI,null,H.createElement(fI,{text:t,dense:r,width:s,tooltip:c})),H.createElement(LI,{dense:r},i&&H.createElement(uE,{"aria-label":"close",onClick:()=>n()},H.createElement(OI,null))))}function TI(e){let{itemWidth:t,layout:n,frequencyMode:r}=e;const o=t>80,{frequencyEnabled:i=!1}=(null==n?void 0:n.qListObject)||{},a=!["none",void 0].includes(r);return!(!o||!a&&!i)}const PI=e=>{const t=(e=>e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:"[".concat(e.replace(/\]/g,"]]"),"]"):e)(e);return"Max(AGGR(Count(".concat(t,"), ").concat(t,"))")},_I=(e,t)=>{const n=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[r,o]=U.useState(),[i,a]=U.useState(n);return U.useEffect((()=>{if(!n)return;(async()=>{const n=await(async(e,t)=>{const n=e.qListObject.qDimensionInfo,r=n.qGroupFieldDefs[n.qGroupPos],o=PI(r);return(await t.evaluateEx(o)).qNumber})(t,e);o(n),a(!1)})()}),[n&&t]),{frequencyMax:n?r:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:i}},NI=["isLoadingData"],MI=uy("div")((()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}})));function qI(e){var t,n,r,o;let{model:a,app:c,constraints:u,layout:d,selections:p,selectionState:f,direction:h,checkboxes:m,height:g,width:v,frequencyMode:b,update:y,fetchStart:x,postProcessPages:S,calculatePagesHeight:w=!1,keyboard:E={},showGray:C=!0,scrollState:k,selectDisabled:R=(()=>!1),keyScroll:L={state:{},reset:()=>{}},currentScrollIndex:O={set:()=>{}},renderedCallback:I,onCtrlF:T,showSearch:P,isModal:_}=e;const{translator:N}=U.useContext(Iw),[M,q]=U.useState(!1),z=!(!d||!d.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:A=m,histogram:D}=null!=d?d:{},j=U.useRef(null),F=U.useRef({queue:[],validPages:!1,dataOffset:0}),B=U.useRef({pages:[]}),{frequencyMax:$,awaitingFrequencyMax:W}=_I(c,d),V=function(e){let{local:t,loaderRef:n,model:r,fetchStart:o,scrollTimeout:i,postProcessPages:a,listData:l}=e;const[s,c]=U.useState(!1),[u,d]=U.useState([]);let[p]=U.useState(0);const f=(e,s)=>{const u=t.current.dataOffset;t.current.queue.push({start:e+u,stop:s+u});const f=!!n.current&&n.current._listRef&&n.current._listRef.state.isScrolling;return t.current.queue.length>10&&t.current.queue.shift(),clearTimeout(t.current.timeout),c(!0),new Promise((e=>{t.current.timeout=setTimeout((()=>{const n=t.current.queue.slice(-1)[0],i=r.getListObjectData("/qListObjectDef",[{qTop:n.start>p?n.start-p:0,qHeight:p,qLeft:0,qWidth:1},{qTop:n.start,qHeight:p,qLeft:0,qWidth:1}]).then((n=>{const r=a?a(n):n;t.current.validPages=!0,l.current.pages=r,d(r),c(!1),e()}));o&&o(i)}),f?i:0)}))};return{loadMoreItems:{with(e){let{minimumBatchSize:t}=e;return t&&(p=t),f}},pages:u,isLoading:s}}({local:F,loaderRef:j,model:a,fetchStart:x,scrollTimeout:0,postProcessPages:S,listData:B}),G=s(V,NI),{setStoreValue:K}=dI(a),Z=U.useCallback(G.loadMoreItems,[d]),[X,Q]=U.useState({show:!1,dismissed:!1}),[J,Y]=U.useState([]);null!=G&&G.pages&&f.update({setPages:Y,pages:G.pages,isSingleSelect:z,selectDisabled:R,layout:d});const ee=null==d?void 0:d.qListObject.qDimensionInfo.qCardinal;(null!=G&&G.pages.length&&!W||0===ee)&&(null==I||I());const te=U.useCallback((e=>{if(null==J||!J.length||!F.current.validPages)return!1;F.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=J.filter((e=>t(e)))[0];return n&&t(n)}),[d,J]),{interactionEvents:ne,select:re}=XL({selectionState:f,selections:p,checkboxes:A,doc:document,loaderRef:j}),{layoutOptions:oe={}}=d||{};let ie=!0;oe.dataLayout&&(ie="singleColumn"===oe.dataLayout||"row"===(null==oe?void 0:oe.layoutOrder));const ae="grid"===(null==oe?void 0:oe.dataLayout),le=e=>{const t=i({},ie?{rowIndex:e}:{columnIndex:e}),n=ae?t:e;j.current._listRef.scrollToItem(n)},se=()=>{if(F.current.queue=[],F.current.validPages=!1,j.current){j.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===L.state.scrollPosition;if(d&&d.qSelectionInfo.qInSelections||e)return void(e&&L.reset());F.current.dataOffset=0,le(0)}};y&&y.call(null,se),U.useEffect((()=>{k&&!M&&j.current&&(j.current._listRef.scrollToItem(k.initScrollPos),q(!0))}),[j.current]),U.useEffect((()=>{se()}),[d,F.current.dataOffset]);const ce=(e=>{const t=U.useMemo((()=>"text"in e?e:{}),[e]);return U.useMemo((()=>aI(t.text,t.font||"14px Source Sans Pro")),[t.text,t.font])})({text:lI(d),font:"14px Source sans pro"});let ue=100;const de="grid"!==oe.dataLayout,pe=null==d||null===(t=d.qListObject.qSize)||void 0===t?void 0:t.qcy,fe=sI({pages:J,minimumBatchSize:ue,count:pe,calculatePagesHeight:w,layoutOptions:oe,model:a});let he=TI({itemWidth:v,layout:d,frequencyMode:b});const me=iI({layout:d,width:v,height:g,listCount:fe,count:pe,textWidth:ce,freqIsAllowed:he,checkboxes:A});me.columnWidth&&(he=TI({itemWidth:me.columnWidth,layout:d,frequencyMode:b}));const{listCount:ge}=me;K("listCount",ge);const ve=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function(e){let t,{position:n,isRow:r,sizes:o,layout:i,offset:a}=e,l=!1,s=null!=a?a:0;switch(n){case"start":t=0;break;case"end":t=r?o.rowCount:o.columnCount;break;case"overflowStart":s=0,t=0,l=!0;break;case"overflowEnd":s=((e,t)=>e.qListObject.qDimensionInfo.qCardinal-t)(i,o.listCount),t=i.qListObject.qDimensionInfo.qCardinal,l=!0}return{scrollIndex:t,offset:s,triggerRerender:l}}({position:e,isRow:ie,sizes:me,layout:d,offset:F.current.dataOffset});F.current.dataOffset=n,r&&f.triggerStateChanged(),le(t)};U.useEffect((()=>{const e=L.state;e.up?le(O.state.start-e.up):e.down?le(O.state.stop+e.down):e.scrollPosition&&ve(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&L.reset()}),[L.state.up,L.state.down,L.state.scrollPosition]);const{textAlign:be}=(null==d?void 0:d.qListObject.qDimensionInfo)||{},[ye,xe]=U.useState({first:!1,last:!1}),{List:Se,Grid:we}=function(e){let{layout:t,width:n,checkboxes:r,local:o,isVertical:a,pages:s,selectDisabled:c,interactionEvents:u,frequencyMode:d,histogram:p,isSingleSelect:f,select:h,selectAll:m,onCtrlF:g,textAlign:v,selections:b,keyboard:y,showGray:x,scrollState:S,direction:w,sizes:E,listCount:C,overflowDisclaimer:k,setScrollPosition:R,focusListItems:L,setCurrentScrollIndex:O,constraints:I,frequencyMax:T,freqIsAllowed:P,translator:_,showSearch:N,isModal:M}=e;const{layoutOptions:q={}}=t||{},{columnWidth:z,itemPadding:A,listHeight:D,itemHeight:j,rowCount:F,columnCount:B,frequencyWidth:$}=E||{},W=("grid"===q.dataLayout?z:n)>80,U={direction:"rtl"===w?"rtl":"ltr",useIsScrolling:!0,className:tI.styledScrollbars},V=null==t?void 0:t.qListObject.qDimensionInfo.qLocked,G=i(i({isLocked:V,column:!a,pages:s},V||c()?{}:u),{},{checkboxes:r,layoutOptions:q,frequencyMode:d,freqIsAllowed:P,isSingleSelect:f,textAlign:v,itemPadding:A,frequencyWidth:$,actions:{select:h,confirm:()=>null==b?void 0:b.confirm.call(b),cancel:()=>null==b?void 0:b.cancel.call(b),setScrollPosition:R,selectAll:m,onCtrlF:g},frequencyMax:T,histogram:p,keyboard:y,showGray:x,showTick:W,dataOffset:o.current.dataOffset,focusListItems:L,direction:w,translator:_,showSearch:N,isModal:M});return{List:e=>{let{onItemsRendered:r,ref:a}=e;return o.current.listRef=a,H.createElement(rI,l({},U,{dataTestid:"fixed-size-list",scrollDisabled:null==I?void 0:I.active,height:D,width:n,itemCount:C,itemData:i(i({},G),{},{listCount:C}),itemSize:j,onItemsRendered:e=>{var n,a;O({start:e.visibleStartIndex,stop:e.visibleStopIndex}),S&&S.setScrollPos(e.visibleStopIndex),nI({renderProps:e,layoutOptions:q,maxCount:E.maxCount,columnCount:B,rowCount:F,overflowDisclaimer:k,qCardinal:null==t||null===(n=t.qListObject)||void 0===n||null===(a=n.qDimensionInfo)||void 0===a?void 0:a.qCardinal,dataOffset:o.current.dataOffset}),r(i({},e))},ref:a}),MO)},Grid:e=>{let{onItemsRendered:r,ref:a}=e;const{overflowStyling:s,scrollBarWidth:c}=E,{layoutOrder:u}=q||{},d=Math.min(D,F*j+c);return o.current.listRef=a,H.createElement(oI,l({},U,{dataTestid:"fixed-size-grid",scrollDisabled:null==I?void 0:I.active,height:d,width:n,columnCount:B,columnWidth:z,rowCount:F,rowHeight:j,style:i({},s),itemData:i(i({},G),{},{column:void 0,columnCount:B,rowCount:F}),onItemsRendered:e=>{var n,i;const a="row"===u;O({start:a?e.visibleRowStartIndex:e.visibleColumnStartIndex,stop:a?e.visibleRowStopIndex:e.visibleColumnStopIndex});const l=function(e){const{renderProps:t,scrollState:n,layoutOrder:r,rowCount:o,columnCount:i}=e,{overscanRowStartIndex:a,overscanRowStopIndex:l,overscanColumnStartIndex:s,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,p,f,h;return n&&n.setScrollPos(u),"column"===r?(d=s*o,p=a,f=c*o,h=l):(d=s,p=a*i,f=c,h=l*i),{visibleStartIndex:d+p,visibleStopIndex:f+h}}({renderProps:e,scrollState:S,layoutOrder:u,rowCount:F,columnCount:B});nI({renderProps:e,layoutOptions:q,maxCount:E.maxCount,columnCount:B,rowCount:F,overflowDisclaimer:k,qCardinal:null==t||null===(n=t.qListObject)||void 0===n||null===(i=n.qDimensionInfo)||void 0===i?void 0:i.qCardinal,dataOffset:o.current.dataOffset}),r(l)},ref:a}),MO)}}}({direction:h,layout:d,height:g,width:v,checkboxes:A,frequencyMode:b,histogram:D,keyboard:E,showGray:C,interactionEvents:ne,select:re,selectAll:()=>{f.clearItemStates(!1),a.selectListObjectAll("/qListObjectDef")},onCtrlF:T,textAlign:be,isVertical:de,pages:J,selectDisabled:R,isSingleSelect:z,selections:p,scrollState:k,local:F,sizes:me,listCount:ge,overflowDisclaimer:{state:X,set:e=>Q((t=>i(i({},t),{},{show:e})))},setScrollPosition:ve,focusListItems:{first:ye.first,setFirst:e=>xe((t=>i(i({},t),{},{first:e}))),last:ye.last,setLast:e=>xe((t=>i(i({},t),{},{last:e})))},setCurrentScrollIndex:O.set,constraints:u,frequencyMax:$,freqIsAllowed:he,translator:N,showSearch:P,isModal:_}),{columnWidth:Ee,listHeight:Ce,itemHeight:ke}=me||{};return de||(ue=function(e){let{width:t,columnWidth:n,listHeight:r,itemHeight:o}=e;return Math.ceil(t/n)*Math.ceil(r/o)*2}({width:v,columnWidth:Ee,listHeight:Ce,itemHeight:ke})),H.createElement(MI,null,H.createElement(OO,{className:"screenReaderOnly",layout:d}),!ge&&ee>0&&H.createElement(fI,{width:v,text:"Listbox.NoMatchesForYourTerms"}),H.createElement(BL,{isItemLoaded:te,itemCount:ge||1,loadMoreItems:Z.with({minimumBatchSize:ue}),threshold:0,minimumBatchSize:ue,ref:j,role:"grid"},de?Se:we),X.show&&!X.dismissed&&H.createElement(II,{text:"Listbox.ItemsOverflow",dismiss:()=>Q((e=>i(i({},e),{},{dismissed:!0}))),parentWidth:null==j||null===(n=j.current)||void 0===n||null===(r=n._listRef)||void 0===r||null===(o=r.props)||void 0===o?void 0:o.width,dense:null==oe?void 0:oe.dense}))}const zI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M15.4,9 C15.8,9 16,9.3 16,9.6 L16,15.4 C16,15.7 15.8,16 15.4,16 L9.6,16 C9.3,16 9,15.8 9,15.4 L9,9.6 C9,9.3 9.3,9 9.6,9 L15.4,9 Z M15,10 L10,10 L10,15 L15,15 L15,10 Z M6.5,0 C6.8,0 7,0.3 7,0.6 L7,6.4 C7,6.8 6.8,7 6.5,7 L0.6,7 C0.3,7 0,6.8 0,6.5 L0,0.6 C0,0.3 0.3,0 0.6,0 L6.5,0 Z M6,2.8 C6.3,2.5 6.3,2.1 6.1,1.8 C5.9,1.5 5.4,1.6 5.1,1.9 L3.1,3.9 L2.4,3.2 C2.1,2.9 1.7,2.9 1.4,3.1 C1.2,3.3 1.2,3.8 1.5,4.1 L2.7,5.3 C3,5.6 3.4,5.6 3.7,5.3 L3.8,5.3 L6,2.8 Z M6.5,9 C6.8,9 7,9.3 7,9.6 L7,15.4 C7,15.8 6.8,16 6.5,16 L0.6,16 C0.3,16 0,15.8 0,15.4 L0,9.6 C0,9.3 0.3,9 0.6,9 L6.5,9 Z M6,11.8 C6.3,11.5 6.3,11.1 6.1,10.8 C5.9,10.6 5.4,10.6 5.1,10.8 L3.1,12.8 L2.3,12 C2,11.7 1.6,11.7 1.3,12 C1.1,12.3 1.1,12.7 1.4,13 L2.6,14.2 C2.9,14.5 3.3,14.5 3.6,14.3 L3.7,14.2 L6,11.8 Z M15.4,0 C15.8,0 16,0.3 16,0.6 L16,6.4 C16,6.8 15.8,7 15.4,7 L9.6,7 C9.3,7 9,6.8 9,6.5 L9,0.6 C9,0.3 9.3,0 9.6,0 L15.4,0 Z M15,2.8 C15.3,2.5 15.3,2.1 15.1,1.8 C14.9,1.5 14.4,1.6 14.1,1.9 L12.1,3.9 L11.3,3.1 C11,2.8 10.6,2.8 10.3,3 C10,3.2 10.1,3.7 10.3,4 L11.5,5.2 C11.8,5.5 12.2,5.5 12.5,5.2 L15,2.8 Z"}}]}),AI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),DI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),jI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]});var FI=e=>{let{layout:t,model:n,translator:r,selectionState:o,isDirectQuery:i=!1}=e;if(t.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];return[{key:"selectAll",type:"menu-icon-button",label:r.get("Selection.SelectAll"),getSvgIconShape:zI,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{o.clearItemStates(!1),n.selectListObjectAll("/qListObjectDef")}},{key:"selectPossible",type:"menu-icon-button",label:r.get("Selection.SelectPossible"),getSvgIconShape:DI,enabled:()=>["qOption"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{o.clearItemStates(!1),n.selectListObjectPossible("/qListObjectDef")}},!i&&{key:"selectAlternative",type:"menu-icon-button",label:r.get("Selection.SelectAlternative"),getSvgIconShape:AI,enabled:()=>["qAlternative"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{o.clearItemStates(!1),n.selectListObjectAlternative("/qListObjectDef")}},!i&&{key:"selectExcluded",type:"menu-icon-button",label:r.get("Selection.SelectExcluded"),getSvgIconShape:jI,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{o.clearItemStates(!1),n.selectListObjectExcluded("/qListObjectDef")}}].filter(Boolean)};const BI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M2,6.5 L3,6.5 C3.55228475,6.5 4,6.94771525 4,7.5 L4,8.5 C4,9.05228475 3.55228475,9.5 3,9.5 L2,9.5 C1.44771525,9.5 1,9.05228475 1,8.5 L1,7.5 C1,6.94771525 1.44771525,6.5 2,6.5 Z M7.5,6.5 L8.5,6.5 C9.05228475,6.5 9.5,6.94771525 9.5,7.5 L9.5,8.5 C9.5,9.05228475 9.05228475,9.5 8.5,9.5 L7.5,9.5 C6.94771525,9.5 6.5,9.05228475 6.5,8.5 L6.5,7.5 C6.5,6.94771525 6.94771525,6.5 7.5,6.5 Z M13,6.5 L14,6.5 C14.5522847,6.5 15,6.94771525 15,7.5 L15,8.5 C15,9.05228475 14.5522847,9.5 14,9.5 L13,9.5 C12.4477153,9.5 12,9.05228475 12,8.5 L12,7.5 C12,6.94771525 12.4477153,6.5 13,6.5 Z"}}]});function $I(e){const t=ay(),n="function"==typeof e.enabled?!e.enabled():!!e.disabled,r="function"==typeof e.getSvgIconShape;return{hidden:!0===e.hidden,disabled:n,style:{backgroundColor:e.active?t.palette.btn.active:void 0},hasSvgIconShape:r}}const WI={className:"njs-cell-action"},UI=H.forwardRef(((e,t)=>{let{ariaExpanded:n=!1,item:r,addAnchor:o=!1}=e;const i=ay(),{hidden:a,disabled:l,style:s,hasSvgIconShape:c}=$I(r);if(a)return null;const u=Number.parseInt(i.spacing(.5),10),d=r.keyboardAction||r.action,p=d?e=>["Enter"].includes(e.key)&&d():null,f=d?e=>[" ","Spacebar"].includes(e.key)&&d():null,h="actions-toolbar-".concat(r.key);return H.createElement(uE,{ref:o?null:t,title:r.label,onClick:r.action,onKeyDown:p,onKeyUp:f,disabled:l,style:s,className:[WI.className,h].join(" "),size:"large",disableRipple:!0,"aria-expanded":n,"aria-controls":"moreMenuList","data-testid":h},c&&ML(r.getSvgIconShape()),o&&H.createElement("div",{ref:t,style:{bottom:-u,right:0,position:"absolute",width:"100%",height:0}}))})),HI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M9.34535242,8 L13.3273238,11.9819714 C13.6988326,12.3534802 13.6988326,12.955815 13.3273238,13.3273238 C12.955815,13.6988326 12.3534802,13.6988326 11.9819714,13.3273238 L8,9.34535242 L4.01802863,13.3273238 C3.64651982,13.6988326 3.04418502,13.6988326 2.67267621,13.3273238 C2.3011674,12.955815 2.3011674,12.3534802 2.67267621,11.9819714 L6.65464758,8 L2.67267621,4.01802863 C2.3011674,3.64651982 2.3011674,3.04418502 2.67267621,2.67267621 C3.04418502,2.3011674 3.64651982,2.3011674 4.01802863,2.67267621 L8,6.65464758 L11.9819714,2.67267621 C12.3534802,2.3011674 12.955815,2.3011674 13.3273238,2.67267621 C13.6988326,3.04418502 13.6988326,3.64651982 13.3273238,4.01802863 L9.34535242,8 Z"}}]}),VI=e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M9.1661442,6.1661442 C10.7210031,4.61128527 13.2789969,4.61128527 14.8338558,6.1661442 C16.3887147,7.72100313 16.3887147,10.2789969 14.8338558,11.8338558 C13.2789969,13.3887147 10.7210031,13.3887147 9.1661442,11.8338558 C7.61128527,10.2789969 7.61128527,7.77115987 9.1661442,6.1661442 Z M14.1316614,7.72100313 C14.3322884,7.52037618 14.3824451,7.169279 14.1316614,6.9184953 C13.8808777,6.6677116 13.5297806,6.71786834 13.3291536,6.9184953 L12.0250784,8.22257053 L10.7210031,6.9184953 C10.5203762,6.6677116 10.1191223,6.6677116 9.9184953,6.9184953 C9.6677116,7.11912226 9.6677116,7.52037618 9.9184953,7.72100313 L11.2225705,9.02507837 L9.9184953,10.3291536 C9.6677116,10.5297806 9.6677116,10.8808777 9.9184953,11.1316614 C10.169279,11.3824451 10.5203762,11.3824451 10.7210031,11.1316614 L12.0250784,9.82758621 L13.3291536,11.1316614 C13.5297806,11.3824451 13.8808777,11.3824451 14.1316614,11.1316614 C14.3322884,10.9310345 14.3824451,10.5297806 14.1316614,10.3291536 L12.8275862,9.02507837 L14.1316614,7.72100313 Z"}}]});var GI=e=>ML(VI(e));const KI="njs-action-toolbar-more",ZI={icon:"".concat("More","-icon")},XI=uy(SR)((e=>{let{theme:t}=e;return{pointerEvents:"none",["& .".concat(ZI.icon)]:{color:t.palette.text.primary}}}));function QI(e){let{item:t,autoFocus:n,onActionClick:r=(()=>{})}=e;const{hidden:o,disabled:i,hasSvgIconShape:a}=$I(t);return o?null:H.createElement(OR,{autoFocus:n,title:t.label,onClick:()=>{t.action(),r()},disabled:i,tabindex:"0"},a&&H.createElement(nR,{className:ZI.icon},ML(t.getSvgIconShape())),H.createElement(vE,{noWrap:!0},t.label))}const JI=H.forwardRef(((e,t)=>{let{actions:n=[],show:r=!0,alignTo:o,popoverProps:a={},popoverPaperStyle:s={},onCloseOrActionClick:c=(()=>{})}=e;const u=n.length>0,d=n.findIndex((e=>!e.disabled));return u&&H.createElement(XI,l({},a,{onClose:c,ref:t,open:r,anchorEl:o.current,getContentAnchorEl:null,container:o.current,disablePortal:!0,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:KI}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:i({pointerEvents:"auto",maxWidth:"250px"},s)}}),H.createElement(uR,{id:"moreMenuList"},n.map(((e,t)=>H.createElement(QI,{key:t,item:e,autoFocus:t===d,onActionClick:c})))))}));function YI(e){let{keyboardNavigation:t,focusHandler:n,getEnabledButton:r,selections:o}=e;return e=>{const{target:i,nativeEvent:a}=e,{keyCode:l}=a;switch(l){case IO.ARROW_LEFT:case IO.ARROW_DOWN:case IO.ARROW_RIGHT:case IO.ARROW_UP:if(i.classList.contains("njs-cell-action")){const e=(e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)})(i);(e=>{const t=document.querySelector("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");if(!n.length)return;n[Math.min(Math.max(0,e),n.length-1)].focus()})([IO.ARROW_LEFT,IO.ARROW_DOWN].includes(l)?e-1:e+1)}e.stopPropagation(),e.preventDefault();break;case IO.SPACE:e.preventDefault();break;case IO.TAB:if(t&&null!=n&&n.refocusContent){(e.shiftKey&&r(!1)===e.target||!e.shiftKey&&r(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),n.refocusContent())}break;case IO.ESCAPE:o&&(o.onCancel(),o.api.cancel(),e.preventDefault(),e.stopPropagation())}}}const eT="ActionsToolbar",tT={item:"".concat(eT,"-item"),itemSpacing:"".concat(eT,"-itemSpacing"),firstItemSpacing:"".concat(eT,"-firstItemSpacing"),lastItemSpacing:"".concat(eT,"-lastItemSpacing")},nT=uy(SR)((e=>{let{theme:t}=e;return{["& .".concat(tT.itemSpacing)]:{padding:t.spacing(0,.5)},["& .".concat(tT.firstItemSpacing)]:{padding:t.spacing(0,.5,0,0)},["& .".concat(tT.lastItemSpacing)]:{padding:t.spacing(0,0,0,.5)}}})),rT="njs-action-toolbar-popover",oT=H.forwardRef(((e,t)=>{let{className:n,ariaExpanded:r=!1,actions:o=[],first:i=!1,last:a=!1,addAnchor:l=!1,isRtl:s=!1}=e;return o.length>0?H.createElement(pk,{item:!0,container:!0,gap:0,flexDirection:s?"row-reverse":"row",wrap:"nowrap",className:n},o.map(((e,n)=>{let s=[];const c=i&&0===n,u=a&&o.length-1===n;return c&&!u&&(s=[tT.firstItemSpacing,tT.item]),u&&!c&&(s=[...s,tT.lastItemSpacing,tT.item]),c||u||0!==s.length||(s=[tT.itemSpacing,tT.item]),H.createElement(pk,{item:!0,key:e.key,className:s.join(" ").trim()},H.createElement(UI,{ariaExpanded:r,key:e.key,item:e,ref:0===n?t:null,addAnchor:l}))}))):null})),iT={pointerEvents:"none"},aT={vertical:"bottom",horizontal:"right"};function lT(e){var t,n;let{show:r=!0,actions:o=[],maxItems:i=3,selections:a={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},more:l={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{}},popover:s={show:!1,anchorEl:null},focusHandler:c=null,actionsRefMock:u=null,direction:d="ltr"}=e;const p=function(e){let{api:t,onConfirm:n=(()=>{}),onCancel:r=(()=>{}),onKeyDeactivate:o=(()=>{})}=e;const{translator:i}=U.useContext(Iw);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>t.canClear(),action:()=>t.clear(),getSvgIconShape:VI},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>t.canCancel(),action:()=>{r(),t.cancel()},keyboardAction:()=>{o(),r(),t.cancel()},getSvgIconShape:HI},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>t.canConfirm(),action:()=>{n(),t.confirm()},keyboardAction:()=>{o(),n(),t.confirm()},getSvgIconShape:QL}]}(a),{translator:f,keyboardNavigation:h}=U.useContext(Iw),[m,g]=U.useState(!1),v={vertical:7,horizontal:(null!==(t=null===(n=s.anchorEl)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)-7},b=U.useRef(),y=U.useRef(),x=ay(),S=U.useMemo((()=>({margin:x.spacing(.5,0)}))),w=e=>{const t=b.current||u;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},E=U.useMemo((()=>YI({keyboardNavigation:h,focusHandler:c,getEnabledButton:w,selections:a})),[h,c,w,a]);U.useEffect((()=>()=>{g(!1)}),[s.show,r,a.show]),U.useEffect((()=>{if(!c)return;c.on("focus_toolbar_first",(()=>{const e=w(!1);e&&e.focus()})),c.on("focus_toolbar_last",(()=>{const e=w(!0);e&&e.focus()}))}),[]);let C=l.enabled,k=l.actions;const R=l.alignTo||y,L=o.filter((e=>!e.hidden));if(L.length>i){const e=L.splice(-(L.length-i)-1);C=!0,k=[...e,...l.actions]}if(!a.show&&0===L.length)return null;const O={key:"more",label:f.get("Menu.More"),getSvgIconShape:BI,hidden:!1,active:m,enabled:()=>C,action:()=>g(!m)},I=L.length>0,T=k.length>0,P=I&&a.show||T&&a.show,_="rtl"===d,N=H.createElement(pk,{ref:b,onKeyDown:E,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:_?"row-reverse":"row"}},I&&H.createElement(oT,{actions:L,first:!0,last:!T&&!a.show}),T&&H.createElement(oT,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:y,ariaExpanded:m,actions:[O],first:!I,last:!a.show,addAnchor:!0}),P&&H.createElement(pk,{item:!0,className:tT.itemSpacing,style:S},H.createElement(KC,{orientation:"vertical"})),a.show&&H.createElement(oT,{className:"actions-toolbar-default-actions",actions:p,first:!I&&!T,last:!0,isRtl:_}),m&&H.createElement(JI,{show:m,actions:k,alignTo:R,popoverProps:l.popoverProps,popoverPaperStyle:l.popoverPaperStyle,onCloseOrActionClick:()=>{g(!1)}}));return s.show?H.createElement(nT,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:s.show,anchorEl:s.anchorEl,anchorOrigin:v,transformOrigin:aT,hideBackdrop:!0,style:iT,PaperProps:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:rT,style:{pointerEvents:"auto",padding:x.spacing(.8)}}},N):r&&N}var sT=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014l-4.128-4.026ZM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0Zm-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6.034 6.034 0 0 1-1.413 1.415Z"}}]}))(e));const cT="/qListObjectDef",uT=uy(Tk)((e=>{var t,n;let{theme:r}=e;return{color:null===(t=r.listBox)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.color}})),dT=uy(AR)((e=>{var t,n;let{theme:r}=e;return{color:null===(t=r.listBox)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.color,display:"flex"}}));function pT(e){let{selections:t,selectionState:n,model:r,keyboard:o,dense:i=!1,visible:a=!0,autoFocus:l=!0,wildCardSearch:s=!1,searchEnabled:c,direction:u,hide:d}=e;const{translator:p}=U.useContext(Iw),[f,h]=U.useState(""),[m,g]=U.useState(!1),v=U.useRef(),b=ay(),{getStoreValue:y}=dI(r),x="rtl"===u,S=x?"right":"left",w=async()=>{if(t.isModal())try{await r.abortListObjectSearch(cT)}finally{h("")}};U.useEffect((()=>{a||w()}),[a]),U.useEffect((()=>(t.on("deactivated",w),()=>{t.removeListener&&t.removeListener("deactivated",w)})),[]),U.useEffect((()=>{if(m&&v.current){const e=f.length-1;v.current.setSelectionRange(e,e),g(!1)}}),[m,v.current]);const E=async()=>{let e;return await r.searchListObjectFor(cT,f)&&f.length&&y("listCount")>0&&(e=r.acceptListObjectSearch(cT,!0),t.selectionsMade=!0,n.clearItemStates(!1),h("")),e};function C(e){const t=(null==e?void 0:e.querySelector(".last-focused"))||(null==e?void 0:e.querySelector('[role="row"]:first-child'));t.setAttribute("tabIndex",0),null==t||t.focus()}return a&&!1!==c?H.createElement(dT,{startAdornment:H.createElement(uT,{position:"start"},H.createElement(sT,{size:i?"small":"normal"})),className:"search",sx:[{border:"none",fontSize:14,borderRadius:0,backgroundColor:"transparent","& fieldset":{border:"1px solid ".concat(b.palette.divider),borderWidth:"1px 0 1px 0",borderRadius:0},"&:hover":{border:"none"},paddingLeft:"".concat(9,"px")},i&&{fontSize:12,paddingLeft:b.spacing(1),"& input":{paddingTop:"5px",paddingBottom:"5px"}},{flexDirection:x?"row-reverse":"row"}],inputRef:v,size:"small",fullWidth:!0,placeholder:p.get("Listbox.Search"),value:f,onFocus:()=>{s&&(h("**"),g(!0)),t.isModal()||t.begin(["/qListObjectDef"])},onChange:async e=>(h(e.target.value),e.target.value.length?r.searchListObjectFor(cT,e.target.value):w()),onKeyDown:async e=>{const{currentTarget:n}=e,r=n.closest(".listbox-container");switch(e.key){case"Enter":E();break;case"Escape":C(r),t.isActive()&&t.cancel();break;case"Tab":e.shiftKey?o.focusSelection():(C(r),null==r||r.querySelectorAll(".last-focused").forEach((e=>{e.classList.remove("last-focused")})));break;case"f":case"F":if(!e.ctrlKey&&!e.metaKey)return;d&&(d(),C(r));break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:l,inputProps:{tabIndex:o.innerTabStops?0:-1,style:{textAlign:"".concat(S)},"data-testid":"search-input-field"}}):null}function fT(e){return Object.keys(te.prototype).forEach((t=>{e[t]=te.prototype[t]})),te.init(e),e}const hT=e=>{let t,{appSelections:n,appModal:r,model:o}=e,i=!1,a=!1;const l={id:o.id,setLayout(e){t=e},begin(e){const t=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",t),t.isPrevented()?Promise.resolve():(i=!0,this.emit("activated"),r.begin(o,e,!0))},clear(){return a=!1,this.emit("cleared"),t.qListObject?o.clearSelections("/qListObjectDef"):o.resetMadeSelections()},confirm(){return a=!1,i=!1,this.emit("confirmed"),this.emit("deactivated"),r.end(!0)},cancel(){return a=!1,i=!1,this.emit("canceled"),this.emit("deactivated"),r.end(!1)},async select(e){const t=this.begin([e.params[0]]);if(!n.isModal())return!1;await t;const r=await o[e.method](...e.params);return a="resetMadeSelections"!==e.method,!!r||(o.resetMadeSelections(),!1)},canClear:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked&&!t.qListObject.qDimensionInfo.qIsOneAndOnlyOne:a,canConfirm:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked:a,canCancel:()=>!(t&&t.qListObject&&t.qListObject.qDimensionInfo)||!t.qListObject.qDimensionInfo.qLocked,isActive:()=>i,isModal:()=>n.isModal(o),goModal:e=>r.begin(o,e,!1),noModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.end(e)}};return fT(l),l},mT=e=>{let{elements:t,objectSelections:n,options:r={}}=e;const o=function(e){let{elements:t,handleClickOutside:n}=e;return e=>{if(!document.contains(e.target))return;const r=t.map((e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current)).filter((e=>!!e&&!!document.contains(e)));r.length&&!r.some((t=>t.contains(e.target)))&&n(e)}}({elements:t,handleClickOutside:()=>n.confirm.call(n)});return{activateClickOut(){var e;document.addEventListener("mousedown",o),null==r||null===(e=r.onSelectionActivated)||void 0===e||e.call(r)},deactivateClickOut(){var e;document.removeEventListener("mousedown",o),null==r||null===(e=r.onSelectionDeactivated)||void 0===e||e.call(r)}}};function gT(e,t,n,r){const o=Array.isArray(n)?n:[n],[i]=jw(e),[a]=TL(t),l=t?t.id:null,[s]=Nw(),[c]=qw(),u=s.get(e.id);let d=c.get(l);return U.useEffect((()=>{i&&t&&!d&&(d=hT({appSelections:i,appModal:u,model:t}),c.set(l,d),c.dispatch(!0))}),[i,t]),U.useEffect((()=>{if(!d)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=mT({elements:o,objectSelections:d,options:r});return d.addListener("activated",e),d.addListener("deactivated",t),()=>{d.isActive()&&d.confirm(),d.removeListener("activated",e),d.removeListener("deactivated",t)}}),[d]),U.useEffect((()=>{d&&d.setLayout(a)}),[d,a]),[d]}function vT(){const e={itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,update(t){var n,r,o;let{setPages:i,pages:a,isSingleSelect:l,selectDisabled:s,layout:c}=t;this.setPages=i;const u=this.lastRowCount===c.qListObject.qSize.qcy,d=this.lastApprMaxGlyphCount===c.qListObject.qDimensionInfo.qApprMaxGlyphCount;u&&d||(this.lastRowCount=c.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=c.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),e.enginePages!==a&&void 0!==a&&(e.enginePages=null!=a?a:[],e.selectedInEngine=UL(a),e.selectableValuesUpdating=!1,e.triggerStateChanged()),e.isSingleSelect=l,e.selectDisabled=s,e.isDimCalculated=null!==(n=null==c||null===(r=c.qListObject)||void 0===r||null===(o=r.qDimensionInfo)||void 0===o?void 0:o.qIsCalculated)&&void 0!==n&&n},allowedToSelect:()=>!e.selectDisabled()&&!(e.isDimCalculated&&e.selectableValuesUpdating),setSelectableValuesUpdating(){e.selectableValuesUpdating=!0},useClientItemState:t=>e.ignoreSelectionState||t in e.itemStates,isSelected:t=>e.useClientItemState(t)?!!e.itemStates[t]:e.selectedInEngine.includes(t),getState(t){const{qElemNumber:n,qState:r}=t;return e.useClientItemState(n)?e.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(t,n,r){const o=e.isSelected(t);o&&!n?e.itemStates[t]=!1:o||(null==r||r.push(t),e.itemStates[t]=!0)},triggerStateChanged(){if(this.setPages){const t=e.applySelectionsOnPages(e.enginePages);this.setPages(t)}},applySelectionsOnPages(t){const n=t.map((t=>{const n=t.qMatrix.map((t=>{const[n]=t,r=e.getState(n);return[i(i({},n),{},{qState:r}),...t.slice(1)]}));return i(i({},t),{},{qMatrix:n})}));return n},updateItem(t,n,r){e.updateItemNoEvents(t,n,r),e.triggerStateChanged()},updateItems(t,n,r){t.forEach((t=>{e.updateItemNoEvents(t,n,r)})),e.triggerStateChanged()},clearItemStates(t){e.itemStates={},e.ignoreSelectionState=t}};return e}const bT=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:r};function yT(e){let{alignTo:t,anchorOrigin:n={vertical:"bottom",horizontal:"center"},transformOrigin:r={vertical:"top",horizontal:"center"},show:o,close:i,app:a,fieldName:l,stateName:s="$",autoFocus:c}=e;const u=Boolean(null==l?void 0:l.qLibraryId),d=o&&Boolean(t.current),[p,f]=U.useState(0),h=ay(),m=U.useRef(),[g]=kL({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:s,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],qFieldDefs:u?void 0:[l]},qLibraryId:u?l.qLibraryId:void 0}},a,l,s),v=U.useCallback((()=>{g.lock("/qListObjectDef")}),[g]),b=U.useCallback((()=>{g.unlock("/qListObjectDef")}),[g]),{translator:y}=U.useContext(Iw),x=U.useRef(),S=U.useRef(),[w]=gT(a,g,S),[E]=TL(g),[C]=U.useState((()=>vT()));if(U.useEffect((()=>{w&&d&&(w.isModal(g)||w.goModal("/qListObjectDef"))}),[w,d]),!g||!E||!y)return null;const k=!0===E.qListObject.qDimensionInfo.qLocked,R=(e,t)=>{const n="escapeKeyDown"!==t;w.noModal(n),i()},L=FI({layout:E,model:g,translator:y,selectionState:C}),O=function(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return bT(t,"qSelected",0)+bT(t,"qSelectedExcluded",0)+bT(t,"qLocked",0)+bT(t,"qLockedExcluded",0)>0}(E);return H.createElement(SR,{open:d,onClose:R,anchorEl:t.current,anchorOrigin:n,transformOrigin:r,PaperProps:{style:{minWidth:"250px"}}},H.createElement(pk,{container:!0,direction:"column",gap:0,ref:S},H.createElement(pk,{item:!0,container:!0,style:{padding:h.spacing(1)}},H.createElement(pk,{item:!0},k?H.createElement(uE,{onClick:b,disabled:!k,size:"large"},H.createElement(zL,{title:y.get("Listbox.Unlock")})):H.createElement(uE,{onClick:v,disabled:!O,size:"large"},H.createElement(AL,{title:y.get("Listbox.Lock")}))),H.createElement(pk,{item:!0,xs:!0}),H.createElement(pk,{item:!0},H.createElement(lT,{more:{enabled:!k,actions:L,alignTo:x,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:w,onConfirm:R,onCancel:()=>R(0,"escapeKeyDown")}}))),H.createElement(pk,{item:!0,xs:!0},H.createElement("div",{ref:x}),H.createElement(pk,{item:!0,ref:m},H.createElement(pT,{visible:!0,model:g,listCount:p,selections:w,selectionState:C,keyboard:{enabled:!1},autoFocus:null==c||c})),H.createElement(qI,{model:g,app:a,layout:E,selections:w,selectionState:C,direction:"ltr",onSetListCount:e=>f(e),onCtrlF:()=>{const e=m.current.querySelector("input");null==e||e.focus()}}))))}function xT(e){let{field:t,api:n,stateIx:r=0,skipHandleShowListBoxPopover:o=!1,moreAlignTo:i=null,onClose:a=(()=>{})}=e;const{translator:l}=U.useContext(Iw),s=i||U.useRef(),c=ay(),[u,d]=U.useState(!1),p=e=>{e.currentTarget.contains(e.target)&&d(!u)},f=()=>{d(!1),a()},h=t.selections[r];void 0===h.qTotal&&(h.qTotal=0);const m=h.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},g=(m.qSelected+m.qLocked)/h.qTotal,v=m.qAlternative/h.qTotal,b=(m.qExcluded+m.qLockedExcluded+m.qSelectedExcluded)/h.qTotal,y=m.qSelected+m.qSelectedExcluded+m.qLocked+m.qLockedExcluded,x=0===y&&0===h.qTotal;let S="";h.qTotal===y&&h.qTotal>1?S=l.get("CurrentSelections.All"):y>1&&h.qTotal?S=l.get("CurrentSelections.Of",[y,h.qTotal]):h.qSelectedFieldSelectionInfo&&(S=h.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==t.states[r]&&(S="".concat(t.states[r],": ").concat(S));const w=[{color:c.palette.selected.main,ratio:g},{color:c.palette.selected.alternative,ratio:v},{color:c.palette.selected.excluded,ratio:b}];w.forEach(((e,t)=>{e.offset=t?w[t-1].offset+w[t-1].ratio:0}));let E=null,C=null,k=null,R=null;return i||(E=H.createElement(pk,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:h.qLocked?"0.3":""}},H.createElement(vE,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},h.qField),H.createElement(vE,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},S)),h.qLocked?C=H.createElement(pk,{item:!0},H.createElement(uE,{size:"large"},H.createElement(zL,null))):h.qOneAndOnlyOne||(C=H.createElement(pk,{item:!0},H.createElement(uE,{title:l.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),n.clearField(h.qField,t.states[r])},size:"large"},H.createElement(qL,null)))),k=H.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===x&&w.map((e=>H.createElement("div",{key:e.color,style:{position:"absolute",background:e.color,height:"100%",top:0,width:"".concat(100*e.ratio,"%"),left:"".concat(100*e.offset,"%")}})))),R=H.createElement(pk,{container:!0,gap:1,ref:s,sx:{backgroundColor:c.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:c.palette.action.hover}},onClick:!1===o&&p||null},E,C,k,u&&H.createElement(yT,{alignTo:s,show:u,close:f,app:n.model,fieldName:h.qField,stateName:t.states[r]}))),i?H.createElement(yT,{alignTo:s,show:!0,close:f,app:n.model,fieldName:h.qField,stateName:t.states[r]}):R}var ST=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M8,9 L12.5,4.5 L14,6 L9.5,10.5 L8,12 L2,6 L3.5,4.5 L8,9 Z"}}]}))(e));const wT={item:"".concat("MultiState","-item")},ET=uy(pk)((e=>{let{theme:t}=e;return{["&.".concat(wT.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function CT(e){let{field:t,api:n,moreAlignTo:r=null,onClose:o=(()=>{})}=e;const[i,a]=U.useState(!!r),[l,s]=U.useState(-1),[c,u]=U.useState(r?r.current:null),d=r||U.useRef(),{translator:p}=U.useContext(Iw),f=p.get("Selection.ClearAllStates"),h=()=>{s(-1),o()};let m=null;r||(m=H.createElement(H.Fragment,null,H.createElement(pk,{item:!0,xs:!0,zeroMinWidth:!0},H.createElement(eC,{style:{padding:"0px 8px"},color:"secondary",badgeContent:t.states.length},H.createElement(vE,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},t.name))),H.createElement(pk,{item:!0},H.createElement("div",{style:{width:"12px"}})),H.createElement(pk,{item:!0},H.createElement(uE,{size:"large"},H.createElement(ST,null)))));const g=H.createElement(zk,{dense:!0},H.createElement(Xk,{title:f,onClick:()=>{t.states.forEach((e=>n.clearField(t.name,e)))}},H.createElement(gw,{variant:"contained",fullWidth:!0},f)),t.states.map(((e,r)=>H.createElement(Xk,{key:r,title:t.name,onClick:e=>((e,t)=>{e.stopPropagation(),a(!1),s(t)})(e,r)},H.createElement(rC,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},H.createElement(xT,{field:t,api:n,stateIx:r,skipHandleShowListBoxPopover:!0})))))),v=H.createElement(SR,{open:i,onClose:()=>{a(!1),o()},anchorEl:c,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},g),b=r?v:H.createElement(ET,{container:!0,gap:0,className:wT.item,onClick:e=>{e.currentTarget.contains(e.target)&&(u(e.currentTarget),d.current=e.currentTarget,a(!i))}},m,i&&v,l>-1&&H.createElement(yT,{alignTo:d,show:l>-1,close:h,app:n.model,fieldName:t.selections[l].qField,stateName:t.states[l]}));return r&&l>-1?H.createElement(yT,{alignTo:d,show:l>-1,close:h,app:n.model,fieldName:t.selections[l].qField,stateName:t.states[l]}):b}const kT="More",RT={item:"".concat(kT,"-item"),badge:"".concat(kT,"-badge")},LT=uy(pk)((e=>{let{theme:t}=e;return{["&.".concat(RT.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(RT.badge)]:{padding:t.spacing(0,1)}}}));function OT(e){let{items:t=[],api:n}=e;const r=ay(),[o,i]=U.useState(!1),[a,l]=U.useState(-1),[s,c]=U.useState(null),u=U.useRef(),d=()=>{l(-1)};let p=null;return a>-1&&(p=t[a].states.length>1?H.createElement(CT,{field:t[a],api:n,moreAlignTo:u,onClose:d}):H.createElement(xT,{field:t[a],api:n,skipHandleShowListBoxPopover:!0,moreAlignTo:u,onClose:d})),H.createElement(LT,{container:!0,gap:0,className:RT.item,onClick:e=>{e.currentTarget.contains(e.target)&&(c(e.currentTarget),u.current=e.currentTarget,i(!o))}},H.createElement(pk,{item:!0},H.createElement(rC,{borderRadius:r.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:r.palette.selected.main,color:r.palette.selected.mainContrastText}},H.createElement(vE,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",t.length))),H.createElement(pk,{item:!0},H.createElement(uE,{size:"large"},H.createElement(ST,null))),o&&H.createElement(SR,{open:o,onClose:()=>{i(!1)},anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},H.createElement(zk,{dense:!0},t.map(((e,t)=>H.createElement(Xk,{key:t,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),i(!1),l(t)})(e,t)},H.createElement(rC,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?H.createElement(CT,{field:e,api:n}):H.createElement(xT,{field:e,api:n}))))))),p)}function IT(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$";e.qSelections.forEach((e=>{const r=e.qField,o=t[r]=t[r]||{name:r,states:[],selections:[]};-1===o.states.indexOf(n)&&(o.states.push(n),o.selections.push(e))}))}function TT(e){let{api:t,app:n}=e;const r=ay(),[o]=LL(n),[i]=TL(o),[a,l]=U.useState({items:[],more:[]}),[s]=Aw(),[c,u]=_L(),[d,p]=U.useState(0);return U.useEffect((()=>{if(!u)return;const{width:e}=u,t=Math.floor(e)-72,n=Math.floor(t/120);p(n)}),[u]),U.useEffect((()=>{if(!(n&&o&&i&&d))return;const e=function(e){if(!e)return[];const t={};return e.qSelectionObject&&IT(e.qSelectionObject,t),e.alternateStates&&e.alternateStates.forEach((e=>IT(e.qSelectionObject,t,e.stateName))),Object.keys(t).map((e=>t[e])).filter((e=>!e.selections.some((e=>e.qIsHidden))))}(i);l((t=>{const r=e;if((()=>{const e=s.get(n.id);return e&&"njsListbox"===e.genericType})()&&r.length+1===t.items.length){const e=t.items.filter((e=>!1===r.some((t=>e.name===t.name))))[0],{qField:n}=e.selections[0];e.selections=[{qField:n}];const o=t.items.indexOf(e);r.splice(o,0,e)}let o=[];return d<r.length&&(o=r.splice(d-r.length)),{items:r,more:o}}))}),[n,o,i,t.isInModal(),d]),H.createElement(pk,{ref:c,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},a.items.map((e=>H.createElement(pk,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(120,"px"),background:r.palette.background.paper,borderRight:"1px solid ".concat(r.palette.divider)}},e.states.length>1?H.createElement(CT,{field:e,api:t}):H.createElement(xT,{field:e,api:t})))),a.more.length>0&&H.createElement(pk,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(72,"px"),background:r.palette.background.paper,borderRight:"1px solid ".concat(r.palette.divider)}},H.createElement(OT,{items:a.more,api:t})))}var PT=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 Z M16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,-5.07265313e-17 13.5,0 L15,0 C15.5522847,1.01453063e-16 16,0.44771525 16,1 L16,2.5 Z M10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,-5.07265313e-17 6.5,0 L9.5,0 C9.77614237,5.07265313e-17 10,0.223857625 10,0.5 Z M1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 5.18696197e-13,2.77614237 5.18696197e-13,2.5 L5.18696197e-13,1 C5.18696197e-13,0.44771525 0.44771525,-1.01453063e-16 1,0 L2.5,0 C2.77614237,5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 5.18696197e-13,15.5522847 5.18696197e-13,15 L5.18696197e-13,13.5 C5.18696197e-13,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M4,7 C7.49095643,7 10,10.1337595 10,12.1872632 C10,12.1872632 8.16051135,9.86624054 4,10 L4,12 C4,12 2.66666667,10.8333333 -1.0658141e-14,8.5 C-2.59348099e-13,8.5 1.33333333,7.33333333 4,5 C4,5 4,5.66666667 4,7 Z"}}]}))(e));var _T=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M12,7 C12,5.66666667 12,5 12,5 C14.6666667,7.33333333 16,8.5 16,8.5 C13.3333333,10.8333333 12,12 12,12 L12,10 C7.83948865,9.86624054 6,12.1872632 6,12.1872632 C6,10.1337595 8.50904357,7 12,7 Z"}}]}))(e));function NT(e){const[t]=LL(e),[n]=TL(t),[r]=PL(e),[o,i]=U.useState(null);return U.useEffect((()=>{r&&t&&n&&((e,t,n)=>{const r=[...n.qStateNames||[]].map((e=>({stateName:e,qSelectionObjectDef:{qStateName:e}})));(t&&t.alternateStates?t.alternateStates.map((e=>e.stateName)):[]).join("::")!==(n.qStateNames||[]).map((e=>e)).join("::")&&e.applyPatches([{qOp:"replace",qPath:"/alternateStates",qValue:JSON.stringify(r)}],!0)})(t,n,r)}),[r,t,n]),U.useEffect((()=>{if(!n)return;let e=!1,t=!1,r=!1;[n,...n.alternateStates||[]].forEach((n=>{e=e||n.qSelectionObject&&n.qSelectionObject.qBackCount>0,t=t||n.qSelectionObject&&n.qSelectionObject.qForwardCount>0,r=r||(n.qSelectionObject&&n.qSelectionObject.qSelections||[]).filter((e=>!0!==e.qLocked)).length>0})),i({canGoBack:e,canGoForward:t,canClear:r})}),[n]),[o,t,n]}function MT(e){let{api:t,app:n}=e;const{translator:r}=U.useContext(Iw),[o]=NT(n);return H.createElement(pk,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},H.createElement(pk,{item:!0},H.createElement(uE,{style:{marginRight:"8px"},disabled:!o||!o.canGoBack,title:r.get("Navigate.Back"),onClick:()=>t.back(),size:"large"},H.createElement(PT,null))),H.createElement(pk,{item:!0},H.createElement(uE,{style:{marginRight:"8px"},disabled:!o||!o.canGoForward,title:r.get("Navigate.Forward"),onClick:()=>t.forward(),size:"large"},H.createElement(_T,null))),H.createElement(pk,{item:!0},H.createElement(uE,{disabled:!o||!o.canClear,title:r.get("Selection.ClearAll"),onClick:()=>t.clear(),size:"large"},H.createElement(GI,null))))}const qT=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function zT(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function AT(){return qT.map(zT).join("")}function DT(e){let{app:t}=e;const n=ay(),[r]=jw(t);return r?H.createElement(pk,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:n.palette.background.paper,minHeight:"40px"}},H.createElement(pk,{item:!0,style:{borderRight:"1px solid ".concat(n.palette.divider)}},H.createElement(MT,{api:r,app:t})),H.createElement(pk,{item:!0,xs:!0,style:{backgroundColor:n.palette.background.darker,overflow:"hidden"}},H.createElement(TT,{api:r,app:t}))):null}function jT(e){let{element:t,app:n}=e;return wp.createPortal(H.createElement(DT,{app:n}),t,AT())}var FT,BT="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};let $T;$T="undefined"!=typeof window?window:"undefined"!=typeof self?self:BT;let WT=null,UT=null;const HT=$T.clearTimeout,VT=$T.setTimeout,GT=$T.cancelAnimationFrame||$T.mozCancelAnimationFrame||$T.webkitCancelAnimationFrame,KT=$T.requestAnimationFrame||$T.mozRequestAnimationFrame||$T.webkitRequestAnimationFrame;function ZT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}null==GT||null==KT?(WT=HT,UT=function(e){return VT(e,20)}):(WT=function([e,t]){GT(e),HT(t)},UT=function(e){const t=KT((function(){HT(n),e()})),n=VT((function(){GT(t),e()}),20);return[t,n]}),FT={createDetectElementResize:function(e){let t,n,r,o,i,a,l;const s="undefined"!=typeof document&&document.attachEvent;if(!s){a=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},l=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;a(this),this.__resizeRAF__&&WT(this.__resizeRAF__),this.__resizeRAF__=UT((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,s="";r="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<c.length;n++)if(void 0!==t.style[c[n]+"AnimationName"]){d=c[n],s="-"+d.toLowerCase()+"-",r=u[n],e=!0;break}}n="resizeanim",t="@"+s+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=s+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(s)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const s=i.ownerDocument,c=$T.getComputedStyle(i);c&&"static"===c.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(s),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=s.createElement("div")).className="resize-triggers";const u=s.createElement("div");u.className="expand-trigger",u.appendChild(s.createElement("div"));const d=s.createElement("div");d.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(d),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",l,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&a(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(s)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",l,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}};class XT extends U.Component{constructor(...e){super(...e),ZT(this,"state",{height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0}),ZT(this,"_autoSizer",null),ZT(this,"_detectElementResize",null),ZT(this,"_parentNode",null),ZT(this,"_resizeObserver",null),ZT(this,"_onResize",(()=>{const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){var r,o,i,a;const l=window.getComputedStyle(this._parentNode)||{},s=parseInt(null!==(r=l.paddingLeft)&&void 0!==r?r:"0",10),c=parseInt(null!==(o=l.paddingRight)&&void 0!==o?o:"0",10),u=parseInt(null!==(i=l.paddingTop)&&void 0!==i?i:"0",10),d=parseInt(null!==(a=l.paddingBottom)&&void 0!==a?a:"0",10),p=this._parentNode.getBoundingClientRect(),f=p.height-u-d,h=p.width-s-c,m=this._parentNode.offsetHeight-u-d,g=this._parentNode.offsetWidth-s-c;(e||this.state.height===m&&this.state.scaledHeight===f)&&(t||this.state.width===g&&this.state.scaledWidth===h)||(this.setState({height:m,width:g,scaledHeight:f,scaledWidth:h}),"function"==typeof n&&n({height:m,scaledHeight:f,scaledWidth:h,width:g}))}})),ZT(this,"_setRef",(e=>{this._autoSizer=e}))}componentDidMount(){const{nonce:e}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,null!=this._parentNode&&("undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver((()=>{setTimeout(this._onResize,0)})),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=(0,FT.createDetectElementResize)(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r,disableWidth:o,nonce:i,onResize:a,style:l,tagName:s="div",...c}=this.props,{height:u,scaledHeight:d,scaledWidth:p,width:f}=this.state,h={overflow:"visible"},m={};let g=!1;return r||(0===u&&(g=!0),h.height=0,m.height=u,m.scaledHeight=d),o||(0===f&&(g=!0),h.width=0,m.width=f,m.scaledWidth=p),U.createElement(s,{ref:this._setRef,style:{...h,...l},...c},!g&&e(m))}}ZT(XT,"defaultProps",{onResize:()=>{},disableHeight:!1,disableWidth:!1,style:{}});var QT=XT;var JT=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"}}]}))(e));function YT(e){null==e||e.querySelectorAll(".last-focused").forEach((e=>{e.classList.remove("last-focused")}))}function eP(e){return(null==e?void 0:e.closest(".njs-cell"))||(null==e?void 0:e.closest(".qv-gridcell"))}function tP(e){let{keyboard:t,hovering:n,updateKeyScroll:r,containerRef:o,currentScrollIndex:i,isModal:a,constraints:l}=e;return{handleKeyDown:e=>{const{keyCode:n,shiftKey:r=!1}=e.nativeEvent,i=()=>{e.stopPropagation(),e.preventDefault()};if(!t.enabled)return;const l=e.currentTarget.closest(".listbox-container"),s=a();switch(n){case IO.TAB:if(s)r?_O(l)||PO(l):PO(l)||_O(l);else{if(!r)break;t.blur(!0)}i();break;case IO.ENTER:case IO.SPACE:if(!e.target.classList.contains("listbox-container"))break;t.focus(),i();break;case IO.ESCAPE:(e=>{const{currentTarget:n,target:r}=e,i=r.classList.contains("listbox-container"),a=eP(n.closest(".listbox-container")),l=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(i||l)t.blur(!0);else{YT(o.current),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}})(e)}},handleOnMouseEnter:()=>{(()=>{const e=(null==l?void 0:l.select)||(null==l?void 0:l.active),t=a();return e||t})()||(n.current=!0)},handleOnMouseLeave:()=>{n.current&&(n.current=!1)},globalKeyDown:e=>{if(!n.current)return;const{keyCode:t,ctrlKey:o=!1,shiftKey:a=!1}=e;switch(t){case IO.ARROW_UP:r({up:1});break;case IO.ARROW_DOWN:r({down:1});break;case IO.PAGE_UP:r({up:i.stop-i.start});break;case IO.PAGE_DOWN:r({down:i.stop-i.start});break;case IO.HOME:r({scrollPosition:o&&a?"overflowStart":"start"});break;case IO.END:r({scrollPosition:o&&a?"overflowEnd":"end"});break;default:return}e.preventDefault()}}}const nP=uy("div")((()=>({display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"})));function rP(e){let{text:t}=e;const{translator:n}=U.useContext(Iw);return H.createElement(nP,null,n.get(t))}const oP="ListBoxInline",iP={listBoxHeader:"".concat(oP,"-listBoxHeader"),screenReaderOnly:"".concat(oP,"-screenReaderOnly"),listboxWrapper:"".concat(oP,"-listboxWrapper")},aP=uy(pk,{shouldForwardProp:e=>!["containerPadding","isGridMode"].includes(e)})((e=>{var t,n;let{theme:r,containerPadding:o,isGridMode:i}=e;return{backgroundColor:null!==(t=null===(n=r.listBox)||void 0===n?void 0:n.backgroundColor)&&void 0!==t?t:r.palette.background.default,["& .".concat(iP.listBoxHeader)]:{alignSelf:"center",display:"flex"},["& .".concat(iP.screenReaderOnly)]:{position:"absolute",height:0,width:0,overflow:"hidden"},["& .".concat(iP.listboxWrapper)]:{padding:o},"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(r.palette.custom.focusBorder," !important")},"&:focus ::-webkit-scrollbar-track":{boxShadow:i?void 0:"inset -2px -2px 0px #3F8AB3"},"&:focus-visible":{outline:"none"}}})),lP=uy(vE)((e=>{var t,n,r,o,i,a,l,s,c,u,d,p;let{theme:f}=e;return{color:null===(t=f.listBox)||void 0===t||null===(n=t.title)||void 0===n||null===(r=n.main)||void 0===r?void 0:r.color,fontSize:null===(o=f.listBox)||void 0===o||null===(i=o.title)||void 0===i||null===(a=i.main)||void 0===a?void 0:a.fontSize,fontFamily:null===(l=f.listBox)||void 0===l||null===(s=l.title)||void 0===s||null===(c=s.main)||void 0===c?void 0:c.fontFamily,fontWeight:(null===(u=f.listBox)||void 0===u||null===(d=u.title)||void 0===d||null===(p=d.main)||void 0===p?void 0:p.fontWeight)||"bold"}}));const sP=H.memo((function(e){var t,n,r,o,a;let{options:s,layout:c}=e;const{app:u,direction:d,frequencyMode:p,checkboxes:f,search:h=!0,focusSearch:m=!1,rangeSelect:g=!0,model:v,selections:b,update:y,fetchStart:x,selectDisabled:S=(()=>!1),postProcessPages:w,calculatePagesHeight:E,showGray:C=!0,scrollState:k,renderedCallback:R,toolbar:L=!0,isPopover:O=!1}=s,I=ay(),T=U.useCallback((()=>{v.unlock("/qListObjectDef")}),[v]),{translator:P,keyboardNavigation:_,themeApi:N,constraints:M}=U.useContext(Iw);I.listBox=(e=>{const t=(t,n)=>e.getStyle("object.listBox",t,n);return{backgroundColor:t("","backgroundColor"),title:{main:{color:t("title.main","color"),fontSize:t("title.main","fontSize"),fontFamily:t("title.main","fontFamily"),fontWeight:t("title.main","fontWeight")}},content:{color:t("content","color"),fontSize:t("content","fontSize"),fontFamily:t("content","fontFamily")}}})(N);const q=function(e){let{appLayout:t}=e;return!(null==t||!t.qIsDirectQueryMode)}({appLayout:null==u?void 0:u.layout}),z=U.useRef(),[A,D]=_L(),[j,F]=(()=>{const[e,t]=U.useState({}),n=U.useCallback((e=>{t({current:e})}),[t]);return[e,n]})(),[B,$]=U.useState(!1),[W,V]=U.useState(!1),G=U.useRef(!1),[K,Z]=U.useState({down:0,up:0,scrollPosition:""}),X=e=>Z((t=>i(i({},t),e))),[Q,J]=U.useState({start:0,stop:0}),[Y]=jw(u),ee=U.useRef(null),[te]=U.useState((()=>vT())),ne=function(e){let{containerRef:t,enabled:n}=e;const[r,o]=U.useState(!1),i={enabled:n,active:r,innerTabStops:!n||r,blur(e){var r;if(!n)return;o(!1);const i=eP(t.current)||(null===(r=t.current)||void 0===r?void 0:r.parentElement);var a;null==(a=t.current)||a.querySelectorAll('[tabIndex="0"]').forEach((e=>{e.setAttribute("tabIndex",-1)})),YT(t.current),e&&i&&(i.setAttribute("tabIndex",0),i.focus())},focus(){if(!n)return;o(!0);const e=t.current,r=null==e?void 0:e.querySelector(".search input"),i=null==e?void 0:e.querySelector(".value.last-focused"),a=null==e?void 0:e.querySelector(".value.selector, .value"),l=null==e?void 0:e.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),s=r||i||a||l;null==s||s.setAttribute("tabIndex",0),null==s||s.focus()},focusSelection(){const e=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm");null==e||e.setAttribute("tabIndex",0),null==e||e.focus()}};return i}({containerRef:z,enabled:_}),re=U.useCallback((()=>(e=>{var t,n;let{app:r,appSelections:o}=e;return null!==(t=null===(n=r.isInModalSelection)||void 0===n?void 0:n.call(r))&&void 0!==t?t:o.isInModal()})({app:u,appSelections:Y})),[u,Y]),oe=null==c?void 0:c.qListObject.qDimensionInfo.qError,ie=oe&&M.active?"Visualization.Invalid.Dimension":"Visualization.Incomplete",[ae,le]=U.useState(!1),{handleKeyDown:se,handleOnMouseEnter:ce,handleOnMouseLeave:ue,globalKeyDown:de}=U.useMemo((()=>tP({keyboard:ne,hovering:G,updateKeyScroll:X,containerRef:z,currentScrollIndex:Q,app:u,appSelections:Y,constraints:M,isModal:re})),[ne,G,X,z,Q,u,Y,M,re]),pe=L&&(""===(null==c?void 0:c.title)||!1===(null==c?void 0:c.showTitle))&&!O,fe=L&&""!==(null==c?void 0:c.title)&&!1!==(null==c?void 0:c.showTitle)||O;U.useEffect((()=>(document.addEventListener("keydown",de),()=>{document.removeEventListener("keydown",de)})),[de]),U.useEffect((()=>{const e=()=>{$(!0)},t=()=>{$(!1),"toggle"===h&&V(!1)};return O&&(b.isActive()||(b.begin("/qListObjectDef"),b.on("activated",e),b.on("deactivated",t)),$(O)),b&&(b.isModal()||(b.on("activated",e),b.on("deactivated",t)),$(b.isActive())),()=>{b&&b.removeListener&&(b.removeListener("activated",e),b.removeListener("deactivated",t))}}),[b,O]),U.useEffect((()=>{if(j&&j.current&&(h&&m||"toggle"===h&&W)){const e=j.current.querySelector("input");e&&e.focus()}}),[j&&j.current,W,h,m]);const{wildCardSearch:he,searchEnabled:me,layoutOptions:ge={}}=null!=c?c:{},ve=!1!==me&&"toggle"===h,be=!0===(null==c||null===(t=c.qListObject)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.qLocked),ye=be||ve,xe="H"===(null==c||null===(r=c.qListObject)||void 0===r||null===(o=r.qDimensionInfo)||void 0===o?void 0:o.qGrouping),Se=ye||xe,we=(ye?28:0)+(xe?19:0);if(U.useEffect((()=>{if(!ee.current||!D)return;const e=function(e){var t,n,r,o;let{containerRect:i,titleRef:a,iconsWidth:l}=e;const s=i.width<(null!==(t=null==a||null===(n=a.current)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)+l+16+128,c=(null==a||null===(r=a.current)||void 0===r?void 0:r.scrollWidth)>(null==a||null===(o=a.current)||void 0===o?void 0:o.offsetWidth);return!(!s&&!c)}({containerRect:D,titleRef:ee,iconsWidth:we});le(e)}),[ee.current,D]),!v||!c||!P)return null;const Ee="rtl"===d,Ce=FI({layout:c,model:v,translator:P,selectionState:te,isDirectQuery:q}),ke=(!0===h||"toggle"===h&&W)&&!S()&&!1!==me,Re=null!==(a=ge.dense)&&void 0!==a&&a,Le=fe?49+(ke?Re?27:40:0)+(Re?39:49):0,Oe=()=>{V(!W)},Ie=()=>{if("toggle"===h)Oe();else{const e=j.current.querySelector("input");null==e||e.focus()}},Te=e=>function(e){let{isDetached:t,showToolbar:n,containerRef:r,isLocked:o,listboxSelectionToolbarItems:i,selections:a,keyboard:l}=e;return{show:n&&!t,popover:{show:n&&t,anchorEl:r.current},more:{enabled:!o,actions:i,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:n,api:a,onConfirm:()=>{null==l||l.focus()},onCancel:()=>{null==l||l.focus()}}}}({isDetached:!O&&e,showToolbar:B,containerRef:z,isLocked:be,listboxSelectionToolbarItems:Ce,selections:b,keyboard:ne}),Pe=ke&&"toggle"===h,_e=9-(ye?7:0),Ne=Ee?9-(Se?7:0):0,Me="grid"===(null==ge?void 0:ge.dataLayout);let qe;Me&&(qe="row"===ge.layoutOrder?"2px 4px":"2px 6px 2px 4px");const ze=null!=M&&M.active?H.createElement(sT,{title:P.get("Listbox.Search"),size:"large",style:{fontSize:"12px",padding:"7px"}}):H.createElement(uE,{onClick:Oe,tabIndex:-1,title:P.get("Listbox.Search"),size:"large",disableRipple:!0,"data-testid":"search-toggle-btn"},H.createElement(sT,{style:{fontSize:"12px"}})),Ae=S()?H.createElement(zL,{size:"large",style:{fontSize:"12px",padding:"7px"}}):H.createElement(uE,{title:P.get("SelectionToolbar.ClickToUnlock"),tabIndex:-1,onClick:T,size:"large"},H.createElement(zL,{disableRipple:!0,style:{fontSize:"12px"}}));return oe&&(null==R||R()),H.createElement(H.Fragment,null,pe&&H.createElement(lT,l({direction:d},Te(!0))),H.createElement(aP,{className:"listbox-container",container:!0,tabIndex:ne.enabled?-1:void 0,direction:"column",gap:0,containerPadding:qe,style:{height:"100%",minHeight:"".concat(Le,"px"),flexFlow:"column nowrap"},onKeyDown:se,onMouseEnter:ce,onMouseLeave:ue,ref:e=>{z.current=e,A(e)},isGridMode:Me},fe&&H.createElement(pk,{item:!0,container:!0,minHeight:32,flexDirection:Ee?"row-reverse":"row",marginY:1,paddingLeft:"".concat(_e,"px"),paddingRight:"".concat(Ne,"px"),wrap:"nowrap"},Se&&H.createElement(pk,{item:!0,container:!0,alignItems:"center",width:we},be?Ae:ve&&ze,xe&&H.createElement(JT,{tabIndex:-1,title:P.get("Listbox.DrillDown"),size:"large",style:{fontSize:"12px"}})),H.createElement(pk,{item:!0,xs:!0,minWidth:0,justifyContent:Ee?"flex-end":"flex-start",className:iP.listBoxHeader},H.createElement(lP,{variant:"h6",noWrap:!0,ref:ee,title:c.title},c.title)),H.createElement(pk,{item:!0},H.createElement(lT,l({direction:d},Te(ae))))),H.createElement(pk,{item:!0,container:!0,direction:"column",style:{height:"100%",minHeight:"50px"},role:"region","aria-label":P.get("Listbox.ResultFilterLabel")},H.createElement(pk,{item:!0,ref:F},H.createElement("div",{className:iP.screenReaderOnly},P.get("Listbox.Search.ScreenReaderInstructions")),H.createElement(pT,{selections:b,selectionState:te,model:v,dense:Re,keyboard:ne,visible:ke,search:h,autoFocus:Pe,wildCardSearch:he,searchEnabled:me,direction:d,hide:ve&&Oe})),H.createElement(pk,{item:!0,xs:!0,className:iP.listboxWrapper},H.createElement("div",{className:iP.screenReaderOnly},P.get("Listbox.ScreenReaderInstructions")),oe?H.createElement(rP,{text:ie}):H.createElement(QT,null,(e=>{let{height:t,width:n}=e;return H.createElement(qI,{model:v,app:u,constraints:M,layout:c,selections:b,selectionState:te,direction:d,frequencyMode:p,rangeSelect:g,checkboxes:f,height:t,width:n,update:y,fetchStart:x,postProcessPages:w,calculatePagesHeight:E,selectDisabled:S,keyboard:ne,showGray:C,scrollState:k,keyScroll:{state:K,reset:()=>Z({up:0,down:0,scrollPosition:""})},currentScrollIndex:{state:Q,set:J},renderedCallback:R,onCtrlF:Ie,isModal:re})}))))))}));function cP(e){let{options:t={}}=e;const{model:n}=t,[r]=TL(n);return H.createElement(sP,{options:t,layout:r})}const uP={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:"",qShowAlternatives:!0,frequencyEnabled:!1,qFrequencyMode:"N",qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},histogram:!1,frequencyMax:void 0,checkboxes:!1,searchEnabled:!0,showTitle:!0,wildCardSearch:!1,layoutOptions:{dense:!1,dataLayout:"singleColumn",layoutOrder:"row",maxVisibleColumns:{auto:!0,maxColumns:3},maxVisibleRows:{auto:!0,maxRows:3}},title:""};const dP=["__DO_NOT_USE__"],pP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n=s(e,dP),r={update:void 0,fetchStart:void 0,showGray:!0,focusSearch:!1,sessionModel:void 0,selectionsApi:void 0,selectDisabled:void 0,postProcessPages:void 0,calculatePagesHeight:!1},o=i(i(i({},n),r),t);return o};function fP(e){let{app:t,fieldIdentifier:n,qId:r,stateName:o,element:a,options:l,renderedCallback:s}=e;const{isExistingObject:c,hasExternalSelectionsApi:u}=function(e){let{qId:t,options:n}=e;return{isExistingObject:!(!t&&!n.sessionModel),hasExternalSelectionsApi:!!n.selectionsApi}}({qId:r,options:l}),[d,p]=U.useState(0);U.useEffect((()=>{if(d)throw new Error("Source or selection Api can not change after a listbox has been mounted");p(d+1)}),[c,u]);const f=c?function(e){let{app:t,qId:n,options:r={}}=e;const[o,i]=U.useState(),[a]=EL(),{sessionModel:l}=r,s=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],c=Object.keys(r).filter((e=>s.includes(e)));if(c.length)throw new Error('Option "'.concat(c.join(", "),'" is not applicable for existing objects.'));return U.useEffect((()=>{l?i(l):async function(){const e=a.get(n);if(e)i(e);else{const e=await t.getObject(n);a.set(e.id,e),e.once("closed",(()=>{a.clear(e.id)})),i(e)}}()}),[]),o}({app:t,qId:r,options:l}):function(e){var t;let{app:n,fieldIdentifier:r,stateName:o,options:i={}}=e;const[a,l]=U.useState(""),[s,c]=U.useState(!0),[u,d]=U.useState(),[p,f]=U.useState(),h=null!==(t=i.title)&&void 0!==t?t:p;U.useEffect((()=>{const e=i.histogram||"N"!==i.frequencyMode;r.qLibraryId&&e?async function(){try{const e=await n.getDimension(r.qLibraryId),t=await e.getLayout();f(t.qDim.title),"N"===t.qDim.qGrouping?l(t.qDim.qFieldDefs?t.qDim.qFieldDefs[0]:""):l({multiFieldDim:!0}),c(!1)}catch(e){throw c(!1),l({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}():(c(!1),f(r))}),[]);const{dense:m,checkboxes:g,listLayout:v,properties:b={}}=i;let{frequencyMode:y,histogram:x=!1}=i;switch(a&&a.failedToFetchFieldDef&&(x=!1,y="N"),!0){case["none","N","NX_FREQUENCY_NONE"].includes(y):y="N";break;case["value","V","NX_FREQUENCY_VALUE","default"].includes(y):y="V";break;case["percent","P","NX_FREQUENCY_PERCENT"].includes(y):y="P";break;case["relative","R","NX_FREQUENCY_RELATIVE"].includes(y):y="R";break;default:y="N"}const S={dense:m};"horizontal"===v&&(S.dataLayout="grid",S.layoutOrder="column",S.maxVisibleColumns={auto:!0},S.maxVisibleRows={auto:!1,maxRows:1});const w=U.useRef();w.current||(w.current=AT());const E=Ve(!0,{},uP,{qInfo:{qId:w.current},qListObjectDef:{qStateName:o,qFrequencyMode:x&&"N"===y?"V":y},histogram:x,checkboxes:g,layoutOptions:S,title:h});let C;if(Ve(!0,E,b),r.qLibraryId?(E.qListObjectDef.qLibraryId=r.qLibraryId,C=r.qLibraryId):(E.qListObjectDef.qDef.qFieldDefs=[r],C=r),"P"!==y&&x)if(null!=a&&a.multiFieldDim)E.frequencyMax="fetch";else{const e=r.qLibraryId?a:C;E.frequencyMax={qValueExpression:PI(e)}}const[k]=kL(E,s?null:n,C,o);return U.useEffect((()=>{k&&d(k)}),[k]),u}({app:t,fieldIdentifier:n,stateName:o,options:l}),h=U.useRef(a),m=u?l.selectionsApi:gT(t,f,[h,".njs-action-toolbar-more",".njs-action-toolbar-popover"],l)[0],g=U.useMemo((()=>i(i({},l),{},{selections:m,model:f,app:t,renderedCallback:s})),[l,m,f,t]);return m&&f?H.createElement(cP,{options:g}):null}function hP(e){let{element:t,app:n,fieldIdentifier:r,qId:o,stateName:i="$",options:a={},renderedCallback:l}=e;return wp.createPortal(H.createElement(fP,{app:n,element:t,fieldIdentifier:r,qId:o,stateName:i,options:a,renderedCallback:l}),t,AT())}const mP={show:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},gP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=i({},mP);return Ve(!0,t,e),t};function vP(e){let{app:t,fieldIdentifier:n,stateName:r,element:o,options:i={}}=e;const[a,l]=U.useState(!!i.show);return H.createElement(yT,{show:a,app:t,alignTo:{current:o},anchorOrigin:i.anchorOrigin,transformOrigin:i.transformOrigin,close:()=>{l(!1),i.onPopoverClose&&i.onPopoverClose()},fieldName:n,stateName:r,autoFocus:i.autoFocus})}function bP(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function yP(e,t){let n=0;for(let r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}function xP(e){let{dc:t,def:n,properties:r}=e;t.qDimensions=t.qDimensions||[],t.qMeasures=t.qMeasures||[],t.qInterColumnSortOrder=t.qInterColumnSortOrder||[],t.qInitialDataFetch=t.qInitialDataFetch||[],t.qColumnOrder=t.qColumnOrder||[],t.qExpansionState=t.qExpansionState||[];const o=r,a={dimensions:()=>t.qDimensions,measures:()=>t.qMeasures,addDimension(e){const r="string"==typeof e?(e=>({qDef:{qFieldDefs:[e]}}))(e):i(i({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||AT(),r.qDef.qSortCriterias=r.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],r.qOtherTotalSpec=r.qOtherTotalSpec||{},r.qAttributeExpressions=r.qAttributeExpressions||[],r.qAttributeDimensions=r.qAttributeDimensions||[],t.qDimensions.length<a.maxDimensions()?(t.qDimensions.push(r),bP(t.qInterColumnSortOrder,t.qDimensions.length-1),n.dimensions.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qDimensions.push(r)),r},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];return yP(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e),r},addMeasure(e){const r="string"==typeof e?(e=>({qDef:{qDef:e}}))(e):i(i({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||AT(),r.qSortBy=r.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},r.qAttributeDimensions=r.qAttributeDimensions||[],r.qAttributeExpressions=r.qAttributeExpressions||[],t.qMeasures.length<a.maxMeasures()?(t.qMeasures.push(r),bP(t.qInterColumnSortOrder,t.qDimensions.length+t.qMeasures.length-1),n.measures.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qMeasures.push(r))},removeMeasure(e){const r=t.qMeasures.splice(e,1)[0];yP(t.qInterColumnSortOrder,t.qDimensions.length+e),n.measures.removed(r,o,e)},maxDimensions:()=>n.dimensions.max(t.qMeasures.length),maxMeasures:()=>n.measures.max(t.qDimensions.length),canAddDimension:()=>t.qDimensions.length<a.maxDimensions(),canAddMeasure:()=>t.qMeasures.length<a.maxMeasures()};return a}function SP(e){let{dc:t,def:n,properties:r}=e;t.qInitialDataFetch=t.qInitialDataFetch||[];const o=r,a={dimensions:()=>t.qLibraryId||t.qDef&&t.qDef.qFieldDefs&&0!==t.qDef.qFieldDefs.length?[t]:[],measures:()=>[],addDimension(e){const r="string"==typeof e?(e=>({qDef:{qFieldDefs:[e]}}))(e):i(i({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||AT(),r.qDef.qSortCriterias=t.qDef.qSortCriterias||[{qSortByState:1,qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Object.keys(r).forEach((e=>{t[e]=r[e]})),n.dimensions.added(r,o),r},removeDimension(e){const r=t;return delete t.qDef,delete t.qLibraryId,n.dimensions.removed(r,o,e),r},addMeasure(){},removeMeasure(){},maxDimensions:()=>1,maxMeasures:()=>0,canAddDimension:()=>0===a.dimensions().length,canAddMeasure:()=>!1};return a}const wP=e=>({qDef:{qFieldDefs:[e]}});function EP(e){let{children:t,halo:n}=e;const r={async addDimension(e){const r=(e=>{let t;return t="string"==typeof e?Ve(!0,{},uP,{qListObjectDef:wP(e)}):e.qListObjectDef?Ve(!0,{},uP,e):Ve(!0,{},uP,{qListObjectDef:e}),t})(e),o=r.qListObjectDef;if(o.qDef.cId=o.qDef.cId||AT(),!r.title)if(o.qLibraryId){const e=await n.app.getDimension(o.qLibraryId),t=await e.getProperties();t.qDim.qLabelExpression?r.title={qStringExpression:{qExpr:t.qDim.qLabelExpression}}:r.title=t.qDim.title}else{var i,a;r.title=o.qDef.title||(null===(i=o.qDef.qFieldLabels)||void 0===i?void 0:i[0])||(null===(a=o.qDef.qFieldDefs)||void 0===a?void 0:a[0])}t.push({qProperty:r,qChildren:[]})},addMeasure(){}};return r}function CP(e){return"string"==typeof e&&"="===e[0]||"object"==typeof e&&e.qDef&&e.qDef.qDef||"object"==typeof e&&e.qLibraryId&&"measure"===e.type?"measure":"dimension"}async function kP(e,t){let{sn:n,properties:r,fields:o,children:i}=e;if(!o.length)return;const a=n.qae.data.targets[0];if(!a)return;const{propertyPath:l}=a,s=l.split("/");let c=r;for(let e=0;e<s.length;e++){const t=s[e];c=t?c[t]:c}const u=function(e){return e.match("/qListObjectDef")?SP:e.match("/qChildListDef")?EP:xP}(l),d=u({dc:c,def:a,properties:r,children:i,halo:t});for(let e=0;e<o.length;++e){const t=o[e];"measure"===CP(t)?await d.addMeasure(t):await d.addDimension(t)}}var RP=(e,t,n)=>{if(null==e||null==t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(""!==t){if(void 0===o[t]||null===o[t])return n;o=o[t]}}return o},LP=(e,t,n)=>{if(null==e||null==t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n&&"__proto__"!==o&&"constructor"!==o?i[o]=n:delete i[o]},OP=e=>0===Object.keys(e).length&&e.constructor===Object;var IP={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;let n=e.indexOf(t[0]);if(-1!==n){for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){let n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r}};const TP=2**53-1;function PP(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function _P(e,t){const n=Ve(!0,{},t,e);return RP(n,"qOtherTotalSpec.qOtherCounted")||LP(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),RP(n,"qOtherTotalSpec.qOtherLimit")||LP(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function NP(e,t){return Ve(!0,{},t,e)}function MP(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var qP={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===RP(e,t)&&LP(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:PP,importCommonProperties:function(e,t,n){const r="masterobject"===RP(t,"properties.qInfo.qType")?"masterobject":RP(n,"qInfo.qType");LP(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},createDefaultDimension:_P,createDefaultMeasure:NP,resolveValue:MP,getHypercubePath:function(e){const t=RP(e,"data.targets.0.propertyPath","").split("/");return t.length&&"qHyperCubeDef"===t[t.length-1]&&(t.length-=1),t.join(".")},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},setInterColumnSortOrder:function(e){let{exportFormat:t,newHyperCubeDef:n}=e;const r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();let i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(IP.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,IP.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){let{exportFormat:t,initialProperties:n,hypercubePath:r}=e,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((e=>{"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=Ve(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?LP(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||PP(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=Ve(!0,{},n,o),null===o.components&&(o.components=[]),o},getMaxMinDimensionMeasure:function(e){let{exportFormat:t,dataDefinition:n={}}=e;const r=t.data[0],o=n.dimensions||{max:0},i=n.measures||{max:0},a=MP(i.max,r.dimensions.length,TP),l=MP(i.min,r.dimensions.length,0);return{maxDimensions:MP(o.max,a,TP),minDimensions:MP(o.min,l,0),maxMeasures:a,minMeasures:l}},shouldInitLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i}=e;const a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i,newHyperCubeDef:a}=e;const l=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(l.dimensions.length>n&&n>0||l.excludedDimensions&&l.excludedDimensions.length&&l.dimensions.length+l.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(l.measures.length>o&&o>0||l.excludedMeasures&&l.excludedMeasures.length&&l.measures.length+l.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&l.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&l.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},addDefaultDimensions:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,newHyperCubeDef:o,defaultDimension:i}=e;const a=t.data[0];let l;if(n>0)for(l=0;l<a.dimensions.length;++l)o.qDimensions.length<n?o.qDimensions.push(_P(a.dimensions[l],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(_P(a.dimensions[l],i));else if(a.dimensions.length)for(l=0;l<a.dimensions.length;++l)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(_P(a.dimensions[l],i));if(a.excludedDimensions.length)for(l=0;l<a.excludedDimensions.length;++l)o.qDimensions.length<r?o.qDimensions.push(_P(a.excludedDimensions[l],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(_P(a.excludedDimensions[l],i))},addDefaultMeasures:function(e){let{exportFormat:t,maxMeasures:n,minMeasures:r,newHyperCubeDef:o,defaultMeasure:i}=e;const a=t.data[0];let l;if(n>0)for(l=0;l<a.measures.length;++l)o.qMeasures.length<n?o.qMeasures.push(NP(a.measures[l],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(NP(a.measures[l],i));else if(a.measures.length)for(l=0;l<a.measures.length;++l)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(NP(a.measures[l],i));if(a.excludedMeasures.length)for(l=0;l<a.excludedMeasures.length;++l)o.qMeasures.length<r?o.qMeasures.push(NP(a.excludedMeasures[l],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(NP(a.excludedMeasures[l],i))},updateDimensionsOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.dimensions&&"function"==typeof n.dimensions.added){const e=RP(t,r||"").qHyperCubeDef,o=[...e.qDimensions];e.qDimensions=[],o.forEach((r=>{e.qDimensions.push(r),n.dimensions.added(r,t)}))}},updateMeasuresOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.measures&&"function"==typeof n.measures.added){const e=RP(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var zP={exportProperties:e=>function(e){let{propertyTree:t,hypercubePath:n}=e;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),o=t.qProperty,i=RP(o,n||""),a=i.qHyperCubeDef,l=r.data[0];if(a.qInterColumnSortOrder||(a.qInterColumnSortOrder=[]),l.dimensions.push(...a.qDimensions),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qDimensions&&l.excludedDimensions.push(...a.qLayoutExclude.qHyperCubeDef.qDimensions),l.measures.push(...a.qMeasures),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qMeasures&&l.excludedMeasures.push(...a.qLayoutExclude.qHyperCubeDef.qMeasures),l.interColumnSortOrder=a.qInterColumnSortOrder.concat(),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();IP.isOrderedSubset(e,l.interColumnSortOrder)&&(l.interColumnSortOrder=e)}return delete a.qLayoutExclude,Object.keys(o).forEach((e=>{r.properties[e]=o[e]})),n&&(r.properties.qHyperCubeDef=i.qHyperCubeDef,delete i.qHyperCubeDef),o.qLayoutExclude||(o.qLayoutExclude={}),o.qLayoutExclude.disabled&&(Object.keys(o.qLayoutExclude.disabled).forEach((e=>{r.properties.hasOwnProperty(e)||(r.properties[e]=o.qLayoutExclude.disabled[e])})),delete o.qLayoutExclude.disabled),o.qLayoutExclude.changed&&(qP.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!OP(o.qLayoutExclude.quarantine)||delete o.qLayoutExclude,r}(e),importProperties:e=>function(e){let{exportFormat:t,initialProperties:n={},dataDefinition:r={},defaultPropertyValues:o={},hypercubePath:i}=e;const a={qChildren:[]},l=qP.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),s=RP(n,i||"").qHyperCubeDef,c=RP(l,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f}=qP.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:h=qP.getDefaultDimension(),defaultMeasure:m=qP.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,qP.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f})&&qP.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f,newHyperCubeDef:c}),qP.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:d,newHyperCubeDef:c,defaultDimension:h}),qP.addDefaultMeasures({exportFormat:t,maxMeasures:p,minMeasures:f,newHyperCubeDef:c,defaultMeasure:m}),qP.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),qP.copyPropertyIfExist("qMaxStackedCells",s,c),qP.copyPropertyIfExist("qNoOfLeftDims",s,c),qP.copyPropertyOrSetDefault("qInitialDataFetch",s,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),qP.copyPropertyOrSetDefault("qMode",s,c,"S"),qP.copyPropertyOrSetDefault("qReductionMode",s,c,"N"),qP.copyPropertyOrSetDefault("qSortbyYValue",s,c),qP.copyPropertyOrSetDefault("qIndentMode",s,c),qP.copyPropertyOrSetDefault("qShowTotalsAbove",s,c),qP.importCommonProperties(l,t,n),qP.updateDimensionsOnAdded({newProperties:l,dataDefinition:r,hypercubePath:i}),qP.updateMeasuresOnAdded({newProperties:l,dataDefinition:r,hypercubePath:i}),a.qProperty=l,a}(e)};const AP=e=>RP(e,"data.targets.0.propertyPath"),DP=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return zP.exportProperties})(AP(e))},jP=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return zP.importProperties})(AP(e))},FP=async e=>{let{halo:t,model:n,cellRef:r,newType:o}=e;const a=await n.getFullPropertyTree(),l=r.current.getQae(),s=DP(l),c=await(async e=>{let{halo:t,name:n,version:r}=e;const{types:o}=t;return await o.get({name:n,version:r}).supernova()})({halo:t,name:o}),u=c.qae;return jP(u)({exportFormat:s({propertyTree:a,hypercubePath:qP.getHypercubePath(l)}),initialProperties:i({qInfo:{qType:o},visualization:o},RP(u,"properties.initial",{})),dataDefinition:RP(u,"data.targets.0.",{}),hypercubePath:qP.getHypercubePath(u)})},BP={hypercube:zP};var $P=e=>ML((e=>i(i({},e),{},{shapes:[{type:"path",attrs:{d:"M8.86225926,1.6 L15.7815749,13.5 C16.2829746,14.3 15.8818548,15 14.9793354,15 L1.04042422,15 C0.0853772072,15 -0.232971797,14.3650794 0.172002787,13.6135407 L7.05722041,1.6 C7.55862009,0.8 8.36085958,0.8 8.86225926,1.6 Z M7.962,2.007 C7.95987183,2.02476599 7.95607967,2.03712023 7.94920396,2.05249845 L1.1033193,14 L14.915544,14 L7.99777452,2.10265906 L7.97779697,2.06138411 L7.96394459,2.01964415 L7.962,2.007 Z M7.5,11 L8.5,11 C8.76666667,11 8.95432099,11.1580247 8.99272977,11.4038409 L9,11.5 L9,12.5 C9,12.7666667 8.84197531,12.954321 8.59615912,12.9927298 L8.5,13 L7.5,13 C7.23333333,13 7.04567901,12.8419753 7.00727023,12.5961591 L7,12.5 L7,11.5 C7,11.2333333 7.15802469,11.045679 7.40384088,11.0072702 L7.5,11 L8.5,11 L7.5,11 Z M7.5,5 L8.5,5 C8.76666667,5 8.95432099,5.15802469 8.99272977,5.40384088 L9,5.5 L9,9.5 C9,9.76666667 8.84197531,9.95432099 8.59615912,9.99272977 L8.5,10 L7.5,10 C7.23333333,10 7.04567901,9.84197531 7.00727023,9.59615912 L7,9.5 L7,5.5 C7,5.23333333 7.15802469,5.04567901 7.40384088,5.00727023 L7.5,5 L8.5,5 L7.5,5 Z"}}]}))(e));function WP(e){let{d:t}=e;const n=ay();let r="inherit",o=n.palette.success.main;t.missing?o=n.palette.warning.main:t.error&&(r="error",o=n.palette.error.main);const i={color:o},a=H.createElement(vE,{style:{lineHeight:"30px",paddingRight:n.spacing(1)}},H.createElement(Ek,null,t.missing||t.error?H.createElement($P,{style:i}):H.createElement(JL,{style:i})));return H.createElement(pk,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},H.createElement(pk,{item:!0},a),H.createElement(pk,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},H.createElement(vE,{noWrap:!0,component:"p"},H.createElement(vE,{component:"span",variant:"subtitle2",color:r},t.description),H.createElement(vE,{component:"span"}," "),H.createElement(vE,{component:"span",variant:"subtitle2",color:t.error?"error":"inherit",style:{fontWeight:400}},t.label))))}function UP(e){let{data:t}=e;const n=ay();return H.createElement(pk,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},t.map(((e,t)=>{const r=e.descriptions.map(((e,t)=>H.createElement(WP,{d:e,key:t})));return r.length>0&&H.createElement(pk,{container:!0,item:!0,key:t,direction:"column",style:{paddingBottom:n.spacing(2)}},H.createElement(vE,{noWrap:!0,key:t,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),r)})))}function HP(e){let{title:t="Error",message:n="",data:r=[]}=e;return H.createElement(pk,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},H.createElement(pk,{item:!0},H.createElement($P,{style:{fontSize:"38px"}})),H.createElement(pk,{item:!0},H.createElement(vE,{variant:"h6",align:"center","data-tid":"error-title"},t)),H.createElement(pk,{item:!0},H.createElement(vE,{variant:"subtitle1",align:"center","data-tid":"error-message"},n)),H.createElement(UP,{data:r}))}const VP=["size"],GP="Progress",KP={root:"".concat(GP,"-root"),front:"".concat(GP,"-front"),back:"".concat(GP,"-back")},ZP=uy("div")((e=>{let{theme:t}=e;return{["&.".concat(KP.root)]:{position:"relative",display:"inline-block"},["& .".concat(KP.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(KP.back)]:{color:t.palette.divider}}})),XP={small:16,medium:32,large:64,xlarge:128};function QP(e){let{size:t="medium"}=e,n=s(e,VP);const r=XP[t];return H.createElement(ZP,{className:KP.root},H.createElement(zC,l({variant:"determinate",value:100,className:KP.back,size:r,thickness:3},n)),H.createElement(zC,l({variant:"indeterminate",disableShrink:!0,className:KP.front,size:r,thickness:3},n)))}const JP=["cancel","translator"],YP=["retry","translator"],e_={stripes:"".concat("LongRunningQuery","-stripes")},t_=uy(pk)((()=>({["& .".concat(e_.stripes)]:{"&::before":{position:"absolute",height:"100%",width:"100%",top:0,left:0,content:'""',backgroundSize:"14.14px 14.14px",backgroundImage:"linear-gradient(135deg, currentColor 10%, rgba(0,0,0,0) 10%, rgba(0,0,0,0) 50%, currentColor 50%, currentColor 59%, rgba(0,0,0,0) 60%, rgba(0,0,0,0) 103%)",opacity:.1}}})));function n_(e){let{cancel:t,translator:n}=e,r=s(e,JP);return H.createElement(H.Fragment,null,H.createElement(t_,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},H.createElement(pk,{item:!0},H.createElement(QP,null)),H.createElement(pk,{item:!0},H.createElement(vE,{variant:"h6",align:"center","data-tid":"update-active"},n.get("Object.Update.Active")))),H.createElement(pk,l({item:!0},r),H.createElement(gw,{variant:"contained",onClick:t},n.get("Cancel"))))}function r_(e){let{retry:t,translator:n}=e,r=s(e,YP);return H.createElement(H.Fragment,null,H.createElement(pk,{item:!0},H.createElement($P,{style:{fontSize:"38px"}})),H.createElement(pk,{item:!0},H.createElement(vE,{variant:"h6",align:"center","data-tid":"update-cancelled"},n.get("Object.Update.Cancelled"))),H.createElement(pk,{item:!0},H.createElement(gw,l({variant:"contained",onClick:t},r),n.get("Retry"))))}function o_(e){let{canCancel:t,canRetry:n,api:r}=e;const{translator:o}=U.useContext(Iw);return H.createElement(pk,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:e_.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t&&H.createElement(n_,{cancel:r.cancel,translator:o,className:e_.cancel}),n&&H.createElement(r_,{retry:r.retry,translator:o,className:e_.retry}))}function i_(){return H.createElement(pk,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},H.createElement(QP,{size:"large"}))}const a_="Header",l_={containerStyle:"".concat(a_,"-containerStyle"),containerTitleStyle:"".concat(a_,"-containerTitleStyle")},s_=uy(pk)((e=>{let{theme:t}=e;return{["&.".concat(l_.containerStyle)]:{flexGrow:0},["&.".concat(l_.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),c_="njs-cell-title",u_="njs-cell-sub-title";function d_(e){let{layout:t,sn:n,anchorEl:r,hovering:o,focusHandler:i,titleStyles:a={}}=e;const l=t.showTitles&&!!t.title,s=t.showTitles&&!!t.subtitle,c=t.qSelectionInfo&&t.qSelectionInfo.qInSelections,[u,d]=U.useState([]),[p,f]=_L(),[h,m]=U.useState(!1);U.useEffect((()=>{n&&n.component&&n.component.isHooked&&n.component.observeActions((e=>{d([...e,...n&&n.selectionToolbar&&n.selectionToolbar.items||[]])}))}),[n]),U.useEffect((()=>{if(!f)return;const{width:e}=f;m(e<221)}),[f]);const g=l||s,v=[l_.containerStyle,...g?[l_.containerTitleStyle]:[]],b=(o||c)&&(h||!g),y=g&&!b&&!h,x=H.createElement(lT,{show:y,selections:{show:c,api:n.component.selections,onKeyDeactivate:i.refocusContent},actions:u,popover:{show:b,anchorEl:r},focusHandler:i});return H.createElement(s_,{ref:p,item:!0,container:!0,wrap:"nowrap",className:v.join(" ")},H.createElement(pk,{item:!0,zeroMinWidth:!0,xs:!0},H.createElement(pk,{container:!0,wrap:"nowrap",direction:"column"},l&&H.createElement(vE,{variant:"h6",noWrap:!0,className:c_,style:a.main},t.title),s&&H.createElement(vE,{variant:"body2",noWrap:!0,className:u_,style:a.subTitle},t.subtitle))),H.createElement(pk,{item:!0},x))}const p_={itemStyle:"".concat("Footer","-itemStyle")},f_=uy(pk)((e=>{let{theme:t}=e;return{["& .".concat(p_.itemStyle)]:{minWidth:0,paddingTop:t.spacing(1)}}})),h_="njs-cell-footer";function m_(e){let{layout:t,titleStyles:n={}}=e;return t&&t.showTitles&&t.footnote?H.createElement(f_,{container:!0},H.createElement(pk,{item:!0,className:p_.itemStyle},H.createElement(vE,{noWrap:!0,variant:"body2",className:h_,style:n.footer},t.footnote))):null}class g_{constructor(){this.timer=null,this.next=null,this.running=!1}start(){this.running||(this.running=!0,this.scheduleNext())}scheduleNext(){this.timer=setTimeout((()=>{this.doNext()}),10)}async doNext(){const e=this.next;this.next=null,e?(await e(),this.scheduleNext()):this.stop()}schedule(e){this.next=e,this.start()}stop(){this.running&&(clearTimeout(this.timer),this.timer=null,this.running=!1)}}const v_="njs-viz";function b_(e){let{sn:t,snOptions:n,snPlugins:r,layout:o,appLayout:a,halo:l}=e;const{component:s}=t,{theme:c,language:u,constraints:d,interactions:p,keyboardNavigation:f}=U.useContext(Iw),[h]=U.useState((()=>new g_)),[m,g]=U.useState(!1),[v,b]=U.useState(0),[y,x,S]=_L(),[w,E]=U.useState(null),C=U.useCallback((e=>{e&&E(e)}),[]);return U.useEffect((()=>{if(w)return s.created({options:n}),s.mounted(w),g(!0),()=>{h.stop(),s.willUnmount()}}),[w,s]),U.useEffect((()=>{m&&w&&x&&(!s.isHooked&&o&&o.qSelectionInfo&&o.qSelectionInfo.qInSelections||h.schedule((()=>{const e=[];return d.passive||e.push("passive"),d.active||e.push("interact"),d.select||e.push("select"),d.edit||e.push("edit"),l.app&&l.app.session&&e.push("fetch"),Promise.resolve(s.render({layout:o,options:n,plugins:r,embed:l.public.nebbie,context:i({constraints:d,interactions:p,theme:l.public.theme,appLayout:a,keyboardNavigation:f},s.isHooked?{}:{logicalSize:t.logicalSize({layout:o}),localeInfo:(a||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===v&&"function"==typeof n.onInitialRender&&n.onInitialRender.call(null),b(v+1))}))})))}),[x,n,r,w,S,o,a,c,u,d,p,m,f]),H.createElement("div",{ref:y,"data-render-count":v,style:{position:"relative",height:"100%"},className:v_},H.createElement("div",{ref:C,style:{position:"absolute",width:"100%",height:"100%"}}))}const y_={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},x_={"top-left":"top left","top-center":"top center","top-right":"top right","center-left":"center left","center-center":"center center","center-right":"center right","bottom-left":"bottom left","bottom-center":"bottom center","bottom-right":"bottom right"};function S_(e,t){return t?function(e){var t;let n,r,o,i;return null!=e&&null!==(t=e.session)&&void 0!==t&&t.config?(n=e.session.config,r=new URL(n.url),i="wss:"===r.protocol,o=i?"https://":"http://",o+r.host):""}(e)+t:void 0}function w_(e,t){const n=null==e?void 0:e.bgImage;if(n){let i="";var r,o;if("media"===n.mode||"media"===e.useImage)i=null!=n&&null!==(r=n.mediaUrl)&&void 0!==r&&null!==(o=r.qStaticContentUrl)&&void 0!==o&&o.qUrl?decodeURIComponent(n.mediaUrl.qStaticContentUrl.qUrl):void 0,i=S_(t,i);"expression"===n.mode&&(i=n.expressionUrl?decodeURIComponent(n.expressionUrl):void 0);const a=function(e){var t;let n="center center";return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.position&&(n=x_[e.bgImage.position]),n}(e),l=function(e){var t;let n=y_.originalSize;return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.sizing&&(n=y_[e.bgImage.sizing]),n}(e);return i?{url:i,pos:a,size:l}:void 0}}function E_(e,t,n){const r=null==e?void 0:e.bgColor;return r&&t?r.useExpression?t.validateColor(r.colorExpression):r.color&&"none"!==r.color.color?t.getColorPickerColor(r.color,!0):void 0:t&&n?t.getStyle("object.".concat(n),"","backgroundColor"):t?t.getStyle("","","backgroundColor"):void 0}function C_(e,t,n,r){var o;const i=(null==e||null===(o=e.title)||void 0===o?void 0:o[t])||{},a=function(e,t){return e&&Array.isArray(e)?e:"main"===t?["bold"]:[]}(i.fontStyle,t);return{fontFamily:i.fontFamily||n.getStyle("object.".concat(r),"title.".concat(t),"fontFamily"),color:i.color&&"none"!==i.color.color?n.getColorPickerColor(i.color,!0):n.getStyle("object.".concat(r),t,"color"),fontWeight:a.includes("bold")?"bold":"normal",fontStyle:a.includes("italic")?"italic":"normal",textDecoration:a.includes("underline")?"underline":"initial"}}const k_="njs-cell",R_=(e,t)=>{switch(t.type){case"LOADING":return i(i({},e),{},{loading:!0});case"LOADED":return i(i({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return i(i({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return i(i({},e),{},{longRunningQuery:!0});case"ERROR":return i(i({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function L_(e){let{delay:t=750}=e;const[n,r]=U.useState(!1);return U.useEffect((()=>{const e=setTimeout((()=>r(!0)),t);return()=>clearTimeout(e)}),[]),n?H.createElement(i_,null):null}const O_=e=>!e.qError||7005===e.qError.qErrorCode,I_=(e,t,n,r,o)=>[...Array(e).keys()].map((e=>{const i=!(!t||!t[e]),a=i&&t[e].qError&&7005===t[e].qError.qErrorCode,l=i&&!a&&t[e].qError,s=a&&t[e].qCalcCondMsg,c="".concat(l?r:a?s||o:i&&t[e].qFallbackTitle||""),u=n(e);return{description:u?"".concat(u).concat(c.length?":":""):null,label:c,missing:t&&!i&&!l&&e>=t.length||a,error:l}})),T_=e=>e&&(Array.isArray(e)?e:[e])||[],P_=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t);return{reqDimErrors:I_(o,T_(a.qDimensionInfo||a.qItems),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),reqMeasErrors:I_(i,T_(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"))}},__=async(e,t,n,r)=>{let{targets:o}=n;const{hasUnfulfilledErrors:i,aggMinD:a,aggMinM:l,hasLayoutErrors:s,layoutErrors:c}=((e,t,n)=>{let r=!1,o=0,i=0,a=!1,l=!1;const s=[];for(let c=0;c<t.length;++c){const u=t[c],d=u.dimensions.min(),p=u.measures.min(),f=u.resolveLayout(n),h=T_(f.qDimensionInfo||f.qItems).filter(O_),m=T_(f.qMeasureInfo).filter(O_);if(o+=d,i+=p,(h.length<d||m.length<p)&&(r=!0),f.qError){a=!0,l=7005===f.qError.qErrorCode;const t=l&&f.qCalcCondMsg?f.qCalcCondMsg:l?e.get("Visualization.UnfulfilledCalculationCondition"):e.get("Visualization.LayoutError");s.push({title:t,descriptions:[]})}}return{hasUnfulfilledErrors:r,aggMinD:o,aggMinM:i,hasLayoutErrors:a,layoutErrors:s}})(e,o,t),u=[],d=[];let p=null;for(let n=0;n<o.length;++n){const a=o[n];if(!s&&i){const n=p||await r.getProperties();p=n;const o=P_(e,t,n,a);u.push(...o.reqDimErrors),d.push(...o.reqMeasErrors)}}const f=u.filter((e=>!(e.missing||e.error))).length,h=e.get("Visualization.Incomplete.Dimensions",[f,a]),m=d.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,l]),v=[{title:h,descriptions:[...u]},{title:g,descriptions:[...d]}],b=s?c:v;return[s||i,{title:s?c[0].title:e.get("Visualization.Incomplete"),data:b}]},N_=U.forwardRef(((e,t)=>{let{halo:n,model:r,initialSnOptions:o,initialSnPlugins:a,initialError:l,onMount:s,currentId:c,emitter:u}=e;const{app:d,types:p}=n,{nebbie:f}=n.public,{theme:h,translator:m,language:g,keyboardNavigation:v,disableCellPadding:b=!1}=U.useContext(Iw),y=ay(),[x,S,w]=_L(),[E,C]=U.useReducer(R_,{loading:!1,loaded:!1,longRunningQuery:!1,error:(k=l)?{title:k.message}:null,sn:null,visualization:null});var k;const[R,{validating:L,canCancel:O,canRetry:I},T]=TL(r),[P]=PL(d),[_,N,M]=_L(),[q,z]=U.useState(o),[A,D]=U.useState(a),j="njs-cell-".concat(c),[F]=gT(d,r,["#".concat(j),".njs-action-toolbar-popover"]),[B,$]=U.useState(!1),W=U.useRef({enter:null,leave:null}),[V,G]=U.useState(void 0),[K,Z]=U.useState(void 0),[X,Q]=U.useState(void 0),J=U.useRef({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});U.useEffect((()=>{fT(J.current)}),[]),U.useEffect((()=>{if(R&&n.public.theme){const e=R.components?R.components.find((e=>"general"===e.key)):null;Q({main:C_(e,"main",n.public.theme,R.visualization),footer:C_(e,"footer",n.public.theme,R.visualization),subTitle:C_(e,"subTitle",n.public.theme,R.visualization)}),G(E_(e,n.public.theme,R.visualization)),Z(w_(e,n.app))}}),[R,n.public.theme,n.app,h]),J.current.blurCallback=e=>{n.root.toggleFocusOfCells(),e&&M&&M.focus()},J.current.refocusContent=()=>{E.sn.component&&"function"==typeof E.sn.component.focus&&E.sn.component.focus()};U.useEffect((()=>{if(l||!P||!R)return;if(E.visualization===R.visualization&&E.sn)return void(async e=>{const[t,n]=await __(m,R,e.generator.qae.data,r);C(t?{type:"ERROR",error:n}:{type:"RENDER"}),(e=>{let{sn:t,layout:n,model:r}=e;const o=t&&t.component&&t.component.selections;if(o&&o.id&&r.id&&o.id===r.id){if(n&&n.qSelectionInfo&&n.qSelectionInfo.qInSelections&&!o.isModal()){const{targets:e}=t.generator.qae.data,n=e[0].propertyPath;o.goModal(n)}n.qSelectionInfo&&n.qSelectionInfo.qInSelections||o.isModal()&&o.noModal()}})({sn:E.sn,layout:R,model:r})})(E.sn);const e=p.getSupportedVersion(R.visualization,R.version);return(async(e,t)=>{C({type:"LOADING"});const n=await(async e=>{let{dispatch:t,types:n,visualization:r,version:o,model:i,app:a,selections:l,nebbie:s,focusHandler:c,emitter:u}=e;try{const e=await(async e=>{let{types:t,name:n,version:r}=e;return await t.get({name:n,version:r}).supernova()})({types:n,name:r,version:o});return e.create({model:i,app:a,selections:l,nebbie:s,focusHandler:c,emitter:u})}catch(e){t(o?{type:"ERROR",error:{title:e.message}}:{type:"ERROR",error:{title:"Could not find a version of '".concat(r,"' that supports current object version. Did you forget to register ").concat(r,"?")}})}})({dispatch:C,types:p,visualization:e,version:t,model:r,app:d,selections:F,nebbie:f,focusHandler:J.current,emitter:u});n&&(C({type:"LOADED",sn:n,visualization:e}),s())})(R.visualization,e),()=>{}}),[p,E.sn,r,F,R,P,g]),U.useEffect((()=>{if(!L)return;const e=setTimeout((()=>C({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[L]),U.useImperativeHandle(t,(()=>({getQae:()=>E.sn.generator.qae,toggleFocus(e){"function"==typeof E.sn.component.focus&&(e?E.sn.component.focus():E.sn.component.blur())},setSnOptions:z,setSnPlugins:D,async takeSnapshot(){const{width:e,height:t}=S;let n=JSON.parse(JSON.stringify(R));return"function"==typeof E.sn.component.setSnapshotData&&(n=await E.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:m.language(),theme:y.name,appLayout:P,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof n.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return n.config.snapshot.capture(e)}})),[E.sn,N,S,R,y.name,P]);let Y=null;return E.loading&&!E.longRunningQuery?Y=H.createElement(L_,null):E.error?Y=H.createElement(HP,E.error):E.loaded&&(Y=H.createElement(b_,{key:R.visualization,sn:E.sn,halo:n,snOptions:q,snPlugins:A,layout:R,appLayout:P})),H.createElement(oE,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:V||"unset",backgroundImage:K&&K.url?"url(".concat(K.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:K&&K.size,backgroundPosition:K&&K.pos},elevation:0,square:!0,className:k_,ref:x,id:j,onMouseEnter:()=>{W.current.leave&&clearTimeout(W.current.leave),W.enter||(W.current.enter=setTimeout((()=>{$(!0),W.current.enter=null}),250))},onMouseLeave:()=>{W.current.enter&&clearTimeout(W.current.enter),W.current.leave||(W.current.leave=setTimeout((()=>{$(!1),W.current.leave=null}),750))}},H.createElement(pk,{container:!0,direction:"column",gap:0,style:i(i({position:"relative",width:"100%",height:"100%"},b?{}:{padding:y.spacing(1)}),E.longRunningQuery?{opacity:"0.3"}:{})},w&&R&&E.sn&&H.createElement(d_,{layout:R,sn:E.sn,anchorEl:w,hovering:B,focusHandler:J.current,titleStyles:X}," "),H.createElement(pk,{tabIndex:v?0:-1,onKeyDown:v?e=>{["Enter"," ","Spacebar"].includes(e.key)&&n.root.toggleFocusOfCells(c)}:null,item:!0,xs:!0,style:{height:"100%"},ref:_},Y),w&&R&&E.sn&&H.createElement(m_,{layout:R,titleStyles:X})),E.longRunningQuery&&H.createElement(o_,{canCancel:O,canRetry:I,api:T}))}));function M_(e){let{halo:t,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,emitter:l,initialError:s}=e;const{root:c}=t,u=H.createRef(),d=AT(),p=wp.createPortal(H.createElement(N_,{ref:u,halo:t,model:r,currentId:d,initialSnOptions:o,initialSnPlugins:i,initialError:s,onMount:a,emitter:l}),n,d),f=()=>{c.remove(p),r.removeListener("closed",f)};return r.on("closed",f),c.add(p),c.addCell(d,u),[f,u]}function q_(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function z_(e,t){return q_(e)&&q_(t)?JSON.stringify(e)===JSON.stringify(t):!Array.isArray(e)&&!Array.isArray(t)&&e===t}function A_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=[];return Object.keys(t).forEach((o=>{const i=t[o];"object"!=typeof n[o]||"object"!=typeof i||Array.isArray(i)?z_(i,n[o])||r.push({qPath:e+o,qOp:"add",qValue:JSON.stringify(t[o])}):r.push(...A_("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function D_(e){if(!Array.isArray(e))throw new Error("Invalid plugin format: plugins should be an array!");e.forEach((e=>{if("object"!=typeof e)throw new Error("Invalid plugin format: a plugin should be an object");if("object"!=typeof e.info||"string"!=typeof e.info.name)throw new Error("Invalid plugin format: a plugin should have an info object containing a name");if("function"!=typeof e.fn)throw new Error('Invalid plugin format: The plugin "'.concat(e.info.name,'" has no "fn" function'))}))}const j_=()=>{};function F_(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=j_,a=null,l=null,s=null;const c=new Promise((e=>{s=e}));let u={},d=[];const p=new te,f=async e=>{l?(async()=>{await c,a.current.setSnOptions(i(i({},u),e))})():u=i(i({},u),e)},h=async e=>{D_(e),l?(async()=>{await c,a.current.setSnPlugins(e)})():d=e},m={id:e.id,model:e,async destroy(){await r(),o(),o=j_},async convertTo(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=await FP({halo:t,model:e,cellRef:a,newType:n});return r&&(e.__snInterceptor?await e.__snInterceptor.setProperties.call(e,o.qProperty):await e.setProperties(o.qProperty)),o},addListener(e,t){p.addListener(e,t)},removeListener(e,t){p.removeListener(e,t)},__DO_NOT_USE__:{mount(r){if(l)throw new Error("Already mounted");return l=r,[o,a]=M_({halo:t,element:r,model:e,initialSnOptions:u,initialSnPlugins:d,initialError:n,onMount:s,emitter:p}),c},async applyProperties(t){const n=A_("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){f(e)},plugins(e){h(e)},exportImage:()=>a.current.exportImage(),takeSnapshot:()=>a.current.takeSnapshot(),getModel:()=>e}};return m}async function B_(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=F_({model:e,halo:n,initialError:r,onDestroy:o});return t.options&&i.__DO_NOT_USE__.options(t.options),t.plugins&&i.__DO_NOT_USE__.plugins(t.plugins),t.element&&await i.__DO_NOT_USE__.mount(t.element),i}async function $_(e,t){let{type:n,version:r,fields:o,properties:i,options:a,plugins:l,element:s,extendProperties:c}=e,u={};const d=[];let p;try{const e=t.types.get({name:n,version:r});u=await e.initialProperties(i,c);const a=await e.supernova();o&&await kP({sn:a,properties:u,fields:o,children:d},t),i&&a&&a.qae.properties.onChange&&a.qae.properties.onChange.call({},u)}catch(e){p=e,u={qInfo:{qType:n},visualization:n}}const f=await t.app.createSessionObject(u);d.length>0&&await f.setFullPropertyTree({qProperty:u,qChildren:d}),CL.set(f.id,f);const h=(e=>{const t=wL({type:"SET",value:e});return()=>{t(),CL.clear(e.id)}})(f);return B_(f,{options:a,plugins:l,element:s},t,p,(async()=>{await t.app.destroySessionObject(f.id),h()}))}async function W_(e,t,n){let{type:r,version:o,fields:i,properties:a,extendProperties:l}=e,s={};const c=[];try{const e=t.types.get({name:r,version:o});s=await e.initialProperties(a,l);const n=await e.supernova();i&&await kP({sn:n,properties:s,fields:i,children:c},t),a&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},s)}catch(e){s=n?null:{qInfo:{qType:r},visualization:r}}if(!n){const e=await t.app.createObject(s);return c.length>0&&await e.setFullPropertyTree({qProperty:s,qChildren:c}),CL.set(e.id,e),e}return s}const U_="njs-sheet";function H_(e){let{model:t,halo:n,initialSnOptions:r,initialSnPlugins:o,initialError:i,onMount:a}=e;const{root:l}=n,[s]=TL(t),{theme:c}=U.useContext(Iw),[u,d]=U.useState([]),[p,f]=U.useState(void 0),[h,m]=U.useState(void 0),[g,v]=U.useState("");U.useEffect((()=>{if(s){const e=JSON.stringify(s.cells);if(e===g)return;v(e);const t=async()=>{u.forEach((e=>{l.removeCell(e.currentId)}));const e=s.cells,t=await Promise.all(e.map((async e=>{let t;const r=new Promise((e=>{t=e})),o=u.find((t=>t.id===e.name));if(o)return o.bounds=e.bounds,delete o.mountedPromise,o;const i=await async function(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let l=bL.get(a);l||(l=t.app.getObject(n),bL.set(a,l));const s=await l;return CL.set(a,s),B_(s,{options:r,plugins:o,element:i},t)}({id:e.name},n);return{model:i.model,id:e.name,bounds:e.bounds,cellRef:H.createRef(),currentId:AT(),mounted:t,mountedPromise:r}})));t.forEach((e=>l.addCell(e.currentId,e.cellRef))),d(t)};t()}}),[s]);const b=U.useMemo((()=>u?u.map((e=>function(e,t,n,r,o,i){const{x:a,y:l,width:s,height:c}=e.bounds;return H.createElement("div",{style:{left:"".concat(a,"%"),top:"".concat(l,"%"),width:"".concat(s,"%"),height:"".concat(c,"%"),position:"absolute"}},H.createElement(N_,{ref:e.cellRef,halo:t,model:e.model,currentId:e.currentId,initialSnOptions:n,initialSnPlugins:r,initialError:o,onMount:i}))}(e,n,r,o,i,e.mounted))):[]),[u]);U.useEffect((()=>{const e=null!=s&&s.components?s.components.find((e=>"general"===e.key)):null;f(E_(e,n.public.theme)),m(w_(e,n.app))}),[s,n.public.theme,n.app,c]);const y=!s||Number.isNaN(s.height)?"100%":"".concat(Number(s.height),"%"),x=u.map((e=>e.mountedPromise)),S=x.filter((e=>!!e));return S.length&&Promise.all(x).then((()=>{a()})),H.createElement("div",{className:U_,style:{width:"100%",height:y,position:"relative",backgroundColor:p,backgroundImage:h&&h.url?"url(".concat(h.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:h&&h.size,backgroundPosition:h&&h.pos}},b)}function V_(e){let{halo:t,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,initialError:l}=e;const{root:s}=t,c=H.createRef(),u=wp.createPortal(H.createElement(H_,{ref:c,halo:t,model:r,initialSnOptions:o,initialSnPlugins:i,initialError:l,onMount:a}),n,r.id),d=()=>{s.remove(u),r.removeListener("closed",d)};return r.on("closed",d),s.add(u),[d,c]}const G_=()=>{};function K_(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=G_,a=null,l=null,s=null;const c=new Promise((e=>{s=e}));let u={},d=[];const p=async e=>{l?(async()=>{await c,a.current.setSnOptions(i(i({},u),e))})():u=i(i({},u),e)},f=async e=>{D_(e),l?(async()=>{await c,a.current.setSnPlugins(e)})():d=e},h={id:e.id,model:e,async destroy(){await r(),o(),o=G_},__DO_NOT_USE__:{mount(r){if(l)throw new Error("Already mounted");return l=r,[o,a]=V_({halo:t,element:r,model:e,initialSnOptions:u,initialSnPlugins:d,initialError:n,onMount:s}),c},async applyProperties(t){const n=A_("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){p(e)},plugins(e){f(e)},exportImage(){throw new Error("Not implemented")},takeSnapshot(){throw new Error("Not implemented")},getModel:()=>e}};return h}async function Z_(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let l=bL.get(a);l||(l=t.app.getObject(n),bL.set(a,l));const s=await l;return CL.set(a,s),"sheet"===s.genericType?async function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=K_({model:e,halo:n,initialError:r,onDestroy:o});return t.options&&i.__DO_NOT_USE__.options(t.options),t.plugins&&i.__DO_NOT_USE__.plugins(t.plugins),t.element&&await i.__DO_NOT_USE__.mount(t.element),i}(s,{options:r,plugins:o,element:i},t):B_(s,{options:r,plugins:o,element:i},t)}function X_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}const Q_=Ve.bind(null,!0),J_={},{isArray:Y_}=Array;function eN(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function tN(e){return void 0===e}function nN(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function rN(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=tN(e[r||t])?i:e[t],e=e[r||t]})),e}function oN(e,t){let n=!0;if(eN(e)&&eN(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{oN(e[r],t[r])||(n=!1)})),n);if(Y_(e)&&Y_(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!oN(e[n],t[n]))return!1;return!0}return e===t}J_.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Q_({},{val:e}).val:e}(t[o]),a=e[o],l="".concat(n,"/").concat(o);oN(i,a)||nN(t,o)||(tN(a)?r.push({op:"add",path:l,value:i}):eN(i)&&eN(a)?r=r.concat(J_.generate(a,i,l)):Y_(i)&&Y_(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&tN(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(oN(t,o))return r;if(!tN(t[0])&&tN(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:"".concat(n,"/").concat(e)}),o.splice(e,1)):r=r.concat(J_.generate(o[e],t[i],"".concat(n,"/").concat(e)));for(let e=0,l=t.length;e<l;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:"".concat(n,"/").concat(e),value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:"".concat(n,"/").concat(e),from:"".concat(n,"/").concat(i)}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,l)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((o=>{tN(t[o])&&!nN(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},J_.apply=function(e,t){t.forEach((t=>{let n=rN(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Y_(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Y_(o)&&Y_(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(eN(o)&&eN(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!nN(a,e)&&delete a[e]})),Q_(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=rN(e,t.from);Y_(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Y_(n)?n.splice(+r,1):delete n[r]);var a}))},J_.clone=function(e){return Q_({},e)},J_.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},J_.updateObject=function(e,t){Object.keys(e).length?J_.apply(e,J_.generate(e,t)):Q_(e,t)};const iN=e=>t=>{const n=(r=i(i({},t),{},{action(){"function"==typeof t.action&&t.action.call(n,e),n.emit("changed")},enabled:()=>"function"!=typeof t.enabled||t.enabled.call(n,e),active:"function"==typeof t.active?function(){return t.active.call(n,e)}:void 0}),Object.keys(te.prototype).forEach((e=>{r[e]=te.prototype[e]})),te.init(r),r);var r;return n};let aN,lN;function sN(e,t){if(!e)return!0;if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!0;return!1}function cN(e){let{explicitResize:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.__hooks={obsolete:!1,error:!1,waitForData:!1,chain:{promise:null,resolve:()=>{}},list:[],snaps:[],menus:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null}}}function uN(e){pN(e.__hooks.list,!0),e.__hooks.obsolete=!0,e.__hooks.list.length=0,e.__hooks.pendingEffects.length=0,e.__hooks.pendingLayoutEffects.length=0,e.__hooks.actions=null,e.__hooks.imperativeHandle=null,e.__hooks.resizer=null,e.__hooks.accessibility=null,e.__actionsDispatch=null,clearTimeout(e.__hooks.micro),cancelAnimationFrame(e.__hooks.macro)}async function dN(e){if(e.__hooks.obsolete)return Promise.resolve();lN=-1,aN=e,aN.__hooks.initiated&&aN.__hooks.list.length;try{aN.fn.call(null)}catch(e){console.error(e)}aN.__hooks.initiated=!0;const t=aN.__hooks;return gN(aN),lN=void 0,aN=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){pN(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){pN(e.pendingEffects),e.macro=null,function(e){if(e.pendingPromises.length||e.micro||e.macro)return;e.chain.promise=null,e.chain.resolve(!e.waitForData)}(e)}(e)}))}(t),t.chain.promise}function pN(e,t){try{e.forEach((e=>{"function"==typeof e.teardown&&e.teardown(),t||(e.teardown=e.value[0]())}))}catch(e){console.error(e)}e.length=0}function fN(e,t){try{return Promise.all(e.__hooks.snaps.map((e=>Promise.resolve(e.fn(t))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function hN(e,t,n){try{return Promise.all(e.__hooks.menus.map((e=>Promise.resolve(e.fn(t,n))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function mN(e){return e.__hooks.imperativeHandle}function gN(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function vN(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,gN(e))}function bN(e){if(void 0===aN)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=aN.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function yN(e){bN(++lN);return aN.context[e]}function xN(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function SN(e){return{__hooked:!0,fn:e,initiate:cN,run:dN,teardown:uN,runSnaps:fN,runMenu:hN,focus:LN,blur:ON,observeActions:vN,getImperativeHandle:mN,updateRectOnNextRun:xN}}function wN(e){const t=bN(++lN);if(!t.value){t.component=aN;const n=e=>{if(t.component.__hooks.obsolete)return;const n="function"==typeof e?e(t.value[0]):e;var r;n!==t.value[0]&&(t.value[0]=n,(r=t.component).__hooks.micro||(r.__hooks.micro=setTimeout((()=>{r.__hooks.micro=null,dN(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function EN(e,t){const n=bN(++lN);sN(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===aN.__hooks.pendingEffects.indexOf(n)&&aN.__hooks.pendingEffects.push(n))}function CN(e,t){const n=bN(++lN);sN(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],aN.__hooks.pendingLayoutEffects.push(n))}function kN(e,t){const n=bN(++lN);return sN(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function RN(){return yN("element")}function LN(e){const t=e.__hooks.accessibility;t.active||(t.active=!0,t&&t.setter&&t.setter({active:!0,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}function ON(e){const t=e.__hooks.accessibility;t&&t.active&&(t.active=!1,t&&t.setter&&t.setter({active:!1,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}const IN={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},TN=Object.keys(IN);function PN(e,t){const n=i({},IN);var r;r=n,Object.keys(te.prototype).forEach((e=>{r[e]=te.prototype[e]})),te.init(r);const o={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==TN.indexOf(t)?n[t]=e.component[t].bind(o):o[t]=e.component[t]}));const a=function(e){let{sn:t,component:n}=e;const r={},o=[],i=iN(n);return((t.definition.selectionToolbar||{}).items||[]).forEach((e=>{const t=i(e);r[e.key]=t,o.push(t)})),(t.definition.actions||[]).forEach((e=>{const t=i(e);r[e.key]=t})),{actions:r,selectionToolbarItems:o,destroy(){o.length=0}}}({sn:e,component:o}),l=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):null;return Object.assign(o,{model:t.model,app:t.app,global:l,selections:t.selections,actions:a.actions}),Object.assign(n,{actions:a.actions,model:t.model,app:t.app,selections:t.selections}),[n,a]}function _N(e,t,n){"function"==typeof e.component&&(e.component=SN(e.component));const[r,o]=e.component&&e.component.__hooked?function(e,t,n){const r=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):void 0;let o=!1;const a={},l=["appLayout","constraints","interactions"],s={},c={};t.model&&t.model.session||(s.select=!0,s.edit=!0,c.select=!1,c.edit=!1);const u={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,emitter:t.emitter,deviceType:n.deviceType,theme:void 0,translator:n.translator,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,focusHandler:t.focusHandler,constraints:s,interactions:c,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(u,{explicitResize:!!t.explicitResize})},render(t){let n=!o||!1;if(t){if(t.layout&&t.layout!==this.context.layout&&(n=!0,this.context.layout=t.layout),t.context&&t.context.theme&&(this.context.theme=t.context.theme),t.context&&!!t.context.keyboardNavigation!=!!this.context.keyboardNavigation&&(this.context.keyboardNavigation=!!t.context.keyboardNavigation,n=!0),t.context&&t.context.focusHandler&&(this.context.focusHandler=t.context.focusHandler),t.options){const e={};let r=!1;Object.keys(t.options).forEach((n=>{e[n]=t.options[n],this.context.options[n]!==t.options[n]&&(r=!0)})),r&&(this.context.options=e,n=!0)}if(t.plugins){let e=this.context.plugins.length!==t.plugins.length;t.plugins.forEach(((t,n)=>{this.context.plugins[n]!==t&&(e=!0)})),e&&(this.context.plugins=[...t.plugins],n=!0)}l.forEach((e=>{const r=t.context;if(r&&Object.prototype.hasOwnProperty.call(r,e)){let t=JSON.stringify(r[e]);"constraints"===e&&(t=JSON.stringify(i(i({},r[e]),s))),"interactions"===e&&(t=JSON.stringify(i(i({},r[e]),c))),t!==a[e]&&(n=!0,a[e]=t,this.context[e]=JSON.parse(t))}}))}else n=!0;return this.context.theme&&this.context.theme.name()!==a.themeName&&(n=!0,a.themeName=this.context.theme.name()),this.context.translator.language()!==a.language&&(n=!0,a.language=u.context.translator.language()),n?(o=!0,this.currentResult=e.component.run(this),this.currentResult):this.currentResult||Promise.resolve()},resize(){return e.component.updateRectOnNextRun(this),this.render()},willUnmount(){e.component.teardown(this)},setSnapshotData(t){return e.component.runSnaps(this,t)},onContextMenu(t,n){return e.component.runMenu(this,t,n)},focus(){e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return l.forEach((e=>{a[e]=JSON.stringify(u.context[e])})),a.themeName=u.context.theme?u.context.theme.name():void 0,a.language=u.context.translator?u.context.translator.language():void 0,Object.assign(u,{selections:t.selections}),[u,null]}(e,t,n):PN(e,t),a=[];return t.model.__snInterceptor&&t.model.__snInterceptor.teardown(),e.qae.properties.onChange&&(t.model.__snInterceptor={setProperties:t.model.setProperties,applyPatches:t.model.applyPatches,teardown:void 0},t.model.setProperties=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.qae.properties.onChange.call({model:t.model},...r),t.model.__snInterceptor.setProperties.call(this,...r)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then((o=>{const i=J_.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));J_.apply(o,a),e.qae.properties.onChange.call({model:t.model},o);const l=J_.generate(i,o).map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})));return t.model.__snInterceptor.applyPatches.call(this,l,r)}))},t.model.__snInterceptor.teardown=()=>{t.model.setProperties=t.model.__snInterceptor.setProperties,delete t.model.__snInterceptor},a.push(t.model.__snInterceptor.teardown)),{generator:e,component:r,selectionToolbar:{items:o?o.selectionToolbarItems:[]},destroy(){a.forEach((e=>e()))},logicalSize:e.definition.logicalSize||(()=>!1)}}const NN=()=>{};function MN(e,t){return void 0===e?()=>t:()=>e}function qN(e){const t=e||{};return{min:"function"==typeof t.min?t.min:MN(t.min,0),max:"function"==typeof t.max?t.max:MN(t.max,1e3),added:t.added||t.add||NN,description:t.description||NN,moved:t.moved||t.move||NN,removed:t.removed||t.remove||NN,replaced:t.replaced||t.replace||NN,isDefined:()=>!!e}}function zN(e){const t=e.path||"/qHyperCubeDef",n=t.slice(0,-3);if(!1===/\/(qHyperCube|qListObject|qChildList)$/.test(n)){const e=n.includes("/qHyperCube")?"qHyperCubeDef":"qListObjectDef";throw new Error("Incorrect definition for ".concat(e," at ").concat(t,". Valid paths include /qHyperCubeDef, /qListObjectDef, or /qChildListDef, e.g. data/qHyperCubeDef"))}return{propertyPath:t,layoutPath:n,resolveLayout:e=>((e,t,n)=>{const r=t.split("/");let o=e;if(void 0===o)return n;for(let e=0;e<r.length;++e)if(""!==r[e]){if(void 0===o[r[e]])return n;o=o[r[e]]}return o})(e,n,{}),dimensions:qN(e.dimensions),measures:qN(e.measures)}}function AN(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.properties||{};t.properties&&(t.properties.initial||t.properties.onChange)&&(n=t.properties.initial,e=t.properties.onChange);const r={properties:{initial:n,onChange:e},data:{targets:((t.data||{}).targets||[]).map(zN)},exportProperties:t.exportProperties,importProperties:t.importProperties};return r}function DN(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:AN(n.qae),component:n.component||{},create:e=>_N(r,e,t),definition:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var jN={exports:{}};!function(e,t){var n;t=e.exports=d,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,o=t.re=[],i=t.src=[],a=t.tokens={},l=0;function s(e){a[e]=l++}s("NUMERICIDENTIFIER"),i[a.NUMERICIDENTIFIER]="0|[1-9]\\d*",s("NUMERICIDENTIFIERLOOSE"),i[a.NUMERICIDENTIFIERLOOSE]="[0-9]+",s("NONNUMERICIDENTIFIER"),i[a.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",s("MAINVERSION"),i[a.MAINVERSION]="("+i[a.NUMERICIDENTIFIER]+")\\.("+i[a.NUMERICIDENTIFIER]+")\\.("+i[a.NUMERICIDENTIFIER]+")",s("MAINVERSIONLOOSE"),i[a.MAINVERSIONLOOSE]="("+i[a.NUMERICIDENTIFIERLOOSE]+")\\.("+i[a.NUMERICIDENTIFIERLOOSE]+")\\.("+i[a.NUMERICIDENTIFIERLOOSE]+")",s("PRERELEASEIDENTIFIER"),i[a.PRERELEASEIDENTIFIER]="(?:"+i[a.NUMERICIDENTIFIER]+"|"+i[a.NONNUMERICIDENTIFIER]+")",s("PRERELEASEIDENTIFIERLOOSE"),i[a.PRERELEASEIDENTIFIERLOOSE]="(?:"+i[a.NUMERICIDENTIFIERLOOSE]+"|"+i[a.NONNUMERICIDENTIFIER]+")",s("PRERELEASE"),i[a.PRERELEASE]="(?:-("+i[a.PRERELEASEIDENTIFIER]+"(?:\\."+i[a.PRERELEASEIDENTIFIER]+")*))",s("PRERELEASELOOSE"),i[a.PRERELEASELOOSE]="(?:-?("+i[a.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+i[a.PRERELEASEIDENTIFIERLOOSE]+")*))",s("BUILDIDENTIFIER"),i[a.BUILDIDENTIFIER]="[0-9A-Za-z-]+",s("BUILD"),i[a.BUILD]="(?:\\+("+i[a.BUILDIDENTIFIER]+"(?:\\."+i[a.BUILDIDENTIFIER]+")*))",s("FULL"),s("FULLPLAIN"),i[a.FULLPLAIN]="v?"+i[a.MAINVERSION]+i[a.PRERELEASE]+"?"+i[a.BUILD]+"?",i[a.FULL]="^"+i[a.FULLPLAIN]+"$",s("LOOSEPLAIN"),i[a.LOOSEPLAIN]="[v=\\s]*"+i[a.MAINVERSIONLOOSE]+i[a.PRERELEASELOOSE]+"?"+i[a.BUILD]+"?",s("LOOSE"),i[a.LOOSE]="^"+i[a.LOOSEPLAIN]+"$",s("GTLT"),i[a.GTLT]="((?:<|>)?=?)",s("XRANGEIDENTIFIERLOOSE"),i[a.XRANGEIDENTIFIERLOOSE]=i[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",s("XRANGEIDENTIFIER"),i[a.XRANGEIDENTIFIER]=i[a.NUMERICIDENTIFIER]+"|x|X|\\*",s("XRANGEPLAIN"),i[a.XRANGEPLAIN]="[v=\\s]*("+i[a.XRANGEIDENTIFIER]+")(?:\\.("+i[a.XRANGEIDENTIFIER]+")(?:\\.("+i[a.XRANGEIDENTIFIER]+")(?:"+i[a.PRERELEASE]+")?"+i[a.BUILD]+"?)?)?",s("XRANGEPLAINLOOSE"),i[a.XRANGEPLAINLOOSE]="[v=\\s]*("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:"+i[a.PRERELEASELOOSE]+")?"+i[a.BUILD]+"?)?)?",s("XRANGE"),i[a.XRANGE]="^"+i[a.GTLT]+"\\s*"+i[a.XRANGEPLAIN]+"$",s("XRANGELOOSE"),i[a.XRANGELOOSE]="^"+i[a.GTLT]+"\\s*"+i[a.XRANGEPLAINLOOSE]+"$",s("COERCE"),i[a.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",s("COERCERTL"),o[a.COERCERTL]=new RegExp(i[a.COERCE],"g"),s("LONETILDE"),i[a.LONETILDE]="(?:~>?)",s("TILDETRIM"),i[a.TILDETRIM]="(\\s*)"+i[a.LONETILDE]+"\\s+",o[a.TILDETRIM]=new RegExp(i[a.TILDETRIM],"g");s("TILDE"),i[a.TILDE]="^"+i[a.LONETILDE]+i[a.XRANGEPLAIN]+"$",s("TILDELOOSE"),i[a.TILDELOOSE]="^"+i[a.LONETILDE]+i[a.XRANGEPLAINLOOSE]+"$",s("LONECARET"),i[a.LONECARET]="(?:\\^)",s("CARETTRIM"),i[a.CARETTRIM]="(\\s*)"+i[a.LONECARET]+"\\s+",o[a.CARETTRIM]=new RegExp(i[a.CARETTRIM],"g");s("CARET"),i[a.CARET]="^"+i[a.LONECARET]+i[a.XRANGEPLAIN]+"$",s("CARETLOOSE"),i[a.CARETLOOSE]="^"+i[a.LONECARET]+i[a.XRANGEPLAINLOOSE]+"$",s("COMPARATORLOOSE"),i[a.COMPARATORLOOSE]="^"+i[a.GTLT]+"\\s*("+i[a.LOOSEPLAIN]+")$|^$",s("COMPARATOR"),i[a.COMPARATOR]="^"+i[a.GTLT]+"\\s*("+i[a.FULLPLAIN]+")$|^$",s("COMPARATORTRIM"),i[a.COMPARATORTRIM]="(\\s*)"+i[a.GTLT]+"\\s*("+i[a.LOOSEPLAIN]+"|"+i[a.XRANGEPLAIN]+")",o[a.COMPARATORTRIM]=new RegExp(i[a.COMPARATORTRIM],"g");s("HYPHENRANGE"),i[a.HYPHENRANGE]="^\\s*("+i[a.XRANGEPLAIN]+")\\s+-\\s+("+i[a.XRANGEPLAIN]+")\\s*$",s("HYPHENRANGELOOSE"),i[a.HYPHENRANGELOOSE]="^\\s*("+i[a.XRANGEPLAINLOOSE]+")\\s+-\\s+("+i[a.XRANGEPLAINLOOSE]+")\\s*$",s("STAR"),i[a.STAR]="(<|>)?=?\\s*\\*";for(var c=0;c<l;c++)n(c,i[c]),o[c]||(o[c]=new RegExp(i[c]));function u(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof d)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?o[a.LOOSE]:o[a.FULL]).test(e))return null;try{return new d(e,t)}catch(e){return null}}function d(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof d){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof d))return new d(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var i=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}t.parse=u,t.valid=function(e,t){var n=u(e,t);return n?n.version:null},t.clean=function(e,t){var n=u(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=d,d.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},d.prototype.toString=function(){return this.version},d.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof d||(e=new d(e,this.options)),this.compareMain(e)||this.comparePre(e)},d.prototype.compareMain=function(e){return e instanceof d||(e=new d(e,this.options)),f(this.major,e.major)||f(this.minor,e.minor)||f(this.patch,e.patch)},d.prototype.comparePre=function(e){if(e instanceof d||(e=new d(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return f(r,o)}while(++t)},d.prototype.compareBuild=function(e){e instanceof d||(e=new d(e,this.options));var t=0;do{var r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return f(r,o)}while(++t)},d.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new d(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(v(e,t))return null;var n=u(e),r=u(t),o="";if(n.prerelease.length||r.prerelease.length){o="pre";var i="prerelease"}for(var a in n)if(("major"===a||"minor"===a||"patch"===a)&&n[a]!==r[a])return o+a;return i},t.compareIdentifiers=f;var p=/^[0-9]+$/;function f(e,t){var n=p.test(e),r=p.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function h(e,t,n){return new d(e,n).compare(new d(t,n))}function m(e,t,n){return h(e,t,n)>0}function g(e,t,n){return h(e,t,n)<0}function v(e,t,n){return 0===h(e,t,n)}function b(e,t,n){return 0!==h(e,t,n)}function y(e,t,n){return h(e,t,n)>=0}function x(e,t,n){return h(e,t,n)<=0}function S(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return v(e,n,r);case"!=":return b(e,n,r);case">":return m(e,n,r);case">=":return y(e,n,r);case"<":return g(e,n,r);case"<=":return x(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function w(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof w){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof w))return new w(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===E?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return f(t,e)},t.major=function(e,t){return new d(e,t).major},t.minor=function(e,t){return new d(e,t).minor},t.patch=function(e,t){return new d(e,t).patch},t.compare=h,t.compareLoose=function(e,t){return h(e,t,!0)},t.compareBuild=function(e,t,n){var r=new d(e,n),o=new d(t,n);return r.compare(o)||r.compareBuild(o)},t.rcompare=function(e,t,n){return h(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compareBuild(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.compareBuild(r,e,n)}))},t.gt=m,t.lt=g,t.eq=v,t.neq=b,t.gte=y,t.lte=x,t.cmp=S,t.Comparator=w;var E={};function C(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof C)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new C(e.raw,t);if(e instanceof w)return new C(e.value,t);if(!(this instanceof C))return new C(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function k(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n}function R(e){return!e||"x"===e.toLowerCase()||"*"===e}function L(e,t,n,r,o,i,a,l,s,c,u,d,p){return((t=R(n)?"":R(r)?">="+n+".0.0":R(o)?">="+n+"."+r+".0":">="+t)+" "+(l=R(s)?"":R(c)?"<"+(+s+1)+".0.0":R(u)?"<"+s+"."+(+c+1)+".0":d?"<="+s+"."+c+"."+u+"-"+d:"<="+l)).trim()}function O(e,t,r){for(var o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(o=0;o<e.length;o++)if(n(e[o].semver),e[o].semver!==E&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function I(e,t,n){try{t=new C(t,n)}catch(e){return!1}return t.test(e)}function T(e,t,n,r){var o,i,a,l,s;switch(e=new d(e,r),t=new C(t,r),n){case">":o=m,i=x,a=g,l=">",s=">=";break;case"<":o=g,i=y,a=m,l="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(I(e,t,r))return!1;for(var c=0;c<t.set.length;++c){var u=t.set[c],p=null,f=null;if(u.forEach((function(e){e.semver===E&&(e=new w(">=0.0.0")),p=p||e,f=f||e,o(e.semver,p.semver,r)?p=e:a(e.semver,f.semver,r)&&(f=e)})),p.operator===l||p.operator===s)return!1;if((!f.operator||f.operator===l)&&i(e,f.semver))return!1;if(f.operator===s&&a(e,f.semver))return!1}return!0}w.prototype.parse=function(e){var t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new d(n[2],this.options.loose):this.semver=E},w.prototype.toString=function(){return this.value},w.prototype.test=function(e){if(n("Comparator.test",e,this.options.loose),this.semver===E||e===E)return!0;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}return S(e,this.operator,this.semver,this.options)},w.prototype.intersects=function(e,t){if(!(e instanceof w))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(n=new C(e.value,t),I(this.value,n,t));if(""===e.operator)return""===e.value||(n=new C(this.value,t),I(e.semver,n,t));var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),l=S(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=S(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||i&&a||l||s},t.Range=C,C.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},C.prototype.toString=function(){return this.range},C.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[a.HYPHENRANGELOOSE]:o[a.HYPHENRANGE];e=e.replace(r,L),n("hyphen replace",e),e=e.replace(o[a.COMPARATORTRIM],"$1$2$3"),n("comparator trim",e,o[a.COMPARATORTRIM]),e=(e=(e=e.replace(o[a.TILDETRIM],"$1~")).replace(o[a.CARETTRIM],"$1^")).split(/\s+/).join(" ");var i=t?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],l=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[a.CARETLOOSE]:o[a.CARET];return e.replace(r,(function(t,r,o,i,a){var l;return n("caret",e,t,r,o,i,a),R(r)?l="":R(o)?l=">="+r+".0.0 <"+(+r+1)+".0.0":R(i)?l="0"===r?">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":">="+r+"."+o+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),l="0"===r?"0"===o?">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+"-"+a+" <"+(+r+1)+".0.0"):(n("no pr"),l="0"===r?"0"===o?">="+r+"."+o+"."+i+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+" <"+(+r+1)+".0.0"),n("caret return",l),l}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?o[a.TILDELOOSE]:o[a.TILDE];return e.replace(r,(function(t,r,o,i,a){var l;return n("tilde",e,t,r,o,i,a),R(r)?l="":R(o)?l=">="+r+".0.0 <"+(+r+1)+".0.0":R(i)?l=">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":a?(n("replaceTilde pr",a),l=">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+(+o+1)+".0"):l=">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0",n("tilde return",l),l}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?o[a.XRANGELOOSE]:o[a.XRANGE];return e.replace(r,(function(r,o,i,a,l,s){n("xRange",e,r,o,i,a,l,s);var c=R(i),u=c||R(a),d=u||R(l),p=d;return"="===o&&p&&(o=""),s=t.includePrerelease?"-0":"",c?r=">"===o||"<"===o?"<0.0.0-0":"*":o&&p?(u&&(a=0),l=0,">"===o?(o=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):"<="===o&&(o="<",u?i=+i+1:a=+a+1),r=o+i+"."+a+"."+l+s):u?r=">="+i+".0.0"+s+" <"+(+i+1)+".0.0"+s:d&&(r=">="+i+"."+a+".0"+s+" <"+i+"."+(+a+1)+".0"+s),n("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[a.STAR],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(l=l.filter((function(e){return!!e.match(i)}))),l=l.map((function(e){return new w(e,this.options)}),this)},C.prototype.intersects=function(e,t){if(!(e instanceof C))throw new TypeError("a Range is required");return this.set.some((function(n){return k(n,t)&&e.set.some((function(e){return k(e,t)&&n.every((function(n){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new C(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},C.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1},t.satisfies=I,t.maxSatisfying=function(e,t,n){var r=null,o=null;try{var i=new C(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&-1!==o.compare(e)||(o=new d(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,o=null;try{var i=new C(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&1!==o.compare(e)||(o=new d(r=e,n)))})),r},t.minVersion=function(e,t){e=new C(e,t);var n=new d("0.0.0");if(e.test(n))return n;if(n=new d("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r){e.set[r].forEach((function(e){var t=new d(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!m(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new C(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return T(e,t,"<",n)},t.gtr=function(e,t,n){return T(e,t,">",n)},t.outside=T,t.prerelease=function(e,t){var n=u(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new C(e,n),t=new C(t,n),e.intersects(t)},t.coerce=function(e,t){if(e instanceof d)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var r;(r=o[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),o[a.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;o[a.COERCERTL].lastIndex=-1}else n=e.match(o[a.COERCE]);if(null===n)return null;return u(n[2]+"."+(n[3]||"0")+"."+(n[4]||"0"),t)}}(jN,jN.exports);var FN=jN.exports;const BN={};async function $N(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!BN[i]){const n="".concat(e).concat(t&&" v".concat(t)||"");if(r&&"function"!=typeof r)throw new Error("load of visualization '".concat(n,"' is not a fuction, wrap load promise in function"));const a=(r||o.load)({name:e,version:t}),l=Promise.resolve(a);BN[i]=l.then((e=>{if(!e)throw new Error("load() of visualization '".concat(n,"' resolved to an invalid object"));return e})).catch((e=>{throw new Error("Failed to load visualization: '".concat(n,"'"))}))}return BN[i]}function WN(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,a)=>{if(n[o])throw new Error("Supernova '".concat(e,"@").concat(o,"' already registered."));n[o]=function(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{meta:a}=o,l={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&a&&a.deps&&a.deps.properties)||FN.satisfies(e,a.deps.properties),supernova:()=>$N(l.name,l.version,t,o.load).then((e=>(n=n||DN(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.supernova().then((()=>{const n=i({qInfo:{qType:l.name},visualization:l.name,version:l.version,showTitles:!0},JSON.parse(r));return t?(Ve(!0,n,e),n):i(i({},n),e)}))}};return l}({name:e,version:o},t,a),r=null},getMatchingVersionFromProperties:e=>{r||(r=function(e){const t=e.filter((e=>"undefined"===e));return[...t,...e.filter((e=>"undefined"!==e)).map((e=>e.split(".").map((e=>parseInt(e,10))))).sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2])).map((e=>e.join(".")))]}(Object.keys(n)));for(let t=r.length-1;t>=0;t--){if(n[r[t]].supportsPropertiesVersion(e))return r[t]}return null},versions:n}}function UN(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=WN(e.name,t)),r[e.name].register(e.version,n)},getSupportedVersion:(e,t)=>{if(r[e])return r[e].getMatchingVersionFromProperties(t)},get(e){const{name:t}=e;let{version:n}=e;if(r[t]){if(!r[t].versions[n]){n=Object.keys(r[t].versions)[0]}}else this.register({name:t,version:n});return r[t].get(n)||o.get(e)},getList:()=>Object.keys(r).map((e=>({name:e,versions:Object.keys(r[e].versions).map((e=>"undefined"===e?void 0:e))}))),clearFromCache:e=>{r[e]&&(r[e]=void 0),function(e){Object.keys(BN).forEach((t=>{t.split("__")[0]===e&&(BN[t]=void 0)}))}(e)}}}const HN={get:async e=>{const t=await fetch("/njs/snapshot/".concat(e));if(!t.ok)throw new Error(t.statusText);return t.json()},capture:e=>fetch("/njs/capture",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json()))},VN={context:{},load:()=>{},types:[],themes:[],anything:{},snapshot:HN};VN.context={theme:"light",language:"en-US",deviceType:"auto",constraints:{},interactions:{},keyboardNavigation:!1,disableCellPadding:!1};const GN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(i({},e),t)},KN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[...e,...t].filter(((e,t,n)=>n.indexOf(e)===t))},ZN=(e,t)=>({context:GN(e.context,t.context),load:t.load||e.load,loadTheme:t.loadTheme||e.loadTheme,snapshot:i({},t.snapshot||e.snapshot),types:KN(e.types,t.types),themes:KN(e.themes,t.themes),flags:GN(e.flags,t.flags),anything:GN(e.anything,t.anything)});var XN=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Q(t.context.language);function r(e,o){if(o)return r.createConfiguration(o)(e);let a=i(i({},t.context),{},{translator:n.translator});const[l]=Ww({app:e,context:a}),s=dt({themes:t.themes,loadTheme:t.loadTheme,root:l});a.themeApi=s.externalAPI;const c={galaxy:{translator:n.translator,flags:X_(t.flags),deviceType:pt(t.context.deviceType),anything:t.anything},theme:s.externalAPI,translator:n.translator,nebbie:null},u={app:e,root:l,config:t,public:c,context:a,types:null},d=UN({halo:u});t.types.forEach((e=>d.register({name:e.name,version:e.version},{meta:e.meta,load:e.load})));let p=s.setTheme(t.context.theme),f=null,h=null;const m={render:async e=>(await p,e.id?Z_(e,u):$_(e,u)),create:async e=>W_(e,u,!1),generateProperties:async e=>W_(e,u,!0),context:async e=>{let t;["theme","language","constraints","interactions","keyboardNavigation"].forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==a[n]&&(t||(t={}),t[n]=e[n])})),t&&(a=i(i(i({},a),t),{},{translator:n.translator}),t.theme&&(p=s.setTheme(t.theme),await p),t.language&&u.public.translator.language(t.language),l.context(a))},selections:async()=>(f||(f={mount(t){h||(h=jT({element:t,app:e}),l.add(h))},unmount(){h&&(l.remove(h),h=null)}}),f),field:async t=>{let n;const r="string"==typeof t?t:t.qLibraryId;if(t.qId)n=t.qId;else if(!r)throw new Error("Field identifier or object id must be provided");const o={fieldName:r,async mount(a){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a)throw new Error("Element for ".concat(r||n," not provided"));if(this._instance)throw new Error("Field or object ".concat(r||n," already mounted"));const c=()=>o.emit("selectionActivated"),u=()=>o.emit("selectionDeactivated");return new Promise((r=>{this._instance=hP({element:a,app:e,fieldIdentifier:t,qId:n,options:pP(i({onSelectionActivated:c,onSelectionDeactivated:u},s)),stateName:s.stateName||"$",renderedCallback:r}),l.add(this._instance)}))},unmount(){this._instance&&(l.remove(this._instance),this._instance=null)}};return fT(o),o},getRegisteredTypes:d.getList,__DO_NOT_USE__:{types:d,popover(t,n,r){m._popoverInstance&&(l.remove(m._popoverInstance),m._popoverInstance=null);const o=gP(i({onPopoverClose:()=>m.emit("fieldPopoverClose")},r));m._popoverInstance=H.createElement(vP,{element:t,key:AT(),app:e,fieldIdentifier:n,options:o,stateName:r.stateName||"$"}),l.add(m._popoverInstance)}}};return u.public.nebbie=m,u.types=d,fT(m),m}return r.createConfiguration=n=>e(ZN(t,n)),r.config=t,r}(VN);function QN(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}const JN=globalThis.crypto||{getRandomValues:()=>123456};function YN(){return e=>{const t=Ve({},e);t.qInfo=t.qInfo||{},t.qInfo.qId=t.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^JN.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const n=t._mock;let r=t;return n&&(delete t._mock,r=Ve({},t,n)),Promise.resolve(i({on:()=>{},once:()=>{},getLayout:()=>Promise.resolve(r),getProperties:()=>Promise.resolve(t),getEffectiveProperties:()=>Promise.resolve(t),id:t.qInfo.qId},t))}}const eM=function(e){let{args:t=[],defaultValue:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"==typeof e?e(...t):void 0!==e?e:n},tM=function(e){let{defaultValue:t,async:n=!0,delay:r=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const l=eM(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(l)),r)})):l}},nM=["id","session"],rM=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function oM(e){return!rM.includes(e)}function iM(e){const t=eM(e.getLayout);return t.qInfo&&t.qInfo.qId}function aM(e,t){return e.reduce(((e,n)=>i(i({},e),function(e,t){let n=iM(e);const{delay:r}=t,{id:o,session:a}=e,l=s(e,nM);if(o&&n&&o!==n)throw new Error("Generic object has multiple IDs, qInfo.qId: ".concat(n,", id: ").concat(o));return n=n||o||"object - ".concat(+Date.now()),{[n]:i(i({id:n,session:eM(a,{defaultValue:!0}),on:()=>{},once:()=>{}},Object.entries(l).reduce(((e,t)=>{let[n,o]=t;return i(i({},e),{},{[n]:tM(o,{async:oM(n),delay:r})})}),{})),{},{genericType:e.type})}}(n,t))),{})}function lM(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!iM(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function sM(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(lM);const n=aM(e,t);return async e=>Promise.resolve(n[e])}function cM(){return()=>Promise.resolve({id:"app-layout"})}const uM={fromGenericObjects(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new QN,r=new YN,o=new sM(e,t),i=new cM,a={id:"app - ".concat(+Date.now()),session:n,createSessionObject:r,getObject:o,getAppLayout:i};return Promise.resolve(a)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},dM={generator:DN,hook:SN,theme:ct,locale:Z};e.EnigmaMocker=uM,e.__DO_NOT_USE__=dM,e.conversion=BP,e.embed=XN,e.onContextMenu=function(e){const t=bN(++lN);t.value||(t.value=1,aN.__hooks.menus.push(t)),t.fn=e},e.onTakeSnapshot=function(e){const t=bN(++lN);t.value||(t.value=1,aN.__hooks.snaps.push(t)),t.fn=e},e.useAction=function(e,t){const[n]=wN({action(){n._config.action.call(null)}});return n.component||(n.component=aN,aN.__hooks.actions.list.push(n)),kN((()=>{const t=e();n._config=t,n.active=t.active||!1,n.disabled=t.disabled||!1,n.hidden=t.hidden||!1,n.label=t.label||"",n.getSvgIconShape=t.icon?()=>t.icon:void 0,n.key=t.key||n.component.__hooks.actions.list.length,n.component.__hooks.actions.changed=!0}),t),n.action},e.useApp=function(){const e=yN("app");return e&&e.session?e:void 0},e.useAppLayout=function(){return yN("appLayout")},e.useConstraints=function(){return yN("constraints")},e.useDeviceType=function(){return yN("deviceType")},e.useEffect=EN,e.useElement=RN,e.useEmbed=function(){return yN("nebbie")},e.useEmitter=function(){return yN("emitter")},e.useGlobal=function(){const e=yN("global");return e&&e.session?e:void 0},e.useImperativeHandle=function(e,t){const n=bN(++lN);if(n.imperative||(n.imperative=!0),sN(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],aN.__hooks.imperativeHandle=r}},e.useInteractionState=function(){return yN("interactions")},e.useKeyboard=function(){const e=yN("keyboardNavigation"),t=yN("focusHandler");if(!aN.__hooks.accessibility.exitFunction){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.__hooks.accessibility;n.enabled&&n.active&&(ON(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(aN);aN.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),LN(this))}.bind(aN);aN.__hooks.accessibility.focusFunction=n;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.__hooks.accessibility;n.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(aN);aN.__hooks.accessibility.focusSelectionFunction=r}const n=aN.__hooks.accessibility.focusFunction,r=aN.__hooks.accessibility.exitFunction,o=aN.__hooks.accessibility.focusSelectionFunction,[i,a]=wN({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return aN.__hooks.accessibility.setter=a,aN.__hooks.accessibility.enabled=e,EN((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i},e.useLayout=function(){return yN("layout")},e.useMemo=kN,e.useModel=function(){const e=yN("model");return e&&e.session?e:void 0},e.useOptions=function(){return yN("options")},e.usePlugins=function(){return yN("plugins")},e.usePromise=function(e,t){const[n,r]=wN((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=bN(++lN);return o.component||(o.component=aN),CN((()=>{let t=!1;return o.teardown=()=>{t=!0,o.teardown=null;const e=o.component.__hooks.pendingPromises.indexOf(o);e>-1&&o.component.__hooks.pendingPromises.splice(e,1)},e().then((e=>{t||(o.teardown&&o.teardown(),r({resolved:e,rejected:void 0,state:"resolved"}))})).catch((e=>{t||(o.teardown&&o.teardown(),r({resolved:void 0,rejected:e,state:"resolved"}))})),o.component.__hooks.pendingPromises.push(o),()=>{o.teardown&&o.teardown()}}),t),[n.resolved,n.rejected]},e.useRect=function(){const e=RN(),t=aN.__hooks.resizer,[n,r]=wN((()=>{const{left:t,top:n,width:r,height:o}=e.getBoundingClientRect();return{left:t,top:n,width:r,height:o}}));return t.current=n,-1===t.setters.indexOf(r)&&t.setters.push(r),t.update&&t.resize&&(t.update=!1,t.resize()),CN((()=>{if(t.initiated)return;t.initiated=!0;const n=()=>{const{left:n,top:r,width:o,height:i}=e.getBoundingClientRect(),a=t.current;a.width===o&&a.height===i&&a.left===n&&a.top===r||t.setters.forEach((e=>e({left:n,top:r,width:o,height:i})))};if(t.resize=()=>{n()},t.explicitResize)return()=>{t.resize=void 0};if("function"==typeof ResizeObserver){let r=new ResizeObserver(n);return r.observe(e),()=>{r.unobserve(e),r.disconnect(e),r=null,t.resize=void 0}}}),[e]),n},e.useRenderState=function(){bN(++lN);const e=aN.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}},e.useSelections=function(){return yN("selections")},e.useStaleLayout=function(){const e=yN("layout"),[t]=wN({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current},e.useState=wN,e.useTheme=function(){return yN("theme")},e.useTranslator=function(){return yN("translator")}}));
134
134
  //# sourceMappingURL=stardust.js.map