slick-table 1.1.28 → 1.1.29

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/index.cjs.js CHANGED
@@ -264,8 +264,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
264
264
  )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:hD||{"&::after":{animation:`${su} 2s linear 0.5s infinite`}}}]}})),$y=T.forwardRef(function(t,n){const o=Ge({props:t,name:"MuiSkeleton"}),{animation:r="pulse",className:i,component:a="span",height:l,style:d,variant:u="text",width:f,...p}=o,y={...o,animation:r,component:a,variant:u,hasChildren:!!p.children},w=dD(y);return E.jsx(fD,{as:a,ref:n,className:Se(w.root,i),ownerState:y,...p,style:{width:f,height:l,...d}})});process.env.NODE_ENV!=="production"&&($y.propTypes={animation:s.oneOf(["pulse","wave",!1]),children:s.node,classes:s.object,className:s.string,component:s.elementType,height:s.oneOfType([s.number,s.string]),style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["circular","rectangular","rounded","text"]),s.string]),width:s.oneOfType([s.number,s.string])});function pD(e){return Me("MuiTooltip",e)}const Xt=Pe("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function mD(e){return Math.round(e*1e5)/1e5}const gD=e=>{const{classes:t,disableInteractive:n,arrow:o,touch:r,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",o&&"popperArrow"],tooltip:["tooltip",o&&"tooltipArrow",r&&"touch",`tooltipPlacement${we(i.split("-")[0])}`],arrow:["arrow"]};return Ie(a,pD,t)},yD=ie(ac,{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]}})(ot(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Xt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Xt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Xt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Xt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Xt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Xt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Xt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Xt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),vD=ie("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${we(n.placement.split("-")[0])}`]]}})(ot(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:tt(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,[`.${Xt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Xt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Xt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Xt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${mD(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Xt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Xt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Xt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Xt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Xt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Xt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Xt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Xt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Xt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Xt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),bD=ie("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(ot(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:tt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Ka=!1;const mm=new nc;let ui={x:0,y:0};function Xa(e,t){return(n,...o)=>{t&&t(n,...o),e(n,...o)}}const Vy=T.forwardRef(function(t,n){const o=Ge({props:t,name:"MuiTooltip"}),{arrow:r=!1,children:i,classes:a,components:l={},componentsProps:d={},describeChild:u=!1,disableFocusListener:f=!1,disableHoverListener:p=!1,disableInteractive:y=!1,disableTouchListener:w=!1,enterDelay:b=100,enterNextDelay:m=0,enterTouchDelay:v=700,followCursor:D=!1,id:k,leaveDelay:x=0,leaveTouchDelay:S=1500,onClose:C,onOpen:O,open:I,placement:F="bottom",PopperComponent:z,PopperProps:R={},slotProps:$={},slots:K={},title:G,TransitionComponent:q=zr,TransitionProps:Y,...H}=o,ae=T.isValidElement(i)?i:E.jsx("span",{children:i}),A=qr(),M=to(),[L,B]=T.useState(),[ne,oe]=T.useState(null),se=T.useRef(!1),j=y||D,ee=vs(),J=vs(),te=vs(),ce=vs(),[le,he]=ho({controlled:I,default:!1,name:"Tooltip",state:"open"});let W=le;if(process.env.NODE_ENV!=="production"){const{current:He}=T.useRef(I!==void 0);T.useEffect(()=>{L&&L.disabled&&!He&&G!==""&&L.tagName.toLowerCase()==="button"&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
265
265
  `))},[G,L,He])}const re=sr(k),Z=T.useRef(),fe=Te(()=>{Z.current!==void 0&&(document.body.style.WebkitUserSelect=Z.current,Z.current=void 0),ce.clear()});T.useEffect(()=>fe,[fe]);const pe=He=>{mm.clear(),Ka=!0,he(!0),O&&!W&&O(He)},be=Te(He=>{mm.start(800+x,()=>{Ka=!1}),he(!1),C&&W&&C(He),ee.start(A.transitions.duration.shortest,()=>{se.current=!1})}),ge=He=>{se.current&&He.type!=="touchstart"||(L&&L.removeAttribute("title"),J.clear(),te.clear(),b||Ka&&m?J.start(Ka?m:b,()=>{pe(He)}):pe(He))},Re=He=>{J.clear(),te.start(x,()=>{be(He)})},[,Ve]=T.useState(!1),Ne=He=>{Cl(He.target)||(Ve(!1),Re(He))},Je=He=>{L||B(He.currentTarget),Cl(He.target)&&(Ve(!0),ge(He))},ke=He=>{se.current=!0;const _e=ae.props;_e.onTouchStart&&_e.onTouchStart(He)},ut=He=>{ke(He),te.clear(),ee.clear(),fe(),Z.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ce.start(v,()=>{document.body.style.WebkitUserSelect=Z.current,ge(He)})},Yt=He=>{ae.props.onTouchEnd&&ae.props.onTouchEnd(He),fe(),te.start(S,()=>{be(He)})};T.useEffect(()=>{if(!W)return;function He(_e){_e.key==="Escape"&&be(_e)}return document.addEventListener("keydown",He),()=>{document.removeEventListener("keydown",He)}},[be,W]);const rt=ct(zs(ae),B,n);!G&&G!==0&&(W=!1);const Ot=T.useRef(),Ut=He=>{const _e=ae.props;_e.onMouseMove&&_e.onMouseMove(He),ui={x:He.clientX,y:He.clientY},Ot.current&&Ot.current.update()},Lt={},Ue=typeof G=="string";u?(Lt.title=!W&&Ue&&!p?G:null,Lt["aria-describedby"]=W?re:null):(Lt["aria-label"]=Ue?G:null,Lt["aria-labelledby"]=W&&!Ue?re:null);const Be={...Lt,...H,...ae.props,className:Se(H.className,ae.props.className),onTouchStart:ke,ref:rt,...D?{onMouseMove:Ut}:{}};process.env.NODE_ENV!=="production"&&(Be["data-mui-internal-clone-element"]=!0,T.useEffect(()=>{L&&!L.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
266
266
  `))},[L]));const rn={};w||(Be.onTouchStart=ut,Be.onTouchEnd=Yt),p||(Be.onMouseOver=Xa(ge,Be.onMouseOver),Be.onMouseLeave=Xa(Re,Be.onMouseLeave),j||(rn.onMouseOver=ge,rn.onMouseLeave=Re)),f||(Be.onFocus=Xa(Je,Be.onFocus),Be.onBlur=Xa(Ne,Be.onBlur),j||(rn.onFocus=Je,rn.onBlur=Ne)),process.env.NODE_ENV!=="production"&&ae.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${ae.props.title}\` or the Tooltip component.`].join(`
267
- `));const dn=T.useMemo(()=>{let He=[{name:"arrow",enabled:!!ne,options:{element:ne,padding:4}}];return R.popperOptions?.modifiers&&(He=He.concat(R.popperOptions.modifiers)),{...R.popperOptions,modifiers:He}},[ne,R]),Oe={...o,isRtl:M,arrow:r,disableInteractive:j,placement:F,PopperComponentProp:z,touch:se.current},We=gD(Oe),ht=K.popper??l.Popper??yD,nn=K.transition??l.Transition??q??zr,An=K.tooltip??l.Tooltip??vD,at=K.arrow??l.Arrow??bD,Zt=bs(ht,{...R,...$.popper??d.popper,className:Se(We.popper,R?.className,($.popper??d.popper)?.className)},Oe),pn=bs(nn,{...Y,...$.transition??d.transition},Oe),Qt=bs(An,{...$.tooltip??d.tooltip,className:Se(We.tooltip,($.tooltip??d.tooltip)?.className)},Oe),cr=bs(at,{...$.arrow??d.arrow,className:Se(We.arrow,($.arrow??d.arrow)?.className)},Oe);return E.jsxs(T.Fragment,{children:[T.cloneElement(ae,Be),E.jsx(ht,{as:z??ac,placement:F,anchorEl:D?{getBoundingClientRect:()=>({top:ui.y,left:ui.x,right:ui.x,bottom:ui.y,width:0,height:0})}:L,popperRef:Ot,open:L?W:!1,id:re,transition:!0,...rn,...Zt,popperOptions:dn,children:({TransitionProps:He})=>E.jsx(nn,{timeout:A.transitions.duration.shorter,...He,...pn,children:E.jsxs(An,{...Qt,children:[G,r?E.jsx(at,{...cr,ref:oe}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Vy.propTypes={arrow:s.bool,children:Hs.isRequired,classes:s.object,className:s.string,components:s.shape({Arrow:s.elementType,Popper:s.elementType,Tooltip:s.elementType,Transition:s.elementType}),componentsProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),describeChild:s.bool,disableFocusListener:s.bool,disableHoverListener:s.bool,disableInteractive:s.bool,disableTouchListener:s.bool,enterDelay:s.number,enterNextDelay:s.number,enterTouchDelay:s.number,followCursor:s.bool,id:s.string,leaveDelay:s.number,leaveTouchDelay:s.number,onClose:s.func,onOpen:s.func,open:s.bool,placement:s.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:s.elementType,PopperProps:s.object,slotProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),slots:s.shape({arrow:s.elementType,popper:s.elementType,tooltip:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),title:s.node,TransitionComponent:s.elementType,TransitionProps:s.object});function wD(e){return Me("MuiTextField",e)}Pe("MuiTextField",["root"]);const CD={standard:Zi,filled:Xi,outlined:$s},SD=e=>{const{classes:t}=e;return Ie({root:["root"]},wD,t)},_D=ie(pa,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Vs=T.forwardRef(function(t,n){const o=Ge({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:a,className:l,color:d="primary",defaultValue:u,disabled:f=!1,error:p=!1,FormHelperTextProps:y,fullWidth:w=!1,helperText:b,id:m,InputLabelProps:v,inputProps:D,InputProps:k,inputRef:x,label:S,maxRows:C,minRows:O,multiline:I=!1,name:F,onBlur:z,onChange:R,onFocus:$,placeholder:K,required:G=!1,rows:q,select:Y=!1,SelectProps:H,slots:ae={},slotProps:A={},type:M,value:L,variant:B="outlined",...ne}=o,oe={...o,autoFocus:i,color:d,disabled:f,error:p,fullWidth:w,multiline:I,required:G,select:Y,variant:B},se=SD(oe);process.env.NODE_ENV!=="production"&&Y&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const j=sr(m),ee=b&&j?`${j}-helper-text`:void 0,J=S&&j?`${j}-label`:void 0,te=CD[B],ce={slots:ae,slotProps:{input:k,inputLabel:v,htmlInput:D,formHelperText:y,select:H,...A}},le={},he=ce.slotProps.inputLabel;B==="outlined"&&(he&&typeof he.shrink<"u"&&(le.notched=he.shrink),le.label=S),Y&&((!H||!H.native)&&(le.id=void 0),le["aria-describedby"]=void 0);const[W,re]=Dn("input",{elementType:te,externalForwardedProps:ce,additionalProps:le,ownerState:oe}),[Z,fe]=Dn("inputLabel",{elementType:ma,externalForwardedProps:ce,ownerState:oe}),[pe,be]=Dn("htmlInput",{elementType:"input",externalForwardedProps:ce,ownerState:oe}),[ge,Re]=Dn("formHelperText",{elementType:Zu,externalForwardedProps:ce,ownerState:oe}),[Ve,Ne]=Dn("select",{elementType:ga,externalForwardedProps:ce,ownerState:oe}),Je=E.jsx(W,{"aria-describedby":ee,autoComplete:r,autoFocus:i,defaultValue:u,fullWidth:w,multiline:I,name:F,rows:q,maxRows:C,minRows:O,type:M,value:L,id:j,inputRef:x,onBlur:z,onChange:R,onFocus:$,placeholder:K,inputProps:be,slots:{input:ae.htmlInput?pe:void 0},...re});return E.jsxs(_D,{className:Se(se.root,l),disabled:f,error:p,fullWidth:w,ref:n,required:G,color:d,variant:B,ownerState:oe,...ne,children:[S!=null&&S!==""&&E.jsx(Z,{htmlFor:j,id:J,...fe,children:S}),Y?E.jsx(Ve,{"aria-describedby":ee,id:j,labelId:J,value:L,input:Je,...Ne,children:a}):Je,b&&E.jsx(ge,{id:ee,...Re,children:b})]})});process.env.NODE_ENV!=="production"&&(Vs.propTypes={autoComplete:s.string,autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),defaultValue:s.any,disabled:s.bool,error:s.bool,FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onFocus:s.func,placeholder:s.string,required:s.bool,rows:s.oneOfType([s.number,s.string]),select:s.bool,SelectProps:s.object,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({formHelperText:s.oneOfType([s.func,s.object]),htmlInput:s.oneOfType([s.func,s.object]),input:s.oneOfType([s.func,s.object]),inputLabel:s.oneOfType([s.func,s.object]),select:s.oneOfType([s.func,s.object])}),slots:s.shape({formHelperText:s.elementType,htmlInput:s.elementType,input:s.elementType,inputLabel:s.elementType,select:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any,variant:s.oneOf(["filled","outlined","standard"])});const xD=ie($y)({width:"100%",borderRadius:"10px"}),RD={Skeleton:xD},TD=({height:e="calc(100% - 1em)"})=>E.jsx(RD.Skeleton,{variant:"rectangular",height:e});var je=(e=>(e[e.Boolean=1]="Boolean",e[e.DateBetween=2]="DateBetween",e[e.DateEqual=3]="DateEqual",e[e.DateFrom=4]="DateFrom",e[e.DateTo=5]="DateTo",e[e.MultipleSelect=6]="MultipleSelect",e[e.NumberBetween=7]="NumberBetween",e[e.NumberEqual=8]="NumberEqual",e[e.NumberFrom=9]="NumberFrom",e[e.NumberTo=10]="NumberTo",e[e.TextContain=11]="TextContain",e[e.TextEqual=12]="TextEqual",e[e.TextNotContain=13]="TextNotContain",e[e.TextNotEqual=14]="TextNotEqual",e))(je||{}),hn=(e=>(e.Boolean="Boolean",e.Date="Date",e.MultipleSelect="MultipleSelect",e.Number="Number",e.NumberFormatted="NumberFormatted",e.Text="Text",e))(hn||{}),Yr=(e=>(e.db="YYYY-MM-DD",e.ui="MM/DD/YY",e))(Yr||{}),Ar=(e=>(e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.Control="Control",e.Enter="Enter",e.Tab="Tab",e))(Ar||{}),Kr=(e=>(e[e.KeyB=66]="KeyB",e[e.KeyDel=46]="KeyDel",e[e.KeyEnter=13]="KeyEnter",e[e.KeyR=82]="KeyR",e[e.KeyS=83]="KeyS",e[e.KeyY=89]="KeyY",e[e.KeyZ=90]="KeyZ",e))(Kr||{}),Co=(e=>(e[e.DATE=1]="DATE",e[e.NUMBER=2]="NUMBER",e[e.NUMBER_FORMATTED=3]="NUMBER_FORMATTED",e[e.TEXT_NUMERIC=4]="TEXT_NUMERIC",e[e.TEXT=5]="TEXT",e))(Co||{});const gm=e=>t=>{t.keyCode===Kr.KeyEnter&&(t.stopImmediatePropagation(),e.navigateNext())},kD=e=>(t,n)=>{const{grid:o,item:r}=n;r.isEdited=!0,o.invalidate(),e.isEdited=!0,e.hotKeysBehavior.pushToCommandQueue(o)},ED=e=>(t,n)=>{e.invalidateRows(n.rows),e.render()},PD=e=>()=>{const t=e.grid;t&&(t.updateRowCount(),t.render())};class DD{constructor({hiddenColumnIds:t}={}){this._initialColumns=[],this._visibleColumnIds=[],this._hiddenColumnIds=[],t&&(this._hiddenColumnIds=t)}get visibleColumnIds(){return this._visibleColumnIds}set visibleColumnIds(t){this._visibleColumnIds=t}get initialColumns(){return this._initialColumns}set initialColumns(t){this.visibleColumnIds.length||(this.visibleColumnIds=t.map(({id:n})=>n).filter(n=>!this._hiddenColumnIds.includes(n))),this._initialColumns=t}}const bd=e=>e!==e?"":String(e??"").replace(/(^")|("$)/g,"");function jy(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}const OD=["FormatterStatus","FormatterNumber"];class MD{constructor(){this.table=null}download(t,n,o){if(this.table||(this.table=t),this.table=t,!t.grid)return;const i=this.createCSV(t),a=document.createElement("a");a.href="data:text/csv;charset=utf-8,"+encodeURIComponent(i),a.target="_blank",a.download=`${n}-${o}-${t.id}.csv`,a.click()}createCSV(t){this.table||(this.table=t);const n=t.grid;if(!n)return"";const o=this.getTitle(),r=this.getCSVHeader(n),i=this.getCSVBody(n);return`${o}${r}${i}`}getTitle(){return""}getCSVHeader(t){const r=t.getColumns().filter(i=>i.forPrint).reduce((i,a)=>{if(typeof a.name=="string"){const l=bd(a.name);return i.concat(`"${l}",`)}else return i.concat('" ",')},"");return this.addRowSeparator(r)}getCSVBody(t){const n=t.getData(),r=t.getColumns().filter(i=>i.forPrint);return EF(t).reduce((i,a)=>{const l=n.getItemMetadata(a),d=n.getItem(a),u=d.__group,f=d.__groupTotals;let p="";if(u){const y=bd(jy(d.title));p+=`"${y}",`}else for(let y=0;y<r.length;++y){const w=r[y],b=w.field,m=l?.columns?.[b]?.formatter,v=w.printer||m||w.formatter;let D=d[b];if(f){const x=w.groupTotalsFormatter;D=x?x(d,w,t):""}else v&&!OD.includes(v.name)&&(D=v(0,0,D,w,d,t));const k=bd(D);p+=`"${k}",`}return this.addRowSeparator(`${i}${p}`)},"")}addRowSeparator(t){return`${t}
268
- `}}class ID{constructor(){this.externalVariables={},this.commandQueue=[],this.queueIndex=-1}getQueueIndex(){return this.queueIndex}setQueueIndex(t){this.queueIndex=t}handleKeyboardEvent(t,n){const o=n.grid;if(!n.isActive||!o)return;const r=o.getData();if(Eh(t)){if(t.preventDefault(),t.stopImmediatePropagation(),lF(o)||this.externalVariables.editingAllowed===!1)return;zv(o),o.invalidate(),this.pushToCommandQueue(o),n.isEdited=!0}else if(Hv(t)){t.preventDefault(),t.stopImmediatePropagation();const i=o.getSelectedRows();if(!i.length)return;i.forEach(a=>{const l=r.getItem(a);l.isDeleted=!0}),o.setSelectedRows([]),r.refresh(),o.invalidate(),this.pushToCommandQueue(o),n.isEdited=!0}else if(Dh(t)){t.preventDefault(),t.stopImmediatePropagation();const i=this.getQueueIndex();if(i<1)return;const a=i-1;this.setQueueIndex(a),r.setItems(wd(this.commandQueue[a])),o.invalidate(),n.isEdited=a!==0}else if(Ph(t)){t.preventDefault(),t.stopImmediatePropagation();const i=this.getQueueIndex();if(i===this.commandQueue.length-1)return;const a=i+1;this.setQueueIndex(a),r.setItems(wd(this.commandQueue[a])),o.invalidate(),n.isEdited=!0}}pushToCommandQueue(t){if(!t)return;const o=t.getData().getItems(),i=this.getQueueIndex()+1;this.commandQueue.length=i,this.commandQueue.push(wd(o)),this.setQueueIndex(i)}resetQueue(){this.commandQueue.length=0,this.queueIndex=-1}setExternalVariables(t){this.externalVariables={...this.externalVariables,...t}}getExternalVariables(){return this.externalVariables}}function wd(e){return e.map(t=>({...t}))}class By{handleKeyboardEvent(){}pushToCommandQueue(){}resetQueue(){}setExternalVariables(t){}getExternalVariables(){return{}}}class mc{constructor(t){this.hotKeysBehaviour=t}handleKeyboardEvent(t,n){this.hotKeysBehaviour.handleKeyboardEvent(t,n)}pushToCommandQueue(t){this.hotKeysBehaviour.pushToCommandQueue(t)}resetQueue(){this.hotKeysBehaviour.resetQueue()}setExternalVariables(t){this.hotKeysBehaviour.setExternalVariables(t)}getExternalVariables(){return this.hotKeysBehaviour.getExternalVariables()}}class ND extends mc{handleKeyboardEvent(t,n){n.isActive&&(Eh(t)||super.handleKeyboardEvent.call(this,t,n))}}class AD extends mc{handleKeyboardEvent(t,n){n.isActive&&(Ph(t)||Dh(t))&&super.handleKeyboardEvent.call(this,t,n)}}const iu="checkboxSelector";//! moment.js
267
+ `));const dn=T.useMemo(()=>{let He=[{name:"arrow",enabled:!!ne,options:{element:ne,padding:4}}];return R.popperOptions?.modifiers&&(He=He.concat(R.popperOptions.modifiers)),{...R.popperOptions,modifiers:He}},[ne,R]),Oe={...o,isRtl:M,arrow:r,disableInteractive:j,placement:F,PopperComponentProp:z,touch:se.current},We=gD(Oe),ht=K.popper??l.Popper??yD,nn=K.transition??l.Transition??q??zr,An=K.tooltip??l.Tooltip??vD,at=K.arrow??l.Arrow??bD,Zt=bs(ht,{...R,...$.popper??d.popper,className:Se(We.popper,R?.className,($.popper??d.popper)?.className)},Oe),pn=bs(nn,{...Y,...$.transition??d.transition},Oe),Qt=bs(An,{...$.tooltip??d.tooltip,className:Se(We.tooltip,($.tooltip??d.tooltip)?.className)},Oe),cr=bs(at,{...$.arrow??d.arrow,className:Se(We.arrow,($.arrow??d.arrow)?.className)},Oe);return E.jsxs(T.Fragment,{children:[T.cloneElement(ae,Be),E.jsx(ht,{as:z??ac,placement:F,anchorEl:D?{getBoundingClientRect:()=>({top:ui.y,left:ui.x,right:ui.x,bottom:ui.y,width:0,height:0})}:L,popperRef:Ot,open:L?W:!1,id:re,transition:!0,...rn,...Zt,popperOptions:dn,children:({TransitionProps:He})=>E.jsx(nn,{timeout:A.transitions.duration.shorter,...He,...pn,children:E.jsxs(An,{...Qt,children:[G,r?E.jsx(at,{...cr,ref:oe}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Vy.propTypes={arrow:s.bool,children:Hs.isRequired,classes:s.object,className:s.string,components:s.shape({Arrow:s.elementType,Popper:s.elementType,Tooltip:s.elementType,Transition:s.elementType}),componentsProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),describeChild:s.bool,disableFocusListener:s.bool,disableHoverListener:s.bool,disableInteractive:s.bool,disableTouchListener:s.bool,enterDelay:s.number,enterNextDelay:s.number,enterTouchDelay:s.number,followCursor:s.bool,id:s.string,leaveDelay:s.number,leaveTouchDelay:s.number,onClose:s.func,onOpen:s.func,open:s.bool,placement:s.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:s.elementType,PopperProps:s.object,slotProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),slots:s.shape({arrow:s.elementType,popper:s.elementType,tooltip:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),title:s.node,TransitionComponent:s.elementType,TransitionProps:s.object});function wD(e){return Me("MuiTextField",e)}Pe("MuiTextField",["root"]);const CD={standard:Zi,filled:Xi,outlined:$s},SD=e=>{const{classes:t}=e;return Ie({root:["root"]},wD,t)},_D=ie(pa,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Vs=T.forwardRef(function(t,n){const o=Ge({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:a,className:l,color:d="primary",defaultValue:u,disabled:f=!1,error:p=!1,FormHelperTextProps:y,fullWidth:w=!1,helperText:b,id:m,InputLabelProps:v,inputProps:D,InputProps:k,inputRef:x,label:S,maxRows:C,minRows:O,multiline:I=!1,name:F,onBlur:z,onChange:R,onFocus:$,placeholder:K,required:G=!1,rows:q,select:Y=!1,SelectProps:H,slots:ae={},slotProps:A={},type:M,value:L,variant:B="outlined",...ne}=o,oe={...o,autoFocus:i,color:d,disabled:f,error:p,fullWidth:w,multiline:I,required:G,select:Y,variant:B},se=SD(oe);process.env.NODE_ENV!=="production"&&Y&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const j=sr(m),ee=b&&j?`${j}-helper-text`:void 0,J=S&&j?`${j}-label`:void 0,te=CD[B],ce={slots:ae,slotProps:{input:k,inputLabel:v,htmlInput:D,formHelperText:y,select:H,...A}},le={},he=ce.slotProps.inputLabel;B==="outlined"&&(he&&typeof he.shrink<"u"&&(le.notched=he.shrink),le.label=S),Y&&((!H||!H.native)&&(le.id=void 0),le["aria-describedby"]=void 0);const[W,re]=Dn("input",{elementType:te,externalForwardedProps:ce,additionalProps:le,ownerState:oe}),[Z,fe]=Dn("inputLabel",{elementType:ma,externalForwardedProps:ce,ownerState:oe}),[pe,be]=Dn("htmlInput",{elementType:"input",externalForwardedProps:ce,ownerState:oe}),[ge,Re]=Dn("formHelperText",{elementType:Zu,externalForwardedProps:ce,ownerState:oe}),[Ve,Ne]=Dn("select",{elementType:ga,externalForwardedProps:ce,ownerState:oe}),Je=E.jsx(W,{"aria-describedby":ee,autoComplete:r,autoFocus:i,defaultValue:u,fullWidth:w,multiline:I,name:F,rows:q,maxRows:C,minRows:O,type:M,value:L,id:j,inputRef:x,onBlur:z,onChange:R,onFocus:$,placeholder:K,inputProps:be,slots:{input:ae.htmlInput?pe:void 0},...re});return E.jsxs(_D,{className:Se(se.root,l),disabled:f,error:p,fullWidth:w,ref:n,required:G,color:d,variant:B,ownerState:oe,...ne,children:[S!=null&&S!==""&&E.jsx(Z,{htmlFor:j,id:J,...fe,children:S}),Y?E.jsx(Ve,{"aria-describedby":ee,id:j,labelId:J,value:L,input:Je,...Ne,children:a}):Je,b&&E.jsx(ge,{id:ee,...Re,children:b})]})});process.env.NODE_ENV!=="production"&&(Vs.propTypes={autoComplete:s.string,autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),defaultValue:s.any,disabled:s.bool,error:s.bool,FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onFocus:s.func,placeholder:s.string,required:s.bool,rows:s.oneOfType([s.number,s.string]),select:s.bool,SelectProps:s.object,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({formHelperText:s.oneOfType([s.func,s.object]),htmlInput:s.oneOfType([s.func,s.object]),input:s.oneOfType([s.func,s.object]),inputLabel:s.oneOfType([s.func,s.object]),select:s.oneOfType([s.func,s.object])}),slots:s.shape({formHelperText:s.elementType,htmlInput:s.elementType,input:s.elementType,inputLabel:s.elementType,select:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any,variant:s.oneOf(["filled","outlined","standard"])});const xD=ie($y)({width:"100%",borderRadius:"10px"}),RD={Skeleton:xD},TD=({height:e="calc(100% - 1em)"})=>E.jsx(RD.Skeleton,{variant:"rectangular",height:e});var je=(e=>(e[e.Boolean=1]="Boolean",e[e.DateBetween=2]="DateBetween",e[e.DateEqual=3]="DateEqual",e[e.DateFrom=4]="DateFrom",e[e.DateTo=5]="DateTo",e[e.MultipleSelect=6]="MultipleSelect",e[e.NumberBetween=7]="NumberBetween",e[e.NumberEqual=8]="NumberEqual",e[e.NumberFrom=9]="NumberFrom",e[e.NumberTo=10]="NumberTo",e[e.TextContain=11]="TextContain",e[e.TextEqual=12]="TextEqual",e[e.TextNotContain=13]="TextNotContain",e[e.TextNotEqual=14]="TextNotEqual",e))(je||{}),hn=(e=>(e.Boolean="Boolean",e.Date="Date",e.MultipleSelect="MultipleSelect",e.Number="Number",e.NumberFormatted="NumberFormatted",e.Text="Text",e))(hn||{}),Yr=(e=>(e.db="YYYY-MM-DD",e.ui="MM/DD/YY",e))(Yr||{}),Ar=(e=>(e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.Control="Control",e.Enter="Enter",e.Tab="Tab",e))(Ar||{}),Kr=(e=>(e[e.KeyB=66]="KeyB",e[e.KeyDel=46]="KeyDel",e[e.KeyEnter=13]="KeyEnter",e[e.KeyR=82]="KeyR",e[e.KeyS=83]="KeyS",e[e.KeyY=89]="KeyY",e[e.KeyZ=90]="KeyZ",e))(Kr||{}),Co=(e=>(e[e.DATE=1]="DATE",e[e.NUMBER=2]="NUMBER",e[e.NUMBER_FORMATTED=3]="NUMBER_FORMATTED",e[e.TEXT_NUMERIC=4]="TEXT_NUMERIC",e[e.TEXT=5]="TEXT",e))(Co||{});const gm=e=>t=>{t.keyCode===Kr.KeyEnter&&(t.stopImmediatePropagation(),e.navigateNext())},kD=e=>(t,n)=>{const{grid:o,item:r}=n;r.isEdited=!0,o.invalidate(),e.isEdited=!0,e.hotKeysBehavior.pushToCommandQueue(o)},ED=e=>(t,n)=>{e.invalidateRows(n.rows),e.render()},PD=e=>()=>{const t=e.grid;t&&(t.updateRowCount(),t.render())};class DD{constructor({hiddenColumnIds:t}={}){this._initialColumns=[],this._visibleColumnIds=[],this._hiddenColumnIds=[],t&&(this._hiddenColumnIds=t)}get visibleColumnIds(){return this._visibleColumnIds}set visibleColumnIds(t){this._visibleColumnIds=t}get initialColumns(){return this._initialColumns}set initialColumns(t){this.visibleColumnIds.length||(this.visibleColumnIds=t.map(({id:n})=>n).filter(n=>!this._hiddenColumnIds.includes(n))),this._initialColumns=t}}const bd=e=>e!==e?"":String(e??"").replace(/(^")|("$)/g,"");function jy(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}const OD=["FormatterStatus","FormatterNumber"];class MD{constructor(){this.table=null}download(t,n,o){if(this.table||(this.table=t),this.table=t,!t.grid)return;const i=this.createCSV(t),a=document.createElement("a");a.href="data:text/csv;charset=utf-8,"+encodeURIComponent(i),a.target="_blank",a.download=`${n}-${o}-${t.id}.csv`,a.click()}createCSV(t){this.table||(this.table=t);const n=t.grid;if(!n)return"";const o=this.getTitle(),r=this.getCSVHeader(n),i=this.getCSVBody(n);return`${o}${r}${i}`}getTitle(){return""}getCSVHeader(t){const r=t.getColumns().filter(i=>i.forPrint).reduce((i,a)=>{if(typeof a.name=="string"){const l=bd(a.name);return i.concat(`"${l}",`)}else return i.concat('" ",')},"");return this.addRowSeparator(r)}getCSVBody(t){const n=t.getData(),r=t.getColumns().filter(i=>i.forPrint);return PF(t).reduce((i,a)=>{const l=n.getItemMetadata(a),d=n.getItem(a),u=d.__group,f=d.__groupTotals;let p="";if(u){const y=bd(jy(d.title));p+=`"${y}",`}else for(let y=0;y<r.length;++y){const w=r[y],b=w.field,m=l?.columns?.[b]?.formatter,v=w.printer||m||w.formatter;let D=d[b];if(f){const x=w.groupTotalsFormatter;D=x?x(d,w,t):""}else v&&!OD.includes(v.name)&&(D=v(0,0,D,w,d,t));const k=bd(D);p+=`"${k}",`}return this.addRowSeparator(`${i}${p}`)},"")}addRowSeparator(t){return`${t}
268
+ `}}class ID{constructor(){this.externalVariables={},this.commandQueue=[],this.queueIndex=-1}getQueueIndex(){return this.queueIndex}setQueueIndex(t){this.queueIndex=t}handleKeyboardEvent(t,n){const o=n.grid;if(!n.isActive||!o)return;const r=o.getData();if(Eh(t)){if(t.preventDefault(),t.stopImmediatePropagation(),cF(o)||this.externalVariables.editingAllowed===!1)return;zv(o),o.invalidate(),this.pushToCommandQueue(o),n.isEdited=!0}else if(Hv(t)){t.preventDefault(),t.stopImmediatePropagation();const i=o.getSelectedRows();if(!i.length)return;i.forEach(a=>{const l=r.getItem(a);l.isDeleted=!0}),o.setSelectedRows([]),r.refresh(),o.invalidate(),this.pushToCommandQueue(o),n.isEdited=!0}else if(Dh(t)){t.preventDefault(),t.stopImmediatePropagation();const i=this.getQueueIndex();if(i<1)return;const a=i-1;this.setQueueIndex(a),r.setItems(wd(this.commandQueue[a])),o.invalidate(),n.isEdited=a!==0}else if(Ph(t)){t.preventDefault(),t.stopImmediatePropagation();const i=this.getQueueIndex();if(i===this.commandQueue.length-1)return;const a=i+1;this.setQueueIndex(a),r.setItems(wd(this.commandQueue[a])),o.invalidate(),n.isEdited=!0}}pushToCommandQueue(t){if(!t)return;const o=t.getData().getItems(),i=this.getQueueIndex()+1;this.commandQueue.length=i,this.commandQueue.push(wd(o)),this.setQueueIndex(i)}resetQueue(){this.commandQueue.length=0,this.queueIndex=-1}setExternalVariables(t){this.externalVariables={...this.externalVariables,...t}}getExternalVariables(){return this.externalVariables}}function wd(e){return e.map(t=>({...t}))}class By{handleKeyboardEvent(){}pushToCommandQueue(){}resetQueue(){}setExternalVariables(t){}getExternalVariables(){return{}}}class mc{constructor(t){this.hotKeysBehaviour=t}handleKeyboardEvent(t,n){this.hotKeysBehaviour.handleKeyboardEvent(t,n)}pushToCommandQueue(t){this.hotKeysBehaviour.pushToCommandQueue(t)}resetQueue(){this.hotKeysBehaviour.resetQueue()}setExternalVariables(t){this.hotKeysBehaviour.setExternalVariables(t)}getExternalVariables(){return this.hotKeysBehaviour.getExternalVariables()}}class ND extends mc{handleKeyboardEvent(t,n){n.isActive&&(Eh(t)||super.handleKeyboardEvent.call(this,t,n))}}class AD extends mc{handleKeyboardEvent(t,n){n.isActive&&(Ph(t)||Dh(t))&&super.handleKeyboardEvent.call(this,t,n)}}const iu="checkboxSelector";//! moment.js
269
269
  //! version : 2.30.1
270
270
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
271
271
  //! license : MIT
@@ -274,7 +274,7 @@ var Wy;function xe(){return Wy.apply(null,arguments)}function FD(e){Wy=e}functio
274
274
  [`+i+"] ";for(a in arguments[0])mt(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[i];o.push(r)}zy(e+`
275
275
  Arguments: `+Array.prototype.slice.call(o).join("")+`
276
276
  `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var vm={};function Yy(e,t){xe.deprecationHandler!=null&&xe.deprecationHandler(e,t),vm[e]||(zy(t),vm[e]=!0)}xe.suppressDeprecationWarnings=!1;xe.deprecationHandler=null;function Ao(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function $D(e){var t,n;for(n in e)mt(e,n)&&(t=e[n],Ao(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function lu(e,t){var n=mr({},e),o;for(o in t)mt(t,o)&&(jr(e[o])&&jr(t[o])?(n[o]={},mr(n[o],e[o]),mr(n[o],t[o])):t[o]!=null?n[o]=t[o]:delete n[o]);for(o in e)mt(e,o)&&!mt(t,o)&&jr(e[o])&&(n[o]=mr({},n[o]));return n}function sh(e){e!=null&&this.set(e)}var cu;Object.keys?cu=Object.keys:cu=function(e){var t,n=[];for(t in e)mt(e,t)&&n.push(t);return n};var VD={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function jD(e,t,n){var o=this._calendar[e]||this._calendar.sameElse;return Ao(o)?o.call(t,n):o}function Mo(e,t,n){var o=""+Math.abs(e),r=t-o.length,i=e>=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+o}var ih=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Za=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Sd={},Ts={};function $e(e,t,n,o){var r=o;typeof o=="string"&&(r=function(){return this[o]()}),e&&(Ts[e]=r),t&&(Ts[t[0]]=function(){return Mo(r.apply(this,arguments),t[1],t[2])}),n&&(Ts[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function BD(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function WD(e){var t=e.match(ih),n,o;for(n=0,o=t.length;n<o;n++)Ts[t[n]]?t[n]=Ts[t[n]]:t[n]=BD(t[n]);return function(r){var i="",a;for(a=0;a<o;a++)i+=Ao(t[a])?t[a].call(r,e):t[a];return i}}function fl(e,t){return e.isValid()?(t=Uy(t,e.localeData()),Sd[t]=Sd[t]||WD(t),Sd[t](e)):e.localeData().invalidDate()}function Uy(e,t){var n=5;function o(r){return t.longDateFormat(r)||r}for(Za.lastIndex=0;n>=0&&Za.test(e);)e=e.replace(Za,o),Za.lastIndex=0,n-=1;return e}var HD={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function zD(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ih).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[e])}var YD="Invalid date";function UD(){return this._invalidDate}var qD="%d",GD=/\d{1,2}/;function KD(e){return this._ordinal.replace("%d",e)}var XD={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ZD(e,t,n,o){var r=this._relativeTime[n];return Ao(r)?r(e,t,n,o):r.replace(/%d/i,e)}function QD(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ao(n)?n(t):n.replace(/%s/i,t)}var bm={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function so(e){return typeof e=="string"?bm[e]||bm[e.toLowerCase()]:void 0}function ah(e){var t={},n,o;for(o in e)mt(e,o)&&(n=so(o),n&&(t[n]=e[o]));return t}var JD={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function eO(e){var t=[],n;for(n in e)mt(e,n)&&t.push({unit:n,priority:JD[n]});return t.sort(function(o,r){return o.priority-r.priority}),t}var qy=/\d/,Bn=/\d\d/,Gy=/\d{3}/,lh=/\d{4}/,yc=/[+-]?\d{6}/,At=/\d\d?/,Ky=/\d\d\d\d?/,Xy=/\d\d\d\d\d\d?/,vc=/\d{1,3}/,ch=/\d{1,4}/,bc=/[+-]?\d{1,6}/,qs=/\d+/,wc=/[+-]?\d+/,tO=/Z|[+-]\d\d:?\d\d/gi,Cc=/Z|[+-]\d\d(?::?\d\d)?/gi,nO=/[+-]?\d+(\.\d{1,3})?/,ba=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Gs=/^[1-9]\d?/,dh=/^([1-9]\d|\d)/,Dl;Dl={};function De(e,t,n){Dl[e]=Ao(t)?t:function(o,r){return o&&n?n:t}}function oO(e,t){return mt(Dl,e)?Dl[e](t._strict,t._locale):new RegExp(rO(e))}function rO(e){return Xo(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,o,r,i){return n||o||r||i}))}function Xo(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Kn(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function nt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Kn(t)),n}var du={};function Et(e,t){var n,o=t,r;for(typeof e=="string"&&(e=[e]),nr(t)&&(o=function(i,a){a[t]=nt(i)}),r=e.length,n=0;n<r;n++)du[e[n]]=o}function wa(e,t){Et(e,function(n,o,r,i){r._w=r._w||{},t(n,r._w,r,i)})}function sO(e,t,n){t!=null&&mt(du,e)&&du[e](t,n._a,n,e)}function Sc(e){return e%4===0&&e%100!==0||e%400===0}var _n=0,qo=1,To=2,an=3,co=4,Go=5,Lr=6,iO=7,aO=8;$e("Y",0,0,function(){var e=this.year();return e<=9999?Mo(e,4):"+"+e});$e(0,["YY",2],0,function(){return this.year()%100});$e(0,["YYYY",4],0,"year");$e(0,["YYYYY",5],0,"year");$e(0,["YYYYYY",6,!0],0,"year");De("Y",wc);De("YY",At,Bn);De("YYYY",ch,lh);De("YYYYY",bc,yc);De("YYYYYY",bc,yc);Et(["YYYYY","YYYYYY"],_n);Et("YYYY",function(e,t){t[_n]=e.length===2?xe.parseTwoDigitYear(e):nt(e)});Et("YY",function(e,t){t[_n]=xe.parseTwoDigitYear(e)});Et("Y",function(e,t){t[_n]=parseInt(e,10)});function Ai(e){return Sc(e)?366:365}xe.parseTwoDigitYear=function(e){return nt(e)+(nt(e)>68?1900:2e3)};var Zy=Ks("FullYear",!0);function lO(){return Sc(this.year())}function Ks(e,t){return function(n){return n!=null?(Qy(this,e,n),xe.updateOffset(this,t),this):Qi(this,e)}}function Qi(e,t){if(!e.isValid())return NaN;var n=e._d,o=e._isUTC;switch(t){case"Milliseconds":return o?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return o?n.getUTCSeconds():n.getSeconds();case"Minutes":return o?n.getUTCMinutes():n.getMinutes();case"Hours":return o?n.getUTCHours():n.getHours();case"Date":return o?n.getUTCDate():n.getDate();case"Day":return o?n.getUTCDay():n.getDay();case"Month":return o?n.getUTCMonth():n.getMonth();case"FullYear":return o?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Qy(e,t,n){var o,r,i,a,l;if(!(!e.isValid()||isNaN(n))){switch(o=e._d,r=e._isUTC,t){case"Milliseconds":return void(r?o.setUTCMilliseconds(n):o.setMilliseconds(n));case"Seconds":return void(r?o.setUTCSeconds(n):o.setSeconds(n));case"Minutes":return void(r?o.setUTCMinutes(n):o.setMinutes(n));case"Hours":return void(r?o.setUTCHours(n):o.setHours(n));case"Date":return void(r?o.setUTCDate(n):o.setDate(n));case"FullYear":break;default:return}i=n,a=e.month(),l=e.date(),l=l===29&&a===1&&!Sc(i)?28:l,r?o.setUTCFullYear(i,a,l):o.setFullYear(i,a,l)}}function cO(e){return e=so(e),Ao(this[e])?this[e]():this}function dO(e,t){if(typeof e=="object"){e=ah(e);var n=eO(e),o,r=n.length;for(o=0;o<r;o++)this[n[o].unit](e[n[o].unit])}else if(e=so(e),Ao(this[e]))return this[e](t);return this}function uO(e,t){return(e%t+t)%t}var en;Array.prototype.indexOf?en=Array.prototype.indexOf:en=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function uh(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=uO(t,12);return e+=(t-n)/12,n===1?Sc(e)?29:28:31-n%7%2}$e("M",["MM",2],"Mo",function(){return this.month()+1});$e("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});$e("MMMM",0,0,function(e){return this.localeData().months(this,e)});De("M",At,Gs);De("MM",At,Bn);De("MMM",function(e,t){return t.monthsShortRegex(e)});De("MMMM",function(e,t){return t.monthsRegex(e)});Et(["M","MM"],function(e,t){t[qo]=nt(e)-1});Et(["MMM","MMMM"],function(e,t,n,o){var r=n._locale.monthsParse(e,o,n._strict);r!=null?t[qo]=r:qe(n).invalidMonth=e});var hO="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Jy="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ev=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fO=ba,pO=ba;function mO(e,t){return e?fo(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ev).test(t)?"format":"standalone"][e.month()]:fo(this._months)?this._months:this._months.standalone}function gO(e,t){return e?fo(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ev.test(t)?"format":"standalone"][e.month()]:fo(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function yO(e,t,n){var o,r,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)i=No([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(i,"").toLocaleLowerCase();return n?t==="MMM"?(r=en.call(this._shortMonthsParse,a),r!==-1?r:null):(r=en.call(this._longMonthsParse,a),r!==-1?r:null):t==="MMM"?(r=en.call(this._shortMonthsParse,a),r!==-1?r:(r=en.call(this._longMonthsParse,a),r!==-1?r:null)):(r=en.call(this._longMonthsParse,a),r!==-1?r:(r=en.call(this._shortMonthsParse,a),r!==-1?r:null))}function vO(e,t,n){var o,r,i;if(this._monthsParseExact)return yO.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(r=No([2e3,o]),n&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!n&&!this._monthsParse[o]&&(i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[o]=new RegExp(i.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[o].test(e))return o;if(n&&t==="MMM"&&this._shortMonthsParse[o].test(e))return o;if(!n&&this._monthsParse[o].test(e))return o}}function tv(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=nt(t);else if(t=e.localeData().monthsParse(t),!nr(t))return e}var n=t,o=e.date();return o=o<29?o:Math.min(o,uh(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,o):e._d.setMonth(n,o),e}function nv(e){return e!=null?(tv(this,e),xe.updateOffset(this,!0),this):Qi(this,"Month")}function bO(){return uh(this.year(),this.month())}function wO(e){return this._monthsParseExact?(mt(this,"_monthsRegex")||ov.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(mt(this,"_monthsShortRegex")||(this._monthsShortRegex=fO),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function CO(e){return this._monthsParseExact?(mt(this,"_monthsRegex")||ov.call(this),e?this._monthsStrictRegex:this._monthsRegex):(mt(this,"_monthsRegex")||(this._monthsRegex=pO),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function ov(){function e(d,u){return u.length-d.length}var t=[],n=[],o=[],r,i,a,l;for(r=0;r<12;r++)i=No([2e3,r]),a=Xo(this.monthsShort(i,"")),l=Xo(this.months(i,"")),t.push(a),n.push(l),o.push(l),o.push(a);t.sort(e),n.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function SO(e,t,n,o,r,i,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,o,r,i,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,o,r,i,a),l}function Ji(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ol(e,t,n){var o=7+t-n,r=(7+Ji(e,0,o).getUTCDay()-t)%7;return-r+o-1}function rv(e,t,n,o,r){var i=(7+n-o)%7,a=Ol(e,o,r),l=1+7*(t-1)+i+a,d,u;return l<=0?(d=e-1,u=Ai(d)+l):l>Ai(e)?(d=e+1,u=l-Ai(e)):(d=e,u=l),{year:d,dayOfYear:u}}function ea(e,t,n){var o=Ol(e.year(),t,n),r=Math.floor((e.dayOfYear()-o-1)/7)+1,i,a;return r<1?(a=e.year()-1,i=r+Zo(a,t,n)):r>Zo(e.year(),t,n)?(i=r-Zo(e.year(),t,n),a=e.year()+1):(a=e.year(),i=r),{week:i,year:a}}function Zo(e,t,n){var o=Ol(e,t,n),r=Ol(e+1,t,n);return(Ai(e)-o+r)/7}$e("w",["ww",2],"wo","week");$e("W",["WW",2],"Wo","isoWeek");De("w",At,Gs);De("ww",At,Bn);De("W",At,Gs);De("WW",At,Bn);wa(["w","ww","W","WW"],function(e,t,n,o){t[o.substr(0,1)]=nt(e)});function _O(e){return ea(e,this._week.dow,this._week.doy).week}var xO={dow:0,doy:6};function RO(){return this._week.dow}function TO(){return this._week.doy}function kO(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function EO(e){var t=ea(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}$e("d",0,"do","day");$e("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});$e("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});$e("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});$e("e",0,0,"weekday");$e("E",0,0,"isoWeekday");De("d",At);De("e",At);De("E",At);De("dd",function(e,t){return t.weekdaysMinRegex(e)});De("ddd",function(e,t){return t.weekdaysShortRegex(e)});De("dddd",function(e,t){return t.weekdaysRegex(e)});wa(["dd","ddd","dddd"],function(e,t,n,o){var r=n._locale.weekdaysParse(e,o,n._strict);r!=null?t.d=r:qe(n).invalidWeekday=e});wa(["d","e","E"],function(e,t,n,o){t[o]=nt(e)});function PO(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function DO(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function hh(e,t){return e.slice(t,7).concat(e.slice(0,t))}var OO="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),sv="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),MO="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),IO=ba,NO=ba,AO=ba;function FO(e,t){var n=fo(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?hh(n,this._week.dow):e?n[e.day()]:n}function LO(e){return e===!0?hh(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function $O(e){return e===!0?hh(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function VO(e,t,n){var o,r,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)i=No([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(i,"").toLocaleLowerCase();return n?t==="dddd"?(r=en.call(this._weekdaysParse,a),r!==-1?r:null):t==="ddd"?(r=en.call(this._shortWeekdaysParse,a),r!==-1?r:null):(r=en.call(this._minWeekdaysParse,a),r!==-1?r:null):t==="dddd"?(r=en.call(this._weekdaysParse,a),r!==-1||(r=en.call(this._shortWeekdaysParse,a),r!==-1)?r:(r=en.call(this._minWeekdaysParse,a),r!==-1?r:null)):t==="ddd"?(r=en.call(this._shortWeekdaysParse,a),r!==-1||(r=en.call(this._weekdaysParse,a),r!==-1)?r:(r=en.call(this._minWeekdaysParse,a),r!==-1?r:null)):(r=en.call(this._minWeekdaysParse,a),r!==-1||(r=en.call(this._weekdaysParse,a),r!==-1)?r:(r=en.call(this._shortWeekdaysParse,a),r!==-1?r:null))}function jO(e,t,n){var o,r,i;if(this._weekdaysParseExact)return VO.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(r=No([2e3,1]).day(o),n&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[o]=new RegExp(i.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[o].test(e))return o;if(n&&t==="ddd"&&this._shortWeekdaysParse[o].test(e))return o;if(n&&t==="dd"&&this._minWeekdaysParse[o].test(e))return o;if(!n&&this._weekdaysParse[o].test(e))return o}}function BO(e){if(!this.isValid())return e!=null?this:NaN;var t=Qi(this,"Day");return e!=null?(e=PO(e,this.localeData()),this.add(e-t,"d")):t}function WO(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function HO(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=DO(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function zO(e){return this._weekdaysParseExact?(mt(this,"_weekdaysRegex")||fh.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(mt(this,"_weekdaysRegex")||(this._weekdaysRegex=IO),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function YO(e){return this._weekdaysParseExact?(mt(this,"_weekdaysRegex")||fh.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(mt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=NO),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function UO(e){return this._weekdaysParseExact?(mt(this,"_weekdaysRegex")||fh.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(mt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=AO),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function fh(){function e(f,p){return p.length-f.length}var t=[],n=[],o=[],r=[],i,a,l,d,u;for(i=0;i<7;i++)a=No([2e3,1]).day(i),l=Xo(this.weekdaysMin(a,"")),d=Xo(this.weekdaysShort(a,"")),u=Xo(this.weekdays(a,"")),t.push(l),n.push(d),o.push(u),r.push(l),r.push(d),r.push(u);t.sort(e),n.sort(e),o.sort(e),r.sort(e),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ph(){return this.hours()%12||12}function qO(){return this.hours()||24}$e("H",["HH",2],0,"hour");$e("h",["hh",2],0,ph);$e("k",["kk",2],0,qO);$e("hmm",0,0,function(){return""+ph.apply(this)+Mo(this.minutes(),2)});$e("hmmss",0,0,function(){return""+ph.apply(this)+Mo(this.minutes(),2)+Mo(this.seconds(),2)});$e("Hmm",0,0,function(){return""+this.hours()+Mo(this.minutes(),2)});$e("Hmmss",0,0,function(){return""+this.hours()+Mo(this.minutes(),2)+Mo(this.seconds(),2)});function iv(e,t){$e(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}iv("a",!0);iv("A",!1);function av(e,t){return t._meridiemParse}De("a",av);De("A",av);De("H",At,dh);De("h",At,Gs);De("k",At,Gs);De("HH",At,Bn);De("hh",At,Bn);De("kk",At,Bn);De("hmm",Ky);De("hmmss",Xy);De("Hmm",Ky);De("Hmmss",Xy);Et(["H","HH"],an);Et(["k","kk"],function(e,t,n){var o=nt(e);t[an]=o===24?0:o});Et(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});Et(["h","hh"],function(e,t,n){t[an]=nt(e),qe(n).bigHour=!0});Et("hmm",function(e,t,n){var o=e.length-2;t[an]=nt(e.substr(0,o)),t[co]=nt(e.substr(o)),qe(n).bigHour=!0});Et("hmmss",function(e,t,n){var o=e.length-4,r=e.length-2;t[an]=nt(e.substr(0,o)),t[co]=nt(e.substr(o,2)),t[Go]=nt(e.substr(r)),qe(n).bigHour=!0});Et("Hmm",function(e,t,n){var o=e.length-2;t[an]=nt(e.substr(0,o)),t[co]=nt(e.substr(o))});Et("Hmmss",function(e,t,n){var o=e.length-4,r=e.length-2;t[an]=nt(e.substr(0,o)),t[co]=nt(e.substr(o,2)),t[Go]=nt(e.substr(r))});function GO(e){return(e+"").toLowerCase().charAt(0)==="p"}var KO=/[ap]\.?m?\.?/i,XO=Ks("Hours",!0);function ZO(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var lv={calendar:VD,longDateFormat:HD,invalidDate:YD,ordinal:qD,dayOfMonthOrdinalParse:GD,relativeTime:XD,months:hO,monthsShort:Jy,week:xO,weekdays:OO,weekdaysMin:MO,weekdaysShort:sv,meridiemParse:KO},Bt={},hi={},ta;function QO(e,t){var n,o=Math.min(e.length,t.length);for(n=0;n<o;n+=1)if(e[n]!==t[n])return n;return o}function wm(e){return e&&e.toLowerCase().replace("_","-")}function JO(e){for(var t=0,n,o,r,i;t<e.length;){for(i=wm(e[t]).split("-"),n=i.length,o=wm(e[t+1]),o=o?o.split("-"):null;n>0;){if(r=_c(i.slice(0,n).join("-")),r)return r;if(o&&o.length>=n&&QO(i,o)>=n-1)break;n--}t++}return ta}function eM(e){return!!(e&&e.match("^[^/\\\\]*$"))}function _c(e){var t=null,n;if(Bt[e]===void 0&&typeof module<"u"&&module&&module.exports&&eM(e))try{t=ta._abbr,n=require,n("./locale/"+e),yr(t)}catch{Bt[e]=null}return Bt[e]}function yr(e,t){var n;return e&&(Pn(t)?n=ir(e):n=mh(e,t),n?ta=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ta._abbr}function mh(e,t){if(t!==null){var n,o=lv;if(t.abbr=e,Bt[e]!=null)Yy("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Bt[e]._config;else if(t.parentLocale!=null)if(Bt[t.parentLocale]!=null)o=Bt[t.parentLocale]._config;else if(n=_c(t.parentLocale),n!=null)o=n._config;else return hi[t.parentLocale]||(hi[t.parentLocale]=[]),hi[t.parentLocale].push({name:e,config:t}),null;return Bt[e]=new sh(lu(o,t)),hi[e]&&hi[e].forEach(function(r){mh(r.name,r.config)}),yr(e),Bt[e]}else return delete Bt[e],null}function tM(e,t){if(t!=null){var n,o,r=lv;Bt[e]!=null&&Bt[e].parentLocale!=null?Bt[e].set(lu(Bt[e]._config,t)):(o=_c(e),o!=null&&(r=o._config),t=lu(r,t),o==null&&(t.abbr=e),n=new sh(t),n.parentLocale=Bt[e],Bt[e]=n),yr(e)}else Bt[e]!=null&&(Bt[e].parentLocale!=null?(Bt[e]=Bt[e].parentLocale,e===yr()&&yr(e)):Bt[e]!=null&&delete Bt[e]);return Bt[e]}function ir(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ta;if(!fo(e)){if(t=_c(e),t)return t;e=[e]}return JO(e)}function nM(){return cu(Bt)}function gh(e){var t,n=e._a;return n&&qe(e).overflow===-2&&(t=n[qo]<0||n[qo]>11?qo:n[To]<1||n[To]>uh(n[_n],n[qo])?To:n[an]<0||n[an]>24||n[an]===24&&(n[co]!==0||n[Go]!==0||n[Lr]!==0)?an:n[co]<0||n[co]>59?co:n[Go]<0||n[Go]>59?Go:n[Lr]<0||n[Lr]>999?Lr:-1,qe(e)._overflowDayOfYear&&(t<_n||t>To)&&(t=To),qe(e)._overflowWeeks&&t===-1&&(t=iO),qe(e)._overflowWeekday&&t===-1&&(t=aO),qe(e).overflow=t),e}var oM=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,rM=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,sM=/Z|[+-]\d\d(?::?\d\d)?/,Qa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_d=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],iM=/^\/?Date\((-?\d+)/i,aM=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,lM={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function cv(e){var t,n,o=e._i,r=oM.exec(o)||rM.exec(o),i,a,l,d,u=Qa.length,f=_d.length;if(r){for(qe(e).iso=!0,t=0,n=u;t<n;t++)if(Qa[t][1].exec(r[1])){a=Qa[t][0],i=Qa[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(r[3]){for(t=0,n=f;t<n;t++)if(_d[t][1].exec(r[3])){l=(r[2]||" ")+_d[t][0];break}if(l==null){e._isValid=!1;return}}if(!i&&l!=null){e._isValid=!1;return}if(r[4])if(sM.exec(r[4]))d="Z";else{e._isValid=!1;return}e._f=a+(l||"")+(d||""),vh(e)}else e._isValid=!1}function cM(e,t,n,o,r,i){var a=[dM(e),Jy.indexOf(t),parseInt(n,10),parseInt(o,10),parseInt(r,10)];return i&&a.push(parseInt(i,10)),a}function dM(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function uM(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function hM(e,t,n){if(e){var o=sv.indexOf(e),r=new Date(t[0],t[1],t[2]).getDay();if(o!==r)return qe(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function fM(e,t,n){if(e)return lM[e];if(t)return 0;var o=parseInt(n,10),r=o%100,i=(o-r)/100;return i*60+r}function dv(e){var t=aM.exec(uM(e._i)),n;if(t){if(n=cM(t[4],t[3],t[2],t[5],t[6],t[7]),!hM(t[1],n,e))return;e._a=n,e._tzm=fM(t[8],t[9],t[10]),e._d=Ji.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),qe(e).rfc2822=!0}else e._isValid=!1}function pM(e){var t=iM.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(cv(e),e._isValid===!1)delete e._isValid;else return;if(dv(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:xe.createFromInputFallback(e)}xe.createFromInputFallback=ro("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ys(e,t,n){return e??t??n}function mM(e){var t=new Date(xe.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function yh(e){var t,n,o=[],r,i,a;if(!e._d){for(r=mM(e),e._w&&e._a[To]==null&&e._a[qo]==null&&gM(e),e._dayOfYear!=null&&(a=ys(e._a[_n],r[_n]),(e._dayOfYear>Ai(a)||e._dayOfYear===0)&&(qe(e)._overflowDayOfYear=!0),n=Ji(a,0,e._dayOfYear),e._a[qo]=n.getUTCMonth(),e._a[To]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[an]===24&&e._a[co]===0&&e._a[Go]===0&&e._a[Lr]===0&&(e._nextDay=!0,e._a[an]=0),e._d=(e._useUTC?Ji:SO).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[an]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(qe(e).weekdayMismatch=!0)}}function gM(e){var t,n,o,r,i,a,l,d,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,a=4,n=ys(t.GG,e._a[_n],ea(It(),1,4).year),o=ys(t.W,1),r=ys(t.E,1),(r<1||r>7)&&(d=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,u=ea(It(),i,a),n=ys(t.gg,e._a[_n],u.year),o=ys(t.w,u.week),t.d!=null?(r=t.d,(r<0||r>6)&&(d=!0)):t.e!=null?(r=t.e+i,(t.e<0||t.e>6)&&(d=!0)):r=i),o<1||o>Zo(n,i,a)?qe(e)._overflowWeeks=!0:d!=null?qe(e)._overflowWeekday=!0:(l=rv(n,o,r,i,a),e._a[_n]=l.year,e._dayOfYear=l.dayOfYear)}xe.ISO_8601=function(){};xe.RFC_2822=function(){};function vh(e){if(e._f===xe.ISO_8601){cv(e);return}if(e._f===xe.RFC_2822){dv(e);return}e._a=[],qe(e).empty=!0;var t=""+e._i,n,o,r,i,a,l=t.length,d=0,u,f;for(r=Uy(e._f,e._locale).match(ih)||[],f=r.length,n=0;n<f;n++)i=r[n],o=(t.match(oO(i,e))||[])[0],o&&(a=t.substr(0,t.indexOf(o)),a.length>0&&qe(e).unusedInput.push(a),t=t.slice(t.indexOf(o)+o.length),d+=o.length),Ts[i]?(o?qe(e).empty=!1:qe(e).unusedTokens.push(i),sO(i,o,e)):e._strict&&!o&&qe(e).unusedTokens.push(i);qe(e).charsLeftOver=l-d,t.length>0&&qe(e).unusedInput.push(t),e._a[an]<=12&&qe(e).bigHour===!0&&e._a[an]>0&&(qe(e).bigHour=void 0),qe(e).parsedDateParts=e._a.slice(0),qe(e).meridiem=e._meridiem,e._a[an]=yM(e._locale,e._a[an],e._meridiem),u=qe(e).era,u!==null&&(e._a[_n]=e._locale.erasConvertYear(u,e._a[_n])),yh(e),gh(e)}function yM(e,t,n){var o;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(o=e.isPM(n),o&&t<12&&(t+=12),!o&&t===12&&(t=0)),t)}function vM(e){var t,n,o,r,i,a,l=!1,d=e._f.length;if(d===0){qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(r=0;r<d;r++)i=0,a=!1,t=rh({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[r],vh(t),oh(t)&&(a=!0),i+=qe(t).charsLeftOver,i+=qe(t).unusedTokens.length*10,qe(t).score=i,l?i<o&&(o=i,n=t):(o==null||i<o||a)&&(o=i,n=t,a&&(l=!0));mr(e,n||t)}function bM(e){if(!e._d){var t=ah(e._i),n=t.day===void 0?t.date:t.day;e._a=Hy([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(o){return o&&parseInt(o,10)}),yh(e)}}function wM(e){var t=new va(gh(uv(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function uv(e){var t=e._i,n=e._f;return e._locale=e._locale||ir(e._l),t===null||n===void 0&&t===""?gc({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),po(t)?new va(gh(t)):(ya(t)?e._d=t:fo(n)?vM(e):n?vh(e):CM(e),oh(e)||(e._d=null),e))}function CM(e){var t=e._i;Pn(t)?e._d=new Date(xe.now()):ya(t)?e._d=new Date(t.valueOf()):typeof t=="string"?pM(e):fo(t)?(e._a=Hy(t.slice(0),function(n){return parseInt(n,10)}),yh(e)):jr(t)?bM(e):nr(t)?e._d=new Date(t):xe.createFromInputFallback(e)}function hv(e,t,n,o,r){var i={};return(t===!0||t===!1)&&(o=t,t=void 0),(n===!0||n===!1)&&(o=n,n=void 0),(jr(e)&&nh(e)||fo(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=r,i._l=n,i._i=e,i._f=t,i._strict=o,wM(i)}function It(e,t,n,o){return hv(e,t,n,o,!1)}var SM=ro("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=It.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:gc()}),_M=ro("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=It.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:gc()});function fv(e,t){var n,o;if(t.length===1&&fo(t[0])&&(t=t[0]),!t.length)return It();for(n=t[0],o=1;o<t.length;++o)(!t[o].isValid()||t[o][e](n))&&(n=t[o]);return n}function xM(){var e=[].slice.call(arguments,0);return fv("isBefore",e)}function RM(){var e=[].slice.call(arguments,0);return fv("isAfter",e)}var TM=function(){return Date.now?Date.now():+new Date},fi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function kM(e){var t,n=!1,o,r=fi.length;for(t in e)if(mt(e,t)&&!(en.call(fi,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(o=0;o<r;++o)if(e[fi[o]]){if(n)return!1;parseFloat(e[fi[o]])!==nt(e[fi[o]])&&(n=!0)}return!0}function EM(){return this._isValid}function PM(){return mo(NaN)}function xc(e){var t=ah(e),n=t.year||0,o=t.quarter||0,r=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,d=t.minute||0,u=t.second||0,f=t.millisecond||0;this._isValid=kM(t),this._milliseconds=+f+u*1e3+d*6e4+l*1e3*60*60,this._days=+a+i*7,this._months=+r+o*3+n*12,this._data={},this._locale=ir(),this._bubble()}function pl(e){return e instanceof xc}function uu(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function DM(e,t,n){var o=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,a;for(a=0;a<o;a++)nt(e[a])!==nt(t[a])&&i++;return i+r}function pv(e,t){$e(e,0,0,function(){var n=this.utcOffset(),o="+";return n<0&&(n=-n,o="-"),o+Mo(~~(n/60),2)+t+Mo(~~n%60,2)})}pv("Z",":");pv("ZZ","");De("Z",Cc);De("ZZ",Cc);Et(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=bh(Cc,e)});var OM=/([\+\-]|\d\d)/gi;function bh(e,t){var n=(t||"").match(e),o,r,i;return n===null?null:(o=n[n.length-1]||[],r=(o+"").match(OM)||["-",0,0],i=+(r[1]*60)+nt(r[2]),i===0?0:r[0]==="+"?i:-i)}function wh(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(po(e)||ya(e)?e.valueOf():It(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),xe.updateOffset(n,!1),n):It(e).local()}function hu(e){return-Math.round(e._d.getTimezoneOffset())}xe.updateOffset=function(){};function MM(e,t,n){var o=this._offset||0,r;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=bh(Cc,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(r=hu(this)),this._offset=e,this._isUTC=!0,r!=null&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?yv(this,mo(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,xe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?o:hu(this)}function IM(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function NM(e){return this.utcOffset(0,e)}function AM(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(hu(this),"m")),this}function FM(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=bh(tO,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function LM(e){return this.isValid()?(e=e?It(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function $M(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function VM(){if(!Pn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return rh(e,this),e=uv(e),e._a?(t=e._isUTC?No(e._a):It(e._a),this._isDSTShifted=this.isValid()&&DM(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function jM(){return this.isValid()?!this._isUTC:!1}function BM(){return this.isValid()?this._isUTC:!1}function mv(){return this.isValid()?this._isUTC&&this._offset===0:!1}var WM=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,HM=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mo(e,t){var n=e,o=null,r,i,a;return pl(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:nr(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(o=WM.exec(e))?(r=o[1]==="-"?-1:1,n={y:0,d:nt(o[To])*r,h:nt(o[an])*r,m:nt(o[co])*r,s:nt(o[Go])*r,ms:nt(uu(o[Lr]*1e3))*r}):(o=HM.exec(e))?(r=o[1]==="-"?-1:1,n={y:Er(o[2],r),M:Er(o[3],r),w:Er(o[4],r),d:Er(o[5],r),h:Er(o[6],r),m:Er(o[7],r),s:Er(o[8],r)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=zM(It(n.from),It(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),i=new xc(n),pl(e)&&mt(e,"_locale")&&(i._locale=e._locale),pl(e)&&mt(e,"_isValid")&&(i._isValid=e._isValid),i}mo.fn=xc.prototype;mo.invalid=PM;function Er(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Cm(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function zM(e,t){var n;return e.isValid()&&t.isValid()?(t=wh(t,e),e.isBefore(t)?n=Cm(e,t):(n=Cm(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function gv(e,t){return function(n,o){var r,i;return o!==null&&!isNaN(+o)&&(Yy(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=o,o=i),r=mo(n,o),yv(this,r,e),this}}function yv(e,t,n,o){var r=t._milliseconds,i=uu(t._days),a=uu(t._months);e.isValid()&&(o=o??!0,a&&tv(e,Qi(e,"Month")+a*n),i&&Qy(e,"Date",Qi(e,"Date")+i*n),r&&e._d.setTime(e._d.valueOf()+r*n),o&&xe.updateOffset(e,i||a))}var YM=gv(1,"add"),UM=gv(-1,"subtract");function vv(e){return typeof e=="string"||e instanceof String}function qM(e){return po(e)||ya(e)||vv(e)||nr(e)||KM(e)||GM(e)||e===null||e===void 0}function GM(e){var t=jr(e)&&!nh(e),n=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,i,a=o.length;for(r=0;r<a;r+=1)i=o[r],n=n||mt(e,i);return t&&n}function KM(e){var t=fo(e),n=!1;return t&&(n=e.filter(function(o){return!nr(o)&&vv(e)}).length===0),t&&n}function XM(e){var t=jr(e)&&!nh(e),n=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,i;for(r=0;r<o.length;r+=1)i=o[r],n=n||mt(e,i);return t&&n}function ZM(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function QM(e,t){arguments.length===1&&(arguments[0]?qM(arguments[0])?(e=arguments[0],t=void 0):XM(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||It(),o=wh(n,this).startOf("day"),r=xe.calendarFormat(this,o)||"sameElse",i=t&&(Ao(t[r])?t[r].call(this,n):t[r]);return this.format(i||this.localeData().calendar(r,this,It(n)))}function JM(){return new va(this)}function eI(e,t){var n=po(e)?e:It(e);return this.isValid()&&n.isValid()?(t=so(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function tI(e,t){var n=po(e)?e:It(e);return this.isValid()&&n.isValid()?(t=so(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function nI(e,t,n,o){var r=po(e)?e:It(e),i=po(t)?t:It(t);return this.isValid()&&r.isValid()&&i.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(r,n):!this.isBefore(r,n))&&(o[1]===")"?this.isBefore(i,n):!this.isAfter(i,n))):!1}function oI(e,t){var n=po(e)?e:It(e),o;return this.isValid()&&n.isValid()?(t=so(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(o=n.valueOf(),this.clone().startOf(t).valueOf()<=o&&o<=this.clone().endOf(t).valueOf())):!1}function rI(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function sI(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function iI(e,t,n){var o,r,i;if(!this.isValid())return NaN;if(o=wh(e,this),!o.isValid())return NaN;switch(r=(o.utcOffset()-this.utcOffset())*6e4,t=so(t),t){case"year":i=ml(this,o)/12;break;case"month":i=ml(this,o);break;case"quarter":i=ml(this,o)/3;break;case"second":i=(this-o)/1e3;break;case"minute":i=(this-o)/6e4;break;case"hour":i=(this-o)/36e5;break;case"day":i=(this-o-r)/864e5;break;case"week":i=(this-o-r)/6048e5;break;default:i=this-o}return n?i:Kn(i)}function ml(e,t){if(e.date()<t.date())return-ml(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),o=e.clone().add(n,"months"),r,i;return t-o<0?(r=e.clone().add(n-1,"months"),i=(t-o)/(o-r)):(r=e.clone().add(n+1,"months"),i=(t-o)/(r-o)),-(n+i)||0}xe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";xe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function aI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function lI(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?fl(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ao(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",fl(n,"Z")):fl(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function cI(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,o,r,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(n+o+r+i)}function dI(e){e||(e=this.isUtc()?xe.defaultFormatUtc:xe.defaultFormat);var t=fl(this,e);return this.localeData().postformat(t)}function uI(e,t){return this.isValid()&&(po(e)&&e.isValid()||It(e).isValid())?mo({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function hI(e){return this.from(It(),e)}function fI(e,t){return this.isValid()&&(po(e)&&e.isValid()||It(e).isValid())?mo({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function pI(e){return this.to(It(),e)}function bv(e){var t;return e===void 0?this._locale._abbr:(t=ir(e),t!=null&&(this._locale=t),this)}var wv=ro("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Cv(){return this._locale}var Ml=1e3,ks=60*Ml,Il=60*ks,Sv=(365*400+97)*24*Il;function Es(e,t){return(e%t+t)%t}function _v(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Sv:new Date(e,t,n).valueOf()}function xv(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Sv:Date.UTC(e,t,n)}function mI(e){var t,n;if(e=so(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xv:_v,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Es(t+(this._isUTC?0:this.utcOffset()*ks),Il);break;case"minute":t=this._d.valueOf(),t-=Es(t,ks);break;case"second":t=this._d.valueOf(),t-=Es(t,Ml);break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function gI(e){var t,n;if(e=so(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xv:_v,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Il-Es(t+(this._isUTC?0:this.utcOffset()*ks),Il)-1;break;case"minute":t=this._d.valueOf(),t+=ks-Es(t,ks)-1;break;case"second":t=this._d.valueOf(),t+=Ml-Es(t,Ml)-1;break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function yI(){return this._d.valueOf()-(this._offset||0)*6e4}function vI(){return Math.floor(this.valueOf()/1e3)}function bI(){return new Date(this.valueOf())}function wI(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function CI(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function SI(){return this.isValid()?this.toISOString():null}function _I(){return oh(this)}function xI(){return mr({},qe(this))}function RI(){return qe(this).overflow}function TI(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}$e("N",0,0,"eraAbbr");$e("NN",0,0,"eraAbbr");$e("NNN",0,0,"eraAbbr");$e("NNNN",0,0,"eraName");$e("NNNNN",0,0,"eraNarrow");$e("y",["y",1],"yo","eraYear");$e("y",["yy",2],0,"eraYear");$e("y",["yyy",3],0,"eraYear");$e("y",["yyyy",4],0,"eraYear");De("N",Ch);De("NN",Ch);De("NNN",Ch);De("NNNN",LI);De("NNNNN",$I);Et(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,o){var r=n._locale.erasParse(e,o,n._strict);r?qe(n).era=r:qe(n).invalidEra=e});De("y",qs);De("yy",qs);De("yyy",qs);De("yyyy",qs);De("yo",VI);Et(["y","yy","yyy","yyyy"],_n);Et(["yo"],function(e,t,n,o){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[_n]=n._locale.eraYearOrdinalParse(e,r):t[_n]=parseInt(e,10)});function kI(e,t){var n,o,r,i=this._eras||ir("en")._eras;for(n=0,o=i.length;n<o;++n){switch(typeof i[n].since){case"string":r=xe(i[n].since).startOf("day"),i[n].since=r.valueOf();break}switch(typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":r=xe(i[n].until).startOf("day").valueOf(),i[n].until=r.valueOf();break}}return i}function EI(e,t,n){var o,r,i=this.eras(),a,l,d;for(e=e.toUpperCase(),o=0,r=i.length;o<r;++o)if(a=i[o].name.toUpperCase(),l=i[o].abbr.toUpperCase(),d=i[o].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===e)return i[o];break;case"NNNN":if(a===e)return i[o];break;case"NNNNN":if(d===e)return i[o];break}else if([a,l,d].indexOf(e)>=0)return i[o]}function PI(e,t){var n=e.since<=e.until?1:-1;return t===void 0?xe(e.since).year():xe(e.since).year()+(t-e.offset)*n}function DI(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].name;return""}function OI(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].narrow;return""}function MI(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].abbr;return""}function II(){var e,t,n,o,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=r[e].since<=r[e].until?1:-1,o=this.clone().startOf("day").valueOf(),r[e].since<=o&&o<=r[e].until||r[e].until<=o&&o<=r[e].since)return(this.year()-xe(r[e].since).year())*n+r[e].offset;return this.year()}function NI(e){return mt(this,"_erasNameRegex")||Sh.call(this),e?this._erasNameRegex:this._erasRegex}function AI(e){return mt(this,"_erasAbbrRegex")||Sh.call(this),e?this._erasAbbrRegex:this._erasRegex}function FI(e){return mt(this,"_erasNarrowRegex")||Sh.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ch(e,t){return t.erasAbbrRegex(e)}function LI(e,t){return t.erasNameRegex(e)}function $I(e,t){return t.erasNarrowRegex(e)}function VI(e,t){return t._eraYearOrdinalRegex||qs}function Sh(){var e=[],t=[],n=[],o=[],r,i,a,l,d,u=this.eras();for(r=0,i=u.length;r<i;++r)a=Xo(u[r].name),l=Xo(u[r].abbr),d=Xo(u[r].narrow),t.push(a),e.push(l),n.push(d),o.push(a),o.push(l),o.push(d);this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}$e(0,["gg",2],0,function(){return this.weekYear()%100});$e(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Rc(e,t){$e(0,[e,e.length],0,t)}Rc("gggg","weekYear");Rc("ggggg","weekYear");Rc("GGGG","isoWeekYear");Rc("GGGGG","isoWeekYear");De("G",wc);De("g",wc);De("GG",At,Bn);De("gg",At,Bn);De("GGGG",ch,lh);De("gggg",ch,lh);De("GGGGG",bc,yc);De("ggggg",bc,yc);wa(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,o){t[o.substr(0,2)]=nt(e)});wa(["gg","GG"],function(e,t,n,o){t[o]=xe.parseTwoDigitYear(e)});function jI(e){return Rv.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function BI(e){return Rv.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function WI(){return Zo(this.year(),1,4)}function HI(){return Zo(this.isoWeekYear(),1,4)}function zI(){var e=this.localeData()._week;return Zo(this.year(),e.dow,e.doy)}function YI(){var e=this.localeData()._week;return Zo(this.weekYear(),e.dow,e.doy)}function Rv(e,t,n,o,r){var i;return e==null?ea(this,o,r).year:(i=Zo(e,o,r),t>i&&(t=i),UI.call(this,e,t,n,o,r))}function UI(e,t,n,o,r){var i=rv(e,t,n,o,r),a=Ji(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}$e("Q",0,"Qo","quarter");De("Q",qy);Et("Q",function(e,t){t[qo]=(nt(e)-1)*3});function qI(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}$e("D",["DD",2],"Do","date");De("D",At,Gs);De("DD",At,Bn);De("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Et(["D","DD"],To);Et("Do",function(e,t){t[To]=nt(e.match(At)[0])});var Tv=Ks("Date",!0);$e("DDD",["DDDD",3],"DDDo","dayOfYear");De("DDD",vc);De("DDDD",Gy);Et(["DDD","DDDD"],function(e,t,n){n._dayOfYear=nt(e)});function GI(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}$e("m",["mm",2],0,"minute");De("m",At,dh);De("mm",At,Bn);Et(["m","mm"],co);var KI=Ks("Minutes",!1);$e("s",["ss",2],0,"second");De("s",At,dh);De("ss",At,Bn);Et(["s","ss"],Go);var XI=Ks("Seconds",!1);$e("S",0,0,function(){return~~(this.millisecond()/100)});$e(0,["SS",2],0,function(){return~~(this.millisecond()/10)});$e(0,["SSS",3],0,"millisecond");$e(0,["SSSS",4],0,function(){return this.millisecond()*10});$e(0,["SSSSS",5],0,function(){return this.millisecond()*100});$e(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});$e(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});$e(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});$e(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});De("S",vc,qy);De("SS",vc,Bn);De("SSS",vc,Gy);var gr,kv;for(gr="SSSS";gr.length<=9;gr+="S")De(gr,qs);function ZI(e,t){t[Lr]=nt(("0."+e)*1e3)}for(gr="S";gr.length<=9;gr+="S")Et(gr,ZI);kv=Ks("Milliseconds",!1);$e("z",0,0,"zoneAbbr");$e("zz",0,0,"zoneName");function QI(){return this._isUTC?"UTC":""}function JI(){return this._isUTC?"Coordinated Universal Time":""}var ve=va.prototype;ve.add=YM;ve.calendar=QM;ve.clone=JM;ve.diff=iI;ve.endOf=gI;ve.format=dI;ve.from=uI;ve.fromNow=hI;ve.to=fI;ve.toNow=pI;ve.get=cO;ve.invalidAt=RI;ve.isAfter=eI;ve.isBefore=tI;ve.isBetween=nI;ve.isSame=oI;ve.isSameOrAfter=rI;ve.isSameOrBefore=sI;ve.isValid=_I;ve.lang=wv;ve.locale=bv;ve.localeData=Cv;ve.max=_M;ve.min=SM;ve.parsingFlags=xI;ve.set=dO;ve.startOf=mI;ve.subtract=UM;ve.toArray=wI;ve.toObject=CI;ve.toDate=bI;ve.toISOString=lI;ve.inspect=cI;typeof Symbol<"u"&&Symbol.for!=null&&(ve[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ve.toJSON=SI;ve.toString=aI;ve.unix=vI;ve.valueOf=yI;ve.creationData=TI;ve.eraName=DI;ve.eraNarrow=OI;ve.eraAbbr=MI;ve.eraYear=II;ve.year=Zy;ve.isLeapYear=lO;ve.weekYear=jI;ve.isoWeekYear=BI;ve.quarter=ve.quarters=qI;ve.month=nv;ve.daysInMonth=bO;ve.week=ve.weeks=kO;ve.isoWeek=ve.isoWeeks=EO;ve.weeksInYear=zI;ve.weeksInWeekYear=YI;ve.isoWeeksInYear=WI;ve.isoWeeksInISOWeekYear=HI;ve.date=Tv;ve.day=ve.days=BO;ve.weekday=WO;ve.isoWeekday=HO;ve.dayOfYear=GI;ve.hour=ve.hours=XO;ve.minute=ve.minutes=KI;ve.second=ve.seconds=XI;ve.millisecond=ve.milliseconds=kv;ve.utcOffset=MM;ve.utc=NM;ve.local=AM;ve.parseZone=FM;ve.hasAlignedHourOffset=LM;ve.isDST=$M;ve.isLocal=jM;ve.isUtcOffset=BM;ve.isUtc=mv;ve.isUTC=mv;ve.zoneAbbr=QI;ve.zoneName=JI;ve.dates=ro("dates accessor is deprecated. Use date instead.",Tv);ve.months=ro("months accessor is deprecated. Use month instead",nv);ve.years=ro("years accessor is deprecated. Use year instead",Zy);ve.zone=ro("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",IM);ve.isDSTShifted=ro("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",VM);function eN(e){return It(e*1e3)}function tN(){return It.apply(null,arguments).parseZone()}function Ev(e){return e}var gt=sh.prototype;gt.calendar=jD;gt.longDateFormat=zD;gt.invalidDate=UD;gt.ordinal=KD;gt.preparse=Ev;gt.postformat=Ev;gt.relativeTime=ZD;gt.pastFuture=QD;gt.set=$D;gt.eras=kI;gt.erasParse=EI;gt.erasConvertYear=PI;gt.erasAbbrRegex=AI;gt.erasNameRegex=NI;gt.erasNarrowRegex=FI;gt.months=mO;gt.monthsShort=gO;gt.monthsParse=vO;gt.monthsRegex=CO;gt.monthsShortRegex=wO;gt.week=_O;gt.firstDayOfYear=TO;gt.firstDayOfWeek=RO;gt.weekdays=FO;gt.weekdaysMin=$O;gt.weekdaysShort=LO;gt.weekdaysParse=jO;gt.weekdaysRegex=zO;gt.weekdaysShortRegex=YO;gt.weekdaysMinRegex=UO;gt.isPM=GO;gt.meridiem=ZO;function Nl(e,t,n,o){var r=ir(),i=No().set(o,t);return r[n](i,e)}function Pv(e,t,n){if(nr(e)&&(t=e,e=void 0),e=e||"",t!=null)return Nl(e,t,n,"month");var o,r=[];for(o=0;o<12;o++)r[o]=Nl(e,o,n,"month");return r}function _h(e,t,n,o){typeof e=="boolean"?(nr(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,nr(t)&&(n=t,t=void 0),t=t||"");var r=ir(),i=e?r._week.dow:0,a,l=[];if(n!=null)return Nl(t,(n+i)%7,o,"day");for(a=0;a<7;a++)l[a]=Nl(t,(a+i)%7,o,"day");return l}function nN(e,t){return Pv(e,t,"months")}function oN(e,t){return Pv(e,t,"monthsShort")}function rN(e,t,n){return _h(e,t,n,"weekdays")}function sN(e,t,n){return _h(e,t,n,"weekdaysShort")}function iN(e,t,n){return _h(e,t,n,"weekdaysMin")}yr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=nt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});xe.lang=ro("moment.lang is deprecated. Use moment.locale instead.",yr);xe.langData=ro("moment.langData is deprecated. Use moment.localeData instead.",ir);var Ho=Math.abs;function aN(){var e=this._data;return this._milliseconds=Ho(this._milliseconds),this._days=Ho(this._days),this._months=Ho(this._months),e.milliseconds=Ho(e.milliseconds),e.seconds=Ho(e.seconds),e.minutes=Ho(e.minutes),e.hours=Ho(e.hours),e.months=Ho(e.months),e.years=Ho(e.years),this}function Dv(e,t,n,o){var r=mo(t,n);return e._milliseconds+=o*r._milliseconds,e._days+=o*r._days,e._months+=o*r._months,e._bubble()}function lN(e,t){return Dv(this,e,t,1)}function cN(e,t){return Dv(this,e,t,-1)}function Sm(e){return e<0?Math.floor(e):Math.ceil(e)}function dN(){var e=this._milliseconds,t=this._days,n=this._months,o=this._data,r,i,a,l,d;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Sm(fu(n)+t)*864e5,t=0,n=0),o.milliseconds=e%1e3,r=Kn(e/1e3),o.seconds=r%60,i=Kn(r/60),o.minutes=i%60,a=Kn(i/60),o.hours=a%24,t+=Kn(a/24),d=Kn(Ov(t)),n+=d,t-=Sm(fu(d)),l=Kn(n/12),n%=12,o.days=t,o.months=n,o.years=l,this}function Ov(e){return e*4800/146097}function fu(e){return e*146097/4800}function uN(e){if(!this.isValid())return NaN;var t,n,o=this._milliseconds;if(e=so(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+o/864e5,n=this._months+Ov(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(fu(this._months)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return t*24+o/36e5;case"minute":return t*1440+o/6e4;case"second":return t*86400+o/1e3;case"millisecond":return Math.floor(t*864e5)+o;default:throw new Error("Unknown unit "+e)}}function ar(e){return function(){return this.as(e)}}var Mv=ar("ms"),hN=ar("s"),fN=ar("m"),pN=ar("h"),mN=ar("d"),gN=ar("w"),yN=ar("M"),vN=ar("Q"),bN=ar("y"),wN=Mv;function CN(){return mo(this)}function SN(e){return e=so(e),this.isValid()?this[e+"s"]():NaN}function Xr(e){return function(){return this.isValid()?this._data[e]:NaN}}var _N=Xr("milliseconds"),xN=Xr("seconds"),RN=Xr("minutes"),TN=Xr("hours"),kN=Xr("days"),EN=Xr("months"),PN=Xr("years");function DN(){return Kn(this.days()/7)}var Yo=Math.round,Cs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ON(e,t,n,o,r){return r.relativeTime(t||1,!!n,e,o)}function MN(e,t,n,o){var r=mo(e).abs(),i=Yo(r.as("s")),a=Yo(r.as("m")),l=Yo(r.as("h")),d=Yo(r.as("d")),u=Yo(r.as("M")),f=Yo(r.as("w")),p=Yo(r.as("y")),y=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||a<=1&&["m"]||a<n.m&&["mm",a]||l<=1&&["h"]||l<n.h&&["hh",l]||d<=1&&["d"]||d<n.d&&["dd",d];return n.w!=null&&(y=y||f<=1&&["w"]||f<n.w&&["ww",f]),y=y||u<=1&&["M"]||u<n.M&&["MM",u]||p<=1&&["y"]||["yy",p],y[2]=t,y[3]=+e>0,y[4]=o,ON.apply(null,y)}function IN(e){return e===void 0?Yo:typeof e=="function"?(Yo=e,!0):!1}function NN(e,t){return Cs[e]===void 0?!1:t===void 0?Cs[e]:(Cs[e]=t,e==="s"&&(Cs.ss=t-1),!0)}function AN(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,o=Cs,r,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(o=Object.assign({},Cs,t),t.s!=null&&t.ss==null&&(o.ss=t.s-1)),r=this.localeData(),i=MN(this,!n,o,r),n&&(i=r.pastFuture(+this,i)),r.postformat(i)}var xd=Math.abs;function fs(e){return(e>0)-(e<0)||+e}function Tc(){if(!this.isValid())return this.localeData().invalidDate();var e=xd(this._milliseconds)/1e3,t=xd(this._days),n=xd(this._months),o,r,i,a,l=this.asSeconds(),d,u,f,p;return l?(o=Kn(e/60),r=Kn(o/60),e%=60,o%=60,i=Kn(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",d=l<0?"-":"",u=fs(this._months)!==fs(l)?"-":"",f=fs(this._days)!==fs(l)?"-":"",p=fs(this._milliseconds)!==fs(l)?"-":"",d+"P"+(i?u+i+"Y":"")+(n?u+n+"M":"")+(t?f+t+"D":"")+(r||o||e?"T":"")+(r?p+r+"H":"")+(o?p+o+"M":"")+(e?p+a+"S":"")):"P0D"}var dt=xc.prototype;dt.isValid=EM;dt.abs=aN;dt.add=lN;dt.subtract=cN;dt.as=uN;dt.asMilliseconds=Mv;dt.asSeconds=hN;dt.asMinutes=fN;dt.asHours=pN;dt.asDays=mN;dt.asWeeks=gN;dt.asMonths=yN;dt.asQuarters=vN;dt.asYears=bN;dt.valueOf=wN;dt._bubble=dN;dt.clone=CN;dt.get=SN;dt.milliseconds=_N;dt.seconds=xN;dt.minutes=RN;dt.hours=TN;dt.days=kN;dt.weeks=DN;dt.months=EN;dt.years=PN;dt.humanize=AN;dt.toISOString=Tc;dt.toString=Tc;dt.toJSON=Tc;dt.locale=bv;dt.localeData=Cv;dt.toIsoString=ro("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Tc);dt.lang=wv;$e("X",0,0,"unix");$e("x",0,0,"valueOf");De("x",wc);De("X",nO);Et("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});Et("x",function(e,t,n){n._d=new Date(nt(e))});//! moment.js
277
- xe.version="2.30.1";FD(It);xe.fn=ve;xe.min=xM;xe.max=RM;xe.now=TM;xe.utc=No;xe.unix=eN;xe.months=nN;xe.isDate=ya;xe.locale=yr;xe.invalid=gc;xe.duration=mo;xe.isMoment=po;xe.weekdays=rN;xe.parseZone=tN;xe.localeData=ir;xe.isDuration=pl;xe.monthsShort=oN;xe.weekdaysMin=iN;xe.defineLocale=mh;xe.updateLocale=tM;xe.locales=nM;xe.weekdaysShort=sN;xe.normalizeUnits=so;xe.relativeTimeRounding=IN;xe.relativeTimeThreshold=NN;xe.calendarFormat=ZM;xe.prototype=ve;xe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const FN=Object.freeze(Object.defineProperty({__proto__:null,default:xe},Symbol.toStringTag,{value:"Module"})),LN=[xe.ISO_8601,Yr.ui,Yr.db],pu="Invalid date";ie(iy)({width:"100%","& .MuiAlert-message":{fontSize:"0.8rem"}," [data-testid=CloseIcon]":{fill:"white"}});class $N extends mc{handleKeyboardEvent(t,n){if(n.isActive)if(aF(t)){if(!n.summaryColumnIds.length)return;const o=n.grid;if(!o||o.getSelectedRows().length<2)return;t.preventDefault(),t.stopImmediatePropagation(),Uo.table=n,Uo.open=!0}else super.handleKeyboardEvent.call(this,t,n)}}let Iv=class{constructor(){this._args={},this._grid=null,this._tableId=""}getFilterFn(){return()=>!0}register(t,n){this.tableId=n,this.grid=t;const o=t.getData();o.setFilter(this.getFilterFn()),o.setFilterArgs(this.args),o.refresh()}reset(){if(!this.grid)return;this.args={};const t=this.grid.getData();t.setFilterArgs(this.args),t.refresh()}print(){return[]}set grid(t){this._grid=t}get grid(){return this._grid}set args(t){if(this._args=t,!this.grid)return;const n=this.grid.getData();n.setFilterArgs(t),n.refresh()}get args(){return this._args}set tableId(t){this._tableId=t}get tableId(){return this._tableId}};class VN extends Iv{getFilterFn(){return t=>!t?.isDeleted}}class jN{constructor(){this._args={},this._grid=null,this._tableId=""}getFilterFn(){return()=>!0}register(){}print(){return[]}reset(){}get args(){return this._args}get grid(){return this._grid}get tableId(){return this._tableId}set args(t){}set grid(t){}set tableId(t){}}function Ss(e){return new Date(e).getTime()}class Nv{constructor(t){this.filter=t}getFilterFn(){const t=this.filter.getFilterFn();return(n,o)=>this.filterFn(n,o)&&t(n,o)}register(t,n){this.tableId=n,this.grid=t;const o=t.getData();o.setFilter(this.getFilterFn()),o.setFilterArgs(this.args),o.refresh()}reset(){this.filter.reset()}print(t){return this.filter.print(t)}set args(t){this.filter.args=t}set grid(t){this.filter.grid=t}set tableId(t){this.filter.tableId=t}get args(){return this.filter.args}get grid(){return this.filter.grid}get tableId(){return this.filter.tableId}}function BN(e){return{tooltip:"Apply column filter",command:e}}class Ca{constructor(){this.observers=[]}subscribe(t){~this.observers.indexOf(t)||this.observers.push(t)}unsubscribe(t){const n=this.observers.indexOf(t);~this.observers.indexOf(t)&&this.observers.splice(n,1)}notify(){for(const t of this.observers)t()}}class WN extends Ca{constructor(){super(...arguments),this.columnId="",this.group=hn.Text,this.target=null,this.x=0,this.y=0}}const Rn=new WN;class HN{highlightAllColumns(t,n){const o=document.getElementById(n);if(!o)return;const r=Object.keys(t.columnFilters||{});if(r.length)for(const i of r){const a=o.querySelector(`[data-id="${i}"]`);a&&(t.columnFilters[i].value[1]||t.columnFilters[i].value[2]?a.classList.add("filter-active"):a.classList.remove("filter-active"))}else{const i=o.querySelectorAll(".slick-header-column");for(const a of i)a.classList.remove("filter-active")}}highlightColumn(t,n){const o=document.getElementById(t.id);if(!o)return;const r=o.querySelector(`[data-id="${n}"]`);r&&r.classList.add("filter-active")}resetColumn(t,n){const o=document.getElementById(t.id);if(!o)return;const r=o.querySelector(`[data-id="${n}"]`);r&&r.classList.remove("filter-active")}}const or=new HN;function Av(e){return or.highlightAllColumns(e.filter.args,e.id),function(t,n){t.preventDefault(),Rn.columnId=n.column.id||"",Rn.group=n.command,Rn.table=e,Rn.target=t.target,Rn.x=t.x||0,Rn.y=t.y||0,Rn.notify()}}var zN=Object.defineProperty,YN=(e,t,n)=>t in e?zN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>YN(e,typeof t!="symbol"?t+"":t,n),na=class{constructor(e,t){this.event=e,this.args=t,P(this,"_isPropagationStopped",!1),P(this,"_isImmediatePropagationStopped",!1),P(this,"_isDefaultPrevented",!1),P(this,"returnValues",[]),P(this,"returnValue"),P(this,"_eventTarget"),P(this,"nativeEvent"),P(this,"arguments_"),P(this,"altKey"),P(this,"ctrlKey"),P(this,"metaKey"),P(this,"shiftKey"),P(this,"key"),P(this,"keyCode"),P(this,"clientX"),P(this,"clientY"),P(this,"offsetX"),P(this,"offsetY"),P(this,"pageX"),P(this,"pageY"),P(this,"bubbles"),P(this,"target"),P(this,"type"),P(this,"which"),P(this,"x"),P(this,"y"),this.nativeEvent=e,this.arguments_=t,e&&["altKey","ctrlKey","metaKey","shiftKey","key","keyCode","clientX","clientY","offsetX","offsetY","pageX","pageY","bubbles","target","type","which","x","y"].forEach(n=>this[n]=e[n]),this._eventTarget=this.nativeEvent?this.nativeEvent.target:void 0}get defaultPrevented(){return this._isDefaultPrevented}stopPropagation(){this._isPropagationStopped=!0,this.nativeEvent?.stopPropagation()}isPropagationStopped(){return this._isPropagationStopped}stopImmediatePropagation(){this._isImmediatePropagationStopped=!0,this.nativeEvent&&this.nativeEvent.stopImmediatePropagation()}isImmediatePropagationStopped(){return this._isImmediatePropagationStopped}getNativeEvent(){return this.nativeEvent}preventDefault(){this.nativeEvent&&this.nativeEvent.preventDefault(),this._isDefaultPrevented=!0}isDefaultPrevented(){return this.nativeEvent?this.nativeEvent.defaultPrevented:this._isDefaultPrevented}addReturnValue(e){this.returnValues.push(e),this.returnValue===void 0&&e!==void 0&&(this.returnValue=e)}getReturnValue(){return this.returnValue}getArguments(){return this.arguments_}},Zr=class{constructor(e,t){this.eventName=e,this.pubSub=t,P(this,"_handlers",[]),P(this,"_pubSubService"),this._pubSubService=t}get subscriberCount(){return this._handlers.length}subscribe(e){this._handlers.push(e)}unsubscribe(e){for(let t=this._handlers.length-1;t>=0;t--)this._handlers[t]===e&&this._handlers.splice(t,1)}notify(e,t,n){let o=t instanceof na?t:new na(t,e);n=n||this;for(let r=0;r<this._handlers.length&&!(o.isPropagationStopped()||o.isImmediatePropagationStopped());r++){let i=this._handlers[r].call(n,o,e);o.addReturnValue(i)}if(typeof this._pubSubService?.publish=="function"&&this.eventName){let r=this._pubSubService.publish(this.eventName,{args:e,eventData:o});o.addReturnValue(r)}return o}setPubSubService(e){this._pubSubService=e}},Sa=class{constructor(){P(this,"handlers",[])}subscribe(e,t){return this.handlers.push({event:e,handler:t}),e.subscribe(t),this}unsubscribe(e,t){let n=this.handlers.length;for(;n--;)if(this.handlers[n].event===e&&this.handlers[n].handler===t){this.handlers.splice(n,1),e.unsubscribe(t);return}return this}unsubscribeAll(){let e=this.handlers.length;for(;e--;)this.handlers[e].event.unsubscribe(this.handlers[e].handler);return this.handlers=[],this}},xh=class{constructor(e,t,n,o){P(this,"fromRow"),P(this,"fromCell"),P(this,"toCell"),P(this,"toRow"),n===void 0&&o===void 0&&(n=e,o=t),this.fromRow=Math.min(e,n),this.fromCell=Math.min(t,o),this.toCell=Math.max(t,o),this.toRow=Math.max(e,n)}isSingleRow(){return this.fromRow===this.toRow}isSingleCell(){return this.fromRow===this.toRow&&this.fromCell===this.toCell}contains(e,t){return e>=this.fromRow&&e<=this.toRow&&t>=this.fromCell&&t<=this.toCell}toString(){return this.isSingleCell()?`(${this.fromRow}:${this.fromCell})`:`(${this.fromRow}:${this.fromCell} - ${this.toRow}:${this.toCell})`}},Fv=class{constructor(){P(this,"__nonDataRow",!0)}},Lv=class extends Fv{constructor(){super(),P(this,"__group",!0),P(this,"level",0),P(this,"count",0),P(this,"value",null),P(this,"title",null),P(this,"collapsed",!1),P(this,"selectChecked",!1),P(this,"totals",null),P(this,"rows",[]),P(this,"groups",null),P(this,"groupingKey",null)}equals(e){return this.value===e.value&&this.count===e.count&&this.collapsed===e.collapsed&&this.title===e.title}},UN=class extends Fv{constructor(){super(),P(this,"__groupTotals",!0),P(this,"group",null),P(this,"initialized",!1)}},qN=class{constructor(){P(this,"activeEditController",null)}isActive(e){return e?this.activeEditController===e:this.activeEditController!==null}activate(e){if(e!==this.activeEditController){if(this.activeEditController!==null)throw new Error("Slick.EditorLock.activate: an editController is still active, can't activate another editController");if(!e.commitCurrentEdit)throw new Error("Slick.EditorLock.activate: editController must implement .commitCurrentEdit()");if(!e.cancelCurrentEdit)throw new Error("Slick.EditorLock.activate: editController must implement .cancelCurrentEdit()");this.activeEditController=e}}deactivate(e){if(this.activeEditController){if(this.activeEditController!==e)throw new Error("Slick.EditorLock.deactivate: specified editController is not the currently active one");this.activeEditController=null}}commitCurrentEdit(){return this.activeEditController?this.activeEditController.commitCurrentEdit():!0}cancelCurrentEdit(){return this.activeEditController?this.activeEditController.cancelCurrentEdit():!0}},kc=class{constructor(){P(this,"_boundedEvents",[])}getBoundedEvents(){return this._boundedEvents}destroy(){this.unbindAll()}bind(e,t,n,o,r=""){e&&(e.addEventListener(t,n,o),this._boundedEvents.push({element:e,eventName:t,listener:n,groupName:r}))}unbind(e,t,n){e?.removeEventListener&&e.removeEventListener(t,n)}unbindByEventName(e,t){let n=this._boundedEvents.find(o=>o.element===e&&o.eventName===t);n&&this.unbind(n.element,n.eventName,n.listener)}unbindAll(e){if(e){let t=Array.isArray(e)?e:[e];for(let n=this._boundedEvents.length-1;n>=0;--n){let o=this._boundedEvents[n];if(t.some(r=>r===o.groupName)){let{element:r,eventName:i,listener:a}=o;this.unbind(r,i,a),this._boundedEvents.splice(n,1)}}}else for(;this._boundedEvents.length>0;){let t=this._boundedEvents.pop(),{element:n,eventName:o,listener:r}=t;this.unbind(n,o,r)}}},Un=class Ht{static isFunction(t){return typeof t=="function"&&typeof t.nodeType!="number"&&typeof t.item!="function"}static isPlainObject(t){if(!t||Ht.toString.call(t)!=="[object Object]")return!1;let n=Ht.getProto(t);if(!n)return!0;let o=Ht.hasOwn.call(n,"constructor")&&n.constructor;return typeof o=="function"&&Ht.fnToString.call(o)===Ht.ObjectFunctionString}static calculateAvailableSpace(t){let n=0,o=0,r=0,i=0,a=window.innerHeight||0,l=window.innerWidth||0,d=Ht.windowScrollPosition(),u=d.top,f=d.left,p=Ht.offset(t);if(p){let y=p.top||0,w=p.left||0;o=y-u,n=a-(y-u),r=w-f,i=l-(w-f)}return{top:o,bottom:n,left:r,right:i}}static extend(...t){let n,o,r,i,a,l,d=t[0],u=1,f=!1,p=t.length;for(typeof d=="boolean"?(f=d,d=t[u]||{},u++):d=d||{},typeof d!="object"&&!Ht.isFunction(d)&&(d={}),u===p&&(d=this,u--);u<p;u++)if(Ht.isDefined(n=t[u]))for(o in n)i=n[o],!(o==="__proto__"||d===i)&&(f&&i&&(Ht.isPlainObject(i)||(a=Array.isArray(i)))?(r=d[o],a&&!Array.isArray(r)?l=[]:!a&&!Ht.isPlainObject(r)?l={}:l=r,a=!1,d[o]=Ht.extend(f,l,i)):i!==void 0&&(d[o]=i));return d}static createDomElement(t,n,o){let r=document.createElement(t);return n&&Object.keys(n).forEach(i=>{i==="innerHTML"&&console.warn(`[SlickGrid] For better CSP (Content Security Policy) support, do not use "innerHTML" directly in "createDomElement('${t}', { innerHTML: 'some html'})", it is better as separate assignment: "const elm = createDomElement('span'); elm.innerHTML = 'some html';"`);let a=n[i];typeof a=="object"?Object.assign(r[i],a):r[i]=n[i]}),o?.appendChild&&o.appendChild(r),r}static getHtmlStringOutput(t,n="innerHTML"){return t instanceof DocumentFragment?[].map.call(t.childNodes,o=>o[n]).join("")||t.textContent||"":t instanceof HTMLElement?t[n]:String(t)}static emptyElement(t){for(;t?.firstChild;)t.removeChild(t.firstChild);return t}static classNameToList(t=""){return t.split(" ").filter(n=>n)}static innerSize(t,n){let o=0;if(t){let r=n==="height"?"clientHeight":"clientWidth",i=n==="height"?["top","bottom"]:["left","right"];o=t[r];for(let a of i){let l=parseFloat(Ht.getElementProp(t,`padding-${a}`)||"")||0;o-=l}}return o}static isDefined(t){return t!=null&&t!==""}static getElementProp(t,n){return t?.getComputedStyle?window.getComputedStyle(t,null).getPropertyValue(n):null}static getFunctionDetails(t,n=!0){let o=!1,r=i=>{let a=i.toString();if(o=a.includes("async "),a.replaceAll(" ","").includes("=>({")){let u=a.match(/(({.*}))/g)||[];return u.length>=1?`return ${u[0].trimStart()}`:a}let l=!a.includes("{")&&a.includes("=>"),d=a.substring(a.indexOf("{")+1||a.indexOf("=>")+2,a.includes("}")?a.lastIndexOf("}"):a.length);return n&&l&&!d.startsWith("return")?"return "+d.trimStart():d};return{params:(i=>{let a=/(\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s*=[^,)]*(('(?:\\'|[^'\r\n])*')|("(?:\\"|[^"\r\n])*"))|(\s*=[^,)]*))/mg,l=/([^\s,]+)/g,d=i.toString().replace(a,"");return d.slice(d.indexOf("(")+1,d.indexOf(")")).match(l)??[]})(t),body:r(t),isAsync:o}}static insertAfterElement(t,n){t.parentNode?.insertBefore(n,t.nextSibling)}static isEmptyObject(t){return t==null?!0:Object.entries(t).length===0}static noop(){}static offset(t){if(!t||!t.getBoundingClientRect)return;let n=t.getBoundingClientRect(),o=document.documentElement;return{top:n.top+window.pageYOffset-o.clientTop,left:n.left+window.pageXOffset-o.clientLeft}}static windowScrollPosition(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}static width(t,n){if(!(!t||!t.getBoundingClientRect)){if(n===void 0)return t.getBoundingClientRect().width;Ht.setStyleSize(t,"width",n)}}static height(t,n){if(t){if(n===void 0)return t.getBoundingClientRect().height;Ht.setStyleSize(t,"height",n)}}static setStyleSize(t,n,o){typeof o=="function"?o=o():typeof o=="string"?t.style[n]=o:t.style[n]=o+"px"}static contains(t,n){return!t||!n?!1:!Ht.parents(n).every(o=>t!==o)}static isHidden(t){return t.offsetWidth===0&&t.offsetHeight===0}static parents(t,n){let o=[],r=n===":visible",i=n===":hidden";for(;(t=t.parentNode)&&t!==document&&!(!t||!t.parentNode);)i?Ht.isHidden(t)&&o.push(t):r?Ht.isHidden(t)||o.push(t):(!n||t.matches(n))&&o.push(t);return o}static toFloat(t){let n=parseFloat(t);return isNaN(n)?0:n}static show(t,n=""){Array.isArray(t)?t.forEach(o=>o.style.display=n):t.style.display=n}static hide(t){Array.isArray(t)?t.forEach(n=>n.style.display="none"):t.style.display="none"}static slideUp(t,n){return Ht.slideAnimation(t,"slideUp",n)}static slideDown(t,n){return Ht.slideAnimation(t,"slideDown",n)}static slideAnimation(t,n,o){if(window.jQuery!==void 0){window.jQuery(t)[n]("fast",o);return}n==="slideUp"?Ht.hide(t):Ht.show(t),o()}static applyDefaults(t,n){typeof n=="object"&&Object.keys(n).forEach(o=>{n.hasOwnProperty(o)&&!t.hasOwnProperty(o)&&(t[o]=n[o])})}static addSlickEventPubSubWhenDefined(t,n){if(t)for(let o in n)n[o]instanceof Zr&&typeof n[o].setPubSubService=="function"&&n[o].setPubSubService(t)}};P(Un,"getProto",Object.getPrototypeOf),P(Un,"class2type",{}),P(Un,"toString",Un.class2type.toString),P(Un,"hasOwn",Un.class2type.hasOwnProperty),P(Un,"fnToString",Un.hasOwn.toString),P(Un,"ObjectFunctionString",Un.fnToString.call(Object)),P(Un,"storage",{_storage:new WeakMap,put:function(e,t,n){this._storage.has(e)||this._storage.set(e,new Map),this._storage.get(e).set(t,n)},get:function(e,t){let n=this._storage.get(e);return n?n.get(t):null},remove:function(e,t){let n=this._storage.get(e).delete(t);return this._storage.get(e).size!==0&&this._storage.delete(e),n}});var go=Un,$v=new qN,GN={Event:Zr,EventHandler:Sa,GlobalEditorLock:$v,keyCode:{SPACE:8,DOWN:40,ENTER:13,ESCAPE:27,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,TAB:9,UP:38},preClickClassName:"slick-edit-preclick",GridAutosizeColsMode:{None:"NOA",LegacyOff:"LOF",LegacyForceFit:"LFF",IgnoreViewport:"IGV",FitColsToViewport:"FCV",FitViewportToCols:"FVC"},ColAutosizeMode:{Locked:"LCK",Guide:"GUI",ContentExpandOnly:"CXO",ContentIntelligent:"CTI"},RowSelectionMode:{FirstRow:"FS1",FirstNRows:"FSN",AllRows:"ALL",LastRow:"LS1"},ValueFilterMode:{None:"NONE",DeDuplicate:"DEDP",GetGreatestAndSub:"GR8T",GetLongestTextAndSub:"LNSB",GetLongestText:"LNSC"},WidthEvalMode:{Auto:"AUTO",TextOnly:"CANV"}},{Event:KN,EventHandler:XN,GlobalEditorLock:ZN,keyCode:Br,preClickClassName:QN,GridAutosizeColsMode:Vv,ColAutosizeMode:JN,RowSelectionMode:eA,ValueFilterMode:tA,WidthEvalMode:nA}=GN,oA=go,jv=class{constructor(e,t){this.grid=e,P(this,"pluginName","CellRangeDecorator"),P(this,"_options"),P(this,"_elem"),P(this,"_defaults",{selectionCssClass:"slick-range-decorator",selectionCss:{zIndex:"9999",border:"2px dashed red"},offset:{top:-1,left:-1,height:-2,width:-2}}),this._options=oA.extend(!0,{},this._defaults,t)}destroy(){this.hide()}init(){}hide(){this._elem?.remove(),this._elem=null}show(e){if(!this._elem){this._elem=document.createElement("div"),this._elem.className=this._options.selectionCssClass,Object.keys(this._options.selectionCss).forEach(r=>{this._elem.style[r]=this._options.selectionCss[r]}),this._elem.style.position="absolute";let o=this.grid.getActiveCanvasNode();o&&o.appendChild(this._elem)}let t=this.grid.getCellNodeBox(e.fromRow,e.fromCell),n=this.grid.getCellNodeBox(e.toRow,e.toCell);return t&&n&&this._options?.offset&&(this._elem.style.top=`${t.top+this._options.offset.top}px`,this._elem.style.left=`${t.left+this._options.offset.left}px`,this._elem.style.height=`${n.bottom-t.top+this._options.offset.height}px`,this._elem.style.width=`${n.right-t.left+this._options.offset.width}px`),this._elem}},rA=go;function Rh(e){let{containerElement:t}=e,{onDragInit:n,onDragStart:o,onDrag:r,onDragEnd:i,preventDragFromKeys:a}=e,l,d,u,f,p,y;t||(t=document.body);let w={dragSource:t,dragHandle:null};function b(){t&&(t.addEventListener("mousedown",k),t.addEventListener("touchstart",k))}function m(C,O,I){if(typeof C=="function")return C(O,I)}function v(){t&&(t.removeEventListener("mousedown",k),t.removeEventListener("touchstart",k))}function D(C){let O=!1;return a&&a.forEach(I=>{C[I]&&(O=!0)}),O}function k(C){if(!D(C)){l=C.target;let O=C?.touches?.[0]??C,{target:I}=O;if(!e.allowDragFrom||e.allowDragFrom&&l.matches(e.allowDragFrom)||e.allowDragFromClosest&&l.closest(e.allowDragFromClosest)){w.dragHandle=l;let F=rA.windowScrollPosition();d=F.left+O.clientX,u=F.top+O.clientY,f=O.clientX-O.clientX,p=O.clientY-O.clientY,w=Object.assign(w,{deltaX:f,deltaY:p,startX:d,startY:u,target:I}),m(n,C,w)!==!1&&(document.body.addEventListener("mousemove",x),document.body.addEventListener("touchmove",x),document.body.addEventListener("mouseup",S),document.body.addEventListener("touchend",S),document.body.addEventListener("touchcancel",S))}}}function x(C){if(!D(C)){let O=C?.touches?.[0]??C;f=O.clientX-d,p=O.clientY-u;let{target:I}=O;y||(w=Object.assign(w,{deltaX:f,deltaY:p,startX:d,startY:u,target:I}),m(o,C,w),y=!0),w=Object.assign(w,{deltaX:f,deltaY:p,startX:d,startY:u,target:I}),m(r,C,w)}}function S(C){if(document.body.removeEventListener("mousemove",x),document.body.removeEventListener("touchmove",x),document.body.removeEventListener("mouseup",S),document.body.removeEventListener("touchend",S),document.body.removeEventListener("touchcancel",S),y){let{target:O}=C;w=Object.assign(w,{target:O}),m(i,C,w),y=!1}}return b(),{destroy:v}}function sA(e){let{element:t,onMouseWheel:n}=e;function o(){t.removeEventListener("wheel",i),t.removeEventListener("mousewheel",i)}function r(){t.addEventListener("wheel",i),t.addEventListener("mousewheel",i)}function i(a){let l=a||window.event,d=0,u=0,f=0;l.wheelDelta&&(d=l.wheelDelta/120),l.detail&&(d=-l.detail/3),f=d,l.axis!==void 0&&l.axis===l.HORIZONTAL_AXIS&&(f=0,u=-1*d),l.wheelDeltaY!==void 0&&(f=l.wheelDeltaY/120),l.wheelDeltaX!==void 0&&(u=-1*l.wheelDeltaX/120),typeof n=="function"&&n(a,d,u,f)}return r(),{destroy:o}}function iA(e){let{resizeableElement:t,resizeableHandleElement:n,onResizeStart:o,onResize:r,onResizeEnd:i}=e;if(!n||typeof n.addEventListener!="function")throw new Error("[Slick.Resizable] You did not provide a valid html element that will be used for the handle to resize.");function a(){n.addEventListener("mousedown",u),n.addEventListener("touchstart",u)}function l(){typeof n?.removeEventListener=="function"&&(n.removeEventListener("mousedown",u),n.removeEventListener("touchstart",u))}function d(y,w){if(typeof y=="function")return y(w,{resizeableElement:t,resizeableHandleElement:n})}function u(y){y.preventDefault();let w=y.touches?y.changedTouches[0]:y;d(o,w)!==!1&&(document.body.addEventListener("mousemove",f),document.body.addEventListener("mouseup",p),document.body.addEventListener("touchmove",f),document.body.addEventListener("touchend",p))}function f(y){y.preventDefault&&y.type!=="touchmove"&&y.preventDefault();let w=y.touches?y.changedTouches[0]:y;typeof r=="function"&&r(w,{resizeableElement:t,resizeableHandleElement:n})}function p(y){let w=y.touches?y.changedTouches[0]:y;d(i,w),document.body.removeEventListener("mousemove",f),document.body.removeEventListener("mouseup",p),document.body.removeEventListener("touchmove",f),document.body.removeEventListener("touchend",p)}return a(),{destroy:l}}var Rd=Zr,aA=Sa,Td=xh,lA=Rh,cA=jv,pi=go,dA=class{constructor(e){P(this,"pluginName","CellRangeSelector"),P(this,"onBeforeCellRangeSelected",new Rd("onBeforeCellRangeSelected")),P(this,"onCellRangeSelected",new Rd("onCellRangeSelected")),P(this,"onCellRangeSelecting",new Rd("onCellRangeSelecting")),P(this,"_grid"),P(this,"_currentlySelectedRange",null),P(this,"_canvas",null),P(this,"_decorator"),P(this,"_gridOptions"),P(this,"_activeCanvas"),P(this,"_dragging",!1),P(this,"_handler",new aA),P(this,"_options"),P(this,"_defaults",{autoScroll:!0,minIntervalToShowNextCell:30,maxIntervalToShowNextCell:600,accelerateInterval:5,selectionCss:{border:"2px dashed blue"}}),P(this,"_rowOffset",0),P(this,"_columnOffset",0),P(this,"_isRightCanvas",!1),P(this,"_isBottomCanvas",!1),P(this,"_activeViewport"),P(this,"_autoScrollTimerId"),P(this,"_draggingMouseOffset"),P(this,"_moveDistanceForOneCell"),P(this,"_xDelayForNextCell",0),P(this,"_yDelayForNextCell",0),P(this,"_viewportHeight",0),P(this,"_viewportWidth",0),P(this,"_isRowMoveRegistered",!1),P(this,"_scrollLeft",0),P(this,"_scrollTop",0),this._options=pi.extend(!0,{},this._defaults,e)}init(e){if(lA===void 0)throw new Error('Slick.Draggable is undefined, make sure to import "slick.interactions.js"');this._decorator=this._options.cellDecorator||new cA(e,this._options),this._grid=e,pi.addSlickEventPubSubWhenDefined(e.getPubSubService(),this),this._canvas=this._grid.getCanvasNode(),this._gridOptions=this._grid.getOptions(),this._handler.subscribe(this._grid.onScroll,this.handleScroll.bind(this)).subscribe(this._grid.onDragInit,this.handleDragInit.bind(this)).subscribe(this._grid.onDragStart,this.handleDragStart.bind(this)).subscribe(this._grid.onDrag,this.handleDrag.bind(this)).subscribe(this._grid.onDragEnd,this.handleDragEnd.bind(this))}destroy(){this._handler.unsubscribeAll(),this._activeCanvas=null,this._activeViewport=null,this._canvas=null,this._decorator?.destroy()}getCellDecorator(){return this._decorator}handleScroll(e,t){this._scrollTop=t.scrollTop,this._scrollLeft=t.scrollLeft}handleDragInit(e){this._activeCanvas=this._grid.getActiveCanvasNode(e),this._activeViewport=this._grid.getActiveViewportNode(e);let t=this._grid.getDisplayedScrollbarDimensions();if(this._viewportWidth=this._activeViewport.offsetWidth-t.width,this._viewportHeight=this._activeViewport.offsetHeight-t.height,this._moveDistanceForOneCell={x:this._grid.getAbsoluteColumnMinWidth()/2,y:this._grid.getOptions().rowHeight/2},this._isRowMoveRegistered=this.hasRowMoveManager(),this._rowOffset=0,this._columnOffset=0,this._isBottomCanvas=this._activeCanvas.classList.contains("grid-canvas-bottom"),this._gridOptions.frozenRow>-1&&this._isBottomCanvas){let n=`.${this._grid.getUID()} .grid-canvas-${this._gridOptions.frozenBottom?"bottom":"top"}`,o=document.querySelector(n);o&&(this._rowOffset=o.clientHeight||0)}if(this._isRightCanvas=this._activeCanvas.classList.contains("grid-canvas-right"),this._gridOptions.frozenColumn>-1&&this._isRightCanvas){let n=document.querySelector(`.${this._grid.getUID()} .grid-canvas-left`);n&&(this._columnOffset=n.clientWidth||0)}e.stopImmediatePropagation(),e.preventDefault()}handleDragStart(e,t){let n=this._grid.getCellFromEvent(e);if(n&&this.onBeforeCellRangeSelected.notify(n).getReturnValue()!==!1&&this._grid.canCellBeSelected(n.row,n.cell)&&(this._dragging=!0,e.stopImmediatePropagation()),!this._dragging)return;this._grid.focus();let o=pi.offset(this._canvas),r=t.startX-(o?.left??0);this._gridOptions.frozenColumn>=0&&this._isRightCanvas&&(r+=this._scrollLeft);let i=t.startY-(o?.top??0);this._gridOptions.frozenRow>=0&&this._isBottomCanvas&&(i+=this._scrollTop);let a=this._grid.getCellFromPoint(r,i);return t.range={start:a,end:{}},this._currentlySelectedRange=t.range,this._decorator.show(new Td(a.row,a.cell))}handleDrag(e,t){if(!this._dragging&&!this._isRowMoveRegistered)return;this._isRowMoveRegistered||e.stopImmediatePropagation();let n=e.getNativeEvent();if(this._options.autoScroll&&(this._draggingMouseOffset=this.getMouseOffsetViewport(n,t),this._draggingMouseOffset.isOutsideViewport))return this.handleDragOutsideViewport();this.stopIntervalTimer(),this.handleDragTo(n,t)}getMouseOffsetViewport(e,t){let n=e?.touches?.[0]??e,o=this._activeViewport.scrollLeft,r=this._activeViewport.scrollTop,i=o+this._viewportWidth,a=r+this._viewportHeight,l=pi.offset(this._activeViewport),d=l?.left??0,u=l?.top??0,f=d+this._viewportWidth,p=u+this._viewportHeight,y={e,dd:t,viewport:{left:o,top:r,right:i,bottom:a,offset:{left:d,top:u,right:f,bottom:p}},offset:{x:0,y:0},isOutsideViewport:!1};return n.pageX<d?y.offset.x=n.pageX-d:n.pageX>f&&(y.offset.x=n.pageX-f),n.pageY<u?y.offset.y=u-n.pageY:n.pageY>p&&(y.offset.y=p-n.pageY),y.isOutsideViewport=!!y.offset.x||!!y.offset.y,y}handleDragOutsideViewport(){if(this._xDelayForNextCell=this._options.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.x)*this._options.accelerateInterval,this._yDelayForNextCell=this._options.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.y)*this._options.accelerateInterval,!this._autoScrollTimerId){let e=0,t=0;this._autoScrollTimerId=window.setInterval(()=>{let n=!1,o=!1;this._draggingMouseOffset.offset.x?(e+=this._options.minIntervalToShowNextCell,n=e>=this._xDelayForNextCell):e=0,this._draggingMouseOffset.offset.y?(t+=this._options.minIntervalToShowNextCell,o=t>=this._yDelayForNextCell):t=0,(n||o)&&(n&&(e=0),o&&(t=0),this.handleDragToNewPosition(n,o))},this._options.minIntervalToShowNextCell)}}handleDragToNewPosition(e,t){let n=this._draggingMouseOffset.e.pageX,o=this._draggingMouseOffset.e.pageY,r=this._draggingMouseOffset.offset.x,i=this._draggingMouseOffset.offset.y,a=this._draggingMouseOffset.viewport.offset;e&&r&&(r>0?n=a.right+this._moveDistanceForOneCell.x:n=a.left-this._moveDistanceForOneCell.x),t&&i&&(i>0?o=a.top-this._moveDistanceForOneCell.y:o=a.bottom+this._moveDistanceForOneCell.y),this.handleDragTo({pageX:n,pageY:o},this._draggingMouseOffset.dd)}stopIntervalTimer(){this._autoScrollTimerId&&(window.clearInterval(this._autoScrollTimerId),this._autoScrollTimerId=void 0)}handleDragTo(e,t){let n=e?.touches?.[0]??e,o=pi.offset(this._activeCanvas),r=this._grid.getCellFromPoint(n.pageX-(o?.left??0)+this._columnOffset,n.pageY-(o?.top??0)+this._rowOffset);if(!(this._gridOptions.frozenColumn>=0&&!this._isRightCanvas&&r.cell>this._gridOptions.frozenColumn||this._isRightCanvas&&r.cell<=this._gridOptions.frozenColumn)&&!(this._gridOptions.frozenRow>=0&&!this._isBottomCanvas&&r.row>=this._gridOptions.frozenRow||this._isBottomCanvas&&r.row<this._gridOptions.frozenRow)){if(this._options.autoScroll&&this._draggingMouseOffset){let i=this._grid.getCellNodeBox(r.row,r.cell);if(!i)return;let a=this._draggingMouseOffset.viewport;(i.left<a.left||i.right>a.right||i.top<a.top||i.bottom>a.bottom)&&this._grid.scrollCellIntoView(r.row,r.cell)}if(this._grid.canCellBeSelected(r.row,r.cell)&&t?.range){t.range.end=r;let i=new Td(t.range.start.row??0,t.range.start.cell??0,r.row,r.cell);this._decorator.show(i),this.onCellRangeSelecting.notify({range:i})}}}hasRowMoveManager(){return!!(this._grid.getPluginByName("RowMoveManager")||this._grid.getPluginByName("CrossGridRowMoveManager"))}handleDragEnd(e,t){this._decorator.hide(),this._dragging&&(this._dragging=!1,e.stopImmediatePropagation(),this.stopIntervalTimer(),this.onCellRangeSelected.notify({range:new Td(t.range.start.row??0,t.range.start.cell??0,t.range.end.row,t.range.end.cell)}))}getCurrentRange(){return this._currentlySelectedRange}},uA=kc,hA=Sa,fr=go,fA=class{constructor(e){P(this,"pluginName","CheckboxSelectColumn"),P(this,"_dataView"),P(this,"_grid"),P(this,"_isUsingDataView",!1),P(this,"_selectableOverride",null),P(this,"_headerRowNode"),P(this,"_selectAll_UID"),P(this,"_handler",new hA),P(this,"_selectedRowsLookup",{}),P(this,"_checkboxColumnCellIndex",null),P(this,"_options"),P(this,"_defaults",{columnId:"_checkbox_selector",cssClass:void 0,hideSelectAllCheckbox:!1,name:"",toolTip:"Select/Deselect All",width:30,reorderable:!1,applySelectOnAllPages:!1,hideInColumnTitleRow:!1,hideInFilterHeaderRow:!0}),P(this,"_isSelectAllChecked",!1),P(this,"_bindingEventService"),this._bindingEventService=new uA,this._options=fr.extend(!0,{},this._defaults,e),this._selectAll_UID=this.createUID(),typeof this._options.selectableOverride=="function"&&this.selectableOverride(this._options.selectableOverride)}init(e){this._grid=e,this._isUsingDataView=!Array.isArray(e.getData()),this._isUsingDataView&&(this._dataView=e.getData()),this._handler.subscribe(this._grid.onSelectedRowsChanged,this.handleSelectedRowsChanged.bind(this)).subscribe(this._grid.onClick,this.handleClick.bind(this)).subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this)).subscribe(this._grid.onAfterSetColumns,()=>this.renderSelectAllCheckbox(this._isSelectAllChecked)),this._isUsingDataView&&this._dataView&&this._options.applySelectOnAllPages&&this._handler.subscribe(this._dataView.onSelectedRowIdsChanged,this.handleDataViewSelectedIdsChanged.bind(this)).subscribe(this._dataView.onPagingInfoChanged,this.handleDataViewSelectedIdsChanged.bind(this)),this._options.hideInFilterHeaderRow||this.addCheckboxToFilterHeaderRow(e),this._options.hideInColumnTitleRow||this._handler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this))}destroy(){this._handler.unsubscribeAll(),this._bindingEventService.unbindAll()}getOptions(){return this._options}setOptions(e){if(this._options=fr.extend(!0,{},this._options,e),this._options.hideSelectAllCheckbox)this.hideSelectAllFromColumnHeaderTitleRow(),this.hideSelectAllFromColumnHeaderFilterRow();else if(this._options.hideInColumnTitleRow?(this.hideSelectAllFromColumnHeaderTitleRow(),this._options.name&&this._grid.updateColumnHeader(this._options.columnId||"",this._options.name,"")):(this.renderSelectAllCheckbox(this._isSelectAllChecked),this._handler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this))),this._options.hideInFilterHeaderRow)this.hideSelectAllFromColumnHeaderFilterRow();else{let t=this._headerRowNode?.querySelector("#filter-checkbox-selectall-container");if(t){t.style.display="flex";let n=t.querySelector('input[type="checkbox"]');n&&(n.checked=this._isSelectAllChecked)}}}hideSelectAllFromColumnHeaderTitleRow(){this._grid.updateColumnHeader(this._options.columnId||"",this._options.name||"","")}hideSelectAllFromColumnHeaderFilterRow(){let e=this._headerRowNode?.querySelector("#filter-checkbox-selectall-container");e&&(e.style.display="none")}handleSelectedRowsChanged(){let e=this._grid.getSelectedRows(),t={},n=0,o=0,r=0,i=0;if(typeof this._selectableOverride=="function")for(r=0;r<this._grid.getDataLength();r++){let l=this._grid.getDataItem(r);this.checkSelectableOverride(o,l,this._grid)||i++}let a=[];for(o=0;o<e.length;o++){n=e[o];let l=this._grid.getDataItem(n);this.checkSelectableOverride(o,l,this._grid)?(t[n]=!0,t[n]!==this._selectedRowsLookup[n]&&(this._grid.invalidateRow(n),delete this._selectedRowsLookup[n])):a.push(n)}if(typeof this._selectedRowsLookup=="object"&&Object.keys(this._selectedRowsLookup).forEach(l=>{l!==void 0&&this._grid.invalidateRow(+l)}),this._selectedRowsLookup=t,this._grid.render(),this._isSelectAllChecked=(e?.length??0)+i>=this._grid.getDataLength(),(!this._isUsingDataView||!this._options.applySelectOnAllPages)&&(!this._options.hideInColumnTitleRow&&!this._options.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._options.hideInFilterHeaderRow)){let l=this._headerRowNode?.querySelector(`#header-filter-selector${this._selectAll_UID}`);l&&(l.checked=this._isSelectAllChecked)}if(a.length>0){for(o=0;o<a.length;o++){let l=e.indexOf(a[o]);e.splice(l,1)}this._grid.setSelectedRows(e,"click.cleanup")}}handleDataViewSelectedIdsChanged(){let e=this._dataView.getAllSelectedFilteredIds(),t=this._dataView.getFilteredItems(),n=0;if(typeof this._selectableOverride=="function"&&e.length>0)for(let o=0;o<this._dataView.getItemCount();o++){let r=this._dataView.getItemByIdx(o),i=this._dataView.getIdPropertyName(),a=r[i];t.findIndex(function(l){return l[i]===a})>=0&&!this.checkSelectableOverride(o,r,this._grid)&&n++}if(this._isSelectAllChecked=(e&&e.length)+n>=t.length,!this._options.hideInColumnTitleRow&&!this._options.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._options.hideInFilterHeaderRow){let o=this._headerRowNode?.querySelector(`#header-filter-selector${this._selectAll_UID}`);o&&(o.checked=this._isSelectAllChecked)}}handleKeyDown(e,t){e.which===32&&this._grid.getColumns()[t.cell].id===this._options.columnId&&((!this._grid.getEditorLock().isActive()||this._grid.getEditorLock().commitCurrentEdit())&&this.toggleRowSelection(t.row),e.preventDefault(),e.stopImmediatePropagation())}handleClick(e,t){if(this._grid.getColumns()[t.cell].id===this._options.columnId&&e.target.type==="checkbox"){if(this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){e.preventDefault(),e.stopImmediatePropagation();return}this.toggleRowSelection(t.row),e.stopPropagation(),e.stopImmediatePropagation()}}toggleRowSelection(e){let t=this._grid.getDataItem(e);if(this.checkSelectableOverride(e,t,this._grid)){if(this._selectedRowsLookup[e]){let n=this._grid.getSelectedRows().filter(o=>o!==e);this._grid.setSelectedRows(n,"click.toggle")}else this._grid.setSelectedRows(this._grid.getSelectedRows().concat(e),"click.toggle");this._grid.setActiveCell(e,this.getCheckboxColumnCellIndex())}}selectRows(e){let t=[];for(let n=0,o=e.length;n<o;n++)this._selectedRowsLookup[e[n]]||(t[t.length]=e[n]);this._grid.setSelectedRows(this._grid.getSelectedRows().concat(t),"SlickCheckboxSelectColumn.selectRows")}deSelectRows(e){let t=[];for(let n=0,o=e.length;n<o;n++)this._selectedRowsLookup[e[n]]&&(t[t.length]=e[n]);this._grid.setSelectedRows(this._grid.getSelectedRows().filter(n=>t.indexOf(n)<0),"SlickCheckboxSelectColumn.deSelectRows")}handleHeaderClick(e,t){if(t.column.id===this._options.columnId&&e.target.type==="checkbox"){if(this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){e.preventDefault(),e.stopImmediatePropagation();return}let n=e.target.checked,o=n?"click.selectAll":"click.unselectAll",r=[];if(n){for(let i=0;i<this._grid.getDataLength();i++){let a=this._grid.getDataItem(i);!a.__group&&!a.__groupTotals&&this.checkSelectableOverride(i,a,this._grid)&&r.push(i)}n=!0}if(this._isUsingDataView&&this._dataView&&this._options.applySelectOnAllPages){let i=[],a=this._dataView.getFilteredItems();for(let l=0;l<a.length;l++){let d=a[l];this.checkSelectableOverride(l,d,this._grid)&&i.push(d[this._dataView.getIdPropertyName()])}this._dataView.setSelectedIds(i,{isRowBeingAdded:n})}this._grid.setSelectedRows(r,o),e.stopPropagation(),e.stopImmediatePropagation()}}getCheckboxColumnCellIndex(){if(this._checkboxColumnCellIndex===null){this._checkboxColumnCellIndex=0;let e=this._grid.getColumns();for(let t=0;t<e.length;t++)e[t].id===this._options.columnId&&(this._checkboxColumnCellIndex=t)}return this._checkboxColumnCellIndex}createCheckboxElement(e,t=!1){let n=new DocumentFragment;return n.appendChild(fr.createDomElement("input",{id:e,type:"checkbox",checked:t,ariaChecked:String(t)})),n.appendChild(fr.createDomElement("label",{htmlFor:e})),n}getColumnDefinition(){return{id:this._options.columnId,reorderable:this._options.reorderable,name:this._options.hideSelectAllCheckbox||this._options.hideInColumnTitleRow?this._options.name||"":this.createCheckboxElement(`header-selector${this._selectAll_UID}`),toolTip:this._options.hideSelectAllCheckbox||this._options.hideInColumnTitleRow?"":this._options.toolTip,field:"sel",width:this._options.width,resizable:!1,sortable:!1,cssClass:this._options.cssClass,hideSelectAllCheckbox:this._options.hideSelectAllCheckbox,formatter:this.checkboxSelectionFormatter.bind(this),excludeFromColumnPicker:this._options.excludeFromColumnPicker??!0,excludeFromGridMenu:this._options.excludeFromGridMenu??!0,excludeFromHeaderMenu:this._options.excludeFromHeaderMenu??!0}}addCheckboxToFilterHeaderRow(e){this._handler.subscribe(e.onHeaderRowCellRendered,(t,n)=>{if(n.column.field==="sel"){fr.emptyElement(n.node);let o=fr.createDomElement("span",{id:"filter-checkbox-selectall-container",ariaChecked:"false"});o.appendChild(fr.createDomElement("input",{type:"checkbox",id:`header-filter-selector${this._selectAll_UID}`})),o.appendChild(fr.createDomElement("label",{htmlFor:`header-filter-selector${this._selectAll_UID}`})),n.node.appendChild(o),this._headerRowNode=n.node,this._bindingEventService.bind(o,"click",r=>this.handleHeaderClick(r,n))}})}createUID(){return Math.round(1e7*Math.random())}checkboxSelectionFormatter(e,t,n,o,r,i){if(r&&this.checkSelectableOverride(e,r,i)){let a=this.createUID()+e;return this.createCheckboxElement(`selector${a}`,!!this._selectedRowsLookup[e])}return null}checkSelectableOverride(e,t,n){return typeof this._selectableOverride=="function"?this._selectableOverride(e,t,n):!0}renderSelectAllCheckbox(e){this._grid.updateColumnHeader(this._options.columnId||"",this.createCheckboxElement(`header-selector${this._selectAll_UID}`,!!e),this._options.toolTip)}selectableOverride(e){this._selectableOverride=e}},pA=kc,mA=Zr,gA=XN,kd=go,yA=class{constructor(e){P(this,"pluginName","HeaderButtons"),P(this,"onCommand",new mA("onCommand")),P(this,"_grid"),P(this,"_handler",new gA),P(this,"_bindingEventService",new pA),P(this,"_defaults",{buttonCssClass:"slick-header-button"}),P(this,"_options"),this._options=kd.extend(!0,{},this._defaults,e)}init(e){this._grid=e,kd.addSlickEventPubSubWhenDefined(e.getPubSubService(),this),this._handler.subscribe(this._grid.onHeaderCellRendered,this.handleHeaderCellRendered.bind(this)).subscribe(this._grid.onBeforeHeaderCellDestroy,this.handleBeforeHeaderCellDestroy.bind(this)),this._grid.setColumns(this._grid.getColumns())}destroy(){this._handler.unsubscribeAll(),this._bindingEventService.unbindAll()}handleHeaderCellRendered(e,t){let n=t.column;if(n.header?.buttons){let o=n.header.buttons.length;for(;o--;){let r=n.header.buttons[o],i=this.runOverrideFunctionWhenExists(r.itemVisibilityOverride,t),a=this.runOverrideFunctionWhenExists(r.itemUsabilityOverride,t);if(!i)continue;Object.prototype.hasOwnProperty.call(r,"itemUsabilityOverride")&&(r.disabled=!a);let l=document.createElement("div");l.className=this._options.buttonCssClass||"",l.ariaLabel="Header Button",l.role="button",r.disabled&&l.classList.add("slick-header-button-disabled"),r.showOnHover&&l.classList.add("slick-header-button-hidden"),r.image&&(l.style.backgroundImage=`url(${r.image})`),r.cssClass&&l.classList.add(...kd.classNameToList(r.cssClass)),r.tooltip&&(l.title=r.tooltip),r.handler&&!r.disabled&&this._bindingEventService.bind(l,"click",r.handler),this._bindingEventService.bind(l,"click",this.handleButtonClick.bind(this,r,t.column)),t.node.appendChild(l)}}}handleBeforeHeaderCellDestroy(e,t){if(t.column.header?.buttons){let n=(this._options.buttonCssClass||"").replace(/(\s+)/g,".");n&&t.node.querySelectorAll(`.${n}`).forEach(o=>o.remove())}}handleButtonClick(e,t,n){let o=e.command||"",r={grid:this._grid,column:t,button:e};o&&(r.command=o),typeof e.action=="function"&&e.action.call(this,n,r),o&&!e.disabled&&(this.onCommand.notify(r,n,this),this._grid.updateColumnHeader(t.id)),n.preventDefault(),n.stopPropagation()}runOverrideFunctionWhenExists(e,t){return typeof e=="function"?e.call(this,t):!0}},vA=kc,Ed=KN,bA=Sa,Fn=go,wA=class{constructor(e){P(this,"pluginName","HeaderMenu"),P(this,"onAfterMenuShow",new Ed("onAfterMenuShow")),P(this,"onBeforeMenuShow",new Ed("onBeforeMenuShow")),P(this,"onCommand",new Ed("onCommand")),P(this,"_grid"),P(this,"_gridUid",""),P(this,"_handler",new bA),P(this,"_bindingEventService",new vA),P(this,"_defaults",{buttonCssClass:void 0,buttonImage:void 0,minWidth:100,autoAlign:!0,autoAlignOffset:0,subMenuOpenByEvent:"mouseover"}),P(this,"_options"),P(this,"_activeHeaderColumnElm"),P(this,"_menuElm"),P(this,"_subMenuParentId",""),this._options=Fn.extend(!0,{},e,this._defaults)}init(e){this._grid=e,this._gridUid=e?.getUID()||"",Fn.addSlickEventPubSubWhenDefined(e.getPubSubService(),this),this._handler.subscribe(this._grid.onHeaderCellRendered,this.handleHeaderCellRendered.bind(this)).subscribe(this._grid.onBeforeHeaderCellDestroy,this.handleBeforeHeaderCellDestroy.bind(this)),this._grid.setColumns(this._grid.getColumns()),this._bindingEventService.bind(document.body,"click",this.handleBodyMouseDown.bind(this))}setOptions(e){this._options=Fn.extend(!0,{},this._options,e)}getGridUidSelector(){let e=this._grid.getUID()||"";return e?`.${e}`:""}destroy(){this._handler.unsubscribeAll(),this._bindingEventService.unbindAll(),this._menuElm=this._menuElm||document.body.querySelector(`.slick-header-menu${this.getGridUidSelector()}`),this._menuElm?.remove(),this._activeHeaderColumnElm=void 0}destroyAllMenus(){this.destroySubMenus(),this._bindingEventService.unbindAll("parent-menu"),document.querySelectorAll(`.slick-header-menu${this.getGridUidSelector()}`).forEach(e=>e.remove())}destroySubMenus(){this._bindingEventService.unbindAll("sub-menu"),document.querySelectorAll(`.slick-header-menu.slick-submenu${this.getGridUidSelector()}`).forEach(e=>e.remove())}handleBodyMouseDown(e){let t=!1;this._menuElm?.contains(e.target)&&(t=!0),t||document.querySelectorAll(`.slick-header-menu.slick-submenu${this.getGridUidSelector()}`).forEach(n=>{n.contains(e.target)&&(t=!0)}),(this._menuElm!==e.target&&!t&&!e.defaultPrevented||e.target.className==="close")&&this.hideMenu()}hideMenu(){this._menuElm&&(this._menuElm.remove(),this._menuElm=void 0),this._activeHeaderColumnElm?.classList.remove("slick-header-column-active"),this.destroySubMenus()}handleHeaderCellRendered(e,t){let n=t.column?.header?.menu;if(n?.items&&console.warn('[SlickGrid] Header Menu "items" property was deprecated in favor of "commandItems" to align with all other Menu plugins.'),n){if(!this.runOverrideFunctionWhenExists(this._options.menuUsabilityOverride,t))return;let o=document.createElement("div");if(o.className="slick-header-menubutton",o.ariaLabel="Header Menu",o.role="button",!this._options.buttonCssClass&&!this._options.buttonImage&&(this._options.buttonCssClass="caret"),this._options.buttonCssClass){let r=document.createElement("span");r.classList.add(...Fn.classNameToList(this._options.buttonCssClass)),o.appendChild(r)}this._options.buttonImage&&(o.style.backgroundImage=`url(${this._options.buttonImage})`),this._options.tooltip&&(o.title=this._options.tooltip),this._bindingEventService.bind(o,"click",r=>{this.destroyAllMenus(),this.createParentMenu(r,n,t.column)}),t.node.appendChild(o)}}handleBeforeHeaderCellDestroy(e,t){t.column.header?.menu&&t.node.querySelectorAll(".slick-header-menubutton").forEach(n=>n.remove())}addSubMenuTitleWhenExists(e,t){if(e!=="divider"&&e?.subMenuTitle){let n=document.createElement("div");n.className="slick-menu-title",n.textContent=e.subMenuTitle;let o=e.subMenuTitleCssClass;o&&n.classList.add(...Fn.classNameToList(o)),t.appendChild(n)}}createParentMenu(e,t,n){let o={grid:this._grid,column:n,menu:t};if(this.onBeforeMenuShow.notify(o,e,this).getReturnValue()===!1)return;this._menuElm=this.createMenu(t.commandItems||t.items,n);let r=this._grid.getContainerNode();r&&r.appendChild(this._menuElm),this.repositionMenu(e,this._menuElm),this.onAfterMenuShow.notify(o,e,this).getReturnValue()!==!1&&(e.preventDefault(),e.stopPropagation())}createMenu(e,t,n=0,o){let r=n>0,i=o?.command,a=n===1&&i?i.replaceAll(" ",""):"";a&&(this._subMenuParentId=a),r&&(a=this._subMenuParentId);let l=`slick-header-menu slick-menu-level-${n} ${this._gridUid}`,d=document.body.querySelector(`.slick-header-menu.slick-menu-level-${n}${this.getGridUidSelector()}`);if(d){if(d.dataset.subMenuParent===a)return d;this.destroySubMenus()}let u=document.createElement("div");u.className=l,n>0&&(u.classList.add("slick-submenu"),a&&(u.dataset.subMenuParent=a)),u.classList.add(this._gridUid),u.role="menu",u.ariaLabel=n>1?"SubMenu":"Header Menu",u.style.minWidth=`${this._options.minWidth}px`,u.setAttribute("aria-expanded","true");let f={grid:this._grid,column:t,menu:{items:e}};o&&n>0&&this.addSubMenuTitleWhenExists(o,u);for(let p=0;p<e.length;p++){let y=!0,w=e[p],b=this.runOverrideFunctionWhenExists(w.itemVisibilityOverride,f),m=this.runOverrideFunctionWhenExists(w.itemUsabilityOverride,f);if(!b)continue;Object.prototype.hasOwnProperty.call(w,"itemUsabilityOverride")&&(w.disabled=!m);let v=document.createElement("div");v.className="slick-header-menuitem",v.role="menuitem",(w.divider||w==="divider")&&(v.classList.add("slick-header-menuitem-divider"),y=!1),w.disabled&&v.classList.add("slick-header-menuitem-disabled"),w.hidden&&v.classList.add("slick-header-menuitem-hidden"),w.cssClass&&v.classList.add(...Fn.classNameToList(w.cssClass)),w.tooltip&&(v.title=w.tooltip||"");let D=document.createElement("div");D.className="slick-header-menuicon",v.appendChild(D),w.iconCssClass&&D.classList.add(...Fn.classNameToList(w.iconCssClass)),w.iconImage&&(D.style.backgroundImage="url("+w.iconImage+")");let k=document.createElement("span");if(k.className="slick-header-menucontent",k.textContent=w.title||"",v.appendChild(k),w.textCssClass&&k.classList.add(...Fn.classNameToList(w.textCssClass)),u.appendChild(v),y){let x=r?"sub-menu":"parent-menu";this._bindingEventService.bind(v,"click",this.handleMenuItemClick.bind(this,w,t,n),void 0,x)}if(this._options.subMenuOpenByEvent==="mouseover"&&this._bindingEventService.bind(v,"mouseover",x=>{w.commandItems||w.items?this.repositionSubMenu(w,t,n,x):r||this.destroySubMenus()}),w.commandItems||w.items){let x=document.createElement("div");x.className="sub-item-chevron",this._options.subItemChevronClass?x.classList.add(...Fn.classNameToList(this._options.subItemChevronClass)):x.textContent="⮞",v.classList.add("slick-submenu-item"),v.appendChild(x)}}return u}handleMenuItemClick(e,t,n=0,o){if(e!=="divider"&&!e.disabled&&!e.divider){let r=e.command||"";if(Fn.isDefined(r)&&!e.commandItems&&!e.items){let i={grid:this._grid,column:t,command:r,item:e};this.onCommand.notify(i,o,this),typeof e.action=="function"&&e.action.call(this,o,i),o.defaultPrevented||this.hideMenu()}else e.commandItems||e.items?this.repositionSubMenu(e,t,n,o):this.destroySubMenus()}}repositionSubMenu(e,t,n,o){o.target.classList.contains("slick-header-menubutton")&&this.destroySubMenus();let r=this.createMenu(e.commandItems||e.items||[],t,n+1,e);document.body.appendChild(r),this.repositionMenu(o,r)}repositionMenu(e,t){let n=e.target,o=t.classList.contains("slick-submenu"),r=o?e.target.closest(".slick-header-menuitem"):n,i=Fn.offset(n),a=this._grid.getGridPosition(),l=t.offsetWidth,d=Fn.offset(this._menuElm),u=Fn.offset(r),f=o?u?.top??0:n.clientHeight??i?.top??0+(this._options?.menuOffsetTop??0),p=o?u?.left??0:i?.left??0;if(o&&r){let y=p+Number(l);o&&(y+=r.clientWidth);let w=document.documentElement.clientWidth;(y>=a.width||y>=w?"left":"right")=="left"?(t.classList.remove("dropright"),t.classList.add("dropleft"),p-=l):(t.classList.remove("dropleft"),t.classList.add("dropright"),o&&(p+=r.offsetWidth))}else p+t.offsetWidth>=a.width&&(p=p+n.clientWidth-t.clientWidth+(this._options.autoAlignOffset||0)),p-=d?.left??0;t.style.top=`${f}px`,t.style.left=`${p}px`,this._activeHeaderColumnElm=t.closest(".slick-header-column"),this._activeHeaderColumnElm&&this._activeHeaderColumnElm.classList.add("slick-header-column-active")}runOverrideFunctionWhenExists(e,t){return typeof e=="function"?e.call(this,t):!0}},CA=Rh,Pd=Br,SA=jv,_A=dA,xA=Zr,RA=na,TA=Sa,Dd=xh,Ja=go,kA=class{constructor(e){P(this,"pluginName","RowSelectionModel"),P(this,"onSelectedRangesChanged",new xA("onSelectedRangesChanged")),P(this,"_grid"),P(this,"_ranges",[]),P(this,"_eventHandler",new TA),P(this,"_inHandler",!1),P(this,"_selector"),P(this,"_isRowMoveManagerHandler"),P(this,"_options"),P(this,"_defaults",{selectActiveRow:!0,dragToSelect:!1,autoScrollWhenDrag:!0,cellRangeSelector:void 0}),this._options=Ja.extend(!0,{},this._defaults,e)}init(e){if(CA===void 0)throw new Error('Slick.Draggable is undefined, make sure to import "slick.interactions.js"');if(this._selector=this._options.cellRangeSelector,this._grid=e,Ja.addSlickEventPubSubWhenDefined(e.getPubSubService(),this),!this._selector&&this._options.dragToSelect){if(!SA)throw new Error("Slick.CellRangeDecorator is required when option dragToSelect set to true");this._selector=new _A({selectionCss:{border:"none"},autoScroll:this._options.autoScrollWhenDrag})}this._eventHandler.subscribe(this._grid.onActiveCellChanged,this.wrapHandler(this.handleActiveCellChange).bind(this)),this._eventHandler.subscribe(this._grid.onKeyDown,this.wrapHandler(this.handleKeyDown).bind(this)),this._eventHandler.subscribe(this._grid.onClick,this.wrapHandler(this.handleClick).bind(this)),this._selector&&(e.registerPlugin(this._selector),this._selector.onCellRangeSelecting.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.subscribe(this.handleBeforeCellRangeSelected.bind(this)))}destroy(){this._eventHandler.unsubscribeAll(),this._selector&&(this._selector.onCellRangeSelecting.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.unsubscribe(this.handleBeforeCellRangeSelected.bind(this)),this._grid.unregisterPlugin(this._selector),this._selector.destroy&&this._selector.destroy())}wrapHandler(e){return(...t)=>{this._inHandler||(this._inHandler=!0,e.apply(this,t),this._inHandler=!1)}}rangesToRows(e){let t=[];for(let n=0;n<e.length;n++)for(let o=e[n].fromRow;o<=e[n].toRow;o++)t.push(o);return t}rowsToRanges(e){let t=[],n=this._grid.getColumns().length-1;return e.forEach(o=>t.push(new Dd(o,0,o,n))),t}getRowsRange(e,t){let n,o=[];for(n=e;n<=t;n++)o.push(n);for(n=t;n<e;n++)o.push(n);return o}getSelectedRows(){return this.rangesToRows(this._ranges)}setSelectedRows(e){this.setSelectedRanges(this.rowsToRanges(e),"SlickRowSelectionModel.setSelectedRows")}setSelectedRanges(e,t="SlickRowSelectionModel.setSelectedRanges"){if((!this._ranges||this._ranges.length===0)&&(!e||e.length===0))return;this._ranges=e;let n=new RA(new CustomEvent("click",{detail:{caller:t}}),this._ranges);this.onSelectedRangesChanged.notify(this._ranges,n)}getSelectedRanges(){return this._ranges}refreshSelections(){this.setSelectedRows(this.getSelectedRows())}handleActiveCellChange(e,t){this._options.selectActiveRow&&Ja.isDefined(t.row)&&this.setSelectedRanges([new Dd(t.row,0,t.row,this._grid.getColumns().length-1)])}handleKeyDown(e){let t=this._grid.getActiveCell();if(this._grid.getOptions().multiSelect&&t&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.which===Pd.UP||e.which===Pd.DOWN)){let n=this.getSelectedRows();n.sort(function(a,l){return a-l}),n.length||(n=[t.row]);let o=n[0],r=n[n.length-1],i;if(e.which===Pd.DOWN?i=t.row<r||o===r?++r:++o:i=t.row<r?--r:--o,i>=0&&i<this._grid.getDataLength()){this._grid.scrollRowIntoView(i);let a=this.rowsToRanges(this.getRowsRange(o,r));this.setSelectedRanges(a)}e.preventDefault(),e.stopPropagation()}}handleClick(e){let t=this._grid.getCellFromEvent(e);if(!t||!this._grid.canCellBeActive(t.row,t.cell)||!this._grid.getOptions().multiSelect||!e.ctrlKey&&!e.shiftKey&&!e.metaKey)return!1;let n=this.rangesToRows(this._ranges),o=n.indexOf(t.row);if(o===-1&&(e.ctrlKey||e.metaKey))n.push(t.row),this._grid.setActiveCell(t.row,t.cell);else if(o!==-1&&(e.ctrlKey||e.metaKey))n=n.filter(i=>i!==t.row),this._grid.setActiveCell(t.row,t.cell);else if(n.length&&e.shiftKey){let i=n.pop(),a=Math.min(t.row,i),l=Math.max(t.row,i);n=[];for(let d=a;d<=l;d++)d!==i&&n.push(d);n.push(i),this._grid.setActiveCell(t.row,t.cell)}let r=this.rowsToRanges(n);return this.setSelectedRanges(r),e.stopImmediatePropagation(),!0}handleBeforeCellRangeSelected(e,t){if(!this._isRowMoveManagerHandler){let n=this._grid.getPluginByName("RowMoveManager")||this._grid.getPluginByName("CrossGridRowMoveManager");this._isRowMoveManagerHandler=n?n.isHandlerColumn:Ja.noop}if(this._grid.getEditorLock().isActive()||this._isRowMoveManagerHandler(t.cell))return e.stopPropagation(),!1;this._grid.setActiveCell(t.row,t.cell)}handleCellRangeSelected(e,t){if(!this._grid.getOptions().multiSelect||!this._options.selectActiveRow)return!1;this.setSelectedRanges([new Dd(t.range.fromRow,0,t.range.toRow,this._grid.getColumns().length-1)])}},EA=Br,Od=Lv,mi=go,Bv=class{constructor(e){P(this,"pluginName","GroupItemMetadataProvider"),P(this,"_grid"),P(this,"_options"),P(this,"_defaults",{checkboxSelect:!1,checkboxSelectCssClass:"slick-group-select-checkbox",checkboxSelectPlugin:null,groupCssClass:"slick-group",groupTitleCssClass:"slick-group-title",totalsCssClass:"slick-group-totals",groupFocusable:!0,totalsFocusable:!1,toggleCssClass:"slick-group-toggle",toggleExpandedCssClass:"expanded",toggleCollapsedCssClass:"collapsed",enableExpandCollapse:!0,groupFormatter:this.defaultGroupCellFormatter.bind(this),totalsFormatter:this.defaultTotalsCellFormatter.bind(this),includeHeaderTotals:!1}),this._options=mi.extend(!0,{},this._defaults,e)}get dataView(){return this._grid?.getData?.()??{}}getOptions(){return this._options}setOptions(e){mi.extend(!0,this._options,e)}defaultGroupCellFormatter(e,t,n,o,r){if(!this._options.enableExpandCollapse)return r.title;let i=`${r.level*15}px`,a=r.collapsed?this._options.toggleCollapsedCssClass:this._options.toggleExpandedCssClass,l=document.createDocumentFragment();this._options.checkboxSelect&&l.appendChild(mi.createDomElement("span",{className:`${this._options.checkboxSelectCssClass} ${r.selectChecked?"checked":"unchecked"}`})),l.appendChild(mi.createDomElement("span",{className:`${this._options.toggleCssClass} ${a}`,ariaExpanded:String(!r.collapsed),style:{marginLeft:i}}));let d=mi.createDomElement("span",{className:this._options.groupTitleCssClass||""});return d.setAttribute("level",r.level),r.title instanceof HTMLElement?d.appendChild(r.title):this._grid.applyHtmlCode(d,r.title??""),l.appendChild(d),l}defaultTotalsCellFormatter(e,t,n,o,r,i){return o?.groupTotalsFormatter?.(r,o,i)??""}init(e){this._grid=e,this._grid.onClick.subscribe(this.handleGridClick.bind(this)),this._grid.onKeyDown.subscribe(this.handleGridKeyDown.bind(this))}destroy(){this._grid&&(this._grid.onClick.unsubscribe(this.handleGridClick.bind(this)),this._grid.onKeyDown.unsubscribe(this.handleGridKeyDown.bind(this)))}handleGridClick(e,t){let n=e.target,o=this._grid.getDataItem(t.row);if(o&&o instanceof Od&&n.classList.contains(this._options.toggleCssClass||"")&&(this.handleDataViewExpandOrCollapse(o),e.stopImmediatePropagation(),e.preventDefault()),o&&o instanceof Od&&n.classList.contains(this._options.checkboxSelectCssClass||"")){o.selectChecked=!o.selectChecked,n.classList.remove(o.selectChecked?"unchecked":"checked"),n.classList.add(o.selectChecked?"checked":"unchecked");let r=this.dataView.mapItemsToRows(o.rows);o.selectChecked?this._options.checkboxSelectPlugin.selectRows(r):this._options.checkboxSelectPlugin.deSelectRows(r)}}handleGridKeyDown(e){if(this._options.enableExpandCollapse&&e.which===EA.SPACE){let t=this._grid.getActiveCell();if(t){let n=this._grid.getDataItem(t.row);n&&n instanceof Od&&(this.handleDataViewExpandOrCollapse(n),e.stopImmediatePropagation(),e.preventDefault())}}}handleDataViewExpandOrCollapse(e){let t=this._grid.getRenderedRange();this.dataView.setRefreshHints({ignoreDiffsBefore:t.top,ignoreDiffsAfter:t.bottom+1}),e.collapsed?this.dataView.expandGroup(e.groupingKey):this.dataView.collapseGroup(e.groupingKey)}getGroupRowMetadata(e,t,n){let o=e?.level;return{selectable:!1,focusable:this._options.groupFocusable,cssClasses:`${this._options.groupCssClass} slick-group-level-${o}`,formatter:this._options.includeHeaderTotals&&this._options.totalsFormatter||void 0,columns:{0:{colspan:this._options.includeHeaderTotals?"1":"*",formatter:this._options.groupFormatter,editor:null}}}}getTotalsRowMetadata(e,t,n){let o=e?.group?.level;return{selectable:!1,focusable:this._options.totalsFocusable,cssClasses:`${this._options.totalsCssClass} slick-group-level-${o}`,formatter:this._options.totalsFormatter,editor:null}}},zo=Zr,Md=na,_m=Lv,PA=UN,zn=go,DA=Bv,OA=class{constructor(e,t){this.externalPubSub=t,P(this,"defaults",{globalItemMetadataProvider:null,groupItemMetadataProvider:null,inlineFilters:!1,useCSPSafeFilter:!1}),P(this,"idProperty","id"),P(this,"items",[]),P(this,"rows",[]),P(this,"idxById",new Map),P(this,"rowsById"),P(this,"filter",null),P(this,"filterCSPSafe",null),P(this,"updated",null),P(this,"suspend",!1),P(this,"isBulkSuspend",!1),P(this,"bulkDeleteIds",new Map),P(this,"sortAsc",!0),P(this,"fastSortField"),P(this,"sortComparer"),P(this,"refreshHints",{}),P(this,"prevRefreshHints",{}),P(this,"filterArgs"),P(this,"filteredItems",[]),P(this,"compiledFilter"),P(this,"compiledFilterCSPSafe"),P(this,"compiledFilterWithCaching"),P(this,"compiledFilterWithCachingCSPSafe"),P(this,"filterCache",[]),P(this,"_grid"),P(this,"groupingInfoDefaults",{getter:void 0,formatter:void 0,comparer:(n,o)=>n.value===o.value?0:n.value>o.value?1:-1,predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1}),P(this,"groupingInfos",[]),P(this,"groups",[]),P(this,"toggledGroupsByLevel",[]),P(this,"groupingDelimiter",":|:"),P(this,"selectedRowIds",[]),P(this,"preSelectedRowIdsChangeFn"),P(this,"pagesize",0),P(this,"pagenum",0),P(this,"totalRows",0),P(this,"_options"),P(this,"_container"),P(this,"onBeforePagingInfoChanged"),P(this,"onGroupExpanded"),P(this,"onGroupCollapsed"),P(this,"onPagingInfoChanged"),P(this,"onRowCountChanged"),P(this,"onRowsChanged"),P(this,"onRowsOrCountChanged"),P(this,"onSelectedRowIdsChanged"),P(this,"onSetItemsCalled"),this.onBeforePagingInfoChanged=new zo("onBeforePagingInfoChanged",t),this.onGroupExpanded=new zo("onGroupExpanded",t),this.onGroupCollapsed=new zo("onGroupCollapsed",t),this.onPagingInfoChanged=new zo("onPagingInfoChanged",t),this.onRowCountChanged=new zo("onRowCountChanged",t),this.onRowsChanged=new zo("onRowsChanged",t),this.onRowsOrCountChanged=new zo("onRowsOrCountChanged",t),this.onSelectedRowIdsChanged=new zo("onSelectedRowIdsChanged",t),this.onSetItemsCalled=new zo("onSetItemsCalled",t),this._options=zn.extend(!0,{},this.defaults,e)}beginUpdate(e){this.suspend=!0,this.isBulkSuspend=e===!0}endUpdate(){let e=this.isBulkSuspend;this.isBulkSuspend=!1,this.suspend=!1,e&&(this.processBulkDelete(),this.ensureIdUniqueness()),this.refresh()}destroy(){this.items=[],this.idxById=null,this.rowsById=null,this.filter=null,this.filterCSPSafe=null,this.updated=null,this.sortComparer=null,this.filterCache=[],this.filteredItems=[],this.compiledFilter=null,this.compiledFilterCSPSafe=null,this.compiledFilterWithCaching=null,this.compiledFilterWithCachingCSPSafe=null,this._grid&&this._grid.onSelectedRowsChanged&&this._grid.onCellCssStylesChanged&&(this._grid.onSelectedRowsChanged.unsubscribe(),this._grid.onCellCssStylesChanged.unsubscribe()),this.onRowsOrCountChanged&&this.onRowsOrCountChanged.unsubscribe()}setRefreshHints(e){this.refreshHints=e}getFilterArgs(){return this.filterArgs}setFilterArgs(e){this.filterArgs=e}processBulkDelete(){if(!this.idxById)return;let e,t,n=0;for(let o=0,r=this.items.length;o<r;o++){if(t=this.items[o],e=t[this.idProperty],e===void 0)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");this.bulkDeleteIds.has(e)?this.idxById.delete(e):(this.items[n]=t,this.idxById.set(e,n),++n)}this.items.length=n,this.bulkDeleteIds=new Map}updateIdxById(e){if(this.isBulkSuspend||!this.idxById)return;e=e||0;let t;for(let n=e,o=this.items.length;n<o;n++){if(t=this.items[n][this.idProperty],t===void 0)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");this.idxById.set(t,n)}}ensureIdUniqueness(){if(this.isBulkSuspend||!this.idxById)return;let e;for(let t=0,n=this.items.length;t<n;t++)if(e=this.items[t][this.idProperty],e===void 0||this.idxById.get(e)!==t)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property")}getItems(){return this.items}getIdPropertyName(){return this.idProperty}setItems(e,t){t!==void 0&&(this.idProperty=t),this.items=this.filteredItems=e,this.onSetItemsCalled.notify({idProperty:this.idProperty,itemCount:this.items.length},null,this),this.idxById=new Map,this.updateIdxById(),this.ensureIdUniqueness(),this.refresh()}setPagingOptions(e){this.onBeforePagingInfoChanged.notify(this.getPagingInfo(),null,this).getReturnValue()!==!1&&(zn.isDefined(e.pageSize)&&(this.pagesize=e.pageSize,this.pagenum=this.pagesize?Math.min(this.pagenum,Math.max(0,Math.ceil(this.totalRows/this.pagesize)-1)):0),zn.isDefined(e.pageNum)&&(this.pagenum=Math.min(e.pageNum,Math.max(0,Math.ceil(this.totalRows/this.pagesize)-1))),this.onPagingInfoChanged.notify(this.getPagingInfo(),null,this),this.refresh())}getPagingInfo(){let e=this.pagesize?Math.max(1,Math.ceil(this.totalRows/this.pagesize)):1;return{pageSize:this.pagesize,pageNum:this.pagenum,totalRows:this.totalRows,totalPages:e,dataView:this}}sort(e,t){this.sortAsc=t,this.sortComparer=e,this.fastSortField=null,t===!1&&this.items.reverse(),this.items.sort(e),t===!1&&this.items.reverse(),this.idxById=new Map,this.updateIdxById(),this.refresh()}fastSort(e,t){this.sortAsc=t,this.fastSortField=e,this.sortComparer=null;let n=Object.prototype.toString;Object.prototype.toString=typeof e=="function"?e:function(){return this[e]},t===!1&&this.items.reverse(),this.items.sort(),Object.prototype.toString=n,t===!1&&this.items.reverse(),this.idxById=new Map,this.updateIdxById(),this.refresh()}reSort(){this.sortComparer?this.sort(this.sortComparer,this.sortAsc):this.fastSortField&&this.fastSort(this.fastSortField,this.sortAsc)}getFilteredItems(){return this.filteredItems}getFilteredItemCount(){return this.filteredItems.length}getFilter(){return this._options.useCSPSafeFilter?this.filterCSPSafe:this.filter}setFilter(e){this.filterCSPSafe=e,this.filter=e,this._options.inlineFilters&&(this.compiledFilterCSPSafe=this.compileFilterCSPSafe,this.compiledFilterWithCachingCSPSafe=this.compileFilterWithCachingCSPSafe,this.compiledFilter=this.compileFilter(this._options.useCSPSafeFilter),this.compiledFilterWithCaching=this.compileFilterWithCaching(this._options.useCSPSafeFilter)),this.refresh()}getGrouping(){return this.groupingInfos}setGrouping(e){this._options.groupItemMetadataProvider||(this._options.groupItemMetadataProvider=new DA),this.groups=[],this.toggledGroupsByLevel=[],e=e||[],this.groupingInfos=e instanceof Array?e:[e];for(let t=0;t<this.groupingInfos.length;t++){let n=this.groupingInfos[t]=zn.extend(!0,{},this.groupingInfoDefaults,this.groupingInfos[t]);n.getterIsAFn=typeof n.getter=="function",n.compiledAccumulators=[];let o=n.aggregators.length;for(;o--;)n.compiledAccumulators[o]=this.compileAccumulatorLoopCSPSafe(n.aggregators[o]);this.toggledGroupsByLevel[t]={}}this.refresh()}getItemByIdx(e){return this.items[e]}getIdxById(e){return this.idxById?.get(e)}ensureRowsByIdCache(){if(!this.rowsById){this.rowsById={};for(let e=0,t=this.rows.length;e<t;e++)this.rowsById[this.rows[e][this.idProperty]]=e}}getRowByItem(e){return this.ensureRowsByIdCache(),this.rowsById?.[e[this.idProperty]]}getRowById(e){return this.ensureRowsByIdCache(),this.rowsById?.[e]}getItemById(e){return this.items[this.idxById.get(e)]}mapItemsToRows(e){let t=[];this.ensureRowsByIdCache();for(let n=0,o=e.length;n<o;n++){let r=this.rowsById?.[e[n][this.idProperty]];zn.isDefined(r)&&(t[t.length]=r)}return t}mapIdsToRows(e){let t=[];this.ensureRowsByIdCache();for(let n=0,o=e.length;n<o;n++){let r=this.rowsById?.[e[n]];zn.isDefined(r)&&(t[t.length]=r)}return t}mapRowsToIds(e){let t=[];for(let n=0,o=e.length;n<o;n++)if(e[n]<this.rows.length){let r=this.rows[e[n]];t[t.length]=r[this.idProperty]}return t}updateSingleItem(e,t){if(this.idxById){if(!this.idxById.has(e))throw new Error("[SlickGrid DataView] Invalid id");if(e!==t[this.idProperty]){let n=t[this.idProperty];if(!zn.isDefined(n))throw new Error("[SlickGrid DataView] Cannot update item to associate with a null id");if(this.idxById.has(n))throw new Error("[SlickGrid DataView] Cannot update item to associate with a non-unique id");this.idxById.set(n,this.idxById.get(e)),this.idxById.delete(e),this.updated?.[e]&&delete this.updated[e],e=n}this.items[this.idxById.get(e)]=t,this.updated||(this.updated={}),this.updated[e]=!0}}updateItem(e,t){this.updateSingleItem(e,t),this.refresh()}updateItems(e,t){if(e.length!==t.length)throw new Error("[SlickGrid DataView] Mismatch on the length of ids and items provided to update");for(let n=0,o=t.length;n<o;n++)this.updateSingleItem(e[n],t[n]);this.refresh()}insertItem(e,t){this.items.splice(e,0,t),this.updateIdxById(e),this.refresh()}insertItems(e,t){Array.prototype.splice.apply(this.items,[e,0].concat(t)),this.updateIdxById(e),this.refresh()}addItem(e){this.items.push(e),this.updateIdxById(this.items.length-1),this.refresh()}addItems(e){this.items=this.items.concat(e),this.updateIdxById(this.items.length-e.length),this.refresh()}deleteItem(e){if(this.idxById)if(this.isBulkSuspend)this.bulkDeleteIds.set(e,!0);else{let t=this.idxById.get(e);if(t===void 0)throw new Error("[SlickGrid DataView] Invalid id");this.idxById.delete(e),this.items.splice(t,1),this.updateIdxById(t),this.refresh()}}deleteItems(e){if(!(e.length===0||!this.idxById))if(this.isBulkSuspend)for(let t=0,n=e.length;t<n;t++){let o=e[t];if(this.idxById.get(o)===void 0)throw new Error("[SlickGrid DataView] Invalid id");this.bulkDeleteIds.set(o,!0)}else{let t=[];for(let n=0,o=e.length;n<o;n++){let r=e[n],i=this.idxById.get(r);if(i===void 0)throw new Error("[SlickGrid DataView] Invalid id");this.idxById.delete(r),t.push(i)}t.sort();for(let n=t.length-1;n>=0;--n)this.items.splice(t[n],1);this.updateIdxById(t[0]),this.refresh()}}sortedAddItem(e){if(!this.sortComparer)throw new Error("[SlickGrid DataView] sortedAddItem() requires a sort comparer, use sort()");this.insertItem(this.sortedIndex(e),e)}sortedUpdateItem(e,t){if(!this.idxById)return;if(!this.idxById.has(e)||e!==t[this.idProperty])throw new Error("[SlickGrid DataView] Invalid or non-matching id "+this.idxById.get(e));if(!this.sortComparer)throw new Error("[SlickGrid DataView] sortedUpdateItem() requires a sort comparer, use sort()");let n=this.getItemById(e);this.sortComparer(n,t)!==0?(this.deleteItem(e),this.sortedAddItem(t)):this.updateItem(e,t)}sortedIndex(e){let t=0,n=this.items.length;for(;t<n;){let o=t+n>>>1;this.sortComparer(this.items[o],e)===-1?t=o+1:n=o}return t}getItemCount(){return this.items.length}getLength(){return this.rows.length}getItem(e){let t=this.rows[e];if(t?.__group&&t.totals&&!t.totals?.initialized){let n=this.groupingInfos[t.level];n.displayTotalsRow||(this.calculateTotals(t.totals),t.title=n.formatter?n.formatter(t):t.value)}else t?.__groupTotals&&!t.initialized&&this.calculateTotals(t);return t}getItemMetadata(e){let t=this.rows[e];return t===void 0?null:this._options.globalItemMetadataProvider?.getRowMetadata?this._options.globalItemMetadataProvider.getRowMetadata(t,e):t.__group&&this._options.groupItemMetadataProvider?.getGroupRowMetadata?this._options.groupItemMetadataProvider.getGroupRowMetadata(t,e):t.__groupTotals&&this._options.groupItemMetadataProvider?.getTotalsRowMetadata?this._options.groupItemMetadataProvider.getTotalsRowMetadata(t,e):null}expandCollapseAllGroups(e,t){if(zn.isDefined(e))this.toggledGroupsByLevel[e]={},this.groupingInfos[e].collapsed=t,t===!0?this.onGroupCollapsed.notify({level:e,groupingKey:null}):this.onGroupExpanded.notify({level:e,groupingKey:null});else for(let n=0;n<this.groupingInfos.length;n++)this.toggledGroupsByLevel[n]={},this.groupingInfos[n].collapsed=t,t===!0?this.onGroupCollapsed.notify({level:n,groupingKey:null}):this.onGroupExpanded.notify({level:n,groupingKey:null});this.refresh()}collapseAllGroups(e){this.expandCollapseAllGroups(e,!0)}expandAllGroups(e){this.expandCollapseAllGroups(e,!1)}expandCollapseGroup(e,t,n){this.toggledGroupsByLevel[e][t]=this.groupingInfos[e].collapsed^n,this.refresh()}collapseGroup(...e){let t=Array.prototype.slice.call(e)[0],n,o;e.length===1&&t.indexOf(this.groupingDelimiter)!==-1?(n=t,o=t.split(this.groupingDelimiter).length-1):(n=e.join(this.groupingDelimiter),o=e.length-1),this.expandCollapseGroup(o,n,!0),this.onGroupCollapsed.notify({level:o,groupingKey:n})}expandGroup(...e){let t=Array.prototype.slice.call(e)[0],n,o;e.length===1&&t.indexOf(this.groupingDelimiter)!==-1?(o=t.split(this.groupingDelimiter).length-1,n=t):(o=e.length-1,n=e.join(this.groupingDelimiter)),this.expandCollapseGroup(o,n,!1),this.onGroupExpanded.notify({level:o,groupingKey:n})}getGroups(){return this.groups}extractGroups(e,t){let n,o,r=[],i={},a,l=t?t.level+1:0,d=this.groupingInfos[l];for(let u=0,f=d.predefinedValues?.length??0;u<f;u++)o=d.predefinedValues?.[u],n=i[o],n||(n=new _m,n.value=o,n.level=l,n.groupingKey=(t?t.groupingKey+this.groupingDelimiter:"")+o,r[r.length]=n,i[o]=n);for(let u=0,f=e.length;u<f;u++)a=e[u],o=d.getterIsAFn?d.getter(a):a[d.getter],n=i[o],n||(n=new _m,n.value=o,n.level=l,n.groupingKey=(t?t.groupingKey+this.groupingDelimiter:"")+o,r[r.length]=n,i[o]=n),n.rows[n.count++]=a;if(l<this.groupingInfos.length-1)for(let u=0;u<r.length;u++)n=r[u],n.groups=this.extractGroups(n.rows,n);return r.length&&this.addTotals(r,l),r.sort(this.groupingInfos[l].comparer),r}calculateTotals(e){let t=e.group,n=this.groupingInfos[t.level??0],o=t.level===this.groupingInfos.length,r,i=n.aggregators.length;if(!o&&n.aggregateChildGroups){let a=t.groups?.length??0;for(;a--;)t.groups[a].totals.initialized||this.calculateTotals(t.groups[a].totals)}for(;i--;)r=n.aggregators[i],r.init(),!o&&n.aggregateChildGroups?n.compiledAccumulators[i].call(r,t.groups):n.compiledAccumulators[i].call(r,t.rows),r.storeResult(e);e.initialized=!0}addGroupTotals(e){let t=this.groupingInfos[e.level],n=new PA;n.group=e,e.totals=n,t.lazyTotalsCalculation||this.calculateTotals(n)}addTotals(e,t){t=t||0;let n=this.groupingInfos[t],o=n.collapsed,r=this.toggledGroupsByLevel[t],i=e.length,a;for(;i--;)a=e[i],!(a.collapsed&&!n.aggregateCollapsed)&&(a.groups&&this.addTotals(a.groups,t+1),n.aggregators?.length&&(n.aggregateEmpty||a.rows.length||a.groups?.length)&&this.addGroupTotals(a),a.collapsed=o^r[a.groupingKey],a.title=n.formatter?n.formatter(a):a.value)}flattenGroupedRows(e,t){t=t||0;let n=this.groupingInfos[t],o=[],r,i=0,a;for(let l=0,d=e.length;l<d;l++){if(a=e[l],o[i++]=a,!a.collapsed){r=a.groups?this.flattenGroupedRows(a.groups,t+1):a.rows;for(let u=0,f=r.length;u<f;u++)o[i++]=r[u]}a.totals&&n.displayTotalsRow&&(!a.collapsed||n.aggregateCollapsed)&&(o[i++]=a.totals)}return o}compileAccumulatorLoopCSPSafe(e){return e.accumulate?function(t){let n;for(let o=0;o<t.length;o++){let r=t[o];n=e.accumulate.call(e,r)}return n}:function(){}}compileFilterCSPSafe(e,t){if(typeof this.filterCSPSafe!="function")return[];let n=[],o=e.length;for(let r=0;r<o;r++)this.filterCSPSafe(e[r],t)&&n.push(e[r]);return n}compileFilter(e=!1){if(e)return null;let t=zn.getFunctionDetails(this.filter),n="{ continue _coreloop; }$1",o="{ _retval[_idx++] = $item$; continue _coreloop; }$1",r=t.body.replace(/return false\s*([;}]|\}|$)/gi,n).replace(/return!1([;}]|\}|$)/gi,n).replace(/return true\s*([;}]|\}|$)/gi,o).replace(/return!0([;}]|\}|$)/gi,o).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ($1) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),i=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","$filter$; ","} ","return _retval; "].join("");i=i.replace(/\$filter\$/gi,r),i=i.replace(/\$item\$/gi,t.params[0]),i=i.replace(/\$args\$/gi,t.params[1]);let a=new Function("_items,_args",i),l="compiledFilter";return a.displayName=l,a.name=this.setFunctionName(a,l),a}compileFilterWithCaching(e=!1){if(e)return null;let t=zn.getFunctionDetails(this.filter),n="{ continue _coreloop; }$1",o="{ _cache[_i] = true;_retval[_idx++] = $item$; continue _coreloop; }$1",r=t.body.replace(/return false\s*([;}]|\}|$)/gi,n).replace(/return!1([;}]|\}|$)/gi,n).replace(/return true\s*([;}]|\}|$)/gi,o).replace(/return!0([;}]|\}|$)/gi,o).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ((_cache[_i] = $1)) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),i=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","if (_cache[_i]) { ","_retval[_idx++] = $item$; ","continue _coreloop; ","} ","$filter$; ","} ","return _retval; "].join("");i=i.replace(/\$filter\$/gi,r),i=i.replace(/\$item\$/gi,t.params[0]),i=i.replace(/\$args\$/gi,t.params[1]);let a=new Function("_items,_args,_cache",i),l="compiledFilterWithCaching";return a.displayName=l,a.name=this.setFunctionName(a,l),a}compileFilterWithCachingCSPSafe(e,t,n){if(typeof this.filterCSPSafe!="function")return[];let o=[],r=e.length;for(let i=0;i<r;i++)(n[i]||this.filterCSPSafe(e[i],t))&&o.push(e[i]);return o}setFunctionName(e,t){try{Object.defineProperty(e,"name",{writable:!0,value:t})}catch{e.name=t}}uncompiledFilter(e,t){let n=[],o=0;for(let r=0,i=e.length;r<i;r++)this.filter?.(e[r],t)&&(n[o++]=e[r]);return n}uncompiledFilterWithCaching(e,t,n){let o=[],r=0,i;for(let a=0,l=e.length;a<l;a++)i=e[a],n[a]?o[r++]=i:this.filter?.(i,t)&&(o[r++]=i,n[a]=!0);return o}getFilteredAndPagedItems(e){if(this._options.useCSPSafeFilter?this.filterCSPSafe:this.filter){let n,o;this._options.useCSPSafeFilter?(n=this._options.inlineFilters?this.compiledFilterCSPSafe:this.uncompiledFilter,o=this._options.inlineFilters?this.compiledFilterWithCachingCSPSafe:this.uncompiledFilterWithCaching):(n=this._options.inlineFilters?this.compiledFilter:this.uncompiledFilter,o=this._options.inlineFilters?this.compiledFilterWithCaching:this.uncompiledFilterWithCaching),this.refreshHints.isFilterNarrowing?this.filteredItems=n.call(this,this.filteredItems,this.filterArgs):this.refreshHints.isFilterExpanding?this.filteredItems=o.call(this,e,this.filterArgs,this.filterCache):this.refreshHints.isFilterUnchanged||(this.filteredItems=n.call(this,e,this.filterArgs))}else this.filteredItems=this.pagesize?e:e.concat();let t;return this.pagesize?(this.filteredItems.length<=this.pagenum*this.pagesize&&(this.filteredItems.length===0?this.pagenum=0:this.pagenum=Math.floor((this.filteredItems.length-1)/this.pagesize)),t=this.filteredItems.slice(this.pagesize*this.pagenum,this.pagesize*this.pagenum+this.pagesize)):t=this.filteredItems,{totalRows:this.filteredItems.length,rows:t}}getRowDiffs(e,t){let n,o,r,i=[],a=0,l=Math.max(t.length,e.length);this.refreshHints?.ignoreDiffsBefore&&(a=Math.max(0,Math.min(t.length,this.refreshHints.ignoreDiffsBefore))),this.refreshHints?.ignoreDiffsAfter&&(l=Math.min(t.length,Math.max(0,this.refreshHints.ignoreDiffsAfter)));for(let d=a,u=e.length;d<l;d++)d>=u?i[i.length]=d:(n=t[d],o=e[d],(!n||this.groupingInfos.length&&(r=n.__nonDataRow||o.__nonDataRow)&&n.__group!==o.__group||n.__group&&!n.equals(o)||r&&(n.__groupTotals||o.__groupTotals)||n[this.idProperty]!==o[this.idProperty]||this.updated?.[n[this.idProperty]])&&(i[i.length]=d));return i}recalc(e){this.rowsById=void 0,(this.refreshHints.isFilterNarrowing!==this.prevRefreshHints.isFilterNarrowing||this.refreshHints.isFilterExpanding!==this.prevRefreshHints.isFilterExpanding)&&(this.filterCache=[]);let t=this.getFilteredAndPagedItems(e);this.totalRows=t.totalRows;let n=t.rows;this.groups=[],this.groupingInfos.length&&(this.groups=this.extractGroups(n),this.groups.length&&(n=this.flattenGroupedRows(this.groups)));let o=this.getRowDiffs(this.rows,n);return this.rows=n,o}refresh(){if(this.suspend)return;let e=zn.extend(!0,{},this.getPagingInfo()),t=this.rows.length,n=this.totalRows,o=this.recalc(this.items);this.pagesize&&this.totalRows<this.pagenum*this.pagesize&&(this.pagenum=Math.max(0,Math.ceil(this.totalRows/this.pagesize)-1),o=this.recalc(this.items)),this.updated=null,this.prevRefreshHints=this.refreshHints,this.refreshHints={},n!==this.totalRows&&this.onBeforePagingInfoChanged.notify(e,null,this).getReturnValue()!==!1&&this.onPagingInfoChanged.notify(this.getPagingInfo(),null,this),t!==this.rows.length&&this.onRowCountChanged.notify({previous:t,current:this.rows.length,itemCount:this.items.length,dataView:this,callingOnRowsChanged:o.length>0},null,this),o.length>0&&this.onRowsChanged.notify({rows:o,itemCount:this.items.length,dataView:this,calledOnRowCountChanged:t!==this.rows.length},null,this),(t!==this.rows.length||o.length>0)&&this.onRowsOrCountChanged.notify({rowsDiff:o,previousRowCount:t,currentRowCount:this.rows.length,itemCount:this.items.length,rowCountChanged:t!==this.rows.length,rowsChanged:o.length>0,dataView:this},null,this)}syncGridSelection(e,t,n){this._grid=e;let o;this.selectedRowIds=this.mapRowsToIds(e.getSelectedRows());let r=a=>{a===!1?this.selectedRowIds=[]:this.selectedRowIds.sort().join(",")!==a.sort().join(",")&&(this.selectedRowIds=a)},i=()=>{if((this.selectedRowIds||[]).length>0&&!o){o=!0;let a=this.mapIdsToRows(this.selectedRowIds||[]);if(!t){let l={grid:this._grid,ids:this.mapRowsToIds(a),rows:a,dataView:this};this.preSelectedRowIdsChangeFn(l),this.onSelectedRowIdsChanged.notify(Object.assign(l,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Md,this)}e.setSelectedRows(a),o=!1}};return e.onSelectedRowsChanged.subscribe((a,l)=>{if(!o){let d=this.mapRowsToIds(l.rows),u={grid:this._grid,ids:d,rows:l.rows,added:!0,dataView:this};this.preSelectedRowIdsChangeFn(u),this.onSelectedRowIdsChanged.notify(Object.assign(u,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Md,this)}}),this.preSelectedRowIdsChangeFn=a=>{if(!o){if(o=!0,typeof a.added>"u")r(a.ids);else{let l;if(a.added)n&&e.getOptions().multiSelect?l=(this.selectedRowIds?.filter(d=>this.getRowById(d)===void 0)).concat(a.ids):l=a.ids;else if(n&&e.getOptions().multiSelect){let d=new Set(a.ids);l=this.selectedRowIds?.filter(u=>!d.has(u))}else l=[];r(l)}o=!1}},this.onRowsOrCountChanged.subscribe(i.bind(this)),this.onSelectedRowIdsChanged}getAllSelectedIds(){return this.selectedRowIds}getAllSelectedFilteredIds(){return this.getAllSelectedFilteredItems().map(e=>e[this.idProperty])}setSelectedIds(e,t){let n=t?.isRowBeingAdded,o=t?.shouldTriggerEvent,r=t?.applyRowSelectionToGrid;n!==!1&&(n=!0);let i=this.mapIdsToRows(e),a={grid:this._grid,ids:e,rows:i,added:n,dataView:this};this.preSelectedRowIdsChangeFn?.(a),o!==!1&&this.onSelectedRowIdsChanged.notify(Object.assign(a,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Md,this),r!==!1&&this._grid&&this._grid.setSelectedRows(i)}getAllSelectedItems(){let e=[];return this.getAllSelectedIds().forEach(t=>{e.push(this.getItemById(t))}),e}getAllSelectedFilteredItems(){if(!Array.isArray(this.selectedRowIds))return[];let e=new Set(this.selectedRowIds);return this.filteredItems.filter(t=>e.has(t[this.idProperty]))||[]}syncGridCellCssStyles(e,t){let n,o,r=a=>{n={},typeof a=="object"&&Object.keys(a).forEach(l=>{if(a){let d=this.rows[l][this.idProperty];n[d]=a[l]}})};r(e.getCellCssStyles(t));let i=()=>{if(typeof n=="object"){o=!0,this.ensureRowsByIdCache();let a={};Object.keys(n).forEach(l=>{let d=this.rowsById?.[l];zn.isDefined(d)&&(a[d]=n[l])}),e.setCellCssStyles(t,a),o=!1}};e.onCellCssStylesChanged.subscribe((a,l)=>{o||t===l.key&&(l.hash?r(l.hash):(e.onCellCssStylesChanged.unsubscribe(),this.onRowsOrCountChanged.unsubscribe(i)))}),this.onRowsOrCountChanged.subscribe(i.bind(this))}},Al=Br,Id=go,mu=class gu{constructor(t){this.args=t,P(this,"input"),P(this,"defaultValue"),P(this,"navOnLR"),this.init()}init(){this.navOnLR=this.args.grid.getOptions().editorCellNavOnLRKeys,this.input=Id.createDomElement("input",{type:"text",className:"editor-text"},this.args.container),this.input.addEventListener("keydown",this.navOnLR?Rm:Tm),this.input.focus(),this.input.select(),this.args.compositeEditorOptions&&this.input.addEventListener("change",this.onChange.bind(this))}onChange(){let t=this.args.grid.getActiveCell();this.validate().valid&&this.applyValue(this.args.item,this.serializeValue()),this.applyValue(this.args.compositeEditorOptions.formValues,this.serializeValue()),this.args.grid.onCompositeEditorChange.notify({row:t?.row??0,cell:t?.cell??0,item:this.args.item,column:this.args.column,formValues:this.args.compositeEditorOptions.formValues,grid:this.args.grid,editors:this.args.compositeEditorOptions.editors})}destroy(){this.input.removeEventListener("keydown",this.navOnLR?Rm:Tm),this.input.removeEventListener("change",this.onChange.bind(this)),this.input.remove()}focus(){this.input.focus()}getDecimalPlaces(){let t=this.args.column.editorFixedDecimalPlaces;return Id.isDefined(t)||(t=gu.DefaultDecimalPlaces),!t&&t!==0?null:t}loadValue(t){this.defaultValue=t[this.args.column.field];let n=this.getDecimalPlaces();n!==null&&(this.defaultValue||this.defaultValue===0)&&this.defaultValue?.toFixed&&(this.defaultValue=this.defaultValue.toFixed(n)),this.input.value=String(this.defaultValue??""),this.input.defaultValue=String(this.defaultValue??""),this.input.select()}serializeValue(){let t=parseFloat(this.input.value);gu.AllowEmptyValue?!t&&t!==0&&(t=void 0):t=t||0;let n=this.getDecimalPlaces();return n!==null&&(t||t===0)&&t.toFixed&&(t=parseFloat(t.toFixed(n))),t}applyValue(t,n){t[this.args.column.field]=n}isValueChanged(){return!(this.input.value===""&&!Id.isDefined(this.defaultValue))&&this.input.value!==this.defaultValue}validate(){if(isNaN(this.input.value))return{valid:!1,msg:"Please enter a valid number"};if(this.args.column.validator){let t=this.args.column.validator(this.input.value,this.args);if(!t.valid)return t}return{valid:!0,msg:null}}};P(mu,"DefaultDecimalPlaces"),P(mu,"AllowEmptyValue",!1);var xm=mu;function Rm(e){let t=e.selectionStart,n=e.target.value.length;(e.keyCode===Al.LEFT&&t>0||e.keyCode===Al.RIGHT&&t<n-1)&&e.stopImmediatePropagation()}function Tm(e){(e.keyCode===Al.LEFT||e.keyCode===Al.RIGHT)&&e.stopImmediatePropagation()}var MA=kc,pr=JN,Le=Zr,gi=na,IA=ZN,En=Vv,wo=Br,NA=QN,AA=xh,ps=eA,Pr=tA,V=go,Nd=nA,km=Rh,Em=sA,Pm=iA,FA=class{constructor(e,t,n,o,r){if(this.container=e,this.data=t,this.columns=n,this.externalPubSub=r,P(this,"slickGridVersion","5.15.5"),P(this,"cid",""),P(this,"onActiveCellChanged"),P(this,"onActiveCellPositionChanged"),P(this,"onAddNewRow"),P(this,"onAfterSetColumns"),P(this,"onAutosizeColumns"),P(this,"onBeforeAppendCell"),P(this,"onBeforeCellEditorDestroy"),P(this,"onBeforeColumnsResize"),P(this,"onBeforeDestroy"),P(this,"onBeforeEditCell"),P(this,"onBeforeFooterRowCellDestroy"),P(this,"onBeforeHeaderCellDestroy"),P(this,"onBeforeHeaderRowCellDestroy"),P(this,"onBeforeRemoveCachedRow"),P(this,"onBeforeSetColumns"),P(this,"onBeforeSort"),P(this,"onBeforeUpdateColumns"),P(this,"onCellChange"),P(this,"onCellCssStylesChanged"),P(this,"onClick"),P(this,"onColumnsReordered"),P(this,"onColumnsDrag"),P(this,"onColumnsResized"),P(this,"onColumnsResizeDblClick"),P(this,"onCompositeEditorChange"),P(this,"onContextMenu"),P(this,"onDrag"),P(this,"onDblClick"),P(this,"onDragInit"),P(this,"onDragStart"),P(this,"onDragEnd"),P(this,"onFooterClick"),P(this,"onFooterContextMenu"),P(this,"onFooterRowCellRendered"),P(this,"onHeaderCellRendered"),P(this,"onHeaderClick"),P(this,"onHeaderContextMenu"),P(this,"onHeaderMouseEnter"),P(this,"onHeaderMouseLeave"),P(this,"onHeaderRowCellRendered"),P(this,"onHeaderRowMouseEnter"),P(this,"onHeaderRowMouseLeave"),P(this,"onPreHeaderContextMenu"),P(this,"onPreHeaderClick"),P(this,"onKeyDown"),P(this,"onMouseEnter"),P(this,"onMouseLeave"),P(this,"onRendered"),P(this,"onScroll"),P(this,"onSelectedRowsChanged"),P(this,"onSetOptions"),P(this,"onActivateChangedOptions"),P(this,"onSort"),P(this,"onValidationError"),P(this,"onViewportChanged"),P(this,"scrollbarDimensions"),P(this,"maxSupportedCssHeight"),P(this,"canvas",null),P(this,"canvas_context",null),P(this,"_options"),P(this,"_defaults",{alwaysShowVerticalScroll:!1,alwaysAllowHorizontalScroll:!1,explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableHtmlRendering:!0,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,autoEditNewRow:!0,autoCommitEdit:!1,suppressActiveCellChangeOnEdit:!1,enableCellNavigation:!0,enableColumnReorder:!0,unorderableColumnCssClass:"unorderable",asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,enableAsyncPostRenderCleanup:!1,asyncPostRenderCleanupDelay:40,auto:!1,nonce:"",editorLock:IA,showColumnHeader:!0,showHeaderRow:!1,headerRowHeight:25,createFooterRow:!1,showFooterRow:!1,footerRowHeight:25,createPreHeaderPanel:!1,createTopHeaderPanel:!1,showPreHeaderPanel:!1,showTopHeaderPanel:!1,preHeaderPanelHeight:25,showTopPanel:!1,topPanelHeight:25,preHeaderPanelWidth:"auto",topHeaderPanelHeight:25,topHeaderPanelWidth:"auto",formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",rowHighlightCssClass:"highlight-animate",rowHighlightDuration:400,selectedCellCssClass:"selected",multiSelect:!0,enableCellRowSpan:!1,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,frozenBottom:!1,frozenColumn:-1,frozenRow:-1,frozenRightViewportMinWidth:100,throwWhenFrozenNotAllViewable:!1,fullWidthRows:!1,multiColumnSort:!1,numberedMultiColumnSort:!1,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!1,defaultFormatter:this.defaultFormatter,forceSyncScrolling:!1,addNewRowCssClass:"new-row",preserveCopiedSelectionOnPaste:!1,preventDragFromKeys:["ctrlKey","metaKey"],showCellSelection:!0,viewportClass:void 0,minRowBuffer:3,emulatePagingWhenScrolling:!0,editorCellNavOnLRKeys:!1,enableMouseWheelScrollHandler:!0,doPaging:!0,autosizeColsMode:En.LegacyOff,autosizeColPaddingPx:4,rowTopOffsetRenderType:"top",scrollRenderThrottling:10,autosizeTextAvgToMWidthRatio:.75,viewportSwitchToScrollModeWidthPercent:void 0,viewportMinWidthPx:void 0,viewportMaxWidthPx:void 0,suppressCssChangesOnHiddenInit:!1,ffMaxSupportedCssHeight:6e6,maxSupportedCssHeight:1e9,maxPartialRowSpanRemap:5e3,sanitizer:void 0,logSanitizedHtml:!1,mixinDefaults:!0,shadowRoot:void 0}),P(this,"_columnDefaults",{name:"",headerCssClass:null,defaultSortAsc:!0,focusable:!0,hidden:!1,minWidth:30,maxWidth:void 0,rerenderOnResize:!1,reorderable:!0,resizable:!0,sortable:!1,selectable:!0}),P(this,"_columnAutosizeDefaults",{ignoreHeaderText:!1,colValueArray:void 0,allowAddlPercent:void 0,formatterOverride:void 0,autosizeMode:pr.ContentIntelligent,rowSelectionModeOnInit:void 0,rowSelectionMode:ps.FirstNRows,rowSelectionCount:100,valueFilterMode:Pr.None,widthEvalMode:Nd.Auto,sizeToRemaining:void 0,widthPx:void 0,contentSizePx:0,headerWidthPx:0,colDataTypeOf:void 0}),P(this,"_columnResizeTimer"),P(this,"_executionBlockTimer"),P(this,"_flashCellTimer"),P(this,"_highlightRowTimer"),P(this,"th"),P(this,"h"),P(this,"ph"),P(this,"n"),P(this,"cj"),P(this,"page",0),P(this,"offset",0),P(this,"vScrollDir",1),P(this,"_bindingEventService",new MA),P(this,"initialized",!1),P(this,"_container"),P(this,"uid",`slickgrid_${Math.round(1e6*Math.random())}`),P(this,"_focusSink"),P(this,"_focusSink2"),P(this,"_groupHeaders",[]),P(this,"_headerScroller",[]),P(this,"_headers",[]),P(this,"_headerRows"),P(this,"_headerRowScroller"),P(this,"_headerRowSpacerL"),P(this,"_headerRowSpacerR"),P(this,"_footerRow"),P(this,"_footerRowScroller"),P(this,"_footerRowSpacerL"),P(this,"_footerRowSpacerR"),P(this,"_preHeaderPanel"),P(this,"_preHeaderPanelScroller"),P(this,"_preHeaderPanelSpacer"),P(this,"_preHeaderPanelR"),P(this,"_preHeaderPanelScrollerR"),P(this,"_preHeaderPanelSpacerR"),P(this,"_topHeaderPanel"),P(this,"_topHeaderPanelScroller"),P(this,"_topHeaderPanelSpacer"),P(this,"_topPanelScrollers"),P(this,"_topPanels"),P(this,"_viewport"),P(this,"_canvas"),P(this,"_style"),P(this,"_boundAncestors",[]),P(this,"stylesheet"),P(this,"columnCssRulesL"),P(this,"columnCssRulesR"),P(this,"viewportH",0),P(this,"viewportW",0),P(this,"canvasWidth",0),P(this,"canvasWidthL",0),P(this,"canvasWidthR",0),P(this,"headersWidth",0),P(this,"headersWidthL",0),P(this,"headersWidthR",0),P(this,"viewportHasHScroll",!1),P(this,"viewportHasVScroll",!1),P(this,"headerColumnWidthDiff",0),P(this,"headerColumnHeightDiff",0),P(this,"cellWidthDiff",0),P(this,"cellHeightDiff",0),P(this,"absoluteColumnMinWidth"),P(this,"hasFrozenRows",!1),P(this,"frozenRowsHeight",0),P(this,"actualFrozenRow",-1),P(this,"paneTopH",0),P(this,"paneBottomH",0),P(this,"viewportTopH",0),P(this,"viewportBottomH",0),P(this,"topPanelH",0),P(this,"headerRowH",0),P(this,"footerRowH",0),P(this,"tabbingDirection",1),P(this,"_activeCanvasNode"),P(this,"_activeViewportNode"),P(this,"activePosX"),P(this,"activePosY"),P(this,"activeRow"),P(this,"activeCell"),P(this,"activeCellNode",null),P(this,"currentEditor",null),P(this,"serializedEditorValue"),P(this,"editController"),P(this,"_prevDataLength",0),P(this,"_prevInvalidatedRowsCount",0),P(this,"_rowSpanIsCached",!1),P(this,"_colsWithRowSpanCache",{}),P(this,"rowsCache",{}),P(this,"renderedRows",0),P(this,"numVisibleRows",0),P(this,"prevScrollTop",0),P(this,"scrollHeight",0),P(this,"scrollTop",0),P(this,"lastRenderedScrollTop",0),P(this,"lastRenderedScrollLeft",0),P(this,"prevScrollLeft",0),P(this,"scrollLeft",0),P(this,"selectionModel"),P(this,"selectedRows",[]),P(this,"plugins",[]),P(this,"cellCssClasses",{}),P(this,"columnsById",{}),P(this,"sortColumns",[]),P(this,"columnPosLeft",[]),P(this,"columnPosRight",[]),P(this,"pagingActive",!1),P(this,"pagingIsLastPage",!1),P(this,"scrollThrottle"),P(this,"h_editorLoader"),P(this,"h_postrender"),P(this,"h_postrenderCleanup"),P(this,"postProcessedRows",{}),P(this,"postProcessToRow",null),P(this,"postProcessFromRow",null),P(this,"postProcessedCleanupQueue",[]),P(this,"postProcessgroupId",0),P(this,"counter_rows_rendered",0),P(this,"counter_rows_removed",0),P(this,"_paneHeaderL"),P(this,"_paneHeaderR"),P(this,"_paneTopL"),P(this,"_paneTopR"),P(this,"_paneBottomL"),P(this,"_paneBottomR"),P(this,"_headerScrollerL"),P(this,"_headerScrollerR"),P(this,"_headerL"),P(this,"_headerR"),P(this,"_groupHeadersL"),P(this,"_groupHeadersR"),P(this,"_headerRowScrollerL"),P(this,"_headerRowScrollerR"),P(this,"_footerRowScrollerL"),P(this,"_footerRowScrollerR"),P(this,"_headerRowL"),P(this,"_headerRowR"),P(this,"_footerRowL"),P(this,"_footerRowR"),P(this,"_topPanelScrollerL"),P(this,"_topPanelScrollerR"),P(this,"_topPanelL"),P(this,"_topPanelR"),P(this,"_viewportTopL"),P(this,"_viewportTopR"),P(this,"_viewportBottomL"),P(this,"_viewportBottomR"),P(this,"_canvasTopL"),P(this,"_canvasTopR"),P(this,"_canvasBottomL"),P(this,"_canvasBottomR"),P(this,"_viewportScrollContainerX"),P(this,"_viewportScrollContainerY"),P(this,"_headerScrollContainer"),P(this,"_headerRowScrollContainer"),P(this,"_footerRowScrollContainer"),P(this,"cssShow",{position:"absolute",visibility:"hidden",display:"block"}),P(this,"_hiddenParents",[]),P(this,"oldProps",[]),P(this,"enforceFrozenRowHeightRecalc",!1),P(this,"columnResizeDragging",!1),P(this,"slickDraggableInstance",null),P(this,"slickMouseWheelInstances",[]),P(this,"slickResizableInstances",[]),P(this,"sortableSideLeftInstance"),P(this,"sortableSideRightInstance"),P(this,"logMessageCount",0),P(this,"logMessageMaxCount",30),P(this,"_pubSubService"),this._container=typeof this.container=="string"?document.querySelector(this.container):this.container,!this._container)throw new Error(`SlickGrid requires a valid container, ${this.container} does not exist in the DOM.`);this._pubSubService=r,this.onActiveCellChanged=new Le("onActiveCellChanged",r),this.onActiveCellPositionChanged=new Le("onActiveCellPositionChanged",r),this.onAddNewRow=new Le("onAddNewRow",r),this.onAfterSetColumns=new Le("onAfterSetColumns",r),this.onAutosizeColumns=new Le("onAutosizeColumns",r),this.onBeforeAppendCell=new Le("onBeforeAppendCell",r),this.onBeforeCellEditorDestroy=new Le("onBeforeCellEditorDestroy",r),this.onBeforeColumnsResize=new Le("onBeforeColumnsResize",r),this.onBeforeDestroy=new Le("onBeforeDestroy",r),this.onBeforeEditCell=new Le("onBeforeEditCell",r),this.onBeforeFooterRowCellDestroy=new Le("onBeforeFooterRowCellDestroy",r),this.onBeforeHeaderCellDestroy=new Le("onBeforeHeaderCellDestroy",r),this.onBeforeHeaderRowCellDestroy=new Le("onBeforeHeaderRowCellDestroy",r),this.onBeforeRemoveCachedRow=new Le("onRowRemovedFromCache",r),this.onBeforeSetColumns=new Le("onBeforeSetColumns",r),this.onBeforeSort=new Le("onBeforeSort",r),this.onBeforeUpdateColumns=new Le("onBeforeUpdateColumns",r),this.onCellChange=new Le("onCellChange",r),this.onCellCssStylesChanged=new Le("onCellCssStylesChanged",r),this.onClick=new Le("onClick",r),this.onColumnsReordered=new Le("onColumnsReordered",r),this.onColumnsDrag=new Le("onColumnsDrag",r),this.onColumnsResized=new Le("onColumnsResized",r),this.onColumnsResizeDblClick=new Le("onColumnsResizeDblClick",r),this.onCompositeEditorChange=new Le("onCompositeEditorChange",r),this.onContextMenu=new Le("onContextMenu",r),this.onDrag=new Le("onDrag",r),this.onDblClick=new Le("onDblClick",r),this.onDragInit=new Le("onDragInit",r),this.onDragStart=new Le("onDragStart",r),this.onDragEnd=new Le("onDragEnd",r),this.onFooterClick=new Le("onFooterClick",r),this.onFooterContextMenu=new Le("onFooterContextMenu",r),this.onFooterRowCellRendered=new Le("onFooterRowCellRendered",r),this.onHeaderCellRendered=new Le("onHeaderCellRendered",r),this.onHeaderClick=new Le("onHeaderClick",r),this.onHeaderContextMenu=new Le("onHeaderContextMenu",r),this.onHeaderMouseEnter=new Le("onHeaderMouseEnter",r),this.onHeaderMouseLeave=new Le("onHeaderMouseLeave",r),this.onHeaderRowCellRendered=new Le("onHeaderRowCellRendered",r),this.onHeaderRowMouseEnter=new Le("onHeaderRowMouseEnter",r),this.onHeaderRowMouseLeave=new Le("onHeaderRowMouseLeave",r),this.onPreHeaderClick=new Le("onPreHeaderClick",r),this.onPreHeaderContextMenu=new Le("onPreHeaderContextMenu",r),this.onKeyDown=new Le("onKeyDown",r),this.onMouseEnter=new Le("onMouseEnter",r),this.onMouseLeave=new Le("onMouseLeave",r),this.onRendered=new Le("onRendered",r),this.onScroll=new Le("onScroll",r),this.onSelectedRowsChanged=new Le("onSelectedRowsChanged",r),this.onSetOptions=new Le("onSetOptions",r),this.onActivateChangedOptions=new Le("onActivateChangedOptions",r),this.onSort=new Le("onSort",r),this.onValidationError=new Le("onValidationError",r),this.onViewportChanged=new Le("onViewportChanged",r),this.initialize(o)}init(){this.finishInitialization()}initialize(e){if(e?.mixinDefaults?(this._options||(this._options=e),V.applyDefaults(this._options,this._defaults)):this._options=V.extend(!0,{},this._defaults,e),this.scrollThrottle=this.actionThrottle(this.render.bind(this),this._options.scrollRenderThrottling),this.maxSupportedCssHeight=this.maxSupportedCssHeight||this.getMaxSupportedCssHeight(),this.validateAndEnforceOptions(),this._columnDefaults.width=this._options.defaultColumnWidth,this._options.suppressCssChangesOnHiddenInit||this.cacheCssForHiddenInit(),this.updateColumnProps(),this._options.enableColumnReorder&&(!Sortable||!Sortable.create))throw new Error("SlickGrid requires Sortable.js module to be loaded");this.editController={commitCurrentEdit:this.commitCurrentEdit.bind(this),cancelCurrentEdit:this.cancelCurrentEdit.bind(this)},V.emptyElement(this._container),this._container.style.outline=String(0),this._container.classList.add(this.uid),this._container.classList.add("ui-widget"),this._container.setAttribute("role","grid");let t=window.getComputedStyle(this._container);/relative|absolute|fixed/.test(t.position)||(this._container.style.position="relative"),this._focusSink=V.createDomElement("div",{tabIndex:0,style:{position:"fixed",width:"0px",height:"0px",top:"0px",left:"0px",outline:"0px"}},this._container),this._options.createTopHeaderPanel&&(this._topHeaderPanelScroller=V.createDomElement("div",{className:"slick-topheader-panel slick-state-default",style:{overflow:"hidden",position:"relative"}},this._container),this._topHeaderPanelScroller.appendChild(document.createElement("div")),this._topHeaderPanel=V.createDomElement("div",null,this._topHeaderPanelScroller),this._topHeaderPanelSpacer=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._topHeaderPanelScroller),this._options.showTopHeaderPanel||V.hide(this._topHeaderPanelScroller)),this._paneHeaderL=V.createDomElement("div",{className:"slick-pane slick-pane-header slick-pane-left",tabIndex:0},this._container),this._paneHeaderR=V.createDomElement("div",{className:"slick-pane slick-pane-header slick-pane-right",tabIndex:0},this._container),this._paneTopL=V.createDomElement("div",{className:"slick-pane slick-pane-top slick-pane-left",tabIndex:0},this._container),this._paneTopR=V.createDomElement("div",{className:"slick-pane slick-pane-top slick-pane-right",tabIndex:0},this._container),this._paneBottomL=V.createDomElement("div",{className:"slick-pane slick-pane-bottom slick-pane-left",tabIndex:0},this._container),this._paneBottomR=V.createDomElement("div",{className:"slick-pane slick-pane-bottom slick-pane-right",tabIndex:0},this._container),this._options.createPreHeaderPanel&&(this._preHeaderPanelScroller=V.createDomElement("div",{className:"slick-preheader-panel ui-state-default slick-state-default",style:{overflow:"hidden",position:"relative"}},this._paneHeaderL),this._preHeaderPanelScroller.appendChild(document.createElement("div")),this._preHeaderPanel=V.createDomElement("div",null,this._preHeaderPanelScroller),this._preHeaderPanelSpacer=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._preHeaderPanelScroller),this._preHeaderPanelScrollerR=V.createDomElement("div",{className:"slick-preheader-panel ui-state-default slick-state-default",style:{overflow:"hidden",position:"relative"}},this._paneHeaderR),this._preHeaderPanelR=V.createDomElement("div",null,this._preHeaderPanelScrollerR),this._preHeaderPanelSpacerR=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._preHeaderPanelScrollerR),this._options.showPreHeaderPanel||(V.hide(this._preHeaderPanelScroller),V.hide(this._preHeaderPanelScrollerR))),this._headerScrollerL=V.createDomElement("div",{className:"slick-header ui-state-default slick-state-default slick-header-left"},this._paneHeaderL),this._headerScrollerR=V.createDomElement("div",{className:"slick-header ui-state-default slick-state-default slick-header-right"},this._paneHeaderR),this._headerScroller.push(this._headerScrollerL),this._headerScroller.push(this._headerScrollerR),this._headerL=V.createDomElement("div",{className:"slick-header-columns slick-header-columns-left",role:"row",style:{left:"-1000px"}},this._headerScrollerL),this._headerR=V.createDomElement("div",{className:"slick-header-columns slick-header-columns-right",role:"row",style:{left:"-1000px"}},this._headerScrollerR),this._headers=[this._headerL,this._headerR],this._headerRowScrollerL=V.createDomElement("div",{className:"slick-headerrow ui-state-default slick-state-default"},this._paneTopL),this._headerRowScrollerR=V.createDomElement("div",{className:"slick-headerrow ui-state-default slick-state-default"},this._paneTopR),this._headerRowScroller=[this._headerRowScrollerL,this._headerRowScrollerR],this._headerRowSpacerL=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._headerRowScrollerL),this._headerRowSpacerR=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._headerRowScrollerR),this._headerRowL=V.createDomElement("div",{className:"slick-headerrow-columns slick-headerrow-columns-left"},this._headerRowScrollerL),this._headerRowR=V.createDomElement("div",{className:"slick-headerrow-columns slick-headerrow-columns-right"},this._headerRowScrollerR),this._headerRows=[this._headerRowL,this._headerRowR],this._topPanelScrollerL=V.createDomElement("div",{className:"slick-top-panel-scroller ui-state-default slick-state-default"},this._paneTopL),this._topPanelScrollerR=V.createDomElement("div",{className:"slick-top-panel-scroller ui-state-default slick-state-default"},this._paneTopR),this._topPanelScrollers=[this._topPanelScrollerL,this._topPanelScrollerR],this._topPanelL=V.createDomElement("div",{className:"slick-top-panel",style:{width:"10000px"}},this._topPanelScrollerL),this._topPanelR=V.createDomElement("div",{className:"slick-top-panel",style:{width:"10000px"}},this._topPanelScrollerR),this._topPanels=[this._topPanelL,this._topPanelR],this._options.showColumnHeader||this._headerScroller.forEach(o=>{V.hide(o)}),this._options.showTopPanel||this._topPanelScrollers.forEach(o=>{V.hide(o)}),this._options.showHeaderRow||this._headerRowScroller.forEach(o=>{V.hide(o)}),this._viewportTopL=V.createDomElement("div",{className:"slick-viewport slick-viewport-top slick-viewport-left",tabIndex:0},this._paneTopL),this._viewportTopR=V.createDomElement("div",{className:"slick-viewport slick-viewport-top slick-viewport-right",tabIndex:0},this._paneTopR),this._viewportBottomL=V.createDomElement("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-left",tabIndex:0},this._paneBottomL),this._viewportBottomR=V.createDomElement("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-right",tabIndex:0},this._paneBottomR),this._viewport=[this._viewportTopL,this._viewportTopR,this._viewportBottomL,this._viewportBottomR],this._options.viewportClass&&this._viewport.forEach(o=>{o.classList.add(...V.classNameToList(this._options.viewportClass))}),this._activeViewportNode=this._viewportTopL,this._canvasTopL=V.createDomElement("div",{className:"grid-canvas grid-canvas-top grid-canvas-left",tabIndex:0},this._viewportTopL),this._canvasTopR=V.createDomElement("div",{className:"grid-canvas grid-canvas-top grid-canvas-right",tabIndex:0},this._viewportTopR),this._canvasBottomL=V.createDomElement("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-left",tabIndex:0},this._viewportBottomL),this._canvasBottomR=V.createDomElement("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-right",tabIndex:0},this._viewportBottomR),this._canvas=[this._canvasTopL,this._canvasTopR,this._canvasBottomL,this._canvasBottomR],this.scrollbarDimensions=this.scrollbarDimensions||this.measureScrollbar();let n=this.getCanvasWidth()+this.scrollbarDimensions.width;this._activeCanvasNode=this._canvasTopL,this._topHeaderPanelSpacer&&V.width(this._topHeaderPanelSpacer,n),this._preHeaderPanelSpacer&&V.width(this._preHeaderPanelSpacer,n),this._headers.forEach(o=>{V.width(o,this.getHeadersWidth())}),V.width(this._headerRowSpacerL,n),V.width(this._headerRowSpacerR,n),this._options.createFooterRow&&(this._footerRowScrollerR=V.createDomElement("div",{className:"slick-footerrow ui-state-default slick-state-default"},this._paneTopR),this._footerRowScrollerL=V.createDomElement("div",{className:"slick-footerrow ui-state-default slick-state-default"},this._paneTopL),this._footerRowScroller=[this._footerRowScrollerL,this._footerRowScrollerR],this._footerRowSpacerL=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._footerRowScrollerL),V.width(this._footerRowSpacerL,n),this._footerRowSpacerR=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._footerRowScrollerR),V.width(this._footerRowSpacerR,n),this._footerRowL=V.createDomElement("div",{className:"slick-footerrow-columns slick-footerrow-columns-left"},this._footerRowScrollerL),this._footerRowR=V.createDomElement("div",{className:"slick-footerrow-columns slick-footerrow-columns-right"},this._footerRowScrollerR),this._footerRow=[this._footerRowL,this._footerRowR],this._options.showFooterRow||this._footerRowScroller.forEach(o=>{V.hide(o)})),this._focusSink2=this._focusSink.cloneNode(!0),this._container.appendChild(this._focusSink2),this._options.explicitInitialization||this.finishInitialization()}finishInitialization(){this.initialized||(this.initialized=!0,this.getViewportWidth(),this.getViewportHeight(),this.measureCellPaddingAndBorder(),this.disableSelection(this._headers),this._options.enableTextSelectionOnCells||this._viewport.forEach(e=>{this._bindingEventService.bind(e,"selectstart",t=>{t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement})}),this.setFrozenOptions(),this.setPaneFrozenClasses(),this.setPaneVisibility(),this.setScroller(),this.setOverflow(),this.updateColumnCaches(),this.createColumnHeaders(),this.createColumnFooter(),this.setupColumnSort(),this.createCssRules(),this.resizeCanvas(),this.bindAncestorScrollEvents(),this._bindingEventService.bind(this._container,"resize",this.resizeCanvas.bind(this)),this._viewport.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleScroll.bind(this))}),this._options.enableMouseWheelScrollHandler&&this._viewport.forEach(e=>{this.slickMouseWheelInstances.push(Em({element:e,onMouseWheel:this.handleMouseWheel.bind(this)}))}),this._headerScroller.forEach(e=>{this._bindingEventService.bind(e,"contextmenu",this.handleHeaderContextMenu.bind(this)),this._bindingEventService.bind(e,"click",this.handleHeaderClick.bind(this))}),this._headerRowScroller.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleHeaderRowScroll.bind(this))}),this._options.createFooterRow&&(this._footerRow.forEach(e=>{this._bindingEventService.bind(e,"contextmenu",this.handleFooterContextMenu.bind(this)),this._bindingEventService.bind(e,"click",this.handleFooterClick.bind(this))}),this._footerRowScroller.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleFooterRowScroll.bind(this))})),this._options.createTopHeaderPanel&&this._bindingEventService.bind(this._topHeaderPanelScroller,"scroll",this.handleTopHeaderPanelScroll.bind(this)),this._options.createPreHeaderPanel&&(this._bindingEventService.bind(this._preHeaderPanelScroller,"scroll",this.handlePreHeaderPanelScroll.bind(this)),this._bindingEventService.bind(this._preHeaderPanelScroller,"contextmenu",this.handlePreHeaderContextMenu.bind(this)),this._bindingEventService.bind(this._preHeaderPanelScrollerR,"contextmenu",this.handlePreHeaderContextMenu.bind(this)),this._bindingEventService.bind(this._preHeaderPanelScroller,"click",this.handlePreHeaderClick.bind(this)),this._bindingEventService.bind(this._preHeaderPanelScrollerR,"click",this.handlePreHeaderClick.bind(this))),this._bindingEventService.bind(this._focusSink,"keydown",this.handleKeyDown.bind(this)),this._bindingEventService.bind(this._focusSink2,"keydown",this.handleKeyDown.bind(this)),this._canvas.forEach(e=>{this._bindingEventService.bind(e,"keydown",this.handleKeyDown.bind(this)),this._bindingEventService.bind(e,"click",this.handleClick.bind(this)),this._bindingEventService.bind(e,"dblclick",this.handleDblClick.bind(this)),this._bindingEventService.bind(e,"contextmenu",this.handleContextMenu.bind(this)),this._bindingEventService.bind(e,"mouseover",this.handleCellMouseOver.bind(this)),this._bindingEventService.bind(e,"mouseout",this.handleCellMouseOut.bind(this))}),km&&(this.slickDraggableInstance=km({containerElement:this._container,allowDragFrom:"div.slick-cell",allowDragFromClosest:"div.slick-cell.dnd, div.slick-cell.cell-reorder",preventDragFromKeys:this._options.preventDragFromKeys,onDragInit:this.handleDragInit.bind(this),onDragStart:this.handleDragStart.bind(this),onDrag:this.handleDrag.bind(this),onDragEnd:this.handleDragEnd.bind(this)})),this._options.suppressCssChangesOnHiddenInit||this.restoreCssFromHiddenInit())}cacheCssForHiddenInit(){this._hiddenParents=V.parents(this._container,":hidden"),this.oldProps=[],this._hiddenParents.forEach(e=>{let t={};Object.keys(this.cssShow).forEach(n=>{this.cssShow&&(t[n]=e.style[n],e.style[n]=this.cssShow[n])}),this.oldProps.push(t)})}restoreCssFromHiddenInit(){let e=0;this._hiddenParents&&(this._hiddenParents.forEach(t=>{let n=this.oldProps[e++];Object.keys(this.cssShow).forEach(o=>{this.cssShow&&(t.style[o]=n[o])})}),this._hiddenParents=[])}registerPlugin(e){this.plugins.unshift(e),e.init(this)}unregisterPlugin(e){for(let t=this.plugins.length;t>=0;t--)if(this.plugins[t]===e){this.plugins[t]?.destroy(),this.plugins.splice(t,1);break}}destroy(e){this._bindingEventService.unbindAll(),this.slickDraggableInstance=this.destroyAllInstances(this.slickDraggableInstance),this.slickMouseWheelInstances=this.destroyAllInstances(this.slickMouseWheelInstances),this.slickResizableInstances=this.destroyAllInstances(this.slickResizableInstances),this.getEditorLock()?.cancelCurrentEdit(),this.trigger(this.onBeforeDestroy,{});let t=this.plugins.length;for(;t--;)this.unregisterPlugin(this.plugins[t]);this._options.enableColumnReorder&&typeof this.sortableSideLeftInstance?.destroy=="function"&&(this.sortableSideLeftInstance?.destroy(),this.sortableSideRightInstance?.destroy()),this.unbindAncestorScrollEvents(),this._bindingEventService.unbindByEventName(this._container,"resize"),this.removeCssRules(),this._canvas.forEach(r=>{this._bindingEventService.unbindByEventName(r,"keydown"),this._bindingEventService.unbindByEventName(r,"click"),this._bindingEventService.unbindByEventName(r,"dblclick"),this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"mouseover"),this._bindingEventService.unbindByEventName(r,"mouseout")}),this._viewport.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._headerScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"click")}),this._headerRowScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._footerRow&&this._footerRow.forEach(r=>{this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"click")}),this._footerRowScroller&&this._footerRowScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._preHeaderPanelScroller&&this._bindingEventService.unbindByEventName(this._preHeaderPanelScroller,"scroll"),this._topHeaderPanelScroller&&this._bindingEventService.unbindByEventName(this._topHeaderPanelScroller,"scroll"),this._bindingEventService.unbindByEventName(this._focusSink,"keydown"),this._bindingEventService.unbindByEventName(this._focusSink2,"keydown");let n=this._container.querySelectorAll(".slick-resizable-handle");[].forEach.call(n,r=>{this._bindingEventService.unbindByEventName(r,"dblclick")});let o=this._container.querySelectorAll(".slick-header-column");[].forEach.call(o,r=>{this._bindingEventService.unbindByEventName(r,"mouseenter"),this._bindingEventService.unbindByEventName(r,"mouseleave"),this._bindingEventService.unbindByEventName(r,"mouseenter"),this._bindingEventService.unbindByEventName(r,"mouseleave")}),V.emptyElement(this._container),this._container.classList.remove(this.uid),this.clearAllTimers(),e&&this.destroyAllElements()}destroyAllInstances(e){if(e){let t=Array.isArray(e)?e:[e],n;for(;V.isDefined(n=t.pop());)n&&typeof n.destroy=="function"&&n.destroy()}return e=Array.isArray(e)?[]:null,e}destroyAllElements(){this._activeCanvasNode=null,this._activeViewportNode=null,this._boundAncestors=null,this._canvas=null,this._canvasTopL=null,this._canvasTopR=null,this._canvasBottomL=null,this._canvasBottomR=null,this._container=null,this._focusSink=null,this._focusSink2=null,this._groupHeaders=null,this._groupHeadersL=null,this._groupHeadersR=null,this._headerL=null,this._headerR=null,this._headers=null,this._headerRows=null,this._headerRowL=null,this._headerRowR=null,this._headerRowSpacerL=null,this._headerRowSpacerR=null,this._headerRowScrollContainer=null,this._headerRowScroller=null,this._headerRowScrollerL=null,this._headerRowScrollerR=null,this._headerScrollContainer=null,this._headerScroller=null,this._headerScrollerL=null,this._headerScrollerR=null,this._hiddenParents=null,this._footerRow=null,this._footerRowL=null,this._footerRowR=null,this._footerRowSpacerL=null,this._footerRowSpacerR=null,this._footerRowScroller=null,this._footerRowScrollerL=null,this._footerRowScrollerR=null,this._footerRowScrollContainer=null,this._preHeaderPanel=null,this._preHeaderPanelR=null,this._preHeaderPanelScroller=null,this._preHeaderPanelScrollerR=null,this._preHeaderPanelSpacer=null,this._preHeaderPanelSpacerR=null,this._topPanels=null,this._topPanelScrollers=null,this._style=null,this._topPanelScrollerL=null,this._topPanelScrollerR=null,this._topPanelL=null,this._topPanelR=null,this._paneHeaderL=null,this._paneHeaderR=null,this._paneTopL=null,this._paneTopR=null,this._paneBottomL=null,this._paneBottomR=null,this._viewport=null,this._viewportTopL=null,this._viewportTopR=null,this._viewportBottomL=null,this._viewportBottomR=null,this._viewportScrollContainerX=null,this._viewportScrollContainerY=null}getOptions(){return this._options}setOptions(e,t,n,o){this.prepareForOptionsChange(),this._options.enableAddRow!==e.enableAddRow&&this.invalidateRow(this.getDataLength()),e.frozenColumn!==void 0&&e.frozenColumn>=0&&(this.getViewports().forEach(i=>i.scrollLeft=0),this.handleScroll());let r=V.extend(!0,{},this._options);this._options=V.extend(this._options,e),this.trigger(this.onSetOptions,{optionsBefore:r,optionsAfter:this._options}),this.internal_setOptions(t,n,o)}activateChangedOptions(e,t,n){this.prepareForOptionsChange(),this.invalidateRow(this.getDataLength()),this.trigger(this.onActivateChangedOptions,{options:this._options}),this.internal_setOptions(e,t,n)}prepareForOptionsChange(){this.getEditorLock().commitCurrentEdit()&&this.makeActiveCellNormal()}internal_setOptions(e,t,n){this._options.showColumnHeader!==void 0&&this.setColumnHeaderVisibility(this._options.showColumnHeader),this.validateAndEnforceOptions(),this.setFrozenOptions(),this._options.frozenBottom!==void 0&&(this.enforceFrozenRowHeightRecalc=!0),this._viewport.forEach(o=>{o.style.overflowY=this._options.autoHeight?"hidden":"auto"}),e||this.render(),this.setScroller(),n||this.setOverflow(),t||this.setColumns(this.columns),this._options.enableMouseWheelScrollHandler&&this._viewport&&(!this.slickMouseWheelInstances||this.slickMouseWheelInstances.length===0)?this._viewport.forEach(o=>{this.slickMouseWheelInstances.push(Em({element:o,onMouseWheel:this.handleMouseWheel.bind(this)}))}):this._options.enableMouseWheelScrollHandler===!1&&this.destroyAllInstances(this.slickMouseWheelInstances)}validateAndEnforceOptions(){this._options.autoHeight&&(this._options.leaveSpaceForNewRows=!1),this._options.forceFitColumns&&(this._options.autosizeColsMode=En.LegacyForceFit)}setSelectionModel(e){this.selectionModel&&(this.selectionModel.onSelectedRangesChanged.unsubscribe(this.handleSelectedRangesChanged.bind(this)),this.selectionModel.destroy&&this.selectionModel.destroy()),this.selectionModel=e,this.selectionModel&&(this.selectionModel.init(this),this.selectionModel.onSelectedRangesChanged.subscribe(this.handleSelectedRangesChanged.bind(this)))}getSelectionModel(){return this.selectionModel}setPaneFrozenClasses(){let e=this.hasFrozenColumns()?"add":"remove";for(let t of[this._paneHeaderL,this._paneTopL,this._paneBottomL])t.classList[e]("frozen")}hasFrozenColumns(){return this._options.frozenColumn>-1}updateColumnHeader(e,t,n){if(this.initialized){let o=this.getColumnIndex(e);if(!V.isDefined(o))return;let r=this.columns[o],i=this.getColumnByIndex(o);i&&(t!==void 0&&(this.columns[o].name=t),n!==void 0&&(this.columns[o].toolTip=n),this.trigger(this.onBeforeHeaderCellDestroy,{node:i,column:r,grid:this}),i.setAttribute("title",n||""),t!==void 0&&this.applyHtmlCode(i.children[0],t),this.trigger(this.onHeaderCellRendered,{node:i,column:r,grid:this}))}}getHeader(e){if(!e)return this.hasFrozenColumns()?this._headers:this._headerL;let t=this.getColumnIndex(e.id);return this.hasFrozenColumns()?t<=this._options.frozenColumn?this._headerL:this._headerR:this._headerL}getHeaderColumn(e){let t=typeof e=="number"?e:this.getColumnIndex(e),n=this.hasFrozenColumns()?t<=this._options.frozenColumn?this._headerL:this._headerR:this._headerL,o=this.hasFrozenColumns()?t<=this._options.frozenColumn?t:t-this._options.frozenColumn-1:t;return n.children[o]}getHeaderRow(){return this.hasFrozenColumns()?this._headerRows:this._headerRows[0]}getFooterRow(){return this.hasFrozenColumns()?this._footerRow:this._footerRow[0]}getHeaderRowColumn(e){let t=typeof e=="number"?e:this.getColumnIndex(e),n;return this.hasFrozenColumns()?t<=this._options.frozenColumn?n=this._headerRowL:(n=this._headerRowR,t-=this._options.frozenColumn+1):n=this._headerRowL,n.children[t]}getFooterRowColumn(e){let t=typeof e=="number"?e:this.getColumnIndex(e),n;return this.hasFrozenColumns()?t<=this._options.frozenColumn?n=this._footerRowL:(n=this._footerRowR,t-=this._options.frozenColumn+1):n=this._footerRowL,n.children[t]}createColumnFooter(){if(this._options.createFooterRow){this._footerRow.forEach(e=>{e.querySelectorAll(".slick-footerrow-column").forEach(t=>{let n=V.storage.get(t,"column");this.trigger(this.onBeforeFooterRowCellDestroy,{node:t,column:n,grid:this})})}),V.emptyElement(this._footerRowL),V.emptyElement(this._footerRowR);for(let e=0;e<this.columns.length;e++){let t=this.columns[e];if(!t||t.hidden)continue;let n=V.createDomElement("div",{className:`ui-state-default slick-state-default slick-footerrow-column l${e} r${e}`},this.hasFrozenColumns()&&e>this._options.frozenColumn?this._footerRowR:this._footerRowL),o=this.hasFrozenColumns()&&e<=this._options.frozenColumn?"frozen":null;o&&n.classList.add(o),V.storage.put(n,"column",t),this.trigger(this.onFooterRowCellRendered,{node:n,column:t,grid:this})}}}setupColumnSort(){this._headers.forEach(e=>{this._bindingEventService.bind(e,"click",t=>{if(this.columnResizeDragging||t.target.classList.contains("slick-resizable-handle"))return;let n=t.target.closest(".slick-header-column");if(!n)return;let o=V.storage.get(n,"column");if(o.sortable){if(!this.getEditorLock()?.commitCurrentEdit())return;let r=this.sortColumns.slice(),i=null,a=0;for(;a<this.sortColumns.length;a++)if(this.sortColumns[a].columnId===o.id){i=this.sortColumns[a],i.sortAsc=!i.sortAsc;break}let l=!!i;this._options.tristateMultiColumnSort?(i||(i={columnId:o.id,sortAsc:o.defaultSortAsc,sortCol:o}),l&&i.sortAsc&&(this.sortColumns.splice(a,1),i=null),this._options.multiColumnSort||(this.sortColumns=[]),i&&(!l||!this._options.multiColumnSort)&&this.sortColumns.push(i)):t.metaKey&&this._options.multiColumnSort?i&&this.sortColumns.splice(a,1):((!t.shiftKey&&!t.metaKey||!this._options.multiColumnSort)&&(this.sortColumns=[]),i?this.sortColumns.length===0&&this.sortColumns.push(i):(i={columnId:o.id,sortAsc:o.defaultSortAsc,sortCol:o},this.sortColumns.push(i)));let d;this._options.multiColumnSort?d={multiColumnSort:!0,previousSortColumns:r,sortCols:this.sortColumns.map(u=>{let f=this.columns[this.getColumnIndex(u.columnId)];return!f||f.hidden?null:{columnId:f.id,sortCol:f,sortAsc:u.sortAsc}}).filter(u=>u)}:d={multiColumnSort:!1,previousSortColumns:r,columnId:this.sortColumns.length>0?o.id:null,sortCol:this.sortColumns.length>0?o:null,sortAsc:this.sortColumns.length>0?this.sortColumns[0].sortAsc:!0},this.trigger(this.onBeforeSort,d,t).getReturnValue()!==!1&&(this.setSortColumns(this.sortColumns),this.trigger(this.onSort,d,t))}})})}createColumnHeaders(){this._headers.forEach(e=>{e.querySelectorAll(".slick-header-column").forEach(t=>{let n=V.storage.get(t,"column");n&&this.trigger(this.onBeforeHeaderCellDestroy,{node:t,column:n,grid:this})})}),V.emptyElement(this._headerL),V.emptyElement(this._headerR),this.getHeadersWidth(),V.width(this._headerL,this.headersWidthL),V.width(this._headerR,this.headersWidthR),this._headerRows.forEach(e=>{e.querySelectorAll(".slick-headerrow-column").forEach(t=>{let n=V.storage.get(t,"column");n&&this.trigger(this.onBeforeHeaderRowCellDestroy,{node:this,column:n,grid:this})})}),V.emptyElement(this._headerRowL),V.emptyElement(this._headerRowR),this._options.createFooterRow&&(this._footerRowL.querySelectorAll(".slick-footerrow-column").forEach(e=>{let t=V.storage.get(e,"column");t&&this.trigger(this.onBeforeFooterRowCellDestroy,{node:this,column:t,grid:this})}),V.emptyElement(this._footerRowL),this.hasFrozenColumns()&&(this._footerRowR.querySelectorAll(".slick-footerrow-column").forEach(e=>{let t=V.storage.get(e,"column");t&&this.trigger(this.onBeforeFooterRowCellDestroy,{node:this,column:t,grid:this})}),V.emptyElement(this._footerRowR)));for(let e=0;e<this.columns.length;e++){let t=this.columns[e];if(t.hidden)continue;let n=this.hasFrozenColumns()?e<=this._options.frozenColumn?this._headerL:this._headerR:this._headerL,o=this.hasFrozenColumns()?e<=this._options.frozenColumn?this._headerRowL:this._headerRowR:this._headerRowL,r=V.createDomElement("div",{id:`${this.uid+t.id}`,dataset:{id:String(t.id)},role:"columnheader",className:"ui-state-default slick-state-default slick-header-column"},n);t.toolTip&&(r.title=t.toolTip),t.reorderable||r.classList.add(this._options.unorderableColumnCssClass);let i=V.createDomElement("span",{className:"slick-column-name"},r);this.applyHtmlCode(i,t.name),V.width(r,t.width-this.headerColumnWidthDiff);let a=t.headerCssClass||null;if(a&&r.classList.add(...V.classNameToList(a)),a=this.hasFrozenColumns()&&e<=this._options.frozenColumn?"frozen":null,a&&r.classList.add(a),this._bindingEventService.bind(r,"mouseenter",this.handleHeaderMouseEnter.bind(this)),this._bindingEventService.bind(r,"mouseleave",this.handleHeaderMouseLeave.bind(this)),V.storage.put(r,"column",t),(this._options.enableColumnReorder||t.sortable)&&(this._bindingEventService.bind(r,"mouseenter",this.handleHeaderMouseHoverOn.bind(this)),this._bindingEventService.bind(r,"mouseleave",this.handleHeaderMouseHoverOff.bind(this))),t.hasOwnProperty("headerCellAttrs")&&t.headerCellAttrs instanceof Object&&Object.keys(t.headerCellAttrs).forEach(l=>{t.headerCellAttrs.hasOwnProperty(l)&&r.setAttribute(l,t.headerCellAttrs[l])}),t.sortable&&(r.classList.add("slick-header-sortable"),V.createDomElement("div",{className:`slick-sort-indicator ${this._options.numberedMultiColumnSort&&!this._options.sortColNumberInSeparateSpan?" slick-sort-indicator-numbered":""}`},r),this._options.numberedMultiColumnSort&&this._options.sortColNumberInSeparateSpan&&V.createDomElement("div",{className:"slick-sort-indicator-numbered"},r)),this.trigger(this.onHeaderCellRendered,{node:r,column:t,grid:this}),this._options.showHeaderRow){let l=V.createDomElement("div",{className:`ui-state-default slick-state-default slick-headerrow-column l${e} r${e}`},o),d=this.hasFrozenColumns()&&e<=this._options.frozenColumn?"frozen":null;d&&l.classList.add(d),this._bindingEventService.bind(l,"mouseenter",this.handleHeaderRowMouseEnter.bind(this)),this._bindingEventService.bind(l,"mouseleave",this.handleHeaderRowMouseLeave.bind(this)),V.storage.put(l,"column",t),this.trigger(this.onHeaderRowCellRendered,{node:l,column:t,grid:this})}if(this._options.createFooterRow&&this._options.showFooterRow){let l=this.hasFrozenColumns()?e<=this._options.frozenColumn?this._footerRow[0]:this._footerRow[1]:this._footerRow[0],d=V.createDomElement("div",{className:`ui-state-default slick-state-default slick-footerrow-column l${e} r${e}`},l);V.storage.put(d,"column",t),this.trigger(this.onFooterRowCellRendered,{node:d,column:t,grid:this})}}this.setSortColumns(this.sortColumns),this.setupColumnResize(),this._options.enableColumnReorder&&(typeof this._options.enableColumnReorder=="function"?this._options.enableColumnReorder(this,this._headers,this.headerColumnWidthDiff,this.setColumns,this.setupColumnResize,this.columns,this.getColumnIndex,this.uid,this.trigger):this.setupColumnReorder())}setupColumnReorder(){this.sortableSideLeftInstance?.destroy(),this.sortableSideRightInstance?.destroy();let e=null,t=()=>this._viewportScrollContainerX.scrollLeft=this._viewportScrollContainerX.scrollLeft+10,n=()=>this._viewportScrollContainerX.scrollLeft=this._viewportScrollContainerX.scrollLeft-10,o=!1,r={animation:50,direction:"horizontal",chosenClass:"slick-header-column-active",ghostClass:"slick-sortable-placeholder",draggable:".slick-header-column",dragoverBubble:!1,revertClone:!0,scroll:!this.hasFrozenColumns(),filter:`.${this._options.unorderableColumnCssClass}`,onMove:i=>!i.related.classList.contains(this._options.unorderableColumnCssClass),onStart:i=>{i.item.classList.add("slick-header-column-active"),o=!this.hasFrozenColumns()||V.offset(i.item).left>V.offset(this._viewportScrollContainerX).left,o&&i.originalEvent.pageX>this._container.clientWidth?e||(e=window.setInterval(t,100)):o&&i.originalEvent.pageX<V.offset(this._viewportScrollContainerX).left?e||(e=window.setInterval(n,100)):(window.clearInterval(e),e=null)},onEnd:i=>{if(i.item.classList.remove("slick-header-column-active"),window.clearInterval(e),e=null,!this.getEditorLock()?.commitCurrentEdit())return;let a=this.sortableSideLeftInstance?.toArray()??[];a=a.concat(this.sortableSideRightInstance?.toArray()??[]);let l=[];for(let d=0;d<a.length;d++)l.push(this.columns[this.getColumnIndex(a[d])]);this.setColumns(l),this.trigger(this.onColumnsReordered,{impactedColumns:this.columns}),i.stopPropagation(),this.setupColumnResize(),this.activeCellNode&&this.setFocus()}};this.sortableSideLeftInstance=Sortable.create(this._headerL,r),this.sortableSideRightInstance=Sortable.create(this._headerR,r)}getHeaderChildren(){let e=Array.from(this._headers[0].children),t=Array.from(this._headers[1].children);return e.concat(t)}handleResizeableDoubleClick(e){let t=e.target.parentElement.id.replace(this.uid,"");this.trigger(this.onColumnsResizeDblClick,{triggeredByColumn:t})}setupColumnResize(){if(typeof Pm>"u")throw new Error('Slick.Resizable is undefined, make sure to import "slick.interactions.js"');let e,t,n,o,r,i,a,l=-1,d=0,u=this.getHeaderChildren(),f=this.getVisibleColumns();for(let p=0;p<u.length;p++)u[p].querySelectorAll(".slick-resizable-handle").forEach(y=>y.remove()),!(p>=f.length||!f[p])&&f[p].resizable&&(a===void 0&&(a=p),l=p);if(a!==void 0)for(let p=0;p<u.length;p++){let y=u[p];if(p>=f.length||!f[p]||p<a||this._options.forceFitColumns&&p>=l)continue;let w=V.createDomElement("div",{className:"slick-resizable-handle",role:"separator",ariaOrientation:"horizontal"},y);this._bindingEventService.bind(w,"dblclick",this.handleResizeableDoubleClick.bind(this)),this.slickResizableInstances.push(Pm({resizeableElement:y,resizeableHandleElement:w,onResizeStart:(b,m)=>{let v=b.touches?b.changedTouches[0]:b;if(!this.getEditorLock()?.commitCurrentEdit())return!1;o=v.pageX,d=0,m.resizeableElement.classList.add("slick-header-column-active");let D=null,k=null;for(let C=0;C<u.length;C++)C>=f.length||!f[C]||(f[C].previousWidth=u[C].offsetWidth);if(this._options.forceFitColumns)for(D=0,k=0,e=p+1;e<f.length;e++)n=f[e],n?.resizable&&(k!==null&&(n.maxWidth?k+=n.maxWidth-(n.previousWidth||0):k=null),D+=(n.previousWidth||0)-Math.max(n.minWidth||0,this.absoluteColumnMinWidth));let x=0,S=0;for(e=0;e<=p;e++)n=f[e],n?.resizable&&(S!==null&&(n.maxWidth?S+=n.maxWidth-(n.previousWidth||0):S=null),x+=(n.previousWidth||0)-Math.max(n.minWidth||0,this.absoluteColumnMinWidth));D===null&&(D=1e5),x===null&&(x=1e5),k===null&&(k=1e5),S===null&&(S=1e5),i=o+Math.min(D,S),r=o-Math.min(x,k)},onResize:(b,m)=>{let v=b.touches?b.changedTouches[0]:b;this.columnResizeDragging=!0;let D,k=Math.min(i,Math.max(r,v.pageX))-o,x,S=0,C=0,O=this.getViewportInnerWidth();if(k<0){for(x=k,e=p;e>=0;e--)n=f[e],n?.resizable&&!n.hidden&&(D=Math.max(n.minWidth||0,this.absoluteColumnMinWidth),x&&(n.previousWidth||0)+x<D?(x+=(n.previousWidth||0)-D,n.width=D):(n.width=(n.previousWidth||0)+x,x=0));for(t=0;t<=p;t++)n=f[t],!(!n||n.hidden)&&(this.hasFrozenColumns()&&t>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);if(this._options.forceFitColumns)for(x=-k,e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&n.resizable&&(x&&n.maxWidth&&n.maxWidth-(n.previousWidth||0)<x?(x-=n.maxWidth-(n.previousWidth||0),n.width=n.maxWidth):(n.width=(n.previousWidth||0)+x,x=0),this.hasFrozenColumns()&&e>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);else for(e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&(this.hasFrozenColumns()&&e>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);if(this._options.forceFitColumns)for(x=-k,e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&n.resizable&&(x&&n.maxWidth&&n.maxWidth-(n.previousWidth||0)<x?(x-=n.maxWidth-(n.previousWidth||0),n.width=n.maxWidth):(n.width=(n.previousWidth||0)+x,x=0))}else{for(x=k,S=0,C=0,e=p;e>=0;e--)if(n=f[e],!(!n||n.hidden)&&n.resizable)if(x&&n.maxWidth&&n.maxWidth-(n.previousWidth||0)<x)x-=n.maxWidth-(n.previousWidth||0),n.width=n.maxWidth;else{let I=(n.previousWidth||0)+x,F=this.canvasWidthL+x;this.hasFrozenColumns()&&e<=this._options.frozenColumn?(I>d&&F<O-this._options.frozenRightViewportMinWidth&&(d=I),n.width=F+this._options.frozenRightViewportMinWidth>O?d:I):n.width=I,x=0}for(t=0;t<=p;t++)n=f[t],!(!n||n.hidden)&&(this.hasFrozenColumns()&&t>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);if(this._options.forceFitColumns)for(x=-k,e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&n.resizable&&(D=Math.max(n.minWidth||0,this.absoluteColumnMinWidth),x&&(n.previousWidth||0)+x<D?(x+=(n.previousWidth||0)-D,n.width=D):(n.width=(n.previousWidth||0)+x,x=0),this.hasFrozenColumns()&&e>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);else for(e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&(this.hasFrozenColumns()&&e>this._options.frozenColumn?C+=n.width||0:S+=n.width||0)}this.hasFrozenColumns()&&S!==this.canvasWidthL&&(V.width(this._headerL,S+1e3),V.setStyleSize(this._paneHeaderR,"left",S)),this.applyColumnHeaderWidths(),this._options.syncColumnCellResize&&this.applyColumnWidths(),this.trigger(this.onColumnsDrag,{triggeredByColumn:m.resizeableElement,resizeHandle:m.resizeableHandleElement})},onResizeEnd:(b,m)=>{m.resizeableElement.classList.remove("slick-header-column-active");let v=m.resizeableElement.id.replace(this.uid,"");this.trigger(this.onBeforeColumnsResize,{triggeredByColumn:v}).getReturnValue()===!0&&this.applyColumnHeaderWidths();let D;for(e=0;e<f.length;e++)n=f[e],!(!n||n.hidden)&&(D=u[e].offsetWidth,n.previousWidth!==D&&n.rerenderOnResize&&this.invalidateAllRows());this.updateCanvasWidth(!0),this.render(),this.trigger(this.onColumnsResized,{triggeredByColumn:v}),window.clearTimeout(this._columnResizeTimer),this._columnResizeTimer=window.setTimeout(()=>{this.columnResizeDragging=!1},300)}}))}}setFrozenOptions(){if(this._options.frozenColumn=this._options.frozenColumn>=0&&this._options.frozenColumn<this.columns.length?parseInt(this._options.frozenColumn,10):-1,this._options.frozenRow>-1){this.hasFrozenRows=!0,this.frozenRowsHeight=this._options.frozenRow*this._options.rowHeight;let e=this.getDataLength();this.actualFrozenRow=this._options.frozenBottom?e-this._options.frozenRow:this._options.frozenRow}else this.hasFrozenRows=!1}autosizeColumn(e,t){let n=null,o=-1;if(typeof e=="number")n=this.columns[e],o=e;else if(typeof e=="string")for(let i=0;i<this.columns.length;i++)this.columns[i].id===e&&(n=this.columns[i],o=i);if(!n)return;let r=this.getCanvasNode(0,0);this.getColAutosizeWidth(n,o,r,t||!1,o)}treatAsLocked(e={}){return!e.ignoreHeaderText&&!e.sizeToRemaining&&e.contentSizePx===e.headerWidthPx&&(e.widthPx??0)<100}autosizeColumns(e,t){let n=!this._hiddenParents?.length;n&&this.cacheCssForHiddenInit(),this.internalAutosizeColumns(e,t),n&&this.restoreCssFromHiddenInit()}internalAutosizeColumns(e,t){if(e=e||this._options.autosizeColsMode,e===En.LegacyForceFit||e===En.LegacyOff){this.legacyAutosizeColumns();return}if(e===En.None)return;this.canvas=document.createElement("canvas"),this.canvas?.getContext&&(this.canvas_context=this.canvas.getContext("2d"));let n=this.getCanvasNode(0,0),o=this.getViewportInnerWidth(),r,i,a,l=!1,d=0,u=0,f=0,p=0,y=0;for(r=0;r<this.columns.length;r++)i=this.columns[r],this.getColAutosizeWidth(i,r,n,t||!1,r),y+=i.autoSize?.autosizeMode===pr.Locked?i.width||0:this.treatAsLocked(i.autoSize)&&i.autoSize?.widthPx||0,p+=i.autoSize?.autosizeMode===pr.Locked?i.width||0:this.treatAsLocked(i.autoSize)?i.autoSize?.widthPx||0:i.minWidth||0,d+=i.autoSize?.widthPx||0,u+=i.autoSize?.sizeToRemaining?0:i.autoSize?.widthPx||0,f+=i.autoSize?.sizeToRemaining&&i.minWidth||0;let w=d-u;if(e===En.FitViewportToCols){let b=d+(this.scrollbarDimensions?.width??0);e=En.IgnoreViewport,this._options.viewportMaxWidthPx&&b>this._options.viewportMaxWidthPx?(b=this._options.viewportMaxWidthPx,e=En.FitColsToViewport):this._options.viewportMinWidthPx&&b<this._options.viewportMinWidthPx&&(b=this._options.viewportMinWidthPx,e=En.FitColsToViewport),V.width(this._container,b)}if(e===En.FitColsToViewport)if(w>0&&u<o-f)for(r=0;r<this.columns.length;r++){if(i=this.columns[r],!i||i.hidden)continue;let b=o-u;i.autoSize?.sizeToRemaining?a=b*(i.autoSize?.widthPx||0)/w:a=i.autoSize?.widthPx||0,i.rerenderOnResize&&(i.width||0)!==a&&(l=!0),i.width=a}else if(this._options.viewportSwitchToScrollModeWidthPercent&&u+f>o*this._options.viewportSwitchToScrollModeWidthPercent/100||p>o)e=En.IgnoreViewport;else{let b=u-y,m=o-y-f;for(r=0;r<this.columns.length;r++)i=this.columns[r],!(!i||i.hidden)&&(a=i.width||0,i.autoSize?.autosizeMode!==pr.Locked&&!this.treatAsLocked(i.autoSize)&&(i.autoSize?.sizeToRemaining?a=i.minWidth||0:(a=m/b*(i.autoSize?.widthPx||0)-1,a<(i.minWidth||0)&&(a=i.minWidth||0),b-=i.autoSize?.widthPx||0,m-=a)),this.treatAsLocked(i.autoSize)&&(a=i.autoSize?.widthPx||0,a<(i.minWidth||0)&&(a=i.minWidth||0)),i.rerenderOnResize&&i.width!==a&&(l=!0),i.width=a)}if(e===En.IgnoreViewport)for(r=0;r<this.columns.length;r++)!this.columns[r]||this.columns[r].hidden||(a=this.columns[r].autoSize?.widthPx||0,this.columns[r].rerenderOnResize&&this.columns[r].width!==a&&(l=!0),this.columns[r].width=a);this.reRenderColumns(l)}getColAutosizeWidth(e,t,n,o,r){let i=e.autoSize;if(i.widthPx=e.width,i.autosizeMode===pr.Locked||i.autosizeMode===pr.Guide)return;let a=this.getDataLength(),l=new RegExp(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z/);if(i.autosizeMode===pr.ContentIntelligent){let f=i.colDataTypeOf,p;if(a>0){let y=this.getDataItem(0);y&&(p=y[e.field],l.test(p)&&(p=Date.parse(p)),f=typeof p,f==="object"&&(p instanceof Date&&(f="date"),typeof moment<"u"&&p instanceof moment&&(f="moment")))}f==="boolean"&&(i.colValueArray=[!0,!1]),f==="number"&&(i.valueFilterMode=Pr.GetGreatestAndSub,i.rowSelectionMode=ps.AllRows),f==="string"&&(i.valueFilterMode=Pr.GetLongestText,i.rowSelectionMode=ps.AllRows,i.allowAddlPercent=5),f==="date"&&(i.colValueArray=[new Date(2009,8,30,12,20,20)]),f==="moment"&&typeof moment<"u"&&(i.colValueArray=[moment([2009,8,30,12,20,20])])}let d=i.contentSizePx=this.getColContentSize(e,t,n,o,r);d===0&&(d=i.widthPx||0);let u=i.allowAddlPercent?1+i.allowAddlPercent/100:1;d=d*u+(this._options.autosizeColPaddingPx||0),e.minWidth&&d<e.minWidth&&(d=e.minWidth),e.maxWidth&&d>e.maxWidth&&(d=e.maxWidth),(i.autosizeMode===pr.ContentExpandOnly||e?.editor?.ControlFillsColumn)&&d<(e.width||0)&&(d=e.width||0),i.widthPx=d}getColContentSize(e,t,n,o,r){let i=e.autoSize,a=1,l,d,u=0,f=0;if(i.headerWidthPx=0,i.ignoreHeaderText||(i.headerWidthPx=this.getColHeaderWidth(e)),i.headerWidthPx===0&&(i.headerWidthPx=e.width?e.width:e.maxWidth?e.maxWidth:e.minWidth?e.minWidth:20),i.colValueArray)return f=this.getColWidth(e,n,i.colValueArray),Math.max(i.headerWidthPx,f);let p={};p.colIndex=t,p.rowCount=this.getDataLength(),p.startIndex=0,p.endIndex=p.rowCount-1,p.valueArr=null,p.getRowVal=w=>this.getDataItem(w)[e.field];let y=(o?i.rowSelectionModeOnInit:void 0)||i.rowSelectionMode;if(y===ps.FirstRow&&(p.endIndex=0),y===ps.LastRow&&(p.endIndex=p.startIndex=p.rowCount-1),y===ps.FirstNRows&&(p.endIndex=Math.min(i.rowSelectionCount||0,p.rowCount)-1),i.valueFilterMode===Pr.DeDuplicate){let w={};for(l=p.startIndex;l<=p.endIndex;l++)w[p.getRowVal(l)]=!0;if(Object.keys)p.valueArr=Object.keys(w);else{p.valueArr=[];for(let b in w)w&&p.valueArr.push(b)}p.startIndex=0,p.endIndex=p.length-1}if(i.valueFilterMode===Pr.GetGreatestAndSub){let w,b=0;for(l=p.startIndex;l<=p.endIndex;l++)d=p.getRowVal(l),Math.abs(d)>b&&(w=d,b=Math.abs(d));w=""+w,w=Array(w.length+1).join("9"),w=+w,p.valueArr=[w],p.startIndex=p.endIndex=0}if(i.valueFilterMode===Pr.GetLongestTextAndSub){for(l=p.startIndex;l<=p.endIndex;l++)d=p.getRowVal(l),(d||"").length>u&&(u=d.length);d=Array(u+1).join("m"),a=this._options.autosizeTextAvgToMWidthRatio||0,p.maxLen=u,p.valueArr=[d],p.startIndex=p.endIndex=0}if(i.valueFilterMode===Pr.GetLongestText){u=0;let w=0;for(l=p.startIndex;l<=p.endIndex;l++)d=p.getRowVal(l),(d||"").length>u&&(u=d.length,w=l);d=p.getRowVal(w),p.maxLen=u,p.valueArr=[d],p.startIndex=p.endIndex=0}return p.maxLen&&p.maxLen>30&&r>1&&(i.sizeToRemaining=!0),f=this.getColWidth(e,n,p)*a,Math.max(i.headerWidthPx,f)}getColWidth(e,t,n){let o=V.createDomElement("div",{className:"slick-row ui-widget-content"},t),r=V.createDomElement("div",{className:"slick-cell"},o);r.style.position="absolute",r.style.visibility="hidden",r.style.textOverflow="initial",r.style.whiteSpace="nowrap";let i,a,l=0,d="",u,f,p=e.autoSize.widthEvalMode===Nd.TextOnly;if(e.autoSize?.widthEvalMode===Nd.Auto){let y=!e.formatterOverride&&!e.formatter,w=e?.formatterOverride?.ReturnsTextOnly||!e.formatterOverride&&e.formatter?.ReturnsTextOnly;p=y||w}if(this.canvas_context&&p){let y=getComputedStyle(r);for(this.canvas_context.font=y.fontSize+" "+y.fontFamily,i=n.startIndex;i<=n.endIndex;i++)f=n.valueArr?n.valueArr[i]:n.getRowVal(i),e.formatterOverride?u=e.formatterOverride(i,n.colIndex,f,e,this.getDataItem(i),this):e.formatter?u=e.formatter(i,n.colIndex,f,e,this.getDataItem(i),this):u=""+f,a=u?this.canvas_context.measureText(u).width:0,a>l&&(l=a,d=u);return r.textContent=d,a=r.offsetWidth,o.remove(),a}for(i=n.startIndex;i<=n.endIndex;i++)f=n.valueArr?n.valueArr[i]:n.getRowVal(i),e.formatterOverride?u=e.formatterOverride(i,n.colIndex,f,e,this.getDataItem(i),this):e.formatter?u=e.formatter(i,n.colIndex,f,e,this.getDataItem(i),this):u=""+f,this.applyFormatResultToCellNode(u,r),a=r.offsetWidth,a>l&&(l=a);return o.remove(),l}getColHeaderWidth(e){let t=0,n=this.getUID()+e.id,o=document.getElementById(n),r=`${n}_`,i=o.cloneNode(!0);if(o)i.id=r,i.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",o.parentNode.insertBefore(i,o),t=i.offsetWidth,i.parentNode.removeChild(i);else{let a=this.getHeader(e);o=V.createDomElement("div",{id:r,className:"ui-state-default slick-state-default slick-header-column"},a);let l=V.createDomElement("span",{className:"slick-column-name"},o);this.applyHtmlCode(l,e.name),i.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",e.headerCssClass&&o.classList.add(...V.classNameToList(e.headerCssClass)),t=o.offsetWidth,a.removeChild(o)}return t}legacyAutosizeColumns(){let e,t,n=0,o=0,r=0,i=[],a=this.getViewportInnerWidth();for(e=0;e<this.columns.length;e++){if(t=this.columns[e],!t||t.hidden){i.push(0);continue}i.push(t.width||0),o+=t.width||0,t.resizable&&(n+=(t.width||0)-Math.max(t.minWidth||0,this.absoluteColumnMinWidth))}for(r=o;o>a&&n;){let d=(o-a)/n;for(e=0;e<this.columns.length&&o>a;e++){if(t=this.columns[e],!t||t.hidden)continue;let u=i[e];if(!t.resizable||u<=t.minWidth||u<=this.absoluteColumnMinWidth)continue;let f=Math.max(t.minWidth,this.absoluteColumnMinWidth),p=Math.floor(d*(u-f))||1;p=Math.min(p,u-f),o-=p,n-=p,i[e]-=p}if(r<=o)break;r=o}for(r=o;o<a;){let d=a/o;for(e=0;e<this.columns.length&&o<a;e++){if(t=this.columns[e],!t||t.hidden)continue;let u=i[e],f;!t.resizable||t.maxWidth<=u?f=0:f=Math.min(Math.floor(d*u)-u,t.maxWidth-u||1e6)||1,o+=f,i[e]+=o<=a?f:0}if(r>=o)break;r=o}let l=!1;for(e=0;e<this.columns.length;e++)!t||t.hidden||(this.columns[e].rerenderOnResize&&this.columns[e].width!==i[e]&&(l=!0),this.columns[e].width=i[e]);this.reRenderColumns(l)}reRenderColumns(e){this.applyColumnHeaderWidths(),this.updateCanvasWidth(!0),this.trigger(this.onAutosizeColumns,{columns:this.columns}),e&&(this.invalidateAllRows(),this.render())}getVisibleColumns(){return this.columns.filter(e=>!e.hidden)}getColumnIndex(e){return this.columnsById[e]}applyColumnHeaderWidths(){if(!this.initialized)return;let e=0,t=this.getVisibleColumns();this._headers.forEach(n=>{for(let o=0;o<n.children.length;o++,e++){let r=n.children[o],i=((t[e]||{}).width||0)-this.headerColumnWidthDiff;V.width(r)!==i&&V.width(r,i)}}),this.updateColumnCaches()}applyColumnWidths(){let e=0,t=0,n;for(let o=0;o<this.columns.length;o++)this.columns[o]?.hidden||(t=this.columns[o].width||0,n=this.getColumnCssRules(o),n.left.style.left=`${e}px`,n.right.style.right=(this._options.frozenColumn!==-1&&o>this._options.frozenColumn?this.canvasWidthR:this.canvasWidthL)-e-t+"px",this._options.frozenColumn!==o&&(e+=this.columns[o].width)),this._options.frozenColumn===o&&(e=0)}setSortColumn(e,t){this.setSortColumns([{columnId:e,sortAsc:t}])}getColumnByIndex(e){let t;return this._headers.every(n=>{let o=n.children.length;return e<o?(t=n.children[e],!1):(e-=o,!0)}),t}setSortColumns(e){this.sortColumns=e;let t=this._options.numberedMultiColumnSort&&this.sortColumns.length>1;this._headers.forEach(o=>{let r=o.querySelectorAll(".slick-header-column-sorted");r.forEach(i=>{i.classList.remove("slick-header-column-sorted")}),r=o.querySelectorAll(".slick-sort-indicator"),r.forEach(i=>{i.classList.remove("slick-sort-indicator-asc"),i.classList.remove("slick-sort-indicator-desc")}),r=o.querySelectorAll(".slick-sort-indicator-numbered"),r.forEach(i=>{i.textContent=""})});let n=1;this.sortColumns.forEach(o=>{V.isDefined(o.sortAsc)||(o.sortAsc=!0);let r=this.getColumnIndex(o.columnId);if(V.isDefined(r)){let i=this.getColumnByIndex(r);if(i){i.classList.add("slick-header-column-sorted");let a=i.querySelector(".slick-sort-indicator");a?.classList.add(o.sortAsc?"slick-sort-indicator-asc":"slick-sort-indicator-desc"),t&&(a=i.querySelector(".slick-sort-indicator-numbered"),a&&(a.textContent=String(n)))}}n++})}getColumns(){return this.columns}getSortColumns(){return this.sortColumns}updateColumnCaches(){this.columnPosLeft=[],this.columnPosRight=[];let e=0;for(let t=0,n=this.columns.length;t<n;t++)!this.columns[t]||this.columns[t].hidden||(this.columnPosLeft[t]=e,this.columnPosRight[t]=e+(this.columns[t].width||0),this._options.frozenColumn===t?e=0:e+=this.columns[t].width||0)}updateColumnProps(){this.columnsById={};for(let e=0;e<this.columns.length;e++){let t=this.columns[e];t.width&&(t.widthRequest=t.width),this._options.mixinDefaults?(V.applyDefaults(t,this._columnDefaults),t.autoSize||(t.autoSize={}),V.applyDefaults(t.autoSize,this._columnAutosizeDefaults)):(t=this.columns[e]=V.extend({},this._columnDefaults,t),t.autoSize=V.extend({},this._columnAutosizeDefaults,t.autoSize)),this.columnsById[t.id]=e,t.minWidth&&(t.width||0)<t.minWidth&&(t.width=t.minWidth),t.maxWidth&&(t.width||0)>t.maxWidth&&(t.width=t.maxWidth)}}setColumns(e){this.trigger(this.onBeforeSetColumns,{previousColumns:this.columns,newColumns:e,grid:this}),this.columns=e,this.updateColumnsInternal(),this.trigger(this.onAfterSetColumns,{newColumns:e,grid:this})}updateColumns(){this.trigger(this.onBeforeUpdateColumns,{columns:this.columns,grid:this}),this.updateColumnsInternal()}updateColumnsInternal(){this.updateColumnProps(),this.updateColumnCaches(),this.initialized&&(this.setPaneFrozenClasses(),this.setPaneVisibility(),this.setOverflow(),this.invalidateAllRows(),this.createColumnHeaders(),this.createColumnFooter(),this.removeCssRules(),this.createCssRules(),this.resizeCanvas(),this.updateCanvasWidth(),this.applyColumnHeaderWidths(),this.applyColumnWidths(),this.handleScroll(),this.getSelectionModel()?.refreshSelections())}getEditorLock(){return this._options.editorLock}getEditController(){return this.editController}setData(e,t){this.data=e,this.invalidateAllRows(),this.updateRowCount(),t&&this.scrollTo(0)}getData(){return this.data}getDataLength(){return this.data.getLength?this.data.getLength():this.data?.length??0}getDataLengthIncludingAddNew(){return this.getDataLength()+(this._options.enableAddRow&&(!this.pagingActive||this.pagingIsLastPage)?1:0)}getDataItem(e){return this.data.getItem?this.data.getItem(e):this.data[e]}hasDataView(){return!Array.isArray(this.data)}getItemMetadaWhenExists(e){return"getItemMetadata"in this.data?this.data.getItemMetadata(e):null}getFormatter(e,t){let n=this.data?.getItemMetadata?.(e);return(n?.columns&&(n.columns[t.id]||n.columns[this.getColumnIndex(t.id)]))?.formatter||n?.formatter||t.formatter||this._options.formatterFactory?.getFormatter(t)||this._options.defaultFormatter}getEditor(e,t){let n=this.columns[t],o=this.getItemMetadaWhenExists(e)?.columns;return o?.[n.id]?.editor!==void 0?o[n.id].editor:o?.[t]?.editor!==void 0?o[t].editor:n.editor||this._options?.editorFactory?.getEditor(n)}getDataItemValueForColumn(e,t){return this._options.dataItemColumnValueExtractor?this._options.dataItemColumnValueExtractor(e,t):e[t.field]}resetActiveCell(){this.setActiveCellInternal(null,!1)}unsetActiveCell(){V.isDefined(this.activeCellNode)&&(this.makeActiveCellNormal(),this.activeCellNode.classList.remove("active"),this.rowsCache[this.activeRow]?.rowNode?.forEach(e=>e.classList.remove("active")))}focus(){this.setFocus()}setFocus(){this.tabbingDirection===-1?this._focusSink.focus():this._focusSink2.focus()}setActiveCellInternal(e,t,n,o,r){if(this.unsetActiveCell(),this.activeCellNode=e,V.isDefined(this.activeCellNode)){let i=V.offset(this.activeCellNode),a=Math.floor(V.offset(V.parents(this.activeCellNode,".grid-canvas")[0]).top),l=V.parents(this.activeCellNode,".grid-canvas-bottom").length;this.hasFrozenRows&&l&&(a-=this._options.frozenBottom?V.height(this._canvasTopL):this.frozenRowsHeight);let d=this.getCellFromPoint(i.left,Math.ceil(i.top)-a);this.activeRow=d.row,this.activePosY=d.row,this.activeCell=this.activePosX=this.getCellFromNode(this.activeCellNode),!V.isDefined(t)&&this._options.autoEditNewRow&&(t=this.activeRow===this.getDataLength()||this._options.autoEdit),this._options.showCellSelection&&(document.querySelectorAll(".slick-cell.active").forEach(u=>u.classList.remove("active")),this.activeCellNode.classList.add("active"),this.rowsCache[this.activeRow]?.rowNode?.forEach(u=>u.classList.add("active"))),this._options.editable&&t&&this.isCellPotentiallyEditable(this.activeRow,this.activeCell)&&(this._options.asyncEditorLoading?(window.clearTimeout(this.h_editorLoader),this.h_editorLoader=window.setTimeout(()=>{this.makeActiveCellEditable(void 0,n,r)},this._options.asyncEditorLoadDelay)):this.makeActiveCellEditable(void 0,n,r))}else this.activeRow=this.activeCell=null;o||this.trigger(this.onActiveCellChanged,this.getActiveCell())}isCellPotentiallyEditable(e,t){let n=this.getDataLength();return!(e<n&&!this.getDataItem(e)||this.columns[t].cannotTriggerInsert&&e>=n||!this.columns[t]||this.columns[t].hidden||!this.getEditor(e,t))}makeActiveCellNormal(e=!1){if(this.currentEditor){if(this.trigger(this.onBeforeCellEditorDestroy,{editor:this.currentEditor}),this.currentEditor.destroy(),this.currentEditor=null,this.activeCellNode){let t=this.getDataItem(this.activeRow);if(this.activeCellNode.classList.remove("editable"),this.activeCellNode.classList.remove("invalid"),t){let n=this.columns[this.activeCell],o=this.getFormatter(this.activeRow,n)(this.activeRow,this.activeCell,this.getDataItemValueForColumn(t,n),n,t,this);this.applyFormatResultToCellNode(o,this.activeCellNode),this.invalidatePostProcessingResults(this.activeRow)}e&&this.setFocus()}navigator.userAgent.toLowerCase().match(/msie/)&&this.clearTextSelection(),this.getEditorLock()?.deactivate(this.editController)}}editActiveCell(e,t,n){this.makeActiveCellEditable(e,t,n)}makeActiveCellEditable(e,t,n){if(!this.activeCellNode)return;if(!this._options.editable)throw new Error("SlickGrid makeActiveCellEditable : should never get called when this._options.editable is false");if(window.clearTimeout(this.h_editorLoader),!this.isCellPotentiallyEditable(this.activeRow,this.activeCell))return;let o=this.columns[this.activeCell],r=this.getDataItem(this.activeRow);if(this.trigger(this.onBeforeEditCell,{row:this.activeRow,cell:this.activeCell,item:r,column:o,target:"grid"}).getReturnValue()===!1){this.setFocus();return}this.getEditorLock()?.activate(this.editController),this.activeCellNode.classList.add("editable");let i=e||this.getEditor(this.activeRow,this.activeCell);if(!i||typeof i!="function")return;!e&&!i.suppressClearOnEdit&&V.emptyElement(this.activeCellNode);let a=this.getItemMetadaWhenExists(this.activeRow);a=a?.columns;let l=a&&(a[o.id]||a[this.activeCell]),d={grid:this,gridPosition:this.absBox(this._container),position:this.absBox(this.activeCellNode),container:this.activeCellNode,column:o,columnMetaData:l,item:r||{},event:n,commitChanges:this.commitEditAndSetFocus.bind(this),cancelChanges:this.cancelEditAndSetFocus.bind(this)};this.currentEditor=new i(d),r&&this.currentEditor&&(this.currentEditor.loadValue(r),t&&this.currentEditor?.preClick&&this.currentEditor.preClick()),this.serializedEditorValue=this.currentEditor?.serializeValue(),this.currentEditor?.position&&this.handleActiveCellPositionChange()}commitEditAndSetFocus(){this.getEditorLock()?.commitCurrentEdit()&&(this.setFocus(),this._options.autoEdit&&!this._options.autoCommitEdit&&this.navigateDown())}cancelEditAndSetFocus(){this.getEditorLock()?.cancelCurrentEdit()&&this.setFocus()}commitCurrentEdit(){let e=this,t=e.getDataItem(e.activeRow),n=e.columns[e.activeCell];if(e.currentEditor){if(e.currentEditor.isValueChanged()){let o=e.currentEditor.validate();if(o.valid){let r=e.activeRow,i=e.activeCell,a=e.currentEditor,l=e.currentEditor.serializeValue(),d=e.serializedEditorValue;if(e.activeRow<e.getDataLength()){let u={row:r,cell:i,editor:a,serializedValue:l,prevSerializedValue:d,execute:()=>{a.applyValue(t,l),e.updateRow(r),e.trigger(e.onCellChange,{command:"execute",row:r,cell:i,item:t,column:n})},undo:()=>{a.applyValue(t,d),e.updateRow(r),e.trigger(e.onCellChange,{command:"undo",row:r,cell:i,item:t,column:n})}};e._options.editCommandHandler?(e.makeActiveCellNormal(!0),e._options.editCommandHandler(t,n,u)):(u.execute(),e.makeActiveCellNormal(!0))}else{let u={};e.currentEditor.applyValue(u,e.currentEditor.serializeValue()),e.makeActiveCellNormal(!0),e.trigger(e.onAddNewRow,{item:u,column:n})}return!e.getEditorLock()?.isActive()}else return e.activeCellNode&&(e.activeCellNode.classList.remove("invalid"),V.width(e.activeCellNode),e.activeCellNode.classList.add("invalid")),e.trigger(e.onValidationError,{editor:e.currentEditor,cellNode:e.activeCellNode,validationResults:o,row:e.activeRow,cell:e.activeCell,column:n}),e.currentEditor.focus(),!1}e.makeActiveCellNormal(!0)}return!0}cancelCurrentEdit(){return this.makeActiveCellNormal(),!0}getSelectedRows(){if(!this.selectionModel)throw new Error("SlickGrid Selection model is not set");return this.selectedRows.slice(0)}setSelectedRows(e,t){if(!this.selectionModel)throw new Error("SlickGrid Selection model is not set");this&&this.getEditorLock&&!this.getEditorLock()?.isActive()&&this.selectionModel.setSelectedRanges(this.rowsToRanges(e),t||"SlickGrid.setSelectedRows")}trigger(e,t,n){let o=n||new gi(n,t),r=t||{};return r.grid=this,e.notify(r,o,this)}handleCellMouseOut(e){this.trigger(this.onMouseLeave,{},e)}handleHeaderMouseHoverOn(e){e?.target.classList.add("ui-state-hover","slick-state-hover")}handleHeaderMouseHoverOff(e){e?.target.classList.remove("ui-state-hover","slick-state-hover")}handleSelectedRangesChanged(e,t){let n=e.getNativeEvent(),o=this.selectedRows.slice(0);this.selectedRows=[];let r={};for(let i=0;i<t.length;i++)for(let a=t[i].fromRow;a<=t[i].toRow;a++){r[a]||(this.selectedRows.push(a),r[a]={});for(let l=t[i].fromCell;l<=t[i].toCell;l++)this.canCellBeSelected(a,l)&&(r[a][this.columns[l].id]=this._options.selectedCellCssClass)}if(this.setCellCssStyles(this._options.selectedCellCssClass||"",r),this.simpleArrayEquals(o,this.selectedRows)){let i=n?.detail?.caller??"click",a=new Set(this.getSelectedRows()),l=new Set(o),d=Array.from(a).filter(f=>!l.has(f)),u=Array.from(l).filter(f=>!a.has(f));this.trigger(this.onSelectedRowsChanged,{rows:this.getSelectedRows(),previousSelectedRows:o,caller:i,changedSelectedRows:d,changedUnselectedRows:u},e)}}handleMouseWheel(e,t,n,o){this.scrollHeight=this._viewportScrollContainerY.scrollHeight,e.shiftKey?this.scrollLeft=this._viewportScrollContainerX.scrollLeft+n*10:(this.scrollTop=Math.max(0,this._viewportScrollContainerY.scrollTop-o*this._options.rowHeight),this.scrollLeft=this._viewportScrollContainerX.scrollLeft+n*10),this._handleScroll("mousewheel")&&e.stopPropagation()}handleDragInit(e,t){let n=this.getCellFromEvent(e);if(!n||!this.cellExists(n.row,n.cell))return!1;let o=this.trigger(this.onDragInit,t,e);return o.isImmediatePropagationStopped()?o.getReturnValue():!1}handleDragStart(e,t){let n=this.getCellFromEvent(e);if(!n||!this.cellExists(n.row,n.cell))return!1;let o=this.trigger(this.onDragStart,t,e);return o.isImmediatePropagationStopped()?o.getReturnValue():!1}handleDrag(e,t){return this.trigger(this.onDrag,t,e).getReturnValue()}handleDragEnd(e,t){this.trigger(this.onDragEnd,t,e)}handleKeyDown(e){let t=this.trigger(this.onKeyDown,{row:this.activeRow,cell:this.activeCell},e).isImmediatePropagationStopped();if(!t&&!e.shiftKey&&!e.altKey){if(this._options.editable&&this.currentEditor?.keyCaptureList&&this.currentEditor.keyCaptureList.indexOf(e.which)>-1)return;e.ctrlKey&&e.key==="Home"?this.navigateTopStart():e.ctrlKey&&e.key==="End"?this.navigateBottomEnd():e.ctrlKey&&e.key==="ArrowUp"?this.navigateTop():e.ctrlKey&&e.key==="ArrowDown"?this.navigateBottom():e.ctrlKey&&e.key==="ArrowLeft"||!e.ctrlKey&&e.key==="Home"?this.navigateRowStart():(e.ctrlKey&&e.key==="ArrowRight"||!e.ctrlKey&&e.key==="End")&&this.navigateRowEnd()}if(!t)if(!e.shiftKey&&!e.altKey&&!e.ctrlKey){if(this._options.editable&&this.currentEditor?.keyCaptureList&&this.currentEditor.keyCaptureList.indexOf(e.which)>-1)return;if(e.which===wo.ESCAPE){if(!this.getEditorLock()?.isActive())return;this.cancelEditAndSetFocus()}else e.which===wo.PAGE_DOWN?(this.navigatePageDown(),t=!0):e.which===wo.PAGE_UP?(this.navigatePageUp(),t=!0):e.which===wo.LEFT?t=this.navigateLeft():e.which===wo.RIGHT?t=this.navigateRight():e.which===wo.UP?t=this.navigateUp():e.which===wo.DOWN?t=this.navigateDown():e.which===wo.TAB?t=this.navigateNext():e.which===wo.ENTER&&(this._options.editable&&(this.currentEditor?this.activeRow===this.getDataLength()?this.navigateDown():this.commitEditAndSetFocus():this.getEditorLock()?.commitCurrentEdit()&&this.makeActiveCellEditable(void 0,void 0,e)),t=!0)}else e.which===wo.TAB&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&(t=this.navigatePrev());if(t){e.stopPropagation(),e.preventDefault();try{e.originalEvent.keyCode=0}catch{}}}handleClick(e){let t=e instanceof gi?e.getNativeEvent():e;if(!this.currentEditor&&(t.target!==document.activeElement||t.target.classList.contains("slick-cell"))){let o=this.getTextSelection();this.setFocus(),this.setTextSelection(o)}let n=this.getCellFromEvent(t);if(!(!n||this.currentEditor!==null&&this.activeRow===n.row&&this.activeCell===n.cell)&&(e=this.trigger(this.onClick,{row:n.row,cell:n.cell},e||t),!e.isImmediatePropagationStopped()&&this.canCellBeActive(n.row,n.cell)&&(!this.getEditorLock()?.isActive()||this.getEditorLock()?.commitCurrentEdit()))){this.scrollRowIntoView(n.row,!1);let o=t.target?.className===NA,r=this.columns[n.cell],i=!!(this._options.editable&&r?.editor&&this._options.suppressActiveCellChangeOnEdit);this.setActiveCellInternal(this.getCellNode(n.row,n.cell),null,o,i,t)}}handleContextMenu(e){let t=e.target.closest(".slick-cell");t&&(this.activeCellNode===t&&this.currentEditor!==null||this.trigger(this.onContextMenu,{},e))}handleDblClick(e){let t=this.getCellFromEvent(e);!t||this.currentEditor!==null&&this.activeRow===t.row&&this.activeCell===t.cell||(this.trigger(this.onDblClick,{row:t.row,cell:t.cell},e),!e.defaultPrevented&&this._options.editable&&this.gotoCell(t.row,t.cell,!0,e))}handleHeaderMouseEnter(e){let t=V.storage.get(e.target.closest(".slick-header-column"),"column");t&&this.trigger(this.onHeaderMouseEnter,{column:t,grid:this},e)}handleHeaderMouseLeave(e){let t=V.storage.get(e.target.closest(".slick-header-column"),"column");t&&this.trigger(this.onHeaderMouseLeave,{column:t,grid:this},e)}handleHeaderRowMouseEnter(e){let t=V.storage.get(e.target.closest(".slick-headerrow-column"),"column");t&&this.trigger(this.onHeaderRowMouseEnter,{column:t,grid:this},e)}handleHeaderRowMouseLeave(e){let t=V.storage.get(e.target.closest(".slick-headerrow-column"),"column");t&&this.trigger(this.onHeaderRowMouseLeave,{column:t,grid:this},e)}handleHeaderContextMenu(e){let t=e.target.closest(".slick-header-column"),n=t&&V.storage.get(t,"column");this.trigger(this.onHeaderContextMenu,{column:n},e)}handleHeaderClick(e){if(!this.columnResizeDragging){let t=e.target.closest(".slick-header-column"),n=t&&V.storage.get(t,"column");n&&this.trigger(this.onHeaderClick,{column:n},e)}}handlePreHeaderContextMenu(e){this.trigger(this.onPreHeaderContextMenu,{node:e.target},e)}handlePreHeaderClick(e){this.columnResizeDragging||this.trigger(this.onPreHeaderClick,{node:e.target},e)}handleFooterContextMenu(e){let t=e.target.closest(".slick-footerrow-column"),n=t&&V.storage.get(t,"column");this.trigger(this.onFooterContextMenu,{column:n},e)}handleFooterClick(e){let t=e.target.closest(".slick-footerrow-column"),n=t&&V.storage.get(t,"column");this.trigger(this.onFooterClick,{column:n},e)}handleCellMouseOver(e){this.trigger(this.onMouseEnter,{},e)}handleActiveCellPositionChange(){if(this.activeCellNode&&(this.trigger(this.onActiveCellPositionChanged,{}),this.currentEditor)){let e=this.getActiveCellPosition();this.currentEditor.show&&this.currentEditor.hide&&(e.visible?this.currentEditor.show():this.currentEditor.hide()),this.currentEditor.position&&this.currentEditor.position(e)}}actionThrottle(e,t){let n=!1,o=!1,r=()=>{n?o=!0:a()},i=()=>{o=!1},a=()=>{n=!0,window.clearTimeout(this._executionBlockTimer),this._executionBlockTimer=window.setTimeout(l,t),e.call(this)},l=()=>{o?(i(),a()):n=!1};return{enqueue:r.bind(this),dequeue:i.bind(this)}}getCellFromEvent(e){let t=e instanceof gi?e.getNativeEvent():e,n=t.touches?t.touches[0]:t,o=t.target.closest(".slick-cell");if(!o)return null;let r=this.getRowFromNode(o.parentNode);if(this.hasFrozenRows){let a=0,l=V.offset(V.parents(o,".grid-canvas")[0]);V.parents(o,".grid-canvas-bottom").length&&(a=this._options.frozenBottom?V.height(this._canvasTopL):this.frozenRowsHeight),r=this.getCellFromPoint(n.clientX-l.left,n.clientY-l.top+a+document.documentElement.scrollTop).row}let i=this.getCellFromNode(o);return!V.isDefined(r)||!V.isDefined(i)?null:{row:r,cell:i}}applyHtmlCode(e,t,n){if(e)if(t instanceof HTMLElement||t instanceof DocumentFragment)n?.emptyTarget!==!1&&V.emptyElement(e),e.appendChild(t);else{if(n?.skipEmptyReassignment!==!1&&!V.isDefined(t)&&!e.innerHTML)return;let o=t;typeof o=="number"||typeof o=="boolean"?e.textContent=o:(o=this.sanitizeHtmlString(t),this._options.enableHtmlRendering&&o?e.innerHTML=o:e.textContent=o)}}getCanvasNode(e,t){return this._getContainerElement(this.getCanvases(),e,t)}getActiveCanvasNode(e){return e===void 0?this._activeCanvasNode:(e instanceof gi&&(e=e.getNativeEvent()),this._activeCanvasNode=e?.target.closest(".grid-canvas"),this._activeCanvasNode)}getCanvases(){return this._canvas}getViewportNode(e,t){return this._getContainerElement(this.getViewports(),e,t)}getViewports(){return this._viewport}getActiveViewportNode(e){return this.setActiveViewportNode(e),this._activeViewportNode}setActiveViewportNode(e){return e instanceof gi&&(e=e.getNativeEvent()),this._activeViewportNode=e?.target.closest(".slick-viewport"),this._activeViewportNode}getHeadersWidth(){this.headersWidth=this.headersWidthL=this.headersWidthR=0;let e=!this._options.autoHeight,t=0,n=this.columns.length;for(t=0;t<n;t++){if(!this.columns[t]||this.columns[t].hidden)continue;let o=this.columns[t].width;this._options.frozenColumn>-1&&t>this._options.frozenColumn?this.headersWidthR+=o||0:this.headersWidthL+=o||0}return e&&(this._options.frozenColumn>-1&&t>this._options.frozenColumn?this.headersWidthR+=this.scrollbarDimensions?.width??0:this.headersWidthL+=this.scrollbarDimensions?.width??0),this.hasFrozenColumns()?(this.headersWidthL=this.headersWidthL+1e3,this.headersWidthR=Math.max(this.headersWidthR,this.viewportW)+this.headersWidthL,this.headersWidthR+=this.scrollbarDimensions?.width??0):(this.headersWidthL+=this.scrollbarDimensions?.width??0,this.headersWidthL=Math.max(this.headersWidthL,this.viewportW)+1e3),this.headersWidth=this.headersWidthL+this.headersWidthR,Math.max(this.headersWidth,this.viewportW)+1e3}getCanvasWidth(){let e=this.getViewportInnerWidth(),t=this.columns.length;for(this.canvasWidthL=this.canvasWidthR=0;t--;)!this.columns[t]||this.columns[t].hidden||(this.hasFrozenColumns()&&t>this._options.frozenColumn?this.canvasWidthR+=this.columns[t].width||0:this.canvasWidthL+=this.columns[t].width||0);let n=this.canvasWidthL+this.canvasWidthR;if(this._options.fullWidthRows){let o=Math.max(n,e)-n;o>0&&(n+=o,this.hasFrozenColumns()?this.canvasWidthR+=o:this.canvasWidthL+=o)}return n}updateCanvasWidth(e){let t=this.canvasWidth,n=this.canvasWidthL,o=this.canvasWidthR;this.canvasWidth=this.getCanvasWidth(),this._options.createTopHeaderPanel&&V.width(this._topHeaderPanel,this._options.topHeaderPanelWidth??this.canvasWidth);let r=this.canvasWidth!==t||this.canvasWidthL!==n||this.canvasWidthR!==o;if(r||this.hasFrozenColumns()||this.hasFrozenRows)if(V.width(this._canvasTopL,this.canvasWidthL),this.getHeadersWidth(),V.width(this._headerL,this.headersWidthL),V.width(this._headerR,this.headersWidthR),this.hasFrozenColumns()){let i=V.width(this._container)||0;if(i>0&&this.canvasWidthL>i&&this._options.throwWhenFrozenNotAllViewable)throw new Error("[SlickGrid] Frozen columns cannot be wider than the actual grid container width. Make sure to have less columns freezed or make your grid container wider");V.width(this._canvasTopR,this.canvasWidthR),V.width(this._paneHeaderL,this.canvasWidthL),V.setStyleSize(this._paneHeaderR,"left",this.canvasWidthL),V.setStyleSize(this._paneHeaderR,"width",this.viewportW-this.canvasWidthL),V.width(this._paneTopL,this.canvasWidthL),V.setStyleSize(this._paneTopR,"left",this.canvasWidthL),V.width(this._paneTopR,this.viewportW-this.canvasWidthL),V.width(this._headerRowScrollerL,this.canvasWidthL),V.width(this._headerRowScrollerR,this.viewportW-this.canvasWidthL),V.width(this._headerRowL,this.canvasWidthL),V.width(this._headerRowR,this.canvasWidthR),this._options.createFooterRow&&(V.width(this._footerRowScrollerL,this.canvasWidthL),V.width(this._footerRowScrollerR,this.viewportW-this.canvasWidthL),V.width(this._footerRowL,this.canvasWidthL),V.width(this._footerRowR,this.canvasWidthR)),this._options.createPreHeaderPanel&&V.width(this._preHeaderPanel,this._options.preHeaderPanelWidth??this.canvasWidth),V.width(this._viewportTopL,this.canvasWidthL),V.width(this._viewportTopR,this.viewportW-this.canvasWidthL),this.hasFrozenRows&&(V.width(this._paneBottomL,this.canvasWidthL),V.setStyleSize(this._paneBottomR,"left",this.canvasWidthL),V.width(this._viewportBottomL,this.canvasWidthL),V.width(this._viewportBottomR,this.viewportW-this.canvasWidthL),V.width(this._canvasBottomL,this.canvasWidthL),V.width(this._canvasBottomR,this.canvasWidthR))}else V.width(this._paneHeaderL,"100%"),V.width(this._paneTopL,"100%"),V.width(this._headerRowScrollerL,"100%"),V.width(this._headerRowL,this.canvasWidth),this._options.createFooterRow&&(V.width(this._footerRowScrollerL,"100%"),V.width(this._footerRowL,this.canvasWidth)),this._options.createPreHeaderPanel&&V.width(this._preHeaderPanel,this._options.preHeaderPanelWidth??this.canvasWidth),V.width(this._viewportTopL,"100%"),this.hasFrozenRows&&(V.width(this._viewportBottomL,"100%"),V.width(this._canvasBottomL,this.canvasWidthL));this.viewportHasHScroll=this.canvasWidth>=this.viewportW-(this.scrollbarDimensions?.width??0),V.width(this._headerRowSpacerL,this.canvasWidth+(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0)),V.width(this._headerRowSpacerR,this.canvasWidth+(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0)),this._options.createFooterRow&&(V.width(this._footerRowSpacerL,this.canvasWidth+(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0)),V.width(this._footerRowSpacerR,this.canvasWidth+(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0))),(r||e)&&this.applyColumnWidths()}getPreHeaderPanel(){return this._preHeaderPanel}getPreHeaderPanelLeft(){return this._preHeaderPanel}getPreHeaderPanelRight(){return this._preHeaderPanelR}getTopHeaderPanel(){return this._topHeaderPanel}setPaneVisibility(){this.hasFrozenColumns()?(V.show(this._paneHeaderR),V.show(this._paneTopR),this.hasFrozenRows?(V.show(this._paneBottomL),V.show(this._paneBottomR)):(V.hide(this._paneBottomR),V.hide(this._paneBottomL))):(V.hide(this._paneHeaderR),V.hide(this._paneTopR),V.hide(this._paneBottomR),this.hasFrozenRows?V.show(this._paneBottomL):(V.hide(this._paneBottomR),V.hide(this._paneBottomL)))}setOverflow(){if(this._viewportTopL.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"scroll":this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"auto",this._viewportTopL.style.overflowY=!this.hasFrozenColumns()&&this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?(this.hasFrozenRows,"hidden"):this.hasFrozenRows?"scroll":"auto",this._viewportTopR.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"scroll":this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"auto",this._viewportTopR.style.overflowY=this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?this.hasFrozenRows?"scroll":"auto":this.hasFrozenRows?"scroll":"auto",this._viewportBottomL.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"scroll":"auto":(this.hasFrozenRows&&this._options.alwaysAllowHorizontalScroll,"auto"),this._viewportBottomL.style.overflowY=!this.hasFrozenColumns()&&this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?(this.hasFrozenRows,"hidden"):this.hasFrozenRows?"scroll":"auto",this._viewportBottomR.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"scroll":"auto":(this.hasFrozenRows&&this._options.alwaysAllowHorizontalScroll,"auto"),this._viewportBottomR.style.overflowY=this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?(this.hasFrozenRows,"auto"):(this.hasFrozenRows,"auto"),this._options.viewportClass){let e=V.classNameToList(this._options.viewportClass);this._viewportTopL.classList.add(...e),this._viewportTopR.classList.add(...e),this._viewportBottomL.classList.add(...e),this._viewportBottomR.classList.add(...e)}}createCssRules(){this._style=document.createElement("style"),this._style.nonce=this._options.nonce||"",(this._options.shadowRoot||document.head).appendChild(this._style);let e=this._options.rowHeight-this.cellHeightDiff,t=[`.${this.uid} .slick-group-header-column { left: 1000px; }`,`.${this.uid} .slick-header-column { left: 1000px; }`,`.${this.uid} .slick-top-panel { height: ${this._options.topPanelHeight}px; }`,`.${this.uid} .slick-preheader-panel { height: ${this._options.preHeaderPanelHeight}px; }`,`.${this.uid} .slick-topheader-panel { height: ${this._options.topHeaderPanelHeight}px; }`,`.${this.uid} .slick-headerrow-columns { height: ${this._options.headerRowHeight}px; }`,`.${this.uid} .slick-footerrow-columns { height: ${this._options.footerRowHeight}px; }`,`.${this.uid} .slick-cell { height: ${e}px; }`,`.${this.uid} .slick-row { height: ${this._options.rowHeight}px; }`],n=this._style.sheet;if(n){t.forEach(o=>{n.insertRule(o)});for(let o=0;o<this.columns.length;o++)!this.columns[o]||this.columns[o].hidden||(n.insertRule(`.${this.uid} .l${o} { }`),n.insertRule(`.${this.uid} .r${o} { }`))}else this.createCssRulesAlternative(t)}createCssRulesAlternative(e){let t=document.createElement("template");t.innerHTML='<style type="text/css" rel="stylesheet" />',this._style=t.content.firstChild,(this._options.shadowRoot||document.head).appendChild(this._style);for(let n=0;n<this.columns.length;n++)!this.columns[n]||this.columns[n].hidden||(e.push(`.${this.uid} .l${n} { }`),e.push(`.${this.uid} .r${n} { }`));this._style.styleSheet?this._style.styleSheet.cssText=e.join(" "):this._style.appendChild(document.createTextNode(e.join(" ")))}getColumnCssRules(e){let t;if(!this.stylesheet){let n=(this._options.shadowRoot||document).styleSheets;for(this._options.devMode&&typeof this._options.devMode?.ownerNodeIndex=="number"&&this._options.devMode.ownerNodeIndex>=0&&(n[this._options.devMode.ownerNodeIndex].ownerNode=this._style),t=0;t<n.length;t++)if((n[t].ownerNode||n[t].owningElement)===this._style){this.stylesheet=n[t];break}if(!this.stylesheet)throw new Error("SlickGrid Cannot find stylesheet.");this.columnCssRulesL=[],this.columnCssRulesR=[];let o=this.stylesheet.cssRules||this.stylesheet.rules,r,i;for(t=0;t<o.length;t++){let a=o[t].selectorText;(r=/\.l\d+/.exec(a))?(i=parseInt(r[0].substr(2,r[0].length-2),10),this.columnCssRulesL[i]=o[t]):(r=/\.r\d+/.exec(a))&&(i=parseInt(r[0].substr(2,r[0].length-2),10),this.columnCssRulesR[i]=o[t])}}return{left:this.columnCssRulesL[e],right:this.columnCssRulesR[e]}}removeCssRules(){this._style?.remove(),this.stylesheet=null}getTopPanel(){return this._topPanels[0]}getTopPanels(){return this._topPanels}togglePanelVisibility(e,t,n,o){let r=o!==!1;if(this._options[e]!==n)if(this._options[e]=n,n){if(r){V.slideDown(t,this.resizeCanvas.bind(this));return}V.show(t),this.resizeCanvas()}else{if(r){V.slideUp(t,this.resizeCanvas.bind(this));return}V.hide(t),this.resizeCanvas()}}setTopPanelVisibility(e,t){this.togglePanelVisibility("showTopPanel",this._topPanelScrollers,e,t)}setHeaderRowVisibility(e,t){this.togglePanelVisibility("showHeaderRow",this._headerRowScroller,e,t)}setColumnHeaderVisibility(e,t){this.togglePanelVisibility("showColumnHeader",this._headerScroller,e,t)}setFooterRowVisibility(e,t){this.togglePanelVisibility("showFooterRow",this._footerRowScroller,e,t)}setPreHeaderPanelVisibility(e,t){this.togglePanelVisibility("showPreHeaderPanel",[this._preHeaderPanelScroller,this._preHeaderPanelScrollerR],e,t)}setTopHeaderPanelVisibility(e){this.togglePanelVisibility("showTopHeaderPanel",this._topHeaderPanelScroller,e)}getRowHeight(){return this._options.rowHeight}getRowTop(e){return Math.round(this._options.rowHeight*e-this.offset)}getRowBottom(e){return this.getRowTop(e)+this._options.rowHeight}getRowFromPosition(e){return Math.floor((e+this.offset)/this._options.rowHeight)}appendRowHtml(e,t,n,o,r){let i=this.getDataItem(n),a=n<r&&!i,l="slick-row"+(this.hasFrozenRows&&n<=this._options.frozenRow?" frozen":"")+(a?" loading":"")+(n===this.activeRow&&this._options.showCellSelection?" active":"")+(n%2===1?" odd":" even");i||(l+=` ${this._options.addNewRowCssClass}`);let d=this.getItemMetadaWhenExists(n);d?.cssClasses&&(l+=` ${d.cssClasses}`);let u=V.createDomElement("div",{className:`ui-widget-content ${l}`,role:"row",dataset:{row:`${n}`}}),f=this.getFrozenRowOffset(n),p=this.getRowTop(n)-f;this._options.rowTopOffsetRenderType==="transform"?u.style.transform=`translateY(${p}px)`:u.style.top=`${p}px`;let y;e.push(u),this.hasFrozenColumns()&&(y=u.cloneNode(!0),t.push(y));let w=this.columns.length,b,m,v,D,k=!0;for(let x=0,S=w;x<S;x++){if(k=!0,D=this.columns[x],!D||D.hidden)continue;m=1,v=1,b=null,d?.columns&&(b=d.columns[D.id]||d.columns[x],m=b?.colspan||1,v=b?.rowspan||1,m==="*"&&(m=S-x),v>r-n&&(v=r-n)),!this._options.enableCellRowSpan&&v>1&&console.warn('[SlickGrid] Cell "rowspan" is an opt-in grid option because of its small perf hit, you must enable it via the "enableCellRowSpan" grid option.');let C=m;if(!this.getParentRowSpanByCell(n,x)){if(this.columnPosRight[Math.min(S-1,x+C-1)]>o.leftPx){if(!D.alwaysRenderColumn&&this.columnPosLeft[x]>o.rightPx&&(k=!1),k){let O=this.hasFrozenColumns()&&x>this._options.frozenColumn?y:u;this.appendCellHtml(O,n,x,C,v,b,i)}}else(D.alwaysRenderColumn||this.hasFrozenColumns()&&x<=this._options.frozenColumn)&&this.appendCellHtml(u,n,x,C,v,b,i);C>1&&(x+=C-1)}}}appendCellHtml(e,t,n,o,r,i,a){let l=this.columns[n],d=`slick-cell l${n} r${Math.min(this.columns.length-1,n+o-1)}`+(l.cssClass?` ${l.cssClass}`:"")+(r>1?" rowspan":"")+(i?.cssClass?` ${i.cssClass}`:"");this.hasFrozenColumns()&&n<=this._options.frozenColumn&&(d+=" frozen"),t===this.activeRow&&n===this.activeCell&&this._options.showCellSelection&&(d+=" active"),Object.keys(this.cellCssClasses).forEach(v=>{this.cellCssClasses[v][t]?.[l.id]&&(d+=` ${this.cellCssClasses[v][t][l.id]}`)});let u=null,f="";a&&(u=this.getDataItemValueForColumn(a,l),f=this.getFormatter(t,l)(t,n,u,l,a,this),f==null&&(f=""));let p=this.trigger(this.onBeforeAppendCell,{row:t,cell:n,value:u,dataContext:a}).getReturnValue(),y=typeof p=="string"?p:"";f?.addClasses&&(y+=V.classNameToList((y?" ":"")+f.addClasses).join(" "));let w=f?.toolTip?`${f.toolTip}`:"",b=V.createDomElement("div",{className:V.classNameToList(`${d} ${y||""}`).join(" "),role:"gridcell",tabIndex:-1});b.setAttribute("aria-describedby",this.uid+l.id),w&&b.setAttribute("title",w);let m=this.getCellHeight(t,r);if(r>1&&m!==this._options.rowHeight-this.cellHeightDiff&&(b.style.height=`${m||0}px`),l.hasOwnProperty("cellAttrs")&&l.cellAttrs instanceof Object&&Object.keys(l.cellAttrs).forEach(v=>{l.cellAttrs.hasOwnProperty(v)&&b.setAttribute(v,l.cellAttrs[v])}),a){let v=Object.prototype.toString.call(f)!=="[object Object]"?f:f.html||f.text;this.applyHtmlCode(b,v)}e.appendChild(b),f.insertElementAfterTarget&&V.insertAfterElement(b,f.insertElementAfterTarget),this.rowsCache[t].cellRenderQueue.push(n),this.rowsCache[t].cellColSpans[n]=o}cleanupRows(e){let t=new Set;if(this._options.enableCellRowSpan)for(let n=e.top,o=e.bottom;n<=o;n++){let r=this.getRowSpanIntersect(n);r!==null&&t.add(r)}Object.keys(this.rowsCache).forEach(n=>{if(this.rowsCache){let o=+n,r=!0;this.hasFrozenRows&&(this._options.frozenBottom&&o>=this.actualFrozenRow||!this._options.frozenBottom&&o<=this.actualFrozenRow)&&(r=!1),(o=parseInt(n,10))!==this.activeRow&&(o<e.top||o>e.bottom)&&r&&!t.has(o)&&this.removeRowFromCache(o)}}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup()}invalidate(){this.updateRowCount(),this.invalidateAllRows(),this.render()}invalidateAllRows(){this.currentEditor&&this.makeActiveCellNormal(),typeof this.rowsCache=="object"&&Object.keys(this.rowsCache).forEach(e=>{this.rowsCache&&this.removeRowFromCache(+e)}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup()}invalidateRows(e){if(!e||!e.length)return;let t;this.vScrollDir=0;let n=e.length,o=new Set,r=new Set,i=e.length>this._options.maxPartialRowSpanRemap||e.length===this.getDataLength()||this._prevInvalidatedRowsCount+e.length===this.getDataLength();for(let a=0;a<n;a++)if(t=e[a],this.currentEditor&&this.activeRow===t&&this.makeActiveCellNormal(),this.rowsCache[t]&&this.removeRowFromCache(t),this._options.enableCellRowSpan&&!i){o.add(t);let l=this.getRowSpanIntersect(t);l!==null&&o.add(l)}if(this._options.enableCellRowSpan&&!i){for(let a of Array.from(o)){let l=this.getRowSpanColumnIntersects(a);for(let d of l){let u=this.getParentRowSpanByCell(a,d);u&&this._colsWithRowSpanCache[d]&&(this._colsWithRowSpanCache[d].delete(u.range),r.add(u.range.split(":").map(Number)[0]))}}for(let a of Array.from(r))this.remapRowSpanMetadataByRow(a)}this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup(),this._prevInvalidatedRowsCount=e.length}invalidateRow(e){if(e>=0){let t=[e];if(this._options.enableCellRowSpan){let n=this.getRowSpanIntersect(e);n!==null&&t.push(n)}this.invalidateRows(t)}}removeRowFromCache(e){let t=this.rowsCache[e];t?.rowNode&&(this.trigger(this.onBeforeRemoveCachedRow,{row:e}),this._options.enableAsyncPostRenderCleanup&&this.postProcessedRows[e]?this.queuePostProcessedRowForCleanup(t,this.postProcessedRows[e],e):t.rowNode?.forEach(n=>n.parentElement?.removeChild(n)),delete this.rowsCache[e],delete this.postProcessedRows[e],this.renderedRows--,this.counter_rows_removed++)}updateCell(e,t){let n=this.getCellNode(e,t);if(!n)return;let o=this.columns[t],r=this.getDataItem(e);if(this.currentEditor&&this.activeRow===e&&this.activeCell===t)this.currentEditor.loadValue(r);else{let i=r?this.getFormatter(e,o)(e,t,this.getDataItemValueForColumn(r,o),o,r,this):"";this.applyFormatResultToCellNode(i,n),this.invalidatePostProcessingResults(e)}}updateRow(e){let t=this.rowsCache[e];if(!t)return;this.ensureCellNodesInRowsCache(e);let n,o=this.getDataItem(e);Object.keys(t.cellNodesByColumnIdx).forEach(r=>{if(!t.cellNodesByColumnIdx.hasOwnProperty(r))return;let i=+r,a=this.columns[i],l=t.cellNodesByColumnIdx[i];e===this.activeRow&&i===this.activeCell&&this.currentEditor?this.currentEditor.loadValue(o):o?(n=this.getFormatter(e,a)(e,i,this.getDataItemValueForColumn(o,a),a,o,this),this.applyFormatResultToCellNode(n,l)):V.emptyElement(l)}),this.invalidatePostProcessingResults(e)}getViewportRowCount(){let e=this.getViewportHeight(),t=this.getScrollbarDimensions()?.height??0;return Math.floor((e-t)/this._options.rowHeight)}getViewportHeight(){if((!this._options.autoHeight||this._options.frozenColumn!==-1)&&(this.topPanelH=this._options.showTopPanel?this._options.topPanelHeight+this.getVBoxDelta(this._topPanelScrollers[0]):0,this.headerRowH=this._options.showHeaderRow?this._options.headerRowHeight+this.getVBoxDelta(this._headerRowScroller[0]):0,this.footerRowH=this._options.showFooterRow?this._options.footerRowHeight+this.getVBoxDelta(this._footerRowScroller[0]):0),this._options.autoHeight){let e=this._paneHeaderL.offsetHeight;e+=this._options.showPreHeaderPanel?this._options.preHeaderPanelHeight+this.getVBoxDelta(this._preHeaderPanelScroller):0,e+=this._options.showHeaderRow?this._options.headerRowHeight+this.getVBoxDelta(this._headerRowScroller[0]):0,e+=this._options.showFooterRow?this._options.footerRowHeight+this.getVBoxDelta(this._footerRowScroller[0]):0,e+=this.getCanvasWidth()>this.viewportW?this.scrollbarDimensions?.height??0:0,this.viewportH=this._options.rowHeight*this.getDataLengthIncludingAddNew()+(this._options.frozenColumn===-1?e:0)}else{let e=getComputedStyle(this._container),t=e.boxSizing!=="content-box"?this.getVBoxDelta(this._container):0,n=this._options.createTopHeaderPanel&&this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight+this.getVBoxDelta(this._topHeaderPanelScroller):0,o=this._options.createPreHeaderPanel&&this._options.showPreHeaderPanel?this._options.preHeaderPanelHeight+this.getVBoxDelta(this._preHeaderPanelScroller):0,r=this._options.showColumnHeader?V.toFloat(V.height(this._headerScroller[0])):0;this.viewportH=V.toFloat(e.height)-V.toFloat(e.paddingTop)-V.toFloat(e.paddingBottom)-this.topPanelH-n-o-this.headerRowH-r-this.footerRowH-t}return this.numVisibleRows=Math.ceil(this.viewportH/this._options.rowHeight),this.viewportH}getViewportInnerWidth(){return this.viewportHasVScroll?this.viewportW-(this.scrollbarDimensions?.width||0):this.viewportW}getViewportWidth(){return this.viewportW=parseFloat(V.innerSize(this._container,"width"))||this._options.devMode&&this._options.devMode.containerClientWidth||0,this.viewportW}resizeCanvas(){if(!this.initialized)return;if(this.paneTopH=0,this.paneBottomH=0,this.viewportTopH=0,this.viewportBottomH=0,this.getViewportWidth(),this.getViewportHeight(),this.hasFrozenRows?this._options.frozenBottom?(this.paneTopH=this.viewportH-this.frozenRowsHeight-(this.scrollbarDimensions?.height??0),this.paneBottomH=this.frozenRowsHeight+(this.scrollbarDimensions?.height??0)):(this.paneTopH=this.frozenRowsHeight,this.paneBottomH=this.viewportH-this.frozenRowsHeight):this.paneTopH=this.viewportH,this.paneTopH+=this.topPanelH+this.headerRowH+this.footerRowH,this.hasFrozenColumns()&&this._options.autoHeight&&(this.paneTopH+=this.scrollbarDimensions?.height??0),this.viewportTopH=this.paneTopH-this.topPanelH-this.headerRowH-this.footerRowH,this._options.autoHeight){if(this.hasFrozenColumns()){let n=this.paneTopH+this._headerScrollerL.offsetHeight;n+=this.getVBoxDelta(this._container),this._options.showPreHeaderPanel&&(n+=this._options.preHeaderPanelHeight),V.height(this._container,n)}this._paneTopL.style.position="relative"}let e=V.height(this._paneHeaderL);e?e+=this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight:0:e=(this._options.showHeaderRow?this._options.headerRowHeight:0)+(this._options.showPreHeaderPanel?this._options.preHeaderPanelHeight:0),V.setStyleSize(this._paneTopL,"top",e||e),V.height(this._paneTopL,this.paneTopH);let t=this._paneTopL.offsetTop+this.paneTopH;if(this._options.autoHeight||V.height(this._viewportTopL,this.viewportTopH),this.hasFrozenColumns()){let n=V.height(this._paneHeaderL);n&&(n+=this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight:0),V.setStyleSize(this._paneTopR,"top",n),V.height(this._paneTopR,this.paneTopH),V.height(this._viewportTopR,this.viewportTopH),this.hasFrozenRows&&(V.setStyleSize(this._paneBottomL,"top",t),V.height(this._paneBottomL,this.paneBottomH),V.setStyleSize(this._paneBottomR,"top",t),V.height(this._paneBottomR,this.paneBottomH),V.height(this._viewportBottomR,this.paneBottomH))}else this.hasFrozenRows&&(V.width(this._paneBottomL,"100%"),V.height(this._paneBottomL,this.paneBottomH),V.setStyleSize(this._paneBottomL,"top",t));this.hasFrozenRows?(V.height(this._viewportBottomL,this.paneBottomH),this._options.frozenBottom?(V.height(this._canvasBottomL,this.frozenRowsHeight),this.hasFrozenColumns()&&V.height(this._canvasBottomR,this.frozenRowsHeight)):(V.height(this._canvasTopL,this.frozenRowsHeight),this.hasFrozenColumns()&&V.height(this._canvasTopR,this.frozenRowsHeight))):V.height(this._viewportTopR,this.viewportTopH),(!this.scrollbarDimensions||!this.scrollbarDimensions.width)&&(this.scrollbarDimensions=this.measureScrollbar()),this._options.autosizeColsMode===En.LegacyForceFit&&this.autosizeColumns(),this.updateRowCount(),this.handleScroll(),this.lastRenderedScrollLeft=-1,this.render()}updateRowCount(){if(!this.initialized)return;let e=this.getDataLength();e>0&&e!==this._prevDataLength&&(this._rowSpanIsCached=!1),this._options.enableCellRowSpan&&!this._rowSpanIsCached&&this.remapAllColumnsRowSpan(),this._prevDataLength=e;let t=this.getDataLengthIncludingAddNew(),n=0,o=this.hasFrozenRows&&!this._options.frozenBottom?V.height(this._canvasBottomL):V.height(this._canvasTopL);this.hasFrozenRows?n=this.getDataLength()-this._options.frozenRow:n=t+(this._options.leaveSpaceForNewRows?this.numVisibleRows-1:0);let r=V.height(this._viewportScrollContainerY),i=this.viewportHasVScroll;this.viewportHasVScroll=this._options.alwaysShowVerticalScroll||!this._options.autoHeight&&n*this._options.rowHeight>r,this.makeActiveCellNormal();let a=e-1;typeof this.rowsCache=="object"&&Object.keys(this.rowsCache).forEach(d=>{let u=+d;u>a&&this.removeRowFromCache(u)}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup(),this.activeCellNode&&this.activeRow>a&&this.resetActiveCell(),o=this.h,this._options.autoHeight?this.h=this._options.rowHeight*n:(this.th=Math.max(this._options.rowHeight*n,r-(this.scrollbarDimensions?.height??0)),this.th<this.maxSupportedCssHeight?(this.h=this.ph=this.th,this.n=1,this.cj=0):(this.h=this.maxSupportedCssHeight,this.ph=this.h/100,this.n=Math.floor(this.th/this.ph),this.cj=(this.th-this.h)/(this.n-1))),(this.h!==o||this.enforceFrozenRowHeightRecalc)&&(this.hasFrozenRows&&!this._options.frozenBottom?(V.height(this._canvasBottomL,this.h),this.hasFrozenColumns()&&V.height(this._canvasBottomR,this.h)):(V.height(this._canvasTopL,this.h),V.height(this._canvasTopR,this.h)),this.scrollTop=this._viewportScrollContainerY.scrollTop,this.scrollHeight=this._viewportScrollContainerY.scrollHeight,this.enforceFrozenRowHeightRecalc=!1);let l=this.scrollTop+this.offset<=this.th-r;this.th===0||this.scrollTop===0?this.page=this.offset=0:l?this.scrollTo(this.scrollTop+this.offset):this.scrollTo(this.th-r+(this.scrollbarDimensions?.height??0)),this.h!==o&&this._options.autoHeight&&this.resizeCanvas(),this._options.autosizeColsMode===En.LegacyForceFit&&i!==this.viewportHasVScroll&&this.autosizeColumns(),this.updateCanvasWidth(!1)}getViewport(e,t){return this.getVisibleRange(e,t)}getVisibleRange(e,t){return e??(e=this.scrollTop),t??(t=this.scrollLeft),{top:this.getRowFromPosition(e),bottom:this.getRowFromPosition(e+this.viewportH)+1,leftPx:t,rightPx:t+this.viewportW}}getRenderedRange(e,t){let n=this.getVisibleRange(e,t),o=Math.round(this.viewportH/this._options.rowHeight),r=this._options.minRowBuffer;return this.vScrollDir===-1?(n.top-=o,n.bottom+=r):this.vScrollDir===1?(n.top-=r,n.bottom+=o):(n.top-=r,n.bottom+=r),n.top=Math.max(0,n.top),n.bottom=Math.min(this.getDataLengthIncludingAddNew()-1,n.bottom),n.leftPx-=this.viewportW,n.rightPx+=this.viewportW,n.leftPx=Math.max(0,n.leftPx),n.rightPx=Math.min(this.canvasWidth,n.rightPx),n}getRowCache(){return this.rowsCache}ensureCellNodesInRowsCache(e){let t=this.rowsCache[e];if(t?.cellRenderQueue.length&&t.rowNode?.length){let n=t.rowNode,o=Array.from(n[0].children);n.length>1&&(o=o.concat(Array.from(n[1].children)));let r=o.length-1;for(;t.cellRenderQueue.length;){let i=t.cellRenderQueue.pop();t.cellNodesByColumnIdx[i]=o[r--]}}}cleanUpCells(e,t){if(this.hasFrozenRows&&(this._options.frozenBottom&&t>this.actualFrozenRow||t<=this.actualFrozenRow))return;let n=this.rowsCache[t],o=[];Object.keys(n.cellNodesByColumnIdx).forEach(a=>{if(!n.cellNodesByColumnIdx.hasOwnProperty(a))return;let l=+a;if(l<=this._options.frozenColumn||Array.isArray(this.columns)&&this.columns[l]?.alwaysRenderColumn)return;let d=n.cellColSpans[l];(this.columnPosLeft[l]>e.rightPx||this.columnPosRight[Math.min(this.columns.length-1,(l||0)+d-1)]<e.leftPx)&&(t===this.activeRow&&Number(l)===this.activeCell||o.push(l))});let r,i;for(;V.isDefined(r=o.pop());)i=n.cellNodesByColumnIdx[r],this._options.enableAsyncPostRenderCleanup&&this.postProcessedRows[t]?.[r]?this.queuePostProcessedCellForCleanup(i,r,t):i.parentElement?.removeChild(i),delete n.cellColSpans[r],delete n.cellNodesByColumnIdx[r],this.postProcessedRows[t]&&delete this.postProcessedRows[t][r]}cleanUpAndRenderCells(e){let t,n=document.createElement("div"),o=[],r,i,a,l=this.columns.length;for(let f=e.top,p=e.bottom;f<=p;f++){if(t=this.rowsCache[f],!t)continue;this.ensureCellNodesInRowsCache(f),(!this._options.enableCellRowSpan||this.getRowSpanIntersect(f)===null)&&this.cleanUpCells(e,f),r=0;let y=this.getItemMetadaWhenExists(f);y=y?.columns;let w=this.getDataItem(f);for(let b=0,m=l;b<m;b++){if(!this.columns[b]||this.columns[b].hidden)continue;if(this.columnPosLeft[b]>e.rightPx)break;if(V.isDefined(i=t.cellColSpans[b])){b+=i>1?i-1:0;continue}i=1,a=null,y&&(a=y[this.columns[b].id]||y[b],i=a?.colspan??1,i==="*"&&(i=m-b));let v=i;if(!this.getParentRowSpanByCell(f,b)){if(this.columnPosRight[Math.min(m-1,b+v-1)]>e.leftPx){let D=this.getRowspan(f,b);this.appendCellHtml(n,f,b,v,D,a,w),r++}b+=v>1?v-1:0}}r&&o.push(f)}if(!n.children.length)return;let d,u;for(;V.isDefined(d=o.pop());){t=this.rowsCache[d];let f;for(;V.isDefined(f=t.cellRenderQueue.pop());)u=n.lastChild,u&&(this.hasFrozenColumns()&&f>this._options.frozenColumn?t.rowNode[1].appendChild(u):t.rowNode[0].appendChild(u),t.cellNodesByColumnIdx[f]=u)}}renderRows(e){let t=[],n=[],o=[],r=!1,i=this.getDataLength(),a=new Set,l=new Set;for(let u=e.top,f=e.bottom;u<=f;u++)if(!(this.rowsCache[u]||this.hasFrozenRows&&this._options.frozenBottom&&u===this.getDataLength())){if(this.renderedRows++,o.push(u),l.add(u),this.rowsCache[u]=this.createEmptyCachingRow(),this._options.enableCellRowSpan){let p=this.getRowSpanIntersect(u);p!==null&&l.add(p)}this.appendRowHtml(t,n,u,e,i),a.add(u),this.activeCellNode&&this.activeRow===u&&(r=!0),this.counter_rows_rendered++}let d=this.setDifference(l,a);if(d.size>0&&d.forEach(u=>{this.removeRowFromCache(u),o.push(u),this.rowsCache[u]=this.createEmptyCachingRow(),this.appendRowHtml(t,n,u,e,i)}),o.length){let u=document.createElement("div"),f=document.createElement("div");t.forEach(p=>u.appendChild(p)),n.forEach(p=>f.appendChild(p));for(let p=0,y=o.length;p<y;p++)this.hasFrozenRows&&o[p]>=this.actualFrozenRow?this.hasFrozenColumns()?this.rowsCache?.hasOwnProperty(o[p])&&u.firstChild&&f.firstChild&&(this.rowsCache[o[p]].rowNode=[u.firstChild,f.firstChild],this._canvasBottomL.appendChild(u.firstChild),this._canvasBottomR.appendChild(f.firstChild)):this.rowsCache?.hasOwnProperty(o[p])&&u.firstChild&&(this.rowsCache[o[p]].rowNode=[u.firstChild],this._canvasBottomL.appendChild(u.firstChild)):this.hasFrozenColumns()?this.rowsCache?.hasOwnProperty(o[p])&&u.firstChild&&f.firstChild&&(this.rowsCache[o[p]].rowNode=[u.firstChild,f.firstChild],this._canvasTopL.appendChild(u.firstChild),this._canvasTopR.appendChild(f.firstChild)):this.rowsCache?.hasOwnProperty(o[p])&&u.firstChild&&(this.rowsCache[o[p]].rowNode=[u.firstChild],this._canvasTopL.appendChild(u.firstChild));r&&(this.activeCellNode=this.getCellNode(this.activeRow,this.activeCell))}}updateRowPositions(){for(let e in this.rowsCache)if(this.rowsCache){let t=e?parseInt(e,10):0,n=this.rowsCache[t].rowNode[0];this._options.rowTopOffsetRenderType==="transform"?n.style.transform=`translateY(${this.getRowTop(t)}px)`:n.style.top=`${this.getRowTop(t)}px`}}render(){if(!this.initialized)return;this.scrollThrottle.dequeue();let e=this.getVisibleRange(),t=this.getRenderedRange();if(this.cleanupRows(t),this.lastRenderedScrollLeft!==this.scrollLeft){if(this.hasFrozenRows){let n=V.extend(!0,{},t);this._options.frozenBottom?(n.top=this.actualFrozenRow,n.bottom=this.getDataLength()):(n.top=0,n.bottom=this._options.frozenRow),this.cleanUpAndRenderCells(n)}this.cleanUpAndRenderCells(t)}this.renderRows(t),this.hasFrozenRows&&(this._options.frozenBottom?this.renderRows({top:this.actualFrozenRow,bottom:this.getDataLength()-1,leftPx:t.leftPx,rightPx:t.rightPx}):this.renderRows({top:0,bottom:this._options.frozenRow-1,leftPx:t.leftPx,rightPx:t.rightPx})),this.postProcessFromRow=e.top,this.postProcessToRow=Math.min(this.getDataLengthIncludingAddNew()-1,e.bottom),this.startPostProcessing(),this.lastRenderedScrollTop=this.scrollTop,this.lastRenderedScrollLeft=this.scrollLeft,this.trigger(this.onRendered,{startRow:e.top,endRow:e.bottom,grid:this})}getFrozenRowOffset(e){let t=0;return this.hasFrozenRows?this._options.frozenBottom?e>=this.actualFrozenRow?this.h<this.viewportTopH?t=this.actualFrozenRow*this._options.rowHeight:t=this.h:t=0:e>=this.actualFrozenRow?t=this.frozenRowsHeight:t=0:t=0,t}bindAncestorScrollEvents(){let e=this.hasFrozenRows&&!this._options.frozenBottom?this._canvasBottomL:this._canvasTopL;for(;(e=e.parentNode)!==document.body&&e;)(e===this._viewportTopL||e.scrollWidth!==e.clientWidth||e.scrollHeight!==e.clientHeight)&&(this._boundAncestors.push(e),this._bindingEventService.bind(e,"scroll",this.handleActiveCellPositionChange.bind(this)))}unbindAncestorScrollEvents(){this._boundAncestors.forEach(e=>{this._bindingEventService.unbindByEventName(e,"scroll")}),this._boundAncestors=[]}setScroller(){this.hasFrozenColumns()?(this._headerScrollContainer=this._headerScrollerR,this._headerRowScrollContainer=this._headerRowScrollerR,this._footerRowScrollContainer=this._footerRowScrollerR,this.hasFrozenRows?this._options.frozenBottom?(this._viewportScrollContainerX=this._viewportBottomR,this._viewportScrollContainerY=this._viewportTopR):this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportBottomR:this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportTopR):(this._headerScrollContainer=this._headerScrollerL,this._headerRowScrollContainer=this._headerRowScrollerL,this._footerRowScrollContainer=this._footerRowScrollerL,this.hasFrozenRows?this._options.frozenBottom?(this._viewportScrollContainerX=this._viewportBottomL,this._viewportScrollContainerY=this._viewportTopL):this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportBottomL:this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportTopL)}scrollTo(e){e=Math.max(e,0),e=Math.min(e,(this.th||0)-V.height(this._viewportScrollContainerY)+(this.viewportHasHScroll||this.hasFrozenColumns()?this.scrollbarDimensions?.height??0:0));let t=this.offset;this.offset=Math.round(this.page*(this.cj||0)),this.page=Math.min((this.n||0)-1,Math.floor(e/(this.ph||0)));let n=e-this.offset;if(this.offset!==t){let o=this.getVisibleRange(n);this.cleanupRows(o),this.updateRowPositions()}this.prevScrollTop!==n&&(this.vScrollDir=this.prevScrollTop+t<n+this.offset?1:-1,this.lastRenderedScrollTop=this.scrollTop=this.prevScrollTop=n,this.hasFrozenColumns()&&(this._viewportTopL.scrollTop=n),this.hasFrozenRows&&(this._viewportBottomL.scrollTop=this._viewportBottomR.scrollTop=n),this._viewportScrollContainerY&&(this._viewportScrollContainerY.scrollTop=n),this.trigger(this.onViewportChanged,{}))}handleHeaderRowScroll(){let e=this._headerRowScrollContainer.scrollLeft;e!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=e)}handleFooterRowScroll(){let e=this._footerRowScrollContainer.scrollLeft;e!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=e)}handlePreHeaderPanelScroll(){this.handleElementScroll(this._preHeaderPanelScroller)}handleTopHeaderPanelScroll(){this.handleElementScroll(this._topHeaderPanelScroller)}handleElementScroll(e){let t=e.scrollLeft;t!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=t)}handleScroll(e){return this.scrollHeight=this._viewportScrollContainerY.scrollHeight,this.scrollTop=this._viewportScrollContainerY.scrollTop,this.scrollLeft=this._viewportScrollContainerX.scrollLeft,this._handleScroll(e?"scroll":"system")}_handleScroll(e="system"){let t=this._viewportScrollContainerY.scrollHeight-this._viewportScrollContainerY.clientHeight,n=this._viewportScrollContainerY.scrollWidth-this._viewportScrollContainerY.clientWidth;t=Math.max(0,t),n=Math.max(0,n),this.scrollTop>t&&(this.scrollTop=t,this.scrollHeight=t),this.scrollLeft>n&&(this.scrollLeft=n);let o=Math.abs(this.scrollTop-this.prevScrollTop),r=Math.abs(this.scrollLeft-this.prevScrollLeft);if(r&&(this.prevScrollLeft=this.scrollLeft,this._viewportScrollContainerX.scrollLeft=this.scrollLeft,this._headerScrollContainer.scrollLeft=this.scrollLeft,this._topPanelScrollers[0].scrollLeft=this.scrollLeft,this._options.createFooterRow&&(this._footerRowScrollContainer.scrollLeft=this.scrollLeft),this._options.createPreHeaderPanel&&(this.hasFrozenColumns()?this._preHeaderPanelScrollerR.scrollLeft=this.scrollLeft:this._preHeaderPanelScroller.scrollLeft=this.scrollLeft),this._options.createTopHeaderPanel&&(this._topHeaderPanelScroller.scrollLeft=this.scrollLeft),this.hasFrozenColumns()?(this.hasFrozenRows&&(this._viewportTopR.scrollLeft=this.scrollLeft),this._headerRowScrollerR.scrollLeft=this.scrollLeft):(this.hasFrozenRows&&(this._viewportTopL.scrollLeft=this.scrollLeft),this._headerRowScrollerL.scrollLeft=this.scrollLeft)),o&&!this._options.autoHeight)if(this.vScrollDir=this.prevScrollTop<this.scrollTop?1:-1,this.prevScrollTop=this.scrollTop,e==="mousewheel"&&(this._viewportScrollContainerY.scrollTop=this.scrollTop),this.hasFrozenColumns()&&(this.hasFrozenRows&&!this._options.frozenBottom?this._viewportBottomL.scrollTop=this.scrollTop:this._viewportTopL.scrollTop=this.scrollTop),o<this.viewportH)this.scrollTo(this.scrollTop+this.offset);else{let i=this.offset;this.h===this.viewportH?this.page=0:this.page=Math.min(this.n-1,Math.floor(this.scrollTop*((this.th-this.viewportH)/(this.h-this.viewportH))*(1/this.ph))),this.offset=Math.round(this.page*this.cj),i!==this.offset&&this.invalidateAllRows()}if(r||o){let i=Math.abs(this.lastRenderedScrollLeft-this.scrollLeft),a=Math.abs(this.lastRenderedScrollTop-this.scrollTop);(i>20||a>20)&&(this._options.forceSyncScrolling||a<this.viewportH&&i<this.viewportW?this.render():this.scrollThrottle.enqueue(),this.trigger(this.onViewportChanged,{}))}return this.trigger(this.onScroll,{triggeredBy:e,scrollHeight:this.scrollHeight,scrollLeft:this.scrollLeft,scrollTop:this.scrollTop}),!!(r||o)}scrollCellIntoView(e,t,n){if(this.scrollRowIntoView(e,n),t<=this._options.frozenColumn)return;let o=this.getColspan(e,t);this.internalScrollColumnIntoView(this.columnPosLeft[t],this.columnPosRight[t+(o>1?o-1:0)])}internalScrollColumnIntoView(e,t){let n=this.scrollLeft+V.width(this._viewportScrollContainerX)-(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0);e<this.scrollLeft?(this._viewportScrollContainerX.scrollLeft=e,this.handleScroll(),this.render()):t>n&&(this._viewportScrollContainerX.scrollLeft=Math.min(e,t-this._viewportScrollContainerX.clientWidth),this.handleScroll(),this.render())}scrollColumnIntoView(e){this.internalScrollColumnIntoView(this.columnPosLeft[e],this.columnPosRight[e])}updatePagingStatusFromView(e){this.pagingActive=e.pageSize!==0,this.pagingIsLastPage=e.pageNum===e.totalPages-1}getRowSpanColumnIntersects(e){return this.getRowSpanIntersection(e,"columns")}getRowSpanIntersect(e){return this.getRowSpanIntersection(e)}getRowSpanIntersection(e,t){let n=[],o=null;for(let r=0,i=this.columns.length;r<i;r++){let a=this._colsWithRowSpanCache[r];if(a)for(let l of Array.from(a)){let[d,u]=l.split(":").map(Number);if(e>=d&&e<=u)if(t==="columns")n.push(r);else{o=d;break}}}return t==="columns"?n:o}getParentRowSpanByCell(e,t,n=!0){let o=null,r=this._colsWithRowSpanCache[t]||new Set;for(let i of Array.from(r)){let[a,l]=i.split(":").map(Number);if((n?e>a:e>=a)&&e<=l){o={start:a,end:l,range:i};break}}return o}remapAllColumnsRowSpan(){let e=this.getDataLength();if(e>0){this._colsWithRowSpanCache={};for(let t=0;t<e;t++)this.remapRowSpanMetadataByRow(t);this._rowSpanIsCached=!0}}remapRowSpanMetadataByRow(e){let t=this.getItemMetadaWhenExists(e);t?.columns&&Object.keys(t.columns).forEach(n=>{let o=+n,r=t.columns[o],i=+(r?.colspan||1),a=+(r?.rowspan||1);this.remapRowSpanMetadata(e,o,i,a)})}remapRowSpanMetadata(e,t,n,o){var r,i,a;if(o>1){let l=`${e}:${e+o-1}`;if((r=this._colsWithRowSpanCache)[t]??(r[t]=new Set),this._colsWithRowSpanCache[t].add(l),n>1)for(let d=1;d<n;d++)(i=this._colsWithRowSpanCache)[a=t+d]??(i[a]=new Set),this._colsWithRowSpanCache[t+d].add(l)}}createEmptyCachingRow(){return{rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]}}scrollRowIntoView(e,t){if(!this.hasFrozenRows||!this._options.frozenBottom&&e>this.actualFrozenRow-1||this._options.frozenBottom&&e<this.actualFrozenRow-1){let n=V.height(this._viewportScrollContainerY),o=this.hasFrozenRows&&!this._options.frozenBottom?e-this._options.frozenRow:e,r=o*this._options.rowHeight,i=(o+1)*this._options.rowHeight-n+(this.viewportHasHScroll?this.scrollbarDimensions?.height??0:0);(o+1)*this._options.rowHeight>this.scrollTop+n+this.offset?(this.scrollTo(t?r:i),this.render()):o*this._options.rowHeight<this.scrollTop+this.offset&&(this.scrollTo(t?i:r),this.render())}}scrollRowToTop(e){this.scrollTo(e*this._options.rowHeight),this.render()}scrollPage(e){let t=e*this.numVisibleRows,n=this.scrollTop+this._options.rowHeight-1;if(this.scrollTo((this.getRowFromPosition(n)+t)*this._options.rowHeight),this.render(),this._options.enableCellNavigation&&V.isDefined(this.activeRow)){let o=this.activeRow+t,r=this.getDataLengthIncludingAddNew();o>=r&&(o=r-1),o<0&&(o=0);let i=e===1?this.gotoDown(o-1||0,this.activeCell,this.activePosY,this.activePosX):this.gotoUp(o+1,this.activeCell,this.activePosY,this.activePosX);this.navigateToPos(i)}}navigatePageDown(){this.scrollPage(1)}navigatePageUp(){this.scrollPage(-1)}navigateTop(){this.unsetActiveCell(),this.navigateToRow(0)}navigateBottom(){let e=this.getDataLength()-1,t=this.getParentRowSpanByCell(e,this.activeCell)?.start??e;do if(this._options.enableCellRowSpan&&this.setActiveRow(t),this.navigateToRow(t)&&this.activeCell===this.activePosX||!V.isDefined(this.activeCell))break;while(--t>0)}navigateToRow(e){let t=this.getDataLength();if(!t)return!1;e<0?e=0:e>=t&&(e=t-1),this.scrollCellIntoView(e,0,!0);let n=!V.isDefined(this.activeCell)||!V.isDefined(this.activeRow);if(this._options.enableCellNavigation&&V.isDefined(this.activeRow)){let o=0,r=null,i=this.activePosX;for(;o<=this.activePosX;)this.canCellBeActive(e,o)&&(r=o,(!V.isDefined(this.activeCell)||o===this.activeCell)&&(n=!0)),o+=this.getColspan(e,o);r!==null?(this.setActiveCellInternal(this.getCellNode(e,r)),this.activePosX=i):this.resetActiveCell()}return n}getColspan(e,t){let n=this.getItemMetadaWhenExists(e);if(!n||!n.columns)return 1;t>=this.columns.length&&(t=this.columns.length-1);let o=(n.columns[this.columns[t].id]||n.columns[t])?.colspan;return o==="*"?o=this.columns.length-t:o=o||1,o}queuePostProcessedRowForCleanup(e,t,n){this.postProcessgroupId++,typeof t=="object"&&Object.keys(t).forEach(o=>{t.hasOwnProperty(o)&&this.postProcessedCleanupQueue.push({actionType:"C",groupId:this.postProcessgroupId,node:e.cellNodesByColumnIdx[+o],columnIdx:+o,rowIdx:n})}),e.rowNode||(e.rowNode=[]),this.postProcessedCleanupQueue.push({actionType:"R",groupId:this.postProcessgroupId,node:e.rowNode}),e.rowNode?.forEach(o=>o.remove())}queuePostProcessedCellForCleanup(e,t,n){this.postProcessedCleanupQueue.push({actionType:"C",groupId:this.postProcessgroupId,node:e,columnIdx:t,rowIdx:n}),e.remove()}applyFormatResultToCellNode(e,t,n){if(e==null&&(e=""),Object.prototype.toString.call(e)!=="[object Object]"){this.applyHtmlCode(t,e);return}let o=e.html||e.text;this.applyHtmlCode(t,o),e.removeClasses&&!n&&t.classList.remove(...V.classNameToList(e.removeClasses)),e.addClasses&&t.classList.add(...V.classNameToList(e.addClasses)),e.toolTip&&t.setAttribute("title",e.toolTip)}startPostProcessing(){this._options.enableAsyncPostRender&&(window.clearTimeout(this.h_postrender),this.h_postrender=window.setTimeout(this.asyncPostProcessRows.bind(this),this._options.asyncPostRenderDelay))}startPostProcessingCleanup(){this._options.enableAsyncPostRenderCleanup&&(window.clearTimeout(this.h_postrenderCleanup),this.h_postrenderCleanup=window.setTimeout(this.asyncPostProcessCleanupRows.bind(this),this._options.asyncPostRenderCleanupDelay))}invalidatePostProcessingResults(e){typeof this.postProcessedRows[e]=="object"&&Object.keys(this.postProcessedRows[e]).forEach(t=>{this.postProcessedRows[e].hasOwnProperty(t)&&(this.postProcessedRows[e][t]="C")}),this.postProcessFromRow=Math.min(this.postProcessFromRow,e),this.postProcessToRow=Math.max(this.postProcessToRow,e),this.startPostProcessing()}asyncPostProcessRows(){let e=this.getDataLength();for(;this.postProcessFromRow<=this.postProcessToRow;){let t=this.vScrollDir>=0?this.postProcessFromRow++:this.postProcessToRow--,n=this.rowsCache[t];if(!(!n||t>=e)){this.postProcessedRows[t]||(this.postProcessedRows[t]={}),this.ensureCellNodesInRowsCache(t),Object.keys(n.cellNodesByColumnIdx).forEach(o=>{if(n.cellNodesByColumnIdx.hasOwnProperty(o)){let r=+o,i=this.columns[r],a=this.postProcessedRows[t][r];if(i.asyncPostRender&&a!=="R"){let l=n.cellNodesByColumnIdx[r];l&&i.asyncPostRender(l,t,this.getDataItem(t),i,a==="C"),this.postProcessedRows[t][r]="R"}}}),this.h_postrender=window.setTimeout(this.asyncPostProcessRows.bind(this),this._options.asyncPostRenderDelay);return}}}asyncPostProcessCleanupRows(){if(this.postProcessedCleanupQueue.length>0){let e=this.postProcessedCleanupQueue[0].groupId;for(;this.postProcessedCleanupQueue.length>0&&this.postProcessedCleanupQueue[0].groupId===e;){let t=this.postProcessedCleanupQueue.shift();if(t?.actionType==="R"&&t.node.forEach(n=>{n.remove()}),t?.actionType==="C"){let n=this.columns[t.columnIdx];n.asyncPostRenderCleanup&&t.node&&n.asyncPostRenderCleanup(t.node,t.rowIdx,n)}}this.h_postrenderCleanup=window.setTimeout(this.asyncPostProcessCleanupRows.bind(this),this._options.asyncPostRenderCleanupDelay)}}updateCellCssStylesOnRenderedRows(e,t){let n,o,r;typeof this.rowsCache=="object"&&Object.keys(this.rowsCache).forEach(i=>{this.rowsCache&&(r=t?.[i],o=e?.[i],r&&Object.keys(r).forEach(a=>{(!o||r[a]!==o[a])&&(n=this.getCellNode(+i,this.getColumnIndex(a)),n&&n.classList.remove(r[a]))}),o&&Object.keys(o).forEach(a=>{(!r||r[a]!==o[a])&&(n=this.getCellNode(+i,this.getColumnIndex(a)),n&&n.classList.add(o[a]))}))})}addCellCssStyles(e,t){if(this.cellCssClasses[e])throw new Error(`SlickGrid addCellCssStyles: cell CSS hash with key "${e}" already exists.`);this.cellCssClasses[e]=t,this.updateCellCssStylesOnRenderedRows(t,null),this.trigger(this.onCellCssStylesChanged,{key:e,hash:t,grid:this})}removeCellCssStyles(e){this.cellCssClasses[e]&&(this.updateCellCssStylesOnRenderedRows(null,this.cellCssClasses[e]),delete this.cellCssClasses[e],this.trigger(this.onCellCssStylesChanged,{key:e,hash:null,grid:this}))}setCellCssStyles(e,t){let n=this.cellCssClasses[e];this.cellCssClasses[e]=t,this.updateCellCssStylesOnRenderedRows(t,n),this.trigger(this.onCellCssStylesChanged,{key:e,hash:t,grid:this})}getCellCssStyles(e){return this.cellCssClasses[e]}flashCell(e,t,n=250){let o=(r,i)=>{i<1||(window.clearTimeout(this._flashCellTimer),this._flashCellTimer=window.setTimeout(()=>{i%2===0?r.classList.add(this._options.cellFlashingCssClass||""):r.classList.remove(this._options.cellFlashingCssClass||""),o(r,i-1)},n))};if(this.rowsCache[e]){let r=this.getCellNode(e,t);r&&o(r,5)}}highlightRow(e,t){let n=this.rowsCache[e];t||(t=this._options.rowHighlightDuration),Array.isArray(n?.rowNode)&&this._options.rowHighlightCssClass&&(n.rowNode.forEach(o=>o.classList.add(...V.classNameToList(this._options.rowHighlightCssClass))),window.clearTimeout(this._highlightRowTimer),this._highlightRowTimer=window.setTimeout(()=>{n.rowNode?.forEach(o=>o.classList.remove(...V.classNameToList(this._options.rowHighlightCssClass)))},t))}_getContainerElement(e,t,n){if(!e)return;t||(t=0),n||(n=0);let o=typeof t=="number"?t:this.getColumnIndex(t),r=this.hasFrozenRows&&n>=this.actualFrozenRow+(this._options.frozenBottom?0:1),i=this.hasFrozenColumns()&&o>this._options.frozenColumn;return e[(r?2:0)+(i?1:0)]}measureScrollbar(){let e="";this._viewport.forEach(r=>e+=r.className);let t=V.createDomElement("div",{className:e,style:{position:"absolute",top:"-10000px",left:"-10000px",overflow:"auto",width:"100px",height:"100px"}},document.body),n=V.createDomElement("div",{style:{width:"200px",height:"200px",overflow:"auto"}},t),o={width:t.offsetWidth-t.clientWidth,height:t.offsetHeight-t.clientHeight};return n.remove(),t.remove(),o}getMaxSupportedCssHeight(){let e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?this._options.ffMaxSupportedCssHeight:this._options.maxSupportedCssHeight,n=V.createDomElement("div",{style:{display:"hidden"}},document.body);for(;;){let o=e*2;V.height(n,o);let r=V.height(n);if(o>t||r!==o)break;e=o}return n.remove(),e}getUID(){return this.uid}getHeaderColumnWidthDiff(){return this.headerColumnWidthDiff}getScrollbarDimensions(){return this.scrollbarDimensions}getDisplayedScrollbarDimensions(){return{width:this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0,height:this.viewportHasHScroll?this.scrollbarDimensions?.height??0:0}}getAbsoluteColumnMinWidth(){return this.absoluteColumnMinWidth}getVBoxDelta(e){let t=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],n=getComputedStyle(e),o=0;return t.forEach(r=>o+=V.toFloat(n[r])),o}measureCellPaddingAndBorder(){let e=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],t=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],n=this._headers[0];this.headerColumnWidthDiff=this.headerColumnHeightDiff=0,this.cellWidthDiff=this.cellHeightDiff=0;let o=V.createDomElement("div",{className:"ui-state-default slick-state-default slick-header-column",style:{visibility:"hidden"},textContent:"-"},n),r=getComputedStyle(o);r.boxSizing!=="border-box"&&(e.forEach(a=>this.headerColumnWidthDiff+=V.toFloat(r[a])),t.forEach(a=>this.headerColumnHeightDiff+=V.toFloat(r[a]))),o.remove();let i=V.createDomElement("div",{className:"slick-row"},this._canvas[0]);o=V.createDomElement("div",{className:"slick-cell",id:"",style:{visibility:"hidden"},textContent:"-"},i),r=getComputedStyle(o),r.boxSizing!=="border-box"&&(e.forEach(a=>this.cellWidthDiff+=V.toFloat(r[a])),t.forEach(a=>this.cellHeightDiff+=V.toFloat(r[a]))),i.remove(),this.absoluteColumnMinWidth=Math.max(this.headerColumnWidthDiff,this.cellWidthDiff)}clearAllTimers(){window.clearTimeout(this._columnResizeTimer),window.clearTimeout(this._executionBlockTimer),window.clearTimeout(this._flashCellTimer),window.clearTimeout(this._highlightRowTimer),window.clearTimeout(this.h_editorLoader)}LogColWidths(){let e="Col Widths:";for(let t=0;t<this.columns.length;t++)e+=" "+(this.columns[t].hidden?"H":this.columns[t].width);console.log(e)}simpleArrayEquals(e,t){return Array.isArray(e)&&Array.isArray(t)&&t.sort().toString()!==e.sort().toString()}defaultFormatter(e,t,n){return V.isDefined(n)?(n+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""}cellExists(e,t){return!(e<0||e>=this.getDataLength()||t<0||t>=this.columns.length)}getCellFromNode(e){let t=/l\d+/.exec(e.className);if(!t)throw new Error(`SlickGrid getCellFromNode: cannot get cell - ${e.className}`);return parseInt(t[0].substr(1,t[0].length-1),10)}getRowFromNode(e){for(let t in this.rowsCache)if(this.rowsCache){for(let n in this.rowsCache[t].rowNode)if(this.rowsCache[t].rowNode?.[+n]===e)return t?parseInt(t,10):0}return null}clearTextSelection(){if(document.selection?.empty)try{document.selection.empty()}catch{}else if(window.getSelection){let e=window.getSelection();e?.removeAllRanges&&e.removeAllRanges()}}disableSelection(e){e.forEach(t=>{t.setAttribute("unselectable","on"),t.style.mozUserSelect="none",this._bindingEventService.bind(t,"selectstart",()=>!1)})}getPubSubService(){return this._pubSubService}getCellFromPoint(e,t){let n=this.getRowFromPosition(t),o=0,r=0;for(let i=0;i<this.columns.length&&r<=e;i++)this.columns[i]&&(r+=this.columns[i].width,o++);return o-=1,n<-1&&(n=-1),{row:n,cell:o}}getPluginByName(e){for(let t=this.plugins.length-1;t>=0;t--)if(this.plugins[t]?.pluginName===e)return this.plugins[t]}getContainerNode(){return this._container}getCellHeight(e,t){let n=this._options.rowHeight||0;if(t>1){let o=e+t-1;n=this.getRowBottom(o)-this.getRowTop(e)}else{let o=this.getRowHeight();o!==n-this.cellHeightDiff&&(n=o)}return n-=this.cellHeightDiff,Math.ceil(n)}setDifference(e,t){return new Set(Array.from(e).filter(n=>!t.has(n)))}getCellNodeBox(e,t){if(!this.cellExists(e,t))return null;let n=this.getFrozenRowOffset(e),o=this.getRowTop(e)-n,r=o+this._options.rowHeight-1,i=0;for(let l=0;l<t;l++)!this.columns[l]||this.columns[l].hidden||(i+=this.columns[l].width||0,this._options.frozenColumn===l&&(i=0));let a=i+(this.columns[t]?.width||0);return{top:o,left:i,bottom:r,right:a}}absBox(e){let t={top:e.offsetTop,left:e.offsetLeft,bottom:0,right:0,width:e.offsetWidth,height:e.offsetWidth,visible:!0};t.bottom=t.top+t.height,t.right=t.left+t.width;let n=e.offsetParent;for(;(e=e.parentNode)!==document.body&&!(!e||!e.parentNode);){let o=getComputedStyle(e);t.visible&&e.scrollHeight!==e.offsetHeight&&o.overflowY!=="visible"&&(t.visible=t.bottom>e.scrollTop&&t.top<e.scrollTop+e.clientHeight),t.visible&&e.scrollWidth!==e.offsetWidth&&o.overflowX!=="visible"&&(t.visible=t.right>e.scrollLeft&&t.left<e.scrollLeft+e.clientWidth),t.left-=e.scrollLeft,t.top-=e.scrollTop,e===n&&(t.left+=e.offsetLeft,t.top+=e.offsetTop,n=e.offsetParent),t.bottom=t.top+t.height,t.right=t.left+t.width}return t}getActiveCellPosition(){return this.absBox(this.activeCellNode)}getGridPosition(){return this.absBox(this._container)}getCellEditor(){return this.currentEditor}getActiveCell(){return this.activeCellNode?{row:this.activeRow,cell:this.activeCell}:null}getActiveCellNode(){return this.activeCellNode}getTextSelection(){let e=null;if(window.getSelection){let t=window.getSelection();(t?.rangeCount??0)>0&&(e=t.getRangeAt(0))}return e}setTextSelection(e){if(window.getSelection&&e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e))}}sanitizeHtmlString(e,t){if(!this._options.sanitizer||typeof e!="string")return e;let n=this._options.sanitizer(e);return!t&&this._options.logSanitizedHtml&&this.logMessageCount<=this.logMessageMaxCount&&n!==e&&(console.log(`sanitizer altered html: ${e} --> ${n}`),this.logMessageCount===this.logMessageMaxCount&&console.log(`sanitizer: silencing messages after first ${this.logMessageMaxCount}`),this.logMessageCount++),n}getRowspan(e,t){let n=1,o=this.getItemMetadaWhenExists(e);return o?.columns&&Object.keys(o.columns).forEach(r=>{let i=Number(r);if(i===t){let a=o.columns[i];n=Number(a?.rowspan||1)}}),n}findFocusableRow(e,t,n){let o=e,r=this._colsWithRowSpanCache[t]||new Set,i=!1;return Array.from(r).forEach(a=>{let[l,d]=a.split(":").map(Number);!i&&e>=l&&e<=d&&(o=n==="up"?l:d,this.canCellBeActive(o,t)&&(i=!0))}),o<0&&(o=0),o}findFirstFocusableCell(e){let t=0,n=e,o=-1;for(;t<this.columns.length;){let r=this.getParentRowSpanByCell(e,t);if(n=r!==null&&r.start!==e?r.start:e,this.canCellBeActive(n,t)){o=t;break}t+=this.getColspan(n,t)}return{cell:o,row:n}}findLastFocusableCell(e){let t=0,n=e,o=-1;for(;t<this.columns.length;){let r=this.getParentRowSpanByCell(e,t);n=r!==null&&r.start!==e?r.start:e,this.canCellBeActive(n,t)&&(o=t),t+=this.getColspan(n,t)}return{cell:o,row:n}}rowsToRanges(e){let t=[],n=this.columns.length-1;for(let o=0;o<e.length;o++)t.push(new AA(e[o],0,e[o],n));return t}findSpanStartingCell(e,t){let n=this.getParentRowSpanByCell(e,t),o=n!==null&&n.start!==e?n.start:e,r=0,i=0;for(;r<this.columns.length;){if(r+=this.getColspan(o,r),r>t)return r=i,{cell:r,row:o};i=r}return{cell:r,row:o}}gotoRight(e,t,n,o){if(t>=this.columns.length)return null;let r=t+1,i=n;do{let a=this.findSpanStartingCell(n,r);if(i=a.row,r=a.cell,this.canCellBeActive(i,r)&&r>t)break;r+=this.getColspan(i,a.cell)}while(r<this.columns.length);return r<this.columns.length?{row:i,cell:r,posX:r,posY:n}:null}gotoLeft(e,t,n,o){if(t<=0)return null;let r=this.findFirstFocusableCell(e);if(r.cell===null||r.cell>=t)return null;let i,a={row:e,cell:r.cell,posX:r.cell,posY:n};for(;;){if(i=this.gotoRight(a.row,a.cell,a.posY,a.posX),!i)return null;if(i.cell>=t){let l=this.findFocusableRow(n,a.cell,"up");return l!==a.row&&(a.row=l),a}a=i}}gotoDown(e,t,n,o){let r,i=this.getDataLengthIncludingAddNew();do for(e+=this.getRowspan(e,o),r=t=0;t<=o;)r=t,t+=this.getColspan(e,t);while(e<=i&&!this.canCellBeActive(e,r));return e<=i?{row:e,cell:r,posX:o,posY:e}:null}gotoUp(e,t,n,o){let r;if(e<=0)return null;do for(e=this.findFocusableRow(e-1,o,"up"),r=t=0;t<=o;)r=t,t+=this.getColspan(e,t);while(e>=0&&!this.canCellBeActive(e,r));return t<=this.columns.length?{row:e,cell:r,posX:o,posY:e}:null}gotoNext(e,t,n,o){if(!V.isDefined(e)&&!V.isDefined(t)&&(e=t=n=o=0,this.canCellBeActive(e,t)))return{row:e,cell:t,posX:t,posY:n};let r=this.gotoRight(e,t,n,o);if(!r){let i;for(;!r&&++n<this.getDataLength()+(this._options.enableAddRow?1:0);)i=this.findFirstFocusableCell(n),i.cell!==null&&(e=this.getParentRowSpanByCell(n,i.cell)?.start??n,r={row:e,cell:i.cell,posX:i.cell,posY:n})}return r}gotoPrev(e,t,n,o){if(!V.isDefined(e)&&!V.isDefined(t)&&(e=n=this.getDataLengthIncludingAddNew()-1,t=o=this.columns.length-1,this.canCellBeActive(e,t)))return{row:e,cell:t,posX:t,posY:n};let r=this.gotoLeft(e,t,n,o);if(!r){let i;for(;!r&&--n>=0;)i=this.findLastFocusableCell(n),i.cell>-1&&(e=this.getParentRowSpanByCell(n,i.cell)?.start??n,r={row:e,cell:i.cell,posX:i.cell,posY:n})}return r}gotoRowStart(e,t,n,o){let r=this.findFirstFocusableCell(e);return r.cell===null?null:{row:r.row,cell:r.cell,posX:r.cell,posY:e}}gotoRowEnd(e,t,n,o){let r=this.findLastFocusableCell(e);return r.cell===-1?null:{row:r.row,cell:r.cell,posX:r.cell,posY:e}}navigateRight(){return this.navigate("right")}navigateLeft(){return this.navigate("left")}navigateDown(){return this.navigate("down")}navigateUp(){return this.navigate("up")}navigateNext(){return this.navigate("next")}navigatePrev(){return this.navigate("prev")}navigateRowStart(){return this.navigate("home")}navigateRowEnd(){return this.navigate("end")}navigateTopStart(){return this.navigateToRow(0),this.navigate("home")}navigateBottomEnd(){return this.navigateBottom(),this.navigate("end")}navigate(e){if(!this._options.enableCellNavigation||!this.activeCellNode&&e!=="prev"&&e!=="next")return!1;if(!this.getEditorLock()?.commitCurrentEdit())return!0;this.setFocus(),this.unsetActiveCell();let t={up:-1,down:1,left:-1,right:1,prev:-1,next:1,home:-1,end:1};this.tabbingDirection=t[e];let n={up:this.gotoUp,down:this.gotoDown,left:this.gotoLeft,right:this.gotoRight,prev:this.gotoPrev,next:this.gotoNext,home:this.gotoRowStart,end:this.gotoRowEnd}[e].call(this,this.activeRow,this.activeCell,this.activePosY,this.activePosX);return this.navigateToPos(n)}navigateToPos(e){if(e){if(this.hasFrozenRows&&this._options.frozenBottom&&e.row===this.getDataLength())return;let t=e.row===this.getDataLength();return(!this._options.frozenBottom&&e.row>=this.actualFrozenRow||this._options.frozenBottom&&e.row<this.actualFrozenRow)&&this.scrollCellIntoView(e.row,e.cell,!t&&this._options.emulatePagingWhenScrolling),this.setActiveCellInternal(this.getCellNode(e.row,e.cell)),this.activePosX=e.posX,this.activePosY=e.posY,!0}else return this.setActiveCellInternal(this.getCellNode(this.activeRow,this.activeCell)),!1}getCellNode(e,t){if(this.rowsCache[e]){this.ensureCellNodesInRowsCache(e);try{return this.rowsCache[e].cellNodesByColumnIdx.length>t?this.rowsCache[e].cellNodesByColumnIdx[t]:null}catch{return this.rowsCache[e].cellNodesByColumnIdx[t]}}return null}setActiveCell(e,t,n,o,r){this.initialized&&(e>this.getDataLength()||e<0||t>=this.columns.length||t<0||this._options.enableCellNavigation&&(this.scrollCellIntoView(e,t,!1),this.setActiveCellInternal(this.getCellNode(e,t),n,o,r)))}setActiveRow(e,t,n){this.initialized&&(e>this.getDataLength()||e<0||(t??0)>=this.columns.length||(t??0)<0||(this.activeRow=e,n||this.scrollCellIntoView(e,t||0,!1)))}canCellBeActive(e,t){if(!this._options.enableCellNavigation||e>=this.getDataLengthIncludingAddNew()||e<0||t>=this.columns.length||t<0||!this.columns[t]||this.columns[t].hidden||(this.getParentRowSpanByCell(e,t)?.start??e)!==e)return!1;let n=this.getItemMetadaWhenExists(e);if(n?.focusable!==void 0)return!!n.focusable;let o=n?.columns;return o?.[this.columns[t].id]?.focusable!==void 0?!!o[this.columns[t].id].focusable:o?.[t]?.focusable!==void 0?!!o[t].focusable:!!this.columns[t].focusable}canCellBeSelected(e,t){if(e>=this.getDataLength()||e<0||t>=this.columns.length||t<0||!this.columns[t]||this.columns[t].hidden)return!1;let n=this.getItemMetadaWhenExists(e);if(n?.selectable!==void 0)return!!n.selectable;let o=n?.columns&&(n.columns[this.columns[t].id]||n.columns[t]);return o?.selectable!==void 0?!!o.selectable:!!this.columns[t].selectable}gotoCell(e,t,n,o){if(!this.initialized||!this.canCellBeActive(e,t)||!this.getEditorLock()?.commitCurrentEdit())return;this.scrollCellIntoView(e,t,!1);let r=this.getCellNode(e,t),i=this.columns[t],a=!!(this._options.editable&&i?.editor&&this._options.suppressActiveCellChangeOnEdit);this.setActiveCellInternal(r,n||e===this.getDataLength()||this._options.autoEdit,null,a,o),this.currentEditor||this.setFocus()}};/**
277
+ xe.version="2.30.1";FD(It);xe.fn=ve;xe.min=xM;xe.max=RM;xe.now=TM;xe.utc=No;xe.unix=eN;xe.months=nN;xe.isDate=ya;xe.locale=yr;xe.invalid=gc;xe.duration=mo;xe.isMoment=po;xe.weekdays=rN;xe.parseZone=tN;xe.localeData=ir;xe.isDuration=pl;xe.monthsShort=oN;xe.weekdaysMin=iN;xe.defineLocale=mh;xe.updateLocale=tM;xe.locales=nM;xe.weekdaysShort=sN;xe.normalizeUnits=so;xe.relativeTimeRounding=IN;xe.relativeTimeThreshold=NN;xe.calendarFormat=ZM;xe.prototype=ve;xe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const FN=Object.freeze(Object.defineProperty({__proto__:null,default:xe},Symbol.toStringTag,{value:"Module"})),LN=[xe.ISO_8601,Yr.ui,Yr.db],pu="Invalid date";ie(iy)({width:"100%","& .MuiAlert-message":{fontSize:"0.8rem"}," [data-testid=CloseIcon]":{fill:"white"}});class $N extends mc{handleKeyboardEvent(t,n){if(n.isActive)if(lF(t)){if(!n.summaryColumnIds.length)return;const o=n.grid;if(!o||o.getSelectedRows().length<2)return;t.preventDefault(),t.stopImmediatePropagation(),Uo.table=n,Uo.open=!0}else super.handleKeyboardEvent.call(this,t,n)}}let Iv=class{constructor(){this._args={},this._grid=null,this._tableId=""}getFilterFn(){return()=>!0}register(t,n){this.tableId=n,this.grid=t;const o=t.getData();o.setFilter(this.getFilterFn()),o.setFilterArgs(this.args),o.refresh()}reset(){if(!this.grid)return;this.args={};const t=this.grid.getData();t.setFilterArgs(this.args),t.refresh()}print(){return[]}set grid(t){this._grid=t}get grid(){return this._grid}set args(t){if(this._args=t,!this.grid)return;const n=this.grid.getData();n.setFilterArgs(t),n.refresh()}get args(){return this._args}set tableId(t){this._tableId=t}get tableId(){return this._tableId}};class VN extends Iv{getFilterFn(){return t=>!t?.isDeleted}}class jN{constructor(){this._args={},this._grid=null,this._tableId=""}getFilterFn(){return()=>!0}register(){}print(){return[]}reset(){}get args(){return this._args}get grid(){return this._grid}get tableId(){return this._tableId}set args(t){}set grid(t){}set tableId(t){}}function Ss(e){return new Date(e).getTime()}class Nv{constructor(t){this.filter=t}getFilterFn(){const t=this.filter.getFilterFn();return(n,o)=>this.filterFn(n,o)&&t(n,o)}register(t,n){this.tableId=n,this.grid=t;const o=t.getData();o.setFilter(this.getFilterFn()),o.setFilterArgs(this.args),o.refresh()}reset(){this.filter.reset()}print(t){return this.filter.print(t)}set args(t){this.filter.args=t}set grid(t){this.filter.grid=t}set tableId(t){this.filter.tableId=t}get args(){return this.filter.args}get grid(){return this.filter.grid}get tableId(){return this.filter.tableId}}function BN(e){return{tooltip:"Apply column filter",command:e}}class Ca{constructor(){this.observers=[]}subscribe(t){~this.observers.indexOf(t)||this.observers.push(t)}unsubscribe(t){const n=this.observers.indexOf(t);~this.observers.indexOf(t)&&this.observers.splice(n,1)}notify(){for(const t of this.observers)t()}}class WN extends Ca{constructor(){super(...arguments),this.columnId="",this.group=hn.Text,this.target=null,this.x=0,this.y=0}}const Rn=new WN;class HN{highlightAllColumns(t,n){const o=document.getElementById(n);if(!o)return;const r=Object.keys(t.columnFilters||{});if(r.length)for(const i of r){const a=o.querySelector(`[data-id="${i}"]`);a&&(t.columnFilters[i].value[1]||t.columnFilters[i].value[2]?a.classList.add("filter-active"):a.classList.remove("filter-active"))}else{const i=o.querySelectorAll(".slick-header-column");for(const a of i)a.classList.remove("filter-active")}}highlightColumn(t,n){const o=document.getElementById(t.id);if(!o)return;const r=o.querySelector(`[data-id="${n}"]`);r&&r.classList.add("filter-active")}resetColumn(t,n){const o=document.getElementById(t.id);if(!o)return;const r=o.querySelector(`[data-id="${n}"]`);r&&r.classList.remove("filter-active")}}const or=new HN;function Av(e){return or.highlightAllColumns(e.filter.args,e.id),function(t,n){t.preventDefault(),Rn.columnId=n.column.id||"",Rn.group=n.command,Rn.table=e,Rn.target=t.target,Rn.x=t.x||0,Rn.y=t.y||0,Rn.notify()}}var zN=Object.defineProperty,YN=(e,t,n)=>t in e?zN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>YN(e,typeof t!="symbol"?t+"":t,n),na=class{constructor(e,t){this.event=e,this.args=t,P(this,"_isPropagationStopped",!1),P(this,"_isImmediatePropagationStopped",!1),P(this,"_isDefaultPrevented",!1),P(this,"returnValues",[]),P(this,"returnValue"),P(this,"_eventTarget"),P(this,"nativeEvent"),P(this,"arguments_"),P(this,"altKey"),P(this,"ctrlKey"),P(this,"metaKey"),P(this,"shiftKey"),P(this,"key"),P(this,"keyCode"),P(this,"clientX"),P(this,"clientY"),P(this,"offsetX"),P(this,"offsetY"),P(this,"pageX"),P(this,"pageY"),P(this,"bubbles"),P(this,"target"),P(this,"type"),P(this,"which"),P(this,"x"),P(this,"y"),this.nativeEvent=e,this.arguments_=t,e&&["altKey","ctrlKey","metaKey","shiftKey","key","keyCode","clientX","clientY","offsetX","offsetY","pageX","pageY","bubbles","target","type","which","x","y"].forEach(n=>this[n]=e[n]),this._eventTarget=this.nativeEvent?this.nativeEvent.target:void 0}get defaultPrevented(){return this._isDefaultPrevented}stopPropagation(){this._isPropagationStopped=!0,this.nativeEvent?.stopPropagation()}isPropagationStopped(){return this._isPropagationStopped}stopImmediatePropagation(){this._isImmediatePropagationStopped=!0,this.nativeEvent&&this.nativeEvent.stopImmediatePropagation()}isImmediatePropagationStopped(){return this._isImmediatePropagationStopped}getNativeEvent(){return this.nativeEvent}preventDefault(){this.nativeEvent&&this.nativeEvent.preventDefault(),this._isDefaultPrevented=!0}isDefaultPrevented(){return this.nativeEvent?this.nativeEvent.defaultPrevented:this._isDefaultPrevented}addReturnValue(e){this.returnValues.push(e),this.returnValue===void 0&&e!==void 0&&(this.returnValue=e)}getReturnValue(){return this.returnValue}getArguments(){return this.arguments_}},Zr=class{constructor(e,t){this.eventName=e,this.pubSub=t,P(this,"_handlers",[]),P(this,"_pubSubService"),this._pubSubService=t}get subscriberCount(){return this._handlers.length}subscribe(e){this._handlers.push(e)}unsubscribe(e){for(let t=this._handlers.length-1;t>=0;t--)this._handlers[t]===e&&this._handlers.splice(t,1)}notify(e,t,n){let o=t instanceof na?t:new na(t,e);n=n||this;for(let r=0;r<this._handlers.length&&!(o.isPropagationStopped()||o.isImmediatePropagationStopped());r++){let i=this._handlers[r].call(n,o,e);o.addReturnValue(i)}if(typeof this._pubSubService?.publish=="function"&&this.eventName){let r=this._pubSubService.publish(this.eventName,{args:e,eventData:o});o.addReturnValue(r)}return o}setPubSubService(e){this._pubSubService=e}},Sa=class{constructor(){P(this,"handlers",[])}subscribe(e,t){return this.handlers.push({event:e,handler:t}),e.subscribe(t),this}unsubscribe(e,t){let n=this.handlers.length;for(;n--;)if(this.handlers[n].event===e&&this.handlers[n].handler===t){this.handlers.splice(n,1),e.unsubscribe(t);return}return this}unsubscribeAll(){let e=this.handlers.length;for(;e--;)this.handlers[e].event.unsubscribe(this.handlers[e].handler);return this.handlers=[],this}},xh=class{constructor(e,t,n,o){P(this,"fromRow"),P(this,"fromCell"),P(this,"toCell"),P(this,"toRow"),n===void 0&&o===void 0&&(n=e,o=t),this.fromRow=Math.min(e,n),this.fromCell=Math.min(t,o),this.toCell=Math.max(t,o),this.toRow=Math.max(e,n)}isSingleRow(){return this.fromRow===this.toRow}isSingleCell(){return this.fromRow===this.toRow&&this.fromCell===this.toCell}contains(e,t){return e>=this.fromRow&&e<=this.toRow&&t>=this.fromCell&&t<=this.toCell}toString(){return this.isSingleCell()?`(${this.fromRow}:${this.fromCell})`:`(${this.fromRow}:${this.fromCell} - ${this.toRow}:${this.toCell})`}},Fv=class{constructor(){P(this,"__nonDataRow",!0)}},Lv=class extends Fv{constructor(){super(),P(this,"__group",!0),P(this,"level",0),P(this,"count",0),P(this,"value",null),P(this,"title",null),P(this,"collapsed",!1),P(this,"selectChecked",!1),P(this,"totals",null),P(this,"rows",[]),P(this,"groups",null),P(this,"groupingKey",null)}equals(e){return this.value===e.value&&this.count===e.count&&this.collapsed===e.collapsed&&this.title===e.title}},UN=class extends Fv{constructor(){super(),P(this,"__groupTotals",!0),P(this,"group",null),P(this,"initialized",!1)}},qN=class{constructor(){P(this,"activeEditController",null)}isActive(e){return e?this.activeEditController===e:this.activeEditController!==null}activate(e){if(e!==this.activeEditController){if(this.activeEditController!==null)throw new Error("Slick.EditorLock.activate: an editController is still active, can't activate another editController");if(!e.commitCurrentEdit)throw new Error("Slick.EditorLock.activate: editController must implement .commitCurrentEdit()");if(!e.cancelCurrentEdit)throw new Error("Slick.EditorLock.activate: editController must implement .cancelCurrentEdit()");this.activeEditController=e}}deactivate(e){if(this.activeEditController){if(this.activeEditController!==e)throw new Error("Slick.EditorLock.deactivate: specified editController is not the currently active one");this.activeEditController=null}}commitCurrentEdit(){return this.activeEditController?this.activeEditController.commitCurrentEdit():!0}cancelCurrentEdit(){return this.activeEditController?this.activeEditController.cancelCurrentEdit():!0}},kc=class{constructor(){P(this,"_boundedEvents",[])}getBoundedEvents(){return this._boundedEvents}destroy(){this.unbindAll()}bind(e,t,n,o,r=""){e&&(e.addEventListener(t,n,o),this._boundedEvents.push({element:e,eventName:t,listener:n,groupName:r}))}unbind(e,t,n){e?.removeEventListener&&e.removeEventListener(t,n)}unbindByEventName(e,t){let n=this._boundedEvents.find(o=>o.element===e&&o.eventName===t);n&&this.unbind(n.element,n.eventName,n.listener)}unbindAll(e){if(e){let t=Array.isArray(e)?e:[e];for(let n=this._boundedEvents.length-1;n>=0;--n){let o=this._boundedEvents[n];if(t.some(r=>r===o.groupName)){let{element:r,eventName:i,listener:a}=o;this.unbind(r,i,a),this._boundedEvents.splice(n,1)}}}else for(;this._boundedEvents.length>0;){let t=this._boundedEvents.pop(),{element:n,eventName:o,listener:r}=t;this.unbind(n,o,r)}}},Un=class Ht{static isFunction(t){return typeof t=="function"&&typeof t.nodeType!="number"&&typeof t.item!="function"}static isPlainObject(t){if(!t||Ht.toString.call(t)!=="[object Object]")return!1;let n=Ht.getProto(t);if(!n)return!0;let o=Ht.hasOwn.call(n,"constructor")&&n.constructor;return typeof o=="function"&&Ht.fnToString.call(o)===Ht.ObjectFunctionString}static calculateAvailableSpace(t){let n=0,o=0,r=0,i=0,a=window.innerHeight||0,l=window.innerWidth||0,d=Ht.windowScrollPosition(),u=d.top,f=d.left,p=Ht.offset(t);if(p){let y=p.top||0,w=p.left||0;o=y-u,n=a-(y-u),r=w-f,i=l-(w-f)}return{top:o,bottom:n,left:r,right:i}}static extend(...t){let n,o,r,i,a,l,d=t[0],u=1,f=!1,p=t.length;for(typeof d=="boolean"?(f=d,d=t[u]||{},u++):d=d||{},typeof d!="object"&&!Ht.isFunction(d)&&(d={}),u===p&&(d=this,u--);u<p;u++)if(Ht.isDefined(n=t[u]))for(o in n)i=n[o],!(o==="__proto__"||d===i)&&(f&&i&&(Ht.isPlainObject(i)||(a=Array.isArray(i)))?(r=d[o],a&&!Array.isArray(r)?l=[]:!a&&!Ht.isPlainObject(r)?l={}:l=r,a=!1,d[o]=Ht.extend(f,l,i)):i!==void 0&&(d[o]=i));return d}static createDomElement(t,n,o){let r=document.createElement(t);return n&&Object.keys(n).forEach(i=>{i==="innerHTML"&&console.warn(`[SlickGrid] For better CSP (Content Security Policy) support, do not use "innerHTML" directly in "createDomElement('${t}', { innerHTML: 'some html'})", it is better as separate assignment: "const elm = createDomElement('span'); elm.innerHTML = 'some html';"`);let a=n[i];typeof a=="object"?Object.assign(r[i],a):r[i]=n[i]}),o?.appendChild&&o.appendChild(r),r}static getHtmlStringOutput(t,n="innerHTML"){return t instanceof DocumentFragment?[].map.call(t.childNodes,o=>o[n]).join("")||t.textContent||"":t instanceof HTMLElement?t[n]:String(t)}static emptyElement(t){for(;t?.firstChild;)t.removeChild(t.firstChild);return t}static classNameToList(t=""){return t.split(" ").filter(n=>n)}static innerSize(t,n){let o=0;if(t){let r=n==="height"?"clientHeight":"clientWidth",i=n==="height"?["top","bottom"]:["left","right"];o=t[r];for(let a of i){let l=parseFloat(Ht.getElementProp(t,`padding-${a}`)||"")||0;o-=l}}return o}static isDefined(t){return t!=null&&t!==""}static getElementProp(t,n){return t?.getComputedStyle?window.getComputedStyle(t,null).getPropertyValue(n):null}static getFunctionDetails(t,n=!0){let o=!1,r=i=>{let a=i.toString();if(o=a.includes("async "),a.replaceAll(" ","").includes("=>({")){let u=a.match(/(({.*}))/g)||[];return u.length>=1?`return ${u[0].trimStart()}`:a}let l=!a.includes("{")&&a.includes("=>"),d=a.substring(a.indexOf("{")+1||a.indexOf("=>")+2,a.includes("}")?a.lastIndexOf("}"):a.length);return n&&l&&!d.startsWith("return")?"return "+d.trimStart():d};return{params:(i=>{let a=/(\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s*=[^,)]*(('(?:\\'|[^'\r\n])*')|("(?:\\"|[^"\r\n])*"))|(\s*=[^,)]*))/mg,l=/([^\s,]+)/g,d=i.toString().replace(a,"");return d.slice(d.indexOf("(")+1,d.indexOf(")")).match(l)??[]})(t),body:r(t),isAsync:o}}static insertAfterElement(t,n){t.parentNode?.insertBefore(n,t.nextSibling)}static isEmptyObject(t){return t==null?!0:Object.entries(t).length===0}static noop(){}static offset(t){if(!t||!t.getBoundingClientRect)return;let n=t.getBoundingClientRect(),o=document.documentElement;return{top:n.top+window.pageYOffset-o.clientTop,left:n.left+window.pageXOffset-o.clientLeft}}static windowScrollPosition(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}static width(t,n){if(!(!t||!t.getBoundingClientRect)){if(n===void 0)return t.getBoundingClientRect().width;Ht.setStyleSize(t,"width",n)}}static height(t,n){if(t){if(n===void 0)return t.getBoundingClientRect().height;Ht.setStyleSize(t,"height",n)}}static setStyleSize(t,n,o){typeof o=="function"?o=o():typeof o=="string"?t.style[n]=o:t.style[n]=o+"px"}static contains(t,n){return!t||!n?!1:!Ht.parents(n).every(o=>t!==o)}static isHidden(t){return t.offsetWidth===0&&t.offsetHeight===0}static parents(t,n){let o=[],r=n===":visible",i=n===":hidden";for(;(t=t.parentNode)&&t!==document&&!(!t||!t.parentNode);)i?Ht.isHidden(t)&&o.push(t):r?Ht.isHidden(t)||o.push(t):(!n||t.matches(n))&&o.push(t);return o}static toFloat(t){let n=parseFloat(t);return isNaN(n)?0:n}static show(t,n=""){Array.isArray(t)?t.forEach(o=>o.style.display=n):t.style.display=n}static hide(t){Array.isArray(t)?t.forEach(n=>n.style.display="none"):t.style.display="none"}static slideUp(t,n){return Ht.slideAnimation(t,"slideUp",n)}static slideDown(t,n){return Ht.slideAnimation(t,"slideDown",n)}static slideAnimation(t,n,o){if(window.jQuery!==void 0){window.jQuery(t)[n]("fast",o);return}n==="slideUp"?Ht.hide(t):Ht.show(t),o()}static applyDefaults(t,n){typeof n=="object"&&Object.keys(n).forEach(o=>{n.hasOwnProperty(o)&&!t.hasOwnProperty(o)&&(t[o]=n[o])})}static addSlickEventPubSubWhenDefined(t,n){if(t)for(let o in n)n[o]instanceof Zr&&typeof n[o].setPubSubService=="function"&&n[o].setPubSubService(t)}};P(Un,"getProto",Object.getPrototypeOf),P(Un,"class2type",{}),P(Un,"toString",Un.class2type.toString),P(Un,"hasOwn",Un.class2type.hasOwnProperty),P(Un,"fnToString",Un.hasOwn.toString),P(Un,"ObjectFunctionString",Un.fnToString.call(Object)),P(Un,"storage",{_storage:new WeakMap,put:function(e,t,n){this._storage.has(e)||this._storage.set(e,new Map),this._storage.get(e).set(t,n)},get:function(e,t){let n=this._storage.get(e);return n?n.get(t):null},remove:function(e,t){let n=this._storage.get(e).delete(t);return this._storage.get(e).size!==0&&this._storage.delete(e),n}});var go=Un,$v=new qN,GN={Event:Zr,EventHandler:Sa,GlobalEditorLock:$v,keyCode:{SPACE:8,DOWN:40,ENTER:13,ESCAPE:27,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,TAB:9,UP:38},preClickClassName:"slick-edit-preclick",GridAutosizeColsMode:{None:"NOA",LegacyOff:"LOF",LegacyForceFit:"LFF",IgnoreViewport:"IGV",FitColsToViewport:"FCV",FitViewportToCols:"FVC"},ColAutosizeMode:{Locked:"LCK",Guide:"GUI",ContentExpandOnly:"CXO",ContentIntelligent:"CTI"},RowSelectionMode:{FirstRow:"FS1",FirstNRows:"FSN",AllRows:"ALL",LastRow:"LS1"},ValueFilterMode:{None:"NONE",DeDuplicate:"DEDP",GetGreatestAndSub:"GR8T",GetLongestTextAndSub:"LNSB",GetLongestText:"LNSC"},WidthEvalMode:{Auto:"AUTO",TextOnly:"CANV"}},{Event:KN,EventHandler:XN,GlobalEditorLock:ZN,keyCode:Br,preClickClassName:QN,GridAutosizeColsMode:Vv,ColAutosizeMode:JN,RowSelectionMode:eA,ValueFilterMode:tA,WidthEvalMode:nA}=GN,oA=go,jv=class{constructor(e,t){this.grid=e,P(this,"pluginName","CellRangeDecorator"),P(this,"_options"),P(this,"_elem"),P(this,"_defaults",{selectionCssClass:"slick-range-decorator",selectionCss:{zIndex:"9999",border:"2px dashed red"},offset:{top:-1,left:-1,height:-2,width:-2}}),this._options=oA.extend(!0,{},this._defaults,t)}destroy(){this.hide()}init(){}hide(){this._elem?.remove(),this._elem=null}show(e){if(!this._elem){this._elem=document.createElement("div"),this._elem.className=this._options.selectionCssClass,Object.keys(this._options.selectionCss).forEach(r=>{this._elem.style[r]=this._options.selectionCss[r]}),this._elem.style.position="absolute";let o=this.grid.getActiveCanvasNode();o&&o.appendChild(this._elem)}let t=this.grid.getCellNodeBox(e.fromRow,e.fromCell),n=this.grid.getCellNodeBox(e.toRow,e.toCell);return t&&n&&this._options?.offset&&(this._elem.style.top=`${t.top+this._options.offset.top}px`,this._elem.style.left=`${t.left+this._options.offset.left}px`,this._elem.style.height=`${n.bottom-t.top+this._options.offset.height}px`,this._elem.style.width=`${n.right-t.left+this._options.offset.width}px`),this._elem}},rA=go;function Rh(e){let{containerElement:t}=e,{onDragInit:n,onDragStart:o,onDrag:r,onDragEnd:i,preventDragFromKeys:a}=e,l,d,u,f,p,y;t||(t=document.body);let w={dragSource:t,dragHandle:null};function b(){t&&(t.addEventListener("mousedown",k),t.addEventListener("touchstart",k))}function m(C,O,I){if(typeof C=="function")return C(O,I)}function v(){t&&(t.removeEventListener("mousedown",k),t.removeEventListener("touchstart",k))}function D(C){let O=!1;return a&&a.forEach(I=>{C[I]&&(O=!0)}),O}function k(C){if(!D(C)){l=C.target;let O=C?.touches?.[0]??C,{target:I}=O;if(!e.allowDragFrom||e.allowDragFrom&&l.matches(e.allowDragFrom)||e.allowDragFromClosest&&l.closest(e.allowDragFromClosest)){w.dragHandle=l;let F=rA.windowScrollPosition();d=F.left+O.clientX,u=F.top+O.clientY,f=O.clientX-O.clientX,p=O.clientY-O.clientY,w=Object.assign(w,{deltaX:f,deltaY:p,startX:d,startY:u,target:I}),m(n,C,w)!==!1&&(document.body.addEventListener("mousemove",x),document.body.addEventListener("touchmove",x),document.body.addEventListener("mouseup",S),document.body.addEventListener("touchend",S),document.body.addEventListener("touchcancel",S))}}}function x(C){if(!D(C)){let O=C?.touches?.[0]??C;f=O.clientX-d,p=O.clientY-u;let{target:I}=O;y||(w=Object.assign(w,{deltaX:f,deltaY:p,startX:d,startY:u,target:I}),m(o,C,w),y=!0),w=Object.assign(w,{deltaX:f,deltaY:p,startX:d,startY:u,target:I}),m(r,C,w)}}function S(C){if(document.body.removeEventListener("mousemove",x),document.body.removeEventListener("touchmove",x),document.body.removeEventListener("mouseup",S),document.body.removeEventListener("touchend",S),document.body.removeEventListener("touchcancel",S),y){let{target:O}=C;w=Object.assign(w,{target:O}),m(i,C,w),y=!1}}return b(),{destroy:v}}function sA(e){let{element:t,onMouseWheel:n}=e;function o(){t.removeEventListener("wheel",i),t.removeEventListener("mousewheel",i)}function r(){t.addEventListener("wheel",i),t.addEventListener("mousewheel",i)}function i(a){let l=a||window.event,d=0,u=0,f=0;l.wheelDelta&&(d=l.wheelDelta/120),l.detail&&(d=-l.detail/3),f=d,l.axis!==void 0&&l.axis===l.HORIZONTAL_AXIS&&(f=0,u=-1*d),l.wheelDeltaY!==void 0&&(f=l.wheelDeltaY/120),l.wheelDeltaX!==void 0&&(u=-1*l.wheelDeltaX/120),typeof n=="function"&&n(a,d,u,f)}return r(),{destroy:o}}function iA(e){let{resizeableElement:t,resizeableHandleElement:n,onResizeStart:o,onResize:r,onResizeEnd:i}=e;if(!n||typeof n.addEventListener!="function")throw new Error("[Slick.Resizable] You did not provide a valid html element that will be used for the handle to resize.");function a(){n.addEventListener("mousedown",u),n.addEventListener("touchstart",u)}function l(){typeof n?.removeEventListener=="function"&&(n.removeEventListener("mousedown",u),n.removeEventListener("touchstart",u))}function d(y,w){if(typeof y=="function")return y(w,{resizeableElement:t,resizeableHandleElement:n})}function u(y){y.preventDefault();let w=y.touches?y.changedTouches[0]:y;d(o,w)!==!1&&(document.body.addEventListener("mousemove",f),document.body.addEventListener("mouseup",p),document.body.addEventListener("touchmove",f),document.body.addEventListener("touchend",p))}function f(y){y.preventDefault&&y.type!=="touchmove"&&y.preventDefault();let w=y.touches?y.changedTouches[0]:y;typeof r=="function"&&r(w,{resizeableElement:t,resizeableHandleElement:n})}function p(y){let w=y.touches?y.changedTouches[0]:y;d(i,w),document.body.removeEventListener("mousemove",f),document.body.removeEventListener("mouseup",p),document.body.removeEventListener("touchmove",f),document.body.removeEventListener("touchend",p)}return a(),{destroy:l}}var Rd=Zr,aA=Sa,Td=xh,lA=Rh,cA=jv,pi=go,dA=class{constructor(e){P(this,"pluginName","CellRangeSelector"),P(this,"onBeforeCellRangeSelected",new Rd("onBeforeCellRangeSelected")),P(this,"onCellRangeSelected",new Rd("onCellRangeSelected")),P(this,"onCellRangeSelecting",new Rd("onCellRangeSelecting")),P(this,"_grid"),P(this,"_currentlySelectedRange",null),P(this,"_canvas",null),P(this,"_decorator"),P(this,"_gridOptions"),P(this,"_activeCanvas"),P(this,"_dragging",!1),P(this,"_handler",new aA),P(this,"_options"),P(this,"_defaults",{autoScroll:!0,minIntervalToShowNextCell:30,maxIntervalToShowNextCell:600,accelerateInterval:5,selectionCss:{border:"2px dashed blue"}}),P(this,"_rowOffset",0),P(this,"_columnOffset",0),P(this,"_isRightCanvas",!1),P(this,"_isBottomCanvas",!1),P(this,"_activeViewport"),P(this,"_autoScrollTimerId"),P(this,"_draggingMouseOffset"),P(this,"_moveDistanceForOneCell"),P(this,"_xDelayForNextCell",0),P(this,"_yDelayForNextCell",0),P(this,"_viewportHeight",0),P(this,"_viewportWidth",0),P(this,"_isRowMoveRegistered",!1),P(this,"_scrollLeft",0),P(this,"_scrollTop",0),this._options=pi.extend(!0,{},this._defaults,e)}init(e){if(lA===void 0)throw new Error('Slick.Draggable is undefined, make sure to import "slick.interactions.js"');this._decorator=this._options.cellDecorator||new cA(e,this._options),this._grid=e,pi.addSlickEventPubSubWhenDefined(e.getPubSubService(),this),this._canvas=this._grid.getCanvasNode(),this._gridOptions=this._grid.getOptions(),this._handler.subscribe(this._grid.onScroll,this.handleScroll.bind(this)).subscribe(this._grid.onDragInit,this.handleDragInit.bind(this)).subscribe(this._grid.onDragStart,this.handleDragStart.bind(this)).subscribe(this._grid.onDrag,this.handleDrag.bind(this)).subscribe(this._grid.onDragEnd,this.handleDragEnd.bind(this))}destroy(){this._handler.unsubscribeAll(),this._activeCanvas=null,this._activeViewport=null,this._canvas=null,this._decorator?.destroy()}getCellDecorator(){return this._decorator}handleScroll(e,t){this._scrollTop=t.scrollTop,this._scrollLeft=t.scrollLeft}handleDragInit(e){this._activeCanvas=this._grid.getActiveCanvasNode(e),this._activeViewport=this._grid.getActiveViewportNode(e);let t=this._grid.getDisplayedScrollbarDimensions();if(this._viewportWidth=this._activeViewport.offsetWidth-t.width,this._viewportHeight=this._activeViewport.offsetHeight-t.height,this._moveDistanceForOneCell={x:this._grid.getAbsoluteColumnMinWidth()/2,y:this._grid.getOptions().rowHeight/2},this._isRowMoveRegistered=this.hasRowMoveManager(),this._rowOffset=0,this._columnOffset=0,this._isBottomCanvas=this._activeCanvas.classList.contains("grid-canvas-bottom"),this._gridOptions.frozenRow>-1&&this._isBottomCanvas){let n=`.${this._grid.getUID()} .grid-canvas-${this._gridOptions.frozenBottom?"bottom":"top"}`,o=document.querySelector(n);o&&(this._rowOffset=o.clientHeight||0)}if(this._isRightCanvas=this._activeCanvas.classList.contains("grid-canvas-right"),this._gridOptions.frozenColumn>-1&&this._isRightCanvas){let n=document.querySelector(`.${this._grid.getUID()} .grid-canvas-left`);n&&(this._columnOffset=n.clientWidth||0)}e.stopImmediatePropagation(),e.preventDefault()}handleDragStart(e,t){let n=this._grid.getCellFromEvent(e);if(n&&this.onBeforeCellRangeSelected.notify(n).getReturnValue()!==!1&&this._grid.canCellBeSelected(n.row,n.cell)&&(this._dragging=!0,e.stopImmediatePropagation()),!this._dragging)return;this._grid.focus();let o=pi.offset(this._canvas),r=t.startX-(o?.left??0);this._gridOptions.frozenColumn>=0&&this._isRightCanvas&&(r+=this._scrollLeft);let i=t.startY-(o?.top??0);this._gridOptions.frozenRow>=0&&this._isBottomCanvas&&(i+=this._scrollTop);let a=this._grid.getCellFromPoint(r,i);return t.range={start:a,end:{}},this._currentlySelectedRange=t.range,this._decorator.show(new Td(a.row,a.cell))}handleDrag(e,t){if(!this._dragging&&!this._isRowMoveRegistered)return;this._isRowMoveRegistered||e.stopImmediatePropagation();let n=e.getNativeEvent();if(this._options.autoScroll&&(this._draggingMouseOffset=this.getMouseOffsetViewport(n,t),this._draggingMouseOffset.isOutsideViewport))return this.handleDragOutsideViewport();this.stopIntervalTimer(),this.handleDragTo(n,t)}getMouseOffsetViewport(e,t){let n=e?.touches?.[0]??e,o=this._activeViewport.scrollLeft,r=this._activeViewport.scrollTop,i=o+this._viewportWidth,a=r+this._viewportHeight,l=pi.offset(this._activeViewport),d=l?.left??0,u=l?.top??0,f=d+this._viewportWidth,p=u+this._viewportHeight,y={e,dd:t,viewport:{left:o,top:r,right:i,bottom:a,offset:{left:d,top:u,right:f,bottom:p}},offset:{x:0,y:0},isOutsideViewport:!1};return n.pageX<d?y.offset.x=n.pageX-d:n.pageX>f&&(y.offset.x=n.pageX-f),n.pageY<u?y.offset.y=u-n.pageY:n.pageY>p&&(y.offset.y=p-n.pageY),y.isOutsideViewport=!!y.offset.x||!!y.offset.y,y}handleDragOutsideViewport(){if(this._xDelayForNextCell=this._options.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.x)*this._options.accelerateInterval,this._yDelayForNextCell=this._options.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.y)*this._options.accelerateInterval,!this._autoScrollTimerId){let e=0,t=0;this._autoScrollTimerId=window.setInterval(()=>{let n=!1,o=!1;this._draggingMouseOffset.offset.x?(e+=this._options.minIntervalToShowNextCell,n=e>=this._xDelayForNextCell):e=0,this._draggingMouseOffset.offset.y?(t+=this._options.minIntervalToShowNextCell,o=t>=this._yDelayForNextCell):t=0,(n||o)&&(n&&(e=0),o&&(t=0),this.handleDragToNewPosition(n,o))},this._options.minIntervalToShowNextCell)}}handleDragToNewPosition(e,t){let n=this._draggingMouseOffset.e.pageX,o=this._draggingMouseOffset.e.pageY,r=this._draggingMouseOffset.offset.x,i=this._draggingMouseOffset.offset.y,a=this._draggingMouseOffset.viewport.offset;e&&r&&(r>0?n=a.right+this._moveDistanceForOneCell.x:n=a.left-this._moveDistanceForOneCell.x),t&&i&&(i>0?o=a.top-this._moveDistanceForOneCell.y:o=a.bottom+this._moveDistanceForOneCell.y),this.handleDragTo({pageX:n,pageY:o},this._draggingMouseOffset.dd)}stopIntervalTimer(){this._autoScrollTimerId&&(window.clearInterval(this._autoScrollTimerId),this._autoScrollTimerId=void 0)}handleDragTo(e,t){let n=e?.touches?.[0]??e,o=pi.offset(this._activeCanvas),r=this._grid.getCellFromPoint(n.pageX-(o?.left??0)+this._columnOffset,n.pageY-(o?.top??0)+this._rowOffset);if(!(this._gridOptions.frozenColumn>=0&&!this._isRightCanvas&&r.cell>this._gridOptions.frozenColumn||this._isRightCanvas&&r.cell<=this._gridOptions.frozenColumn)&&!(this._gridOptions.frozenRow>=0&&!this._isBottomCanvas&&r.row>=this._gridOptions.frozenRow||this._isBottomCanvas&&r.row<this._gridOptions.frozenRow)){if(this._options.autoScroll&&this._draggingMouseOffset){let i=this._grid.getCellNodeBox(r.row,r.cell);if(!i)return;let a=this._draggingMouseOffset.viewport;(i.left<a.left||i.right>a.right||i.top<a.top||i.bottom>a.bottom)&&this._grid.scrollCellIntoView(r.row,r.cell)}if(this._grid.canCellBeSelected(r.row,r.cell)&&t?.range){t.range.end=r;let i=new Td(t.range.start.row??0,t.range.start.cell??0,r.row,r.cell);this._decorator.show(i),this.onCellRangeSelecting.notify({range:i})}}}hasRowMoveManager(){return!!(this._grid.getPluginByName("RowMoveManager")||this._grid.getPluginByName("CrossGridRowMoveManager"))}handleDragEnd(e,t){this._decorator.hide(),this._dragging&&(this._dragging=!1,e.stopImmediatePropagation(),this.stopIntervalTimer(),this.onCellRangeSelected.notify({range:new Td(t.range.start.row??0,t.range.start.cell??0,t.range.end.row,t.range.end.cell)}))}getCurrentRange(){return this._currentlySelectedRange}},uA=kc,hA=Sa,fr=go,fA=class{constructor(e){P(this,"pluginName","CheckboxSelectColumn"),P(this,"_dataView"),P(this,"_grid"),P(this,"_isUsingDataView",!1),P(this,"_selectableOverride",null),P(this,"_headerRowNode"),P(this,"_selectAll_UID"),P(this,"_handler",new hA),P(this,"_selectedRowsLookup",{}),P(this,"_checkboxColumnCellIndex",null),P(this,"_options"),P(this,"_defaults",{columnId:"_checkbox_selector",cssClass:void 0,hideSelectAllCheckbox:!1,name:"",toolTip:"Select/Deselect All",width:30,reorderable:!1,applySelectOnAllPages:!1,hideInColumnTitleRow:!1,hideInFilterHeaderRow:!0}),P(this,"_isSelectAllChecked",!1),P(this,"_bindingEventService"),this._bindingEventService=new uA,this._options=fr.extend(!0,{},this._defaults,e),this._selectAll_UID=this.createUID(),typeof this._options.selectableOverride=="function"&&this.selectableOverride(this._options.selectableOverride)}init(e){this._grid=e,this._isUsingDataView=!Array.isArray(e.getData()),this._isUsingDataView&&(this._dataView=e.getData()),this._handler.subscribe(this._grid.onSelectedRowsChanged,this.handleSelectedRowsChanged.bind(this)).subscribe(this._grid.onClick,this.handleClick.bind(this)).subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this)).subscribe(this._grid.onAfterSetColumns,()=>this.renderSelectAllCheckbox(this._isSelectAllChecked)),this._isUsingDataView&&this._dataView&&this._options.applySelectOnAllPages&&this._handler.subscribe(this._dataView.onSelectedRowIdsChanged,this.handleDataViewSelectedIdsChanged.bind(this)).subscribe(this._dataView.onPagingInfoChanged,this.handleDataViewSelectedIdsChanged.bind(this)),this._options.hideInFilterHeaderRow||this.addCheckboxToFilterHeaderRow(e),this._options.hideInColumnTitleRow||this._handler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this))}destroy(){this._handler.unsubscribeAll(),this._bindingEventService.unbindAll()}getOptions(){return this._options}setOptions(e){if(this._options=fr.extend(!0,{},this._options,e),this._options.hideSelectAllCheckbox)this.hideSelectAllFromColumnHeaderTitleRow(),this.hideSelectAllFromColumnHeaderFilterRow();else if(this._options.hideInColumnTitleRow?(this.hideSelectAllFromColumnHeaderTitleRow(),this._options.name&&this._grid.updateColumnHeader(this._options.columnId||"",this._options.name,"")):(this.renderSelectAllCheckbox(this._isSelectAllChecked),this._handler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this))),this._options.hideInFilterHeaderRow)this.hideSelectAllFromColumnHeaderFilterRow();else{let t=this._headerRowNode?.querySelector("#filter-checkbox-selectall-container");if(t){t.style.display="flex";let n=t.querySelector('input[type="checkbox"]');n&&(n.checked=this._isSelectAllChecked)}}}hideSelectAllFromColumnHeaderTitleRow(){this._grid.updateColumnHeader(this._options.columnId||"",this._options.name||"","")}hideSelectAllFromColumnHeaderFilterRow(){let e=this._headerRowNode?.querySelector("#filter-checkbox-selectall-container");e&&(e.style.display="none")}handleSelectedRowsChanged(){let e=this._grid.getSelectedRows(),t={},n=0,o=0,r=0,i=0;if(typeof this._selectableOverride=="function")for(r=0;r<this._grid.getDataLength();r++){let l=this._grid.getDataItem(r);this.checkSelectableOverride(o,l,this._grid)||i++}let a=[];for(o=0;o<e.length;o++){n=e[o];let l=this._grid.getDataItem(n);this.checkSelectableOverride(o,l,this._grid)?(t[n]=!0,t[n]!==this._selectedRowsLookup[n]&&(this._grid.invalidateRow(n),delete this._selectedRowsLookup[n])):a.push(n)}if(typeof this._selectedRowsLookup=="object"&&Object.keys(this._selectedRowsLookup).forEach(l=>{l!==void 0&&this._grid.invalidateRow(+l)}),this._selectedRowsLookup=t,this._grid.render(),this._isSelectAllChecked=(e?.length??0)+i>=this._grid.getDataLength(),(!this._isUsingDataView||!this._options.applySelectOnAllPages)&&(!this._options.hideInColumnTitleRow&&!this._options.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._options.hideInFilterHeaderRow)){let l=this._headerRowNode?.querySelector(`#header-filter-selector${this._selectAll_UID}`);l&&(l.checked=this._isSelectAllChecked)}if(a.length>0){for(o=0;o<a.length;o++){let l=e.indexOf(a[o]);e.splice(l,1)}this._grid.setSelectedRows(e,"click.cleanup")}}handleDataViewSelectedIdsChanged(){let e=this._dataView.getAllSelectedFilteredIds(),t=this._dataView.getFilteredItems(),n=0;if(typeof this._selectableOverride=="function"&&e.length>0)for(let o=0;o<this._dataView.getItemCount();o++){let r=this._dataView.getItemByIdx(o),i=this._dataView.getIdPropertyName(),a=r[i];t.findIndex(function(l){return l[i]===a})>=0&&!this.checkSelectableOverride(o,r,this._grid)&&n++}if(this._isSelectAllChecked=(e&&e.length)+n>=t.length,!this._options.hideInColumnTitleRow&&!this._options.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._options.hideInFilterHeaderRow){let o=this._headerRowNode?.querySelector(`#header-filter-selector${this._selectAll_UID}`);o&&(o.checked=this._isSelectAllChecked)}}handleKeyDown(e,t){e.which===32&&this._grid.getColumns()[t.cell].id===this._options.columnId&&((!this._grid.getEditorLock().isActive()||this._grid.getEditorLock().commitCurrentEdit())&&this.toggleRowSelection(t.row),e.preventDefault(),e.stopImmediatePropagation())}handleClick(e,t){if(this._grid.getColumns()[t.cell].id===this._options.columnId&&e.target.type==="checkbox"){if(this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){e.preventDefault(),e.stopImmediatePropagation();return}this.toggleRowSelection(t.row),e.stopPropagation(),e.stopImmediatePropagation()}}toggleRowSelection(e){let t=this._grid.getDataItem(e);if(this.checkSelectableOverride(e,t,this._grid)){if(this._selectedRowsLookup[e]){let n=this._grid.getSelectedRows().filter(o=>o!==e);this._grid.setSelectedRows(n,"click.toggle")}else this._grid.setSelectedRows(this._grid.getSelectedRows().concat(e),"click.toggle");this._grid.setActiveCell(e,this.getCheckboxColumnCellIndex())}}selectRows(e){let t=[];for(let n=0,o=e.length;n<o;n++)this._selectedRowsLookup[e[n]]||(t[t.length]=e[n]);this._grid.setSelectedRows(this._grid.getSelectedRows().concat(t),"SlickCheckboxSelectColumn.selectRows")}deSelectRows(e){let t=[];for(let n=0,o=e.length;n<o;n++)this._selectedRowsLookup[e[n]]&&(t[t.length]=e[n]);this._grid.setSelectedRows(this._grid.getSelectedRows().filter(n=>t.indexOf(n)<0),"SlickCheckboxSelectColumn.deSelectRows")}handleHeaderClick(e,t){if(t.column.id===this._options.columnId&&e.target.type==="checkbox"){if(this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){e.preventDefault(),e.stopImmediatePropagation();return}let n=e.target.checked,o=n?"click.selectAll":"click.unselectAll",r=[];if(n){for(let i=0;i<this._grid.getDataLength();i++){let a=this._grid.getDataItem(i);!a.__group&&!a.__groupTotals&&this.checkSelectableOverride(i,a,this._grid)&&r.push(i)}n=!0}if(this._isUsingDataView&&this._dataView&&this._options.applySelectOnAllPages){let i=[],a=this._dataView.getFilteredItems();for(let l=0;l<a.length;l++){let d=a[l];this.checkSelectableOverride(l,d,this._grid)&&i.push(d[this._dataView.getIdPropertyName()])}this._dataView.setSelectedIds(i,{isRowBeingAdded:n})}this._grid.setSelectedRows(r,o),e.stopPropagation(),e.stopImmediatePropagation()}}getCheckboxColumnCellIndex(){if(this._checkboxColumnCellIndex===null){this._checkboxColumnCellIndex=0;let e=this._grid.getColumns();for(let t=0;t<e.length;t++)e[t].id===this._options.columnId&&(this._checkboxColumnCellIndex=t)}return this._checkboxColumnCellIndex}createCheckboxElement(e,t=!1){let n=new DocumentFragment;return n.appendChild(fr.createDomElement("input",{id:e,type:"checkbox",checked:t,ariaChecked:String(t)})),n.appendChild(fr.createDomElement("label",{htmlFor:e})),n}getColumnDefinition(){return{id:this._options.columnId,reorderable:this._options.reorderable,name:this._options.hideSelectAllCheckbox||this._options.hideInColumnTitleRow?this._options.name||"":this.createCheckboxElement(`header-selector${this._selectAll_UID}`),toolTip:this._options.hideSelectAllCheckbox||this._options.hideInColumnTitleRow?"":this._options.toolTip,field:"sel",width:this._options.width,resizable:!1,sortable:!1,cssClass:this._options.cssClass,hideSelectAllCheckbox:this._options.hideSelectAllCheckbox,formatter:this.checkboxSelectionFormatter.bind(this),excludeFromColumnPicker:this._options.excludeFromColumnPicker??!0,excludeFromGridMenu:this._options.excludeFromGridMenu??!0,excludeFromHeaderMenu:this._options.excludeFromHeaderMenu??!0}}addCheckboxToFilterHeaderRow(e){this._handler.subscribe(e.onHeaderRowCellRendered,(t,n)=>{if(n.column.field==="sel"){fr.emptyElement(n.node);let o=fr.createDomElement("span",{id:"filter-checkbox-selectall-container",ariaChecked:"false"});o.appendChild(fr.createDomElement("input",{type:"checkbox",id:`header-filter-selector${this._selectAll_UID}`})),o.appendChild(fr.createDomElement("label",{htmlFor:`header-filter-selector${this._selectAll_UID}`})),n.node.appendChild(o),this._headerRowNode=n.node,this._bindingEventService.bind(o,"click",r=>this.handleHeaderClick(r,n))}})}createUID(){return Math.round(1e7*Math.random())}checkboxSelectionFormatter(e,t,n,o,r,i){if(r&&this.checkSelectableOverride(e,r,i)){let a=this.createUID()+e;return this.createCheckboxElement(`selector${a}`,!!this._selectedRowsLookup[e])}return null}checkSelectableOverride(e,t,n){return typeof this._selectableOverride=="function"?this._selectableOverride(e,t,n):!0}renderSelectAllCheckbox(e){this._grid.updateColumnHeader(this._options.columnId||"",this.createCheckboxElement(`header-selector${this._selectAll_UID}`,!!e),this._options.toolTip)}selectableOverride(e){this._selectableOverride=e}},pA=kc,mA=Zr,gA=XN,kd=go,yA=class{constructor(e){P(this,"pluginName","HeaderButtons"),P(this,"onCommand",new mA("onCommand")),P(this,"_grid"),P(this,"_handler",new gA),P(this,"_bindingEventService",new pA),P(this,"_defaults",{buttonCssClass:"slick-header-button"}),P(this,"_options"),this._options=kd.extend(!0,{},this._defaults,e)}init(e){this._grid=e,kd.addSlickEventPubSubWhenDefined(e.getPubSubService(),this),this._handler.subscribe(this._grid.onHeaderCellRendered,this.handleHeaderCellRendered.bind(this)).subscribe(this._grid.onBeforeHeaderCellDestroy,this.handleBeforeHeaderCellDestroy.bind(this)),this._grid.setColumns(this._grid.getColumns())}destroy(){this._handler.unsubscribeAll(),this._bindingEventService.unbindAll()}handleHeaderCellRendered(e,t){let n=t.column;if(n.header?.buttons){let o=n.header.buttons.length;for(;o--;){let r=n.header.buttons[o],i=this.runOverrideFunctionWhenExists(r.itemVisibilityOverride,t),a=this.runOverrideFunctionWhenExists(r.itemUsabilityOverride,t);if(!i)continue;Object.prototype.hasOwnProperty.call(r,"itemUsabilityOverride")&&(r.disabled=!a);let l=document.createElement("div");l.className=this._options.buttonCssClass||"",l.ariaLabel="Header Button",l.role="button",r.disabled&&l.classList.add("slick-header-button-disabled"),r.showOnHover&&l.classList.add("slick-header-button-hidden"),r.image&&(l.style.backgroundImage=`url(${r.image})`),r.cssClass&&l.classList.add(...kd.classNameToList(r.cssClass)),r.tooltip&&(l.title=r.tooltip),r.handler&&!r.disabled&&this._bindingEventService.bind(l,"click",r.handler),this._bindingEventService.bind(l,"click",this.handleButtonClick.bind(this,r,t.column)),t.node.appendChild(l)}}}handleBeforeHeaderCellDestroy(e,t){if(t.column.header?.buttons){let n=(this._options.buttonCssClass||"").replace(/(\s+)/g,".");n&&t.node.querySelectorAll(`.${n}`).forEach(o=>o.remove())}}handleButtonClick(e,t,n){let o=e.command||"",r={grid:this._grid,column:t,button:e};o&&(r.command=o),typeof e.action=="function"&&e.action.call(this,n,r),o&&!e.disabled&&(this.onCommand.notify(r,n,this),this._grid.updateColumnHeader(t.id)),n.preventDefault(),n.stopPropagation()}runOverrideFunctionWhenExists(e,t){return typeof e=="function"?e.call(this,t):!0}},vA=kc,Ed=KN,bA=Sa,Fn=go,wA=class{constructor(e){P(this,"pluginName","HeaderMenu"),P(this,"onAfterMenuShow",new Ed("onAfterMenuShow")),P(this,"onBeforeMenuShow",new Ed("onBeforeMenuShow")),P(this,"onCommand",new Ed("onCommand")),P(this,"_grid"),P(this,"_gridUid",""),P(this,"_handler",new bA),P(this,"_bindingEventService",new vA),P(this,"_defaults",{buttonCssClass:void 0,buttonImage:void 0,minWidth:100,autoAlign:!0,autoAlignOffset:0,subMenuOpenByEvent:"mouseover"}),P(this,"_options"),P(this,"_activeHeaderColumnElm"),P(this,"_menuElm"),P(this,"_subMenuParentId",""),this._options=Fn.extend(!0,{},e,this._defaults)}init(e){this._grid=e,this._gridUid=e?.getUID()||"",Fn.addSlickEventPubSubWhenDefined(e.getPubSubService(),this),this._handler.subscribe(this._grid.onHeaderCellRendered,this.handleHeaderCellRendered.bind(this)).subscribe(this._grid.onBeforeHeaderCellDestroy,this.handleBeforeHeaderCellDestroy.bind(this)),this._grid.setColumns(this._grid.getColumns()),this._bindingEventService.bind(document.body,"click",this.handleBodyMouseDown.bind(this))}setOptions(e){this._options=Fn.extend(!0,{},this._options,e)}getGridUidSelector(){let e=this._grid.getUID()||"";return e?`.${e}`:""}destroy(){this._handler.unsubscribeAll(),this._bindingEventService.unbindAll(),this._menuElm=this._menuElm||document.body.querySelector(`.slick-header-menu${this.getGridUidSelector()}`),this._menuElm?.remove(),this._activeHeaderColumnElm=void 0}destroyAllMenus(){this.destroySubMenus(),this._bindingEventService.unbindAll("parent-menu"),document.querySelectorAll(`.slick-header-menu${this.getGridUidSelector()}`).forEach(e=>e.remove())}destroySubMenus(){this._bindingEventService.unbindAll("sub-menu"),document.querySelectorAll(`.slick-header-menu.slick-submenu${this.getGridUidSelector()}`).forEach(e=>e.remove())}handleBodyMouseDown(e){let t=!1;this._menuElm?.contains(e.target)&&(t=!0),t||document.querySelectorAll(`.slick-header-menu.slick-submenu${this.getGridUidSelector()}`).forEach(n=>{n.contains(e.target)&&(t=!0)}),(this._menuElm!==e.target&&!t&&!e.defaultPrevented||e.target.className==="close")&&this.hideMenu()}hideMenu(){this._menuElm&&(this._menuElm.remove(),this._menuElm=void 0),this._activeHeaderColumnElm?.classList.remove("slick-header-column-active"),this.destroySubMenus()}handleHeaderCellRendered(e,t){let n=t.column?.header?.menu;if(n?.items&&console.warn('[SlickGrid] Header Menu "items" property was deprecated in favor of "commandItems" to align with all other Menu plugins.'),n){if(!this.runOverrideFunctionWhenExists(this._options.menuUsabilityOverride,t))return;let o=document.createElement("div");if(o.className="slick-header-menubutton",o.ariaLabel="Header Menu",o.role="button",!this._options.buttonCssClass&&!this._options.buttonImage&&(this._options.buttonCssClass="caret"),this._options.buttonCssClass){let r=document.createElement("span");r.classList.add(...Fn.classNameToList(this._options.buttonCssClass)),o.appendChild(r)}this._options.buttonImage&&(o.style.backgroundImage=`url(${this._options.buttonImage})`),this._options.tooltip&&(o.title=this._options.tooltip),this._bindingEventService.bind(o,"click",r=>{this.destroyAllMenus(),this.createParentMenu(r,n,t.column)}),t.node.appendChild(o)}}handleBeforeHeaderCellDestroy(e,t){t.column.header?.menu&&t.node.querySelectorAll(".slick-header-menubutton").forEach(n=>n.remove())}addSubMenuTitleWhenExists(e,t){if(e!=="divider"&&e?.subMenuTitle){let n=document.createElement("div");n.className="slick-menu-title",n.textContent=e.subMenuTitle;let o=e.subMenuTitleCssClass;o&&n.classList.add(...Fn.classNameToList(o)),t.appendChild(n)}}createParentMenu(e,t,n){let o={grid:this._grid,column:n,menu:t};if(this.onBeforeMenuShow.notify(o,e,this).getReturnValue()===!1)return;this._menuElm=this.createMenu(t.commandItems||t.items,n);let r=this._grid.getContainerNode();r&&r.appendChild(this._menuElm),this.repositionMenu(e,this._menuElm),this.onAfterMenuShow.notify(o,e,this).getReturnValue()!==!1&&(e.preventDefault(),e.stopPropagation())}createMenu(e,t,n=0,o){let r=n>0,i=o?.command,a=n===1&&i?i.replaceAll(" ",""):"";a&&(this._subMenuParentId=a),r&&(a=this._subMenuParentId);let l=`slick-header-menu slick-menu-level-${n} ${this._gridUid}`,d=document.body.querySelector(`.slick-header-menu.slick-menu-level-${n}${this.getGridUidSelector()}`);if(d){if(d.dataset.subMenuParent===a)return d;this.destroySubMenus()}let u=document.createElement("div");u.className=l,n>0&&(u.classList.add("slick-submenu"),a&&(u.dataset.subMenuParent=a)),u.classList.add(this._gridUid),u.role="menu",u.ariaLabel=n>1?"SubMenu":"Header Menu",u.style.minWidth=`${this._options.minWidth}px`,u.setAttribute("aria-expanded","true");let f={grid:this._grid,column:t,menu:{items:e}};o&&n>0&&this.addSubMenuTitleWhenExists(o,u);for(let p=0;p<e.length;p++){let y=!0,w=e[p],b=this.runOverrideFunctionWhenExists(w.itemVisibilityOverride,f),m=this.runOverrideFunctionWhenExists(w.itemUsabilityOverride,f);if(!b)continue;Object.prototype.hasOwnProperty.call(w,"itemUsabilityOverride")&&(w.disabled=!m);let v=document.createElement("div");v.className="slick-header-menuitem",v.role="menuitem",(w.divider||w==="divider")&&(v.classList.add("slick-header-menuitem-divider"),y=!1),w.disabled&&v.classList.add("slick-header-menuitem-disabled"),w.hidden&&v.classList.add("slick-header-menuitem-hidden"),w.cssClass&&v.classList.add(...Fn.classNameToList(w.cssClass)),w.tooltip&&(v.title=w.tooltip||"");let D=document.createElement("div");D.className="slick-header-menuicon",v.appendChild(D),w.iconCssClass&&D.classList.add(...Fn.classNameToList(w.iconCssClass)),w.iconImage&&(D.style.backgroundImage="url("+w.iconImage+")");let k=document.createElement("span");if(k.className="slick-header-menucontent",k.textContent=w.title||"",v.appendChild(k),w.textCssClass&&k.classList.add(...Fn.classNameToList(w.textCssClass)),u.appendChild(v),y){let x=r?"sub-menu":"parent-menu";this._bindingEventService.bind(v,"click",this.handleMenuItemClick.bind(this,w,t,n),void 0,x)}if(this._options.subMenuOpenByEvent==="mouseover"&&this._bindingEventService.bind(v,"mouseover",x=>{w.commandItems||w.items?this.repositionSubMenu(w,t,n,x):r||this.destroySubMenus()}),w.commandItems||w.items){let x=document.createElement("div");x.className="sub-item-chevron",this._options.subItemChevronClass?x.classList.add(...Fn.classNameToList(this._options.subItemChevronClass)):x.textContent="⮞",v.classList.add("slick-submenu-item"),v.appendChild(x)}}return u}handleMenuItemClick(e,t,n=0,o){if(e!=="divider"&&!e.disabled&&!e.divider){let r=e.command||"";if(Fn.isDefined(r)&&!e.commandItems&&!e.items){let i={grid:this._grid,column:t,command:r,item:e};this.onCommand.notify(i,o,this),typeof e.action=="function"&&e.action.call(this,o,i),o.defaultPrevented||this.hideMenu()}else e.commandItems||e.items?this.repositionSubMenu(e,t,n,o):this.destroySubMenus()}}repositionSubMenu(e,t,n,o){o.target.classList.contains("slick-header-menubutton")&&this.destroySubMenus();let r=this.createMenu(e.commandItems||e.items||[],t,n+1,e);document.body.appendChild(r),this.repositionMenu(o,r)}repositionMenu(e,t){let n=e.target,o=t.classList.contains("slick-submenu"),r=o?e.target.closest(".slick-header-menuitem"):n,i=Fn.offset(n),a=this._grid.getGridPosition(),l=t.offsetWidth,d=Fn.offset(this._menuElm),u=Fn.offset(r),f=o?u?.top??0:n.clientHeight??i?.top??0+(this._options?.menuOffsetTop??0),p=o?u?.left??0:i?.left??0;if(o&&r){let y=p+Number(l);o&&(y+=r.clientWidth);let w=document.documentElement.clientWidth;(y>=a.width||y>=w?"left":"right")=="left"?(t.classList.remove("dropright"),t.classList.add("dropleft"),p-=l):(t.classList.remove("dropleft"),t.classList.add("dropright"),o&&(p+=r.offsetWidth))}else p+t.offsetWidth>=a.width&&(p=p+n.clientWidth-t.clientWidth+(this._options.autoAlignOffset||0)),p-=d?.left??0;t.style.top=`${f}px`,t.style.left=`${p}px`,this._activeHeaderColumnElm=t.closest(".slick-header-column"),this._activeHeaderColumnElm&&this._activeHeaderColumnElm.classList.add("slick-header-column-active")}runOverrideFunctionWhenExists(e,t){return typeof e=="function"?e.call(this,t):!0}},CA=Rh,Pd=Br,SA=jv,_A=dA,xA=Zr,RA=na,TA=Sa,Dd=xh,Ja=go,kA=class{constructor(e){P(this,"pluginName","RowSelectionModel"),P(this,"onSelectedRangesChanged",new xA("onSelectedRangesChanged")),P(this,"_grid"),P(this,"_ranges",[]),P(this,"_eventHandler",new TA),P(this,"_inHandler",!1),P(this,"_selector"),P(this,"_isRowMoveManagerHandler"),P(this,"_options"),P(this,"_defaults",{selectActiveRow:!0,dragToSelect:!1,autoScrollWhenDrag:!0,cellRangeSelector:void 0}),this._options=Ja.extend(!0,{},this._defaults,e)}init(e){if(CA===void 0)throw new Error('Slick.Draggable is undefined, make sure to import "slick.interactions.js"');if(this._selector=this._options.cellRangeSelector,this._grid=e,Ja.addSlickEventPubSubWhenDefined(e.getPubSubService(),this),!this._selector&&this._options.dragToSelect){if(!SA)throw new Error("Slick.CellRangeDecorator is required when option dragToSelect set to true");this._selector=new _A({selectionCss:{border:"none"},autoScroll:this._options.autoScrollWhenDrag})}this._eventHandler.subscribe(this._grid.onActiveCellChanged,this.wrapHandler(this.handleActiveCellChange).bind(this)),this._eventHandler.subscribe(this._grid.onKeyDown,this.wrapHandler(this.handleKeyDown).bind(this)),this._eventHandler.subscribe(this._grid.onClick,this.wrapHandler(this.handleClick).bind(this)),this._selector&&(e.registerPlugin(this._selector),this._selector.onCellRangeSelecting.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.subscribe(this.handleBeforeCellRangeSelected.bind(this)))}destroy(){this._eventHandler.unsubscribeAll(),this._selector&&(this._selector.onCellRangeSelecting.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.unsubscribe(this.handleBeforeCellRangeSelected.bind(this)),this._grid.unregisterPlugin(this._selector),this._selector.destroy&&this._selector.destroy())}wrapHandler(e){return(...t)=>{this._inHandler||(this._inHandler=!0,e.apply(this,t),this._inHandler=!1)}}rangesToRows(e){let t=[];for(let n=0;n<e.length;n++)for(let o=e[n].fromRow;o<=e[n].toRow;o++)t.push(o);return t}rowsToRanges(e){let t=[],n=this._grid.getColumns().length-1;return e.forEach(o=>t.push(new Dd(o,0,o,n))),t}getRowsRange(e,t){let n,o=[];for(n=e;n<=t;n++)o.push(n);for(n=t;n<e;n++)o.push(n);return o}getSelectedRows(){return this.rangesToRows(this._ranges)}setSelectedRows(e){this.setSelectedRanges(this.rowsToRanges(e),"SlickRowSelectionModel.setSelectedRows")}setSelectedRanges(e,t="SlickRowSelectionModel.setSelectedRanges"){if((!this._ranges||this._ranges.length===0)&&(!e||e.length===0))return;this._ranges=e;let n=new RA(new CustomEvent("click",{detail:{caller:t}}),this._ranges);this.onSelectedRangesChanged.notify(this._ranges,n)}getSelectedRanges(){return this._ranges}refreshSelections(){this.setSelectedRows(this.getSelectedRows())}handleActiveCellChange(e,t){this._options.selectActiveRow&&Ja.isDefined(t.row)&&this.setSelectedRanges([new Dd(t.row,0,t.row,this._grid.getColumns().length-1)])}handleKeyDown(e){let t=this._grid.getActiveCell();if(this._grid.getOptions().multiSelect&&t&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.which===Pd.UP||e.which===Pd.DOWN)){let n=this.getSelectedRows();n.sort(function(a,l){return a-l}),n.length||(n=[t.row]);let o=n[0],r=n[n.length-1],i;if(e.which===Pd.DOWN?i=t.row<r||o===r?++r:++o:i=t.row<r?--r:--o,i>=0&&i<this._grid.getDataLength()){this._grid.scrollRowIntoView(i);let a=this.rowsToRanges(this.getRowsRange(o,r));this.setSelectedRanges(a)}e.preventDefault(),e.stopPropagation()}}handleClick(e){let t=this._grid.getCellFromEvent(e);if(!t||!this._grid.canCellBeActive(t.row,t.cell)||!this._grid.getOptions().multiSelect||!e.ctrlKey&&!e.shiftKey&&!e.metaKey)return!1;let n=this.rangesToRows(this._ranges),o=n.indexOf(t.row);if(o===-1&&(e.ctrlKey||e.metaKey))n.push(t.row),this._grid.setActiveCell(t.row,t.cell);else if(o!==-1&&(e.ctrlKey||e.metaKey))n=n.filter(i=>i!==t.row),this._grid.setActiveCell(t.row,t.cell);else if(n.length&&e.shiftKey){let i=n.pop(),a=Math.min(t.row,i),l=Math.max(t.row,i);n=[];for(let d=a;d<=l;d++)d!==i&&n.push(d);n.push(i),this._grid.setActiveCell(t.row,t.cell)}let r=this.rowsToRanges(n);return this.setSelectedRanges(r),e.stopImmediatePropagation(),!0}handleBeforeCellRangeSelected(e,t){if(!this._isRowMoveManagerHandler){let n=this._grid.getPluginByName("RowMoveManager")||this._grid.getPluginByName("CrossGridRowMoveManager");this._isRowMoveManagerHandler=n?n.isHandlerColumn:Ja.noop}if(this._grid.getEditorLock().isActive()||this._isRowMoveManagerHandler(t.cell))return e.stopPropagation(),!1;this._grid.setActiveCell(t.row,t.cell)}handleCellRangeSelected(e,t){if(!this._grid.getOptions().multiSelect||!this._options.selectActiveRow)return!1;this.setSelectedRanges([new Dd(t.range.fromRow,0,t.range.toRow,this._grid.getColumns().length-1)])}},EA=Br,Od=Lv,mi=go,Bv=class{constructor(e){P(this,"pluginName","GroupItemMetadataProvider"),P(this,"_grid"),P(this,"_options"),P(this,"_defaults",{checkboxSelect:!1,checkboxSelectCssClass:"slick-group-select-checkbox",checkboxSelectPlugin:null,groupCssClass:"slick-group",groupTitleCssClass:"slick-group-title",totalsCssClass:"slick-group-totals",groupFocusable:!0,totalsFocusable:!1,toggleCssClass:"slick-group-toggle",toggleExpandedCssClass:"expanded",toggleCollapsedCssClass:"collapsed",enableExpandCollapse:!0,groupFormatter:this.defaultGroupCellFormatter.bind(this),totalsFormatter:this.defaultTotalsCellFormatter.bind(this),includeHeaderTotals:!1}),this._options=mi.extend(!0,{},this._defaults,e)}get dataView(){return this._grid?.getData?.()??{}}getOptions(){return this._options}setOptions(e){mi.extend(!0,this._options,e)}defaultGroupCellFormatter(e,t,n,o,r){if(!this._options.enableExpandCollapse)return r.title;let i=`${r.level*15}px`,a=r.collapsed?this._options.toggleCollapsedCssClass:this._options.toggleExpandedCssClass,l=document.createDocumentFragment();this._options.checkboxSelect&&l.appendChild(mi.createDomElement("span",{className:`${this._options.checkboxSelectCssClass} ${r.selectChecked?"checked":"unchecked"}`})),l.appendChild(mi.createDomElement("span",{className:`${this._options.toggleCssClass} ${a}`,ariaExpanded:String(!r.collapsed),style:{marginLeft:i}}));let d=mi.createDomElement("span",{className:this._options.groupTitleCssClass||""});return d.setAttribute("level",r.level),r.title instanceof HTMLElement?d.appendChild(r.title):this._grid.applyHtmlCode(d,r.title??""),l.appendChild(d),l}defaultTotalsCellFormatter(e,t,n,o,r,i){return o?.groupTotalsFormatter?.(r,o,i)??""}init(e){this._grid=e,this._grid.onClick.subscribe(this.handleGridClick.bind(this)),this._grid.onKeyDown.subscribe(this.handleGridKeyDown.bind(this))}destroy(){this._grid&&(this._grid.onClick.unsubscribe(this.handleGridClick.bind(this)),this._grid.onKeyDown.unsubscribe(this.handleGridKeyDown.bind(this)))}handleGridClick(e,t){let n=e.target,o=this._grid.getDataItem(t.row);if(o&&o instanceof Od&&n.classList.contains(this._options.toggleCssClass||"")&&(this.handleDataViewExpandOrCollapse(o),e.stopImmediatePropagation(),e.preventDefault()),o&&o instanceof Od&&n.classList.contains(this._options.checkboxSelectCssClass||"")){o.selectChecked=!o.selectChecked,n.classList.remove(o.selectChecked?"unchecked":"checked"),n.classList.add(o.selectChecked?"checked":"unchecked");let r=this.dataView.mapItemsToRows(o.rows);o.selectChecked?this._options.checkboxSelectPlugin.selectRows(r):this._options.checkboxSelectPlugin.deSelectRows(r)}}handleGridKeyDown(e){if(this._options.enableExpandCollapse&&e.which===EA.SPACE){let t=this._grid.getActiveCell();if(t){let n=this._grid.getDataItem(t.row);n&&n instanceof Od&&(this.handleDataViewExpandOrCollapse(n),e.stopImmediatePropagation(),e.preventDefault())}}}handleDataViewExpandOrCollapse(e){let t=this._grid.getRenderedRange();this.dataView.setRefreshHints({ignoreDiffsBefore:t.top,ignoreDiffsAfter:t.bottom+1}),e.collapsed?this.dataView.expandGroup(e.groupingKey):this.dataView.collapseGroup(e.groupingKey)}getGroupRowMetadata(e,t,n){let o=e?.level;return{selectable:!1,focusable:this._options.groupFocusable,cssClasses:`${this._options.groupCssClass} slick-group-level-${o}`,formatter:this._options.includeHeaderTotals&&this._options.totalsFormatter||void 0,columns:{0:{colspan:this._options.includeHeaderTotals?"1":"*",formatter:this._options.groupFormatter,editor:null}}}}getTotalsRowMetadata(e,t,n){let o=e?.group?.level;return{selectable:!1,focusable:this._options.totalsFocusable,cssClasses:`${this._options.totalsCssClass} slick-group-level-${o}`,formatter:this._options.totalsFormatter,editor:null}}},zo=Zr,Md=na,_m=Lv,PA=UN,zn=go,DA=Bv,OA=class{constructor(e,t){this.externalPubSub=t,P(this,"defaults",{globalItemMetadataProvider:null,groupItemMetadataProvider:null,inlineFilters:!1,useCSPSafeFilter:!1}),P(this,"idProperty","id"),P(this,"items",[]),P(this,"rows",[]),P(this,"idxById",new Map),P(this,"rowsById"),P(this,"filter",null),P(this,"filterCSPSafe",null),P(this,"updated",null),P(this,"suspend",!1),P(this,"isBulkSuspend",!1),P(this,"bulkDeleteIds",new Map),P(this,"sortAsc",!0),P(this,"fastSortField"),P(this,"sortComparer"),P(this,"refreshHints",{}),P(this,"prevRefreshHints",{}),P(this,"filterArgs"),P(this,"filteredItems",[]),P(this,"compiledFilter"),P(this,"compiledFilterCSPSafe"),P(this,"compiledFilterWithCaching"),P(this,"compiledFilterWithCachingCSPSafe"),P(this,"filterCache",[]),P(this,"_grid"),P(this,"groupingInfoDefaults",{getter:void 0,formatter:void 0,comparer:(n,o)=>n.value===o.value?0:n.value>o.value?1:-1,predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1}),P(this,"groupingInfos",[]),P(this,"groups",[]),P(this,"toggledGroupsByLevel",[]),P(this,"groupingDelimiter",":|:"),P(this,"selectedRowIds",[]),P(this,"preSelectedRowIdsChangeFn"),P(this,"pagesize",0),P(this,"pagenum",0),P(this,"totalRows",0),P(this,"_options"),P(this,"_container"),P(this,"onBeforePagingInfoChanged"),P(this,"onGroupExpanded"),P(this,"onGroupCollapsed"),P(this,"onPagingInfoChanged"),P(this,"onRowCountChanged"),P(this,"onRowsChanged"),P(this,"onRowsOrCountChanged"),P(this,"onSelectedRowIdsChanged"),P(this,"onSetItemsCalled"),this.onBeforePagingInfoChanged=new zo("onBeforePagingInfoChanged",t),this.onGroupExpanded=new zo("onGroupExpanded",t),this.onGroupCollapsed=new zo("onGroupCollapsed",t),this.onPagingInfoChanged=new zo("onPagingInfoChanged",t),this.onRowCountChanged=new zo("onRowCountChanged",t),this.onRowsChanged=new zo("onRowsChanged",t),this.onRowsOrCountChanged=new zo("onRowsOrCountChanged",t),this.onSelectedRowIdsChanged=new zo("onSelectedRowIdsChanged",t),this.onSetItemsCalled=new zo("onSetItemsCalled",t),this._options=zn.extend(!0,{},this.defaults,e)}beginUpdate(e){this.suspend=!0,this.isBulkSuspend=e===!0}endUpdate(){let e=this.isBulkSuspend;this.isBulkSuspend=!1,this.suspend=!1,e&&(this.processBulkDelete(),this.ensureIdUniqueness()),this.refresh()}destroy(){this.items=[],this.idxById=null,this.rowsById=null,this.filter=null,this.filterCSPSafe=null,this.updated=null,this.sortComparer=null,this.filterCache=[],this.filteredItems=[],this.compiledFilter=null,this.compiledFilterCSPSafe=null,this.compiledFilterWithCaching=null,this.compiledFilterWithCachingCSPSafe=null,this._grid&&this._grid.onSelectedRowsChanged&&this._grid.onCellCssStylesChanged&&(this._grid.onSelectedRowsChanged.unsubscribe(),this._grid.onCellCssStylesChanged.unsubscribe()),this.onRowsOrCountChanged&&this.onRowsOrCountChanged.unsubscribe()}setRefreshHints(e){this.refreshHints=e}getFilterArgs(){return this.filterArgs}setFilterArgs(e){this.filterArgs=e}processBulkDelete(){if(!this.idxById)return;let e,t,n=0;for(let o=0,r=this.items.length;o<r;o++){if(t=this.items[o],e=t[this.idProperty],e===void 0)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");this.bulkDeleteIds.has(e)?this.idxById.delete(e):(this.items[n]=t,this.idxById.set(e,n),++n)}this.items.length=n,this.bulkDeleteIds=new Map}updateIdxById(e){if(this.isBulkSuspend||!this.idxById)return;e=e||0;let t;for(let n=e,o=this.items.length;n<o;n++){if(t=this.items[n][this.idProperty],t===void 0)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");this.idxById.set(t,n)}}ensureIdUniqueness(){if(this.isBulkSuspend||!this.idxById)return;let e;for(let t=0,n=this.items.length;t<n;t++)if(e=this.items[t][this.idProperty],e===void 0||this.idxById.get(e)!==t)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property")}getItems(){return this.items}getIdPropertyName(){return this.idProperty}setItems(e,t){t!==void 0&&(this.idProperty=t),this.items=this.filteredItems=e,this.onSetItemsCalled.notify({idProperty:this.idProperty,itemCount:this.items.length},null,this),this.idxById=new Map,this.updateIdxById(),this.ensureIdUniqueness(),this.refresh()}setPagingOptions(e){this.onBeforePagingInfoChanged.notify(this.getPagingInfo(),null,this).getReturnValue()!==!1&&(zn.isDefined(e.pageSize)&&(this.pagesize=e.pageSize,this.pagenum=this.pagesize?Math.min(this.pagenum,Math.max(0,Math.ceil(this.totalRows/this.pagesize)-1)):0),zn.isDefined(e.pageNum)&&(this.pagenum=Math.min(e.pageNum,Math.max(0,Math.ceil(this.totalRows/this.pagesize)-1))),this.onPagingInfoChanged.notify(this.getPagingInfo(),null,this),this.refresh())}getPagingInfo(){let e=this.pagesize?Math.max(1,Math.ceil(this.totalRows/this.pagesize)):1;return{pageSize:this.pagesize,pageNum:this.pagenum,totalRows:this.totalRows,totalPages:e,dataView:this}}sort(e,t){this.sortAsc=t,this.sortComparer=e,this.fastSortField=null,t===!1&&this.items.reverse(),this.items.sort(e),t===!1&&this.items.reverse(),this.idxById=new Map,this.updateIdxById(),this.refresh()}fastSort(e,t){this.sortAsc=t,this.fastSortField=e,this.sortComparer=null;let n=Object.prototype.toString;Object.prototype.toString=typeof e=="function"?e:function(){return this[e]},t===!1&&this.items.reverse(),this.items.sort(),Object.prototype.toString=n,t===!1&&this.items.reverse(),this.idxById=new Map,this.updateIdxById(),this.refresh()}reSort(){this.sortComparer?this.sort(this.sortComparer,this.sortAsc):this.fastSortField&&this.fastSort(this.fastSortField,this.sortAsc)}getFilteredItems(){return this.filteredItems}getFilteredItemCount(){return this.filteredItems.length}getFilter(){return this._options.useCSPSafeFilter?this.filterCSPSafe:this.filter}setFilter(e){this.filterCSPSafe=e,this.filter=e,this._options.inlineFilters&&(this.compiledFilterCSPSafe=this.compileFilterCSPSafe,this.compiledFilterWithCachingCSPSafe=this.compileFilterWithCachingCSPSafe,this.compiledFilter=this.compileFilter(this._options.useCSPSafeFilter),this.compiledFilterWithCaching=this.compileFilterWithCaching(this._options.useCSPSafeFilter)),this.refresh()}getGrouping(){return this.groupingInfos}setGrouping(e){this._options.groupItemMetadataProvider||(this._options.groupItemMetadataProvider=new DA),this.groups=[],this.toggledGroupsByLevel=[],e=e||[],this.groupingInfos=e instanceof Array?e:[e];for(let t=0;t<this.groupingInfos.length;t++){let n=this.groupingInfos[t]=zn.extend(!0,{},this.groupingInfoDefaults,this.groupingInfos[t]);n.getterIsAFn=typeof n.getter=="function",n.compiledAccumulators=[];let o=n.aggregators.length;for(;o--;)n.compiledAccumulators[o]=this.compileAccumulatorLoopCSPSafe(n.aggregators[o]);this.toggledGroupsByLevel[t]={}}this.refresh()}getItemByIdx(e){return this.items[e]}getIdxById(e){return this.idxById?.get(e)}ensureRowsByIdCache(){if(!this.rowsById){this.rowsById={};for(let e=0,t=this.rows.length;e<t;e++)this.rowsById[this.rows[e][this.idProperty]]=e}}getRowByItem(e){return this.ensureRowsByIdCache(),this.rowsById?.[e[this.idProperty]]}getRowById(e){return this.ensureRowsByIdCache(),this.rowsById?.[e]}getItemById(e){return this.items[this.idxById.get(e)]}mapItemsToRows(e){let t=[];this.ensureRowsByIdCache();for(let n=0,o=e.length;n<o;n++){let r=this.rowsById?.[e[n][this.idProperty]];zn.isDefined(r)&&(t[t.length]=r)}return t}mapIdsToRows(e){let t=[];this.ensureRowsByIdCache();for(let n=0,o=e.length;n<o;n++){let r=this.rowsById?.[e[n]];zn.isDefined(r)&&(t[t.length]=r)}return t}mapRowsToIds(e){let t=[];for(let n=0,o=e.length;n<o;n++)if(e[n]<this.rows.length){let r=this.rows[e[n]];t[t.length]=r[this.idProperty]}return t}updateSingleItem(e,t){if(this.idxById){if(!this.idxById.has(e))throw new Error("[SlickGrid DataView] Invalid id");if(e!==t[this.idProperty]){let n=t[this.idProperty];if(!zn.isDefined(n))throw new Error("[SlickGrid DataView] Cannot update item to associate with a null id");if(this.idxById.has(n))throw new Error("[SlickGrid DataView] Cannot update item to associate with a non-unique id");this.idxById.set(n,this.idxById.get(e)),this.idxById.delete(e),this.updated?.[e]&&delete this.updated[e],e=n}this.items[this.idxById.get(e)]=t,this.updated||(this.updated={}),this.updated[e]=!0}}updateItem(e,t){this.updateSingleItem(e,t),this.refresh()}updateItems(e,t){if(e.length!==t.length)throw new Error("[SlickGrid DataView] Mismatch on the length of ids and items provided to update");for(let n=0,o=t.length;n<o;n++)this.updateSingleItem(e[n],t[n]);this.refresh()}insertItem(e,t){this.items.splice(e,0,t),this.updateIdxById(e),this.refresh()}insertItems(e,t){Array.prototype.splice.apply(this.items,[e,0].concat(t)),this.updateIdxById(e),this.refresh()}addItem(e){this.items.push(e),this.updateIdxById(this.items.length-1),this.refresh()}addItems(e){this.items=this.items.concat(e),this.updateIdxById(this.items.length-e.length),this.refresh()}deleteItem(e){if(this.idxById)if(this.isBulkSuspend)this.bulkDeleteIds.set(e,!0);else{let t=this.idxById.get(e);if(t===void 0)throw new Error("[SlickGrid DataView] Invalid id");this.idxById.delete(e),this.items.splice(t,1),this.updateIdxById(t),this.refresh()}}deleteItems(e){if(!(e.length===0||!this.idxById))if(this.isBulkSuspend)for(let t=0,n=e.length;t<n;t++){let o=e[t];if(this.idxById.get(o)===void 0)throw new Error("[SlickGrid DataView] Invalid id");this.bulkDeleteIds.set(o,!0)}else{let t=[];for(let n=0,o=e.length;n<o;n++){let r=e[n],i=this.idxById.get(r);if(i===void 0)throw new Error("[SlickGrid DataView] Invalid id");this.idxById.delete(r),t.push(i)}t.sort();for(let n=t.length-1;n>=0;--n)this.items.splice(t[n],1);this.updateIdxById(t[0]),this.refresh()}}sortedAddItem(e){if(!this.sortComparer)throw new Error("[SlickGrid DataView] sortedAddItem() requires a sort comparer, use sort()");this.insertItem(this.sortedIndex(e),e)}sortedUpdateItem(e,t){if(!this.idxById)return;if(!this.idxById.has(e)||e!==t[this.idProperty])throw new Error("[SlickGrid DataView] Invalid or non-matching id "+this.idxById.get(e));if(!this.sortComparer)throw new Error("[SlickGrid DataView] sortedUpdateItem() requires a sort comparer, use sort()");let n=this.getItemById(e);this.sortComparer(n,t)!==0?(this.deleteItem(e),this.sortedAddItem(t)):this.updateItem(e,t)}sortedIndex(e){let t=0,n=this.items.length;for(;t<n;){let o=t+n>>>1;this.sortComparer(this.items[o],e)===-1?t=o+1:n=o}return t}getItemCount(){return this.items.length}getLength(){return this.rows.length}getItem(e){let t=this.rows[e];if(t?.__group&&t.totals&&!t.totals?.initialized){let n=this.groupingInfos[t.level];n.displayTotalsRow||(this.calculateTotals(t.totals),t.title=n.formatter?n.formatter(t):t.value)}else t?.__groupTotals&&!t.initialized&&this.calculateTotals(t);return t}getItemMetadata(e){let t=this.rows[e];return t===void 0?null:this._options.globalItemMetadataProvider?.getRowMetadata?this._options.globalItemMetadataProvider.getRowMetadata(t,e):t.__group&&this._options.groupItemMetadataProvider?.getGroupRowMetadata?this._options.groupItemMetadataProvider.getGroupRowMetadata(t,e):t.__groupTotals&&this._options.groupItemMetadataProvider?.getTotalsRowMetadata?this._options.groupItemMetadataProvider.getTotalsRowMetadata(t,e):null}expandCollapseAllGroups(e,t){if(zn.isDefined(e))this.toggledGroupsByLevel[e]={},this.groupingInfos[e].collapsed=t,t===!0?this.onGroupCollapsed.notify({level:e,groupingKey:null}):this.onGroupExpanded.notify({level:e,groupingKey:null});else for(let n=0;n<this.groupingInfos.length;n++)this.toggledGroupsByLevel[n]={},this.groupingInfos[n].collapsed=t,t===!0?this.onGroupCollapsed.notify({level:n,groupingKey:null}):this.onGroupExpanded.notify({level:n,groupingKey:null});this.refresh()}collapseAllGroups(e){this.expandCollapseAllGroups(e,!0)}expandAllGroups(e){this.expandCollapseAllGroups(e,!1)}expandCollapseGroup(e,t,n){this.toggledGroupsByLevel[e][t]=this.groupingInfos[e].collapsed^n,this.refresh()}collapseGroup(...e){let t=Array.prototype.slice.call(e)[0],n,o;e.length===1&&t.indexOf(this.groupingDelimiter)!==-1?(n=t,o=t.split(this.groupingDelimiter).length-1):(n=e.join(this.groupingDelimiter),o=e.length-1),this.expandCollapseGroup(o,n,!0),this.onGroupCollapsed.notify({level:o,groupingKey:n})}expandGroup(...e){let t=Array.prototype.slice.call(e)[0],n,o;e.length===1&&t.indexOf(this.groupingDelimiter)!==-1?(o=t.split(this.groupingDelimiter).length-1,n=t):(o=e.length-1,n=e.join(this.groupingDelimiter)),this.expandCollapseGroup(o,n,!1),this.onGroupExpanded.notify({level:o,groupingKey:n})}getGroups(){return this.groups}extractGroups(e,t){let n,o,r=[],i={},a,l=t?t.level+1:0,d=this.groupingInfos[l];for(let u=0,f=d.predefinedValues?.length??0;u<f;u++)o=d.predefinedValues?.[u],n=i[o],n||(n=new _m,n.value=o,n.level=l,n.groupingKey=(t?t.groupingKey+this.groupingDelimiter:"")+o,r[r.length]=n,i[o]=n);for(let u=0,f=e.length;u<f;u++)a=e[u],o=d.getterIsAFn?d.getter(a):a[d.getter],n=i[o],n||(n=new _m,n.value=o,n.level=l,n.groupingKey=(t?t.groupingKey+this.groupingDelimiter:"")+o,r[r.length]=n,i[o]=n),n.rows[n.count++]=a;if(l<this.groupingInfos.length-1)for(let u=0;u<r.length;u++)n=r[u],n.groups=this.extractGroups(n.rows,n);return r.length&&this.addTotals(r,l),r.sort(this.groupingInfos[l].comparer),r}calculateTotals(e){let t=e.group,n=this.groupingInfos[t.level??0],o=t.level===this.groupingInfos.length,r,i=n.aggregators.length;if(!o&&n.aggregateChildGroups){let a=t.groups?.length??0;for(;a--;)t.groups[a].totals.initialized||this.calculateTotals(t.groups[a].totals)}for(;i--;)r=n.aggregators[i],r.init(),!o&&n.aggregateChildGroups?n.compiledAccumulators[i].call(r,t.groups):n.compiledAccumulators[i].call(r,t.rows),r.storeResult(e);e.initialized=!0}addGroupTotals(e){let t=this.groupingInfos[e.level],n=new PA;n.group=e,e.totals=n,t.lazyTotalsCalculation||this.calculateTotals(n)}addTotals(e,t){t=t||0;let n=this.groupingInfos[t],o=n.collapsed,r=this.toggledGroupsByLevel[t],i=e.length,a;for(;i--;)a=e[i],!(a.collapsed&&!n.aggregateCollapsed)&&(a.groups&&this.addTotals(a.groups,t+1),n.aggregators?.length&&(n.aggregateEmpty||a.rows.length||a.groups?.length)&&this.addGroupTotals(a),a.collapsed=o^r[a.groupingKey],a.title=n.formatter?n.formatter(a):a.value)}flattenGroupedRows(e,t){t=t||0;let n=this.groupingInfos[t],o=[],r,i=0,a;for(let l=0,d=e.length;l<d;l++){if(a=e[l],o[i++]=a,!a.collapsed){r=a.groups?this.flattenGroupedRows(a.groups,t+1):a.rows;for(let u=0,f=r.length;u<f;u++)o[i++]=r[u]}a.totals&&n.displayTotalsRow&&(!a.collapsed||n.aggregateCollapsed)&&(o[i++]=a.totals)}return o}compileAccumulatorLoopCSPSafe(e){return e.accumulate?function(t){let n;for(let o=0;o<t.length;o++){let r=t[o];n=e.accumulate.call(e,r)}return n}:function(){}}compileFilterCSPSafe(e,t){if(typeof this.filterCSPSafe!="function")return[];let n=[],o=e.length;for(let r=0;r<o;r++)this.filterCSPSafe(e[r],t)&&n.push(e[r]);return n}compileFilter(e=!1){if(e)return null;let t=zn.getFunctionDetails(this.filter),n="{ continue _coreloop; }$1",o="{ _retval[_idx++] = $item$; continue _coreloop; }$1",r=t.body.replace(/return false\s*([;}]|\}|$)/gi,n).replace(/return!1([;}]|\}|$)/gi,n).replace(/return true\s*([;}]|\}|$)/gi,o).replace(/return!0([;}]|\}|$)/gi,o).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ($1) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),i=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","$filter$; ","} ","return _retval; "].join("");i=i.replace(/\$filter\$/gi,r),i=i.replace(/\$item\$/gi,t.params[0]),i=i.replace(/\$args\$/gi,t.params[1]);let a=new Function("_items,_args",i),l="compiledFilter";return a.displayName=l,a.name=this.setFunctionName(a,l),a}compileFilterWithCaching(e=!1){if(e)return null;let t=zn.getFunctionDetails(this.filter),n="{ continue _coreloop; }$1",o="{ _cache[_i] = true;_retval[_idx++] = $item$; continue _coreloop; }$1",r=t.body.replace(/return false\s*([;}]|\}|$)/gi,n).replace(/return!1([;}]|\}|$)/gi,n).replace(/return true\s*([;}]|\}|$)/gi,o).replace(/return!0([;}]|\}|$)/gi,o).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ((_cache[_i] = $1)) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),i=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","if (_cache[_i]) { ","_retval[_idx++] = $item$; ","continue _coreloop; ","} ","$filter$; ","} ","return _retval; "].join("");i=i.replace(/\$filter\$/gi,r),i=i.replace(/\$item\$/gi,t.params[0]),i=i.replace(/\$args\$/gi,t.params[1]);let a=new Function("_items,_args,_cache",i),l="compiledFilterWithCaching";return a.displayName=l,a.name=this.setFunctionName(a,l),a}compileFilterWithCachingCSPSafe(e,t,n){if(typeof this.filterCSPSafe!="function")return[];let o=[],r=e.length;for(let i=0;i<r;i++)(n[i]||this.filterCSPSafe(e[i],t))&&o.push(e[i]);return o}setFunctionName(e,t){try{Object.defineProperty(e,"name",{writable:!0,value:t})}catch{e.name=t}}uncompiledFilter(e,t){let n=[],o=0;for(let r=0,i=e.length;r<i;r++)this.filter?.(e[r],t)&&(n[o++]=e[r]);return n}uncompiledFilterWithCaching(e,t,n){let o=[],r=0,i;for(let a=0,l=e.length;a<l;a++)i=e[a],n[a]?o[r++]=i:this.filter?.(i,t)&&(o[r++]=i,n[a]=!0);return o}getFilteredAndPagedItems(e){if(this._options.useCSPSafeFilter?this.filterCSPSafe:this.filter){let n,o;this._options.useCSPSafeFilter?(n=this._options.inlineFilters?this.compiledFilterCSPSafe:this.uncompiledFilter,o=this._options.inlineFilters?this.compiledFilterWithCachingCSPSafe:this.uncompiledFilterWithCaching):(n=this._options.inlineFilters?this.compiledFilter:this.uncompiledFilter,o=this._options.inlineFilters?this.compiledFilterWithCaching:this.uncompiledFilterWithCaching),this.refreshHints.isFilterNarrowing?this.filteredItems=n.call(this,this.filteredItems,this.filterArgs):this.refreshHints.isFilterExpanding?this.filteredItems=o.call(this,e,this.filterArgs,this.filterCache):this.refreshHints.isFilterUnchanged||(this.filteredItems=n.call(this,e,this.filterArgs))}else this.filteredItems=this.pagesize?e:e.concat();let t;return this.pagesize?(this.filteredItems.length<=this.pagenum*this.pagesize&&(this.filteredItems.length===0?this.pagenum=0:this.pagenum=Math.floor((this.filteredItems.length-1)/this.pagesize)),t=this.filteredItems.slice(this.pagesize*this.pagenum,this.pagesize*this.pagenum+this.pagesize)):t=this.filteredItems,{totalRows:this.filteredItems.length,rows:t}}getRowDiffs(e,t){let n,o,r,i=[],a=0,l=Math.max(t.length,e.length);this.refreshHints?.ignoreDiffsBefore&&(a=Math.max(0,Math.min(t.length,this.refreshHints.ignoreDiffsBefore))),this.refreshHints?.ignoreDiffsAfter&&(l=Math.min(t.length,Math.max(0,this.refreshHints.ignoreDiffsAfter)));for(let d=a,u=e.length;d<l;d++)d>=u?i[i.length]=d:(n=t[d],o=e[d],(!n||this.groupingInfos.length&&(r=n.__nonDataRow||o.__nonDataRow)&&n.__group!==o.__group||n.__group&&!n.equals(o)||r&&(n.__groupTotals||o.__groupTotals)||n[this.idProperty]!==o[this.idProperty]||this.updated?.[n[this.idProperty]])&&(i[i.length]=d));return i}recalc(e){this.rowsById=void 0,(this.refreshHints.isFilterNarrowing!==this.prevRefreshHints.isFilterNarrowing||this.refreshHints.isFilterExpanding!==this.prevRefreshHints.isFilterExpanding)&&(this.filterCache=[]);let t=this.getFilteredAndPagedItems(e);this.totalRows=t.totalRows;let n=t.rows;this.groups=[],this.groupingInfos.length&&(this.groups=this.extractGroups(n),this.groups.length&&(n=this.flattenGroupedRows(this.groups)));let o=this.getRowDiffs(this.rows,n);return this.rows=n,o}refresh(){if(this.suspend)return;let e=zn.extend(!0,{},this.getPagingInfo()),t=this.rows.length,n=this.totalRows,o=this.recalc(this.items);this.pagesize&&this.totalRows<this.pagenum*this.pagesize&&(this.pagenum=Math.max(0,Math.ceil(this.totalRows/this.pagesize)-1),o=this.recalc(this.items)),this.updated=null,this.prevRefreshHints=this.refreshHints,this.refreshHints={},n!==this.totalRows&&this.onBeforePagingInfoChanged.notify(e,null,this).getReturnValue()!==!1&&this.onPagingInfoChanged.notify(this.getPagingInfo(),null,this),t!==this.rows.length&&this.onRowCountChanged.notify({previous:t,current:this.rows.length,itemCount:this.items.length,dataView:this,callingOnRowsChanged:o.length>0},null,this),o.length>0&&this.onRowsChanged.notify({rows:o,itemCount:this.items.length,dataView:this,calledOnRowCountChanged:t!==this.rows.length},null,this),(t!==this.rows.length||o.length>0)&&this.onRowsOrCountChanged.notify({rowsDiff:o,previousRowCount:t,currentRowCount:this.rows.length,itemCount:this.items.length,rowCountChanged:t!==this.rows.length,rowsChanged:o.length>0,dataView:this},null,this)}syncGridSelection(e,t,n){this._grid=e;let o;this.selectedRowIds=this.mapRowsToIds(e.getSelectedRows());let r=a=>{a===!1?this.selectedRowIds=[]:this.selectedRowIds.sort().join(",")!==a.sort().join(",")&&(this.selectedRowIds=a)},i=()=>{if((this.selectedRowIds||[]).length>0&&!o){o=!0;let a=this.mapIdsToRows(this.selectedRowIds||[]);if(!t){let l={grid:this._grid,ids:this.mapRowsToIds(a),rows:a,dataView:this};this.preSelectedRowIdsChangeFn(l),this.onSelectedRowIdsChanged.notify(Object.assign(l,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Md,this)}e.setSelectedRows(a),o=!1}};return e.onSelectedRowsChanged.subscribe((a,l)=>{if(!o){let d=this.mapRowsToIds(l.rows),u={grid:this._grid,ids:d,rows:l.rows,added:!0,dataView:this};this.preSelectedRowIdsChangeFn(u),this.onSelectedRowIdsChanged.notify(Object.assign(u,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Md,this)}}),this.preSelectedRowIdsChangeFn=a=>{if(!o){if(o=!0,typeof a.added>"u")r(a.ids);else{let l;if(a.added)n&&e.getOptions().multiSelect?l=(this.selectedRowIds?.filter(d=>this.getRowById(d)===void 0)).concat(a.ids):l=a.ids;else if(n&&e.getOptions().multiSelect){let d=new Set(a.ids);l=this.selectedRowIds?.filter(u=>!d.has(u))}else l=[];r(l)}o=!1}},this.onRowsOrCountChanged.subscribe(i.bind(this)),this.onSelectedRowIdsChanged}getAllSelectedIds(){return this.selectedRowIds}getAllSelectedFilteredIds(){return this.getAllSelectedFilteredItems().map(e=>e[this.idProperty])}setSelectedIds(e,t){let n=t?.isRowBeingAdded,o=t?.shouldTriggerEvent,r=t?.applyRowSelectionToGrid;n!==!1&&(n=!0);let i=this.mapIdsToRows(e),a={grid:this._grid,ids:e,rows:i,added:n,dataView:this};this.preSelectedRowIdsChangeFn?.(a),o!==!1&&this.onSelectedRowIdsChanged.notify(Object.assign(a,{selectedRowIds:this.selectedRowIds,filteredIds:this.getAllSelectedFilteredIds()}),new Md,this),r!==!1&&this._grid&&this._grid.setSelectedRows(i)}getAllSelectedItems(){let e=[];return this.getAllSelectedIds().forEach(t=>{e.push(this.getItemById(t))}),e}getAllSelectedFilteredItems(){if(!Array.isArray(this.selectedRowIds))return[];let e=new Set(this.selectedRowIds);return this.filteredItems.filter(t=>e.has(t[this.idProperty]))||[]}syncGridCellCssStyles(e,t){let n,o,r=a=>{n={},typeof a=="object"&&Object.keys(a).forEach(l=>{if(a){let d=this.rows[l][this.idProperty];n[d]=a[l]}})};r(e.getCellCssStyles(t));let i=()=>{if(typeof n=="object"){o=!0,this.ensureRowsByIdCache();let a={};Object.keys(n).forEach(l=>{let d=this.rowsById?.[l];zn.isDefined(d)&&(a[d]=n[l])}),e.setCellCssStyles(t,a),o=!1}};e.onCellCssStylesChanged.subscribe((a,l)=>{o||t===l.key&&(l.hash?r(l.hash):(e.onCellCssStylesChanged.unsubscribe(),this.onRowsOrCountChanged.unsubscribe(i)))}),this.onRowsOrCountChanged.subscribe(i.bind(this))}},Al=Br,Id=go,mu=class gu{constructor(t){this.args=t,P(this,"input"),P(this,"defaultValue"),P(this,"navOnLR"),this.init()}init(){this.navOnLR=this.args.grid.getOptions().editorCellNavOnLRKeys,this.input=Id.createDomElement("input",{type:"text",className:"editor-text"},this.args.container),this.input.addEventListener("keydown",this.navOnLR?Rm:Tm),this.input.focus(),this.input.select(),this.args.compositeEditorOptions&&this.input.addEventListener("change",this.onChange.bind(this))}onChange(){let t=this.args.grid.getActiveCell();this.validate().valid&&this.applyValue(this.args.item,this.serializeValue()),this.applyValue(this.args.compositeEditorOptions.formValues,this.serializeValue()),this.args.grid.onCompositeEditorChange.notify({row:t?.row??0,cell:t?.cell??0,item:this.args.item,column:this.args.column,formValues:this.args.compositeEditorOptions.formValues,grid:this.args.grid,editors:this.args.compositeEditorOptions.editors})}destroy(){this.input.removeEventListener("keydown",this.navOnLR?Rm:Tm),this.input.removeEventListener("change",this.onChange.bind(this)),this.input.remove()}focus(){this.input.focus()}getDecimalPlaces(){let t=this.args.column.editorFixedDecimalPlaces;return Id.isDefined(t)||(t=gu.DefaultDecimalPlaces),!t&&t!==0?null:t}loadValue(t){this.defaultValue=t[this.args.column.field];let n=this.getDecimalPlaces();n!==null&&(this.defaultValue||this.defaultValue===0)&&this.defaultValue?.toFixed&&(this.defaultValue=this.defaultValue.toFixed(n)),this.input.value=String(this.defaultValue??""),this.input.defaultValue=String(this.defaultValue??""),this.input.select()}serializeValue(){let t=parseFloat(this.input.value);gu.AllowEmptyValue?!t&&t!==0&&(t=void 0):t=t||0;let n=this.getDecimalPlaces();return n!==null&&(t||t===0)&&t.toFixed&&(t=parseFloat(t.toFixed(n))),t}applyValue(t,n){t[this.args.column.field]=n}isValueChanged(){return!(this.input.value===""&&!Id.isDefined(this.defaultValue))&&this.input.value!==this.defaultValue}validate(){if(isNaN(this.input.value))return{valid:!1,msg:"Please enter a valid number"};if(this.args.column.validator){let t=this.args.column.validator(this.input.value,this.args);if(!t.valid)return t}return{valid:!0,msg:null}}};P(mu,"DefaultDecimalPlaces"),P(mu,"AllowEmptyValue",!1);var xm=mu;function Rm(e){let t=e.selectionStart,n=e.target.value.length;(e.keyCode===Al.LEFT&&t>0||e.keyCode===Al.RIGHT&&t<n-1)&&e.stopImmediatePropagation()}function Tm(e){(e.keyCode===Al.LEFT||e.keyCode===Al.RIGHT)&&e.stopImmediatePropagation()}var MA=kc,pr=JN,Le=Zr,gi=na,IA=ZN,En=Vv,wo=Br,NA=QN,AA=xh,ps=eA,Pr=tA,V=go,Nd=nA,km=Rh,Em=sA,Pm=iA,FA=class{constructor(e,t,n,o,r){if(this.container=e,this.data=t,this.columns=n,this.externalPubSub=r,P(this,"slickGridVersion","5.15.5"),P(this,"cid",""),P(this,"onActiveCellChanged"),P(this,"onActiveCellPositionChanged"),P(this,"onAddNewRow"),P(this,"onAfterSetColumns"),P(this,"onAutosizeColumns"),P(this,"onBeforeAppendCell"),P(this,"onBeforeCellEditorDestroy"),P(this,"onBeforeColumnsResize"),P(this,"onBeforeDestroy"),P(this,"onBeforeEditCell"),P(this,"onBeforeFooterRowCellDestroy"),P(this,"onBeforeHeaderCellDestroy"),P(this,"onBeforeHeaderRowCellDestroy"),P(this,"onBeforeRemoveCachedRow"),P(this,"onBeforeSetColumns"),P(this,"onBeforeSort"),P(this,"onBeforeUpdateColumns"),P(this,"onCellChange"),P(this,"onCellCssStylesChanged"),P(this,"onClick"),P(this,"onColumnsReordered"),P(this,"onColumnsDrag"),P(this,"onColumnsResized"),P(this,"onColumnsResizeDblClick"),P(this,"onCompositeEditorChange"),P(this,"onContextMenu"),P(this,"onDrag"),P(this,"onDblClick"),P(this,"onDragInit"),P(this,"onDragStart"),P(this,"onDragEnd"),P(this,"onFooterClick"),P(this,"onFooterContextMenu"),P(this,"onFooterRowCellRendered"),P(this,"onHeaderCellRendered"),P(this,"onHeaderClick"),P(this,"onHeaderContextMenu"),P(this,"onHeaderMouseEnter"),P(this,"onHeaderMouseLeave"),P(this,"onHeaderRowCellRendered"),P(this,"onHeaderRowMouseEnter"),P(this,"onHeaderRowMouseLeave"),P(this,"onPreHeaderContextMenu"),P(this,"onPreHeaderClick"),P(this,"onKeyDown"),P(this,"onMouseEnter"),P(this,"onMouseLeave"),P(this,"onRendered"),P(this,"onScroll"),P(this,"onSelectedRowsChanged"),P(this,"onSetOptions"),P(this,"onActivateChangedOptions"),P(this,"onSort"),P(this,"onValidationError"),P(this,"onViewportChanged"),P(this,"scrollbarDimensions"),P(this,"maxSupportedCssHeight"),P(this,"canvas",null),P(this,"canvas_context",null),P(this,"_options"),P(this,"_defaults",{alwaysShowVerticalScroll:!1,alwaysAllowHorizontalScroll:!1,explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableHtmlRendering:!0,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,autoEditNewRow:!0,autoCommitEdit:!1,suppressActiveCellChangeOnEdit:!1,enableCellNavigation:!0,enableColumnReorder:!0,unorderableColumnCssClass:"unorderable",asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,enableAsyncPostRenderCleanup:!1,asyncPostRenderCleanupDelay:40,auto:!1,nonce:"",editorLock:IA,showColumnHeader:!0,showHeaderRow:!1,headerRowHeight:25,createFooterRow:!1,showFooterRow:!1,footerRowHeight:25,createPreHeaderPanel:!1,createTopHeaderPanel:!1,showPreHeaderPanel:!1,showTopHeaderPanel:!1,preHeaderPanelHeight:25,showTopPanel:!1,topPanelHeight:25,preHeaderPanelWidth:"auto",topHeaderPanelHeight:25,topHeaderPanelWidth:"auto",formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",rowHighlightCssClass:"highlight-animate",rowHighlightDuration:400,selectedCellCssClass:"selected",multiSelect:!0,enableCellRowSpan:!1,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,frozenBottom:!1,frozenColumn:-1,frozenRow:-1,frozenRightViewportMinWidth:100,throwWhenFrozenNotAllViewable:!1,fullWidthRows:!1,multiColumnSort:!1,numberedMultiColumnSort:!1,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!1,defaultFormatter:this.defaultFormatter,forceSyncScrolling:!1,addNewRowCssClass:"new-row",preserveCopiedSelectionOnPaste:!1,preventDragFromKeys:["ctrlKey","metaKey"],showCellSelection:!0,viewportClass:void 0,minRowBuffer:3,emulatePagingWhenScrolling:!0,editorCellNavOnLRKeys:!1,enableMouseWheelScrollHandler:!0,doPaging:!0,autosizeColsMode:En.LegacyOff,autosizeColPaddingPx:4,rowTopOffsetRenderType:"top",scrollRenderThrottling:10,autosizeTextAvgToMWidthRatio:.75,viewportSwitchToScrollModeWidthPercent:void 0,viewportMinWidthPx:void 0,viewportMaxWidthPx:void 0,suppressCssChangesOnHiddenInit:!1,ffMaxSupportedCssHeight:6e6,maxSupportedCssHeight:1e9,maxPartialRowSpanRemap:5e3,sanitizer:void 0,logSanitizedHtml:!1,mixinDefaults:!0,shadowRoot:void 0}),P(this,"_columnDefaults",{name:"",headerCssClass:null,defaultSortAsc:!0,focusable:!0,hidden:!1,minWidth:30,maxWidth:void 0,rerenderOnResize:!1,reorderable:!0,resizable:!0,sortable:!1,selectable:!0}),P(this,"_columnAutosizeDefaults",{ignoreHeaderText:!1,colValueArray:void 0,allowAddlPercent:void 0,formatterOverride:void 0,autosizeMode:pr.ContentIntelligent,rowSelectionModeOnInit:void 0,rowSelectionMode:ps.FirstNRows,rowSelectionCount:100,valueFilterMode:Pr.None,widthEvalMode:Nd.Auto,sizeToRemaining:void 0,widthPx:void 0,contentSizePx:0,headerWidthPx:0,colDataTypeOf:void 0}),P(this,"_columnResizeTimer"),P(this,"_executionBlockTimer"),P(this,"_flashCellTimer"),P(this,"_highlightRowTimer"),P(this,"th"),P(this,"h"),P(this,"ph"),P(this,"n"),P(this,"cj"),P(this,"page",0),P(this,"offset",0),P(this,"vScrollDir",1),P(this,"_bindingEventService",new MA),P(this,"initialized",!1),P(this,"_container"),P(this,"uid",`slickgrid_${Math.round(1e6*Math.random())}`),P(this,"_focusSink"),P(this,"_focusSink2"),P(this,"_groupHeaders",[]),P(this,"_headerScroller",[]),P(this,"_headers",[]),P(this,"_headerRows"),P(this,"_headerRowScroller"),P(this,"_headerRowSpacerL"),P(this,"_headerRowSpacerR"),P(this,"_footerRow"),P(this,"_footerRowScroller"),P(this,"_footerRowSpacerL"),P(this,"_footerRowSpacerR"),P(this,"_preHeaderPanel"),P(this,"_preHeaderPanelScroller"),P(this,"_preHeaderPanelSpacer"),P(this,"_preHeaderPanelR"),P(this,"_preHeaderPanelScrollerR"),P(this,"_preHeaderPanelSpacerR"),P(this,"_topHeaderPanel"),P(this,"_topHeaderPanelScroller"),P(this,"_topHeaderPanelSpacer"),P(this,"_topPanelScrollers"),P(this,"_topPanels"),P(this,"_viewport"),P(this,"_canvas"),P(this,"_style"),P(this,"_boundAncestors",[]),P(this,"stylesheet"),P(this,"columnCssRulesL"),P(this,"columnCssRulesR"),P(this,"viewportH",0),P(this,"viewportW",0),P(this,"canvasWidth",0),P(this,"canvasWidthL",0),P(this,"canvasWidthR",0),P(this,"headersWidth",0),P(this,"headersWidthL",0),P(this,"headersWidthR",0),P(this,"viewportHasHScroll",!1),P(this,"viewportHasVScroll",!1),P(this,"headerColumnWidthDiff",0),P(this,"headerColumnHeightDiff",0),P(this,"cellWidthDiff",0),P(this,"cellHeightDiff",0),P(this,"absoluteColumnMinWidth"),P(this,"hasFrozenRows",!1),P(this,"frozenRowsHeight",0),P(this,"actualFrozenRow",-1),P(this,"paneTopH",0),P(this,"paneBottomH",0),P(this,"viewportTopH",0),P(this,"viewportBottomH",0),P(this,"topPanelH",0),P(this,"headerRowH",0),P(this,"footerRowH",0),P(this,"tabbingDirection",1),P(this,"_activeCanvasNode"),P(this,"_activeViewportNode"),P(this,"activePosX"),P(this,"activePosY"),P(this,"activeRow"),P(this,"activeCell"),P(this,"activeCellNode",null),P(this,"currentEditor",null),P(this,"serializedEditorValue"),P(this,"editController"),P(this,"_prevDataLength",0),P(this,"_prevInvalidatedRowsCount",0),P(this,"_rowSpanIsCached",!1),P(this,"_colsWithRowSpanCache",{}),P(this,"rowsCache",{}),P(this,"renderedRows",0),P(this,"numVisibleRows",0),P(this,"prevScrollTop",0),P(this,"scrollHeight",0),P(this,"scrollTop",0),P(this,"lastRenderedScrollTop",0),P(this,"lastRenderedScrollLeft",0),P(this,"prevScrollLeft",0),P(this,"scrollLeft",0),P(this,"selectionModel"),P(this,"selectedRows",[]),P(this,"plugins",[]),P(this,"cellCssClasses",{}),P(this,"columnsById",{}),P(this,"sortColumns",[]),P(this,"columnPosLeft",[]),P(this,"columnPosRight",[]),P(this,"pagingActive",!1),P(this,"pagingIsLastPage",!1),P(this,"scrollThrottle"),P(this,"h_editorLoader"),P(this,"h_postrender"),P(this,"h_postrenderCleanup"),P(this,"postProcessedRows",{}),P(this,"postProcessToRow",null),P(this,"postProcessFromRow",null),P(this,"postProcessedCleanupQueue",[]),P(this,"postProcessgroupId",0),P(this,"counter_rows_rendered",0),P(this,"counter_rows_removed",0),P(this,"_paneHeaderL"),P(this,"_paneHeaderR"),P(this,"_paneTopL"),P(this,"_paneTopR"),P(this,"_paneBottomL"),P(this,"_paneBottomR"),P(this,"_headerScrollerL"),P(this,"_headerScrollerR"),P(this,"_headerL"),P(this,"_headerR"),P(this,"_groupHeadersL"),P(this,"_groupHeadersR"),P(this,"_headerRowScrollerL"),P(this,"_headerRowScrollerR"),P(this,"_footerRowScrollerL"),P(this,"_footerRowScrollerR"),P(this,"_headerRowL"),P(this,"_headerRowR"),P(this,"_footerRowL"),P(this,"_footerRowR"),P(this,"_topPanelScrollerL"),P(this,"_topPanelScrollerR"),P(this,"_topPanelL"),P(this,"_topPanelR"),P(this,"_viewportTopL"),P(this,"_viewportTopR"),P(this,"_viewportBottomL"),P(this,"_viewportBottomR"),P(this,"_canvasTopL"),P(this,"_canvasTopR"),P(this,"_canvasBottomL"),P(this,"_canvasBottomR"),P(this,"_viewportScrollContainerX"),P(this,"_viewportScrollContainerY"),P(this,"_headerScrollContainer"),P(this,"_headerRowScrollContainer"),P(this,"_footerRowScrollContainer"),P(this,"cssShow",{position:"absolute",visibility:"hidden",display:"block"}),P(this,"_hiddenParents",[]),P(this,"oldProps",[]),P(this,"enforceFrozenRowHeightRecalc",!1),P(this,"columnResizeDragging",!1),P(this,"slickDraggableInstance",null),P(this,"slickMouseWheelInstances",[]),P(this,"slickResizableInstances",[]),P(this,"sortableSideLeftInstance"),P(this,"sortableSideRightInstance"),P(this,"logMessageCount",0),P(this,"logMessageMaxCount",30),P(this,"_pubSubService"),this._container=typeof this.container=="string"?document.querySelector(this.container):this.container,!this._container)throw new Error(`SlickGrid requires a valid container, ${this.container} does not exist in the DOM.`);this._pubSubService=r,this.onActiveCellChanged=new Le("onActiveCellChanged",r),this.onActiveCellPositionChanged=new Le("onActiveCellPositionChanged",r),this.onAddNewRow=new Le("onAddNewRow",r),this.onAfterSetColumns=new Le("onAfterSetColumns",r),this.onAutosizeColumns=new Le("onAutosizeColumns",r),this.onBeforeAppendCell=new Le("onBeforeAppendCell",r),this.onBeforeCellEditorDestroy=new Le("onBeforeCellEditorDestroy",r),this.onBeforeColumnsResize=new Le("onBeforeColumnsResize",r),this.onBeforeDestroy=new Le("onBeforeDestroy",r),this.onBeforeEditCell=new Le("onBeforeEditCell",r),this.onBeforeFooterRowCellDestroy=new Le("onBeforeFooterRowCellDestroy",r),this.onBeforeHeaderCellDestroy=new Le("onBeforeHeaderCellDestroy",r),this.onBeforeHeaderRowCellDestroy=new Le("onBeforeHeaderRowCellDestroy",r),this.onBeforeRemoveCachedRow=new Le("onRowRemovedFromCache",r),this.onBeforeSetColumns=new Le("onBeforeSetColumns",r),this.onBeforeSort=new Le("onBeforeSort",r),this.onBeforeUpdateColumns=new Le("onBeforeUpdateColumns",r),this.onCellChange=new Le("onCellChange",r),this.onCellCssStylesChanged=new Le("onCellCssStylesChanged",r),this.onClick=new Le("onClick",r),this.onColumnsReordered=new Le("onColumnsReordered",r),this.onColumnsDrag=new Le("onColumnsDrag",r),this.onColumnsResized=new Le("onColumnsResized",r),this.onColumnsResizeDblClick=new Le("onColumnsResizeDblClick",r),this.onCompositeEditorChange=new Le("onCompositeEditorChange",r),this.onContextMenu=new Le("onContextMenu",r),this.onDrag=new Le("onDrag",r),this.onDblClick=new Le("onDblClick",r),this.onDragInit=new Le("onDragInit",r),this.onDragStart=new Le("onDragStart",r),this.onDragEnd=new Le("onDragEnd",r),this.onFooterClick=new Le("onFooterClick",r),this.onFooterContextMenu=new Le("onFooterContextMenu",r),this.onFooterRowCellRendered=new Le("onFooterRowCellRendered",r),this.onHeaderCellRendered=new Le("onHeaderCellRendered",r),this.onHeaderClick=new Le("onHeaderClick",r),this.onHeaderContextMenu=new Le("onHeaderContextMenu",r),this.onHeaderMouseEnter=new Le("onHeaderMouseEnter",r),this.onHeaderMouseLeave=new Le("onHeaderMouseLeave",r),this.onHeaderRowCellRendered=new Le("onHeaderRowCellRendered",r),this.onHeaderRowMouseEnter=new Le("onHeaderRowMouseEnter",r),this.onHeaderRowMouseLeave=new Le("onHeaderRowMouseLeave",r),this.onPreHeaderClick=new Le("onPreHeaderClick",r),this.onPreHeaderContextMenu=new Le("onPreHeaderContextMenu",r),this.onKeyDown=new Le("onKeyDown",r),this.onMouseEnter=new Le("onMouseEnter",r),this.onMouseLeave=new Le("onMouseLeave",r),this.onRendered=new Le("onRendered",r),this.onScroll=new Le("onScroll",r),this.onSelectedRowsChanged=new Le("onSelectedRowsChanged",r),this.onSetOptions=new Le("onSetOptions",r),this.onActivateChangedOptions=new Le("onActivateChangedOptions",r),this.onSort=new Le("onSort",r),this.onValidationError=new Le("onValidationError",r),this.onViewportChanged=new Le("onViewportChanged",r),this.initialize(o)}init(){this.finishInitialization()}initialize(e){if(e?.mixinDefaults?(this._options||(this._options=e),V.applyDefaults(this._options,this._defaults)):this._options=V.extend(!0,{},this._defaults,e),this.scrollThrottle=this.actionThrottle(this.render.bind(this),this._options.scrollRenderThrottling),this.maxSupportedCssHeight=this.maxSupportedCssHeight||this.getMaxSupportedCssHeight(),this.validateAndEnforceOptions(),this._columnDefaults.width=this._options.defaultColumnWidth,this._options.suppressCssChangesOnHiddenInit||this.cacheCssForHiddenInit(),this.updateColumnProps(),this._options.enableColumnReorder&&(!Sortable||!Sortable.create))throw new Error("SlickGrid requires Sortable.js module to be loaded");this.editController={commitCurrentEdit:this.commitCurrentEdit.bind(this),cancelCurrentEdit:this.cancelCurrentEdit.bind(this)},V.emptyElement(this._container),this._container.style.outline=String(0),this._container.classList.add(this.uid),this._container.classList.add("ui-widget"),this._container.setAttribute("role","grid");let t=window.getComputedStyle(this._container);/relative|absolute|fixed/.test(t.position)||(this._container.style.position="relative"),this._focusSink=V.createDomElement("div",{tabIndex:0,style:{position:"fixed",width:"0px",height:"0px",top:"0px",left:"0px",outline:"0px"}},this._container),this._options.createTopHeaderPanel&&(this._topHeaderPanelScroller=V.createDomElement("div",{className:"slick-topheader-panel slick-state-default",style:{overflow:"hidden",position:"relative"}},this._container),this._topHeaderPanelScroller.appendChild(document.createElement("div")),this._topHeaderPanel=V.createDomElement("div",null,this._topHeaderPanelScroller),this._topHeaderPanelSpacer=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._topHeaderPanelScroller),this._options.showTopHeaderPanel||V.hide(this._topHeaderPanelScroller)),this._paneHeaderL=V.createDomElement("div",{className:"slick-pane slick-pane-header slick-pane-left",tabIndex:0},this._container),this._paneHeaderR=V.createDomElement("div",{className:"slick-pane slick-pane-header slick-pane-right",tabIndex:0},this._container),this._paneTopL=V.createDomElement("div",{className:"slick-pane slick-pane-top slick-pane-left",tabIndex:0},this._container),this._paneTopR=V.createDomElement("div",{className:"slick-pane slick-pane-top slick-pane-right",tabIndex:0},this._container),this._paneBottomL=V.createDomElement("div",{className:"slick-pane slick-pane-bottom slick-pane-left",tabIndex:0},this._container),this._paneBottomR=V.createDomElement("div",{className:"slick-pane slick-pane-bottom slick-pane-right",tabIndex:0},this._container),this._options.createPreHeaderPanel&&(this._preHeaderPanelScroller=V.createDomElement("div",{className:"slick-preheader-panel ui-state-default slick-state-default",style:{overflow:"hidden",position:"relative"}},this._paneHeaderL),this._preHeaderPanelScroller.appendChild(document.createElement("div")),this._preHeaderPanel=V.createDomElement("div",null,this._preHeaderPanelScroller),this._preHeaderPanelSpacer=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._preHeaderPanelScroller),this._preHeaderPanelScrollerR=V.createDomElement("div",{className:"slick-preheader-panel ui-state-default slick-state-default",style:{overflow:"hidden",position:"relative"}},this._paneHeaderR),this._preHeaderPanelR=V.createDomElement("div",null,this._preHeaderPanelScrollerR),this._preHeaderPanelSpacerR=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._preHeaderPanelScrollerR),this._options.showPreHeaderPanel||(V.hide(this._preHeaderPanelScroller),V.hide(this._preHeaderPanelScrollerR))),this._headerScrollerL=V.createDomElement("div",{className:"slick-header ui-state-default slick-state-default slick-header-left"},this._paneHeaderL),this._headerScrollerR=V.createDomElement("div",{className:"slick-header ui-state-default slick-state-default slick-header-right"},this._paneHeaderR),this._headerScroller.push(this._headerScrollerL),this._headerScroller.push(this._headerScrollerR),this._headerL=V.createDomElement("div",{className:"slick-header-columns slick-header-columns-left",role:"row",style:{left:"-1000px"}},this._headerScrollerL),this._headerR=V.createDomElement("div",{className:"slick-header-columns slick-header-columns-right",role:"row",style:{left:"-1000px"}},this._headerScrollerR),this._headers=[this._headerL,this._headerR],this._headerRowScrollerL=V.createDomElement("div",{className:"slick-headerrow ui-state-default slick-state-default"},this._paneTopL),this._headerRowScrollerR=V.createDomElement("div",{className:"slick-headerrow ui-state-default slick-state-default"},this._paneTopR),this._headerRowScroller=[this._headerRowScrollerL,this._headerRowScrollerR],this._headerRowSpacerL=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._headerRowScrollerL),this._headerRowSpacerR=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._headerRowScrollerR),this._headerRowL=V.createDomElement("div",{className:"slick-headerrow-columns slick-headerrow-columns-left"},this._headerRowScrollerL),this._headerRowR=V.createDomElement("div",{className:"slick-headerrow-columns slick-headerrow-columns-right"},this._headerRowScrollerR),this._headerRows=[this._headerRowL,this._headerRowR],this._topPanelScrollerL=V.createDomElement("div",{className:"slick-top-panel-scroller ui-state-default slick-state-default"},this._paneTopL),this._topPanelScrollerR=V.createDomElement("div",{className:"slick-top-panel-scroller ui-state-default slick-state-default"},this._paneTopR),this._topPanelScrollers=[this._topPanelScrollerL,this._topPanelScrollerR],this._topPanelL=V.createDomElement("div",{className:"slick-top-panel",style:{width:"10000px"}},this._topPanelScrollerL),this._topPanelR=V.createDomElement("div",{className:"slick-top-panel",style:{width:"10000px"}},this._topPanelScrollerR),this._topPanels=[this._topPanelL,this._topPanelR],this._options.showColumnHeader||this._headerScroller.forEach(o=>{V.hide(o)}),this._options.showTopPanel||this._topPanelScrollers.forEach(o=>{V.hide(o)}),this._options.showHeaderRow||this._headerRowScroller.forEach(o=>{V.hide(o)}),this._viewportTopL=V.createDomElement("div",{className:"slick-viewport slick-viewport-top slick-viewport-left",tabIndex:0},this._paneTopL),this._viewportTopR=V.createDomElement("div",{className:"slick-viewport slick-viewport-top slick-viewport-right",tabIndex:0},this._paneTopR),this._viewportBottomL=V.createDomElement("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-left",tabIndex:0},this._paneBottomL),this._viewportBottomR=V.createDomElement("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-right",tabIndex:0},this._paneBottomR),this._viewport=[this._viewportTopL,this._viewportTopR,this._viewportBottomL,this._viewportBottomR],this._options.viewportClass&&this._viewport.forEach(o=>{o.classList.add(...V.classNameToList(this._options.viewportClass))}),this._activeViewportNode=this._viewportTopL,this._canvasTopL=V.createDomElement("div",{className:"grid-canvas grid-canvas-top grid-canvas-left",tabIndex:0},this._viewportTopL),this._canvasTopR=V.createDomElement("div",{className:"grid-canvas grid-canvas-top grid-canvas-right",tabIndex:0},this._viewportTopR),this._canvasBottomL=V.createDomElement("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-left",tabIndex:0},this._viewportBottomL),this._canvasBottomR=V.createDomElement("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-right",tabIndex:0},this._viewportBottomR),this._canvas=[this._canvasTopL,this._canvasTopR,this._canvasBottomL,this._canvasBottomR],this.scrollbarDimensions=this.scrollbarDimensions||this.measureScrollbar();let n=this.getCanvasWidth()+this.scrollbarDimensions.width;this._activeCanvasNode=this._canvasTopL,this._topHeaderPanelSpacer&&V.width(this._topHeaderPanelSpacer,n),this._preHeaderPanelSpacer&&V.width(this._preHeaderPanelSpacer,n),this._headers.forEach(o=>{V.width(o,this.getHeadersWidth())}),V.width(this._headerRowSpacerL,n),V.width(this._headerRowSpacerR,n),this._options.createFooterRow&&(this._footerRowScrollerR=V.createDomElement("div",{className:"slick-footerrow ui-state-default slick-state-default"},this._paneTopR),this._footerRowScrollerL=V.createDomElement("div",{className:"slick-footerrow ui-state-default slick-state-default"},this._paneTopL),this._footerRowScroller=[this._footerRowScrollerL,this._footerRowScrollerR],this._footerRowSpacerL=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._footerRowScrollerL),V.width(this._footerRowSpacerL,n),this._footerRowSpacerR=V.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},this._footerRowScrollerR),V.width(this._footerRowSpacerR,n),this._footerRowL=V.createDomElement("div",{className:"slick-footerrow-columns slick-footerrow-columns-left"},this._footerRowScrollerL),this._footerRowR=V.createDomElement("div",{className:"slick-footerrow-columns slick-footerrow-columns-right"},this._footerRowScrollerR),this._footerRow=[this._footerRowL,this._footerRowR],this._options.showFooterRow||this._footerRowScroller.forEach(o=>{V.hide(o)})),this._focusSink2=this._focusSink.cloneNode(!0),this._container.appendChild(this._focusSink2),this._options.explicitInitialization||this.finishInitialization()}finishInitialization(){this.initialized||(this.initialized=!0,this.getViewportWidth(),this.getViewportHeight(),this.measureCellPaddingAndBorder(),this.disableSelection(this._headers),this._options.enableTextSelectionOnCells||this._viewport.forEach(e=>{this._bindingEventService.bind(e,"selectstart",t=>{t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement})}),this.setFrozenOptions(),this.setPaneFrozenClasses(),this.setPaneVisibility(),this.setScroller(),this.setOverflow(),this.updateColumnCaches(),this.createColumnHeaders(),this.createColumnFooter(),this.setupColumnSort(),this.createCssRules(),this.resizeCanvas(),this.bindAncestorScrollEvents(),this._bindingEventService.bind(this._container,"resize",this.resizeCanvas.bind(this)),this._viewport.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleScroll.bind(this))}),this._options.enableMouseWheelScrollHandler&&this._viewport.forEach(e=>{this.slickMouseWheelInstances.push(Em({element:e,onMouseWheel:this.handleMouseWheel.bind(this)}))}),this._headerScroller.forEach(e=>{this._bindingEventService.bind(e,"contextmenu",this.handleHeaderContextMenu.bind(this)),this._bindingEventService.bind(e,"click",this.handleHeaderClick.bind(this))}),this._headerRowScroller.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleHeaderRowScroll.bind(this))}),this._options.createFooterRow&&(this._footerRow.forEach(e=>{this._bindingEventService.bind(e,"contextmenu",this.handleFooterContextMenu.bind(this)),this._bindingEventService.bind(e,"click",this.handleFooterClick.bind(this))}),this._footerRowScroller.forEach(e=>{this._bindingEventService.bind(e,"scroll",this.handleFooterRowScroll.bind(this))})),this._options.createTopHeaderPanel&&this._bindingEventService.bind(this._topHeaderPanelScroller,"scroll",this.handleTopHeaderPanelScroll.bind(this)),this._options.createPreHeaderPanel&&(this._bindingEventService.bind(this._preHeaderPanelScroller,"scroll",this.handlePreHeaderPanelScroll.bind(this)),this._bindingEventService.bind(this._preHeaderPanelScroller,"contextmenu",this.handlePreHeaderContextMenu.bind(this)),this._bindingEventService.bind(this._preHeaderPanelScrollerR,"contextmenu",this.handlePreHeaderContextMenu.bind(this)),this._bindingEventService.bind(this._preHeaderPanelScroller,"click",this.handlePreHeaderClick.bind(this)),this._bindingEventService.bind(this._preHeaderPanelScrollerR,"click",this.handlePreHeaderClick.bind(this))),this._bindingEventService.bind(this._focusSink,"keydown",this.handleKeyDown.bind(this)),this._bindingEventService.bind(this._focusSink2,"keydown",this.handleKeyDown.bind(this)),this._canvas.forEach(e=>{this._bindingEventService.bind(e,"keydown",this.handleKeyDown.bind(this)),this._bindingEventService.bind(e,"click",this.handleClick.bind(this)),this._bindingEventService.bind(e,"dblclick",this.handleDblClick.bind(this)),this._bindingEventService.bind(e,"contextmenu",this.handleContextMenu.bind(this)),this._bindingEventService.bind(e,"mouseover",this.handleCellMouseOver.bind(this)),this._bindingEventService.bind(e,"mouseout",this.handleCellMouseOut.bind(this))}),km&&(this.slickDraggableInstance=km({containerElement:this._container,allowDragFrom:"div.slick-cell",allowDragFromClosest:"div.slick-cell.dnd, div.slick-cell.cell-reorder",preventDragFromKeys:this._options.preventDragFromKeys,onDragInit:this.handleDragInit.bind(this),onDragStart:this.handleDragStart.bind(this),onDrag:this.handleDrag.bind(this),onDragEnd:this.handleDragEnd.bind(this)})),this._options.suppressCssChangesOnHiddenInit||this.restoreCssFromHiddenInit())}cacheCssForHiddenInit(){this._hiddenParents=V.parents(this._container,":hidden"),this.oldProps=[],this._hiddenParents.forEach(e=>{let t={};Object.keys(this.cssShow).forEach(n=>{this.cssShow&&(t[n]=e.style[n],e.style[n]=this.cssShow[n])}),this.oldProps.push(t)})}restoreCssFromHiddenInit(){let e=0;this._hiddenParents&&(this._hiddenParents.forEach(t=>{let n=this.oldProps[e++];Object.keys(this.cssShow).forEach(o=>{this.cssShow&&(t.style[o]=n[o])})}),this._hiddenParents=[])}registerPlugin(e){this.plugins.unshift(e),e.init(this)}unregisterPlugin(e){for(let t=this.plugins.length;t>=0;t--)if(this.plugins[t]===e){this.plugins[t]?.destroy(),this.plugins.splice(t,1);break}}destroy(e){this._bindingEventService.unbindAll(),this.slickDraggableInstance=this.destroyAllInstances(this.slickDraggableInstance),this.slickMouseWheelInstances=this.destroyAllInstances(this.slickMouseWheelInstances),this.slickResizableInstances=this.destroyAllInstances(this.slickResizableInstances),this.getEditorLock()?.cancelCurrentEdit(),this.trigger(this.onBeforeDestroy,{});let t=this.plugins.length;for(;t--;)this.unregisterPlugin(this.plugins[t]);this._options.enableColumnReorder&&typeof this.sortableSideLeftInstance?.destroy=="function"&&(this.sortableSideLeftInstance?.destroy(),this.sortableSideRightInstance?.destroy()),this.unbindAncestorScrollEvents(),this._bindingEventService.unbindByEventName(this._container,"resize"),this.removeCssRules(),this._canvas.forEach(r=>{this._bindingEventService.unbindByEventName(r,"keydown"),this._bindingEventService.unbindByEventName(r,"click"),this._bindingEventService.unbindByEventName(r,"dblclick"),this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"mouseover"),this._bindingEventService.unbindByEventName(r,"mouseout")}),this._viewport.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._headerScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"click")}),this._headerRowScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._footerRow&&this._footerRow.forEach(r=>{this._bindingEventService.unbindByEventName(r,"contextmenu"),this._bindingEventService.unbindByEventName(r,"click")}),this._footerRowScroller&&this._footerRowScroller.forEach(r=>{this._bindingEventService.unbindByEventName(r,"scroll")}),this._preHeaderPanelScroller&&this._bindingEventService.unbindByEventName(this._preHeaderPanelScroller,"scroll"),this._topHeaderPanelScroller&&this._bindingEventService.unbindByEventName(this._topHeaderPanelScroller,"scroll"),this._bindingEventService.unbindByEventName(this._focusSink,"keydown"),this._bindingEventService.unbindByEventName(this._focusSink2,"keydown");let n=this._container.querySelectorAll(".slick-resizable-handle");[].forEach.call(n,r=>{this._bindingEventService.unbindByEventName(r,"dblclick")});let o=this._container.querySelectorAll(".slick-header-column");[].forEach.call(o,r=>{this._bindingEventService.unbindByEventName(r,"mouseenter"),this._bindingEventService.unbindByEventName(r,"mouseleave"),this._bindingEventService.unbindByEventName(r,"mouseenter"),this._bindingEventService.unbindByEventName(r,"mouseleave")}),V.emptyElement(this._container),this._container.classList.remove(this.uid),this.clearAllTimers(),e&&this.destroyAllElements()}destroyAllInstances(e){if(e){let t=Array.isArray(e)?e:[e],n;for(;V.isDefined(n=t.pop());)n&&typeof n.destroy=="function"&&n.destroy()}return e=Array.isArray(e)?[]:null,e}destroyAllElements(){this._activeCanvasNode=null,this._activeViewportNode=null,this._boundAncestors=null,this._canvas=null,this._canvasTopL=null,this._canvasTopR=null,this._canvasBottomL=null,this._canvasBottomR=null,this._container=null,this._focusSink=null,this._focusSink2=null,this._groupHeaders=null,this._groupHeadersL=null,this._groupHeadersR=null,this._headerL=null,this._headerR=null,this._headers=null,this._headerRows=null,this._headerRowL=null,this._headerRowR=null,this._headerRowSpacerL=null,this._headerRowSpacerR=null,this._headerRowScrollContainer=null,this._headerRowScroller=null,this._headerRowScrollerL=null,this._headerRowScrollerR=null,this._headerScrollContainer=null,this._headerScroller=null,this._headerScrollerL=null,this._headerScrollerR=null,this._hiddenParents=null,this._footerRow=null,this._footerRowL=null,this._footerRowR=null,this._footerRowSpacerL=null,this._footerRowSpacerR=null,this._footerRowScroller=null,this._footerRowScrollerL=null,this._footerRowScrollerR=null,this._footerRowScrollContainer=null,this._preHeaderPanel=null,this._preHeaderPanelR=null,this._preHeaderPanelScroller=null,this._preHeaderPanelScrollerR=null,this._preHeaderPanelSpacer=null,this._preHeaderPanelSpacerR=null,this._topPanels=null,this._topPanelScrollers=null,this._style=null,this._topPanelScrollerL=null,this._topPanelScrollerR=null,this._topPanelL=null,this._topPanelR=null,this._paneHeaderL=null,this._paneHeaderR=null,this._paneTopL=null,this._paneTopR=null,this._paneBottomL=null,this._paneBottomR=null,this._viewport=null,this._viewportTopL=null,this._viewportTopR=null,this._viewportBottomL=null,this._viewportBottomR=null,this._viewportScrollContainerX=null,this._viewportScrollContainerY=null}getOptions(){return this._options}setOptions(e,t,n,o){this.prepareForOptionsChange(),this._options.enableAddRow!==e.enableAddRow&&this.invalidateRow(this.getDataLength()),e.frozenColumn!==void 0&&e.frozenColumn>=0&&(this.getViewports().forEach(i=>i.scrollLeft=0),this.handleScroll());let r=V.extend(!0,{},this._options);this._options=V.extend(this._options,e),this.trigger(this.onSetOptions,{optionsBefore:r,optionsAfter:this._options}),this.internal_setOptions(t,n,o)}activateChangedOptions(e,t,n){this.prepareForOptionsChange(),this.invalidateRow(this.getDataLength()),this.trigger(this.onActivateChangedOptions,{options:this._options}),this.internal_setOptions(e,t,n)}prepareForOptionsChange(){this.getEditorLock().commitCurrentEdit()&&this.makeActiveCellNormal()}internal_setOptions(e,t,n){this._options.showColumnHeader!==void 0&&this.setColumnHeaderVisibility(this._options.showColumnHeader),this.validateAndEnforceOptions(),this.setFrozenOptions(),this._options.frozenBottom!==void 0&&(this.enforceFrozenRowHeightRecalc=!0),this._viewport.forEach(o=>{o.style.overflowY=this._options.autoHeight?"hidden":"auto"}),e||this.render(),this.setScroller(),n||this.setOverflow(),t||this.setColumns(this.columns),this._options.enableMouseWheelScrollHandler&&this._viewport&&(!this.slickMouseWheelInstances||this.slickMouseWheelInstances.length===0)?this._viewport.forEach(o=>{this.slickMouseWheelInstances.push(Em({element:o,onMouseWheel:this.handleMouseWheel.bind(this)}))}):this._options.enableMouseWheelScrollHandler===!1&&this.destroyAllInstances(this.slickMouseWheelInstances)}validateAndEnforceOptions(){this._options.autoHeight&&(this._options.leaveSpaceForNewRows=!1),this._options.forceFitColumns&&(this._options.autosizeColsMode=En.LegacyForceFit)}setSelectionModel(e){this.selectionModel&&(this.selectionModel.onSelectedRangesChanged.unsubscribe(this.handleSelectedRangesChanged.bind(this)),this.selectionModel.destroy&&this.selectionModel.destroy()),this.selectionModel=e,this.selectionModel&&(this.selectionModel.init(this),this.selectionModel.onSelectedRangesChanged.subscribe(this.handleSelectedRangesChanged.bind(this)))}getSelectionModel(){return this.selectionModel}setPaneFrozenClasses(){let e=this.hasFrozenColumns()?"add":"remove";for(let t of[this._paneHeaderL,this._paneTopL,this._paneBottomL])t.classList[e]("frozen")}hasFrozenColumns(){return this._options.frozenColumn>-1}updateColumnHeader(e,t,n){if(this.initialized){let o=this.getColumnIndex(e);if(!V.isDefined(o))return;let r=this.columns[o],i=this.getColumnByIndex(o);i&&(t!==void 0&&(this.columns[o].name=t),n!==void 0&&(this.columns[o].toolTip=n),this.trigger(this.onBeforeHeaderCellDestroy,{node:i,column:r,grid:this}),i.setAttribute("title",n||""),t!==void 0&&this.applyHtmlCode(i.children[0],t),this.trigger(this.onHeaderCellRendered,{node:i,column:r,grid:this}))}}getHeader(e){if(!e)return this.hasFrozenColumns()?this._headers:this._headerL;let t=this.getColumnIndex(e.id);return this.hasFrozenColumns()?t<=this._options.frozenColumn?this._headerL:this._headerR:this._headerL}getHeaderColumn(e){let t=typeof e=="number"?e:this.getColumnIndex(e),n=this.hasFrozenColumns()?t<=this._options.frozenColumn?this._headerL:this._headerR:this._headerL,o=this.hasFrozenColumns()?t<=this._options.frozenColumn?t:t-this._options.frozenColumn-1:t;return n.children[o]}getHeaderRow(){return this.hasFrozenColumns()?this._headerRows:this._headerRows[0]}getFooterRow(){return this.hasFrozenColumns()?this._footerRow:this._footerRow[0]}getHeaderRowColumn(e){let t=typeof e=="number"?e:this.getColumnIndex(e),n;return this.hasFrozenColumns()?t<=this._options.frozenColumn?n=this._headerRowL:(n=this._headerRowR,t-=this._options.frozenColumn+1):n=this._headerRowL,n.children[t]}getFooterRowColumn(e){let t=typeof e=="number"?e:this.getColumnIndex(e),n;return this.hasFrozenColumns()?t<=this._options.frozenColumn?n=this._footerRowL:(n=this._footerRowR,t-=this._options.frozenColumn+1):n=this._footerRowL,n.children[t]}createColumnFooter(){if(this._options.createFooterRow){this._footerRow.forEach(e=>{e.querySelectorAll(".slick-footerrow-column").forEach(t=>{let n=V.storage.get(t,"column");this.trigger(this.onBeforeFooterRowCellDestroy,{node:t,column:n,grid:this})})}),V.emptyElement(this._footerRowL),V.emptyElement(this._footerRowR);for(let e=0;e<this.columns.length;e++){let t=this.columns[e];if(!t||t.hidden)continue;let n=V.createDomElement("div",{className:`ui-state-default slick-state-default slick-footerrow-column l${e} r${e}`},this.hasFrozenColumns()&&e>this._options.frozenColumn?this._footerRowR:this._footerRowL),o=this.hasFrozenColumns()&&e<=this._options.frozenColumn?"frozen":null;o&&n.classList.add(o),V.storage.put(n,"column",t),this.trigger(this.onFooterRowCellRendered,{node:n,column:t,grid:this})}}}setupColumnSort(){this._headers.forEach(e=>{this._bindingEventService.bind(e,"click",t=>{if(this.columnResizeDragging||t.target.classList.contains("slick-resizable-handle"))return;let n=t.target.closest(".slick-header-column");if(!n)return;let o=V.storage.get(n,"column");if(o.sortable){if(!this.getEditorLock()?.commitCurrentEdit())return;let r=this.sortColumns.slice(),i=null,a=0;for(;a<this.sortColumns.length;a++)if(this.sortColumns[a].columnId===o.id){i=this.sortColumns[a],i.sortAsc=!i.sortAsc;break}let l=!!i;this._options.tristateMultiColumnSort?(i||(i={columnId:o.id,sortAsc:o.defaultSortAsc,sortCol:o}),l&&i.sortAsc&&(this.sortColumns.splice(a,1),i=null),this._options.multiColumnSort||(this.sortColumns=[]),i&&(!l||!this._options.multiColumnSort)&&this.sortColumns.push(i)):t.metaKey&&this._options.multiColumnSort?i&&this.sortColumns.splice(a,1):((!t.shiftKey&&!t.metaKey||!this._options.multiColumnSort)&&(this.sortColumns=[]),i?this.sortColumns.length===0&&this.sortColumns.push(i):(i={columnId:o.id,sortAsc:o.defaultSortAsc,sortCol:o},this.sortColumns.push(i)));let d;this._options.multiColumnSort?d={multiColumnSort:!0,previousSortColumns:r,sortCols:this.sortColumns.map(u=>{let f=this.columns[this.getColumnIndex(u.columnId)];return!f||f.hidden?null:{columnId:f.id,sortCol:f,sortAsc:u.sortAsc}}).filter(u=>u)}:d={multiColumnSort:!1,previousSortColumns:r,columnId:this.sortColumns.length>0?o.id:null,sortCol:this.sortColumns.length>0?o:null,sortAsc:this.sortColumns.length>0?this.sortColumns[0].sortAsc:!0},this.trigger(this.onBeforeSort,d,t).getReturnValue()!==!1&&(this.setSortColumns(this.sortColumns),this.trigger(this.onSort,d,t))}})})}createColumnHeaders(){this._headers.forEach(e=>{e.querySelectorAll(".slick-header-column").forEach(t=>{let n=V.storage.get(t,"column");n&&this.trigger(this.onBeforeHeaderCellDestroy,{node:t,column:n,grid:this})})}),V.emptyElement(this._headerL),V.emptyElement(this._headerR),this.getHeadersWidth(),V.width(this._headerL,this.headersWidthL),V.width(this._headerR,this.headersWidthR),this._headerRows.forEach(e=>{e.querySelectorAll(".slick-headerrow-column").forEach(t=>{let n=V.storage.get(t,"column");n&&this.trigger(this.onBeforeHeaderRowCellDestroy,{node:this,column:n,grid:this})})}),V.emptyElement(this._headerRowL),V.emptyElement(this._headerRowR),this._options.createFooterRow&&(this._footerRowL.querySelectorAll(".slick-footerrow-column").forEach(e=>{let t=V.storage.get(e,"column");t&&this.trigger(this.onBeforeFooterRowCellDestroy,{node:this,column:t,grid:this})}),V.emptyElement(this._footerRowL),this.hasFrozenColumns()&&(this._footerRowR.querySelectorAll(".slick-footerrow-column").forEach(e=>{let t=V.storage.get(e,"column");t&&this.trigger(this.onBeforeFooterRowCellDestroy,{node:this,column:t,grid:this})}),V.emptyElement(this._footerRowR)));for(let e=0;e<this.columns.length;e++){let t=this.columns[e];if(t.hidden)continue;let n=this.hasFrozenColumns()?e<=this._options.frozenColumn?this._headerL:this._headerR:this._headerL,o=this.hasFrozenColumns()?e<=this._options.frozenColumn?this._headerRowL:this._headerRowR:this._headerRowL,r=V.createDomElement("div",{id:`${this.uid+t.id}`,dataset:{id:String(t.id)},role:"columnheader",className:"ui-state-default slick-state-default slick-header-column"},n);t.toolTip&&(r.title=t.toolTip),t.reorderable||r.classList.add(this._options.unorderableColumnCssClass);let i=V.createDomElement("span",{className:"slick-column-name"},r);this.applyHtmlCode(i,t.name),V.width(r,t.width-this.headerColumnWidthDiff);let a=t.headerCssClass||null;if(a&&r.classList.add(...V.classNameToList(a)),a=this.hasFrozenColumns()&&e<=this._options.frozenColumn?"frozen":null,a&&r.classList.add(a),this._bindingEventService.bind(r,"mouseenter",this.handleHeaderMouseEnter.bind(this)),this._bindingEventService.bind(r,"mouseleave",this.handleHeaderMouseLeave.bind(this)),V.storage.put(r,"column",t),(this._options.enableColumnReorder||t.sortable)&&(this._bindingEventService.bind(r,"mouseenter",this.handleHeaderMouseHoverOn.bind(this)),this._bindingEventService.bind(r,"mouseleave",this.handleHeaderMouseHoverOff.bind(this))),t.hasOwnProperty("headerCellAttrs")&&t.headerCellAttrs instanceof Object&&Object.keys(t.headerCellAttrs).forEach(l=>{t.headerCellAttrs.hasOwnProperty(l)&&r.setAttribute(l,t.headerCellAttrs[l])}),t.sortable&&(r.classList.add("slick-header-sortable"),V.createDomElement("div",{className:`slick-sort-indicator ${this._options.numberedMultiColumnSort&&!this._options.sortColNumberInSeparateSpan?" slick-sort-indicator-numbered":""}`},r),this._options.numberedMultiColumnSort&&this._options.sortColNumberInSeparateSpan&&V.createDomElement("div",{className:"slick-sort-indicator-numbered"},r)),this.trigger(this.onHeaderCellRendered,{node:r,column:t,grid:this}),this._options.showHeaderRow){let l=V.createDomElement("div",{className:`ui-state-default slick-state-default slick-headerrow-column l${e} r${e}`},o),d=this.hasFrozenColumns()&&e<=this._options.frozenColumn?"frozen":null;d&&l.classList.add(d),this._bindingEventService.bind(l,"mouseenter",this.handleHeaderRowMouseEnter.bind(this)),this._bindingEventService.bind(l,"mouseleave",this.handleHeaderRowMouseLeave.bind(this)),V.storage.put(l,"column",t),this.trigger(this.onHeaderRowCellRendered,{node:l,column:t,grid:this})}if(this._options.createFooterRow&&this._options.showFooterRow){let l=this.hasFrozenColumns()?e<=this._options.frozenColumn?this._footerRow[0]:this._footerRow[1]:this._footerRow[0],d=V.createDomElement("div",{className:`ui-state-default slick-state-default slick-footerrow-column l${e} r${e}`},l);V.storage.put(d,"column",t),this.trigger(this.onFooterRowCellRendered,{node:d,column:t,grid:this})}}this.setSortColumns(this.sortColumns),this.setupColumnResize(),this._options.enableColumnReorder&&(typeof this._options.enableColumnReorder=="function"?this._options.enableColumnReorder(this,this._headers,this.headerColumnWidthDiff,this.setColumns,this.setupColumnResize,this.columns,this.getColumnIndex,this.uid,this.trigger):this.setupColumnReorder())}setupColumnReorder(){this.sortableSideLeftInstance?.destroy(),this.sortableSideRightInstance?.destroy();let e=null,t=()=>this._viewportScrollContainerX.scrollLeft=this._viewportScrollContainerX.scrollLeft+10,n=()=>this._viewportScrollContainerX.scrollLeft=this._viewportScrollContainerX.scrollLeft-10,o=!1,r={animation:50,direction:"horizontal",chosenClass:"slick-header-column-active",ghostClass:"slick-sortable-placeholder",draggable:".slick-header-column",dragoverBubble:!1,revertClone:!0,scroll:!this.hasFrozenColumns(),filter:`.${this._options.unorderableColumnCssClass}`,onMove:i=>!i.related.classList.contains(this._options.unorderableColumnCssClass),onStart:i=>{i.item.classList.add("slick-header-column-active"),o=!this.hasFrozenColumns()||V.offset(i.item).left>V.offset(this._viewportScrollContainerX).left,o&&i.originalEvent.pageX>this._container.clientWidth?e||(e=window.setInterval(t,100)):o&&i.originalEvent.pageX<V.offset(this._viewportScrollContainerX).left?e||(e=window.setInterval(n,100)):(window.clearInterval(e),e=null)},onEnd:i=>{if(i.item.classList.remove("slick-header-column-active"),window.clearInterval(e),e=null,!this.getEditorLock()?.commitCurrentEdit())return;let a=this.sortableSideLeftInstance?.toArray()??[];a=a.concat(this.sortableSideRightInstance?.toArray()??[]);let l=[];for(let d=0;d<a.length;d++)l.push(this.columns[this.getColumnIndex(a[d])]);this.setColumns(l),this.trigger(this.onColumnsReordered,{impactedColumns:this.columns}),i.stopPropagation(),this.setupColumnResize(),this.activeCellNode&&this.setFocus()}};this.sortableSideLeftInstance=Sortable.create(this._headerL,r),this.sortableSideRightInstance=Sortable.create(this._headerR,r)}getHeaderChildren(){let e=Array.from(this._headers[0].children),t=Array.from(this._headers[1].children);return e.concat(t)}handleResizeableDoubleClick(e){let t=e.target.parentElement.id.replace(this.uid,"");this.trigger(this.onColumnsResizeDblClick,{triggeredByColumn:t})}setupColumnResize(){if(typeof Pm>"u")throw new Error('Slick.Resizable is undefined, make sure to import "slick.interactions.js"');let e,t,n,o,r,i,a,l=-1,d=0,u=this.getHeaderChildren(),f=this.getVisibleColumns();for(let p=0;p<u.length;p++)u[p].querySelectorAll(".slick-resizable-handle").forEach(y=>y.remove()),!(p>=f.length||!f[p])&&f[p].resizable&&(a===void 0&&(a=p),l=p);if(a!==void 0)for(let p=0;p<u.length;p++){let y=u[p];if(p>=f.length||!f[p]||p<a||this._options.forceFitColumns&&p>=l)continue;let w=V.createDomElement("div",{className:"slick-resizable-handle",role:"separator",ariaOrientation:"horizontal"},y);this._bindingEventService.bind(w,"dblclick",this.handleResizeableDoubleClick.bind(this)),this.slickResizableInstances.push(Pm({resizeableElement:y,resizeableHandleElement:w,onResizeStart:(b,m)=>{let v=b.touches?b.changedTouches[0]:b;if(!this.getEditorLock()?.commitCurrentEdit())return!1;o=v.pageX,d=0,m.resizeableElement.classList.add("slick-header-column-active");let D=null,k=null;for(let C=0;C<u.length;C++)C>=f.length||!f[C]||(f[C].previousWidth=u[C].offsetWidth);if(this._options.forceFitColumns)for(D=0,k=0,e=p+1;e<f.length;e++)n=f[e],n?.resizable&&(k!==null&&(n.maxWidth?k+=n.maxWidth-(n.previousWidth||0):k=null),D+=(n.previousWidth||0)-Math.max(n.minWidth||0,this.absoluteColumnMinWidth));let x=0,S=0;for(e=0;e<=p;e++)n=f[e],n?.resizable&&(S!==null&&(n.maxWidth?S+=n.maxWidth-(n.previousWidth||0):S=null),x+=(n.previousWidth||0)-Math.max(n.minWidth||0,this.absoluteColumnMinWidth));D===null&&(D=1e5),x===null&&(x=1e5),k===null&&(k=1e5),S===null&&(S=1e5),i=o+Math.min(D,S),r=o-Math.min(x,k)},onResize:(b,m)=>{let v=b.touches?b.changedTouches[0]:b;this.columnResizeDragging=!0;let D,k=Math.min(i,Math.max(r,v.pageX))-o,x,S=0,C=0,O=this.getViewportInnerWidth();if(k<0){for(x=k,e=p;e>=0;e--)n=f[e],n?.resizable&&!n.hidden&&(D=Math.max(n.minWidth||0,this.absoluteColumnMinWidth),x&&(n.previousWidth||0)+x<D?(x+=(n.previousWidth||0)-D,n.width=D):(n.width=(n.previousWidth||0)+x,x=0));for(t=0;t<=p;t++)n=f[t],!(!n||n.hidden)&&(this.hasFrozenColumns()&&t>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);if(this._options.forceFitColumns)for(x=-k,e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&n.resizable&&(x&&n.maxWidth&&n.maxWidth-(n.previousWidth||0)<x?(x-=n.maxWidth-(n.previousWidth||0),n.width=n.maxWidth):(n.width=(n.previousWidth||0)+x,x=0),this.hasFrozenColumns()&&e>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);else for(e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&(this.hasFrozenColumns()&&e>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);if(this._options.forceFitColumns)for(x=-k,e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&n.resizable&&(x&&n.maxWidth&&n.maxWidth-(n.previousWidth||0)<x?(x-=n.maxWidth-(n.previousWidth||0),n.width=n.maxWidth):(n.width=(n.previousWidth||0)+x,x=0))}else{for(x=k,S=0,C=0,e=p;e>=0;e--)if(n=f[e],!(!n||n.hidden)&&n.resizable)if(x&&n.maxWidth&&n.maxWidth-(n.previousWidth||0)<x)x-=n.maxWidth-(n.previousWidth||0),n.width=n.maxWidth;else{let I=(n.previousWidth||0)+x,F=this.canvasWidthL+x;this.hasFrozenColumns()&&e<=this._options.frozenColumn?(I>d&&F<O-this._options.frozenRightViewportMinWidth&&(d=I),n.width=F+this._options.frozenRightViewportMinWidth>O?d:I):n.width=I,x=0}for(t=0;t<=p;t++)n=f[t],!(!n||n.hidden)&&(this.hasFrozenColumns()&&t>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);if(this._options.forceFitColumns)for(x=-k,e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&n.resizable&&(D=Math.max(n.minWidth||0,this.absoluteColumnMinWidth),x&&(n.previousWidth||0)+x<D?(x+=(n.previousWidth||0)-D,n.width=D):(n.width=(n.previousWidth||0)+x,x=0),this.hasFrozenColumns()&&e>this._options.frozenColumn?C+=n.width||0:S+=n.width||0);else for(e=p+1;e<f.length;e++)n=f[e],!(!n||n.hidden)&&(this.hasFrozenColumns()&&e>this._options.frozenColumn?C+=n.width||0:S+=n.width||0)}this.hasFrozenColumns()&&S!==this.canvasWidthL&&(V.width(this._headerL,S+1e3),V.setStyleSize(this._paneHeaderR,"left",S)),this.applyColumnHeaderWidths(),this._options.syncColumnCellResize&&this.applyColumnWidths(),this.trigger(this.onColumnsDrag,{triggeredByColumn:m.resizeableElement,resizeHandle:m.resizeableHandleElement})},onResizeEnd:(b,m)=>{m.resizeableElement.classList.remove("slick-header-column-active");let v=m.resizeableElement.id.replace(this.uid,"");this.trigger(this.onBeforeColumnsResize,{triggeredByColumn:v}).getReturnValue()===!0&&this.applyColumnHeaderWidths();let D;for(e=0;e<f.length;e++)n=f[e],!(!n||n.hidden)&&(D=u[e].offsetWidth,n.previousWidth!==D&&n.rerenderOnResize&&this.invalidateAllRows());this.updateCanvasWidth(!0),this.render(),this.trigger(this.onColumnsResized,{triggeredByColumn:v}),window.clearTimeout(this._columnResizeTimer),this._columnResizeTimer=window.setTimeout(()=>{this.columnResizeDragging=!1},300)}}))}}setFrozenOptions(){if(this._options.frozenColumn=this._options.frozenColumn>=0&&this._options.frozenColumn<this.columns.length?parseInt(this._options.frozenColumn,10):-1,this._options.frozenRow>-1){this.hasFrozenRows=!0,this.frozenRowsHeight=this._options.frozenRow*this._options.rowHeight;let e=this.getDataLength();this.actualFrozenRow=this._options.frozenBottom?e-this._options.frozenRow:this._options.frozenRow}else this.hasFrozenRows=!1}autosizeColumn(e,t){let n=null,o=-1;if(typeof e=="number")n=this.columns[e],o=e;else if(typeof e=="string")for(let i=0;i<this.columns.length;i++)this.columns[i].id===e&&(n=this.columns[i],o=i);if(!n)return;let r=this.getCanvasNode(0,0);this.getColAutosizeWidth(n,o,r,t||!1,o)}treatAsLocked(e={}){return!e.ignoreHeaderText&&!e.sizeToRemaining&&e.contentSizePx===e.headerWidthPx&&(e.widthPx??0)<100}autosizeColumns(e,t){let n=!this._hiddenParents?.length;n&&this.cacheCssForHiddenInit(),this.internalAutosizeColumns(e,t),n&&this.restoreCssFromHiddenInit()}internalAutosizeColumns(e,t){if(e=e||this._options.autosizeColsMode,e===En.LegacyForceFit||e===En.LegacyOff){this.legacyAutosizeColumns();return}if(e===En.None)return;this.canvas=document.createElement("canvas"),this.canvas?.getContext&&(this.canvas_context=this.canvas.getContext("2d"));let n=this.getCanvasNode(0,0),o=this.getViewportInnerWidth(),r,i,a,l=!1,d=0,u=0,f=0,p=0,y=0;for(r=0;r<this.columns.length;r++)i=this.columns[r],this.getColAutosizeWidth(i,r,n,t||!1,r),y+=i.autoSize?.autosizeMode===pr.Locked?i.width||0:this.treatAsLocked(i.autoSize)&&i.autoSize?.widthPx||0,p+=i.autoSize?.autosizeMode===pr.Locked?i.width||0:this.treatAsLocked(i.autoSize)?i.autoSize?.widthPx||0:i.minWidth||0,d+=i.autoSize?.widthPx||0,u+=i.autoSize?.sizeToRemaining?0:i.autoSize?.widthPx||0,f+=i.autoSize?.sizeToRemaining&&i.minWidth||0;let w=d-u;if(e===En.FitViewportToCols){let b=d+(this.scrollbarDimensions?.width??0);e=En.IgnoreViewport,this._options.viewportMaxWidthPx&&b>this._options.viewportMaxWidthPx?(b=this._options.viewportMaxWidthPx,e=En.FitColsToViewport):this._options.viewportMinWidthPx&&b<this._options.viewportMinWidthPx&&(b=this._options.viewportMinWidthPx,e=En.FitColsToViewport),V.width(this._container,b)}if(e===En.FitColsToViewport)if(w>0&&u<o-f)for(r=0;r<this.columns.length;r++){if(i=this.columns[r],!i||i.hidden)continue;let b=o-u;i.autoSize?.sizeToRemaining?a=b*(i.autoSize?.widthPx||0)/w:a=i.autoSize?.widthPx||0,i.rerenderOnResize&&(i.width||0)!==a&&(l=!0),i.width=a}else if(this._options.viewportSwitchToScrollModeWidthPercent&&u+f>o*this._options.viewportSwitchToScrollModeWidthPercent/100||p>o)e=En.IgnoreViewport;else{let b=u-y,m=o-y-f;for(r=0;r<this.columns.length;r++)i=this.columns[r],!(!i||i.hidden)&&(a=i.width||0,i.autoSize?.autosizeMode!==pr.Locked&&!this.treatAsLocked(i.autoSize)&&(i.autoSize?.sizeToRemaining?a=i.minWidth||0:(a=m/b*(i.autoSize?.widthPx||0)-1,a<(i.minWidth||0)&&(a=i.minWidth||0),b-=i.autoSize?.widthPx||0,m-=a)),this.treatAsLocked(i.autoSize)&&(a=i.autoSize?.widthPx||0,a<(i.minWidth||0)&&(a=i.minWidth||0)),i.rerenderOnResize&&i.width!==a&&(l=!0),i.width=a)}if(e===En.IgnoreViewport)for(r=0;r<this.columns.length;r++)!this.columns[r]||this.columns[r].hidden||(a=this.columns[r].autoSize?.widthPx||0,this.columns[r].rerenderOnResize&&this.columns[r].width!==a&&(l=!0),this.columns[r].width=a);this.reRenderColumns(l)}getColAutosizeWidth(e,t,n,o,r){let i=e.autoSize;if(i.widthPx=e.width,i.autosizeMode===pr.Locked||i.autosizeMode===pr.Guide)return;let a=this.getDataLength(),l=new RegExp(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z/);if(i.autosizeMode===pr.ContentIntelligent){let f=i.colDataTypeOf,p;if(a>0){let y=this.getDataItem(0);y&&(p=y[e.field],l.test(p)&&(p=Date.parse(p)),f=typeof p,f==="object"&&(p instanceof Date&&(f="date"),typeof moment<"u"&&p instanceof moment&&(f="moment")))}f==="boolean"&&(i.colValueArray=[!0,!1]),f==="number"&&(i.valueFilterMode=Pr.GetGreatestAndSub,i.rowSelectionMode=ps.AllRows),f==="string"&&(i.valueFilterMode=Pr.GetLongestText,i.rowSelectionMode=ps.AllRows,i.allowAddlPercent=5),f==="date"&&(i.colValueArray=[new Date(2009,8,30,12,20,20)]),f==="moment"&&typeof moment<"u"&&(i.colValueArray=[moment([2009,8,30,12,20,20])])}let d=i.contentSizePx=this.getColContentSize(e,t,n,o,r);d===0&&(d=i.widthPx||0);let u=i.allowAddlPercent?1+i.allowAddlPercent/100:1;d=d*u+(this._options.autosizeColPaddingPx||0),e.minWidth&&d<e.minWidth&&(d=e.minWidth),e.maxWidth&&d>e.maxWidth&&(d=e.maxWidth),(i.autosizeMode===pr.ContentExpandOnly||e?.editor?.ControlFillsColumn)&&d<(e.width||0)&&(d=e.width||0),i.widthPx=d}getColContentSize(e,t,n,o,r){let i=e.autoSize,a=1,l,d,u=0,f=0;if(i.headerWidthPx=0,i.ignoreHeaderText||(i.headerWidthPx=this.getColHeaderWidth(e)),i.headerWidthPx===0&&(i.headerWidthPx=e.width?e.width:e.maxWidth?e.maxWidth:e.minWidth?e.minWidth:20),i.colValueArray)return f=this.getColWidth(e,n,i.colValueArray),Math.max(i.headerWidthPx,f);let p={};p.colIndex=t,p.rowCount=this.getDataLength(),p.startIndex=0,p.endIndex=p.rowCount-1,p.valueArr=null,p.getRowVal=w=>this.getDataItem(w)[e.field];let y=(o?i.rowSelectionModeOnInit:void 0)||i.rowSelectionMode;if(y===ps.FirstRow&&(p.endIndex=0),y===ps.LastRow&&(p.endIndex=p.startIndex=p.rowCount-1),y===ps.FirstNRows&&(p.endIndex=Math.min(i.rowSelectionCount||0,p.rowCount)-1),i.valueFilterMode===Pr.DeDuplicate){let w={};for(l=p.startIndex;l<=p.endIndex;l++)w[p.getRowVal(l)]=!0;if(Object.keys)p.valueArr=Object.keys(w);else{p.valueArr=[];for(let b in w)w&&p.valueArr.push(b)}p.startIndex=0,p.endIndex=p.length-1}if(i.valueFilterMode===Pr.GetGreatestAndSub){let w,b=0;for(l=p.startIndex;l<=p.endIndex;l++)d=p.getRowVal(l),Math.abs(d)>b&&(w=d,b=Math.abs(d));w=""+w,w=Array(w.length+1).join("9"),w=+w,p.valueArr=[w],p.startIndex=p.endIndex=0}if(i.valueFilterMode===Pr.GetLongestTextAndSub){for(l=p.startIndex;l<=p.endIndex;l++)d=p.getRowVal(l),(d||"").length>u&&(u=d.length);d=Array(u+1).join("m"),a=this._options.autosizeTextAvgToMWidthRatio||0,p.maxLen=u,p.valueArr=[d],p.startIndex=p.endIndex=0}if(i.valueFilterMode===Pr.GetLongestText){u=0;let w=0;for(l=p.startIndex;l<=p.endIndex;l++)d=p.getRowVal(l),(d||"").length>u&&(u=d.length,w=l);d=p.getRowVal(w),p.maxLen=u,p.valueArr=[d],p.startIndex=p.endIndex=0}return p.maxLen&&p.maxLen>30&&r>1&&(i.sizeToRemaining=!0),f=this.getColWidth(e,n,p)*a,Math.max(i.headerWidthPx,f)}getColWidth(e,t,n){let o=V.createDomElement("div",{className:"slick-row ui-widget-content"},t),r=V.createDomElement("div",{className:"slick-cell"},o);r.style.position="absolute",r.style.visibility="hidden",r.style.textOverflow="initial",r.style.whiteSpace="nowrap";let i,a,l=0,d="",u,f,p=e.autoSize.widthEvalMode===Nd.TextOnly;if(e.autoSize?.widthEvalMode===Nd.Auto){let y=!e.formatterOverride&&!e.formatter,w=e?.formatterOverride?.ReturnsTextOnly||!e.formatterOverride&&e.formatter?.ReturnsTextOnly;p=y||w}if(this.canvas_context&&p){let y=getComputedStyle(r);for(this.canvas_context.font=y.fontSize+" "+y.fontFamily,i=n.startIndex;i<=n.endIndex;i++)f=n.valueArr?n.valueArr[i]:n.getRowVal(i),e.formatterOverride?u=e.formatterOverride(i,n.colIndex,f,e,this.getDataItem(i),this):e.formatter?u=e.formatter(i,n.colIndex,f,e,this.getDataItem(i),this):u=""+f,a=u?this.canvas_context.measureText(u).width:0,a>l&&(l=a,d=u);return r.textContent=d,a=r.offsetWidth,o.remove(),a}for(i=n.startIndex;i<=n.endIndex;i++)f=n.valueArr?n.valueArr[i]:n.getRowVal(i),e.formatterOverride?u=e.formatterOverride(i,n.colIndex,f,e,this.getDataItem(i),this):e.formatter?u=e.formatter(i,n.colIndex,f,e,this.getDataItem(i),this):u=""+f,this.applyFormatResultToCellNode(u,r),a=r.offsetWidth,a>l&&(l=a);return o.remove(),l}getColHeaderWidth(e){let t=0,n=this.getUID()+e.id,o=document.getElementById(n),r=`${n}_`,i=o.cloneNode(!0);if(o)i.id=r,i.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",o.parentNode.insertBefore(i,o),t=i.offsetWidth,i.parentNode.removeChild(i);else{let a=this.getHeader(e);o=V.createDomElement("div",{id:r,className:"ui-state-default slick-state-default slick-header-column"},a);let l=V.createDomElement("span",{className:"slick-column-name"},o);this.applyHtmlCode(l,e.name),i.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",e.headerCssClass&&o.classList.add(...V.classNameToList(e.headerCssClass)),t=o.offsetWidth,a.removeChild(o)}return t}legacyAutosizeColumns(){let e,t,n=0,o=0,r=0,i=[],a=this.getViewportInnerWidth();for(e=0;e<this.columns.length;e++){if(t=this.columns[e],!t||t.hidden){i.push(0);continue}i.push(t.width||0),o+=t.width||0,t.resizable&&(n+=(t.width||0)-Math.max(t.minWidth||0,this.absoluteColumnMinWidth))}for(r=o;o>a&&n;){let d=(o-a)/n;for(e=0;e<this.columns.length&&o>a;e++){if(t=this.columns[e],!t||t.hidden)continue;let u=i[e];if(!t.resizable||u<=t.minWidth||u<=this.absoluteColumnMinWidth)continue;let f=Math.max(t.minWidth,this.absoluteColumnMinWidth),p=Math.floor(d*(u-f))||1;p=Math.min(p,u-f),o-=p,n-=p,i[e]-=p}if(r<=o)break;r=o}for(r=o;o<a;){let d=a/o;for(e=0;e<this.columns.length&&o<a;e++){if(t=this.columns[e],!t||t.hidden)continue;let u=i[e],f;!t.resizable||t.maxWidth<=u?f=0:f=Math.min(Math.floor(d*u)-u,t.maxWidth-u||1e6)||1,o+=f,i[e]+=o<=a?f:0}if(r>=o)break;r=o}let l=!1;for(e=0;e<this.columns.length;e++)!t||t.hidden||(this.columns[e].rerenderOnResize&&this.columns[e].width!==i[e]&&(l=!0),this.columns[e].width=i[e]);this.reRenderColumns(l)}reRenderColumns(e){this.applyColumnHeaderWidths(),this.updateCanvasWidth(!0),this.trigger(this.onAutosizeColumns,{columns:this.columns}),e&&(this.invalidateAllRows(),this.render())}getVisibleColumns(){return this.columns.filter(e=>!e.hidden)}getColumnIndex(e){return this.columnsById[e]}applyColumnHeaderWidths(){if(!this.initialized)return;let e=0,t=this.getVisibleColumns();this._headers.forEach(n=>{for(let o=0;o<n.children.length;o++,e++){let r=n.children[o],i=((t[e]||{}).width||0)-this.headerColumnWidthDiff;V.width(r)!==i&&V.width(r,i)}}),this.updateColumnCaches()}applyColumnWidths(){let e=0,t=0,n;for(let o=0;o<this.columns.length;o++)this.columns[o]?.hidden||(t=this.columns[o].width||0,n=this.getColumnCssRules(o),n.left.style.left=`${e}px`,n.right.style.right=(this._options.frozenColumn!==-1&&o>this._options.frozenColumn?this.canvasWidthR:this.canvasWidthL)-e-t+"px",this._options.frozenColumn!==o&&(e+=this.columns[o].width)),this._options.frozenColumn===o&&(e=0)}setSortColumn(e,t){this.setSortColumns([{columnId:e,sortAsc:t}])}getColumnByIndex(e){let t;return this._headers.every(n=>{let o=n.children.length;return e<o?(t=n.children[e],!1):(e-=o,!0)}),t}setSortColumns(e){this.sortColumns=e;let t=this._options.numberedMultiColumnSort&&this.sortColumns.length>1;this._headers.forEach(o=>{let r=o.querySelectorAll(".slick-header-column-sorted");r.forEach(i=>{i.classList.remove("slick-header-column-sorted")}),r=o.querySelectorAll(".slick-sort-indicator"),r.forEach(i=>{i.classList.remove("slick-sort-indicator-asc"),i.classList.remove("slick-sort-indicator-desc")}),r=o.querySelectorAll(".slick-sort-indicator-numbered"),r.forEach(i=>{i.textContent=""})});let n=1;this.sortColumns.forEach(o=>{V.isDefined(o.sortAsc)||(o.sortAsc=!0);let r=this.getColumnIndex(o.columnId);if(V.isDefined(r)){let i=this.getColumnByIndex(r);if(i){i.classList.add("slick-header-column-sorted");let a=i.querySelector(".slick-sort-indicator");a?.classList.add(o.sortAsc?"slick-sort-indicator-asc":"slick-sort-indicator-desc"),t&&(a=i.querySelector(".slick-sort-indicator-numbered"),a&&(a.textContent=String(n)))}}n++})}getColumns(){return this.columns}getSortColumns(){return this.sortColumns}updateColumnCaches(){this.columnPosLeft=[],this.columnPosRight=[];let e=0;for(let t=0,n=this.columns.length;t<n;t++)!this.columns[t]||this.columns[t].hidden||(this.columnPosLeft[t]=e,this.columnPosRight[t]=e+(this.columns[t].width||0),this._options.frozenColumn===t?e=0:e+=this.columns[t].width||0)}updateColumnProps(){this.columnsById={};for(let e=0;e<this.columns.length;e++){let t=this.columns[e];t.width&&(t.widthRequest=t.width),this._options.mixinDefaults?(V.applyDefaults(t,this._columnDefaults),t.autoSize||(t.autoSize={}),V.applyDefaults(t.autoSize,this._columnAutosizeDefaults)):(t=this.columns[e]=V.extend({},this._columnDefaults,t),t.autoSize=V.extend({},this._columnAutosizeDefaults,t.autoSize)),this.columnsById[t.id]=e,t.minWidth&&(t.width||0)<t.minWidth&&(t.width=t.minWidth),t.maxWidth&&(t.width||0)>t.maxWidth&&(t.width=t.maxWidth)}}setColumns(e){this.trigger(this.onBeforeSetColumns,{previousColumns:this.columns,newColumns:e,grid:this}),this.columns=e,this.updateColumnsInternal(),this.trigger(this.onAfterSetColumns,{newColumns:e,grid:this})}updateColumns(){this.trigger(this.onBeforeUpdateColumns,{columns:this.columns,grid:this}),this.updateColumnsInternal()}updateColumnsInternal(){this.updateColumnProps(),this.updateColumnCaches(),this.initialized&&(this.setPaneFrozenClasses(),this.setPaneVisibility(),this.setOverflow(),this.invalidateAllRows(),this.createColumnHeaders(),this.createColumnFooter(),this.removeCssRules(),this.createCssRules(),this.resizeCanvas(),this.updateCanvasWidth(),this.applyColumnHeaderWidths(),this.applyColumnWidths(),this.handleScroll(),this.getSelectionModel()?.refreshSelections())}getEditorLock(){return this._options.editorLock}getEditController(){return this.editController}setData(e,t){this.data=e,this.invalidateAllRows(),this.updateRowCount(),t&&this.scrollTo(0)}getData(){return this.data}getDataLength(){return this.data.getLength?this.data.getLength():this.data?.length??0}getDataLengthIncludingAddNew(){return this.getDataLength()+(this._options.enableAddRow&&(!this.pagingActive||this.pagingIsLastPage)?1:0)}getDataItem(e){return this.data.getItem?this.data.getItem(e):this.data[e]}hasDataView(){return!Array.isArray(this.data)}getItemMetadaWhenExists(e){return"getItemMetadata"in this.data?this.data.getItemMetadata(e):null}getFormatter(e,t){let n=this.data?.getItemMetadata?.(e);return(n?.columns&&(n.columns[t.id]||n.columns[this.getColumnIndex(t.id)]))?.formatter||n?.formatter||t.formatter||this._options.formatterFactory?.getFormatter(t)||this._options.defaultFormatter}getEditor(e,t){let n=this.columns[t],o=this.getItemMetadaWhenExists(e)?.columns;return o?.[n.id]?.editor!==void 0?o[n.id].editor:o?.[t]?.editor!==void 0?o[t].editor:n.editor||this._options?.editorFactory?.getEditor(n)}getDataItemValueForColumn(e,t){return this._options.dataItemColumnValueExtractor?this._options.dataItemColumnValueExtractor(e,t):e[t.field]}resetActiveCell(){this.setActiveCellInternal(null,!1)}unsetActiveCell(){V.isDefined(this.activeCellNode)&&(this.makeActiveCellNormal(),this.activeCellNode.classList.remove("active"),this.rowsCache[this.activeRow]?.rowNode?.forEach(e=>e.classList.remove("active")))}focus(){this.setFocus()}setFocus(){this.tabbingDirection===-1?this._focusSink.focus():this._focusSink2.focus()}setActiveCellInternal(e,t,n,o,r){if(this.unsetActiveCell(),this.activeCellNode=e,V.isDefined(this.activeCellNode)){let i=V.offset(this.activeCellNode),a=Math.floor(V.offset(V.parents(this.activeCellNode,".grid-canvas")[0]).top),l=V.parents(this.activeCellNode,".grid-canvas-bottom").length;this.hasFrozenRows&&l&&(a-=this._options.frozenBottom?V.height(this._canvasTopL):this.frozenRowsHeight);let d=this.getCellFromPoint(i.left,Math.ceil(i.top)-a);this.activeRow=d.row,this.activePosY=d.row,this.activeCell=this.activePosX=this.getCellFromNode(this.activeCellNode),!V.isDefined(t)&&this._options.autoEditNewRow&&(t=this.activeRow===this.getDataLength()||this._options.autoEdit),this._options.showCellSelection&&(document.querySelectorAll(".slick-cell.active").forEach(u=>u.classList.remove("active")),this.activeCellNode.classList.add("active"),this.rowsCache[this.activeRow]?.rowNode?.forEach(u=>u.classList.add("active"))),this._options.editable&&t&&this.isCellPotentiallyEditable(this.activeRow,this.activeCell)&&(this._options.asyncEditorLoading?(window.clearTimeout(this.h_editorLoader),this.h_editorLoader=window.setTimeout(()=>{this.makeActiveCellEditable(void 0,n,r)},this._options.asyncEditorLoadDelay)):this.makeActiveCellEditable(void 0,n,r))}else this.activeRow=this.activeCell=null;o||this.trigger(this.onActiveCellChanged,this.getActiveCell())}isCellPotentiallyEditable(e,t){let n=this.getDataLength();return!(e<n&&!this.getDataItem(e)||this.columns[t].cannotTriggerInsert&&e>=n||!this.columns[t]||this.columns[t].hidden||!this.getEditor(e,t))}makeActiveCellNormal(e=!1){if(this.currentEditor){if(this.trigger(this.onBeforeCellEditorDestroy,{editor:this.currentEditor}),this.currentEditor.destroy(),this.currentEditor=null,this.activeCellNode){let t=this.getDataItem(this.activeRow);if(this.activeCellNode.classList.remove("editable"),this.activeCellNode.classList.remove("invalid"),t){let n=this.columns[this.activeCell],o=this.getFormatter(this.activeRow,n)(this.activeRow,this.activeCell,this.getDataItemValueForColumn(t,n),n,t,this);this.applyFormatResultToCellNode(o,this.activeCellNode),this.invalidatePostProcessingResults(this.activeRow)}e&&this.setFocus()}navigator.userAgent.toLowerCase().match(/msie/)&&this.clearTextSelection(),this.getEditorLock()?.deactivate(this.editController)}}editActiveCell(e,t,n){this.makeActiveCellEditable(e,t,n)}makeActiveCellEditable(e,t,n){if(!this.activeCellNode)return;if(!this._options.editable)throw new Error("SlickGrid makeActiveCellEditable : should never get called when this._options.editable is false");if(window.clearTimeout(this.h_editorLoader),!this.isCellPotentiallyEditable(this.activeRow,this.activeCell))return;let o=this.columns[this.activeCell],r=this.getDataItem(this.activeRow);if(this.trigger(this.onBeforeEditCell,{row:this.activeRow,cell:this.activeCell,item:r,column:o,target:"grid"}).getReturnValue()===!1){this.setFocus();return}this.getEditorLock()?.activate(this.editController),this.activeCellNode.classList.add("editable");let i=e||this.getEditor(this.activeRow,this.activeCell);if(!i||typeof i!="function")return;!e&&!i.suppressClearOnEdit&&V.emptyElement(this.activeCellNode);let a=this.getItemMetadaWhenExists(this.activeRow);a=a?.columns;let l=a&&(a[o.id]||a[this.activeCell]),d={grid:this,gridPosition:this.absBox(this._container),position:this.absBox(this.activeCellNode),container:this.activeCellNode,column:o,columnMetaData:l,item:r||{},event:n,commitChanges:this.commitEditAndSetFocus.bind(this),cancelChanges:this.cancelEditAndSetFocus.bind(this)};this.currentEditor=new i(d),r&&this.currentEditor&&(this.currentEditor.loadValue(r),t&&this.currentEditor?.preClick&&this.currentEditor.preClick()),this.serializedEditorValue=this.currentEditor?.serializeValue(),this.currentEditor?.position&&this.handleActiveCellPositionChange()}commitEditAndSetFocus(){this.getEditorLock()?.commitCurrentEdit()&&(this.setFocus(),this._options.autoEdit&&!this._options.autoCommitEdit&&this.navigateDown())}cancelEditAndSetFocus(){this.getEditorLock()?.cancelCurrentEdit()&&this.setFocus()}commitCurrentEdit(){let e=this,t=e.getDataItem(e.activeRow),n=e.columns[e.activeCell];if(e.currentEditor){if(e.currentEditor.isValueChanged()){let o=e.currentEditor.validate();if(o.valid){let r=e.activeRow,i=e.activeCell,a=e.currentEditor,l=e.currentEditor.serializeValue(),d=e.serializedEditorValue;if(e.activeRow<e.getDataLength()){let u={row:r,cell:i,editor:a,serializedValue:l,prevSerializedValue:d,execute:()=>{a.applyValue(t,l),e.updateRow(r),e.trigger(e.onCellChange,{command:"execute",row:r,cell:i,item:t,column:n})},undo:()=>{a.applyValue(t,d),e.updateRow(r),e.trigger(e.onCellChange,{command:"undo",row:r,cell:i,item:t,column:n})}};e._options.editCommandHandler?(e.makeActiveCellNormal(!0),e._options.editCommandHandler(t,n,u)):(u.execute(),e.makeActiveCellNormal(!0))}else{let u={};e.currentEditor.applyValue(u,e.currentEditor.serializeValue()),e.makeActiveCellNormal(!0),e.trigger(e.onAddNewRow,{item:u,column:n})}return!e.getEditorLock()?.isActive()}else return e.activeCellNode&&(e.activeCellNode.classList.remove("invalid"),V.width(e.activeCellNode),e.activeCellNode.classList.add("invalid")),e.trigger(e.onValidationError,{editor:e.currentEditor,cellNode:e.activeCellNode,validationResults:o,row:e.activeRow,cell:e.activeCell,column:n}),e.currentEditor.focus(),!1}e.makeActiveCellNormal(!0)}return!0}cancelCurrentEdit(){return this.makeActiveCellNormal(),!0}getSelectedRows(){if(!this.selectionModel)throw new Error("SlickGrid Selection model is not set");return this.selectedRows.slice(0)}setSelectedRows(e,t){if(!this.selectionModel)throw new Error("SlickGrid Selection model is not set");this&&this.getEditorLock&&!this.getEditorLock()?.isActive()&&this.selectionModel.setSelectedRanges(this.rowsToRanges(e),t||"SlickGrid.setSelectedRows")}trigger(e,t,n){let o=n||new gi(n,t),r=t||{};return r.grid=this,e.notify(r,o,this)}handleCellMouseOut(e){this.trigger(this.onMouseLeave,{},e)}handleHeaderMouseHoverOn(e){e?.target.classList.add("ui-state-hover","slick-state-hover")}handleHeaderMouseHoverOff(e){e?.target.classList.remove("ui-state-hover","slick-state-hover")}handleSelectedRangesChanged(e,t){let n=e.getNativeEvent(),o=this.selectedRows.slice(0);this.selectedRows=[];let r={};for(let i=0;i<t.length;i++)for(let a=t[i].fromRow;a<=t[i].toRow;a++){r[a]||(this.selectedRows.push(a),r[a]={});for(let l=t[i].fromCell;l<=t[i].toCell;l++)this.canCellBeSelected(a,l)&&(r[a][this.columns[l].id]=this._options.selectedCellCssClass)}if(this.setCellCssStyles(this._options.selectedCellCssClass||"",r),this.simpleArrayEquals(o,this.selectedRows)){let i=n?.detail?.caller??"click",a=new Set(this.getSelectedRows()),l=new Set(o),d=Array.from(a).filter(f=>!l.has(f)),u=Array.from(l).filter(f=>!a.has(f));this.trigger(this.onSelectedRowsChanged,{rows:this.getSelectedRows(),previousSelectedRows:o,caller:i,changedSelectedRows:d,changedUnselectedRows:u},e)}}handleMouseWheel(e,t,n,o){this.scrollHeight=this._viewportScrollContainerY.scrollHeight,e.shiftKey?this.scrollLeft=this._viewportScrollContainerX.scrollLeft+n*10:(this.scrollTop=Math.max(0,this._viewportScrollContainerY.scrollTop-o*this._options.rowHeight),this.scrollLeft=this._viewportScrollContainerX.scrollLeft+n*10),this._handleScroll("mousewheel")&&e.stopPropagation()}handleDragInit(e,t){let n=this.getCellFromEvent(e);if(!n||!this.cellExists(n.row,n.cell))return!1;let o=this.trigger(this.onDragInit,t,e);return o.isImmediatePropagationStopped()?o.getReturnValue():!1}handleDragStart(e,t){let n=this.getCellFromEvent(e);if(!n||!this.cellExists(n.row,n.cell))return!1;let o=this.trigger(this.onDragStart,t,e);return o.isImmediatePropagationStopped()?o.getReturnValue():!1}handleDrag(e,t){return this.trigger(this.onDrag,t,e).getReturnValue()}handleDragEnd(e,t){this.trigger(this.onDragEnd,t,e)}handleKeyDown(e){let t=this.trigger(this.onKeyDown,{row:this.activeRow,cell:this.activeCell},e).isImmediatePropagationStopped();if(!t&&!e.shiftKey&&!e.altKey){if(this._options.editable&&this.currentEditor?.keyCaptureList&&this.currentEditor.keyCaptureList.indexOf(e.which)>-1)return;e.ctrlKey&&e.key==="Home"?this.navigateTopStart():e.ctrlKey&&e.key==="End"?this.navigateBottomEnd():e.ctrlKey&&e.key==="ArrowUp"?this.navigateTop():e.ctrlKey&&e.key==="ArrowDown"?this.navigateBottom():e.ctrlKey&&e.key==="ArrowLeft"||!e.ctrlKey&&e.key==="Home"?this.navigateRowStart():(e.ctrlKey&&e.key==="ArrowRight"||!e.ctrlKey&&e.key==="End")&&this.navigateRowEnd()}if(!t)if(!e.shiftKey&&!e.altKey&&!e.ctrlKey){if(this._options.editable&&this.currentEditor?.keyCaptureList&&this.currentEditor.keyCaptureList.indexOf(e.which)>-1)return;if(e.which===wo.ESCAPE){if(!this.getEditorLock()?.isActive())return;this.cancelEditAndSetFocus()}else e.which===wo.PAGE_DOWN?(this.navigatePageDown(),t=!0):e.which===wo.PAGE_UP?(this.navigatePageUp(),t=!0):e.which===wo.LEFT?t=this.navigateLeft():e.which===wo.RIGHT?t=this.navigateRight():e.which===wo.UP?t=this.navigateUp():e.which===wo.DOWN?t=this.navigateDown():e.which===wo.TAB?t=this.navigateNext():e.which===wo.ENTER&&(this._options.editable&&(this.currentEditor?this.activeRow===this.getDataLength()?this.navigateDown():this.commitEditAndSetFocus():this.getEditorLock()?.commitCurrentEdit()&&this.makeActiveCellEditable(void 0,void 0,e)),t=!0)}else e.which===wo.TAB&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&(t=this.navigatePrev());if(t){e.stopPropagation(),e.preventDefault();try{e.originalEvent.keyCode=0}catch{}}}handleClick(e){let t=e instanceof gi?e.getNativeEvent():e;if(!this.currentEditor&&(t.target!==document.activeElement||t.target.classList.contains("slick-cell"))){let o=this.getTextSelection();this.setFocus(),this.setTextSelection(o)}let n=this.getCellFromEvent(t);if(!(!n||this.currentEditor!==null&&this.activeRow===n.row&&this.activeCell===n.cell)&&(e=this.trigger(this.onClick,{row:n.row,cell:n.cell},e||t),!e.isImmediatePropagationStopped()&&this.canCellBeActive(n.row,n.cell)&&(!this.getEditorLock()?.isActive()||this.getEditorLock()?.commitCurrentEdit()))){this.scrollRowIntoView(n.row,!1);let o=t.target?.className===NA,r=this.columns[n.cell],i=!!(this._options.editable&&r?.editor&&this._options.suppressActiveCellChangeOnEdit);this.setActiveCellInternal(this.getCellNode(n.row,n.cell),null,o,i,t)}}handleContextMenu(e){let t=e.target.closest(".slick-cell");t&&(this.activeCellNode===t&&this.currentEditor!==null||this.trigger(this.onContextMenu,{},e))}handleDblClick(e){let t=this.getCellFromEvent(e);!t||this.currentEditor!==null&&this.activeRow===t.row&&this.activeCell===t.cell||(this.trigger(this.onDblClick,{row:t.row,cell:t.cell},e),!e.defaultPrevented&&this._options.editable&&this.gotoCell(t.row,t.cell,!0,e))}handleHeaderMouseEnter(e){let t=V.storage.get(e.target.closest(".slick-header-column"),"column");t&&this.trigger(this.onHeaderMouseEnter,{column:t,grid:this},e)}handleHeaderMouseLeave(e){let t=V.storage.get(e.target.closest(".slick-header-column"),"column");t&&this.trigger(this.onHeaderMouseLeave,{column:t,grid:this},e)}handleHeaderRowMouseEnter(e){let t=V.storage.get(e.target.closest(".slick-headerrow-column"),"column");t&&this.trigger(this.onHeaderRowMouseEnter,{column:t,grid:this},e)}handleHeaderRowMouseLeave(e){let t=V.storage.get(e.target.closest(".slick-headerrow-column"),"column");t&&this.trigger(this.onHeaderRowMouseLeave,{column:t,grid:this},e)}handleHeaderContextMenu(e){let t=e.target.closest(".slick-header-column"),n=t&&V.storage.get(t,"column");this.trigger(this.onHeaderContextMenu,{column:n},e)}handleHeaderClick(e){if(!this.columnResizeDragging){let t=e.target.closest(".slick-header-column"),n=t&&V.storage.get(t,"column");n&&this.trigger(this.onHeaderClick,{column:n},e)}}handlePreHeaderContextMenu(e){this.trigger(this.onPreHeaderContextMenu,{node:e.target},e)}handlePreHeaderClick(e){this.columnResizeDragging||this.trigger(this.onPreHeaderClick,{node:e.target},e)}handleFooterContextMenu(e){let t=e.target.closest(".slick-footerrow-column"),n=t&&V.storage.get(t,"column");this.trigger(this.onFooterContextMenu,{column:n},e)}handleFooterClick(e){let t=e.target.closest(".slick-footerrow-column"),n=t&&V.storage.get(t,"column");this.trigger(this.onFooterClick,{column:n},e)}handleCellMouseOver(e){this.trigger(this.onMouseEnter,{},e)}handleActiveCellPositionChange(){if(this.activeCellNode&&(this.trigger(this.onActiveCellPositionChanged,{}),this.currentEditor)){let e=this.getActiveCellPosition();this.currentEditor.show&&this.currentEditor.hide&&(e.visible?this.currentEditor.show():this.currentEditor.hide()),this.currentEditor.position&&this.currentEditor.position(e)}}actionThrottle(e,t){let n=!1,o=!1,r=()=>{n?o=!0:a()},i=()=>{o=!1},a=()=>{n=!0,window.clearTimeout(this._executionBlockTimer),this._executionBlockTimer=window.setTimeout(l,t),e.call(this)},l=()=>{o?(i(),a()):n=!1};return{enqueue:r.bind(this),dequeue:i.bind(this)}}getCellFromEvent(e){let t=e instanceof gi?e.getNativeEvent():e,n=t.touches?t.touches[0]:t,o=t.target.closest(".slick-cell");if(!o)return null;let r=this.getRowFromNode(o.parentNode);if(this.hasFrozenRows){let a=0,l=V.offset(V.parents(o,".grid-canvas")[0]);V.parents(o,".grid-canvas-bottom").length&&(a=this._options.frozenBottom?V.height(this._canvasTopL):this.frozenRowsHeight),r=this.getCellFromPoint(n.clientX-l.left,n.clientY-l.top+a+document.documentElement.scrollTop).row}let i=this.getCellFromNode(o);return!V.isDefined(r)||!V.isDefined(i)?null:{row:r,cell:i}}applyHtmlCode(e,t,n){if(e)if(t instanceof HTMLElement||t instanceof DocumentFragment)n?.emptyTarget!==!1&&V.emptyElement(e),e.appendChild(t);else{if(n?.skipEmptyReassignment!==!1&&!V.isDefined(t)&&!e.innerHTML)return;let o=t;typeof o=="number"||typeof o=="boolean"?e.textContent=o:(o=this.sanitizeHtmlString(t),this._options.enableHtmlRendering&&o?e.innerHTML=o:e.textContent=o)}}getCanvasNode(e,t){return this._getContainerElement(this.getCanvases(),e,t)}getActiveCanvasNode(e){return e===void 0?this._activeCanvasNode:(e instanceof gi&&(e=e.getNativeEvent()),this._activeCanvasNode=e?.target.closest(".grid-canvas"),this._activeCanvasNode)}getCanvases(){return this._canvas}getViewportNode(e,t){return this._getContainerElement(this.getViewports(),e,t)}getViewports(){return this._viewport}getActiveViewportNode(e){return this.setActiveViewportNode(e),this._activeViewportNode}setActiveViewportNode(e){return e instanceof gi&&(e=e.getNativeEvent()),this._activeViewportNode=e?.target.closest(".slick-viewport"),this._activeViewportNode}getHeadersWidth(){this.headersWidth=this.headersWidthL=this.headersWidthR=0;let e=!this._options.autoHeight,t=0,n=this.columns.length;for(t=0;t<n;t++){if(!this.columns[t]||this.columns[t].hidden)continue;let o=this.columns[t].width;this._options.frozenColumn>-1&&t>this._options.frozenColumn?this.headersWidthR+=o||0:this.headersWidthL+=o||0}return e&&(this._options.frozenColumn>-1&&t>this._options.frozenColumn?this.headersWidthR+=this.scrollbarDimensions?.width??0:this.headersWidthL+=this.scrollbarDimensions?.width??0),this.hasFrozenColumns()?(this.headersWidthL=this.headersWidthL+1e3,this.headersWidthR=Math.max(this.headersWidthR,this.viewportW)+this.headersWidthL,this.headersWidthR+=this.scrollbarDimensions?.width??0):(this.headersWidthL+=this.scrollbarDimensions?.width??0,this.headersWidthL=Math.max(this.headersWidthL,this.viewportW)+1e3),this.headersWidth=this.headersWidthL+this.headersWidthR,Math.max(this.headersWidth,this.viewportW)+1e3}getCanvasWidth(){let e=this.getViewportInnerWidth(),t=this.columns.length;for(this.canvasWidthL=this.canvasWidthR=0;t--;)!this.columns[t]||this.columns[t].hidden||(this.hasFrozenColumns()&&t>this._options.frozenColumn?this.canvasWidthR+=this.columns[t].width||0:this.canvasWidthL+=this.columns[t].width||0);let n=this.canvasWidthL+this.canvasWidthR;if(this._options.fullWidthRows){let o=Math.max(n,e)-n;o>0&&(n+=o,this.hasFrozenColumns()?this.canvasWidthR+=o:this.canvasWidthL+=o)}return n}updateCanvasWidth(e){let t=this.canvasWidth,n=this.canvasWidthL,o=this.canvasWidthR;this.canvasWidth=this.getCanvasWidth(),this._options.createTopHeaderPanel&&V.width(this._topHeaderPanel,this._options.topHeaderPanelWidth??this.canvasWidth);let r=this.canvasWidth!==t||this.canvasWidthL!==n||this.canvasWidthR!==o;if(r||this.hasFrozenColumns()||this.hasFrozenRows)if(V.width(this._canvasTopL,this.canvasWidthL),this.getHeadersWidth(),V.width(this._headerL,this.headersWidthL),V.width(this._headerR,this.headersWidthR),this.hasFrozenColumns()){let i=V.width(this._container)||0;if(i>0&&this.canvasWidthL>i&&this._options.throwWhenFrozenNotAllViewable)throw new Error("[SlickGrid] Frozen columns cannot be wider than the actual grid container width. Make sure to have less columns freezed or make your grid container wider");V.width(this._canvasTopR,this.canvasWidthR),V.width(this._paneHeaderL,this.canvasWidthL),V.setStyleSize(this._paneHeaderR,"left",this.canvasWidthL),V.setStyleSize(this._paneHeaderR,"width",this.viewportW-this.canvasWidthL),V.width(this._paneTopL,this.canvasWidthL),V.setStyleSize(this._paneTopR,"left",this.canvasWidthL),V.width(this._paneTopR,this.viewportW-this.canvasWidthL),V.width(this._headerRowScrollerL,this.canvasWidthL),V.width(this._headerRowScrollerR,this.viewportW-this.canvasWidthL),V.width(this._headerRowL,this.canvasWidthL),V.width(this._headerRowR,this.canvasWidthR),this._options.createFooterRow&&(V.width(this._footerRowScrollerL,this.canvasWidthL),V.width(this._footerRowScrollerR,this.viewportW-this.canvasWidthL),V.width(this._footerRowL,this.canvasWidthL),V.width(this._footerRowR,this.canvasWidthR)),this._options.createPreHeaderPanel&&V.width(this._preHeaderPanel,this._options.preHeaderPanelWidth??this.canvasWidth),V.width(this._viewportTopL,this.canvasWidthL),V.width(this._viewportTopR,this.viewportW-this.canvasWidthL),this.hasFrozenRows&&(V.width(this._paneBottomL,this.canvasWidthL),V.setStyleSize(this._paneBottomR,"left",this.canvasWidthL),V.width(this._viewportBottomL,this.canvasWidthL),V.width(this._viewportBottomR,this.viewportW-this.canvasWidthL),V.width(this._canvasBottomL,this.canvasWidthL),V.width(this._canvasBottomR,this.canvasWidthR))}else V.width(this._paneHeaderL,"100%"),V.width(this._paneTopL,"100%"),V.width(this._headerRowScrollerL,"100%"),V.width(this._headerRowL,this.canvasWidth),this._options.createFooterRow&&(V.width(this._footerRowScrollerL,"100%"),V.width(this._footerRowL,this.canvasWidth)),this._options.createPreHeaderPanel&&V.width(this._preHeaderPanel,this._options.preHeaderPanelWidth??this.canvasWidth),V.width(this._viewportTopL,"100%"),this.hasFrozenRows&&(V.width(this._viewportBottomL,"100%"),V.width(this._canvasBottomL,this.canvasWidthL));this.viewportHasHScroll=this.canvasWidth>=this.viewportW-(this.scrollbarDimensions?.width??0),V.width(this._headerRowSpacerL,this.canvasWidth+(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0)),V.width(this._headerRowSpacerR,this.canvasWidth+(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0)),this._options.createFooterRow&&(V.width(this._footerRowSpacerL,this.canvasWidth+(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0)),V.width(this._footerRowSpacerR,this.canvasWidth+(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0))),(r||e)&&this.applyColumnWidths()}getPreHeaderPanel(){return this._preHeaderPanel}getPreHeaderPanelLeft(){return this._preHeaderPanel}getPreHeaderPanelRight(){return this._preHeaderPanelR}getTopHeaderPanel(){return this._topHeaderPanel}setPaneVisibility(){this.hasFrozenColumns()?(V.show(this._paneHeaderR),V.show(this._paneTopR),this.hasFrozenRows?(V.show(this._paneBottomL),V.show(this._paneBottomR)):(V.hide(this._paneBottomR),V.hide(this._paneBottomL))):(V.hide(this._paneHeaderR),V.hide(this._paneTopR),V.hide(this._paneBottomR),this.hasFrozenRows?V.show(this._paneBottomL):(V.hide(this._paneBottomR),V.hide(this._paneBottomL)))}setOverflow(){if(this._viewportTopL.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"scroll":this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"auto",this._viewportTopL.style.overflowY=!this.hasFrozenColumns()&&this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?(this.hasFrozenRows,"hidden"):this.hasFrozenRows?"scroll":"auto",this._viewportTopR.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"scroll":this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"hidden":"auto",this._viewportTopR.style.overflowY=this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?this.hasFrozenRows?"scroll":"auto":this.hasFrozenRows?"scroll":"auto",this._viewportBottomL.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"scroll":"auto":(this.hasFrozenRows&&this._options.alwaysAllowHorizontalScroll,"auto"),this._viewportBottomL.style.overflowY=!this.hasFrozenColumns()&&this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?(this.hasFrozenRows,"hidden"):this.hasFrozenRows?"scroll":"auto",this._viewportBottomR.style.overflowX=this.hasFrozenColumns()?this.hasFrozenRows&&!this._options.alwaysAllowHorizontalScroll?"scroll":"auto":(this.hasFrozenRows&&this._options.alwaysAllowHorizontalScroll,"auto"),this._viewportBottomR.style.overflowY=this._options.alwaysShowVerticalScroll?"scroll":this.hasFrozenColumns()?(this.hasFrozenRows,"auto"):(this.hasFrozenRows,"auto"),this._options.viewportClass){let e=V.classNameToList(this._options.viewportClass);this._viewportTopL.classList.add(...e),this._viewportTopR.classList.add(...e),this._viewportBottomL.classList.add(...e),this._viewportBottomR.classList.add(...e)}}createCssRules(){this._style=document.createElement("style"),this._style.nonce=this._options.nonce||"",(this._options.shadowRoot||document.head).appendChild(this._style);let e=this._options.rowHeight-this.cellHeightDiff,t=[`.${this.uid} .slick-group-header-column { left: 1000px; }`,`.${this.uid} .slick-header-column { left: 1000px; }`,`.${this.uid} .slick-top-panel { height: ${this._options.topPanelHeight}px; }`,`.${this.uid} .slick-preheader-panel { height: ${this._options.preHeaderPanelHeight}px; }`,`.${this.uid} .slick-topheader-panel { height: ${this._options.topHeaderPanelHeight}px; }`,`.${this.uid} .slick-headerrow-columns { height: ${this._options.headerRowHeight}px; }`,`.${this.uid} .slick-footerrow-columns { height: ${this._options.footerRowHeight}px; }`,`.${this.uid} .slick-cell { height: ${e}px; }`,`.${this.uid} .slick-row { height: ${this._options.rowHeight}px; }`],n=this._style.sheet;if(n){t.forEach(o=>{n.insertRule(o)});for(let o=0;o<this.columns.length;o++)!this.columns[o]||this.columns[o].hidden||(n.insertRule(`.${this.uid} .l${o} { }`),n.insertRule(`.${this.uid} .r${o} { }`))}else this.createCssRulesAlternative(t)}createCssRulesAlternative(e){let t=document.createElement("template");t.innerHTML='<style type="text/css" rel="stylesheet" />',this._style=t.content.firstChild,(this._options.shadowRoot||document.head).appendChild(this._style);for(let n=0;n<this.columns.length;n++)!this.columns[n]||this.columns[n].hidden||(e.push(`.${this.uid} .l${n} { }`),e.push(`.${this.uid} .r${n} { }`));this._style.styleSheet?this._style.styleSheet.cssText=e.join(" "):this._style.appendChild(document.createTextNode(e.join(" ")))}getColumnCssRules(e){let t;if(!this.stylesheet){let n=(this._options.shadowRoot||document).styleSheets;for(this._options.devMode&&typeof this._options.devMode?.ownerNodeIndex=="number"&&this._options.devMode.ownerNodeIndex>=0&&(n[this._options.devMode.ownerNodeIndex].ownerNode=this._style),t=0;t<n.length;t++)if((n[t].ownerNode||n[t].owningElement)===this._style){this.stylesheet=n[t];break}if(!this.stylesheet)throw new Error("SlickGrid Cannot find stylesheet.");this.columnCssRulesL=[],this.columnCssRulesR=[];let o=this.stylesheet.cssRules||this.stylesheet.rules,r,i;for(t=0;t<o.length;t++){let a=o[t].selectorText;(r=/\.l\d+/.exec(a))?(i=parseInt(r[0].substr(2,r[0].length-2),10),this.columnCssRulesL[i]=o[t]):(r=/\.r\d+/.exec(a))&&(i=parseInt(r[0].substr(2,r[0].length-2),10),this.columnCssRulesR[i]=o[t])}}return{left:this.columnCssRulesL[e],right:this.columnCssRulesR[e]}}removeCssRules(){this._style?.remove(),this.stylesheet=null}getTopPanel(){return this._topPanels[0]}getTopPanels(){return this._topPanels}togglePanelVisibility(e,t,n,o){let r=o!==!1;if(this._options[e]!==n)if(this._options[e]=n,n){if(r){V.slideDown(t,this.resizeCanvas.bind(this));return}V.show(t),this.resizeCanvas()}else{if(r){V.slideUp(t,this.resizeCanvas.bind(this));return}V.hide(t),this.resizeCanvas()}}setTopPanelVisibility(e,t){this.togglePanelVisibility("showTopPanel",this._topPanelScrollers,e,t)}setHeaderRowVisibility(e,t){this.togglePanelVisibility("showHeaderRow",this._headerRowScroller,e,t)}setColumnHeaderVisibility(e,t){this.togglePanelVisibility("showColumnHeader",this._headerScroller,e,t)}setFooterRowVisibility(e,t){this.togglePanelVisibility("showFooterRow",this._footerRowScroller,e,t)}setPreHeaderPanelVisibility(e,t){this.togglePanelVisibility("showPreHeaderPanel",[this._preHeaderPanelScroller,this._preHeaderPanelScrollerR],e,t)}setTopHeaderPanelVisibility(e){this.togglePanelVisibility("showTopHeaderPanel",this._topHeaderPanelScroller,e)}getRowHeight(){return this._options.rowHeight}getRowTop(e){return Math.round(this._options.rowHeight*e-this.offset)}getRowBottom(e){return this.getRowTop(e)+this._options.rowHeight}getRowFromPosition(e){return Math.floor((e+this.offset)/this._options.rowHeight)}appendRowHtml(e,t,n,o,r){let i=this.getDataItem(n),a=n<r&&!i,l="slick-row"+(this.hasFrozenRows&&n<=this._options.frozenRow?" frozen":"")+(a?" loading":"")+(n===this.activeRow&&this._options.showCellSelection?" active":"")+(n%2===1?" odd":" even");i||(l+=` ${this._options.addNewRowCssClass}`);let d=this.getItemMetadaWhenExists(n);d?.cssClasses&&(l+=` ${d.cssClasses}`);let u=V.createDomElement("div",{className:`ui-widget-content ${l}`,role:"row",dataset:{row:`${n}`}}),f=this.getFrozenRowOffset(n),p=this.getRowTop(n)-f;this._options.rowTopOffsetRenderType==="transform"?u.style.transform=`translateY(${p}px)`:u.style.top=`${p}px`;let y;e.push(u),this.hasFrozenColumns()&&(y=u.cloneNode(!0),t.push(y));let w=this.columns.length,b,m,v,D,k=!0;for(let x=0,S=w;x<S;x++){if(k=!0,D=this.columns[x],!D||D.hidden)continue;m=1,v=1,b=null,d?.columns&&(b=d.columns[D.id]||d.columns[x],m=b?.colspan||1,v=b?.rowspan||1,m==="*"&&(m=S-x),v>r-n&&(v=r-n)),!this._options.enableCellRowSpan&&v>1&&console.warn('[SlickGrid] Cell "rowspan" is an opt-in grid option because of its small perf hit, you must enable it via the "enableCellRowSpan" grid option.');let C=m;if(!this.getParentRowSpanByCell(n,x)){if(this.columnPosRight[Math.min(S-1,x+C-1)]>o.leftPx){if(!D.alwaysRenderColumn&&this.columnPosLeft[x]>o.rightPx&&(k=!1),k){let O=this.hasFrozenColumns()&&x>this._options.frozenColumn?y:u;this.appendCellHtml(O,n,x,C,v,b,i)}}else(D.alwaysRenderColumn||this.hasFrozenColumns()&&x<=this._options.frozenColumn)&&this.appendCellHtml(u,n,x,C,v,b,i);C>1&&(x+=C-1)}}}appendCellHtml(e,t,n,o,r,i,a){let l=this.columns[n],d=`slick-cell l${n} r${Math.min(this.columns.length-1,n+o-1)}`+(l.cssClass?` ${l.cssClass}`:"")+(r>1?" rowspan":"")+(i?.cssClass?` ${i.cssClass}`:"");this.hasFrozenColumns()&&n<=this._options.frozenColumn&&(d+=" frozen"),t===this.activeRow&&n===this.activeCell&&this._options.showCellSelection&&(d+=" active"),Object.keys(this.cellCssClasses).forEach(v=>{this.cellCssClasses[v][t]?.[l.id]&&(d+=` ${this.cellCssClasses[v][t][l.id]}`)});let u=null,f="";a&&(u=this.getDataItemValueForColumn(a,l),f=this.getFormatter(t,l)(t,n,u,l,a,this),f==null&&(f=""));let p=this.trigger(this.onBeforeAppendCell,{row:t,cell:n,value:u,dataContext:a}).getReturnValue(),y=typeof p=="string"?p:"";f?.addClasses&&(y+=V.classNameToList((y?" ":"")+f.addClasses).join(" "));let w=f?.toolTip?`${f.toolTip}`:"",b=V.createDomElement("div",{className:V.classNameToList(`${d} ${y||""}`).join(" "),role:"gridcell",tabIndex:-1});b.setAttribute("aria-describedby",this.uid+l.id),w&&b.setAttribute("title",w);let m=this.getCellHeight(t,r);if(r>1&&m!==this._options.rowHeight-this.cellHeightDiff&&(b.style.height=`${m||0}px`),l.hasOwnProperty("cellAttrs")&&l.cellAttrs instanceof Object&&Object.keys(l.cellAttrs).forEach(v=>{l.cellAttrs.hasOwnProperty(v)&&b.setAttribute(v,l.cellAttrs[v])}),a){let v=Object.prototype.toString.call(f)!=="[object Object]"?f:f.html||f.text;this.applyHtmlCode(b,v)}e.appendChild(b),f.insertElementAfterTarget&&V.insertAfterElement(b,f.insertElementAfterTarget),this.rowsCache[t].cellRenderQueue.push(n),this.rowsCache[t].cellColSpans[n]=o}cleanupRows(e){let t=new Set;if(this._options.enableCellRowSpan)for(let n=e.top,o=e.bottom;n<=o;n++){let r=this.getRowSpanIntersect(n);r!==null&&t.add(r)}Object.keys(this.rowsCache).forEach(n=>{if(this.rowsCache){let o=+n,r=!0;this.hasFrozenRows&&(this._options.frozenBottom&&o>=this.actualFrozenRow||!this._options.frozenBottom&&o<=this.actualFrozenRow)&&(r=!1),(o=parseInt(n,10))!==this.activeRow&&(o<e.top||o>e.bottom)&&r&&!t.has(o)&&this.removeRowFromCache(o)}}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup()}invalidate(){this.updateRowCount(),this.invalidateAllRows(),this.render()}invalidateAllRows(){this.currentEditor&&this.makeActiveCellNormal(),typeof this.rowsCache=="object"&&Object.keys(this.rowsCache).forEach(e=>{this.rowsCache&&this.removeRowFromCache(+e)}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup()}invalidateRows(e){if(!e||!e.length)return;let t;this.vScrollDir=0;let n=e.length,o=new Set,r=new Set,i=e.length>this._options.maxPartialRowSpanRemap||e.length===this.getDataLength()||this._prevInvalidatedRowsCount+e.length===this.getDataLength();for(let a=0;a<n;a++)if(t=e[a],this.currentEditor&&this.activeRow===t&&this.makeActiveCellNormal(),this.rowsCache[t]&&this.removeRowFromCache(t),this._options.enableCellRowSpan&&!i){o.add(t);let l=this.getRowSpanIntersect(t);l!==null&&o.add(l)}if(this._options.enableCellRowSpan&&!i){for(let a of Array.from(o)){let l=this.getRowSpanColumnIntersects(a);for(let d of l){let u=this.getParentRowSpanByCell(a,d);u&&this._colsWithRowSpanCache[d]&&(this._colsWithRowSpanCache[d].delete(u.range),r.add(u.range.split(":").map(Number)[0]))}}for(let a of Array.from(r))this.remapRowSpanMetadataByRow(a)}this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup(),this._prevInvalidatedRowsCount=e.length}invalidateRow(e){if(e>=0){let t=[e];if(this._options.enableCellRowSpan){let n=this.getRowSpanIntersect(e);n!==null&&t.push(n)}this.invalidateRows(t)}}removeRowFromCache(e){let t=this.rowsCache[e];t?.rowNode&&(this.trigger(this.onBeforeRemoveCachedRow,{row:e}),this._options.enableAsyncPostRenderCleanup&&this.postProcessedRows[e]?this.queuePostProcessedRowForCleanup(t,this.postProcessedRows[e],e):t.rowNode?.forEach(n=>n.parentElement?.removeChild(n)),delete this.rowsCache[e],delete this.postProcessedRows[e],this.renderedRows--,this.counter_rows_removed++)}updateCell(e,t){let n=this.getCellNode(e,t);if(!n)return;let o=this.columns[t],r=this.getDataItem(e);if(this.currentEditor&&this.activeRow===e&&this.activeCell===t)this.currentEditor.loadValue(r);else{let i=r?this.getFormatter(e,o)(e,t,this.getDataItemValueForColumn(r,o),o,r,this):"";this.applyFormatResultToCellNode(i,n),this.invalidatePostProcessingResults(e)}}updateRow(e){let t=this.rowsCache[e];if(!t)return;this.ensureCellNodesInRowsCache(e);let n,o=this.getDataItem(e);Object.keys(t.cellNodesByColumnIdx).forEach(r=>{if(!t.cellNodesByColumnIdx.hasOwnProperty(r))return;let i=+r,a=this.columns[i],l=t.cellNodesByColumnIdx[i];e===this.activeRow&&i===this.activeCell&&this.currentEditor?this.currentEditor.loadValue(o):o?(n=this.getFormatter(e,a)(e,i,this.getDataItemValueForColumn(o,a),a,o,this),this.applyFormatResultToCellNode(n,l)):V.emptyElement(l)}),this.invalidatePostProcessingResults(e)}getViewportRowCount(){let e=this.getViewportHeight(),t=this.getScrollbarDimensions()?.height??0;return Math.floor((e-t)/this._options.rowHeight)}getViewportHeight(){if((!this._options.autoHeight||this._options.frozenColumn!==-1)&&(this.topPanelH=this._options.showTopPanel?this._options.topPanelHeight+this.getVBoxDelta(this._topPanelScrollers[0]):0,this.headerRowH=this._options.showHeaderRow?this._options.headerRowHeight+this.getVBoxDelta(this._headerRowScroller[0]):0,this.footerRowH=this._options.showFooterRow?this._options.footerRowHeight+this.getVBoxDelta(this._footerRowScroller[0]):0),this._options.autoHeight){let e=this._paneHeaderL.offsetHeight;e+=this._options.showPreHeaderPanel?this._options.preHeaderPanelHeight+this.getVBoxDelta(this._preHeaderPanelScroller):0,e+=this._options.showHeaderRow?this._options.headerRowHeight+this.getVBoxDelta(this._headerRowScroller[0]):0,e+=this._options.showFooterRow?this._options.footerRowHeight+this.getVBoxDelta(this._footerRowScroller[0]):0,e+=this.getCanvasWidth()>this.viewportW?this.scrollbarDimensions?.height??0:0,this.viewportH=this._options.rowHeight*this.getDataLengthIncludingAddNew()+(this._options.frozenColumn===-1?e:0)}else{let e=getComputedStyle(this._container),t=e.boxSizing!=="content-box"?this.getVBoxDelta(this._container):0,n=this._options.createTopHeaderPanel&&this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight+this.getVBoxDelta(this._topHeaderPanelScroller):0,o=this._options.createPreHeaderPanel&&this._options.showPreHeaderPanel?this._options.preHeaderPanelHeight+this.getVBoxDelta(this._preHeaderPanelScroller):0,r=this._options.showColumnHeader?V.toFloat(V.height(this._headerScroller[0])):0;this.viewportH=V.toFloat(e.height)-V.toFloat(e.paddingTop)-V.toFloat(e.paddingBottom)-this.topPanelH-n-o-this.headerRowH-r-this.footerRowH-t}return this.numVisibleRows=Math.ceil(this.viewportH/this._options.rowHeight),this.viewportH}getViewportInnerWidth(){return this.viewportHasVScroll?this.viewportW-(this.scrollbarDimensions?.width||0):this.viewportW}getViewportWidth(){return this.viewportW=parseFloat(V.innerSize(this._container,"width"))||this._options.devMode&&this._options.devMode.containerClientWidth||0,this.viewportW}resizeCanvas(){if(!this.initialized)return;if(this.paneTopH=0,this.paneBottomH=0,this.viewportTopH=0,this.viewportBottomH=0,this.getViewportWidth(),this.getViewportHeight(),this.hasFrozenRows?this._options.frozenBottom?(this.paneTopH=this.viewportH-this.frozenRowsHeight-(this.scrollbarDimensions?.height??0),this.paneBottomH=this.frozenRowsHeight+(this.scrollbarDimensions?.height??0)):(this.paneTopH=this.frozenRowsHeight,this.paneBottomH=this.viewportH-this.frozenRowsHeight):this.paneTopH=this.viewportH,this.paneTopH+=this.topPanelH+this.headerRowH+this.footerRowH,this.hasFrozenColumns()&&this._options.autoHeight&&(this.paneTopH+=this.scrollbarDimensions?.height??0),this.viewportTopH=this.paneTopH-this.topPanelH-this.headerRowH-this.footerRowH,this._options.autoHeight){if(this.hasFrozenColumns()){let n=this.paneTopH+this._headerScrollerL.offsetHeight;n+=this.getVBoxDelta(this._container),this._options.showPreHeaderPanel&&(n+=this._options.preHeaderPanelHeight),V.height(this._container,n)}this._paneTopL.style.position="relative"}let e=V.height(this._paneHeaderL);e?e+=this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight:0:e=(this._options.showHeaderRow?this._options.headerRowHeight:0)+(this._options.showPreHeaderPanel?this._options.preHeaderPanelHeight:0),V.setStyleSize(this._paneTopL,"top",e||e),V.height(this._paneTopL,this.paneTopH);let t=this._paneTopL.offsetTop+this.paneTopH;if(this._options.autoHeight||V.height(this._viewportTopL,this.viewportTopH),this.hasFrozenColumns()){let n=V.height(this._paneHeaderL);n&&(n+=this._options.showTopHeaderPanel?this._options.topHeaderPanelHeight:0),V.setStyleSize(this._paneTopR,"top",n),V.height(this._paneTopR,this.paneTopH),V.height(this._viewportTopR,this.viewportTopH),this.hasFrozenRows&&(V.setStyleSize(this._paneBottomL,"top",t),V.height(this._paneBottomL,this.paneBottomH),V.setStyleSize(this._paneBottomR,"top",t),V.height(this._paneBottomR,this.paneBottomH),V.height(this._viewportBottomR,this.paneBottomH))}else this.hasFrozenRows&&(V.width(this._paneBottomL,"100%"),V.height(this._paneBottomL,this.paneBottomH),V.setStyleSize(this._paneBottomL,"top",t));this.hasFrozenRows?(V.height(this._viewportBottomL,this.paneBottomH),this._options.frozenBottom?(V.height(this._canvasBottomL,this.frozenRowsHeight),this.hasFrozenColumns()&&V.height(this._canvasBottomR,this.frozenRowsHeight)):(V.height(this._canvasTopL,this.frozenRowsHeight),this.hasFrozenColumns()&&V.height(this._canvasTopR,this.frozenRowsHeight))):V.height(this._viewportTopR,this.viewportTopH),(!this.scrollbarDimensions||!this.scrollbarDimensions.width)&&(this.scrollbarDimensions=this.measureScrollbar()),this._options.autosizeColsMode===En.LegacyForceFit&&this.autosizeColumns(),this.updateRowCount(),this.handleScroll(),this.lastRenderedScrollLeft=-1,this.render()}updateRowCount(){if(!this.initialized)return;let e=this.getDataLength();e>0&&e!==this._prevDataLength&&(this._rowSpanIsCached=!1),this._options.enableCellRowSpan&&!this._rowSpanIsCached&&this.remapAllColumnsRowSpan(),this._prevDataLength=e;let t=this.getDataLengthIncludingAddNew(),n=0,o=this.hasFrozenRows&&!this._options.frozenBottom?V.height(this._canvasBottomL):V.height(this._canvasTopL);this.hasFrozenRows?n=this.getDataLength()-this._options.frozenRow:n=t+(this._options.leaveSpaceForNewRows?this.numVisibleRows-1:0);let r=V.height(this._viewportScrollContainerY),i=this.viewportHasVScroll;this.viewportHasVScroll=this._options.alwaysShowVerticalScroll||!this._options.autoHeight&&n*this._options.rowHeight>r,this.makeActiveCellNormal();let a=e-1;typeof this.rowsCache=="object"&&Object.keys(this.rowsCache).forEach(d=>{let u=+d;u>a&&this.removeRowFromCache(u)}),this._options.enableAsyncPostRenderCleanup&&this.startPostProcessingCleanup(),this.activeCellNode&&this.activeRow>a&&this.resetActiveCell(),o=this.h,this._options.autoHeight?this.h=this._options.rowHeight*n:(this.th=Math.max(this._options.rowHeight*n,r-(this.scrollbarDimensions?.height??0)),this.th<this.maxSupportedCssHeight?(this.h=this.ph=this.th,this.n=1,this.cj=0):(this.h=this.maxSupportedCssHeight,this.ph=this.h/100,this.n=Math.floor(this.th/this.ph),this.cj=(this.th-this.h)/(this.n-1))),(this.h!==o||this.enforceFrozenRowHeightRecalc)&&(this.hasFrozenRows&&!this._options.frozenBottom?(V.height(this._canvasBottomL,this.h),this.hasFrozenColumns()&&V.height(this._canvasBottomR,this.h)):(V.height(this._canvasTopL,this.h),V.height(this._canvasTopR,this.h)),this.scrollTop=this._viewportScrollContainerY.scrollTop,this.scrollHeight=this._viewportScrollContainerY.scrollHeight,this.enforceFrozenRowHeightRecalc=!1);let l=this.scrollTop+this.offset<=this.th-r;this.th===0||this.scrollTop===0?this.page=this.offset=0:l?this.scrollTo(this.scrollTop+this.offset):this.scrollTo(this.th-r+(this.scrollbarDimensions?.height??0)),this.h!==o&&this._options.autoHeight&&this.resizeCanvas(),this._options.autosizeColsMode===En.LegacyForceFit&&i!==this.viewportHasVScroll&&this.autosizeColumns(),this.updateCanvasWidth(!1)}getViewport(e,t){return this.getVisibleRange(e,t)}getVisibleRange(e,t){return e??(e=this.scrollTop),t??(t=this.scrollLeft),{top:this.getRowFromPosition(e),bottom:this.getRowFromPosition(e+this.viewportH)+1,leftPx:t,rightPx:t+this.viewportW}}getRenderedRange(e,t){let n=this.getVisibleRange(e,t),o=Math.round(this.viewportH/this._options.rowHeight),r=this._options.minRowBuffer;return this.vScrollDir===-1?(n.top-=o,n.bottom+=r):this.vScrollDir===1?(n.top-=r,n.bottom+=o):(n.top-=r,n.bottom+=r),n.top=Math.max(0,n.top),n.bottom=Math.min(this.getDataLengthIncludingAddNew()-1,n.bottom),n.leftPx-=this.viewportW,n.rightPx+=this.viewportW,n.leftPx=Math.max(0,n.leftPx),n.rightPx=Math.min(this.canvasWidth,n.rightPx),n}getRowCache(){return this.rowsCache}ensureCellNodesInRowsCache(e){let t=this.rowsCache[e];if(t?.cellRenderQueue.length&&t.rowNode?.length){let n=t.rowNode,o=Array.from(n[0].children);n.length>1&&(o=o.concat(Array.from(n[1].children)));let r=o.length-1;for(;t.cellRenderQueue.length;){let i=t.cellRenderQueue.pop();t.cellNodesByColumnIdx[i]=o[r--]}}}cleanUpCells(e,t){if(this.hasFrozenRows&&(this._options.frozenBottom&&t>this.actualFrozenRow||t<=this.actualFrozenRow))return;let n=this.rowsCache[t],o=[];Object.keys(n.cellNodesByColumnIdx).forEach(a=>{if(!n.cellNodesByColumnIdx.hasOwnProperty(a))return;let l=+a;if(l<=this._options.frozenColumn||Array.isArray(this.columns)&&this.columns[l]?.alwaysRenderColumn)return;let d=n.cellColSpans[l];(this.columnPosLeft[l]>e.rightPx||this.columnPosRight[Math.min(this.columns.length-1,(l||0)+d-1)]<e.leftPx)&&(t===this.activeRow&&Number(l)===this.activeCell||o.push(l))});let r,i;for(;V.isDefined(r=o.pop());)i=n.cellNodesByColumnIdx[r],this._options.enableAsyncPostRenderCleanup&&this.postProcessedRows[t]?.[r]?this.queuePostProcessedCellForCleanup(i,r,t):i.parentElement?.removeChild(i),delete n.cellColSpans[r],delete n.cellNodesByColumnIdx[r],this.postProcessedRows[t]&&delete this.postProcessedRows[t][r]}cleanUpAndRenderCells(e){let t,n=document.createElement("div"),o=[],r,i,a,l=this.columns.length;for(let f=e.top,p=e.bottom;f<=p;f++){if(t=this.rowsCache[f],!t)continue;this.ensureCellNodesInRowsCache(f),(!this._options.enableCellRowSpan||this.getRowSpanIntersect(f)===null)&&this.cleanUpCells(e,f),r=0;let y=this.getItemMetadaWhenExists(f);y=y?.columns;let w=this.getDataItem(f);for(let b=0,m=l;b<m;b++){if(!this.columns[b]||this.columns[b].hidden)continue;if(this.columnPosLeft[b]>e.rightPx)break;if(V.isDefined(i=t.cellColSpans[b])){b+=i>1?i-1:0;continue}i=1,a=null,y&&(a=y[this.columns[b].id]||y[b],i=a?.colspan??1,i==="*"&&(i=m-b));let v=i;if(!this.getParentRowSpanByCell(f,b)){if(this.columnPosRight[Math.min(m-1,b+v-1)]>e.leftPx){let D=this.getRowspan(f,b);this.appendCellHtml(n,f,b,v,D,a,w),r++}b+=v>1?v-1:0}}r&&o.push(f)}if(!n.children.length)return;let d,u;for(;V.isDefined(d=o.pop());){t=this.rowsCache[d];let f;for(;V.isDefined(f=t.cellRenderQueue.pop());)u=n.lastChild,u&&(this.hasFrozenColumns()&&f>this._options.frozenColumn?t.rowNode[1].appendChild(u):t.rowNode[0].appendChild(u),t.cellNodesByColumnIdx[f]=u)}}renderRows(e){let t=[],n=[],o=[],r=!1,i=this.getDataLength(),a=new Set,l=new Set;for(let u=e.top,f=e.bottom;u<=f;u++)if(!(this.rowsCache[u]||this.hasFrozenRows&&this._options.frozenBottom&&u===this.getDataLength())){if(this.renderedRows++,o.push(u),l.add(u),this.rowsCache[u]=this.createEmptyCachingRow(),this._options.enableCellRowSpan){let p=this.getRowSpanIntersect(u);p!==null&&l.add(p)}this.appendRowHtml(t,n,u,e,i),a.add(u),this.activeCellNode&&this.activeRow===u&&(r=!0),this.counter_rows_rendered++}let d=this.setDifference(l,a);if(d.size>0&&d.forEach(u=>{this.removeRowFromCache(u),o.push(u),this.rowsCache[u]=this.createEmptyCachingRow(),this.appendRowHtml(t,n,u,e,i)}),o.length){let u=document.createElement("div"),f=document.createElement("div");t.forEach(p=>u.appendChild(p)),n.forEach(p=>f.appendChild(p));for(let p=0,y=o.length;p<y;p++)this.hasFrozenRows&&o[p]>=this.actualFrozenRow?this.hasFrozenColumns()?this.rowsCache?.hasOwnProperty(o[p])&&u.firstChild&&f.firstChild&&(this.rowsCache[o[p]].rowNode=[u.firstChild,f.firstChild],this._canvasBottomL.appendChild(u.firstChild),this._canvasBottomR.appendChild(f.firstChild)):this.rowsCache?.hasOwnProperty(o[p])&&u.firstChild&&(this.rowsCache[o[p]].rowNode=[u.firstChild],this._canvasBottomL.appendChild(u.firstChild)):this.hasFrozenColumns()?this.rowsCache?.hasOwnProperty(o[p])&&u.firstChild&&f.firstChild&&(this.rowsCache[o[p]].rowNode=[u.firstChild,f.firstChild],this._canvasTopL.appendChild(u.firstChild),this._canvasTopR.appendChild(f.firstChild)):this.rowsCache?.hasOwnProperty(o[p])&&u.firstChild&&(this.rowsCache[o[p]].rowNode=[u.firstChild],this._canvasTopL.appendChild(u.firstChild));r&&(this.activeCellNode=this.getCellNode(this.activeRow,this.activeCell))}}updateRowPositions(){for(let e in this.rowsCache)if(this.rowsCache){let t=e?parseInt(e,10):0,n=this.rowsCache[t].rowNode[0];this._options.rowTopOffsetRenderType==="transform"?n.style.transform=`translateY(${this.getRowTop(t)}px)`:n.style.top=`${this.getRowTop(t)}px`}}render(){if(!this.initialized)return;this.scrollThrottle.dequeue();let e=this.getVisibleRange(),t=this.getRenderedRange();if(this.cleanupRows(t),this.lastRenderedScrollLeft!==this.scrollLeft){if(this.hasFrozenRows){let n=V.extend(!0,{},t);this._options.frozenBottom?(n.top=this.actualFrozenRow,n.bottom=this.getDataLength()):(n.top=0,n.bottom=this._options.frozenRow),this.cleanUpAndRenderCells(n)}this.cleanUpAndRenderCells(t)}this.renderRows(t),this.hasFrozenRows&&(this._options.frozenBottom?this.renderRows({top:this.actualFrozenRow,bottom:this.getDataLength()-1,leftPx:t.leftPx,rightPx:t.rightPx}):this.renderRows({top:0,bottom:this._options.frozenRow-1,leftPx:t.leftPx,rightPx:t.rightPx})),this.postProcessFromRow=e.top,this.postProcessToRow=Math.min(this.getDataLengthIncludingAddNew()-1,e.bottom),this.startPostProcessing(),this.lastRenderedScrollTop=this.scrollTop,this.lastRenderedScrollLeft=this.scrollLeft,this.trigger(this.onRendered,{startRow:e.top,endRow:e.bottom,grid:this})}getFrozenRowOffset(e){let t=0;return this.hasFrozenRows?this._options.frozenBottom?e>=this.actualFrozenRow?this.h<this.viewportTopH?t=this.actualFrozenRow*this._options.rowHeight:t=this.h:t=0:e>=this.actualFrozenRow?t=this.frozenRowsHeight:t=0:t=0,t}bindAncestorScrollEvents(){let e=this.hasFrozenRows&&!this._options.frozenBottom?this._canvasBottomL:this._canvasTopL;for(;(e=e.parentNode)!==document.body&&e;)(e===this._viewportTopL||e.scrollWidth!==e.clientWidth||e.scrollHeight!==e.clientHeight)&&(this._boundAncestors.push(e),this._bindingEventService.bind(e,"scroll",this.handleActiveCellPositionChange.bind(this)))}unbindAncestorScrollEvents(){this._boundAncestors.forEach(e=>{this._bindingEventService.unbindByEventName(e,"scroll")}),this._boundAncestors=[]}setScroller(){this.hasFrozenColumns()?(this._headerScrollContainer=this._headerScrollerR,this._headerRowScrollContainer=this._headerRowScrollerR,this._footerRowScrollContainer=this._footerRowScrollerR,this.hasFrozenRows?this._options.frozenBottom?(this._viewportScrollContainerX=this._viewportBottomR,this._viewportScrollContainerY=this._viewportTopR):this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportBottomR:this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportTopR):(this._headerScrollContainer=this._headerScrollerL,this._headerRowScrollContainer=this._headerRowScrollerL,this._footerRowScrollContainer=this._footerRowScrollerL,this.hasFrozenRows?this._options.frozenBottom?(this._viewportScrollContainerX=this._viewportBottomL,this._viewportScrollContainerY=this._viewportTopL):this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportBottomL:this._viewportScrollContainerX=this._viewportScrollContainerY=this._viewportTopL)}scrollTo(e){e=Math.max(e,0),e=Math.min(e,(this.th||0)-V.height(this._viewportScrollContainerY)+(this.viewportHasHScroll||this.hasFrozenColumns()?this.scrollbarDimensions?.height??0:0));let t=this.offset;this.offset=Math.round(this.page*(this.cj||0)),this.page=Math.min((this.n||0)-1,Math.floor(e/(this.ph||0)));let n=e-this.offset;if(this.offset!==t){let o=this.getVisibleRange(n);this.cleanupRows(o),this.updateRowPositions()}this.prevScrollTop!==n&&(this.vScrollDir=this.prevScrollTop+t<n+this.offset?1:-1,this.lastRenderedScrollTop=this.scrollTop=this.prevScrollTop=n,this.hasFrozenColumns()&&(this._viewportTopL.scrollTop=n),this.hasFrozenRows&&(this._viewportBottomL.scrollTop=this._viewportBottomR.scrollTop=n),this._viewportScrollContainerY&&(this._viewportScrollContainerY.scrollTop=n),this.trigger(this.onViewportChanged,{}))}handleHeaderRowScroll(){let e=this._headerRowScrollContainer.scrollLeft;e!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=e)}handleFooterRowScroll(){let e=this._footerRowScrollContainer.scrollLeft;e!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=e)}handlePreHeaderPanelScroll(){this.handleElementScroll(this._preHeaderPanelScroller)}handleTopHeaderPanelScroll(){this.handleElementScroll(this._topHeaderPanelScroller)}handleElementScroll(e){let t=e.scrollLeft;t!==this._viewportScrollContainerX.scrollLeft&&(this._viewportScrollContainerX.scrollLeft=t)}handleScroll(e){return this.scrollHeight=this._viewportScrollContainerY.scrollHeight,this.scrollTop=this._viewportScrollContainerY.scrollTop,this.scrollLeft=this._viewportScrollContainerX.scrollLeft,this._handleScroll(e?"scroll":"system")}_handleScroll(e="system"){let t=this._viewportScrollContainerY.scrollHeight-this._viewportScrollContainerY.clientHeight,n=this._viewportScrollContainerY.scrollWidth-this._viewportScrollContainerY.clientWidth;t=Math.max(0,t),n=Math.max(0,n),this.scrollTop>t&&(this.scrollTop=t,this.scrollHeight=t),this.scrollLeft>n&&(this.scrollLeft=n);let o=Math.abs(this.scrollTop-this.prevScrollTop),r=Math.abs(this.scrollLeft-this.prevScrollLeft);if(r&&(this.prevScrollLeft=this.scrollLeft,this._viewportScrollContainerX.scrollLeft=this.scrollLeft,this._headerScrollContainer.scrollLeft=this.scrollLeft,this._topPanelScrollers[0].scrollLeft=this.scrollLeft,this._options.createFooterRow&&(this._footerRowScrollContainer.scrollLeft=this.scrollLeft),this._options.createPreHeaderPanel&&(this.hasFrozenColumns()?this._preHeaderPanelScrollerR.scrollLeft=this.scrollLeft:this._preHeaderPanelScroller.scrollLeft=this.scrollLeft),this._options.createTopHeaderPanel&&(this._topHeaderPanelScroller.scrollLeft=this.scrollLeft),this.hasFrozenColumns()?(this.hasFrozenRows&&(this._viewportTopR.scrollLeft=this.scrollLeft),this._headerRowScrollerR.scrollLeft=this.scrollLeft):(this.hasFrozenRows&&(this._viewportTopL.scrollLeft=this.scrollLeft),this._headerRowScrollerL.scrollLeft=this.scrollLeft)),o&&!this._options.autoHeight)if(this.vScrollDir=this.prevScrollTop<this.scrollTop?1:-1,this.prevScrollTop=this.scrollTop,e==="mousewheel"&&(this._viewportScrollContainerY.scrollTop=this.scrollTop),this.hasFrozenColumns()&&(this.hasFrozenRows&&!this._options.frozenBottom?this._viewportBottomL.scrollTop=this.scrollTop:this._viewportTopL.scrollTop=this.scrollTop),o<this.viewportH)this.scrollTo(this.scrollTop+this.offset);else{let i=this.offset;this.h===this.viewportH?this.page=0:this.page=Math.min(this.n-1,Math.floor(this.scrollTop*((this.th-this.viewportH)/(this.h-this.viewportH))*(1/this.ph))),this.offset=Math.round(this.page*this.cj),i!==this.offset&&this.invalidateAllRows()}if(r||o){let i=Math.abs(this.lastRenderedScrollLeft-this.scrollLeft),a=Math.abs(this.lastRenderedScrollTop-this.scrollTop);(i>20||a>20)&&(this._options.forceSyncScrolling||a<this.viewportH&&i<this.viewportW?this.render():this.scrollThrottle.enqueue(),this.trigger(this.onViewportChanged,{}))}return this.trigger(this.onScroll,{triggeredBy:e,scrollHeight:this.scrollHeight,scrollLeft:this.scrollLeft,scrollTop:this.scrollTop}),!!(r||o)}scrollCellIntoView(e,t,n){if(this.scrollRowIntoView(e,n),t<=this._options.frozenColumn)return;let o=this.getColspan(e,t);this.internalScrollColumnIntoView(this.columnPosLeft[t],this.columnPosRight[t+(o>1?o-1:0)])}internalScrollColumnIntoView(e,t){let n=this.scrollLeft+V.width(this._viewportScrollContainerX)-(this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0);e<this.scrollLeft?(this._viewportScrollContainerX.scrollLeft=e,this.handleScroll(),this.render()):t>n&&(this._viewportScrollContainerX.scrollLeft=Math.min(e,t-this._viewportScrollContainerX.clientWidth),this.handleScroll(),this.render())}scrollColumnIntoView(e){this.internalScrollColumnIntoView(this.columnPosLeft[e],this.columnPosRight[e])}updatePagingStatusFromView(e){this.pagingActive=e.pageSize!==0,this.pagingIsLastPage=e.pageNum===e.totalPages-1}getRowSpanColumnIntersects(e){return this.getRowSpanIntersection(e,"columns")}getRowSpanIntersect(e){return this.getRowSpanIntersection(e)}getRowSpanIntersection(e,t){let n=[],o=null;for(let r=0,i=this.columns.length;r<i;r++){let a=this._colsWithRowSpanCache[r];if(a)for(let l of Array.from(a)){let[d,u]=l.split(":").map(Number);if(e>=d&&e<=u)if(t==="columns")n.push(r);else{o=d;break}}}return t==="columns"?n:o}getParentRowSpanByCell(e,t,n=!0){let o=null,r=this._colsWithRowSpanCache[t]||new Set;for(let i of Array.from(r)){let[a,l]=i.split(":").map(Number);if((n?e>a:e>=a)&&e<=l){o={start:a,end:l,range:i};break}}return o}remapAllColumnsRowSpan(){let e=this.getDataLength();if(e>0){this._colsWithRowSpanCache={};for(let t=0;t<e;t++)this.remapRowSpanMetadataByRow(t);this._rowSpanIsCached=!0}}remapRowSpanMetadataByRow(e){let t=this.getItemMetadaWhenExists(e);t?.columns&&Object.keys(t.columns).forEach(n=>{let o=+n,r=t.columns[o],i=+(r?.colspan||1),a=+(r?.rowspan||1);this.remapRowSpanMetadata(e,o,i,a)})}remapRowSpanMetadata(e,t,n,o){var r,i,a;if(o>1){let l=`${e}:${e+o-1}`;if((r=this._colsWithRowSpanCache)[t]??(r[t]=new Set),this._colsWithRowSpanCache[t].add(l),n>1)for(let d=1;d<n;d++)(i=this._colsWithRowSpanCache)[a=t+d]??(i[a]=new Set),this._colsWithRowSpanCache[t+d].add(l)}}createEmptyCachingRow(){return{rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]}}scrollRowIntoView(e,t){if(!this.hasFrozenRows||!this._options.frozenBottom&&e>this.actualFrozenRow-1||this._options.frozenBottom&&e<this.actualFrozenRow-1){let n=V.height(this._viewportScrollContainerY),o=this.hasFrozenRows&&!this._options.frozenBottom?e-this._options.frozenRow:e,r=o*this._options.rowHeight,i=(o+1)*this._options.rowHeight-n+(this.viewportHasHScroll?this.scrollbarDimensions?.height??0:0);(o+1)*this._options.rowHeight>this.scrollTop+n+this.offset?(this.scrollTo(t?r:i),this.render()):o*this._options.rowHeight<this.scrollTop+this.offset&&(this.scrollTo(t?i:r),this.render())}}scrollRowToTop(e){this.scrollTo(e*this._options.rowHeight),this.render()}scrollPage(e){let t=e*this.numVisibleRows,n=this.scrollTop+this._options.rowHeight-1;if(this.scrollTo((this.getRowFromPosition(n)+t)*this._options.rowHeight),this.render(),this._options.enableCellNavigation&&V.isDefined(this.activeRow)){let o=this.activeRow+t,r=this.getDataLengthIncludingAddNew();o>=r&&(o=r-1),o<0&&(o=0);let i=e===1?this.gotoDown(o-1||0,this.activeCell,this.activePosY,this.activePosX):this.gotoUp(o+1,this.activeCell,this.activePosY,this.activePosX);this.navigateToPos(i)}}navigatePageDown(){this.scrollPage(1)}navigatePageUp(){this.scrollPage(-1)}navigateTop(){this.unsetActiveCell(),this.navigateToRow(0)}navigateBottom(){let e=this.getDataLength()-1,t=this.getParentRowSpanByCell(e,this.activeCell)?.start??e;do if(this._options.enableCellRowSpan&&this.setActiveRow(t),this.navigateToRow(t)&&this.activeCell===this.activePosX||!V.isDefined(this.activeCell))break;while(--t>0)}navigateToRow(e){let t=this.getDataLength();if(!t)return!1;e<0?e=0:e>=t&&(e=t-1),this.scrollCellIntoView(e,0,!0);let n=!V.isDefined(this.activeCell)||!V.isDefined(this.activeRow);if(this._options.enableCellNavigation&&V.isDefined(this.activeRow)){let o=0,r=null,i=this.activePosX;for(;o<=this.activePosX;)this.canCellBeActive(e,o)&&(r=o,(!V.isDefined(this.activeCell)||o===this.activeCell)&&(n=!0)),o+=this.getColspan(e,o);r!==null?(this.setActiveCellInternal(this.getCellNode(e,r)),this.activePosX=i):this.resetActiveCell()}return n}getColspan(e,t){let n=this.getItemMetadaWhenExists(e);if(!n||!n.columns)return 1;t>=this.columns.length&&(t=this.columns.length-1);let o=(n.columns[this.columns[t].id]||n.columns[t])?.colspan;return o==="*"?o=this.columns.length-t:o=o||1,o}queuePostProcessedRowForCleanup(e,t,n){this.postProcessgroupId++,typeof t=="object"&&Object.keys(t).forEach(o=>{t.hasOwnProperty(o)&&this.postProcessedCleanupQueue.push({actionType:"C",groupId:this.postProcessgroupId,node:e.cellNodesByColumnIdx[+o],columnIdx:+o,rowIdx:n})}),e.rowNode||(e.rowNode=[]),this.postProcessedCleanupQueue.push({actionType:"R",groupId:this.postProcessgroupId,node:e.rowNode}),e.rowNode?.forEach(o=>o.remove())}queuePostProcessedCellForCleanup(e,t,n){this.postProcessedCleanupQueue.push({actionType:"C",groupId:this.postProcessgroupId,node:e,columnIdx:t,rowIdx:n}),e.remove()}applyFormatResultToCellNode(e,t,n){if(e==null&&(e=""),Object.prototype.toString.call(e)!=="[object Object]"){this.applyHtmlCode(t,e);return}let o=e.html||e.text;this.applyHtmlCode(t,o),e.removeClasses&&!n&&t.classList.remove(...V.classNameToList(e.removeClasses)),e.addClasses&&t.classList.add(...V.classNameToList(e.addClasses)),e.toolTip&&t.setAttribute("title",e.toolTip)}startPostProcessing(){this._options.enableAsyncPostRender&&(window.clearTimeout(this.h_postrender),this.h_postrender=window.setTimeout(this.asyncPostProcessRows.bind(this),this._options.asyncPostRenderDelay))}startPostProcessingCleanup(){this._options.enableAsyncPostRenderCleanup&&(window.clearTimeout(this.h_postrenderCleanup),this.h_postrenderCleanup=window.setTimeout(this.asyncPostProcessCleanupRows.bind(this),this._options.asyncPostRenderCleanupDelay))}invalidatePostProcessingResults(e){typeof this.postProcessedRows[e]=="object"&&Object.keys(this.postProcessedRows[e]).forEach(t=>{this.postProcessedRows[e].hasOwnProperty(t)&&(this.postProcessedRows[e][t]="C")}),this.postProcessFromRow=Math.min(this.postProcessFromRow,e),this.postProcessToRow=Math.max(this.postProcessToRow,e),this.startPostProcessing()}asyncPostProcessRows(){let e=this.getDataLength();for(;this.postProcessFromRow<=this.postProcessToRow;){let t=this.vScrollDir>=0?this.postProcessFromRow++:this.postProcessToRow--,n=this.rowsCache[t];if(!(!n||t>=e)){this.postProcessedRows[t]||(this.postProcessedRows[t]={}),this.ensureCellNodesInRowsCache(t),Object.keys(n.cellNodesByColumnIdx).forEach(o=>{if(n.cellNodesByColumnIdx.hasOwnProperty(o)){let r=+o,i=this.columns[r],a=this.postProcessedRows[t][r];if(i.asyncPostRender&&a!=="R"){let l=n.cellNodesByColumnIdx[r];l&&i.asyncPostRender(l,t,this.getDataItem(t),i,a==="C"),this.postProcessedRows[t][r]="R"}}}),this.h_postrender=window.setTimeout(this.asyncPostProcessRows.bind(this),this._options.asyncPostRenderDelay);return}}}asyncPostProcessCleanupRows(){if(this.postProcessedCleanupQueue.length>0){let e=this.postProcessedCleanupQueue[0].groupId;for(;this.postProcessedCleanupQueue.length>0&&this.postProcessedCleanupQueue[0].groupId===e;){let t=this.postProcessedCleanupQueue.shift();if(t?.actionType==="R"&&t.node.forEach(n=>{n.remove()}),t?.actionType==="C"){let n=this.columns[t.columnIdx];n.asyncPostRenderCleanup&&t.node&&n.asyncPostRenderCleanup(t.node,t.rowIdx,n)}}this.h_postrenderCleanup=window.setTimeout(this.asyncPostProcessCleanupRows.bind(this),this._options.asyncPostRenderCleanupDelay)}}updateCellCssStylesOnRenderedRows(e,t){let n,o,r;typeof this.rowsCache=="object"&&Object.keys(this.rowsCache).forEach(i=>{this.rowsCache&&(r=t?.[i],o=e?.[i],r&&Object.keys(r).forEach(a=>{(!o||r[a]!==o[a])&&(n=this.getCellNode(+i,this.getColumnIndex(a)),n&&n.classList.remove(r[a]))}),o&&Object.keys(o).forEach(a=>{(!r||r[a]!==o[a])&&(n=this.getCellNode(+i,this.getColumnIndex(a)),n&&n.classList.add(o[a]))}))})}addCellCssStyles(e,t){if(this.cellCssClasses[e])throw new Error(`SlickGrid addCellCssStyles: cell CSS hash with key "${e}" already exists.`);this.cellCssClasses[e]=t,this.updateCellCssStylesOnRenderedRows(t,null),this.trigger(this.onCellCssStylesChanged,{key:e,hash:t,grid:this})}removeCellCssStyles(e){this.cellCssClasses[e]&&(this.updateCellCssStylesOnRenderedRows(null,this.cellCssClasses[e]),delete this.cellCssClasses[e],this.trigger(this.onCellCssStylesChanged,{key:e,hash:null,grid:this}))}setCellCssStyles(e,t){let n=this.cellCssClasses[e];this.cellCssClasses[e]=t,this.updateCellCssStylesOnRenderedRows(t,n),this.trigger(this.onCellCssStylesChanged,{key:e,hash:t,grid:this})}getCellCssStyles(e){return this.cellCssClasses[e]}flashCell(e,t,n=250){let o=(r,i)=>{i<1||(window.clearTimeout(this._flashCellTimer),this._flashCellTimer=window.setTimeout(()=>{i%2===0?r.classList.add(this._options.cellFlashingCssClass||""):r.classList.remove(this._options.cellFlashingCssClass||""),o(r,i-1)},n))};if(this.rowsCache[e]){let r=this.getCellNode(e,t);r&&o(r,5)}}highlightRow(e,t){let n=this.rowsCache[e];t||(t=this._options.rowHighlightDuration),Array.isArray(n?.rowNode)&&this._options.rowHighlightCssClass&&(n.rowNode.forEach(o=>o.classList.add(...V.classNameToList(this._options.rowHighlightCssClass))),window.clearTimeout(this._highlightRowTimer),this._highlightRowTimer=window.setTimeout(()=>{n.rowNode?.forEach(o=>o.classList.remove(...V.classNameToList(this._options.rowHighlightCssClass)))},t))}_getContainerElement(e,t,n){if(!e)return;t||(t=0),n||(n=0);let o=typeof t=="number"?t:this.getColumnIndex(t),r=this.hasFrozenRows&&n>=this.actualFrozenRow+(this._options.frozenBottom?0:1),i=this.hasFrozenColumns()&&o>this._options.frozenColumn;return e[(r?2:0)+(i?1:0)]}measureScrollbar(){let e="";this._viewport.forEach(r=>e+=r.className);let t=V.createDomElement("div",{className:e,style:{position:"absolute",top:"-10000px",left:"-10000px",overflow:"auto",width:"100px",height:"100px"}},document.body),n=V.createDomElement("div",{style:{width:"200px",height:"200px",overflow:"auto"}},t),o={width:t.offsetWidth-t.clientWidth,height:t.offsetHeight-t.clientHeight};return n.remove(),t.remove(),o}getMaxSupportedCssHeight(){let e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?this._options.ffMaxSupportedCssHeight:this._options.maxSupportedCssHeight,n=V.createDomElement("div",{style:{display:"hidden"}},document.body);for(;;){let o=e*2;V.height(n,o);let r=V.height(n);if(o>t||r!==o)break;e=o}return n.remove(),e}getUID(){return this.uid}getHeaderColumnWidthDiff(){return this.headerColumnWidthDiff}getScrollbarDimensions(){return this.scrollbarDimensions}getDisplayedScrollbarDimensions(){return{width:this.viewportHasVScroll?this.scrollbarDimensions?.width??0:0,height:this.viewportHasHScroll?this.scrollbarDimensions?.height??0:0}}getAbsoluteColumnMinWidth(){return this.absoluteColumnMinWidth}getVBoxDelta(e){let t=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],n=getComputedStyle(e),o=0;return t.forEach(r=>o+=V.toFloat(n[r])),o}measureCellPaddingAndBorder(){let e=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],t=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],n=this._headers[0];this.headerColumnWidthDiff=this.headerColumnHeightDiff=0,this.cellWidthDiff=this.cellHeightDiff=0;let o=V.createDomElement("div",{className:"ui-state-default slick-state-default slick-header-column",style:{visibility:"hidden"},textContent:"-"},n),r=getComputedStyle(o);r.boxSizing!=="border-box"&&(e.forEach(a=>this.headerColumnWidthDiff+=V.toFloat(r[a])),t.forEach(a=>this.headerColumnHeightDiff+=V.toFloat(r[a]))),o.remove();let i=V.createDomElement("div",{className:"slick-row"},this._canvas[0]);o=V.createDomElement("div",{className:"slick-cell",id:"",style:{visibility:"hidden"},textContent:"-"},i),r=getComputedStyle(o),r.boxSizing!=="border-box"&&(e.forEach(a=>this.cellWidthDiff+=V.toFloat(r[a])),t.forEach(a=>this.cellHeightDiff+=V.toFloat(r[a]))),i.remove(),this.absoluteColumnMinWidth=Math.max(this.headerColumnWidthDiff,this.cellWidthDiff)}clearAllTimers(){window.clearTimeout(this._columnResizeTimer),window.clearTimeout(this._executionBlockTimer),window.clearTimeout(this._flashCellTimer),window.clearTimeout(this._highlightRowTimer),window.clearTimeout(this.h_editorLoader)}LogColWidths(){let e="Col Widths:";for(let t=0;t<this.columns.length;t++)e+=" "+(this.columns[t].hidden?"H":this.columns[t].width);console.log(e)}simpleArrayEquals(e,t){return Array.isArray(e)&&Array.isArray(t)&&t.sort().toString()!==e.sort().toString()}defaultFormatter(e,t,n){return V.isDefined(n)?(n+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""}cellExists(e,t){return!(e<0||e>=this.getDataLength()||t<0||t>=this.columns.length)}getCellFromNode(e){let t=/l\d+/.exec(e.className);if(!t)throw new Error(`SlickGrid getCellFromNode: cannot get cell - ${e.className}`);return parseInt(t[0].substr(1,t[0].length-1),10)}getRowFromNode(e){for(let t in this.rowsCache)if(this.rowsCache){for(let n in this.rowsCache[t].rowNode)if(this.rowsCache[t].rowNode?.[+n]===e)return t?parseInt(t,10):0}return null}clearTextSelection(){if(document.selection?.empty)try{document.selection.empty()}catch{}else if(window.getSelection){let e=window.getSelection();e?.removeAllRanges&&e.removeAllRanges()}}disableSelection(e){e.forEach(t=>{t.setAttribute("unselectable","on"),t.style.mozUserSelect="none",this._bindingEventService.bind(t,"selectstart",()=>!1)})}getPubSubService(){return this._pubSubService}getCellFromPoint(e,t){let n=this.getRowFromPosition(t),o=0,r=0;for(let i=0;i<this.columns.length&&r<=e;i++)this.columns[i]&&(r+=this.columns[i].width,o++);return o-=1,n<-1&&(n=-1),{row:n,cell:o}}getPluginByName(e){for(let t=this.plugins.length-1;t>=0;t--)if(this.plugins[t]?.pluginName===e)return this.plugins[t]}getContainerNode(){return this._container}getCellHeight(e,t){let n=this._options.rowHeight||0;if(t>1){let o=e+t-1;n=this.getRowBottom(o)-this.getRowTop(e)}else{let o=this.getRowHeight();o!==n-this.cellHeightDiff&&(n=o)}return n-=this.cellHeightDiff,Math.ceil(n)}setDifference(e,t){return new Set(Array.from(e).filter(n=>!t.has(n)))}getCellNodeBox(e,t){if(!this.cellExists(e,t))return null;let n=this.getFrozenRowOffset(e),o=this.getRowTop(e)-n,r=o+this._options.rowHeight-1,i=0;for(let l=0;l<t;l++)!this.columns[l]||this.columns[l].hidden||(i+=this.columns[l].width||0,this._options.frozenColumn===l&&(i=0));let a=i+(this.columns[t]?.width||0);return{top:o,left:i,bottom:r,right:a}}absBox(e){let t={top:e.offsetTop,left:e.offsetLeft,bottom:0,right:0,width:e.offsetWidth,height:e.offsetWidth,visible:!0};t.bottom=t.top+t.height,t.right=t.left+t.width;let n=e.offsetParent;for(;(e=e.parentNode)!==document.body&&!(!e||!e.parentNode);){let o=getComputedStyle(e);t.visible&&e.scrollHeight!==e.offsetHeight&&o.overflowY!=="visible"&&(t.visible=t.bottom>e.scrollTop&&t.top<e.scrollTop+e.clientHeight),t.visible&&e.scrollWidth!==e.offsetWidth&&o.overflowX!=="visible"&&(t.visible=t.right>e.scrollLeft&&t.left<e.scrollLeft+e.clientWidth),t.left-=e.scrollLeft,t.top-=e.scrollTop,e===n&&(t.left+=e.offsetLeft,t.top+=e.offsetTop,n=e.offsetParent),t.bottom=t.top+t.height,t.right=t.left+t.width}return t}getActiveCellPosition(){return this.absBox(this.activeCellNode)}getGridPosition(){return this.absBox(this._container)}getCellEditor(){return this.currentEditor}getActiveCell(){return this.activeCellNode?{row:this.activeRow,cell:this.activeCell}:null}getActiveCellNode(){return this.activeCellNode}getTextSelection(){let e=null;if(window.getSelection){let t=window.getSelection();(t?.rangeCount??0)>0&&(e=t.getRangeAt(0))}return e}setTextSelection(e){if(window.getSelection&&e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e))}}sanitizeHtmlString(e,t){if(!this._options.sanitizer||typeof e!="string")return e;let n=this._options.sanitizer(e);return!t&&this._options.logSanitizedHtml&&this.logMessageCount<=this.logMessageMaxCount&&n!==e&&(console.log(`sanitizer altered html: ${e} --> ${n}`),this.logMessageCount===this.logMessageMaxCount&&console.log(`sanitizer: silencing messages after first ${this.logMessageMaxCount}`),this.logMessageCount++),n}getRowspan(e,t){let n=1,o=this.getItemMetadaWhenExists(e);return o?.columns&&Object.keys(o.columns).forEach(r=>{let i=Number(r);if(i===t){let a=o.columns[i];n=Number(a?.rowspan||1)}}),n}findFocusableRow(e,t,n){let o=e,r=this._colsWithRowSpanCache[t]||new Set,i=!1;return Array.from(r).forEach(a=>{let[l,d]=a.split(":").map(Number);!i&&e>=l&&e<=d&&(o=n==="up"?l:d,this.canCellBeActive(o,t)&&(i=!0))}),o<0&&(o=0),o}findFirstFocusableCell(e){let t=0,n=e,o=-1;for(;t<this.columns.length;){let r=this.getParentRowSpanByCell(e,t);if(n=r!==null&&r.start!==e?r.start:e,this.canCellBeActive(n,t)){o=t;break}t+=this.getColspan(n,t)}return{cell:o,row:n}}findLastFocusableCell(e){let t=0,n=e,o=-1;for(;t<this.columns.length;){let r=this.getParentRowSpanByCell(e,t);n=r!==null&&r.start!==e?r.start:e,this.canCellBeActive(n,t)&&(o=t),t+=this.getColspan(n,t)}return{cell:o,row:n}}rowsToRanges(e){let t=[],n=this.columns.length-1;for(let o=0;o<e.length;o++)t.push(new AA(e[o],0,e[o],n));return t}findSpanStartingCell(e,t){let n=this.getParentRowSpanByCell(e,t),o=n!==null&&n.start!==e?n.start:e,r=0,i=0;for(;r<this.columns.length;){if(r+=this.getColspan(o,r),r>t)return r=i,{cell:r,row:o};i=r}return{cell:r,row:o}}gotoRight(e,t,n,o){if(t>=this.columns.length)return null;let r=t+1,i=n;do{let a=this.findSpanStartingCell(n,r);if(i=a.row,r=a.cell,this.canCellBeActive(i,r)&&r>t)break;r+=this.getColspan(i,a.cell)}while(r<this.columns.length);return r<this.columns.length?{row:i,cell:r,posX:r,posY:n}:null}gotoLeft(e,t,n,o){if(t<=0)return null;let r=this.findFirstFocusableCell(e);if(r.cell===null||r.cell>=t)return null;let i,a={row:e,cell:r.cell,posX:r.cell,posY:n};for(;;){if(i=this.gotoRight(a.row,a.cell,a.posY,a.posX),!i)return null;if(i.cell>=t){let l=this.findFocusableRow(n,a.cell,"up");return l!==a.row&&(a.row=l),a}a=i}}gotoDown(e,t,n,o){let r,i=this.getDataLengthIncludingAddNew();do for(e+=this.getRowspan(e,o),r=t=0;t<=o;)r=t,t+=this.getColspan(e,t);while(e<=i&&!this.canCellBeActive(e,r));return e<=i?{row:e,cell:r,posX:o,posY:e}:null}gotoUp(e,t,n,o){let r;if(e<=0)return null;do for(e=this.findFocusableRow(e-1,o,"up"),r=t=0;t<=o;)r=t,t+=this.getColspan(e,t);while(e>=0&&!this.canCellBeActive(e,r));return t<=this.columns.length?{row:e,cell:r,posX:o,posY:e}:null}gotoNext(e,t,n,o){if(!V.isDefined(e)&&!V.isDefined(t)&&(e=t=n=o=0,this.canCellBeActive(e,t)))return{row:e,cell:t,posX:t,posY:n};let r=this.gotoRight(e,t,n,o);if(!r){let i;for(;!r&&++n<this.getDataLength()+(this._options.enableAddRow?1:0);)i=this.findFirstFocusableCell(n),i.cell!==null&&(e=this.getParentRowSpanByCell(n,i.cell)?.start??n,r={row:e,cell:i.cell,posX:i.cell,posY:n})}return r}gotoPrev(e,t,n,o){if(!V.isDefined(e)&&!V.isDefined(t)&&(e=n=this.getDataLengthIncludingAddNew()-1,t=o=this.columns.length-1,this.canCellBeActive(e,t)))return{row:e,cell:t,posX:t,posY:n};let r=this.gotoLeft(e,t,n,o);if(!r){let i;for(;!r&&--n>=0;)i=this.findLastFocusableCell(n),i.cell>-1&&(e=this.getParentRowSpanByCell(n,i.cell)?.start??n,r={row:e,cell:i.cell,posX:i.cell,posY:n})}return r}gotoRowStart(e,t,n,o){let r=this.findFirstFocusableCell(e);return r.cell===null?null:{row:r.row,cell:r.cell,posX:r.cell,posY:e}}gotoRowEnd(e,t,n,o){let r=this.findLastFocusableCell(e);return r.cell===-1?null:{row:r.row,cell:r.cell,posX:r.cell,posY:e}}navigateRight(){return this.navigate("right")}navigateLeft(){return this.navigate("left")}navigateDown(){return this.navigate("down")}navigateUp(){return this.navigate("up")}navigateNext(){return this.navigate("next")}navigatePrev(){return this.navigate("prev")}navigateRowStart(){return this.navigate("home")}navigateRowEnd(){return this.navigate("end")}navigateTopStart(){return this.navigateToRow(0),this.navigate("home")}navigateBottomEnd(){return this.navigateBottom(),this.navigate("end")}navigate(e){if(!this._options.enableCellNavigation||!this.activeCellNode&&e!=="prev"&&e!=="next")return!1;if(!this.getEditorLock()?.commitCurrentEdit())return!0;this.setFocus(),this.unsetActiveCell();let t={up:-1,down:1,left:-1,right:1,prev:-1,next:1,home:-1,end:1};this.tabbingDirection=t[e];let n={up:this.gotoUp,down:this.gotoDown,left:this.gotoLeft,right:this.gotoRight,prev:this.gotoPrev,next:this.gotoNext,home:this.gotoRowStart,end:this.gotoRowEnd}[e].call(this,this.activeRow,this.activeCell,this.activePosY,this.activePosX);return this.navigateToPos(n)}navigateToPos(e){if(e){if(this.hasFrozenRows&&this._options.frozenBottom&&e.row===this.getDataLength())return;let t=e.row===this.getDataLength();return(!this._options.frozenBottom&&e.row>=this.actualFrozenRow||this._options.frozenBottom&&e.row<this.actualFrozenRow)&&this.scrollCellIntoView(e.row,e.cell,!t&&this._options.emulatePagingWhenScrolling),this.setActiveCellInternal(this.getCellNode(e.row,e.cell)),this.activePosX=e.posX,this.activePosY=e.posY,!0}else return this.setActiveCellInternal(this.getCellNode(this.activeRow,this.activeCell)),!1}getCellNode(e,t){if(this.rowsCache[e]){this.ensureCellNodesInRowsCache(e);try{return this.rowsCache[e].cellNodesByColumnIdx.length>t?this.rowsCache[e].cellNodesByColumnIdx[t]:null}catch{return this.rowsCache[e].cellNodesByColumnIdx[t]}}return null}setActiveCell(e,t,n,o,r){this.initialized&&(e>this.getDataLength()||e<0||t>=this.columns.length||t<0||this._options.enableCellNavigation&&(this.scrollCellIntoView(e,t,!1),this.setActiveCellInternal(this.getCellNode(e,t),n,o,r)))}setActiveRow(e,t,n){this.initialized&&(e>this.getDataLength()||e<0||(t??0)>=this.columns.length||(t??0)<0||(this.activeRow=e,n||this.scrollCellIntoView(e,t||0,!1)))}canCellBeActive(e,t){if(!this._options.enableCellNavigation||e>=this.getDataLengthIncludingAddNew()||e<0||t>=this.columns.length||t<0||!this.columns[t]||this.columns[t].hidden||(this.getParentRowSpanByCell(e,t)?.start??e)!==e)return!1;let n=this.getItemMetadaWhenExists(e);if(n?.focusable!==void 0)return!!n.focusable;let o=n?.columns;return o?.[this.columns[t].id]?.focusable!==void 0?!!o[this.columns[t].id].focusable:o?.[t]?.focusable!==void 0?!!o[t].focusable:!!this.columns[t].focusable}canCellBeSelected(e,t){if(e>=this.getDataLength()||e<0||t>=this.columns.length||t<0||!this.columns[t]||this.columns[t].hidden)return!1;let n=this.getItemMetadaWhenExists(e);if(n?.selectable!==void 0)return!!n.selectable;let o=n?.columns&&(n.columns[this.columns[t].id]||n.columns[t]);return o?.selectable!==void 0?!!o.selectable:!!this.columns[t].selectable}gotoCell(e,t,n,o){if(!this.initialized||!this.canCellBeActive(e,t)||!this.getEditorLock()?.commitCurrentEdit())return;this.scrollCellIntoView(e,t,!1);let r=this.getCellNode(e,t),i=this.columns[t],a=!!(this._options.editable&&i?.editor&&this._options.suppressActiveCellChangeOnEdit);this.setActiveCellInternal(r,n||e===this.getDataLength()||this._options.autoEdit,null,a,o),this.currentEditor||this.setFocus()}};/**
278
278
  * @license
279
279
  * (c) 2009-present Michael Leibman
280
280
  * michael{dot}leibman{at}gmail{dot}com
@@ -290,15 +290,15 @@ xe.version="2.30.1";FD(It);xe.fn=ve;xe.min=xM;xe.max=RM;xe.now=TM;xe.utc=No;xe.u
290
290
  * This increases the speed dramatically, but can only be done safely because there are no event handlers
291
291
  * or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy()
292
292
  * and do proper cleanup.
293
- */const LA={asyncEditorLoading:!1,autosizeColsMode:Vv.LegacyForceFit,enableAutoSizeColumns:!0,enableColumnReorder:!1};function $A({SlickDataView:e=OA,applyCellCssStyles:t,assignIds:n=!1,columnSorter:o=MF,columns:r,getItemMetadata:i,groups:a,idPropertyName:l="id",items:d,onAddNewRow:u,onBeforeEditCell:f,onCellChange:p,onClick:y,onDblClick:w,onHeaderMenuCommand:b,onRowCountChanged:m=PD,onSelectedRowsChanged:v,options:D={},table:k}){Fe.useEffect(()=>{const x=new Bv,S=new yA({}),C=new wA({}),O=new e({groupItemMetadataProvider:a?x:void 0}),I=k.createGrid(O,[],D);I.setSelectionModel(new kA({selectActiveRow:!1})),I.registerPlugin(S),I.registerPlugin(x),i&&(O.getItemMetadata=i(O)),O.setItems(n?d.map((z,R)=>({...z,[l]:++R})):d.map(z=>({...z})),l),I.invalidate(),O.onRowCountChanged.subscribe(m(k)),O.onRowsChanged.subscribe(ED(I)),I.onAddNewRow.subscribe(u),I.onCellChange.subscribe(p),v&&I.onSelectedRowsChanged.subscribe(v),f&&I.onBeforeEditCell.subscribe(f),y&&I.onClick.subscribe(y),w&&I.onDblClick.subscribe(w),I.onSort.subscribe(o.getSortFunction(k.id)),I.onContextMenu.subscribe(Yv(k)),k.columnPicker&&I.onHeaderContextMenu.subscribe(uF(k));const F=Av(k);return S.onCommand.subscribe(F),b&&(C.onCommand.subscribe(b),I.registerPlugin(C)),a&&(k.grouping={groups:a,isGrouped:k.grouping.isGrouped??!0}),t?.(I),k.hotKeysBehavior.pushToCommandQueue(I),()=>{S.onCommand.unsubscribe(F),b&&C.onCommand.unsubscribe(b),I.onAddNewRow.unsubscribe(u),I.onCellChange.unsubscribe(p),v&&I.onSelectedRowsChanged.subscribe(v),f&&I.onBeforeEditCell.unsubscribe(f),y&&I.onClick.unsubscribe(y),w&&I.onDblClick.unsubscribe(w),k.reset()}},[d]),Fe.useEffect(()=>{const x=k.grid;!x||!D||setTimeout(()=>{x.setOptions({...LA,...D}),x.render(),k.totalCalculator?.calculate(x),k.notifyObservers()},0)},[D,d]),Fe.useEffect(()=>{const x=k.grid;if(x&&r.length){if(r[0].id===iu){const S=new fA;x.setColumns([{...S.getColumnDefinition(),focusable:!1},...r.slice(1)]),x.registerPlugin(S)}else x.setColumns(r);k.columnPicker&&(k.columnPicker.initialColumns=x.getColumns(),k.columnPicker.visibleColumnIds.length||(k.columnPicker.visibleColumnIds=x.getColumns().map(({id:S})=>S)),x.setColumns(x.getColumns().filter(({id:S})=>!k.columnPicker||!k.columnPicker.visibleColumnIds.length?!0:k.columnPicker.visibleColumnIds.includes(S)))),or.highlightAllColumns(k.filter.args,k.id),k.filter.register(x,k.id),x.invalidate(),k.totalCalculator?.calculate(x),k.notifyObservers(),o.restoreSorting(k)}},[r,d])}const VA=e=>(t,{grid:n,item:o})=>{jA(n,o),n.updateRowCount(),n.invalidate(),e.isEdited=!0,e.hotKeysBehavior.pushToCommandQueue(n)},jA=(e,t)=>{const n=e.getData(),o=n.getIdPropertyName(),i={...iF(n),...t,[o]:Fl(e),isEdited:!0,isNew:!0};n.addItem(i)},Ad="0.75rem",BA=ie(oo)({"& .slick-header-column":{"& .slick-column-name":{fontSize:Ad}},"& .slick-viewport":{"& .slick-cell":{display:"flex",fontSize:Ad,"&.text-center":{justifyContent:"center",textAlign:"center"},"&.text-right":{justifyContent:"end",textAlign:"right"},"& #autocomplete":{margin:0,padding:0,maxHeight:"300px",width:"100%",overflow:"auto",fontSize:Ad,boxShadow:"0 0 5px 1px gray","& div":{"&:hover":{cursor:"pointer"},"& strong":{color:"#007bff"}}}}},"& .slick-footerrow":{borderTop:"1px solid silver","& .slick-footerrow-column":{height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",paddingRight:"5px",borderBottom:"none",fontWeight:"bold","&:last-child":{borderRight:"none"}}}}),WA={Container:BA},HA=({SlickDataView:e,applyCellCssStyles:t,assignIds:n,columnSorter:o,columns:r,getItemMetadata:i,groups:a,idPropertyName:l,items:d,onAddNewRow:u,onBeforeEditCell:f,onCellChange:p,onClick:y,onDblClick:w,onHeaderMenuCommand:b,onRowCountChanged:m,onSelectedRowsChanged:v,options:D,table:k})=>($A({SlickDataView:e,applyCellCssStyles:t,assignIds:n,columnSorter:o,columns:r,getItemMetadata:i,groups:a,idPropertyName:l,items:d,onAddNewRow:u||VA(k),onBeforeEditCell:f,onCellChange:p||kD(k),onClick:y,onDblClick:w,onHeaderMenuCommand:b,onRowCountChanged:m,onSelectedRowsChanged:v,options:D,table:k}),fF(k),yF(k),gF(k),E.jsx(WA.Container,{id:k.id,className:"slick-container"})),Dm=Ws`
293
+ */const LA={asyncEditorLoading:!1,autosizeColsMode:Vv.LegacyForceFit,enableAutoSizeColumns:!0,enableColumnReorder:!1};function $A({SlickDataView:e=OA,applyCellCssStyles:t,assignIds:n=!1,columnSorter:o=IF,columns:r,getItemMetadata:i,groups:a,idPropertyName:l="id",items:d,onAddNewRow:u,onBeforeEditCell:f,onCellChange:p,onClick:y,onDblClick:w,onHeaderMenuCommand:b,onRowCountChanged:m=PD,onSelectedRowsChanged:v,options:D={},table:k}){Fe.useEffect(()=>{const x=new Bv,S=new yA({}),C=new wA({}),O=new e({groupItemMetadataProvider:a?x:void 0}),I=k.createGrid(O,[],D);I.setSelectionModel(new kA({selectActiveRow:!1})),I.registerPlugin(S),I.registerPlugin(x),i&&(O.getItemMetadata=i(O)),O.setItems(n?d.map((z,R)=>({...z,[l]:++R})):d.map(z=>({...z})),l),I.invalidate(),O.onRowCountChanged.subscribe(m(k)),O.onRowsChanged.subscribe(ED(I)),I.onAddNewRow.subscribe(u),I.onCellChange.subscribe(p),v&&I.onSelectedRowsChanged.subscribe(v),f&&I.onBeforeEditCell.subscribe(f),y&&I.onClick.subscribe(y),w&&I.onDblClick.subscribe(w),I.onSort.subscribe(o.getSortFunction(k.id)),I.onContextMenu.subscribe(Yv(k)),k.columnPicker&&I.onHeaderContextMenu.subscribe(hF(k));const F=Av(k);return S.onCommand.subscribe(F),b&&(C.onCommand.subscribe(b),I.registerPlugin(C)),a&&(k.grouping={groups:a,isGrouped:k.grouping.isGrouped??!0}),t?.(I),k.hotKeysBehavior.pushToCommandQueue(I),()=>{S.onCommand.unsubscribe(F),b&&C.onCommand.unsubscribe(b),I.onAddNewRow.unsubscribe(u),I.onCellChange.unsubscribe(p),v&&I.onSelectedRowsChanged.subscribe(v),f&&I.onBeforeEditCell.unsubscribe(f),y&&I.onClick.unsubscribe(y),w&&I.onDblClick.unsubscribe(w),k.reset()}},[d]),Fe.useEffect(()=>{const x=k.grid;!x||!D||setTimeout(()=>{x.setOptions({...LA,...D}),x.render(),k.totalCalculator?.calculate(x),k.notifyObservers()},0)},[D,d]),Fe.useEffect(()=>{const x=k.grid;if(x&&r.length){if(r[0].id===iu){const S=new fA;x.setColumns([{...S.getColumnDefinition(),focusable:!1},...r.slice(1)]),x.registerPlugin(S)}else x.setColumns(r);k.columnPicker&&(k.columnPicker.initialColumns=x.getColumns(),k.columnPicker.visibleColumnIds.length||(k.columnPicker.visibleColumnIds=x.getColumns().map(({id:S})=>S)),x.setColumns(x.getColumns().filter(({id:S})=>!k.columnPicker||!k.columnPicker.visibleColumnIds.length?!0:k.columnPicker.visibleColumnIds.includes(S)))),or.highlightAllColumns(k.filter.args,k.id),k.filter.register(x,k.id),x.invalidate(),k.totalCalculator?.calculate(x),k.notifyObservers(),o.restoreSorting(k)}},[r,d])}const VA=e=>(t,{grid:n,item:o})=>{jA(n,o),n.updateRowCount(),n.invalidate(),e.isEdited=!0,e.hotKeysBehavior.pushToCommandQueue(n)},jA=(e,t)=>{const n=e.getData(),o=n.getIdPropertyName(),i={...aF(n),...t,[o]:Fl(e),isEdited:!0,isNew:!0};n.addItem(i)};ie(oo)(({theme:e})=>({"& .slick-container":{userSelect:"none",maxWidth:"100%",height:"100%",maxHeight:"100%",color:e.palette.text.primary,borderColor:e.palette.background.paper,fontFamily:"inherit","& .slick-viewport":{backgroundColor:e.palette.background.paper,"& .grid-canvas":{"& .ui-widget-content.slick-row":{"&.even":{backgroundColor:e.palette.background.default},"& .slick-cell":{"&.active":{borderColor:"#007bff","& input":{color:e.palette.text.primary}},"&.selected":{color:e.palette.text.primary},"&.bold":{fontWeight:"bold"},"& select":{color:e.palette.text.primary,backgroundColor:e.palette.background.default},"& #autocomplete":{backgroundColor:e.palette.background.default}}}}},"& .slick-footerrow":{backgroundColor:e.palette.background.default}}}));const Dm=Ws`
294
294
  50% {
295
295
  background-color: #ffb1b1;
296
296
  }
297
- `;ie(oo)(({theme:e})=>({"& .slick-container":{userSelect:"none",maxWidth:"100%",height:"100%",maxHeight:"100%",color:e.palette.text.primary,borderColor:e.palette.background.paper,fontFamily:"inherit","& .slick-header-column":{"&.filter-active .slick-header-button::after":{width:"7px",height:"7px",content:"''",backgroundColor:"#2196f3",position:"absolute",borderRadius:"50%",border:"2px solid #f8f8f8",top:"3px",right:"3px"},"&:not([data-id=_checkbox_selector]):not([data-id=isEdited])":{"& .slick-column-name":{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:"calc(100% - 16px)"}},"&.slick-state-hover":{"&.filter-active .slick-header-button::after":{border:"2px solid #e8e8e8"},"& .slick-header-button":{"&::before":{backgroundColor:"#e8e8e8"}}},"& .slick-header-button":{width:"19px",height:"12px","&::before":{position:"absolute",content:"''",width:"19px",height:"12px",top:"6px",right:"5px",backgroundImage:"repeating-linear-gradient(0deg, #808080, #808080 2px, transparent 2px, transparent 4px)",clipPath:"polygon(0% 0%, 100% 0%, 50% 110%)",backgroundColor:"#f8f8f8"}}},"& .slick-viewport":{backgroundColor:e.palette.background.paper,"& .grid-canvas":{"& .ui-widget-content.slick-row":{"&.even":{backgroundColor:e.palette.background.default},"& .slick-cell":{"&.active":{borderColor:"#007bff","& input":{color:e.palette.text.primary}},"&.selected":{color:e.palette.text.primary},"&.text-right":{textAlign:"right"},"&.bold":{fontWeight:"bold"},"&.wink":{animation:`${Dm} infinite 0.5s linear`,"& input":{animation:`${Dm} infinite 0.5s linear`}},"& input.editor-text":{textAlign:"inherit"},"& select":{color:e.palette.text.primary,backgroundColor:e.palette.background.default},"& #autocomplete":{backgroundColor:e.palette.background.default}}}}},"& .slick-footerrow":{backgroundColor:e.palette.background.default}}}));const zA={id:iu,field:iu};function YA(e,t,n){return n?"<span>&#9998;</span>":""}const UA={id:"isEdited",name:"&#9998;",field:"isEdited",formatter:YA,focusable:!1,sortable:!0,sortAs:Co.NUMBER,cssClass:"text-center",maxWidth:30};class qA{passed(t,n,o){if(!n[1]&&!n[2])return!0;switch(o){case je.Boolean:return this.boolean(t,n);case je.DateBetween:return this.dateBetween(t,n);case je.DateEqual:return this.dateEqual(t,n[1]);case je.DateFrom:return this.dateFrom(t,n[1]);case je.DateTo:return this.dateTo(t,n[1]);case je.MultipleSelect:return this.multipleSelect(t,n[1]);case je.NumberBetween:return this.numberBetween(t,n);case je.NumberEqual:return this.numberEqual(t,n[1]);case je.NumberFrom:return this.numberFrom(t,n[1]);case je.NumberTo:return this.numberTo(t,n[1]);case je.TextContain:return this.textContain(t,n[1]);case je.TextEqual:return this.textEqual(t,n[1]);case je.TextNotContain:return!this.textContain(t,n[1]);case je.TextNotEqual:return!this.textEqual(t,n[1])}}boolean(t,n){return n[1]?!!t:n[2]?!t:!0}dateBetween(t,n){const o=n[1],r=n[2];return o?r?this.dateFrom(t,o)&&this.dateTo(t,r):this.dateFrom(t,o):this.dateTo(t,r)}dateEqual(t,n){return n===t}dateFrom(t,n){return Ss(t)>=Ss(n)}dateTo(t,n){return Ss(t)<=Ss(n)}multipleSelect(t,n){const o=JSON.parse(n);return o.includes("All")?!0:o.includes(t)}numberBetween(t,n){const o=n[1]||0,r=n[2]||0;return o?r?this.numberFrom(t,o)&&this.numberTo(t,r):Number(t)>=Number(o):Number(t)<=Number(r)}numberEqual(t,n){return Number(n)===Number(t)}numberFrom(t,n){return Number(t)>=Number(n)}numberTo(t,n){return Number(t)<=Number(n)}textEqual(t,n){return(t||"").toLowerCase()===n.toLowerCase()}textContain(t,n){return(t||"").toLowerCase().match(n.toLowerCase())}}const GA=new qA,KA=[hn.Date,hn.Boolean,hn.Number];class XA extends Nv{filterFn(t,n){if(!n.columnFilters)return!0;const o=this.grid;if(!o)return!0;const r=o.getColumns(),i=Object.keys(n.columnFilters);for(let a=0;a<i.length;a++){const l=i[a],d=r[o.getColumnIndex(l)];if(!d)continue;const{filterId:u,group:f,value:p}=n.columnFilters[l];let y=t[d?.field];if(!KA.includes(f)){const w=d?.formatter;w&&(y=w(0,0,y,d,t,o))}if(!GA.passed(y,p,u))return!1}return!0}reset(){this.filter.reset(),this.tableId&&or.highlightAllColumns(this.args,this.tableId)}}function ZA(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var gl={exports:{}},QA=gl.exports,Om;function JA(){return Om||(Om=1,function(e,t){(function(n,o){e.exports=o()})(QA,function(){var n;function o(){return n.apply(null,arguments)}function r(c){n=c}function i(c){return c instanceof Array||Object.prototype.toString.call(c)==="[object Array]"}function a(c){return c!=null&&Object.prototype.toString.call(c)==="[object Object]"}function l(c,h){return Object.prototype.hasOwnProperty.call(c,h)}function d(c){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(c).length===0;var h;for(h in c)if(l(c,h))return!1;return!0}function u(c){return c===void 0}function f(c){return typeof c=="number"||Object.prototype.toString.call(c)==="[object Number]"}function p(c){return c instanceof Date||Object.prototype.toString.call(c)==="[object Date]"}function y(c,h){var g=[],_,N=c.length;for(_=0;_<N;++_)g.push(h(c[_],_));return g}function w(c,h){for(var g in h)l(h,g)&&(c[g]=h[g]);return l(h,"toString")&&(c.toString=h.toString),l(h,"valueOf")&&(c.valueOf=h.valueOf),c}function b(c,h,g,_){return uf(c,h,g,_,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(c){return c._pf==null&&(c._pf=m()),c._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(c){var h=Object(this),g=h.length>>>0,_;for(_=0;_<g;_++)if(_ in h&&c.call(this,h[_],_,h))return!0;return!1};function k(c){var h=null,g=!1,_=c._d&&!isNaN(c._d.getTime());if(_&&(h=v(c),g=D.call(h.parsedDateParts,function(N){return N!=null}),_=h.overflow<0&&!h.empty&&!h.invalidEra&&!h.invalidMonth&&!h.invalidWeekday&&!h.weekdayMismatch&&!h.nullInput&&!h.invalidFormat&&!h.userInvalidated&&(!h.meridiem||h.meridiem&&g),c._strict&&(_=_&&h.charsLeftOver===0&&h.unusedTokens.length===0&&h.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(c))c._isValid=_;else return _;return c._isValid}function x(c){var h=b(NaN);return c!=null?w(v(h),c):v(h).userInvalidated=!0,h}var S=o.momentProperties=[],C=!1;function O(c,h){var g,_,N,X=S.length;if(u(h._isAMomentObject)||(c._isAMomentObject=h._isAMomentObject),u(h._i)||(c._i=h._i),u(h._f)||(c._f=h._f),u(h._l)||(c._l=h._l),u(h._strict)||(c._strict=h._strict),u(h._tzm)||(c._tzm=h._tzm),u(h._isUTC)||(c._isUTC=h._isUTC),u(h._offset)||(c._offset=h._offset),u(h._pf)||(c._pf=v(h)),u(h._locale)||(c._locale=h._locale),X>0)for(g=0;g<X;g++)_=S[g],N=h[_],u(N)||(c[_]=N);return c}function I(c){O(this,c),this._d=new Date(c._d!=null?c._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),C===!1&&(C=!0,o.updateOffset(this),C=!1)}function F(c){return c instanceof I||c!=null&&c._isAMomentObject!=null}function z(c){o.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+c)}function R(c,h){var g=!0;return w(function(){if(o.deprecationHandler!=null&&o.deprecationHandler(null,c),g){var _=[],N,X,de,Ee=arguments.length;for(X=0;X<Ee;X++){if(N="",typeof arguments[X]=="object"){N+=`
297
+ `,Ad="0.75rem",BA="24px",WA=ie(oo)({"& .slick-header-column":{"&.filter-active .slick-header-button::after":{width:"7px",height:"7px",content:"''",backgroundColor:"#2196f3",position:"absolute",borderRadius:"50%",border:"2px solid #f8f8f8",top:"3px",right:"3px"},"&:not([data-id=_checkbox_selector]):not([data-id=isEdited])":{"& .slick-column-name":{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:"calc(100% - 16px)"}},"&.slick-state-hover":{"&.filter-active .slick-header-button::after":{border:"2px solid #e8e8e8"},"& .slick-header-button":{"&::before":{backgroundColor:"#e8e8e8"}}},"& .slick-column-name":{fontSize:Ad},"& .slick-header-button":{width:"19px",height:"12px","&::before":{position:"absolute",content:"''",width:"19px",height:"12px",top:"6px",right:"5px",backgroundImage:"repeating-linear-gradient(0deg, #808080, #808080 2px, transparent 2px, transparent 4px)",clipPath:"polygon(0% 0%, 100% 0%, 50% 110%)",backgroundColor:"#f8f8f8"}}},"& .slick-viewport":{"& .slick-cell":{display:"flex",fontSize:Ad,"&.text-center":{justifyContent:"center",textAlign:"center"},"&.text-right":{justifyContent:"end",textAlign:"right"},"&.wink":{animation:`${Dm} infinite 0.5s linear`,"& input":{animation:`${Dm} infinite 0.5s linear`}},"& input.editor-text":{textAlign:"inherit"},"& #autocomplete":{boxShadow:"0 0 5px 1px gray",fontSize:Ad,margin:0,maxHeight:"300px",minWidth:"100%",overflow:"auto",padding:0,position:"absolute",top:BA,"& div":{"&:hover":{cursor:"pointer"},"& strong":{color:"#007bff"}}}}},"& .slick-footerrow":{borderTop:"1px solid silver","& .slick-footerrow-column":{height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",paddingRight:"5px",borderBottom:"none",fontWeight:"bold","&:last-child":{borderRight:"none"}}}}),HA={Container:WA},zA=({SlickDataView:e,applyCellCssStyles:t,assignIds:n,columnSorter:o,columns:r,getItemMetadata:i,groups:a,idPropertyName:l,items:d,onAddNewRow:u,onBeforeEditCell:f,onCellChange:p,onClick:y,onDblClick:w,onHeaderMenuCommand:b,onRowCountChanged:m,onSelectedRowsChanged:v,options:D,table:k})=>($A({SlickDataView:e,applyCellCssStyles:t,assignIds:n,columnSorter:o,columns:r,getItemMetadata:i,groups:a,idPropertyName:l,items:d,onAddNewRow:u||VA(k),onBeforeEditCell:f,onCellChange:p||kD(k),onClick:y,onDblClick:w,onHeaderMenuCommand:b,onRowCountChanged:m,onSelectedRowsChanged:v,options:D,table:k}),pF(k),vF(k),yF(k),E.jsx(HA.Container,{id:k.id,className:"slick-container"})),YA={id:iu,field:iu};function UA(e,t,n){return n?"<span>&#9998;</span>":""}const qA={id:"isEdited",name:"&#9998;",field:"isEdited",formatter:UA,focusable:!1,sortable:!0,sortAs:Co.NUMBER,cssClass:"text-center",maxWidth:30};class GA{passed(t,n,o){if(!n[1]&&!n[2])return!0;switch(o){case je.Boolean:return this.boolean(t,n);case je.DateBetween:return this.dateBetween(t,n);case je.DateEqual:return this.dateEqual(t,n[1]);case je.DateFrom:return this.dateFrom(t,n[1]);case je.DateTo:return this.dateTo(t,n[1]);case je.MultipleSelect:return this.multipleSelect(t,n[1]);case je.NumberBetween:return this.numberBetween(t,n);case je.NumberEqual:return this.numberEqual(t,n[1]);case je.NumberFrom:return this.numberFrom(t,n[1]);case je.NumberTo:return this.numberTo(t,n[1]);case je.TextContain:return this.textContain(t,n[1]);case je.TextEqual:return this.textEqual(t,n[1]);case je.TextNotContain:return!this.textContain(t,n[1]);case je.TextNotEqual:return!this.textEqual(t,n[1])}}boolean(t,n){return n[1]?!!t:n[2]?!t:!0}dateBetween(t,n){const o=n[1],r=n[2];return o?r?this.dateFrom(t,o)&&this.dateTo(t,r):this.dateFrom(t,o):this.dateTo(t,r)}dateEqual(t,n){return n===t}dateFrom(t,n){return Ss(t)>=Ss(n)}dateTo(t,n){return Ss(t)<=Ss(n)}multipleSelect(t,n){const o=JSON.parse(n);return o.includes("All")?!0:o.includes(t)}numberBetween(t,n){const o=n[1]||0,r=n[2]||0;return o?r?this.numberFrom(t,o)&&this.numberTo(t,r):Number(t)>=Number(o):Number(t)<=Number(r)}numberEqual(t,n){return Number(n)===Number(t)}numberFrom(t,n){return Number(t)>=Number(n)}numberTo(t,n){return Number(t)<=Number(n)}textEqual(t,n){return(t||"").toLowerCase()===n.toLowerCase()}textContain(t,n){return(t||"").toLowerCase().match(n.toLowerCase())}}const KA=new GA,XA=[hn.Date,hn.Boolean,hn.Number];class ZA extends Nv{filterFn(t,n){if(!n.columnFilters)return!0;const o=this.grid;if(!o)return!0;const r=o.getColumns(),i=Object.keys(n.columnFilters);for(let a=0;a<i.length;a++){const l=i[a],d=r[o.getColumnIndex(l)];if(!d)continue;const{filterId:u,group:f,value:p}=n.columnFilters[l];let y=t[d?.field];if(!XA.includes(f)){const w=d?.formatter;w&&(y=w(0,0,y,d,t,o))}if(!KA.passed(y,p,u))return!1}return!0}reset(){this.filter.reset(),this.tableId&&or.highlightAllColumns(this.args,this.tableId)}}function QA(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var gl={exports:{}},JA=gl.exports,Om;function eF(){return Om||(Om=1,function(e,t){(function(n,o){e.exports=o()})(JA,function(){var n;function o(){return n.apply(null,arguments)}function r(c){n=c}function i(c){return c instanceof Array||Object.prototype.toString.call(c)==="[object Array]"}function a(c){return c!=null&&Object.prototype.toString.call(c)==="[object Object]"}function l(c,h){return Object.prototype.hasOwnProperty.call(c,h)}function d(c){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(c).length===0;var h;for(h in c)if(l(c,h))return!1;return!0}function u(c){return c===void 0}function f(c){return typeof c=="number"||Object.prototype.toString.call(c)==="[object Number]"}function p(c){return c instanceof Date||Object.prototype.toString.call(c)==="[object Date]"}function y(c,h){var g=[],_,N=c.length;for(_=0;_<N;++_)g.push(h(c[_],_));return g}function w(c,h){for(var g in h)l(h,g)&&(c[g]=h[g]);return l(h,"toString")&&(c.toString=h.toString),l(h,"valueOf")&&(c.valueOf=h.valueOf),c}function b(c,h,g,_){return uf(c,h,g,_,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(c){return c._pf==null&&(c._pf=m()),c._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(c){var h=Object(this),g=h.length>>>0,_;for(_=0;_<g;_++)if(_ in h&&c.call(this,h[_],_,h))return!0;return!1};function k(c){var h=null,g=!1,_=c._d&&!isNaN(c._d.getTime());if(_&&(h=v(c),g=D.call(h.parsedDateParts,function(N){return N!=null}),_=h.overflow<0&&!h.empty&&!h.invalidEra&&!h.invalidMonth&&!h.invalidWeekday&&!h.weekdayMismatch&&!h.nullInput&&!h.invalidFormat&&!h.userInvalidated&&(!h.meridiem||h.meridiem&&g),c._strict&&(_=_&&h.charsLeftOver===0&&h.unusedTokens.length===0&&h.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(c))c._isValid=_;else return _;return c._isValid}function x(c){var h=b(NaN);return c!=null?w(v(h),c):v(h).userInvalidated=!0,h}var S=o.momentProperties=[],C=!1;function O(c,h){var g,_,N,X=S.length;if(u(h._isAMomentObject)||(c._isAMomentObject=h._isAMomentObject),u(h._i)||(c._i=h._i),u(h._f)||(c._f=h._f),u(h._l)||(c._l=h._l),u(h._strict)||(c._strict=h._strict),u(h._tzm)||(c._tzm=h._tzm),u(h._isUTC)||(c._isUTC=h._isUTC),u(h._offset)||(c._offset=h._offset),u(h._pf)||(c._pf=v(h)),u(h._locale)||(c._locale=h._locale),X>0)for(g=0;g<X;g++)_=S[g],N=h[_],u(N)||(c[_]=N);return c}function I(c){O(this,c),this._d=new Date(c._d!=null?c._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),C===!1&&(C=!0,o.updateOffset(this),C=!1)}function F(c){return c instanceof I||c!=null&&c._isAMomentObject!=null}function z(c){o.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+c)}function R(c,h){var g=!0;return w(function(){if(o.deprecationHandler!=null&&o.deprecationHandler(null,c),g){var _=[],N,X,de,Ee=arguments.length;for(X=0;X<Ee;X++){if(N="",typeof arguments[X]=="object"){N+=`
298
298
  [`+X+"] ";for(de in arguments[0])l(arguments[0],de)&&(N+=de+": "+arguments[0][de]+", ");N=N.slice(0,-2)}else N=arguments[X];_.push(N)}z(c+`
299
299
  Arguments: `+Array.prototype.slice.call(_).join("")+`
300
- `+new Error().stack),g=!1}return h.apply(this,arguments)},h)}var $={};function K(c,h){o.deprecationHandler!=null&&o.deprecationHandler(c,h),$[c]||(z(h),$[c]=!0)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null;function G(c){return typeof Function<"u"&&c instanceof Function||Object.prototype.toString.call(c)==="[object Function]"}function q(c){var h,g;for(g in c)l(c,g)&&(h=c[g],G(h)?this[g]=h:this["_"+g]=h);this._config=c,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Y(c,h){var g=w({},c),_;for(_ in h)l(h,_)&&(a(c[_])&&a(h[_])?(g[_]={},w(g[_],c[_]),w(g[_],h[_])):h[_]!=null?g[_]=h[_]:delete g[_]);for(_ in c)l(c,_)&&!l(h,_)&&a(c[_])&&(g[_]=w({},g[_]));return g}function H(c){c!=null&&this.set(c)}var ae;Object.keys?ae=Object.keys:ae=function(c){var h,g=[];for(h in c)l(c,h)&&g.push(h);return g};var A={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M(c,h,g){var _=this._calendar[c]||this._calendar.sameElse;return G(_)?_.call(h,g):_}function L(c,h,g){var _=""+Math.abs(c),N=h-_.length,X=c>=0;return(X?g?"+":"":"-")+Math.pow(10,Math.max(0,N)).toString().substr(1)+_}var B=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,oe={},se={};function j(c,h,g,_){var N=_;typeof _=="string"&&(N=function(){return this[_]()}),c&&(se[c]=N),h&&(se[h[0]]=function(){return L(N.apply(this,arguments),h[1],h[2])}),g&&(se[g]=function(){return this.localeData().ordinal(N.apply(this,arguments),c)})}function ee(c){return c.match(/\[[\s\S]/)?c.replace(/^\[|\]$/g,""):c.replace(/\\/g,"")}function J(c){var h=c.match(B),g,_;for(g=0,_=h.length;g<_;g++)se[h[g]]?h[g]=se[h[g]]:h[g]=ee(h[g]);return function(N){var X="",de;for(de=0;de<_;de++)X+=G(h[de])?h[de].call(N,c):h[de];return X}}function te(c,h){return c.isValid()?(h=ce(h,c.localeData()),oe[h]=oe[h]||J(h),oe[h](c)):c.localeData().invalidDate()}function ce(c,h){var g=5;function _(N){return h.longDateFormat(N)||N}for(ne.lastIndex=0;g>=0&&ne.test(c);)c=c.replace(ne,_),ne.lastIndex=0,g-=1;return c}var le={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function he(c){var h=this._longDateFormat[c],g=this._longDateFormat[c.toUpperCase()];return h||!g?h:(this._longDateFormat[c]=g.match(B).map(function(_){return _==="MMMM"||_==="MM"||_==="DD"||_==="dddd"?_.slice(1):_}).join(""),this._longDateFormat[c])}var W="Invalid date";function re(){return this._invalidDate}var Z="%d",fe=/\d{1,2}/;function pe(c){return this._ordinal.replace("%d",c)}var be={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ge(c,h,g,_){var N=this._relativeTime[g];return G(N)?N(c,h,g,_):N.replace(/%d/i,c)}function Re(c,h){var g=this._relativeTime[c>0?"future":"past"];return G(g)?g(h):g.replace(/%s/i,h)}var Ve={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ne(c){return typeof c=="string"?Ve[c]||Ve[c.toLowerCase()]:void 0}function Je(c){var h={},g,_;for(_ in c)l(c,_)&&(g=Ne(_),g&&(h[g]=c[_]));return h}var ke={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ut(c){var h=[],g;for(g in c)l(c,g)&&h.push({unit:g,priority:ke[g]});return h.sort(function(_,N){return _.priority-N.priority}),h}var Yt=/\d/,rt=/\d\d/,Ot=/\d{3}/,Ut=/\d{4}/,Lt=/[+-]?\d{6}/,Ue=/\d\d?/,Be=/\d\d\d\d?/,rn=/\d\d\d\d\d\d?/,dn=/\d{1,3}/,Oe=/\d{1,4}/,We=/[+-]?\d{1,6}/,ht=/\d+/,nn=/[+-]?\d+/,An=/Z|[+-]\d\d:?\d\d/gi,at=/Z|[+-]\d\d(?::?\d\d)?/gi,Zt=/[+-]?\d+(\.\d{1,3})?/,pn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Qt=/^[1-9]\d?/,cr=/^([1-9]\d|\d)/,He;He={};function _e(c,h,g){He[c]=G(h)?h:function(_,N){return _&&g?g:h}}function Lc(c,h){return l(He,c)?He[c](h._strict,h._locale):new RegExp(Ra(c))}function Ra(c){return Wn(c.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(h,g,_,N,X){return g||_||N||X}))}function Wn(c){return c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function kn(c){return c<0?Math.ceil(c)||0:Math.floor(c)}function Xe(c){var h=+c,g=0;return h!==0&&isFinite(h)&&(g=kn(h)),g}var Jr={};function yt(c,h){var g,_=h,N;for(typeof c=="string"&&(c=[c]),f(h)&&(_=function(X,de){de[h]=Xe(X)}),N=c.length,g=0;g<N;g++)Jr[c[g]]=_}function xr(c,h){yt(c,function(g,_,N,X){N._w=N._w||{},h(g,N._w,N,X)})}function $c(c,h,g){h!=null&&l(Jr,c)&&Jr[c](h,g._a,g,c)}function es(c){return c%4===0&&c%100!==0||c%400===0}var un=0,U=1,me=2,Ce=3,Ae=4,Ke=5,st=6,et=7,Ze=8;j("Y",0,0,function(){var c=this.year();return c<=9999?L(c,4):"+"+c}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),_e("Y",nn),_e("YY",Ue,rt),_e("YYYY",Oe,Ut),_e("YYYYY",We,Lt),_e("YYYYYY",We,Lt),yt(["YYYYY","YYYYYY"],un),yt("YYYY",function(c,h){h[un]=c.length===2?o.parseTwoDigitYear(c):Xe(c)}),yt("YY",function(c,h){h[un]=o.parseTwoDigitYear(c)}),yt("Y",function(c,h){h[un]=parseInt(c,10)});function Jt(c){return es(c)?366:365}o.parseTwoDigitYear=function(c){return Xe(c)+(Xe(c)>68?1900:2e3)};var $t=sn("FullYear",!0);function qt(){return es(this.year())}function sn(c,h){return function(g){return g!=null?(yo(this,c,g),o.updateOffset(this,h),this):Hn(this,c)}}function Hn(c,h){if(!c.isValid())return NaN;var g=c._d,_=c._isUTC;switch(h){case"Milliseconds":return _?g.getUTCMilliseconds():g.getMilliseconds();case"Seconds":return _?g.getUTCSeconds():g.getSeconds();case"Minutes":return _?g.getUTCMinutes():g.getMinutes();case"Hours":return _?g.getUTCHours():g.getHours();case"Date":return _?g.getUTCDate():g.getDate();case"Day":return _?g.getUTCDay():g.getDay();case"Month":return _?g.getUTCMonth():g.getMonth();case"FullYear":return _?g.getUTCFullYear():g.getFullYear();default:return NaN}}function yo(c,h,g){var _,N,X,de,Ee;if(!(!c.isValid()||isNaN(g))){switch(_=c._d,N=c._isUTC,h){case"Milliseconds":return void(N?_.setUTCMilliseconds(g):_.setMilliseconds(g));case"Seconds":return void(N?_.setUTCSeconds(g):_.setSeconds(g));case"Minutes":return void(N?_.setUTCMinutes(g):_.setMinutes(g));case"Hours":return void(N?_.setUTCHours(g):_.setHours(g));case"Date":return void(N?_.setUTCDate(g):_.setDate(g));case"FullYear":break;default:return}X=g,de=c.month(),Ee=c.date(),Ee=Ee===29&&de===1&&!es(X)?28:Ee,N?_.setUTCFullYear(X,de,Ee):_.setFullYear(X,de,Ee)}}function yn(c){return c=Ne(c),G(this[c])?this[c]():this}function Xs(c,h){if(typeof c=="object"){c=Je(c);var g=ut(c),_,N=g.length;for(_=0;_<N;_++)this[g[_].unit](c[g[_].unit])}else if(c=Ne(c),G(this[c]))return this[c](h);return this}function Vc(c,h){return(c%h+h)%h}var Wt;Array.prototype.indexOf?Wt=Array.prototype.indexOf:Wt=function(c){var h;for(h=0;h<this.length;++h)if(this[h]===c)return h;return-1};function jc(c,h){if(isNaN(c)||isNaN(h))return NaN;var g=Vc(h,12);return c+=(h-g)/12,g===1?es(c)?29:28:31-g%7%2}j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(c){return this.localeData().monthsShort(this,c)}),j("MMMM",0,0,function(c){return this.localeData().months(this,c)}),_e("M",Ue,Qt),_e("MM",Ue,rt),_e("MMM",function(c,h){return h.monthsShortRegex(c)}),_e("MMMM",function(c,h){return h.monthsRegex(c)}),yt(["M","MM"],function(c,h){h[U]=Xe(c)-1}),yt(["MMM","MMMM"],function(c,h,g,_){var N=g._locale.monthsParse(c,_,g._strict);N!=null?h[U]=N:v(g).invalidMonth=c});var jb="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Xh="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Zh=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Bb=pn,Wb=pn;function Hb(c,h){return c?i(this._months)?this._months[c.month()]:this._months[(this._months.isFormat||Zh).test(h)?"format":"standalone"][c.month()]:i(this._months)?this._months:this._months.standalone}function zb(c,h){return c?i(this._monthsShort)?this._monthsShort[c.month()]:this._monthsShort[Zh.test(h)?"format":"standalone"][c.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Yb(c,h,g){var _,N,X,de=c.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],_=0;_<12;++_)X=b([2e3,_]),this._shortMonthsParse[_]=this.monthsShort(X,"").toLocaleLowerCase(),this._longMonthsParse[_]=this.months(X,"").toLocaleLowerCase();return g?h==="MMM"?(N=Wt.call(this._shortMonthsParse,de),N!==-1?N:null):(N=Wt.call(this._longMonthsParse,de),N!==-1?N:null):h==="MMM"?(N=Wt.call(this._shortMonthsParse,de),N!==-1?N:(N=Wt.call(this._longMonthsParse,de),N!==-1?N:null)):(N=Wt.call(this._longMonthsParse,de),N!==-1?N:(N=Wt.call(this._shortMonthsParse,de),N!==-1?N:null))}function Ub(c,h,g){var _,N,X;if(this._monthsParseExact)return Yb.call(this,c,h,g);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),_=0;_<12;_++){if(N=b([2e3,_]),g&&!this._longMonthsParse[_]&&(this._longMonthsParse[_]=new RegExp("^"+this.months(N,"").replace(".","")+"$","i"),this._shortMonthsParse[_]=new RegExp("^"+this.monthsShort(N,"").replace(".","")+"$","i")),!g&&!this._monthsParse[_]&&(X="^"+this.months(N,"")+"|^"+this.monthsShort(N,""),this._monthsParse[_]=new RegExp(X.replace(".",""),"i")),g&&h==="MMMM"&&this._longMonthsParse[_].test(c))return _;if(g&&h==="MMM"&&this._shortMonthsParse[_].test(c))return _;if(!g&&this._monthsParse[_].test(c))return _}}function Qh(c,h){if(!c.isValid())return c;if(typeof h=="string"){if(/^\d+$/.test(h))h=Xe(h);else if(h=c.localeData().monthsParse(h),!f(h))return c}var g=h,_=c.date();return _=_<29?_:Math.min(_,jc(c.year(),g)),c._isUTC?c._d.setUTCMonth(g,_):c._d.setMonth(g,_),c}function Jh(c){return c!=null?(Qh(this,c),o.updateOffset(this,!0),this):Hn(this,"Month")}function qb(){return jc(this.year(),this.month())}function Gb(c){return this._monthsParseExact?(l(this,"_monthsRegex")||ef.call(this),c?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=Bb),this._monthsShortStrictRegex&&c?this._monthsShortStrictRegex:this._monthsShortRegex)}function Kb(c){return this._monthsParseExact?(l(this,"_monthsRegex")||ef.call(this),c?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Wb),this._monthsStrictRegex&&c?this._monthsStrictRegex:this._monthsRegex)}function ef(){function c(ze,it){return it.length-ze.length}var h=[],g=[],_=[],N,X,de,Ee;for(N=0;N<12;N++)X=b([2e3,N]),de=Wn(this.monthsShort(X,"")),Ee=Wn(this.months(X,"")),h.push(de),g.push(Ee),_.push(Ee),_.push(de);h.sort(c),g.sort(c),_.sort(c),this._monthsRegex=new RegExp("^("+_.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+h.join("|")+")","i")}function Xb(c,h,g,_,N,X,de){var Ee;return c<100&&c>=0?(Ee=new Date(c+400,h,g,_,N,X,de),isFinite(Ee.getFullYear())&&Ee.setFullYear(c)):Ee=new Date(c,h,g,_,N,X,de),Ee}function Zs(c){var h,g;return c<100&&c>=0?(g=Array.prototype.slice.call(arguments),g[0]=c+400,h=new Date(Date.UTC.apply(null,g)),isFinite(h.getUTCFullYear())&&h.setUTCFullYear(c)):h=new Date(Date.UTC.apply(null,arguments)),h}function Ta(c,h,g){var _=7+h-g,N=(7+Zs(c,0,_).getUTCDay()-h)%7;return-N+_-1}function tf(c,h,g,_,N){var X=(7+g-_)%7,de=Ta(c,_,N),Ee=1+7*(h-1)+X+de,ze,it;return Ee<=0?(ze=c-1,it=Jt(ze)+Ee):Ee>Jt(c)?(ze=c+1,it=Ee-Jt(c)):(ze=c,it=Ee),{year:ze,dayOfYear:it}}function Qs(c,h,g){var _=Ta(c.year(),h,g),N=Math.floor((c.dayOfYear()-_-1)/7)+1,X,de;return N<1?(de=c.year()-1,X=N+Fo(de,h,g)):N>Fo(c.year(),h,g)?(X=N-Fo(c.year(),h,g),de=c.year()+1):(de=c.year(),X=N),{week:X,year:de}}function Fo(c,h,g){var _=Ta(c,h,g),N=Ta(c+1,h,g);return(Jt(c)-_+N)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),_e("w",Ue,Qt),_e("ww",Ue,rt),_e("W",Ue,Qt),_e("WW",Ue,rt),xr(["w","ww","W","WW"],function(c,h,g,_){h[_.substr(0,1)]=Xe(c)});function Zb(c){return Qs(c,this._week.dow,this._week.doy).week}var Qb={dow:0,doy:6};function Jb(){return this._week.dow}function ew(){return this._week.doy}function tw(c){var h=this.localeData().week(this);return c==null?h:this.add((c-h)*7,"d")}function nw(c){var h=Qs(this,1,4).week;return c==null?h:this.add((c-h)*7,"d")}j("d",0,"do","day"),j("dd",0,0,function(c){return this.localeData().weekdaysMin(this,c)}),j("ddd",0,0,function(c){return this.localeData().weekdaysShort(this,c)}),j("dddd",0,0,function(c){return this.localeData().weekdays(this,c)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),_e("d",Ue),_e("e",Ue),_e("E",Ue),_e("dd",function(c,h){return h.weekdaysMinRegex(c)}),_e("ddd",function(c,h){return h.weekdaysShortRegex(c)}),_e("dddd",function(c,h){return h.weekdaysRegex(c)}),xr(["dd","ddd","dddd"],function(c,h,g,_){var N=g._locale.weekdaysParse(c,_,g._strict);N!=null?h.d=N:v(g).invalidWeekday=c}),xr(["d","e","E"],function(c,h,g,_){h[_]=Xe(c)});function ow(c,h){return typeof c!="string"?c:isNaN(c)?(c=h.weekdaysParse(c),typeof c=="number"?c:null):parseInt(c,10)}function rw(c,h){return typeof c=="string"?h.weekdaysParse(c)%7||7:isNaN(c)?null:c}function Bc(c,h){return c.slice(h,7).concat(c.slice(0,h))}var sw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),nf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),iw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),aw=pn,lw=pn,cw=pn;function dw(c,h){var g=i(this._weekdays)?this._weekdays:this._weekdays[c&&c!==!0&&this._weekdays.isFormat.test(h)?"format":"standalone"];return c===!0?Bc(g,this._week.dow):c?g[c.day()]:g}function uw(c){return c===!0?Bc(this._weekdaysShort,this._week.dow):c?this._weekdaysShort[c.day()]:this._weekdaysShort}function hw(c){return c===!0?Bc(this._weekdaysMin,this._week.dow):c?this._weekdaysMin[c.day()]:this._weekdaysMin}function fw(c,h,g){var _,N,X,de=c.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],_=0;_<7;++_)X=b([2e3,1]).day(_),this._minWeekdaysParse[_]=this.weekdaysMin(X,"").toLocaleLowerCase(),this._shortWeekdaysParse[_]=this.weekdaysShort(X,"").toLocaleLowerCase(),this._weekdaysParse[_]=this.weekdays(X,"").toLocaleLowerCase();return g?h==="dddd"?(N=Wt.call(this._weekdaysParse,de),N!==-1?N:null):h==="ddd"?(N=Wt.call(this._shortWeekdaysParse,de),N!==-1?N:null):(N=Wt.call(this._minWeekdaysParse,de),N!==-1?N:null):h==="dddd"?(N=Wt.call(this._weekdaysParse,de),N!==-1||(N=Wt.call(this._shortWeekdaysParse,de),N!==-1)?N:(N=Wt.call(this._minWeekdaysParse,de),N!==-1?N:null)):h==="ddd"?(N=Wt.call(this._shortWeekdaysParse,de),N!==-1||(N=Wt.call(this._weekdaysParse,de),N!==-1)?N:(N=Wt.call(this._minWeekdaysParse,de),N!==-1?N:null)):(N=Wt.call(this._minWeekdaysParse,de),N!==-1||(N=Wt.call(this._weekdaysParse,de),N!==-1)?N:(N=Wt.call(this._shortWeekdaysParse,de),N!==-1?N:null))}function pw(c,h,g){var _,N,X;if(this._weekdaysParseExact)return fw.call(this,c,h,g);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),_=0;_<7;_++){if(N=b([2e3,1]).day(_),g&&!this._fullWeekdaysParse[_]&&(this._fullWeekdaysParse[_]=new RegExp("^"+this.weekdays(N,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[_]=new RegExp("^"+this.weekdaysShort(N,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[_]=new RegExp("^"+this.weekdaysMin(N,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[_]||(X="^"+this.weekdays(N,"")+"|^"+this.weekdaysShort(N,"")+"|^"+this.weekdaysMin(N,""),this._weekdaysParse[_]=new RegExp(X.replace(".",""),"i")),g&&h==="dddd"&&this._fullWeekdaysParse[_].test(c))return _;if(g&&h==="ddd"&&this._shortWeekdaysParse[_].test(c))return _;if(g&&h==="dd"&&this._minWeekdaysParse[_].test(c))return _;if(!g&&this._weekdaysParse[_].test(c))return _}}function mw(c){if(!this.isValid())return c!=null?this:NaN;var h=Hn(this,"Day");return c!=null?(c=ow(c,this.localeData()),this.add(c-h,"d")):h}function gw(c){if(!this.isValid())return c!=null?this:NaN;var h=(this.day()+7-this.localeData()._week.dow)%7;return c==null?h:this.add(c-h,"d")}function yw(c){if(!this.isValid())return c!=null?this:NaN;if(c!=null){var h=rw(c,this.localeData());return this.day(this.day()%7?h:h-7)}else return this.day()||7}function vw(c){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Wc.call(this),c?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=aw),this._weekdaysStrictRegex&&c?this._weekdaysStrictRegex:this._weekdaysRegex)}function bw(c){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Wc.call(this),c?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=lw),this._weekdaysShortStrictRegex&&c?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ww(c){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Wc.call(this),c?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=cw),this._weekdaysMinStrictRegex&&c?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Wc(){function c(xn,Bo){return Bo.length-xn.length}var h=[],g=[],_=[],N=[],X,de,Ee,ze,it;for(X=0;X<7;X++)de=b([2e3,1]).day(X),Ee=Wn(this.weekdaysMin(de,"")),ze=Wn(this.weekdaysShort(de,"")),it=Wn(this.weekdays(de,"")),h.push(Ee),g.push(ze),_.push(it),N.push(Ee),N.push(ze),N.push(it);h.sort(c),g.sort(c),_.sort(c),N.sort(c),this._weekdaysRegex=new RegExp("^("+N.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+h.join("|")+")","i")}function Hc(){return this.hours()%12||12}function Cw(){return this.hours()||24}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Hc),j("k",["kk",2],0,Cw),j("hmm",0,0,function(){return""+Hc.apply(this)+L(this.minutes(),2)}),j("hmmss",0,0,function(){return""+Hc.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)});function of(c,h){j(c,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),h)})}of("a",!0),of("A",!1);function rf(c,h){return h._meridiemParse}_e("a",rf),_e("A",rf),_e("H",Ue,cr),_e("h",Ue,Qt),_e("k",Ue,Qt),_e("HH",Ue,rt),_e("hh",Ue,rt),_e("kk",Ue,rt),_e("hmm",Be),_e("hmmss",rn),_e("Hmm",Be),_e("Hmmss",rn),yt(["H","HH"],Ce),yt(["k","kk"],function(c,h,g){var _=Xe(c);h[Ce]=_===24?0:_}),yt(["a","A"],function(c,h,g){g._isPm=g._locale.isPM(c),g._meridiem=c}),yt(["h","hh"],function(c,h,g){h[Ce]=Xe(c),v(g).bigHour=!0}),yt("hmm",function(c,h,g){var _=c.length-2;h[Ce]=Xe(c.substr(0,_)),h[Ae]=Xe(c.substr(_)),v(g).bigHour=!0}),yt("hmmss",function(c,h,g){var _=c.length-4,N=c.length-2;h[Ce]=Xe(c.substr(0,_)),h[Ae]=Xe(c.substr(_,2)),h[Ke]=Xe(c.substr(N)),v(g).bigHour=!0}),yt("Hmm",function(c,h,g){var _=c.length-2;h[Ce]=Xe(c.substr(0,_)),h[Ae]=Xe(c.substr(_))}),yt("Hmmss",function(c,h,g){var _=c.length-4,N=c.length-2;h[Ce]=Xe(c.substr(0,_)),h[Ae]=Xe(c.substr(_,2)),h[Ke]=Xe(c.substr(N))});function Sw(c){return(c+"").toLowerCase().charAt(0)==="p"}var _w=/[ap]\.?m?\.?/i,xw=sn("Hours",!0);function Rw(c,h,g){return c>11?g?"pm":"PM":g?"am":"AM"}var sf={calendar:A,longDateFormat:le,invalidDate:W,ordinal:Z,dayOfMonthOrdinalParse:fe,relativeTime:be,months:jb,monthsShort:Xh,week:Qb,weekdays:sw,weekdaysMin:iw,weekdaysShort:nf,meridiemParse:_w},Vt={},Js={},ei;function Tw(c,h){var g,_=Math.min(c.length,h.length);for(g=0;g<_;g+=1)if(c[g]!==h[g])return g;return _}function af(c){return c&&c.toLowerCase().replace("_","-")}function kw(c){for(var h=0,g,_,N,X;h<c.length;){for(X=af(c[h]).split("-"),g=X.length,_=af(c[h+1]),_=_?_.split("-"):null;g>0;){if(N=ka(X.slice(0,g).join("-")),N)return N;if(_&&_.length>=g&&Tw(X,_)>=g-1)break;g--}h++}return ei}function Ew(c){return!!(c&&c.match("^[^/\\\\]*$"))}function ka(c){var h=null,g;if(Vt[c]===void 0&&e&&e.exports&&Ew(c))try{h=ei._abbr,g=ZA,g("./locale/"+c),dr(h)}catch{Vt[c]=null}return Vt[c]}function dr(c,h){var g;return c&&(u(h)?g=Lo(c):g=zc(c,h),g?ei=g:typeof console<"u"&&console.warn&&console.warn("Locale "+c+" not found. Did you forget to load it?")),ei._abbr}function zc(c,h){if(h!==null){var g,_=sf;if(h.abbr=c,Vt[c]!=null)K("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),_=Vt[c]._config;else if(h.parentLocale!=null)if(Vt[h.parentLocale]!=null)_=Vt[h.parentLocale]._config;else if(g=ka(h.parentLocale),g!=null)_=g._config;else return Js[h.parentLocale]||(Js[h.parentLocale]=[]),Js[h.parentLocale].push({name:c,config:h}),null;return Vt[c]=new H(Y(_,h)),Js[c]&&Js[c].forEach(function(N){zc(N.name,N.config)}),dr(c),Vt[c]}else return delete Vt[c],null}function Pw(c,h){if(h!=null){var g,_,N=sf;Vt[c]!=null&&Vt[c].parentLocale!=null?Vt[c].set(Y(Vt[c]._config,h)):(_=ka(c),_!=null&&(N=_._config),h=Y(N,h),_==null&&(h.abbr=c),g=new H(h),g.parentLocale=Vt[c],Vt[c]=g),dr(c)}else Vt[c]!=null&&(Vt[c].parentLocale!=null?(Vt[c]=Vt[c].parentLocale,c===dr()&&dr(c)):Vt[c]!=null&&delete Vt[c]);return Vt[c]}function Lo(c){var h;if(c&&c._locale&&c._locale._abbr&&(c=c._locale._abbr),!c)return ei;if(!i(c)){if(h=ka(c),h)return h;c=[c]}return kw(c)}function Dw(){return ae(Vt)}function Yc(c){var h,g=c._a;return g&&v(c).overflow===-2&&(h=g[U]<0||g[U]>11?U:g[me]<1||g[me]>jc(g[un],g[U])?me:g[Ce]<0||g[Ce]>24||g[Ce]===24&&(g[Ae]!==0||g[Ke]!==0||g[st]!==0)?Ce:g[Ae]<0||g[Ae]>59?Ae:g[Ke]<0||g[Ke]>59?Ke:g[st]<0||g[st]>999?st:-1,v(c)._overflowDayOfYear&&(h<un||h>me)&&(h=me),v(c)._overflowWeeks&&h===-1&&(h=et),v(c)._overflowWeekday&&h===-1&&(h=Ze),v(c).overflow=h),c}var Ow=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mw=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Iw=/Z|[+-]\d\d(?::?\d\d)?/,Ea=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Uc=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Nw=/^\/?Date\((-?\d+)/i,Aw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Fw={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function lf(c){var h,g,_=c._i,N=Ow.exec(_)||Mw.exec(_),X,de,Ee,ze,it=Ea.length,xn=Uc.length;if(N){for(v(c).iso=!0,h=0,g=it;h<g;h++)if(Ea[h][1].exec(N[1])){de=Ea[h][0],X=Ea[h][2]!==!1;break}if(de==null){c._isValid=!1;return}if(N[3]){for(h=0,g=xn;h<g;h++)if(Uc[h][1].exec(N[3])){Ee=(N[2]||" ")+Uc[h][0];break}if(Ee==null){c._isValid=!1;return}}if(!X&&Ee!=null){c._isValid=!1;return}if(N[4])if(Iw.exec(N[4]))ze="Z";else{c._isValid=!1;return}c._f=de+(Ee||"")+(ze||""),Gc(c)}else c._isValid=!1}function Lw(c,h,g,_,N,X){var de=[$w(c),Xh.indexOf(h),parseInt(g,10),parseInt(_,10),parseInt(N,10)];return X&&de.push(parseInt(X,10)),de}function $w(c){var h=parseInt(c,10);return h<=49?2e3+h:h<=999?1900+h:h}function Vw(c){return c.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jw(c,h,g){if(c){var _=nf.indexOf(c),N=new Date(h[0],h[1],h[2]).getDay();if(_!==N)return v(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function Bw(c,h,g){if(c)return Fw[c];if(h)return 0;var _=parseInt(g,10),N=_%100,X=(_-N)/100;return X*60+N}function cf(c){var h=Aw.exec(Vw(c._i)),g;if(h){if(g=Lw(h[4],h[3],h[2],h[5],h[6],h[7]),!jw(h[1],g,c))return;c._a=g,c._tzm=Bw(h[8],h[9],h[10]),c._d=Zs.apply(null,c._a),c._d.setUTCMinutes(c._d.getUTCMinutes()-c._tzm),v(c).rfc2822=!0}else c._isValid=!1}function Ww(c){var h=Nw.exec(c._i);if(h!==null){c._d=new Date(+h[1]);return}if(lf(c),c._isValid===!1)delete c._isValid;else return;if(cf(c),c._isValid===!1)delete c._isValid;else return;c._strict?c._isValid=!1:o.createFromInputFallback(c)}o.createFromInputFallback=R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(c){c._d=new Date(c._i+(c._useUTC?" UTC":""))});function ts(c,h,g){return c??h??g}function Hw(c){var h=new Date(o.now());return c._useUTC?[h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()]:[h.getFullYear(),h.getMonth(),h.getDate()]}function qc(c){var h,g,_=[],N,X,de;if(!c._d){for(N=Hw(c),c._w&&c._a[me]==null&&c._a[U]==null&&zw(c),c._dayOfYear!=null&&(de=ts(c._a[un],N[un]),(c._dayOfYear>Jt(de)||c._dayOfYear===0)&&(v(c)._overflowDayOfYear=!0),g=Zs(de,0,c._dayOfYear),c._a[U]=g.getUTCMonth(),c._a[me]=g.getUTCDate()),h=0;h<3&&c._a[h]==null;++h)c._a[h]=_[h]=N[h];for(;h<7;h++)c._a[h]=_[h]=c._a[h]==null?h===2?1:0:c._a[h];c._a[Ce]===24&&c._a[Ae]===0&&c._a[Ke]===0&&c._a[st]===0&&(c._nextDay=!0,c._a[Ce]=0),c._d=(c._useUTC?Zs:Xb).apply(null,_),X=c._useUTC?c._d.getUTCDay():c._d.getDay(),c._tzm!=null&&c._d.setUTCMinutes(c._d.getUTCMinutes()-c._tzm),c._nextDay&&(c._a[Ce]=24),c._w&&typeof c._w.d<"u"&&c._w.d!==X&&(v(c).weekdayMismatch=!0)}}function zw(c){var h,g,_,N,X,de,Ee,ze,it;h=c._w,h.GG!=null||h.W!=null||h.E!=null?(X=1,de=4,g=ts(h.GG,c._a[un],Qs(Mt(),1,4).year),_=ts(h.W,1),N=ts(h.E,1),(N<1||N>7)&&(ze=!0)):(X=c._locale._week.dow,de=c._locale._week.doy,it=Qs(Mt(),X,de),g=ts(h.gg,c._a[un],it.year),_=ts(h.w,it.week),h.d!=null?(N=h.d,(N<0||N>6)&&(ze=!0)):h.e!=null?(N=h.e+X,(h.e<0||h.e>6)&&(ze=!0)):N=X),_<1||_>Fo(g,X,de)?v(c)._overflowWeeks=!0:ze!=null?v(c)._overflowWeekday=!0:(Ee=tf(g,_,N,X,de),c._a[un]=Ee.year,c._dayOfYear=Ee.dayOfYear)}o.ISO_8601=function(){},o.RFC_2822=function(){};function Gc(c){if(c._f===o.ISO_8601){lf(c);return}if(c._f===o.RFC_2822){cf(c);return}c._a=[],v(c).empty=!0;var h=""+c._i,g,_,N,X,de,Ee=h.length,ze=0,it,xn;for(N=ce(c._f,c._locale).match(B)||[],xn=N.length,g=0;g<xn;g++)X=N[g],_=(h.match(Lc(X,c))||[])[0],_&&(de=h.substr(0,h.indexOf(_)),de.length>0&&v(c).unusedInput.push(de),h=h.slice(h.indexOf(_)+_.length),ze+=_.length),se[X]?(_?v(c).empty=!1:v(c).unusedTokens.push(X),$c(X,_,c)):c._strict&&!_&&v(c).unusedTokens.push(X);v(c).charsLeftOver=Ee-ze,h.length>0&&v(c).unusedInput.push(h),c._a[Ce]<=12&&v(c).bigHour===!0&&c._a[Ce]>0&&(v(c).bigHour=void 0),v(c).parsedDateParts=c._a.slice(0),v(c).meridiem=c._meridiem,c._a[Ce]=Yw(c._locale,c._a[Ce],c._meridiem),it=v(c).era,it!==null&&(c._a[un]=c._locale.erasConvertYear(it,c._a[un])),qc(c),Yc(c)}function Yw(c,h,g){var _;return g==null?h:c.meridiemHour!=null?c.meridiemHour(h,g):(c.isPM!=null&&(_=c.isPM(g),_&&h<12&&(h+=12),!_&&h===12&&(h=0)),h)}function Uw(c){var h,g,_,N,X,de,Ee=!1,ze=c._f.length;if(ze===0){v(c).invalidFormat=!0,c._d=new Date(NaN);return}for(N=0;N<ze;N++)X=0,de=!1,h=O({},c),c._useUTC!=null&&(h._useUTC=c._useUTC),h._f=c._f[N],Gc(h),k(h)&&(de=!0),X+=v(h).charsLeftOver,X+=v(h).unusedTokens.length*10,v(h).score=X,Ee?X<_&&(_=X,g=h):(_==null||X<_||de)&&(_=X,g=h,de&&(Ee=!0));w(c,g||h)}function qw(c){if(!c._d){var h=Je(c._i),g=h.day===void 0?h.date:h.day;c._a=y([h.year,h.month,g,h.hour,h.minute,h.second,h.millisecond],function(_){return _&&parseInt(_,10)}),qc(c)}}function Gw(c){var h=new I(Yc(df(c)));return h._nextDay&&(h.add(1,"d"),h._nextDay=void 0),h}function df(c){var h=c._i,g=c._f;return c._locale=c._locale||Lo(c._l),h===null||g===void 0&&h===""?x({nullInput:!0}):(typeof h=="string"&&(c._i=h=c._locale.preparse(h)),F(h)?new I(Yc(h)):(p(h)?c._d=h:i(g)?Uw(c):g?Gc(c):Kw(c),k(c)||(c._d=null),c))}function Kw(c){var h=c._i;u(h)?c._d=new Date(o.now()):p(h)?c._d=new Date(h.valueOf()):typeof h=="string"?Ww(c):i(h)?(c._a=y(h.slice(0),function(g){return parseInt(g,10)}),qc(c)):a(h)?qw(c):f(h)?c._d=new Date(h):o.createFromInputFallback(c)}function uf(c,h,g,_,N){var X={};return(h===!0||h===!1)&&(_=h,h=void 0),(g===!0||g===!1)&&(_=g,g=void 0),(a(c)&&d(c)||i(c)&&c.length===0)&&(c=void 0),X._isAMomentObject=!0,X._useUTC=X._isUTC=N,X._l=g,X._i=c,X._f=h,X._strict=_,Gw(X)}function Mt(c,h,g,_){return uf(c,h,g,_,!1)}var Xw=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var c=Mt.apply(null,arguments);return this.isValid()&&c.isValid()?c<this?this:c:x()}),Zw=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var c=Mt.apply(null,arguments);return this.isValid()&&c.isValid()?c>this?this:c:x()});function hf(c,h){var g,_;if(h.length===1&&i(h[0])&&(h=h[0]),!h.length)return Mt();for(g=h[0],_=1;_<h.length;++_)(!h[_].isValid()||h[_][c](g))&&(g=h[_]);return g}function Qw(){var c=[].slice.call(arguments,0);return hf("isBefore",c)}function Jw(){var c=[].slice.call(arguments,0);return hf("isAfter",c)}var eC=function(){return Date.now?Date.now():+new Date},ti=["year","quarter","month","week","day","hour","minute","second","millisecond"];function tC(c){var h,g=!1,_,N=ti.length;for(h in c)if(l(c,h)&&!(Wt.call(ti,h)!==-1&&(c[h]==null||!isNaN(c[h]))))return!1;for(_=0;_<N;++_)if(c[ti[_]]){if(g)return!1;parseFloat(c[ti[_]])!==Xe(c[ti[_]])&&(g=!0)}return!0}function nC(){return this._isValid}function oC(){return io(NaN)}function Pa(c){var h=Je(c),g=h.year||0,_=h.quarter||0,N=h.month||0,X=h.week||h.isoWeek||0,de=h.day||0,Ee=h.hour||0,ze=h.minute||0,it=h.second||0,xn=h.millisecond||0;this._isValid=tC(h),this._milliseconds=+xn+it*1e3+ze*6e4+Ee*1e3*60*60,this._days=+de+X*7,this._months=+N+_*3+g*12,this._data={},this._locale=Lo(),this._bubble()}function Da(c){return c instanceof Pa}function Kc(c){return c<0?Math.round(-1*c)*-1:Math.round(c)}function rC(c,h,g){var _=Math.min(c.length,h.length),N=Math.abs(c.length-h.length),X=0,de;for(de=0;de<_;de++)Xe(c[de])!==Xe(h[de])&&X++;return X+N}function ff(c,h){j(c,0,0,function(){var g=this.utcOffset(),_="+";return g<0&&(g=-g,_="-"),_+L(~~(g/60),2)+h+L(~~g%60,2)})}ff("Z",":"),ff("ZZ",""),_e("Z",at),_e("ZZ",at),yt(["Z","ZZ"],function(c,h,g){g._useUTC=!0,g._tzm=Xc(at,c)});var sC=/([\+\-]|\d\d)/gi;function Xc(c,h){var g=(h||"").match(c),_,N,X;return g===null?null:(_=g[g.length-1]||[],N=(_+"").match(sC)||["-",0,0],X=+(N[1]*60)+Xe(N[2]),X===0?0:N[0]==="+"?X:-X)}function Zc(c,h){var g,_;return h._isUTC?(g=h.clone(),_=(F(c)||p(c)?c.valueOf():Mt(c).valueOf())-g.valueOf(),g._d.setTime(g._d.valueOf()+_),o.updateOffset(g,!1),g):Mt(c).local()}function Qc(c){return-Math.round(c._d.getTimezoneOffset())}o.updateOffset=function(){};function iC(c,h,g){var _=this._offset||0,N;if(!this.isValid())return c!=null?this:NaN;if(c!=null){if(typeof c=="string"){if(c=Xc(at,c),c===null)return this}else Math.abs(c)<16&&!g&&(c=c*60);return!this._isUTC&&h&&(N=Qc(this)),this._offset=c,this._isUTC=!0,N!=null&&this.add(N,"m"),_!==c&&(!h||this._changeInProgress?yf(this,io(c-_,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?_:Qc(this)}function aC(c,h){return c!=null?(typeof c!="string"&&(c=-c),this.utcOffset(c,h),this):-this.utcOffset()}function lC(c){return this.utcOffset(0,c)}function cC(c){return this._isUTC&&(this.utcOffset(0,c),this._isUTC=!1,c&&this.subtract(Qc(this),"m")),this}function dC(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var c=Xc(An,this._i);c!=null?this.utcOffset(c):this.utcOffset(0,!0)}return this}function uC(c){return this.isValid()?(c=c?Mt(c).utcOffset():0,(this.utcOffset()-c)%60===0):!1}function hC(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function fC(){if(!u(this._isDSTShifted))return this._isDSTShifted;var c={},h;return O(c,this),c=df(c),c._a?(h=c._isUTC?b(c._a):Mt(c._a),this._isDSTShifted=this.isValid()&&rC(c._a,h.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function pC(){return this.isValid()?!this._isUTC:!1}function mC(){return this.isValid()?this._isUTC:!1}function pf(){return this.isValid()?this._isUTC&&this._offset===0:!1}var gC=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,yC=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function io(c,h){var g=c,_=null,N,X,de;return Da(c)?g={ms:c._milliseconds,d:c._days,M:c._months}:f(c)||!isNaN(+c)?(g={},h?g[h]=+c:g.milliseconds=+c):(_=gC.exec(c))?(N=_[1]==="-"?-1:1,g={y:0,d:Xe(_[me])*N,h:Xe(_[Ce])*N,m:Xe(_[Ae])*N,s:Xe(_[Ke])*N,ms:Xe(Kc(_[st]*1e3))*N}):(_=yC.exec(c))?(N=_[1]==="-"?-1:1,g={y:Rr(_[2],N),M:Rr(_[3],N),w:Rr(_[4],N),d:Rr(_[5],N),h:Rr(_[6],N),m:Rr(_[7],N),s:Rr(_[8],N)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(de=vC(Mt(g.from),Mt(g.to)),g={},g.ms=de.milliseconds,g.M=de.months),X=new Pa(g),Da(c)&&l(c,"_locale")&&(X._locale=c._locale),Da(c)&&l(c,"_isValid")&&(X._isValid=c._isValid),X}io.fn=Pa.prototype,io.invalid=oC;function Rr(c,h){var g=c&&parseFloat(c.replace(",","."));return(isNaN(g)?0:g)*h}function mf(c,h){var g={};return g.months=h.month()-c.month()+(h.year()-c.year())*12,c.clone().add(g.months,"M").isAfter(h)&&--g.months,g.milliseconds=+h-+c.clone().add(g.months,"M"),g}function vC(c,h){var g;return c.isValid()&&h.isValid()?(h=Zc(h,c),c.isBefore(h)?g=mf(c,h):(g=mf(h,c),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function gf(c,h){return function(g,_){var N,X;return _!==null&&!isNaN(+_)&&(K(h,"moment()."+h+"(period, number) is deprecated. Please use moment()."+h+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),X=g,g=_,_=X),N=io(g,_),yf(this,N,c),this}}function yf(c,h,g,_){var N=h._milliseconds,X=Kc(h._days),de=Kc(h._months);c.isValid()&&(_=_??!0,de&&Qh(c,Hn(c,"Month")+de*g),X&&yo(c,"Date",Hn(c,"Date")+X*g),N&&c._d.setTime(c._d.valueOf()+N*g),_&&o.updateOffset(c,X||de))}var bC=gf(1,"add"),wC=gf(-1,"subtract");function vf(c){return typeof c=="string"||c instanceof String}function CC(c){return F(c)||p(c)||vf(c)||f(c)||_C(c)||SC(c)||c===null||c===void 0}function SC(c){var h=a(c)&&!d(c),g=!1,_=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],N,X,de=_.length;for(N=0;N<de;N+=1)X=_[N],g=g||l(c,X);return h&&g}function _C(c){var h=i(c),g=!1;return h&&(g=c.filter(function(_){return!f(_)&&vf(c)}).length===0),h&&g}function xC(c){var h=a(c)&&!d(c),g=!1,_=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],N,X;for(N=0;N<_.length;N+=1)X=_[N],g=g||l(c,X);return h&&g}function RC(c,h){var g=c.diff(h,"days",!0);return g<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"}function TC(c,h){arguments.length===1&&(arguments[0]?CC(arguments[0])?(c=arguments[0],h=void 0):xC(arguments[0])&&(h=arguments[0],c=void 0):(c=void 0,h=void 0));var g=c||Mt(),_=Zc(g,this).startOf("day"),N=o.calendarFormat(this,_)||"sameElse",X=h&&(G(h[N])?h[N].call(this,g):h[N]);return this.format(X||this.localeData().calendar(N,this,Mt(g)))}function kC(){return new I(this)}function EC(c,h){var g=F(c)?c:Mt(c);return this.isValid()&&g.isValid()?(h=Ne(h)||"millisecond",h==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(h).valueOf()):!1}function PC(c,h){var g=F(c)?c:Mt(c);return this.isValid()&&g.isValid()?(h=Ne(h)||"millisecond",h==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(h).valueOf()<g.valueOf()):!1}function DC(c,h,g,_){var N=F(c)?c:Mt(c),X=F(h)?h:Mt(h);return this.isValid()&&N.isValid()&&X.isValid()?(_=_||"()",(_[0]==="("?this.isAfter(N,g):!this.isBefore(N,g))&&(_[1]===")"?this.isBefore(X,g):!this.isAfter(X,g))):!1}function OC(c,h){var g=F(c)?c:Mt(c),_;return this.isValid()&&g.isValid()?(h=Ne(h)||"millisecond",h==="millisecond"?this.valueOf()===g.valueOf():(_=g.valueOf(),this.clone().startOf(h).valueOf()<=_&&_<=this.clone().endOf(h).valueOf())):!1}function MC(c,h){return this.isSame(c,h)||this.isAfter(c,h)}function IC(c,h){return this.isSame(c,h)||this.isBefore(c,h)}function NC(c,h,g){var _,N,X;if(!this.isValid())return NaN;if(_=Zc(c,this),!_.isValid())return NaN;switch(N=(_.utcOffset()-this.utcOffset())*6e4,h=Ne(h),h){case"year":X=Oa(this,_)/12;break;case"month":X=Oa(this,_);break;case"quarter":X=Oa(this,_)/3;break;case"second":X=(this-_)/1e3;break;case"minute":X=(this-_)/6e4;break;case"hour":X=(this-_)/36e5;break;case"day":X=(this-_-N)/864e5;break;case"week":X=(this-_-N)/6048e5;break;default:X=this-_}return g?X:kn(X)}function Oa(c,h){if(c.date()<h.date())return-Oa(h,c);var g=(h.year()-c.year())*12+(h.month()-c.month()),_=c.clone().add(g,"months"),N,X;return h-_<0?(N=c.clone().add(g-1,"months"),X=(h-_)/(_-N)):(N=c.clone().add(g+1,"months"),X=(h-_)/(N-_)),-(g+X)||0}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function AC(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function FC(c){if(!this.isValid())return null;var h=c!==!0,g=h?this.clone().utc():this;return g.year()<0||g.year()>9999?te(g,h?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):G(Date.prototype.toISOString)?h?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",te(g,"Z")):te(g,h?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function LC(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var c="moment",h="",g,_,N,X;return this.isLocal()||(c=this.utcOffset()===0?"moment.utc":"moment.parseZone",h="Z"),g="["+c+'("]',_=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",N="-MM-DD[T]HH:mm:ss.SSS",X=h+'[")]',this.format(g+_+N+X)}function $C(c){c||(c=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var h=te(this,c);return this.localeData().postformat(h)}function VC(c,h){return this.isValid()&&(F(c)&&c.isValid()||Mt(c).isValid())?io({to:this,from:c}).locale(this.locale()).humanize(!h):this.localeData().invalidDate()}function jC(c){return this.from(Mt(),c)}function BC(c,h){return this.isValid()&&(F(c)&&c.isValid()||Mt(c).isValid())?io({from:this,to:c}).locale(this.locale()).humanize(!h):this.localeData().invalidDate()}function WC(c){return this.to(Mt(),c)}function bf(c){var h;return c===void 0?this._locale._abbr:(h=Lo(c),h!=null&&(this._locale=h),this)}var wf=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(c){return c===void 0?this.localeData():this.locale(c)});function Cf(){return this._locale}var Ma=1e3,ns=60*Ma,Ia=60*ns,Sf=(365*400+97)*24*Ia;function os(c,h){return(c%h+h)%h}function _f(c,h,g){return c<100&&c>=0?new Date(c+400,h,g)-Sf:new Date(c,h,g).valueOf()}function xf(c,h,g){return c<100&&c>=0?Date.UTC(c+400,h,g)-Sf:Date.UTC(c,h,g)}function HC(c){var h,g;if(c=Ne(c),c===void 0||c==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?xf:_f,c){case"year":h=g(this.year(),0,1);break;case"quarter":h=g(this.year(),this.month()-this.month()%3,1);break;case"month":h=g(this.year(),this.month(),1);break;case"week":h=g(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":h=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":h=g(this.year(),this.month(),this.date());break;case"hour":h=this._d.valueOf(),h-=os(h+(this._isUTC?0:this.utcOffset()*ns),Ia);break;case"minute":h=this._d.valueOf(),h-=os(h,ns);break;case"second":h=this._d.valueOf(),h-=os(h,Ma);break}return this._d.setTime(h),o.updateOffset(this,!0),this}function zC(c){var h,g;if(c=Ne(c),c===void 0||c==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?xf:_f,c){case"year":h=g(this.year()+1,0,1)-1;break;case"quarter":h=g(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":h=g(this.year(),this.month()+1,1)-1;break;case"week":h=g(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":h=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":h=g(this.year(),this.month(),this.date()+1)-1;break;case"hour":h=this._d.valueOf(),h+=Ia-os(h+(this._isUTC?0:this.utcOffset()*ns),Ia)-1;break;case"minute":h=this._d.valueOf(),h+=ns-os(h,ns)-1;break;case"second":h=this._d.valueOf(),h+=Ma-os(h,Ma)-1;break}return this._d.setTime(h),o.updateOffset(this,!0),this}function YC(){return this._d.valueOf()-(this._offset||0)*6e4}function UC(){return Math.floor(this.valueOf()/1e3)}function qC(){return new Date(this.valueOf())}function GC(){var c=this;return[c.year(),c.month(),c.date(),c.hour(),c.minute(),c.second(),c.millisecond()]}function KC(){var c=this;return{years:c.year(),months:c.month(),date:c.date(),hours:c.hours(),minutes:c.minutes(),seconds:c.seconds(),milliseconds:c.milliseconds()}}function XC(){return this.isValid()?this.toISOString():null}function ZC(){return k(this)}function QC(){return w({},v(this))}function JC(){return v(this).overflow}function eS(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),_e("N",Jc),_e("NN",Jc),_e("NNN",Jc),_e("NNNN",uS),_e("NNNNN",hS),yt(["N","NN","NNN","NNNN","NNNNN"],function(c,h,g,_){var N=g._locale.erasParse(c,_,g._strict);N?v(g).era=N:v(g).invalidEra=c}),_e("y",ht),_e("yy",ht),_e("yyy",ht),_e("yyyy",ht),_e("yo",fS),yt(["y","yy","yyy","yyyy"],un),yt(["yo"],function(c,h,g,_){var N;g._locale._eraYearOrdinalRegex&&(N=c.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?h[un]=g._locale.eraYearOrdinalParse(c,N):h[un]=parseInt(c,10)});function tS(c,h){var g,_,N,X=this._eras||Lo("en")._eras;for(g=0,_=X.length;g<_;++g){switch(typeof X[g].since){case"string":N=o(X[g].since).startOf("day"),X[g].since=N.valueOf();break}switch(typeof X[g].until){case"undefined":X[g].until=1/0;break;case"string":N=o(X[g].until).startOf("day").valueOf(),X[g].until=N.valueOf();break}}return X}function nS(c,h,g){var _,N,X=this.eras(),de,Ee,ze;for(c=c.toUpperCase(),_=0,N=X.length;_<N;++_)if(de=X[_].name.toUpperCase(),Ee=X[_].abbr.toUpperCase(),ze=X[_].narrow.toUpperCase(),g)switch(h){case"N":case"NN":case"NNN":if(Ee===c)return X[_];break;case"NNNN":if(de===c)return X[_];break;case"NNNNN":if(ze===c)return X[_];break}else if([de,Ee,ze].indexOf(c)>=0)return X[_]}function oS(c,h){var g=c.since<=c.until?1:-1;return h===void 0?o(c.since).year():o(c.since).year()+(h-c.offset)*g}function rS(){var c,h,g,_=this.localeData().eras();for(c=0,h=_.length;c<h;++c)if(g=this.clone().startOf("day").valueOf(),_[c].since<=g&&g<=_[c].until||_[c].until<=g&&g<=_[c].since)return _[c].name;return""}function sS(){var c,h,g,_=this.localeData().eras();for(c=0,h=_.length;c<h;++c)if(g=this.clone().startOf("day").valueOf(),_[c].since<=g&&g<=_[c].until||_[c].until<=g&&g<=_[c].since)return _[c].narrow;return""}function iS(){var c,h,g,_=this.localeData().eras();for(c=0,h=_.length;c<h;++c)if(g=this.clone().startOf("day").valueOf(),_[c].since<=g&&g<=_[c].until||_[c].until<=g&&g<=_[c].since)return _[c].abbr;return""}function aS(){var c,h,g,_,N=this.localeData().eras();for(c=0,h=N.length;c<h;++c)if(g=N[c].since<=N[c].until?1:-1,_=this.clone().startOf("day").valueOf(),N[c].since<=_&&_<=N[c].until||N[c].until<=_&&_<=N[c].since)return(this.year()-o(N[c].since).year())*g+N[c].offset;return this.year()}function lS(c){return l(this,"_erasNameRegex")||ed.call(this),c?this._erasNameRegex:this._erasRegex}function cS(c){return l(this,"_erasAbbrRegex")||ed.call(this),c?this._erasAbbrRegex:this._erasRegex}function dS(c){return l(this,"_erasNarrowRegex")||ed.call(this),c?this._erasNarrowRegex:this._erasRegex}function Jc(c,h){return h.erasAbbrRegex(c)}function uS(c,h){return h.erasNameRegex(c)}function hS(c,h){return h.erasNarrowRegex(c)}function fS(c,h){return h._eraYearOrdinalRegex||ht}function ed(){var c=[],h=[],g=[],_=[],N,X,de,Ee,ze,it=this.eras();for(N=0,X=it.length;N<X;++N)de=Wn(it[N].name),Ee=Wn(it[N].abbr),ze=Wn(it[N].narrow),h.push(de),c.push(Ee),g.push(ze),_.push(de),_.push(Ee),_.push(ze);this._erasRegex=new RegExp("^("+_.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+h.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+g.join("|")+")","i")}j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Na(c,h){j(0,[c,c.length],0,h)}Na("gggg","weekYear"),Na("ggggg","weekYear"),Na("GGGG","isoWeekYear"),Na("GGGGG","isoWeekYear"),_e("G",nn),_e("g",nn),_e("GG",Ue,rt),_e("gg",Ue,rt),_e("GGGG",Oe,Ut),_e("gggg",Oe,Ut),_e("GGGGG",We,Lt),_e("ggggg",We,Lt),xr(["gggg","ggggg","GGGG","GGGGG"],function(c,h,g,_){h[_.substr(0,2)]=Xe(c)}),xr(["gg","GG"],function(c,h,g,_){h[_]=o.parseTwoDigitYear(c)});function pS(c){return Rf.call(this,c,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function mS(c){return Rf.call(this,c,this.isoWeek(),this.isoWeekday(),1,4)}function gS(){return Fo(this.year(),1,4)}function yS(){return Fo(this.isoWeekYear(),1,4)}function vS(){var c=this.localeData()._week;return Fo(this.year(),c.dow,c.doy)}function bS(){var c=this.localeData()._week;return Fo(this.weekYear(),c.dow,c.doy)}function Rf(c,h,g,_,N){var X;return c==null?Qs(this,_,N).year:(X=Fo(c,_,N),h>X&&(h=X),wS.call(this,c,h,g,_,N))}function wS(c,h,g,_,N){var X=tf(c,h,g,_,N),de=Zs(X.year,0,X.dayOfYear);return this.year(de.getUTCFullYear()),this.month(de.getUTCMonth()),this.date(de.getUTCDate()),this}j("Q",0,"Qo","quarter"),_e("Q",Yt),yt("Q",function(c,h){h[U]=(Xe(c)-1)*3});function CS(c){return c==null?Math.ceil((this.month()+1)/3):this.month((c-1)*3+this.month()%3)}j("D",["DD",2],"Do","date"),_e("D",Ue,Qt),_e("DD",Ue,rt),_e("Do",function(c,h){return c?h._dayOfMonthOrdinalParse||h._ordinalParse:h._dayOfMonthOrdinalParseLenient}),yt(["D","DD"],me),yt("Do",function(c,h){h[me]=Xe(c.match(Ue)[0])});var Tf=sn("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),_e("DDD",dn),_e("DDDD",Ot),yt(["DDD","DDDD"],function(c,h,g){g._dayOfYear=Xe(c)});function SS(c){var h=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return c==null?h:this.add(c-h,"d")}j("m",["mm",2],0,"minute"),_e("m",Ue,cr),_e("mm",Ue,rt),yt(["m","mm"],Ae);var _S=sn("Minutes",!1);j("s",["ss",2],0,"second"),_e("s",Ue,cr),_e("ss",Ue,rt),yt(["s","ss"],Ke);var xS=sn("Seconds",!1);j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return this.millisecond()*10}),j(0,["SSSSS",5],0,function(){return this.millisecond()*100}),j(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),j(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),j(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),j(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),_e("S",dn,Yt),_e("SS",dn,rt),_e("SSS",dn,Ot);var ur,kf;for(ur="SSSS";ur.length<=9;ur+="S")_e(ur,ht);function RS(c,h){h[st]=Xe(("0."+c)*1e3)}for(ur="S";ur.length<=9;ur+="S")yt(ur,RS);kf=sn("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");function TS(){return this._isUTC?"UTC":""}function kS(){return this._isUTC?"Coordinated Universal Time":""}var ye=I.prototype;ye.add=bC,ye.calendar=TC,ye.clone=kC,ye.diff=NC,ye.endOf=zC,ye.format=$C,ye.from=VC,ye.fromNow=jC,ye.to=BC,ye.toNow=WC,ye.get=yn,ye.invalidAt=JC,ye.isAfter=EC,ye.isBefore=PC,ye.isBetween=DC,ye.isSame=OC,ye.isSameOrAfter=MC,ye.isSameOrBefore=IC,ye.isValid=ZC,ye.lang=wf,ye.locale=bf,ye.localeData=Cf,ye.max=Zw,ye.min=Xw,ye.parsingFlags=QC,ye.set=Xs,ye.startOf=HC,ye.subtract=wC,ye.toArray=GC,ye.toObject=KC,ye.toDate=qC,ye.toISOString=FC,ye.inspect=LC,typeof Symbol<"u"&&Symbol.for!=null&&(ye[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ye.toJSON=XC,ye.toString=AC,ye.unix=UC,ye.valueOf=YC,ye.creationData=eS,ye.eraName=rS,ye.eraNarrow=sS,ye.eraAbbr=iS,ye.eraYear=aS,ye.year=$t,ye.isLeapYear=qt,ye.weekYear=pS,ye.isoWeekYear=mS,ye.quarter=ye.quarters=CS,ye.month=Jh,ye.daysInMonth=qb,ye.week=ye.weeks=tw,ye.isoWeek=ye.isoWeeks=nw,ye.weeksInYear=vS,ye.weeksInWeekYear=bS,ye.isoWeeksInYear=gS,ye.isoWeeksInISOWeekYear=yS,ye.date=Tf,ye.day=ye.days=mw,ye.weekday=gw,ye.isoWeekday=yw,ye.dayOfYear=SS,ye.hour=ye.hours=xw,ye.minute=ye.minutes=_S,ye.second=ye.seconds=xS,ye.millisecond=ye.milliseconds=kf,ye.utcOffset=iC,ye.utc=lC,ye.local=cC,ye.parseZone=dC,ye.hasAlignedHourOffset=uC,ye.isDST=hC,ye.isLocal=pC,ye.isUtcOffset=mC,ye.isUtc=pf,ye.isUTC=pf,ye.zoneAbbr=TS,ye.zoneName=kS,ye.dates=R("dates accessor is deprecated. Use date instead.",Tf),ye.months=R("months accessor is deprecated. Use month instead",Jh),ye.years=R("years accessor is deprecated. Use year instead",$t),ye.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",aC),ye.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",fC);function ES(c){return Mt(c*1e3)}function PS(){return Mt.apply(null,arguments).parseZone()}function Ef(c){return c}var ft=H.prototype;ft.calendar=M,ft.longDateFormat=he,ft.invalidDate=re,ft.ordinal=pe,ft.preparse=Ef,ft.postformat=Ef,ft.relativeTime=ge,ft.pastFuture=Re,ft.set=q,ft.eras=tS,ft.erasParse=nS,ft.erasConvertYear=oS,ft.erasAbbrRegex=cS,ft.erasNameRegex=lS,ft.erasNarrowRegex=dS,ft.months=Hb,ft.monthsShort=zb,ft.monthsParse=Ub,ft.monthsRegex=Kb,ft.monthsShortRegex=Gb,ft.week=Zb,ft.firstDayOfYear=ew,ft.firstDayOfWeek=Jb,ft.weekdays=dw,ft.weekdaysMin=hw,ft.weekdaysShort=uw,ft.weekdaysParse=pw,ft.weekdaysRegex=vw,ft.weekdaysShortRegex=bw,ft.weekdaysMinRegex=ww,ft.isPM=Sw,ft.meridiem=Rw;function Aa(c,h,g,_){var N=Lo(),X=b().set(_,h);return N[g](X,c)}function Pf(c,h,g){if(f(c)&&(h=c,c=void 0),c=c||"",h!=null)return Aa(c,h,g,"month");var _,N=[];for(_=0;_<12;_++)N[_]=Aa(c,_,g,"month");return N}function td(c,h,g,_){typeof c=="boolean"?(f(h)&&(g=h,h=void 0),h=h||""):(h=c,g=h,c=!1,f(h)&&(g=h,h=void 0),h=h||"");var N=Lo(),X=c?N._week.dow:0,de,Ee=[];if(g!=null)return Aa(h,(g+X)%7,_,"day");for(de=0;de<7;de++)Ee[de]=Aa(h,(de+X)%7,_,"day");return Ee}function DS(c,h){return Pf(c,h,"months")}function OS(c,h){return Pf(c,h,"monthsShort")}function MS(c,h,g){return td(c,h,g,"weekdays")}function IS(c,h,g){return td(c,h,g,"weekdaysShort")}function NS(c,h,g){return td(c,h,g,"weekdaysMin")}dr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(c){var h=c%10,g=Xe(c%100/10)===1?"th":h===1?"st":h===2?"nd":h===3?"rd":"th";return c+g}}),o.lang=R("moment.lang is deprecated. Use moment.locale instead.",dr),o.langData=R("moment.langData is deprecated. Use moment.localeData instead.",Lo);var $o=Math.abs;function AS(){var c=this._data;return this._milliseconds=$o(this._milliseconds),this._days=$o(this._days),this._months=$o(this._months),c.milliseconds=$o(c.milliseconds),c.seconds=$o(c.seconds),c.minutes=$o(c.minutes),c.hours=$o(c.hours),c.months=$o(c.months),c.years=$o(c.years),this}function Df(c,h,g,_){var N=io(h,g);return c._milliseconds+=_*N._milliseconds,c._days+=_*N._days,c._months+=_*N._months,c._bubble()}function FS(c,h){return Df(this,c,h,1)}function LS(c,h){return Df(this,c,h,-1)}function Of(c){return c<0?Math.floor(c):Math.ceil(c)}function $S(){var c=this._milliseconds,h=this._days,g=this._months,_=this._data,N,X,de,Ee,ze;return c>=0&&h>=0&&g>=0||c<=0&&h<=0&&g<=0||(c+=Of(nd(g)+h)*864e5,h=0,g=0),_.milliseconds=c%1e3,N=kn(c/1e3),_.seconds=N%60,X=kn(N/60),_.minutes=X%60,de=kn(X/60),_.hours=de%24,h+=kn(de/24),ze=kn(Mf(h)),g+=ze,h-=Of(nd(ze)),Ee=kn(g/12),g%=12,_.days=h,_.months=g,_.years=Ee,this}function Mf(c){return c*4800/146097}function nd(c){return c*146097/4800}function VS(c){if(!this.isValid())return NaN;var h,g,_=this._milliseconds;if(c=Ne(c),c==="month"||c==="quarter"||c==="year")switch(h=this._days+_/864e5,g=this._months+Mf(h),c){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(h=this._days+Math.round(nd(this._months)),c){case"week":return h/7+_/6048e5;case"day":return h+_/864e5;case"hour":return h*24+_/36e5;case"minute":return h*1440+_/6e4;case"second":return h*86400+_/1e3;case"millisecond":return Math.floor(h*864e5)+_;default:throw new Error("Unknown unit "+c)}}function Vo(c){return function(){return this.as(c)}}var If=Vo("ms"),jS=Vo("s"),BS=Vo("m"),WS=Vo("h"),HS=Vo("d"),zS=Vo("w"),YS=Vo("M"),US=Vo("Q"),qS=Vo("y"),GS=If;function KS(){return io(this)}function XS(c){return c=Ne(c),this.isValid()?this[c+"s"]():NaN}function Tr(c){return function(){return this.isValid()?this._data[c]:NaN}}var ZS=Tr("milliseconds"),QS=Tr("seconds"),JS=Tr("minutes"),e0=Tr("hours"),t0=Tr("days"),n0=Tr("months"),o0=Tr("years");function r0(){return kn(this.days()/7)}var jo=Math.round,rs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function s0(c,h,g,_,N){return N.relativeTime(h||1,!!g,c,_)}function i0(c,h,g,_){var N=io(c).abs(),X=jo(N.as("s")),de=jo(N.as("m")),Ee=jo(N.as("h")),ze=jo(N.as("d")),it=jo(N.as("M")),xn=jo(N.as("w")),Bo=jo(N.as("y")),hr=X<=g.ss&&["s",X]||X<g.s&&["ss",X]||de<=1&&["m"]||de<g.m&&["mm",de]||Ee<=1&&["h"]||Ee<g.h&&["hh",Ee]||ze<=1&&["d"]||ze<g.d&&["dd",ze];return g.w!=null&&(hr=hr||xn<=1&&["w"]||xn<g.w&&["ww",xn]),hr=hr||it<=1&&["M"]||it<g.M&&["MM",it]||Bo<=1&&["y"]||["yy",Bo],hr[2]=h,hr[3]=+c>0,hr[4]=_,s0.apply(null,hr)}function a0(c){return c===void 0?jo:typeof c=="function"?(jo=c,!0):!1}function l0(c,h){return rs[c]===void 0?!1:h===void 0?rs[c]:(rs[c]=h,c==="s"&&(rs.ss=h-1),!0)}function c0(c,h){if(!this.isValid())return this.localeData().invalidDate();var g=!1,_=rs,N,X;return typeof c=="object"&&(h=c,c=!1),typeof c=="boolean"&&(g=c),typeof h=="object"&&(_=Object.assign({},rs,h),h.s!=null&&h.ss==null&&(_.ss=h.s-1)),N=this.localeData(),X=i0(this,!g,_,N),g&&(X=N.pastFuture(+this,X)),N.postformat(X)}var od=Math.abs;function ss(c){return(c>0)-(c<0)||+c}function Fa(){if(!this.isValid())return this.localeData().invalidDate();var c=od(this._milliseconds)/1e3,h=od(this._days),g=od(this._months),_,N,X,de,Ee=this.asSeconds(),ze,it,xn,Bo;return Ee?(_=kn(c/60),N=kn(_/60),c%=60,_%=60,X=kn(g/12),g%=12,de=c?c.toFixed(3).replace(/\.?0+$/,""):"",ze=Ee<0?"-":"",it=ss(this._months)!==ss(Ee)?"-":"",xn=ss(this._days)!==ss(Ee)?"-":"",Bo=ss(this._milliseconds)!==ss(Ee)?"-":"",ze+"P"+(X?it+X+"Y":"")+(g?it+g+"M":"")+(h?xn+h+"D":"")+(N||_||c?"T":"")+(N?Bo+N+"H":"")+(_?Bo+_+"M":"")+(c?Bo+de+"S":"")):"P0D"}var lt=Pa.prototype;lt.isValid=nC,lt.abs=AS,lt.add=FS,lt.subtract=LS,lt.as=VS,lt.asMilliseconds=If,lt.asSeconds=jS,lt.asMinutes=BS,lt.asHours=WS,lt.asDays=HS,lt.asWeeks=zS,lt.asMonths=YS,lt.asQuarters=US,lt.asYears=qS,lt.valueOf=GS,lt._bubble=$S,lt.clone=KS,lt.get=XS,lt.milliseconds=ZS,lt.seconds=QS,lt.minutes=JS,lt.hours=e0,lt.days=t0,lt.weeks=r0,lt.months=n0,lt.years=o0,lt.humanize=c0,lt.toISOString=Fa,lt.toString=Fa,lt.toJSON=Fa,lt.locale=bf,lt.localeData=Cf,lt.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fa),lt.lang=wf,j("X",0,0,"unix"),j("x",0,0,"valueOf"),_e("x",nn),_e("X",Zt),yt("X",function(c,h,g){g._d=new Date(parseFloat(c)*1e3)}),yt("x",function(c,h,g){g._d=new Date(Xe(c))});//! moment.js
301
- return o.version="2.30.1",r(Mt),o.fn=ye,o.min=Qw,o.max=Jw,o.now=eC,o.utc=b,o.unix=ES,o.months=DS,o.isDate=p,o.locale=dr,o.invalid=x,o.duration=io,o.isMoment=F,o.weekdays=MS,o.parseZone=PS,o.localeData=Lo,o.isDuration=Da,o.monthsShort=OS,o.weekdaysMin=NS,o.defineLocale=zc,o.updateLocale=Pw,o.locales=Dw,o.weekdaysShort=IS,o.normalizeUnits=Ne,o.relativeTimeRounding=a0,o.relativeTimeThreshold=l0,o.calendarFormat=RC,o.prototype=ye,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o})}(gl)),gl.exports}JA();const eF=`
300
+ `+new Error().stack),g=!1}return h.apply(this,arguments)},h)}var $={};function K(c,h){o.deprecationHandler!=null&&o.deprecationHandler(c,h),$[c]||(z(h),$[c]=!0)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null;function G(c){return typeof Function<"u"&&c instanceof Function||Object.prototype.toString.call(c)==="[object Function]"}function q(c){var h,g;for(g in c)l(c,g)&&(h=c[g],G(h)?this[g]=h:this["_"+g]=h);this._config=c,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Y(c,h){var g=w({},c),_;for(_ in h)l(h,_)&&(a(c[_])&&a(h[_])?(g[_]={},w(g[_],c[_]),w(g[_],h[_])):h[_]!=null?g[_]=h[_]:delete g[_]);for(_ in c)l(c,_)&&!l(h,_)&&a(c[_])&&(g[_]=w({},g[_]));return g}function H(c){c!=null&&this.set(c)}var ae;Object.keys?ae=Object.keys:ae=function(c){var h,g=[];for(h in c)l(c,h)&&g.push(h);return g};var A={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M(c,h,g){var _=this._calendar[c]||this._calendar.sameElse;return G(_)?_.call(h,g):_}function L(c,h,g){var _=""+Math.abs(c),N=h-_.length,X=c>=0;return(X?g?"+":"":"-")+Math.pow(10,Math.max(0,N)).toString().substr(1)+_}var B=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,oe={},se={};function j(c,h,g,_){var N=_;typeof _=="string"&&(N=function(){return this[_]()}),c&&(se[c]=N),h&&(se[h[0]]=function(){return L(N.apply(this,arguments),h[1],h[2])}),g&&(se[g]=function(){return this.localeData().ordinal(N.apply(this,arguments),c)})}function ee(c){return c.match(/\[[\s\S]/)?c.replace(/^\[|\]$/g,""):c.replace(/\\/g,"")}function J(c){var h=c.match(B),g,_;for(g=0,_=h.length;g<_;g++)se[h[g]]?h[g]=se[h[g]]:h[g]=ee(h[g]);return function(N){var X="",de;for(de=0;de<_;de++)X+=G(h[de])?h[de].call(N,c):h[de];return X}}function te(c,h){return c.isValid()?(h=ce(h,c.localeData()),oe[h]=oe[h]||J(h),oe[h](c)):c.localeData().invalidDate()}function ce(c,h){var g=5;function _(N){return h.longDateFormat(N)||N}for(ne.lastIndex=0;g>=0&&ne.test(c);)c=c.replace(ne,_),ne.lastIndex=0,g-=1;return c}var le={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function he(c){var h=this._longDateFormat[c],g=this._longDateFormat[c.toUpperCase()];return h||!g?h:(this._longDateFormat[c]=g.match(B).map(function(_){return _==="MMMM"||_==="MM"||_==="DD"||_==="dddd"?_.slice(1):_}).join(""),this._longDateFormat[c])}var W="Invalid date";function re(){return this._invalidDate}var Z="%d",fe=/\d{1,2}/;function pe(c){return this._ordinal.replace("%d",c)}var be={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ge(c,h,g,_){var N=this._relativeTime[g];return G(N)?N(c,h,g,_):N.replace(/%d/i,c)}function Re(c,h){var g=this._relativeTime[c>0?"future":"past"];return G(g)?g(h):g.replace(/%s/i,h)}var Ve={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ne(c){return typeof c=="string"?Ve[c]||Ve[c.toLowerCase()]:void 0}function Je(c){var h={},g,_;for(_ in c)l(c,_)&&(g=Ne(_),g&&(h[g]=c[_]));return h}var ke={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ut(c){var h=[],g;for(g in c)l(c,g)&&h.push({unit:g,priority:ke[g]});return h.sort(function(_,N){return _.priority-N.priority}),h}var Yt=/\d/,rt=/\d\d/,Ot=/\d{3}/,Ut=/\d{4}/,Lt=/[+-]?\d{6}/,Ue=/\d\d?/,Be=/\d\d\d\d?/,rn=/\d\d\d\d\d\d?/,dn=/\d{1,3}/,Oe=/\d{1,4}/,We=/[+-]?\d{1,6}/,ht=/\d+/,nn=/[+-]?\d+/,An=/Z|[+-]\d\d:?\d\d/gi,at=/Z|[+-]\d\d(?::?\d\d)?/gi,Zt=/[+-]?\d+(\.\d{1,3})?/,pn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Qt=/^[1-9]\d?/,cr=/^([1-9]\d|\d)/,He;He={};function _e(c,h,g){He[c]=G(h)?h:function(_,N){return _&&g?g:h}}function Lc(c,h){return l(He,c)?He[c](h._strict,h._locale):new RegExp(Ra(c))}function Ra(c){return Wn(c.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(h,g,_,N,X){return g||_||N||X}))}function Wn(c){return c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function kn(c){return c<0?Math.ceil(c)||0:Math.floor(c)}function Xe(c){var h=+c,g=0;return h!==0&&isFinite(h)&&(g=kn(h)),g}var Jr={};function yt(c,h){var g,_=h,N;for(typeof c=="string"&&(c=[c]),f(h)&&(_=function(X,de){de[h]=Xe(X)}),N=c.length,g=0;g<N;g++)Jr[c[g]]=_}function xr(c,h){yt(c,function(g,_,N,X){N._w=N._w||{},h(g,N._w,N,X)})}function $c(c,h,g){h!=null&&l(Jr,c)&&Jr[c](h,g._a,g,c)}function es(c){return c%4===0&&c%100!==0||c%400===0}var un=0,U=1,me=2,Ce=3,Ae=4,Ke=5,st=6,et=7,Ze=8;j("Y",0,0,function(){var c=this.year();return c<=9999?L(c,4):"+"+c}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),_e("Y",nn),_e("YY",Ue,rt),_e("YYYY",Oe,Ut),_e("YYYYY",We,Lt),_e("YYYYYY",We,Lt),yt(["YYYYY","YYYYYY"],un),yt("YYYY",function(c,h){h[un]=c.length===2?o.parseTwoDigitYear(c):Xe(c)}),yt("YY",function(c,h){h[un]=o.parseTwoDigitYear(c)}),yt("Y",function(c,h){h[un]=parseInt(c,10)});function Jt(c){return es(c)?366:365}o.parseTwoDigitYear=function(c){return Xe(c)+(Xe(c)>68?1900:2e3)};var $t=sn("FullYear",!0);function qt(){return es(this.year())}function sn(c,h){return function(g){return g!=null?(yo(this,c,g),o.updateOffset(this,h),this):Hn(this,c)}}function Hn(c,h){if(!c.isValid())return NaN;var g=c._d,_=c._isUTC;switch(h){case"Milliseconds":return _?g.getUTCMilliseconds():g.getMilliseconds();case"Seconds":return _?g.getUTCSeconds():g.getSeconds();case"Minutes":return _?g.getUTCMinutes():g.getMinutes();case"Hours":return _?g.getUTCHours():g.getHours();case"Date":return _?g.getUTCDate():g.getDate();case"Day":return _?g.getUTCDay():g.getDay();case"Month":return _?g.getUTCMonth():g.getMonth();case"FullYear":return _?g.getUTCFullYear():g.getFullYear();default:return NaN}}function yo(c,h,g){var _,N,X,de,Ee;if(!(!c.isValid()||isNaN(g))){switch(_=c._d,N=c._isUTC,h){case"Milliseconds":return void(N?_.setUTCMilliseconds(g):_.setMilliseconds(g));case"Seconds":return void(N?_.setUTCSeconds(g):_.setSeconds(g));case"Minutes":return void(N?_.setUTCMinutes(g):_.setMinutes(g));case"Hours":return void(N?_.setUTCHours(g):_.setHours(g));case"Date":return void(N?_.setUTCDate(g):_.setDate(g));case"FullYear":break;default:return}X=g,de=c.month(),Ee=c.date(),Ee=Ee===29&&de===1&&!es(X)?28:Ee,N?_.setUTCFullYear(X,de,Ee):_.setFullYear(X,de,Ee)}}function yn(c){return c=Ne(c),G(this[c])?this[c]():this}function Xs(c,h){if(typeof c=="object"){c=Je(c);var g=ut(c),_,N=g.length;for(_=0;_<N;_++)this[g[_].unit](c[g[_].unit])}else if(c=Ne(c),G(this[c]))return this[c](h);return this}function Vc(c,h){return(c%h+h)%h}var Wt;Array.prototype.indexOf?Wt=Array.prototype.indexOf:Wt=function(c){var h;for(h=0;h<this.length;++h)if(this[h]===c)return h;return-1};function jc(c,h){if(isNaN(c)||isNaN(h))return NaN;var g=Vc(h,12);return c+=(h-g)/12,g===1?es(c)?29:28:31-g%7%2}j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(c){return this.localeData().monthsShort(this,c)}),j("MMMM",0,0,function(c){return this.localeData().months(this,c)}),_e("M",Ue,Qt),_e("MM",Ue,rt),_e("MMM",function(c,h){return h.monthsShortRegex(c)}),_e("MMMM",function(c,h){return h.monthsRegex(c)}),yt(["M","MM"],function(c,h){h[U]=Xe(c)-1}),yt(["MMM","MMMM"],function(c,h,g,_){var N=g._locale.monthsParse(c,_,g._strict);N!=null?h[U]=N:v(g).invalidMonth=c});var jb="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Xh="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Zh=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Bb=pn,Wb=pn;function Hb(c,h){return c?i(this._months)?this._months[c.month()]:this._months[(this._months.isFormat||Zh).test(h)?"format":"standalone"][c.month()]:i(this._months)?this._months:this._months.standalone}function zb(c,h){return c?i(this._monthsShort)?this._monthsShort[c.month()]:this._monthsShort[Zh.test(h)?"format":"standalone"][c.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Yb(c,h,g){var _,N,X,de=c.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],_=0;_<12;++_)X=b([2e3,_]),this._shortMonthsParse[_]=this.monthsShort(X,"").toLocaleLowerCase(),this._longMonthsParse[_]=this.months(X,"").toLocaleLowerCase();return g?h==="MMM"?(N=Wt.call(this._shortMonthsParse,de),N!==-1?N:null):(N=Wt.call(this._longMonthsParse,de),N!==-1?N:null):h==="MMM"?(N=Wt.call(this._shortMonthsParse,de),N!==-1?N:(N=Wt.call(this._longMonthsParse,de),N!==-1?N:null)):(N=Wt.call(this._longMonthsParse,de),N!==-1?N:(N=Wt.call(this._shortMonthsParse,de),N!==-1?N:null))}function Ub(c,h,g){var _,N,X;if(this._monthsParseExact)return Yb.call(this,c,h,g);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),_=0;_<12;_++){if(N=b([2e3,_]),g&&!this._longMonthsParse[_]&&(this._longMonthsParse[_]=new RegExp("^"+this.months(N,"").replace(".","")+"$","i"),this._shortMonthsParse[_]=new RegExp("^"+this.monthsShort(N,"").replace(".","")+"$","i")),!g&&!this._monthsParse[_]&&(X="^"+this.months(N,"")+"|^"+this.monthsShort(N,""),this._monthsParse[_]=new RegExp(X.replace(".",""),"i")),g&&h==="MMMM"&&this._longMonthsParse[_].test(c))return _;if(g&&h==="MMM"&&this._shortMonthsParse[_].test(c))return _;if(!g&&this._monthsParse[_].test(c))return _}}function Qh(c,h){if(!c.isValid())return c;if(typeof h=="string"){if(/^\d+$/.test(h))h=Xe(h);else if(h=c.localeData().monthsParse(h),!f(h))return c}var g=h,_=c.date();return _=_<29?_:Math.min(_,jc(c.year(),g)),c._isUTC?c._d.setUTCMonth(g,_):c._d.setMonth(g,_),c}function Jh(c){return c!=null?(Qh(this,c),o.updateOffset(this,!0),this):Hn(this,"Month")}function qb(){return jc(this.year(),this.month())}function Gb(c){return this._monthsParseExact?(l(this,"_monthsRegex")||ef.call(this),c?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=Bb),this._monthsShortStrictRegex&&c?this._monthsShortStrictRegex:this._monthsShortRegex)}function Kb(c){return this._monthsParseExact?(l(this,"_monthsRegex")||ef.call(this),c?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Wb),this._monthsStrictRegex&&c?this._monthsStrictRegex:this._monthsRegex)}function ef(){function c(ze,it){return it.length-ze.length}var h=[],g=[],_=[],N,X,de,Ee;for(N=0;N<12;N++)X=b([2e3,N]),de=Wn(this.monthsShort(X,"")),Ee=Wn(this.months(X,"")),h.push(de),g.push(Ee),_.push(Ee),_.push(de);h.sort(c),g.sort(c),_.sort(c),this._monthsRegex=new RegExp("^("+_.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+h.join("|")+")","i")}function Xb(c,h,g,_,N,X,de){var Ee;return c<100&&c>=0?(Ee=new Date(c+400,h,g,_,N,X,de),isFinite(Ee.getFullYear())&&Ee.setFullYear(c)):Ee=new Date(c,h,g,_,N,X,de),Ee}function Zs(c){var h,g;return c<100&&c>=0?(g=Array.prototype.slice.call(arguments),g[0]=c+400,h=new Date(Date.UTC.apply(null,g)),isFinite(h.getUTCFullYear())&&h.setUTCFullYear(c)):h=new Date(Date.UTC.apply(null,arguments)),h}function Ta(c,h,g){var _=7+h-g,N=(7+Zs(c,0,_).getUTCDay()-h)%7;return-N+_-1}function tf(c,h,g,_,N){var X=(7+g-_)%7,de=Ta(c,_,N),Ee=1+7*(h-1)+X+de,ze,it;return Ee<=0?(ze=c-1,it=Jt(ze)+Ee):Ee>Jt(c)?(ze=c+1,it=Ee-Jt(c)):(ze=c,it=Ee),{year:ze,dayOfYear:it}}function Qs(c,h,g){var _=Ta(c.year(),h,g),N=Math.floor((c.dayOfYear()-_-1)/7)+1,X,de;return N<1?(de=c.year()-1,X=N+Fo(de,h,g)):N>Fo(c.year(),h,g)?(X=N-Fo(c.year(),h,g),de=c.year()+1):(de=c.year(),X=N),{week:X,year:de}}function Fo(c,h,g){var _=Ta(c,h,g),N=Ta(c+1,h,g);return(Jt(c)-_+N)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),_e("w",Ue,Qt),_e("ww",Ue,rt),_e("W",Ue,Qt),_e("WW",Ue,rt),xr(["w","ww","W","WW"],function(c,h,g,_){h[_.substr(0,1)]=Xe(c)});function Zb(c){return Qs(c,this._week.dow,this._week.doy).week}var Qb={dow:0,doy:6};function Jb(){return this._week.dow}function ew(){return this._week.doy}function tw(c){var h=this.localeData().week(this);return c==null?h:this.add((c-h)*7,"d")}function nw(c){var h=Qs(this,1,4).week;return c==null?h:this.add((c-h)*7,"d")}j("d",0,"do","day"),j("dd",0,0,function(c){return this.localeData().weekdaysMin(this,c)}),j("ddd",0,0,function(c){return this.localeData().weekdaysShort(this,c)}),j("dddd",0,0,function(c){return this.localeData().weekdays(this,c)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),_e("d",Ue),_e("e",Ue),_e("E",Ue),_e("dd",function(c,h){return h.weekdaysMinRegex(c)}),_e("ddd",function(c,h){return h.weekdaysShortRegex(c)}),_e("dddd",function(c,h){return h.weekdaysRegex(c)}),xr(["dd","ddd","dddd"],function(c,h,g,_){var N=g._locale.weekdaysParse(c,_,g._strict);N!=null?h.d=N:v(g).invalidWeekday=c}),xr(["d","e","E"],function(c,h,g,_){h[_]=Xe(c)});function ow(c,h){return typeof c!="string"?c:isNaN(c)?(c=h.weekdaysParse(c),typeof c=="number"?c:null):parseInt(c,10)}function rw(c,h){return typeof c=="string"?h.weekdaysParse(c)%7||7:isNaN(c)?null:c}function Bc(c,h){return c.slice(h,7).concat(c.slice(0,h))}var sw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),nf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),iw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),aw=pn,lw=pn,cw=pn;function dw(c,h){var g=i(this._weekdays)?this._weekdays:this._weekdays[c&&c!==!0&&this._weekdays.isFormat.test(h)?"format":"standalone"];return c===!0?Bc(g,this._week.dow):c?g[c.day()]:g}function uw(c){return c===!0?Bc(this._weekdaysShort,this._week.dow):c?this._weekdaysShort[c.day()]:this._weekdaysShort}function hw(c){return c===!0?Bc(this._weekdaysMin,this._week.dow):c?this._weekdaysMin[c.day()]:this._weekdaysMin}function fw(c,h,g){var _,N,X,de=c.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],_=0;_<7;++_)X=b([2e3,1]).day(_),this._minWeekdaysParse[_]=this.weekdaysMin(X,"").toLocaleLowerCase(),this._shortWeekdaysParse[_]=this.weekdaysShort(X,"").toLocaleLowerCase(),this._weekdaysParse[_]=this.weekdays(X,"").toLocaleLowerCase();return g?h==="dddd"?(N=Wt.call(this._weekdaysParse,de),N!==-1?N:null):h==="ddd"?(N=Wt.call(this._shortWeekdaysParse,de),N!==-1?N:null):(N=Wt.call(this._minWeekdaysParse,de),N!==-1?N:null):h==="dddd"?(N=Wt.call(this._weekdaysParse,de),N!==-1||(N=Wt.call(this._shortWeekdaysParse,de),N!==-1)?N:(N=Wt.call(this._minWeekdaysParse,de),N!==-1?N:null)):h==="ddd"?(N=Wt.call(this._shortWeekdaysParse,de),N!==-1||(N=Wt.call(this._weekdaysParse,de),N!==-1)?N:(N=Wt.call(this._minWeekdaysParse,de),N!==-1?N:null)):(N=Wt.call(this._minWeekdaysParse,de),N!==-1||(N=Wt.call(this._weekdaysParse,de),N!==-1)?N:(N=Wt.call(this._shortWeekdaysParse,de),N!==-1?N:null))}function pw(c,h,g){var _,N,X;if(this._weekdaysParseExact)return fw.call(this,c,h,g);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),_=0;_<7;_++){if(N=b([2e3,1]).day(_),g&&!this._fullWeekdaysParse[_]&&(this._fullWeekdaysParse[_]=new RegExp("^"+this.weekdays(N,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[_]=new RegExp("^"+this.weekdaysShort(N,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[_]=new RegExp("^"+this.weekdaysMin(N,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[_]||(X="^"+this.weekdays(N,"")+"|^"+this.weekdaysShort(N,"")+"|^"+this.weekdaysMin(N,""),this._weekdaysParse[_]=new RegExp(X.replace(".",""),"i")),g&&h==="dddd"&&this._fullWeekdaysParse[_].test(c))return _;if(g&&h==="ddd"&&this._shortWeekdaysParse[_].test(c))return _;if(g&&h==="dd"&&this._minWeekdaysParse[_].test(c))return _;if(!g&&this._weekdaysParse[_].test(c))return _}}function mw(c){if(!this.isValid())return c!=null?this:NaN;var h=Hn(this,"Day");return c!=null?(c=ow(c,this.localeData()),this.add(c-h,"d")):h}function gw(c){if(!this.isValid())return c!=null?this:NaN;var h=(this.day()+7-this.localeData()._week.dow)%7;return c==null?h:this.add(c-h,"d")}function yw(c){if(!this.isValid())return c!=null?this:NaN;if(c!=null){var h=rw(c,this.localeData());return this.day(this.day()%7?h:h-7)}else return this.day()||7}function vw(c){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Wc.call(this),c?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=aw),this._weekdaysStrictRegex&&c?this._weekdaysStrictRegex:this._weekdaysRegex)}function bw(c){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Wc.call(this),c?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=lw),this._weekdaysShortStrictRegex&&c?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ww(c){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Wc.call(this),c?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=cw),this._weekdaysMinStrictRegex&&c?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Wc(){function c(xn,Bo){return Bo.length-xn.length}var h=[],g=[],_=[],N=[],X,de,Ee,ze,it;for(X=0;X<7;X++)de=b([2e3,1]).day(X),Ee=Wn(this.weekdaysMin(de,"")),ze=Wn(this.weekdaysShort(de,"")),it=Wn(this.weekdays(de,"")),h.push(Ee),g.push(ze),_.push(it),N.push(Ee),N.push(ze),N.push(it);h.sort(c),g.sort(c),_.sort(c),N.sort(c),this._weekdaysRegex=new RegExp("^("+N.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+h.join("|")+")","i")}function Hc(){return this.hours()%12||12}function Cw(){return this.hours()||24}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Hc),j("k",["kk",2],0,Cw),j("hmm",0,0,function(){return""+Hc.apply(this)+L(this.minutes(),2)}),j("hmmss",0,0,function(){return""+Hc.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)});function of(c,h){j(c,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),h)})}of("a",!0),of("A",!1);function rf(c,h){return h._meridiemParse}_e("a",rf),_e("A",rf),_e("H",Ue,cr),_e("h",Ue,Qt),_e("k",Ue,Qt),_e("HH",Ue,rt),_e("hh",Ue,rt),_e("kk",Ue,rt),_e("hmm",Be),_e("hmmss",rn),_e("Hmm",Be),_e("Hmmss",rn),yt(["H","HH"],Ce),yt(["k","kk"],function(c,h,g){var _=Xe(c);h[Ce]=_===24?0:_}),yt(["a","A"],function(c,h,g){g._isPm=g._locale.isPM(c),g._meridiem=c}),yt(["h","hh"],function(c,h,g){h[Ce]=Xe(c),v(g).bigHour=!0}),yt("hmm",function(c,h,g){var _=c.length-2;h[Ce]=Xe(c.substr(0,_)),h[Ae]=Xe(c.substr(_)),v(g).bigHour=!0}),yt("hmmss",function(c,h,g){var _=c.length-4,N=c.length-2;h[Ce]=Xe(c.substr(0,_)),h[Ae]=Xe(c.substr(_,2)),h[Ke]=Xe(c.substr(N)),v(g).bigHour=!0}),yt("Hmm",function(c,h,g){var _=c.length-2;h[Ce]=Xe(c.substr(0,_)),h[Ae]=Xe(c.substr(_))}),yt("Hmmss",function(c,h,g){var _=c.length-4,N=c.length-2;h[Ce]=Xe(c.substr(0,_)),h[Ae]=Xe(c.substr(_,2)),h[Ke]=Xe(c.substr(N))});function Sw(c){return(c+"").toLowerCase().charAt(0)==="p"}var _w=/[ap]\.?m?\.?/i,xw=sn("Hours",!0);function Rw(c,h,g){return c>11?g?"pm":"PM":g?"am":"AM"}var sf={calendar:A,longDateFormat:le,invalidDate:W,ordinal:Z,dayOfMonthOrdinalParse:fe,relativeTime:be,months:jb,monthsShort:Xh,week:Qb,weekdays:sw,weekdaysMin:iw,weekdaysShort:nf,meridiemParse:_w},Vt={},Js={},ei;function Tw(c,h){var g,_=Math.min(c.length,h.length);for(g=0;g<_;g+=1)if(c[g]!==h[g])return g;return _}function af(c){return c&&c.toLowerCase().replace("_","-")}function kw(c){for(var h=0,g,_,N,X;h<c.length;){for(X=af(c[h]).split("-"),g=X.length,_=af(c[h+1]),_=_?_.split("-"):null;g>0;){if(N=ka(X.slice(0,g).join("-")),N)return N;if(_&&_.length>=g&&Tw(X,_)>=g-1)break;g--}h++}return ei}function Ew(c){return!!(c&&c.match("^[^/\\\\]*$"))}function ka(c){var h=null,g;if(Vt[c]===void 0&&e&&e.exports&&Ew(c))try{h=ei._abbr,g=QA,g("./locale/"+c),dr(h)}catch{Vt[c]=null}return Vt[c]}function dr(c,h){var g;return c&&(u(h)?g=Lo(c):g=zc(c,h),g?ei=g:typeof console<"u"&&console.warn&&console.warn("Locale "+c+" not found. Did you forget to load it?")),ei._abbr}function zc(c,h){if(h!==null){var g,_=sf;if(h.abbr=c,Vt[c]!=null)K("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),_=Vt[c]._config;else if(h.parentLocale!=null)if(Vt[h.parentLocale]!=null)_=Vt[h.parentLocale]._config;else if(g=ka(h.parentLocale),g!=null)_=g._config;else return Js[h.parentLocale]||(Js[h.parentLocale]=[]),Js[h.parentLocale].push({name:c,config:h}),null;return Vt[c]=new H(Y(_,h)),Js[c]&&Js[c].forEach(function(N){zc(N.name,N.config)}),dr(c),Vt[c]}else return delete Vt[c],null}function Pw(c,h){if(h!=null){var g,_,N=sf;Vt[c]!=null&&Vt[c].parentLocale!=null?Vt[c].set(Y(Vt[c]._config,h)):(_=ka(c),_!=null&&(N=_._config),h=Y(N,h),_==null&&(h.abbr=c),g=new H(h),g.parentLocale=Vt[c],Vt[c]=g),dr(c)}else Vt[c]!=null&&(Vt[c].parentLocale!=null?(Vt[c]=Vt[c].parentLocale,c===dr()&&dr(c)):Vt[c]!=null&&delete Vt[c]);return Vt[c]}function Lo(c){var h;if(c&&c._locale&&c._locale._abbr&&(c=c._locale._abbr),!c)return ei;if(!i(c)){if(h=ka(c),h)return h;c=[c]}return kw(c)}function Dw(){return ae(Vt)}function Yc(c){var h,g=c._a;return g&&v(c).overflow===-2&&(h=g[U]<0||g[U]>11?U:g[me]<1||g[me]>jc(g[un],g[U])?me:g[Ce]<0||g[Ce]>24||g[Ce]===24&&(g[Ae]!==0||g[Ke]!==0||g[st]!==0)?Ce:g[Ae]<0||g[Ae]>59?Ae:g[Ke]<0||g[Ke]>59?Ke:g[st]<0||g[st]>999?st:-1,v(c)._overflowDayOfYear&&(h<un||h>me)&&(h=me),v(c)._overflowWeeks&&h===-1&&(h=et),v(c)._overflowWeekday&&h===-1&&(h=Ze),v(c).overflow=h),c}var Ow=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mw=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Iw=/Z|[+-]\d\d(?::?\d\d)?/,Ea=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Uc=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Nw=/^\/?Date\((-?\d+)/i,Aw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Fw={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function lf(c){var h,g,_=c._i,N=Ow.exec(_)||Mw.exec(_),X,de,Ee,ze,it=Ea.length,xn=Uc.length;if(N){for(v(c).iso=!0,h=0,g=it;h<g;h++)if(Ea[h][1].exec(N[1])){de=Ea[h][0],X=Ea[h][2]!==!1;break}if(de==null){c._isValid=!1;return}if(N[3]){for(h=0,g=xn;h<g;h++)if(Uc[h][1].exec(N[3])){Ee=(N[2]||" ")+Uc[h][0];break}if(Ee==null){c._isValid=!1;return}}if(!X&&Ee!=null){c._isValid=!1;return}if(N[4])if(Iw.exec(N[4]))ze="Z";else{c._isValid=!1;return}c._f=de+(Ee||"")+(ze||""),Gc(c)}else c._isValid=!1}function Lw(c,h,g,_,N,X){var de=[$w(c),Xh.indexOf(h),parseInt(g,10),parseInt(_,10),parseInt(N,10)];return X&&de.push(parseInt(X,10)),de}function $w(c){var h=parseInt(c,10);return h<=49?2e3+h:h<=999?1900+h:h}function Vw(c){return c.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jw(c,h,g){if(c){var _=nf.indexOf(c),N=new Date(h[0],h[1],h[2]).getDay();if(_!==N)return v(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function Bw(c,h,g){if(c)return Fw[c];if(h)return 0;var _=parseInt(g,10),N=_%100,X=(_-N)/100;return X*60+N}function cf(c){var h=Aw.exec(Vw(c._i)),g;if(h){if(g=Lw(h[4],h[3],h[2],h[5],h[6],h[7]),!jw(h[1],g,c))return;c._a=g,c._tzm=Bw(h[8],h[9],h[10]),c._d=Zs.apply(null,c._a),c._d.setUTCMinutes(c._d.getUTCMinutes()-c._tzm),v(c).rfc2822=!0}else c._isValid=!1}function Ww(c){var h=Nw.exec(c._i);if(h!==null){c._d=new Date(+h[1]);return}if(lf(c),c._isValid===!1)delete c._isValid;else return;if(cf(c),c._isValid===!1)delete c._isValid;else return;c._strict?c._isValid=!1:o.createFromInputFallback(c)}o.createFromInputFallback=R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(c){c._d=new Date(c._i+(c._useUTC?" UTC":""))});function ts(c,h,g){return c??h??g}function Hw(c){var h=new Date(o.now());return c._useUTC?[h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()]:[h.getFullYear(),h.getMonth(),h.getDate()]}function qc(c){var h,g,_=[],N,X,de;if(!c._d){for(N=Hw(c),c._w&&c._a[me]==null&&c._a[U]==null&&zw(c),c._dayOfYear!=null&&(de=ts(c._a[un],N[un]),(c._dayOfYear>Jt(de)||c._dayOfYear===0)&&(v(c)._overflowDayOfYear=!0),g=Zs(de,0,c._dayOfYear),c._a[U]=g.getUTCMonth(),c._a[me]=g.getUTCDate()),h=0;h<3&&c._a[h]==null;++h)c._a[h]=_[h]=N[h];for(;h<7;h++)c._a[h]=_[h]=c._a[h]==null?h===2?1:0:c._a[h];c._a[Ce]===24&&c._a[Ae]===0&&c._a[Ke]===0&&c._a[st]===0&&(c._nextDay=!0,c._a[Ce]=0),c._d=(c._useUTC?Zs:Xb).apply(null,_),X=c._useUTC?c._d.getUTCDay():c._d.getDay(),c._tzm!=null&&c._d.setUTCMinutes(c._d.getUTCMinutes()-c._tzm),c._nextDay&&(c._a[Ce]=24),c._w&&typeof c._w.d<"u"&&c._w.d!==X&&(v(c).weekdayMismatch=!0)}}function zw(c){var h,g,_,N,X,de,Ee,ze,it;h=c._w,h.GG!=null||h.W!=null||h.E!=null?(X=1,de=4,g=ts(h.GG,c._a[un],Qs(Mt(),1,4).year),_=ts(h.W,1),N=ts(h.E,1),(N<1||N>7)&&(ze=!0)):(X=c._locale._week.dow,de=c._locale._week.doy,it=Qs(Mt(),X,de),g=ts(h.gg,c._a[un],it.year),_=ts(h.w,it.week),h.d!=null?(N=h.d,(N<0||N>6)&&(ze=!0)):h.e!=null?(N=h.e+X,(h.e<0||h.e>6)&&(ze=!0)):N=X),_<1||_>Fo(g,X,de)?v(c)._overflowWeeks=!0:ze!=null?v(c)._overflowWeekday=!0:(Ee=tf(g,_,N,X,de),c._a[un]=Ee.year,c._dayOfYear=Ee.dayOfYear)}o.ISO_8601=function(){},o.RFC_2822=function(){};function Gc(c){if(c._f===o.ISO_8601){lf(c);return}if(c._f===o.RFC_2822){cf(c);return}c._a=[],v(c).empty=!0;var h=""+c._i,g,_,N,X,de,Ee=h.length,ze=0,it,xn;for(N=ce(c._f,c._locale).match(B)||[],xn=N.length,g=0;g<xn;g++)X=N[g],_=(h.match(Lc(X,c))||[])[0],_&&(de=h.substr(0,h.indexOf(_)),de.length>0&&v(c).unusedInput.push(de),h=h.slice(h.indexOf(_)+_.length),ze+=_.length),se[X]?(_?v(c).empty=!1:v(c).unusedTokens.push(X),$c(X,_,c)):c._strict&&!_&&v(c).unusedTokens.push(X);v(c).charsLeftOver=Ee-ze,h.length>0&&v(c).unusedInput.push(h),c._a[Ce]<=12&&v(c).bigHour===!0&&c._a[Ce]>0&&(v(c).bigHour=void 0),v(c).parsedDateParts=c._a.slice(0),v(c).meridiem=c._meridiem,c._a[Ce]=Yw(c._locale,c._a[Ce],c._meridiem),it=v(c).era,it!==null&&(c._a[un]=c._locale.erasConvertYear(it,c._a[un])),qc(c),Yc(c)}function Yw(c,h,g){var _;return g==null?h:c.meridiemHour!=null?c.meridiemHour(h,g):(c.isPM!=null&&(_=c.isPM(g),_&&h<12&&(h+=12),!_&&h===12&&(h=0)),h)}function Uw(c){var h,g,_,N,X,de,Ee=!1,ze=c._f.length;if(ze===0){v(c).invalidFormat=!0,c._d=new Date(NaN);return}for(N=0;N<ze;N++)X=0,de=!1,h=O({},c),c._useUTC!=null&&(h._useUTC=c._useUTC),h._f=c._f[N],Gc(h),k(h)&&(de=!0),X+=v(h).charsLeftOver,X+=v(h).unusedTokens.length*10,v(h).score=X,Ee?X<_&&(_=X,g=h):(_==null||X<_||de)&&(_=X,g=h,de&&(Ee=!0));w(c,g||h)}function qw(c){if(!c._d){var h=Je(c._i),g=h.day===void 0?h.date:h.day;c._a=y([h.year,h.month,g,h.hour,h.minute,h.second,h.millisecond],function(_){return _&&parseInt(_,10)}),qc(c)}}function Gw(c){var h=new I(Yc(df(c)));return h._nextDay&&(h.add(1,"d"),h._nextDay=void 0),h}function df(c){var h=c._i,g=c._f;return c._locale=c._locale||Lo(c._l),h===null||g===void 0&&h===""?x({nullInput:!0}):(typeof h=="string"&&(c._i=h=c._locale.preparse(h)),F(h)?new I(Yc(h)):(p(h)?c._d=h:i(g)?Uw(c):g?Gc(c):Kw(c),k(c)||(c._d=null),c))}function Kw(c){var h=c._i;u(h)?c._d=new Date(o.now()):p(h)?c._d=new Date(h.valueOf()):typeof h=="string"?Ww(c):i(h)?(c._a=y(h.slice(0),function(g){return parseInt(g,10)}),qc(c)):a(h)?qw(c):f(h)?c._d=new Date(h):o.createFromInputFallback(c)}function uf(c,h,g,_,N){var X={};return(h===!0||h===!1)&&(_=h,h=void 0),(g===!0||g===!1)&&(_=g,g=void 0),(a(c)&&d(c)||i(c)&&c.length===0)&&(c=void 0),X._isAMomentObject=!0,X._useUTC=X._isUTC=N,X._l=g,X._i=c,X._f=h,X._strict=_,Gw(X)}function Mt(c,h,g,_){return uf(c,h,g,_,!1)}var Xw=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var c=Mt.apply(null,arguments);return this.isValid()&&c.isValid()?c<this?this:c:x()}),Zw=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var c=Mt.apply(null,arguments);return this.isValid()&&c.isValid()?c>this?this:c:x()});function hf(c,h){var g,_;if(h.length===1&&i(h[0])&&(h=h[0]),!h.length)return Mt();for(g=h[0],_=1;_<h.length;++_)(!h[_].isValid()||h[_][c](g))&&(g=h[_]);return g}function Qw(){var c=[].slice.call(arguments,0);return hf("isBefore",c)}function Jw(){var c=[].slice.call(arguments,0);return hf("isAfter",c)}var eC=function(){return Date.now?Date.now():+new Date},ti=["year","quarter","month","week","day","hour","minute","second","millisecond"];function tC(c){var h,g=!1,_,N=ti.length;for(h in c)if(l(c,h)&&!(Wt.call(ti,h)!==-1&&(c[h]==null||!isNaN(c[h]))))return!1;for(_=0;_<N;++_)if(c[ti[_]]){if(g)return!1;parseFloat(c[ti[_]])!==Xe(c[ti[_]])&&(g=!0)}return!0}function nC(){return this._isValid}function oC(){return io(NaN)}function Pa(c){var h=Je(c),g=h.year||0,_=h.quarter||0,N=h.month||0,X=h.week||h.isoWeek||0,de=h.day||0,Ee=h.hour||0,ze=h.minute||0,it=h.second||0,xn=h.millisecond||0;this._isValid=tC(h),this._milliseconds=+xn+it*1e3+ze*6e4+Ee*1e3*60*60,this._days=+de+X*7,this._months=+N+_*3+g*12,this._data={},this._locale=Lo(),this._bubble()}function Da(c){return c instanceof Pa}function Kc(c){return c<0?Math.round(-1*c)*-1:Math.round(c)}function rC(c,h,g){var _=Math.min(c.length,h.length),N=Math.abs(c.length-h.length),X=0,de;for(de=0;de<_;de++)Xe(c[de])!==Xe(h[de])&&X++;return X+N}function ff(c,h){j(c,0,0,function(){var g=this.utcOffset(),_="+";return g<0&&(g=-g,_="-"),_+L(~~(g/60),2)+h+L(~~g%60,2)})}ff("Z",":"),ff("ZZ",""),_e("Z",at),_e("ZZ",at),yt(["Z","ZZ"],function(c,h,g){g._useUTC=!0,g._tzm=Xc(at,c)});var sC=/([\+\-]|\d\d)/gi;function Xc(c,h){var g=(h||"").match(c),_,N,X;return g===null?null:(_=g[g.length-1]||[],N=(_+"").match(sC)||["-",0,0],X=+(N[1]*60)+Xe(N[2]),X===0?0:N[0]==="+"?X:-X)}function Zc(c,h){var g,_;return h._isUTC?(g=h.clone(),_=(F(c)||p(c)?c.valueOf():Mt(c).valueOf())-g.valueOf(),g._d.setTime(g._d.valueOf()+_),o.updateOffset(g,!1),g):Mt(c).local()}function Qc(c){return-Math.round(c._d.getTimezoneOffset())}o.updateOffset=function(){};function iC(c,h,g){var _=this._offset||0,N;if(!this.isValid())return c!=null?this:NaN;if(c!=null){if(typeof c=="string"){if(c=Xc(at,c),c===null)return this}else Math.abs(c)<16&&!g&&(c=c*60);return!this._isUTC&&h&&(N=Qc(this)),this._offset=c,this._isUTC=!0,N!=null&&this.add(N,"m"),_!==c&&(!h||this._changeInProgress?yf(this,io(c-_,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?_:Qc(this)}function aC(c,h){return c!=null?(typeof c!="string"&&(c=-c),this.utcOffset(c,h),this):-this.utcOffset()}function lC(c){return this.utcOffset(0,c)}function cC(c){return this._isUTC&&(this.utcOffset(0,c),this._isUTC=!1,c&&this.subtract(Qc(this),"m")),this}function dC(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var c=Xc(An,this._i);c!=null?this.utcOffset(c):this.utcOffset(0,!0)}return this}function uC(c){return this.isValid()?(c=c?Mt(c).utcOffset():0,(this.utcOffset()-c)%60===0):!1}function hC(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function fC(){if(!u(this._isDSTShifted))return this._isDSTShifted;var c={},h;return O(c,this),c=df(c),c._a?(h=c._isUTC?b(c._a):Mt(c._a),this._isDSTShifted=this.isValid()&&rC(c._a,h.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function pC(){return this.isValid()?!this._isUTC:!1}function mC(){return this.isValid()?this._isUTC:!1}function pf(){return this.isValid()?this._isUTC&&this._offset===0:!1}var gC=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,yC=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function io(c,h){var g=c,_=null,N,X,de;return Da(c)?g={ms:c._milliseconds,d:c._days,M:c._months}:f(c)||!isNaN(+c)?(g={},h?g[h]=+c:g.milliseconds=+c):(_=gC.exec(c))?(N=_[1]==="-"?-1:1,g={y:0,d:Xe(_[me])*N,h:Xe(_[Ce])*N,m:Xe(_[Ae])*N,s:Xe(_[Ke])*N,ms:Xe(Kc(_[st]*1e3))*N}):(_=yC.exec(c))?(N=_[1]==="-"?-1:1,g={y:Rr(_[2],N),M:Rr(_[3],N),w:Rr(_[4],N),d:Rr(_[5],N),h:Rr(_[6],N),m:Rr(_[7],N),s:Rr(_[8],N)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(de=vC(Mt(g.from),Mt(g.to)),g={},g.ms=de.milliseconds,g.M=de.months),X=new Pa(g),Da(c)&&l(c,"_locale")&&(X._locale=c._locale),Da(c)&&l(c,"_isValid")&&(X._isValid=c._isValid),X}io.fn=Pa.prototype,io.invalid=oC;function Rr(c,h){var g=c&&parseFloat(c.replace(",","."));return(isNaN(g)?0:g)*h}function mf(c,h){var g={};return g.months=h.month()-c.month()+(h.year()-c.year())*12,c.clone().add(g.months,"M").isAfter(h)&&--g.months,g.milliseconds=+h-+c.clone().add(g.months,"M"),g}function vC(c,h){var g;return c.isValid()&&h.isValid()?(h=Zc(h,c),c.isBefore(h)?g=mf(c,h):(g=mf(h,c),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function gf(c,h){return function(g,_){var N,X;return _!==null&&!isNaN(+_)&&(K(h,"moment()."+h+"(period, number) is deprecated. Please use moment()."+h+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),X=g,g=_,_=X),N=io(g,_),yf(this,N,c),this}}function yf(c,h,g,_){var N=h._milliseconds,X=Kc(h._days),de=Kc(h._months);c.isValid()&&(_=_??!0,de&&Qh(c,Hn(c,"Month")+de*g),X&&yo(c,"Date",Hn(c,"Date")+X*g),N&&c._d.setTime(c._d.valueOf()+N*g),_&&o.updateOffset(c,X||de))}var bC=gf(1,"add"),wC=gf(-1,"subtract");function vf(c){return typeof c=="string"||c instanceof String}function CC(c){return F(c)||p(c)||vf(c)||f(c)||_C(c)||SC(c)||c===null||c===void 0}function SC(c){var h=a(c)&&!d(c),g=!1,_=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],N,X,de=_.length;for(N=0;N<de;N+=1)X=_[N],g=g||l(c,X);return h&&g}function _C(c){var h=i(c),g=!1;return h&&(g=c.filter(function(_){return!f(_)&&vf(c)}).length===0),h&&g}function xC(c){var h=a(c)&&!d(c),g=!1,_=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],N,X;for(N=0;N<_.length;N+=1)X=_[N],g=g||l(c,X);return h&&g}function RC(c,h){var g=c.diff(h,"days",!0);return g<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"}function TC(c,h){arguments.length===1&&(arguments[0]?CC(arguments[0])?(c=arguments[0],h=void 0):xC(arguments[0])&&(h=arguments[0],c=void 0):(c=void 0,h=void 0));var g=c||Mt(),_=Zc(g,this).startOf("day"),N=o.calendarFormat(this,_)||"sameElse",X=h&&(G(h[N])?h[N].call(this,g):h[N]);return this.format(X||this.localeData().calendar(N,this,Mt(g)))}function kC(){return new I(this)}function EC(c,h){var g=F(c)?c:Mt(c);return this.isValid()&&g.isValid()?(h=Ne(h)||"millisecond",h==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(h).valueOf()):!1}function PC(c,h){var g=F(c)?c:Mt(c);return this.isValid()&&g.isValid()?(h=Ne(h)||"millisecond",h==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(h).valueOf()<g.valueOf()):!1}function DC(c,h,g,_){var N=F(c)?c:Mt(c),X=F(h)?h:Mt(h);return this.isValid()&&N.isValid()&&X.isValid()?(_=_||"()",(_[0]==="("?this.isAfter(N,g):!this.isBefore(N,g))&&(_[1]===")"?this.isBefore(X,g):!this.isAfter(X,g))):!1}function OC(c,h){var g=F(c)?c:Mt(c),_;return this.isValid()&&g.isValid()?(h=Ne(h)||"millisecond",h==="millisecond"?this.valueOf()===g.valueOf():(_=g.valueOf(),this.clone().startOf(h).valueOf()<=_&&_<=this.clone().endOf(h).valueOf())):!1}function MC(c,h){return this.isSame(c,h)||this.isAfter(c,h)}function IC(c,h){return this.isSame(c,h)||this.isBefore(c,h)}function NC(c,h,g){var _,N,X;if(!this.isValid())return NaN;if(_=Zc(c,this),!_.isValid())return NaN;switch(N=(_.utcOffset()-this.utcOffset())*6e4,h=Ne(h),h){case"year":X=Oa(this,_)/12;break;case"month":X=Oa(this,_);break;case"quarter":X=Oa(this,_)/3;break;case"second":X=(this-_)/1e3;break;case"minute":X=(this-_)/6e4;break;case"hour":X=(this-_)/36e5;break;case"day":X=(this-_-N)/864e5;break;case"week":X=(this-_-N)/6048e5;break;default:X=this-_}return g?X:kn(X)}function Oa(c,h){if(c.date()<h.date())return-Oa(h,c);var g=(h.year()-c.year())*12+(h.month()-c.month()),_=c.clone().add(g,"months"),N,X;return h-_<0?(N=c.clone().add(g-1,"months"),X=(h-_)/(_-N)):(N=c.clone().add(g+1,"months"),X=(h-_)/(N-_)),-(g+X)||0}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function AC(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function FC(c){if(!this.isValid())return null;var h=c!==!0,g=h?this.clone().utc():this;return g.year()<0||g.year()>9999?te(g,h?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):G(Date.prototype.toISOString)?h?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",te(g,"Z")):te(g,h?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function LC(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var c="moment",h="",g,_,N,X;return this.isLocal()||(c=this.utcOffset()===0?"moment.utc":"moment.parseZone",h="Z"),g="["+c+'("]',_=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",N="-MM-DD[T]HH:mm:ss.SSS",X=h+'[")]',this.format(g+_+N+X)}function $C(c){c||(c=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var h=te(this,c);return this.localeData().postformat(h)}function VC(c,h){return this.isValid()&&(F(c)&&c.isValid()||Mt(c).isValid())?io({to:this,from:c}).locale(this.locale()).humanize(!h):this.localeData().invalidDate()}function jC(c){return this.from(Mt(),c)}function BC(c,h){return this.isValid()&&(F(c)&&c.isValid()||Mt(c).isValid())?io({from:this,to:c}).locale(this.locale()).humanize(!h):this.localeData().invalidDate()}function WC(c){return this.to(Mt(),c)}function bf(c){var h;return c===void 0?this._locale._abbr:(h=Lo(c),h!=null&&(this._locale=h),this)}var wf=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(c){return c===void 0?this.localeData():this.locale(c)});function Cf(){return this._locale}var Ma=1e3,ns=60*Ma,Ia=60*ns,Sf=(365*400+97)*24*Ia;function os(c,h){return(c%h+h)%h}function _f(c,h,g){return c<100&&c>=0?new Date(c+400,h,g)-Sf:new Date(c,h,g).valueOf()}function xf(c,h,g){return c<100&&c>=0?Date.UTC(c+400,h,g)-Sf:Date.UTC(c,h,g)}function HC(c){var h,g;if(c=Ne(c),c===void 0||c==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?xf:_f,c){case"year":h=g(this.year(),0,1);break;case"quarter":h=g(this.year(),this.month()-this.month()%3,1);break;case"month":h=g(this.year(),this.month(),1);break;case"week":h=g(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":h=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":h=g(this.year(),this.month(),this.date());break;case"hour":h=this._d.valueOf(),h-=os(h+(this._isUTC?0:this.utcOffset()*ns),Ia);break;case"minute":h=this._d.valueOf(),h-=os(h,ns);break;case"second":h=this._d.valueOf(),h-=os(h,Ma);break}return this._d.setTime(h),o.updateOffset(this,!0),this}function zC(c){var h,g;if(c=Ne(c),c===void 0||c==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?xf:_f,c){case"year":h=g(this.year()+1,0,1)-1;break;case"quarter":h=g(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":h=g(this.year(),this.month()+1,1)-1;break;case"week":h=g(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":h=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":h=g(this.year(),this.month(),this.date()+1)-1;break;case"hour":h=this._d.valueOf(),h+=Ia-os(h+(this._isUTC?0:this.utcOffset()*ns),Ia)-1;break;case"minute":h=this._d.valueOf(),h+=ns-os(h,ns)-1;break;case"second":h=this._d.valueOf(),h+=Ma-os(h,Ma)-1;break}return this._d.setTime(h),o.updateOffset(this,!0),this}function YC(){return this._d.valueOf()-(this._offset||0)*6e4}function UC(){return Math.floor(this.valueOf()/1e3)}function qC(){return new Date(this.valueOf())}function GC(){var c=this;return[c.year(),c.month(),c.date(),c.hour(),c.minute(),c.second(),c.millisecond()]}function KC(){var c=this;return{years:c.year(),months:c.month(),date:c.date(),hours:c.hours(),minutes:c.minutes(),seconds:c.seconds(),milliseconds:c.milliseconds()}}function XC(){return this.isValid()?this.toISOString():null}function ZC(){return k(this)}function QC(){return w({},v(this))}function JC(){return v(this).overflow}function eS(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),_e("N",Jc),_e("NN",Jc),_e("NNN",Jc),_e("NNNN",uS),_e("NNNNN",hS),yt(["N","NN","NNN","NNNN","NNNNN"],function(c,h,g,_){var N=g._locale.erasParse(c,_,g._strict);N?v(g).era=N:v(g).invalidEra=c}),_e("y",ht),_e("yy",ht),_e("yyy",ht),_e("yyyy",ht),_e("yo",fS),yt(["y","yy","yyy","yyyy"],un),yt(["yo"],function(c,h,g,_){var N;g._locale._eraYearOrdinalRegex&&(N=c.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?h[un]=g._locale.eraYearOrdinalParse(c,N):h[un]=parseInt(c,10)});function tS(c,h){var g,_,N,X=this._eras||Lo("en")._eras;for(g=0,_=X.length;g<_;++g){switch(typeof X[g].since){case"string":N=o(X[g].since).startOf("day"),X[g].since=N.valueOf();break}switch(typeof X[g].until){case"undefined":X[g].until=1/0;break;case"string":N=o(X[g].until).startOf("day").valueOf(),X[g].until=N.valueOf();break}}return X}function nS(c,h,g){var _,N,X=this.eras(),de,Ee,ze;for(c=c.toUpperCase(),_=0,N=X.length;_<N;++_)if(de=X[_].name.toUpperCase(),Ee=X[_].abbr.toUpperCase(),ze=X[_].narrow.toUpperCase(),g)switch(h){case"N":case"NN":case"NNN":if(Ee===c)return X[_];break;case"NNNN":if(de===c)return X[_];break;case"NNNNN":if(ze===c)return X[_];break}else if([de,Ee,ze].indexOf(c)>=0)return X[_]}function oS(c,h){var g=c.since<=c.until?1:-1;return h===void 0?o(c.since).year():o(c.since).year()+(h-c.offset)*g}function rS(){var c,h,g,_=this.localeData().eras();for(c=0,h=_.length;c<h;++c)if(g=this.clone().startOf("day").valueOf(),_[c].since<=g&&g<=_[c].until||_[c].until<=g&&g<=_[c].since)return _[c].name;return""}function sS(){var c,h,g,_=this.localeData().eras();for(c=0,h=_.length;c<h;++c)if(g=this.clone().startOf("day").valueOf(),_[c].since<=g&&g<=_[c].until||_[c].until<=g&&g<=_[c].since)return _[c].narrow;return""}function iS(){var c,h,g,_=this.localeData().eras();for(c=0,h=_.length;c<h;++c)if(g=this.clone().startOf("day").valueOf(),_[c].since<=g&&g<=_[c].until||_[c].until<=g&&g<=_[c].since)return _[c].abbr;return""}function aS(){var c,h,g,_,N=this.localeData().eras();for(c=0,h=N.length;c<h;++c)if(g=N[c].since<=N[c].until?1:-1,_=this.clone().startOf("day").valueOf(),N[c].since<=_&&_<=N[c].until||N[c].until<=_&&_<=N[c].since)return(this.year()-o(N[c].since).year())*g+N[c].offset;return this.year()}function lS(c){return l(this,"_erasNameRegex")||ed.call(this),c?this._erasNameRegex:this._erasRegex}function cS(c){return l(this,"_erasAbbrRegex")||ed.call(this),c?this._erasAbbrRegex:this._erasRegex}function dS(c){return l(this,"_erasNarrowRegex")||ed.call(this),c?this._erasNarrowRegex:this._erasRegex}function Jc(c,h){return h.erasAbbrRegex(c)}function uS(c,h){return h.erasNameRegex(c)}function hS(c,h){return h.erasNarrowRegex(c)}function fS(c,h){return h._eraYearOrdinalRegex||ht}function ed(){var c=[],h=[],g=[],_=[],N,X,de,Ee,ze,it=this.eras();for(N=0,X=it.length;N<X;++N)de=Wn(it[N].name),Ee=Wn(it[N].abbr),ze=Wn(it[N].narrow),h.push(de),c.push(Ee),g.push(ze),_.push(de),_.push(Ee),_.push(ze);this._erasRegex=new RegExp("^("+_.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+h.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+g.join("|")+")","i")}j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Na(c,h){j(0,[c,c.length],0,h)}Na("gggg","weekYear"),Na("ggggg","weekYear"),Na("GGGG","isoWeekYear"),Na("GGGGG","isoWeekYear"),_e("G",nn),_e("g",nn),_e("GG",Ue,rt),_e("gg",Ue,rt),_e("GGGG",Oe,Ut),_e("gggg",Oe,Ut),_e("GGGGG",We,Lt),_e("ggggg",We,Lt),xr(["gggg","ggggg","GGGG","GGGGG"],function(c,h,g,_){h[_.substr(0,2)]=Xe(c)}),xr(["gg","GG"],function(c,h,g,_){h[_]=o.parseTwoDigitYear(c)});function pS(c){return Rf.call(this,c,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function mS(c){return Rf.call(this,c,this.isoWeek(),this.isoWeekday(),1,4)}function gS(){return Fo(this.year(),1,4)}function yS(){return Fo(this.isoWeekYear(),1,4)}function vS(){var c=this.localeData()._week;return Fo(this.year(),c.dow,c.doy)}function bS(){var c=this.localeData()._week;return Fo(this.weekYear(),c.dow,c.doy)}function Rf(c,h,g,_,N){var X;return c==null?Qs(this,_,N).year:(X=Fo(c,_,N),h>X&&(h=X),wS.call(this,c,h,g,_,N))}function wS(c,h,g,_,N){var X=tf(c,h,g,_,N),de=Zs(X.year,0,X.dayOfYear);return this.year(de.getUTCFullYear()),this.month(de.getUTCMonth()),this.date(de.getUTCDate()),this}j("Q",0,"Qo","quarter"),_e("Q",Yt),yt("Q",function(c,h){h[U]=(Xe(c)-1)*3});function CS(c){return c==null?Math.ceil((this.month()+1)/3):this.month((c-1)*3+this.month()%3)}j("D",["DD",2],"Do","date"),_e("D",Ue,Qt),_e("DD",Ue,rt),_e("Do",function(c,h){return c?h._dayOfMonthOrdinalParse||h._ordinalParse:h._dayOfMonthOrdinalParseLenient}),yt(["D","DD"],me),yt("Do",function(c,h){h[me]=Xe(c.match(Ue)[0])});var Tf=sn("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),_e("DDD",dn),_e("DDDD",Ot),yt(["DDD","DDDD"],function(c,h,g){g._dayOfYear=Xe(c)});function SS(c){var h=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return c==null?h:this.add(c-h,"d")}j("m",["mm",2],0,"minute"),_e("m",Ue,cr),_e("mm",Ue,rt),yt(["m","mm"],Ae);var _S=sn("Minutes",!1);j("s",["ss",2],0,"second"),_e("s",Ue,cr),_e("ss",Ue,rt),yt(["s","ss"],Ke);var xS=sn("Seconds",!1);j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return this.millisecond()*10}),j(0,["SSSSS",5],0,function(){return this.millisecond()*100}),j(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),j(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),j(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),j(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),_e("S",dn,Yt),_e("SS",dn,rt),_e("SSS",dn,Ot);var ur,kf;for(ur="SSSS";ur.length<=9;ur+="S")_e(ur,ht);function RS(c,h){h[st]=Xe(("0."+c)*1e3)}for(ur="S";ur.length<=9;ur+="S")yt(ur,RS);kf=sn("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");function TS(){return this._isUTC?"UTC":""}function kS(){return this._isUTC?"Coordinated Universal Time":""}var ye=I.prototype;ye.add=bC,ye.calendar=TC,ye.clone=kC,ye.diff=NC,ye.endOf=zC,ye.format=$C,ye.from=VC,ye.fromNow=jC,ye.to=BC,ye.toNow=WC,ye.get=yn,ye.invalidAt=JC,ye.isAfter=EC,ye.isBefore=PC,ye.isBetween=DC,ye.isSame=OC,ye.isSameOrAfter=MC,ye.isSameOrBefore=IC,ye.isValid=ZC,ye.lang=wf,ye.locale=bf,ye.localeData=Cf,ye.max=Zw,ye.min=Xw,ye.parsingFlags=QC,ye.set=Xs,ye.startOf=HC,ye.subtract=wC,ye.toArray=GC,ye.toObject=KC,ye.toDate=qC,ye.toISOString=FC,ye.inspect=LC,typeof Symbol<"u"&&Symbol.for!=null&&(ye[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ye.toJSON=XC,ye.toString=AC,ye.unix=UC,ye.valueOf=YC,ye.creationData=eS,ye.eraName=rS,ye.eraNarrow=sS,ye.eraAbbr=iS,ye.eraYear=aS,ye.year=$t,ye.isLeapYear=qt,ye.weekYear=pS,ye.isoWeekYear=mS,ye.quarter=ye.quarters=CS,ye.month=Jh,ye.daysInMonth=qb,ye.week=ye.weeks=tw,ye.isoWeek=ye.isoWeeks=nw,ye.weeksInYear=vS,ye.weeksInWeekYear=bS,ye.isoWeeksInYear=gS,ye.isoWeeksInISOWeekYear=yS,ye.date=Tf,ye.day=ye.days=mw,ye.weekday=gw,ye.isoWeekday=yw,ye.dayOfYear=SS,ye.hour=ye.hours=xw,ye.minute=ye.minutes=_S,ye.second=ye.seconds=xS,ye.millisecond=ye.milliseconds=kf,ye.utcOffset=iC,ye.utc=lC,ye.local=cC,ye.parseZone=dC,ye.hasAlignedHourOffset=uC,ye.isDST=hC,ye.isLocal=pC,ye.isUtcOffset=mC,ye.isUtc=pf,ye.isUTC=pf,ye.zoneAbbr=TS,ye.zoneName=kS,ye.dates=R("dates accessor is deprecated. Use date instead.",Tf),ye.months=R("months accessor is deprecated. Use month instead",Jh),ye.years=R("years accessor is deprecated. Use year instead",$t),ye.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",aC),ye.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",fC);function ES(c){return Mt(c*1e3)}function PS(){return Mt.apply(null,arguments).parseZone()}function Ef(c){return c}var ft=H.prototype;ft.calendar=M,ft.longDateFormat=he,ft.invalidDate=re,ft.ordinal=pe,ft.preparse=Ef,ft.postformat=Ef,ft.relativeTime=ge,ft.pastFuture=Re,ft.set=q,ft.eras=tS,ft.erasParse=nS,ft.erasConvertYear=oS,ft.erasAbbrRegex=cS,ft.erasNameRegex=lS,ft.erasNarrowRegex=dS,ft.months=Hb,ft.monthsShort=zb,ft.monthsParse=Ub,ft.monthsRegex=Kb,ft.monthsShortRegex=Gb,ft.week=Zb,ft.firstDayOfYear=ew,ft.firstDayOfWeek=Jb,ft.weekdays=dw,ft.weekdaysMin=hw,ft.weekdaysShort=uw,ft.weekdaysParse=pw,ft.weekdaysRegex=vw,ft.weekdaysShortRegex=bw,ft.weekdaysMinRegex=ww,ft.isPM=Sw,ft.meridiem=Rw;function Aa(c,h,g,_){var N=Lo(),X=b().set(_,h);return N[g](X,c)}function Pf(c,h,g){if(f(c)&&(h=c,c=void 0),c=c||"",h!=null)return Aa(c,h,g,"month");var _,N=[];for(_=0;_<12;_++)N[_]=Aa(c,_,g,"month");return N}function td(c,h,g,_){typeof c=="boolean"?(f(h)&&(g=h,h=void 0),h=h||""):(h=c,g=h,c=!1,f(h)&&(g=h,h=void 0),h=h||"");var N=Lo(),X=c?N._week.dow:0,de,Ee=[];if(g!=null)return Aa(h,(g+X)%7,_,"day");for(de=0;de<7;de++)Ee[de]=Aa(h,(de+X)%7,_,"day");return Ee}function DS(c,h){return Pf(c,h,"months")}function OS(c,h){return Pf(c,h,"monthsShort")}function MS(c,h,g){return td(c,h,g,"weekdays")}function IS(c,h,g){return td(c,h,g,"weekdaysShort")}function NS(c,h,g){return td(c,h,g,"weekdaysMin")}dr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(c){var h=c%10,g=Xe(c%100/10)===1?"th":h===1?"st":h===2?"nd":h===3?"rd":"th";return c+g}}),o.lang=R("moment.lang is deprecated. Use moment.locale instead.",dr),o.langData=R("moment.langData is deprecated. Use moment.localeData instead.",Lo);var $o=Math.abs;function AS(){var c=this._data;return this._milliseconds=$o(this._milliseconds),this._days=$o(this._days),this._months=$o(this._months),c.milliseconds=$o(c.milliseconds),c.seconds=$o(c.seconds),c.minutes=$o(c.minutes),c.hours=$o(c.hours),c.months=$o(c.months),c.years=$o(c.years),this}function Df(c,h,g,_){var N=io(h,g);return c._milliseconds+=_*N._milliseconds,c._days+=_*N._days,c._months+=_*N._months,c._bubble()}function FS(c,h){return Df(this,c,h,1)}function LS(c,h){return Df(this,c,h,-1)}function Of(c){return c<0?Math.floor(c):Math.ceil(c)}function $S(){var c=this._milliseconds,h=this._days,g=this._months,_=this._data,N,X,de,Ee,ze;return c>=0&&h>=0&&g>=0||c<=0&&h<=0&&g<=0||(c+=Of(nd(g)+h)*864e5,h=0,g=0),_.milliseconds=c%1e3,N=kn(c/1e3),_.seconds=N%60,X=kn(N/60),_.minutes=X%60,de=kn(X/60),_.hours=de%24,h+=kn(de/24),ze=kn(Mf(h)),g+=ze,h-=Of(nd(ze)),Ee=kn(g/12),g%=12,_.days=h,_.months=g,_.years=Ee,this}function Mf(c){return c*4800/146097}function nd(c){return c*146097/4800}function VS(c){if(!this.isValid())return NaN;var h,g,_=this._milliseconds;if(c=Ne(c),c==="month"||c==="quarter"||c==="year")switch(h=this._days+_/864e5,g=this._months+Mf(h),c){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(h=this._days+Math.round(nd(this._months)),c){case"week":return h/7+_/6048e5;case"day":return h+_/864e5;case"hour":return h*24+_/36e5;case"minute":return h*1440+_/6e4;case"second":return h*86400+_/1e3;case"millisecond":return Math.floor(h*864e5)+_;default:throw new Error("Unknown unit "+c)}}function Vo(c){return function(){return this.as(c)}}var If=Vo("ms"),jS=Vo("s"),BS=Vo("m"),WS=Vo("h"),HS=Vo("d"),zS=Vo("w"),YS=Vo("M"),US=Vo("Q"),qS=Vo("y"),GS=If;function KS(){return io(this)}function XS(c){return c=Ne(c),this.isValid()?this[c+"s"]():NaN}function Tr(c){return function(){return this.isValid()?this._data[c]:NaN}}var ZS=Tr("milliseconds"),QS=Tr("seconds"),JS=Tr("minutes"),e0=Tr("hours"),t0=Tr("days"),n0=Tr("months"),o0=Tr("years");function r0(){return kn(this.days()/7)}var jo=Math.round,rs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function s0(c,h,g,_,N){return N.relativeTime(h||1,!!g,c,_)}function i0(c,h,g,_){var N=io(c).abs(),X=jo(N.as("s")),de=jo(N.as("m")),Ee=jo(N.as("h")),ze=jo(N.as("d")),it=jo(N.as("M")),xn=jo(N.as("w")),Bo=jo(N.as("y")),hr=X<=g.ss&&["s",X]||X<g.s&&["ss",X]||de<=1&&["m"]||de<g.m&&["mm",de]||Ee<=1&&["h"]||Ee<g.h&&["hh",Ee]||ze<=1&&["d"]||ze<g.d&&["dd",ze];return g.w!=null&&(hr=hr||xn<=1&&["w"]||xn<g.w&&["ww",xn]),hr=hr||it<=1&&["M"]||it<g.M&&["MM",it]||Bo<=1&&["y"]||["yy",Bo],hr[2]=h,hr[3]=+c>0,hr[4]=_,s0.apply(null,hr)}function a0(c){return c===void 0?jo:typeof c=="function"?(jo=c,!0):!1}function l0(c,h){return rs[c]===void 0?!1:h===void 0?rs[c]:(rs[c]=h,c==="s"&&(rs.ss=h-1),!0)}function c0(c,h){if(!this.isValid())return this.localeData().invalidDate();var g=!1,_=rs,N,X;return typeof c=="object"&&(h=c,c=!1),typeof c=="boolean"&&(g=c),typeof h=="object"&&(_=Object.assign({},rs,h),h.s!=null&&h.ss==null&&(_.ss=h.s-1)),N=this.localeData(),X=i0(this,!g,_,N),g&&(X=N.pastFuture(+this,X)),N.postformat(X)}var od=Math.abs;function ss(c){return(c>0)-(c<0)||+c}function Fa(){if(!this.isValid())return this.localeData().invalidDate();var c=od(this._milliseconds)/1e3,h=od(this._days),g=od(this._months),_,N,X,de,Ee=this.asSeconds(),ze,it,xn,Bo;return Ee?(_=kn(c/60),N=kn(_/60),c%=60,_%=60,X=kn(g/12),g%=12,de=c?c.toFixed(3).replace(/\.?0+$/,""):"",ze=Ee<0?"-":"",it=ss(this._months)!==ss(Ee)?"-":"",xn=ss(this._days)!==ss(Ee)?"-":"",Bo=ss(this._milliseconds)!==ss(Ee)?"-":"",ze+"P"+(X?it+X+"Y":"")+(g?it+g+"M":"")+(h?xn+h+"D":"")+(N||_||c?"T":"")+(N?Bo+N+"H":"")+(_?Bo+_+"M":"")+(c?Bo+de+"S":"")):"P0D"}var lt=Pa.prototype;lt.isValid=nC,lt.abs=AS,lt.add=FS,lt.subtract=LS,lt.as=VS,lt.asMilliseconds=If,lt.asSeconds=jS,lt.asMinutes=BS,lt.asHours=WS,lt.asDays=HS,lt.asWeeks=zS,lt.asMonths=YS,lt.asQuarters=US,lt.asYears=qS,lt.valueOf=GS,lt._bubble=$S,lt.clone=KS,lt.get=XS,lt.milliseconds=ZS,lt.seconds=QS,lt.minutes=JS,lt.hours=e0,lt.days=t0,lt.weeks=r0,lt.months=n0,lt.years=o0,lt.humanize=c0,lt.toISOString=Fa,lt.toString=Fa,lt.toJSON=Fa,lt.locale=bf,lt.localeData=Cf,lt.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fa),lt.lang=wf,j("X",0,0,"unix"),j("x",0,0,"valueOf"),_e("x",nn),_e("X",Zt),yt("X",function(c,h,g){g._d=new Date(parseFloat(c)*1e3)}),yt("x",function(c,h,g){g._d=new Date(Xe(c))});//! moment.js
301
+ return o.version="2.30.1",r(Mt),o.fn=ye,o.min=Qw,o.max=Jw,o.now=eC,o.utc=b,o.unix=ES,o.months=DS,o.isDate=p,o.locale=dr,o.invalid=x,o.duration=io,o.isMoment=F,o.weekdays=MS,o.parseZone=PS,o.localeData=Lo,o.isDuration=Da,o.monthsShort=OS,o.weekdaysMin=NS,o.defineLocale=zc,o.updateLocale=Pw,o.locales=Dw,o.weekdaysShort=IS,o.normalizeUnits=Ne,o.relativeTimeRounding=a0,o.relativeTimeThreshold=l0,o.calendarFormat=RC,o.prototype=ye,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o})}(gl)),gl.exports}eF();const tF=`
302
302
  html body {
303
303
  font-family: "Courier", "sans-serif";
304
304
  font-size: 12px;
@@ -343,24 +343,24 @@ return o.version="2.30.1",r(Mt),o.fn=ye,o.min=Qw,o.max=Jw,o.now=eC,o.utc=b,o.uni
343
343
  .align_left {
344
344
  text-align: left;
345
345
  }
346
- `;class Wv{constructor(){this.clientId=0,this.clientName="",this.cssStyles=eF}getClientName(){const t=document.createElement("tr"),n=document.createElement("th");return n.classList.add("align_left"),n.setAttribute("colspan","100%"),n.innerText=`${this.clientName} [${this.clientId}]`,t.append(n),t}columnNames(t){const n=document.createElement("tr");return(t.grid?.getColumns()||[]).filter(a=>a.forPrint).forEach(({name:a})=>{const l=document.createElement("th");l.classList.add("column_name"),typeof a=="string"?l.innerText=a:l.innerText=" ",n.append(l)}),n}tableNameAndTime(t){const n=document.createElement("tr");n.classList.add("heading");const o=document.createElement("th");o.setAttribute("colspan","2"),o.classList.add("table_name"),o.innerText=t.name||t.id,n.append(o);const r=document.createElement("th");return r.setAttribute("colspan","100%"),r.classList.add("date_stamp"),r.innerText=xe().format("MM/DD/YYYY h:mm A"),n.append(r),n}createStyleElement(){const t=document.createElement("style");return t.innerHTML=this.cssStyles,t}createTableElement(t){const n=document.createElement("table");return n.append(this.createThead(t)),n.append(this.createTbody(t)),n}createTbody(t){const n=document.createElement("tbody"),o=t.grid;if(!o)return n;const i=o.getColumns().filter(d=>d.forPrint),a=o.getData();return Ec(a).forEach((d,u)=>{const f=this.createTr(i,u,o);n.append(f)}),n.append(...this.totals(t)),n}filters(t){const n=[];if(t.filter){const o=t.filter.print(t);if(o.length){const r=document.createElement("tr"),i=document.createElement("th");i.setAttribute("colspan","100%"),i.classList.add("align_left"),i.innerText="Applied filters",r.append(i),n.push(r)}o.forEach(r=>{n.push(r)})}return n}totals(t){return[]}createThead(t){const n=document.createElement("thead");return n.append(this.getClientName()),n.append(this.tableNameAndTime(t)),n.append(...this.filters(t)),n.append(this.columnNames(t)),n}createTr(t,n,o){const r=document.createElement("tr"),i=o.getData(),a=i.getItem(n),l=a.__group,d=a.__groupTotals;if(l){const u=document.createElement("td");u.setAttribute("colspan","100%"),u.innerText=jy(a.title),r.append(u)}else t.forEach(u=>{const f=document.createElement("td");u.cssClass&&f.classList.add(u.cssClass);const p=u.field,w=i.getItemMetadata(n)?.columns?.[p]?.formatter,b=u.printer||w||u.formatter;let m=a[p];if(d){const v=u.groupTotalsFormatter;m=v?v(a,u,o):""}else b&&(m=b(0,0,m,u,a,o));f.innerText=m||"",r.append(f)});return r}print(t,n,o){this.clientId=n,this.clientName=o;const r=window.open(),i=document.createElement("title");i.innerText=t.name||t.id;const a=r.document.querySelector("head");a.append(i),a.append(this.createStyleElement()),r.document.querySelector("body").append(this.createTableElement(t)),r.print()}}function tF(e){const t=document.querySelector(e);if(!t)return!0;const{scrollHeight:n,scrollWidth:o}=document.documentElement,{bottom:r,left:i,right:a,top:l}=t.getBoundingClientRect();return r<=0||i>=o||a<=0||l>=n}class nF{constructor(t){this.columnPicker=null,this.downloadManager=new MD,this.filter=new jN,this.hotKeysBehavior=new By,this.summaryColumnIds=[],this._grid=null,this._grouping={},this._isActive=!1,this._isEdited=!1,this._lastActiveCell={row:0,cell:0},this._observers=[],this._printer=new Wv;const{columnPicker:n,downloadManager:o,filter:r,hotKeys:i,id:a,name:l,printer:d,summaryColumnIds:u,totalCalculator:f}=t;this.id=a,this.name=l||"",n&&(this.columnPicker=n),o&&(this.downloadManager=o),r&&(this.filter=r),i&&(this.hotKeysBehavior=i),d&&(this.printer=d),u&&(this.summaryColumnIds=u),f&&(this.totalCalculator=f)}createGrid(t,n,o){this.reset();const r=new FA(`#${this.id}`,t,n,o);return this.grid=r,r.onKeyDown.subscribe(gm(r)),this.filter.register(r,this.id),this.grid}handleKeyboardEvent(t){tF(`#${this.id}`)||this.hotKeysBehavior.handleKeyboardEvent(t,this)}get grid(){return this._grid}get grouping(){return this._grouping}get isEdited(){return this._isEdited}set grid(t){this._grid=t}set grouping(t){if(this._grouping={...this._grouping,...t},!this.grid)return;const n=this.grid.getData();this.grouping.isGrouped?n.setGrouping(this.grouping.groups||[]):n.setGrouping([])}set isEdited(t){this._isEdited=t,this.notifyObservers()}set printer(t){this._printer=t}get printer(){return this._printer}get isActive(){return this._isActive}set isActive(t){this._isActive=t}get lastActiveSell(){return this._lastActiveCell}set lastActiveSell(t){this._lastActiveCell=t}resizeCanvas(){console.log(""),this.grid?.resizeCanvas()}registerObservers(t){~this._observers.indexOf(t)||this._observers.push(t)}notifyObservers(){for(const t of this._observers)t(this)}deleteObserver(t){const n=this._observers.indexOf(t);this._observers.splice(n,1)}reset(){this.grid?.onKeyDown.unsubscribe(gm(this.grid)),this.grid?.getSelectionModel()&&this.grid.setSelectedRows([]),this.hotKeysBehavior.resetQueue(),this.isEdited=!1,this.isActive=!1,this.grid=null}}class oF extends Ca{constructor(){super(...arguments),this.x=0,this.y=0}}const wn=new oF;class rF extends Ca{constructor(){super(...arguments),this.x=0,this.y=0}}const uo=new rF;class sF extends Ca{constructor(){super(...arguments),this._open=!1}get open(){return this._open}set open(t){this._open=t,this.notify()}get table(){return this._table}set table(t){this._table=t}}const Uo=new sF,iF=e=>{const t=e.getLength()-1;return e.getItem(t)},Fl=e=>{const t=e.getData(),n=t.getIdPropertyName(),o=t.getItems();let r=0;return o.forEach(i=>{i[n]>r&&(r=i[n])}),r+1},Th=()=>{$v.commitCurrentEdit()};function kh(e){return e.ctrlKey||e.metaKey}function Eh(e){return kh(e)&&e.keyCode===Kr.KeyB}function Hv(e){return e.shiftKey&&e.keyCode===Kr.KeyDel}function aF(e){return e.altKey&&e.keyCode===Kr.KeyS}function Ph(e){return kh(e)&&e.keyCode===Kr.KeyY}function Dh(e){return kh(e)&&e.keyCode===Kr.KeyZ}function lF(e){const t=e.getActiveCell();return!e.getSelectedRows().length&&!t}function cF(e){const t=dF(e),o=e.getData().getItems(),r=o.findIndex(a=>a.id===t)+1,i=o.length;return r||i}const Ec=e=>{const t=[];for(let n=0;n<e.getLength();n++)t.push(e.getItem(n));return t},zv=e=>{const t=e.getSelectedRows(),n=e.getData(),o=Ec(n),r=n.getItems(),i=[],a=n.getIdPropertyName();t.length?t.forEach(l=>{i.push({...o[l],[a]:Fl(e),isEdited:!0,isNew:!0})}):i.push({[a]:Fl(e),isEdited:!0,isNew:!0}),r.splice(cF(e),0,...i),n.setItems(r),e.setSelectedRows([]),e.invalidate()},dF=e=>{const t=e.getData(),n=Ec(t),o=e.getActiveCell()?.row;return o!==void 0?(n[o]||n[n.length-1])?.id:0};function Yv(e){return function(t){t.preventDefault(),Th(),wn.table=e,wn.x=t.pageX||0,wn.y=t.pageY||0,wn.notify()}}function uF(e){return function(t){t.preventDefault(),Th(),uo.table=e,uo.x=t.pageX||0,uo.y=t.pageY||0,uo.notify()}}class hF extends Ca{constructor(){super(...arguments),this._activeTable=null}get activeTable(){return this._activeTable}set activeTable(t){this._activeTable=t}}const yi=new hF,fF=e=>{function t(){if(e.id!==yi.activeTable?.id){e.isActive=!1;const o=e.grid;o?.resetActiveCell(),o?.setSelectedRows([])}}function n(){e.isActive=!0,yi.activeTable=e,yi.notify()}Fe.useEffect(()=>{yi.subscribe(t),document.addEventListener("keydown",e.handleKeyboardEvent.bind(e));const o=document.getElementById(e.id);if(o)return o.addEventListener("click",n,!0),()=>{yi.unsubscribe(t),document.removeEventListener("keydown",e.handleKeyboardEvent.bind(e)),o.removeEventListener("click",n,!0)}},[])},pF=e=>{const[t,n]=Fe.useState(mF(e));return Fe.useEffect(()=>{const o=r=>{n(i=>({...i,[r.id]:r.isEdited}))};return e.forEach(r=>{r.registerObservers(o)}),()=>{e.forEach(r=>{r.deleteObserver(o)})}},[]),Object.values(t).some(o=>o)};function mF(e){const t={};for(const n of e)t[n.id]=n.isEdited;return t}function Uv(e,t=300){let n;return function(...o){const r=()=>e.apply(this,o);clearTimeout(n),n=setTimeout(r,t)}}function gF(e){Fe.useEffect(()=>{function t(){e.grid?.resizeCanvas()}const n=Uv(t);return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[])}const yF=e=>{Fe.useEffect(()=>{function t(n){const o=n.grid;o&&n.totalCalculator?.calculate(o)}return e.registerObservers(t),()=>{e.deleteObserver(t)}},[])},vF=e=>{if(!e)return 0;if(typeof e=="number")return e;const t=e.replace(/\$|,|\s/g,""),n=t.replace(/\(|\)/g,"");return isNaN(Number(n))?0:t.startsWith("(")&&t.endsWith(")")?0-Number(n):Number(t)},$r=function(){const e=function(x,S,C,O){for(C=C||{},O=x.length;O--;C[x[O]]=S);return C},t=[1,3],n=[1,4],o=[1,5],r=[1,6],i=[1,7],a=[1,9],l=[1,10],d=[1,11],u=[1,12],f=[1,13],p=[1,14],y=[1,15],w=[5,6,7,8,9,10,11,12,14],b=[5,6,7,14],m=[5,6,7,8,9,14],v={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"+":6,"-":7,"*":8,"/":9,"^":10,"!":11,"%":12,"(":13,")":14,NUMBER:15,E:16,PI:17,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"+",7:"-",8:"*",9:"/",10:"^",11:"!",12:"%",13:"(",14:")",15:"NUMBER",16:"E",17:"PI"},productions_:[0,[3,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,2],[4,2],[4,3],[4,1],[4,1],[4,1]],performAction:function(S,C,O,I,F,z,R){const $=z.length-1;switch(F){case 1:return z[$-1];case 2:this.$=z[$-2]+z[$];break;case 3:this.$=z[$-2]-z[$];break;case 4:this.$=z[$-2]*z[$];break;case 5:this.$=z[$-2]/z[$];break;case 6:this.$=Math.pow(z[$-2],z[$]);break;case 7:this.$=function K(G){return G==0?1:K(G-1)*G}(z[$-1]);break;case 8:this.$=z[$-1]/100;break;case 9:this.$=-z[$];break;case 10:this.$=z[$-1];break;case 11:this.$=Number(S);break;case 12:this.$=Math.E;break;case 13:this.$=Math.PI;break}},table:[{3:1,4:2,7:t,13:n,15:o,16:r,17:i},{1:[3]},{5:[1,8],6:a,7:l,8:d,9:u,10:f,11:p,12:y},{4:16,7:t,13:n,15:o,16:r,17:i},{4:17,7:t,13:n,15:o,16:r,17:i},e(w,[2,11]),e(w,[2,12]),e(w,[2,13]),{1:[2,1]},{4:18,7:t,13:n,15:o,16:r,17:i},{4:19,7:t,13:n,15:o,16:r,17:i},{4:20,7:t,13:n,15:o,16:r,17:i},{4:21,7:t,13:n,15:o,16:r,17:i},{4:22,7:t,13:n,15:o,16:r,17:i},e(w,[2,7]),e(w,[2,8]),e(w,[2,9]),{6:a,7:l,8:d,9:u,10:f,11:p,12:y,14:[1,23]},e(b,[2,2],{8:d,9:u,10:f,11:p,12:y}),e(b,[2,3],{8:d,9:u,10:f,11:p,12:y}),e(m,[2,4],{10:f,11:p,12:y}),e(m,[2,5],{10:f,11:p,12:y}),e([5,6,7,8,9,10,14],[2,6],{11:p,12:y}),e(w,[2,10])],defaultActions:{8:[2,1]},parseError:function(S,C){if(C.recoverable)this.trace(S);else{const O=new Error(S);throw O.hash=C,O}},parse:function(S){const C=this;let O=[0],I=[null],F=[];const z=this.table;let R="",$=0,K=0;const G=2,q=1,Y=F.slice.call(arguments,1),H=Object.create(this.lexer),ae={yy:{}};for(let le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(ae.yy[le]=this.yy[le]);H.setInput(S,ae.yy),ae.yy.lexer=H,ae.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});let A=H.yylloc;F.push(A);const M=H.options&&H.options.ranges;typeof ae.yy.parseError=="function"?this.parseError=ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;var L=function(){let le;return le=H.lex()||q,typeof le!="number"&&(le=C.symbols_[le]||le),le};let B,ne,oe,se;const j={};let ee,J,te,ce;for(;;){if(ne=O[O.length-1],this.defaultActions[ne]?oe=this.defaultActions[ne]:((B===null||typeof B>"u")&&(B=L()),oe=z[ne]&&z[ne][B]),typeof oe>"u"||!oe.length||!oe[0]){let le="";ce=[];for(ee in z[ne])this.terminals_[ee]&&ee>G&&ce.push("'"+this.terminals_[ee]+"'");H.showPosition?le="Parse error on line "+($+1)+`:
346
+ `;class Wv{constructor(){this.clientId=0,this.clientName="",this.cssStyles=tF}getClientName(){const t=document.createElement("tr"),n=document.createElement("th");return n.classList.add("align_left"),n.setAttribute("colspan","100%"),n.innerText=`${this.clientName} [${this.clientId}]`,t.append(n),t}columnNames(t){const n=document.createElement("tr");return(t.grid?.getColumns()||[]).filter(a=>a.forPrint).forEach(({name:a})=>{const l=document.createElement("th");l.classList.add("column_name"),typeof a=="string"?l.innerText=a:l.innerText=" ",n.append(l)}),n}tableNameAndTime(t){const n=document.createElement("tr");n.classList.add("heading");const o=document.createElement("th");o.setAttribute("colspan","2"),o.classList.add("table_name"),o.innerText=t.name||t.id,n.append(o);const r=document.createElement("th");return r.setAttribute("colspan","100%"),r.classList.add("date_stamp"),r.innerText=xe().format("MM/DD/YYYY h:mm A"),n.append(r),n}createStyleElement(){const t=document.createElement("style");return t.innerHTML=this.cssStyles,t}createTableElement(t){const n=document.createElement("table");return n.append(this.createThead(t)),n.append(this.createTbody(t)),n}createTbody(t){const n=document.createElement("tbody"),o=t.grid;if(!o)return n;const i=o.getColumns().filter(d=>d.forPrint),a=o.getData();return Ec(a).forEach((d,u)=>{const f=this.createTr(i,u,o);n.append(f)}),n.append(...this.totals(t)),n}filters(t){const n=[];if(t.filter){const o=t.filter.print(t);if(o.length){const r=document.createElement("tr"),i=document.createElement("th");i.setAttribute("colspan","100%"),i.classList.add("align_left"),i.innerText="Applied filters",r.append(i),n.push(r)}o.forEach(r=>{n.push(r)})}return n}totals(t){return[]}createThead(t){const n=document.createElement("thead");return n.append(this.getClientName()),n.append(this.tableNameAndTime(t)),n.append(...this.filters(t)),n.append(this.columnNames(t)),n}createTr(t,n,o){const r=document.createElement("tr"),i=o.getData(),a=i.getItem(n),l=a.__group,d=a.__groupTotals;if(l){const u=document.createElement("td");u.setAttribute("colspan","100%"),u.innerText=jy(a.title),r.append(u)}else t.forEach(u=>{const f=document.createElement("td");u.cssClass&&f.classList.add(u.cssClass);const p=u.field,w=i.getItemMetadata(n)?.columns?.[p]?.formatter,b=u.printer||w||u.formatter;let m=a[p];if(d){const v=u.groupTotalsFormatter;m=v?v(a,u,o):""}else b&&(m=b(0,0,m,u,a,o));f.innerText=m||"",r.append(f)});return r}print(t,n,o){this.clientId=n,this.clientName=o;const r=window.open(),i=document.createElement("title");i.innerText=t.name||t.id;const a=r.document.querySelector("head");a.append(i),a.append(this.createStyleElement()),r.document.querySelector("body").append(this.createTableElement(t)),r.print()}}function nF(e){const t=document.querySelector(e);if(!t)return!0;const{scrollHeight:n,scrollWidth:o}=document.documentElement,{bottom:r,left:i,right:a,top:l}=t.getBoundingClientRect();return r<=0||i>=o||a<=0||l>=n}class oF{constructor(t){this.columnPicker=null,this.downloadManager=new MD,this.filter=new jN,this.hotKeysBehavior=new By,this.summaryColumnIds=[],this._grid=null,this._grouping={},this._isActive=!1,this._isEdited=!1,this._lastActiveCell={row:0,cell:0},this._observers=[],this._printer=new Wv;const{columnPicker:n,downloadManager:o,filter:r,hotKeys:i,id:a,name:l,printer:d,summaryColumnIds:u,totalCalculator:f}=t;this.id=a,this.name=l||"",n&&(this.columnPicker=n),o&&(this.downloadManager=o),r&&(this.filter=r),i&&(this.hotKeysBehavior=i),d&&(this.printer=d),u&&(this.summaryColumnIds=u),f&&(this.totalCalculator=f)}createGrid(t,n,o){this.reset();const r=new FA(`#${this.id}`,t,n,o);return this.grid=r,r.onKeyDown.subscribe(gm(r)),this.filter.register(r,this.id),this.grid}handleKeyboardEvent(t){nF(`#${this.id}`)||this.hotKeysBehavior.handleKeyboardEvent(t,this)}get grid(){return this._grid}get grouping(){return this._grouping}get isEdited(){return this._isEdited}set grid(t){this._grid=t}set grouping(t){if(this._grouping={...this._grouping,...t},!this.grid)return;const n=this.grid.getData();this.grouping.isGrouped?n.setGrouping(this.grouping.groups||[]):n.setGrouping([])}set isEdited(t){this._isEdited=t,this.notifyObservers()}set printer(t){this._printer=t}get printer(){return this._printer}get isActive(){return this._isActive}set isActive(t){this._isActive=t}get lastActiveSell(){return this._lastActiveCell}set lastActiveSell(t){this._lastActiveCell=t}resizeCanvas(){console.log(""),this.grid?.resizeCanvas()}registerObservers(t){~this._observers.indexOf(t)||this._observers.push(t)}notifyObservers(){for(const t of this._observers)t(this)}deleteObserver(t){const n=this._observers.indexOf(t);this._observers.splice(n,1)}reset(){this.grid?.onKeyDown.unsubscribe(gm(this.grid)),this.grid?.getSelectionModel()&&this.grid.setSelectedRows([]),this.hotKeysBehavior.resetQueue(),this.isEdited=!1,this.isActive=!1,this.grid=null}}class rF extends Ca{constructor(){super(...arguments),this.x=0,this.y=0}}const wn=new rF;class sF extends Ca{constructor(){super(...arguments),this.x=0,this.y=0}}const uo=new sF;class iF extends Ca{constructor(){super(...arguments),this._open=!1}get open(){return this._open}set open(t){this._open=t,this.notify()}get table(){return this._table}set table(t){this._table=t}}const Uo=new iF,aF=e=>{const t=e.getLength()-1;return e.getItem(t)},Fl=e=>{const t=e.getData(),n=t.getIdPropertyName(),o=t.getItems();let r=0;return o.forEach(i=>{i[n]>r&&(r=i[n])}),r+1},Th=()=>{$v.commitCurrentEdit()};function kh(e){return e.ctrlKey||e.metaKey}function Eh(e){return kh(e)&&e.keyCode===Kr.KeyB}function Hv(e){return e.shiftKey&&e.keyCode===Kr.KeyDel}function lF(e){return e.altKey&&e.keyCode===Kr.KeyS}function Ph(e){return kh(e)&&e.keyCode===Kr.KeyY}function Dh(e){return kh(e)&&e.keyCode===Kr.KeyZ}function cF(e){const t=e.getActiveCell();return!e.getSelectedRows().length&&!t}function dF(e){const t=uF(e),o=e.getData().getItems(),r=o.findIndex(a=>a.id===t)+1,i=o.length;return r||i}const Ec=e=>{const t=[];for(let n=0;n<e.getLength();n++)t.push(e.getItem(n));return t},zv=e=>{const t=e.getSelectedRows(),n=e.getData(),o=Ec(n),r=n.getItems(),i=[],a=n.getIdPropertyName();t.length?t.forEach(l=>{i.push({...o[l],[a]:Fl(e),isEdited:!0,isNew:!0})}):i.push({[a]:Fl(e),isEdited:!0,isNew:!0}),r.splice(dF(e),0,...i),n.setItems(r),e.setSelectedRows([]),e.invalidate()},uF=e=>{const t=e.getData(),n=Ec(t),o=e.getActiveCell()?.row;return o!==void 0?(n[o]||n[n.length-1])?.id:0};function Yv(e){return function(t){t.preventDefault(),Th(),wn.table=e,wn.x=t.pageX||0,wn.y=t.pageY||0,wn.notify()}}function hF(e){return function(t){t.preventDefault(),Th(),uo.table=e,uo.x=t.pageX||0,uo.y=t.pageY||0,uo.notify()}}class fF extends Ca{constructor(){super(...arguments),this._activeTable=null}get activeTable(){return this._activeTable}set activeTable(t){this._activeTable=t}}const yi=new fF,pF=e=>{function t(){if(e.id!==yi.activeTable?.id){e.isActive=!1;const o=e.grid;o?.resetActiveCell(),o?.setSelectedRows([])}}function n(){e.isActive=!0,yi.activeTable=e,yi.notify()}Fe.useEffect(()=>{yi.subscribe(t),document.addEventListener("keydown",e.handleKeyboardEvent.bind(e));const o=document.getElementById(e.id);if(o)return o.addEventListener("click",n,!0),()=>{yi.unsubscribe(t),document.removeEventListener("keydown",e.handleKeyboardEvent.bind(e)),o.removeEventListener("click",n,!0)}},[])},mF=e=>{const[t,n]=Fe.useState(gF(e));return Fe.useEffect(()=>{const o=r=>{n(i=>({...i,[r.id]:r.isEdited}))};return e.forEach(r=>{r.registerObservers(o)}),()=>{e.forEach(r=>{r.deleteObserver(o)})}},[]),Object.values(t).some(o=>o)};function gF(e){const t={};for(const n of e)t[n.id]=n.isEdited;return t}function Uv(e,t=300){let n;return function(...o){const r=()=>e.apply(this,o);clearTimeout(n),n=setTimeout(r,t)}}function yF(e){Fe.useEffect(()=>{function t(){e.grid?.resizeCanvas()}const n=Uv(t);return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[])}const vF=e=>{Fe.useEffect(()=>{function t(n){const o=n.grid;o&&n.totalCalculator?.calculate(o)}return e.registerObservers(t),()=>{e.deleteObserver(t)}},[])},bF=e=>{if(!e)return 0;if(typeof e=="number")return e;const t=e.replace(/\$|,|\s/g,""),n=t.replace(/\(|\)/g,"");return isNaN(Number(n))?0:t.startsWith("(")&&t.endsWith(")")?0-Number(n):Number(t)},$r=function(){const e=function(x,S,C,O){for(C=C||{},O=x.length;O--;C[x[O]]=S);return C},t=[1,3],n=[1,4],o=[1,5],r=[1,6],i=[1,7],a=[1,9],l=[1,10],d=[1,11],u=[1,12],f=[1,13],p=[1,14],y=[1,15],w=[5,6,7,8,9,10,11,12,14],b=[5,6,7,14],m=[5,6,7,8,9,14],v={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"+":6,"-":7,"*":8,"/":9,"^":10,"!":11,"%":12,"(":13,")":14,NUMBER:15,E:16,PI:17,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"+",7:"-",8:"*",9:"/",10:"^",11:"!",12:"%",13:"(",14:")",15:"NUMBER",16:"E",17:"PI"},productions_:[0,[3,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,2],[4,2],[4,3],[4,1],[4,1],[4,1]],performAction:function(S,C,O,I,F,z,R){const $=z.length-1;switch(F){case 1:return z[$-1];case 2:this.$=z[$-2]+z[$];break;case 3:this.$=z[$-2]-z[$];break;case 4:this.$=z[$-2]*z[$];break;case 5:this.$=z[$-2]/z[$];break;case 6:this.$=Math.pow(z[$-2],z[$]);break;case 7:this.$=function K(G){return G==0?1:K(G-1)*G}(z[$-1]);break;case 8:this.$=z[$-1]/100;break;case 9:this.$=-z[$];break;case 10:this.$=z[$-1];break;case 11:this.$=Number(S);break;case 12:this.$=Math.E;break;case 13:this.$=Math.PI;break}},table:[{3:1,4:2,7:t,13:n,15:o,16:r,17:i},{1:[3]},{5:[1,8],6:a,7:l,8:d,9:u,10:f,11:p,12:y},{4:16,7:t,13:n,15:o,16:r,17:i},{4:17,7:t,13:n,15:o,16:r,17:i},e(w,[2,11]),e(w,[2,12]),e(w,[2,13]),{1:[2,1]},{4:18,7:t,13:n,15:o,16:r,17:i},{4:19,7:t,13:n,15:o,16:r,17:i},{4:20,7:t,13:n,15:o,16:r,17:i},{4:21,7:t,13:n,15:o,16:r,17:i},{4:22,7:t,13:n,15:o,16:r,17:i},e(w,[2,7]),e(w,[2,8]),e(w,[2,9]),{6:a,7:l,8:d,9:u,10:f,11:p,12:y,14:[1,23]},e(b,[2,2],{8:d,9:u,10:f,11:p,12:y}),e(b,[2,3],{8:d,9:u,10:f,11:p,12:y}),e(m,[2,4],{10:f,11:p,12:y}),e(m,[2,5],{10:f,11:p,12:y}),e([5,6,7,8,9,10,14],[2,6],{11:p,12:y}),e(w,[2,10])],defaultActions:{8:[2,1]},parseError:function(S,C){if(C.recoverable)this.trace(S);else{const O=new Error(S);throw O.hash=C,O}},parse:function(S){const C=this;let O=[0],I=[null],F=[];const z=this.table;let R="",$=0,K=0;const G=2,q=1,Y=F.slice.call(arguments,1),H=Object.create(this.lexer),ae={yy:{}};for(let le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(ae.yy[le]=this.yy[le]);H.setInput(S,ae.yy),ae.yy.lexer=H,ae.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});let A=H.yylloc;F.push(A);const M=H.options&&H.options.ranges;typeof ae.yy.parseError=="function"?this.parseError=ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;var L=function(){let le;return le=H.lex()||q,typeof le!="number"&&(le=C.symbols_[le]||le),le};let B,ne,oe,se;const j={};let ee,J,te,ce;for(;;){if(ne=O[O.length-1],this.defaultActions[ne]?oe=this.defaultActions[ne]:((B===null||typeof B>"u")&&(B=L()),oe=z[ne]&&z[ne][B]),typeof oe>"u"||!oe.length||!oe[0]){let le="";ce=[];for(ee in z[ne])this.terminals_[ee]&&ee>G&&ce.push("'"+this.terminals_[ee]+"'");H.showPosition?le="Parse error on line "+($+1)+`:
347
347
  `+H.showPosition()+`
348
348
  Expecting `+ce.join(", ")+", got '"+(this.terminals_[B]||B)+"'":le="Parse error on line "+($+1)+": Unexpected "+(B==q?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(le,{text:H.match,token:this.terminals_[B]||B,line:H.yylineno,loc:A,expected:ce})}if(oe[0]instanceof Array&&oe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ne+", token: "+B);switch(oe[0]){case 1:O.push(B),I.push(H.yytext),F.push(H.yylloc),O.push(oe[1]),B=null,K=H.yyleng,R=H.yytext,$=H.yylineno,A=H.yylloc;break;case 2:if(J=this.productions_[oe[1]][1],j.$=I[I.length-J],j._$={first_line:F[F.length-(J||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(J||1)].first_column,last_column:F[F.length-1].last_column},M&&(j._$.range=[F[F.length-(J||1)].range[0],F[F.length-1].range[1]]),se=this.performAction.apply(j,[R,K,$,ae.yy,oe[1],I,F].concat(Y)),typeof se<"u")return se;J&&(O=O.slice(0,-1*J*2),I=I.slice(0,-1*J),F=F.slice(0,-1*J)),O.push(this.productions_[oe[1]][0]),I.push(j.$),F.push(j._$),te=z[O[O.length-2]][O[O.length-1]],O.push(te);break;case 3:return!0}}return!0}},D=function(){return{EOF:1,parseError:function(C,O){if(this.yy.parser)this.yy.parser.parseError(C,O);else throw new Error(C)},setInput:function(S,C){return this.yy=C||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){const S=this._input[0];return this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S,S.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},unput:function(S){const C=S.length,O=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;const I=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),O.length-1&&(this.yylineno-=O.length-1);const F=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:O?(O.length===I.length?this.yylloc.first_column:0)+I[I.length-O.length].length-O[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
349
349
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(S){this.unput(this.match.slice(S))},pastInput:function(){const S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},upcomingInput:function(){let S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){const S=this.pastInput(),C=new Array(S.length+1).join("-");return S+this.upcomingInput()+`
350
350
  `+C+"^"},test_match:function(S,C){let O,I,F;if(this.options.backtrack_lexer&&(F={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(F.yylloc.range=this.yylloc.range.slice(0))),I=S[0].match(/(?:\r\n?|\n).*/g),I&&(this.yylineno+=I.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:I?I[I.length-1].length-I[I.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],O=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),O)return O;if(this._backtrack){for(let z in F)this[z]=F[z];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);let S,C,O,I;this._more||(this.yytext="",this.match="");const F=this._currentRules();for(let z=0;z<F.length;z++)if(O=this._input.match(this.rules[F[z]]),O&&(!C||O[0].length>C[0].length)){if(C=O,I=z,this.options.backtrack_lexer){if(S=this.test_match(O,F[z]),S!==!1)return S;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(S=this.test_match(C,F[I]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
351
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){const C=this.next();return C||this.lex()},begin:function(C){this.conditionStack.push(C)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},pushState:function(C){this.begin(C)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(C,O,I,F){switch(I){case 0:break;case 1:return 15;case 2:return 8;case 3:return 9;case 4:return 7;case 5:return 6;case 6:return 10;case 7:return 11;case 8:return 12;case 9:return 13;case 10:return 14;case 11:return 17;case 12:return 16;case 13:return 5;case 14:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:[0-9]+(\.[0-9]+)?\b)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:!)/,/^(?:%)/,/^(?:\()/,/^(?:\))/,/^(?:PI\b)/,/^(?:E\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],inclusive:!0}}}}();v.lexer=D;function k(){this.yy={},this.parse=this.parse.bind(this)}return k.prototype=v,v.Parser=k,new k}();typeof require<"u"&&typeof exports<"u"&&(exports.parser=$r,exports.Parser=$r.Parser,exports.parse=function(){return $r.parse.apply($r,arguments)});const qv=2;class bF extends xm{isValueChanged(){const t=vF(this.defaultValue);let n=0;try{n=$r.parse(this.input.value||"0")}catch{return!0}return!n&&!t?!1:n!==t}loadValue(t){const n=Number(t[this.args.column.field]||"0");this.defaultValue=n.toFixed(qv),this.input.value=this.defaultValue,this.input.defaultValue=this.input.value,this.input.select()}serializeValue(){let t=$r.parse(this.input.value||"0");xm.AllowEmptyValue?!t&&t!==0&&(t=void 0):t=t||0;const n=this.getDecimalPlaces();return n!==null&&(t||t===0)&&t.toFixed&&(t=parseFloat(t.toFixed(n))),t}validate(){let t=0;try{if(t=$r.parse(`${this.input.value}`),t===1/0)throw new Error}catch{return{valid:!1,msg:"Please enter a valid number"}}if(this.args.column.validator){const n=this.args.column.validator(t,this.args);if(!n.valid)return n}return{valid:!0,msg:null}}}bF.DefaultDecimalPlaces=qv;class wF{constructor(){this.currentFocus=-1,this.defaultValue="",this.id="autocomplete",this.input=document.createElement("input"),this.keyCaptureList=[Br.UP,Br.DOWN,Br.ENTER]}applyValue(t,n){t[this.args.column.field]=n}closeAllList(){this.list?.remove(),this.list=void 0,this.currentFocus=-1}destroy(){this.input.removeEventListener("input",this.onInput.bind(this)),this.input.removeEventListener("keydown",this.onKeydown.bind(this)),this.closeAllList(),this.input.remove()}focus(){this.input.focus()}init(){this.navOnLR=this.args.grid.getOptions().editorCellNavOnLRKeys,this.input.setAttribute("type","text"),this.input.classList.add("editor-text"),this.args.container.append(this.input),this.input.addEventListener("input",this.onInput.bind(this)),this.input.addEventListener("keydown",this.onKeydown.bind(this)),this.input.focus(),this.input.select()}isValueChanged(){return!(this.input.value==""&&this.defaultValue==null)&&this.input.value!=this.defaultValue}loadValue(t){this.defaultValue=t[this.args.column.field]||"",this.input.value=this.defaultValue,this.input.defaultValue=this.defaultValue,this.input.focus(),this.input.select()}makeVisible(t){const n=t.closest(".grid-canvas");if(!n)return;const{bottom:o,right:r}=t.getBoundingClientRect(),{bottom:i,right:a}=n.getBoundingClientRect();if(o>=i){const l=this.args.grid.getOptions().rowHeight;t.style.position="absolute",t.style.bottom=`${l}px`}r>=a&&(t.style.position="absolute",t.style.right="0")}onKeydown(t){if(t.key===Ar.ArrowLeft){this.navOnLR&&this.args.grid.navigatePrev(),t.stopImmediatePropagation();return}else if(t.key===Ar.ArrowRight){this.navOnLR&&this.args.grid.navigateNext(),t.stopImmediatePropagation();return}if(!this.list)return;const n=this.list.getElementsByTagName("div");t.key===Ar.ArrowDown?(this.currentFocus++,this.setActive(n)):t.key===Ar.ArrowUp?(this.currentFocus--,this.setActive(n)):(t.key===Ar.Enter||t.key===Ar.Tab)&&(t.preventDefault(),n.length===1&&(this.currentFocus=0),this.currentFocus>-1&&n&&n[this.currentFocus].click())}removeActive(t){for(let n=0;n<t.length;n++)t[n].classList.remove("active")}scrollToElement(t){const n=t.parentElement;if(!n)return;const{clientHeight:o,offsetTop:r}=t,{clientHeight:i,scrollTop:a}=n;r>=a+i?n.scrollTop=r-o*1.5:r-o<=a&&(n.scrollTop=r-i)}serializeValue(){return this.input.value}setActive(t){if(!t.length)return;this.removeActive(t),this.currentFocus>=t.length&&(this.currentFocus=0),this.currentFocus<0&&(this.currentFocus=t.length-1);const n=t[this.currentFocus];n.classList.add("active"),this.scrollToElement(n)}validate(){if(this.args.column.validator){const t=this.args.column.validator(this.input.value,this.args);if(!t.valid)return t}return{valid:!0,msg:null}}}var yl={exports:{}};const CF=h0(FN);/*!
351
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){const C=this.next();return C||this.lex()},begin:function(C){this.conditionStack.push(C)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},pushState:function(C){this.begin(C)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(C,O,I,F){switch(I){case 0:break;case 1:return 15;case 2:return 8;case 3:return 9;case 4:return 7;case 5:return 6;case 6:return 10;case 7:return 11;case 8:return 12;case 9:return 13;case 10:return 14;case 11:return 17;case 12:return 16;case 13:return 5;case 14:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:[0-9]+(\.[0-9]+)?\b)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:!)/,/^(?:%)/,/^(?:\()/,/^(?:\))/,/^(?:PI\b)/,/^(?:E\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],inclusive:!0}}}}();v.lexer=D;function k(){this.yy={},this.parse=this.parse.bind(this)}return k.prototype=v,v.Parser=k,new k}();typeof require<"u"&&typeof exports<"u"&&(exports.parser=$r,exports.Parser=$r.Parser,exports.parse=function(){return $r.parse.apply($r,arguments)});const qv=2;class wF extends xm{isValueChanged(){const t=bF(this.defaultValue);let n=0;try{n=$r.parse(this.input.value||"0")}catch{return!0}return!n&&!t?!1:n!==t}loadValue(t){const n=Number(t[this.args.column.field]||"0");this.defaultValue=n.toFixed(qv),this.input.value=this.defaultValue,this.input.defaultValue=this.input.value,this.input.select()}serializeValue(){let t=$r.parse(this.input.value||"0");xm.AllowEmptyValue?!t&&t!==0&&(t=void 0):t=t||0;const n=this.getDecimalPlaces();return n!==null&&(t||t===0)&&t.toFixed&&(t=parseFloat(t.toFixed(n))),t}validate(){let t=0;try{if(t=$r.parse(`${this.input.value}`),t===1/0)throw new Error}catch{return{valid:!1,msg:"Please enter a valid number"}}if(this.args.column.validator){const n=this.args.column.validator(t,this.args);if(!n.valid)return n}return{valid:!0,msg:null}}}wF.DefaultDecimalPlaces=qv;class CF{constructor(){this.currentFocus=-1,this.defaultValue="",this.id="autocomplete",this.input=document.createElement("input"),this.keyCaptureList=[Br.UP,Br.DOWN,Br.ENTER]}applyValue(t,n){t[this.args.column.field]=n}closeAllList(){this.list?.remove(),this.list=void 0,this.currentFocus=-1}destroy(){this.input.removeEventListener("input",this.onInput.bind(this)),this.input.removeEventListener("keydown",this.onKeydown.bind(this)),this.closeAllList(),this.input.remove()}focus(){this.input.focus()}init(){this.navOnLR=this.args.grid.getOptions().editorCellNavOnLRKeys,this.input.setAttribute("type","text"),this.input.classList.add("editor-text"),this.args.container.append(this.input),this.input.addEventListener("input",this.onInput.bind(this)),this.input.addEventListener("keydown",this.onKeydown.bind(this)),this.input.focus(),this.input.select()}isValueChanged(){return!(this.input.value==""&&this.defaultValue==null)&&this.input.value!=this.defaultValue}loadValue(t){this.defaultValue=t[this.args.column.field]||"",this.input.value=this.defaultValue,this.input.defaultValue=this.defaultValue,this.input.focus(),this.input.select()}makeVisible(t){const n=t.closest(".grid-canvas");if(!n)return;const{bottom:o,right:r}=t.getBoundingClientRect(),{bottom:i,right:a}=n.getBoundingClientRect();if(o>=i){const l=this.args.grid.getOptions().rowHeight;t.style.position="absolute",t.style.bottom=`${l}px`}r>=a&&(t.style.position="absolute",t.style.right="0")}onKeydown(t){if(t.key===Ar.ArrowLeft){this.navOnLR&&this.args.grid.navigatePrev(),t.stopImmediatePropagation();return}else if(t.key===Ar.ArrowRight){this.navOnLR&&this.args.grid.navigateNext(),t.stopImmediatePropagation();return}if(!this.list)return;const n=this.list.getElementsByTagName("div");t.key===Ar.ArrowDown?(this.currentFocus++,this.setActive(n)):t.key===Ar.ArrowUp?(this.currentFocus--,this.setActive(n)):(t.key===Ar.Enter||t.key===Ar.Tab)&&(t.preventDefault(),n.length===1&&(this.currentFocus=0),this.currentFocus>-1&&n&&n[this.currentFocus].click())}removeActive(t){for(let n=0;n<t.length;n++)t[n].classList.remove("active")}scrollToElement(t){const n=t.parentElement;if(!n)return;const{clientHeight:o,offsetTop:r}=t,{clientHeight:i,scrollTop:a}=n;r>=a+i?n.scrollTop=r-o*1.5:r-o<=a&&(n.scrollTop=r-i)}serializeValue(){return this.input.value}setActive(t){if(!t.length)return;this.removeActive(t),this.currentFocus>=t.length&&(this.currentFocus=0),this.currentFocus<0&&(this.currentFocus=t.length-1);const n=t[this.currentFocus];n.classList.add("active"),this.scrollToElement(n)}validate(){if(this.args.column.validator){const t=this.args.column.validator(this.input.value,this.args);if(!t.valid)return t}return{valid:!0,msg:null}}}var yl={exports:{}};const SF=h0(FN);/*!
352
352
  * Pikaday
353
353
  *
354
354
  * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
355
- */var SF=yl.exports,Mm;function _F(){return Mm||(Mm=1,function(e,t){(function(n,o){var r;{try{r=CF}catch{}e.exports=o(r)}})(SF,function(n){var o=typeof n=="function",r=!!window.addEventListener,i=window.document,a=window.setTimeout,l=function(A,M,L,B){r?A.addEventListener(M,L,!!B):A.attachEvent("on"+M,L)},d=function(A,M,L,B){r?A.removeEventListener(M,L,!!B):A.detachEvent("on"+M,L)},u=function(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")},f=function(A,M){return(" "+A.className+" ").indexOf(" "+M+" ")!==-1},p=function(A,M){f(A,M)||(A.className=A.className===""?M:A.className+" "+M)},y=function(A,M){A.className=u((" "+A.className+" ").replace(" "+M+" "," "))},w=function(A){return/Array/.test(Object.prototype.toString.call(A))},b=function(A){return/Date/.test(Object.prototype.toString.call(A))&&!isNaN(A.getTime())},m=function(A){var M=A.getDay();return M===0||M===6},v=function(A){return A%4===0&&A%100!==0||A%400===0},D=function(A,M){return[31,v(A)?29:28,31,30,31,30,31,31,30,31,30,31][M]},k=function(A){b(A)&&A.setHours(0,0,0,0)},x=function(A,M){return A.getTime()===M.getTime()},S=function(A,M,L){var B,ne;for(B in M)ne=A[B]!==void 0,ne&&typeof M[B]=="object"&&M[B]!==null&&M[B].nodeName===void 0?b(M[B])?L&&(A[B]=new Date(M[B].getTime())):w(M[B])?L&&(A[B]=M[B].slice(0)):A[B]=S({},M[B],L):(L||!ne)&&(A[B]=M[B]);return A},C=function(A,M,L){var B;i.createEvent?(B=i.createEvent("HTMLEvents"),B.initEvent(M,!0,!1),B=S(B,L),A.dispatchEvent(B)):i.createEventObject&&(B=i.createEventObject(),B=S(B,L),A.fireEvent("on"+M,B))},O=function(A){return A.month<0&&(A.year-=Math.ceil(Math.abs(A.month)/12),A.month+=12),A.month>11&&(A.year+=Math.floor(Math.abs(A.month)/12),A.month-=12),A},I={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},F=function(A,M,L){for(M+=A.firstDay;M>=7;)M-=7;return L?A.i18n.weekdaysShort[M]:A.i18n.weekdays[M]},z=function(A){var M=[],L="false";if(A.isEmpty)if(A.showDaysInNextAndPreviousMonths)M.push("is-outside-current-month"),A.enableSelectionDaysInNextAndPreviousMonths||M.push("is-selection-disabled");else return'<td class="is-empty"></td>';return A.isDisabled&&M.push("is-disabled"),A.isToday&&M.push("is-today"),A.isSelected&&(M.push("is-selected"),L="true"),A.hasEvent&&M.push("has-event"),A.isInRange&&M.push("is-inrange"),A.isStartRange&&M.push("is-startrange"),A.isEndRange&&M.push("is-endrange"),'<td data-day="'+A.day+'" class="'+M.join(" ")+'" aria-selected="'+L+'"><button class="pika-button pika-day" type="button" data-pika-year="'+A.year+'" data-pika-month="'+A.month+'" data-pika-day="'+A.day+'">'+A.day+"</button></td>"},R=function(A,M){A.setHours(0,0,0,0);var L=A.getDate(),B=A.getDay(),ne=M,oe=ne-1,se=7,j=function(le){return(le+se-1)%se};A.setDate(L+oe-j(B));var ee=new Date(A.getFullYear(),0,ne),J=24*60*60*1e3,te=(A.getTime()-ee.getTime())/J,ce=1+Math.round((te-oe+j(ee.getDay()))/se);return ce},$=function(A,M,L,B){var ne=new Date(L,M,A),oe=o?n(ne).isoWeek():R(ne,B);return'<td class="pika-week">'+oe+"</td>"},K=function(A,M,L,B){return'<tr class="pika-row'+(L?" pick-whole-week":"")+(B?" is-selected":"")+'">'+(M?A.reverse():A).join("")+"</tr>"},G=function(A){return"<tbody>"+A.join("")+"</tbody>"},q=function(A){var M,L=[];for(A.showWeekNumber&&L.push("<th></th>"),M=0;M<7;M++)L.push('<th scope="col"><abbr title="'+F(A,M)+'">'+F(A,M,!0)+"</abbr></th>");return"<thead><tr>"+(A.isRTL?L.reverse():L).join("")+"</tr></thead>"},Y=function(A,M,L,B,ne,oe){var se,j,ee,J=A._o,te=L===J.minYear,ce=L===J.maxYear,le='<div id="'+oe+'" class="pika-title" role="heading" aria-live="assertive">',he,W,re=!0,Z=!0;for(ee=[],se=0;se<12;se++)ee.push('<option value="'+(L===ne?se-M:12+se-M)+'"'+(se===B?' selected="selected"':"")+(te&&se<J.minMonth||ce&&se>J.maxMonth?' disabled="disabled"':"")+">"+J.i18n.months[se]+"</option>");for(he='<div class="pika-label">'+J.i18n.months[B]+'<select class="pika-select pika-select-month" tabindex="-1">'+ee.join("")+"</select></div>",w(J.yearRange)?(se=J.yearRange[0],j=J.yearRange[1]+1):(se=L-J.yearRange,j=1+L+J.yearRange),ee=[];se<j&&se<=J.maxYear;se++)se>=J.minYear&&ee.push('<option value="'+se+'"'+(se===L?' selected="selected"':"")+">"+se+"</option>");return W='<div class="pika-label">'+L+J.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+ee.join("")+"</select></div>",J.showMonthAfterYear?le+=W+he:le+=he+W,te&&(B===0||J.minMonth>=B)&&(re=!1),ce&&(B===11||J.maxMonth<=B)&&(Z=!1),M===0&&(le+='<button class="pika-prev'+(re?"":" is-disabled")+'" type="button">'+J.i18n.previousMonth+"</button>"),M===A._o.numberOfMonths-1&&(le+='<button class="pika-next'+(Z?"":" is-disabled")+'" type="button">'+J.i18n.nextMonth+"</button>"),le+="</div>"},H=function(A,M,L){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+L+'">'+q(A)+G(M)+"</table>"},ae=function(A){var M=this,L=M.config(A);M._onMouseDown=function(ne){if(M._v){ne=ne||window.event;var oe=ne.target||ne.srcElement;if(oe)if(f(oe,"is-disabled")||(f(oe,"pika-button")&&!f(oe,"is-empty")&&!f(oe.parentNode,"is-disabled")?(M.setDate(new Date(oe.getAttribute("data-pika-year"),oe.getAttribute("data-pika-month"),oe.getAttribute("data-pika-day"))),L.bound&&a(function(){M.hide(),L.blurFieldOnSelect&&L.field&&L.field.blur()},100)):f(oe,"pika-prev")?M.prevMonth():f(oe,"pika-next")&&M.nextMonth()),f(oe,"pika-select"))M._c=!0;else if(ne.preventDefault)ne.preventDefault();else return ne.returnValue=!1,!1}},M._onChange=function(ne){ne=ne||window.event;var oe=ne.target||ne.srcElement;oe&&(f(oe,"pika-select-month")?M.gotoMonth(oe.value):f(oe,"pika-select-year")&&M.gotoYear(oe.value))},M._onKeyChange=function(ne){if(ne=ne||window.event,M.isVisible())switch(ne.keyCode){case 13:case 27:L.field&&L.field.blur();break;case 37:M.adjustDate("subtract",1);break;case 38:M.adjustDate("subtract",7);break;case 39:M.adjustDate("add",1);break;case 40:M.adjustDate("add",7);break;case 8:case 46:M.setDate(null);break}},M._parseFieldValue=function(){if(L.parse)return L.parse(L.field.value,L.format);if(o){var ne=n(L.field.value,L.format,L.formatStrict);return ne&&ne.isValid()?ne.toDate():null}else return new Date(Date.parse(L.field.value))},M._onInputChange=function(ne){var oe;ne.firedBy!==M&&(oe=M._parseFieldValue(),b(oe)&&M.setDate(oe),M._v||M.show())},M._onInputFocus=function(){M.show()},M._onInputClick=function(){M.show()},M._onInputBlur=function(){var ne=i.activeElement;do if(f(ne,"pika-single"))return;while(ne=ne.parentNode);M._c||(M._b=a(function(){M.hide()},50)),M._c=!1},M._onClick=function(ne){ne=ne||window.event;var oe=ne.target||ne.srcElement,se=oe;if(oe){!r&&f(oe,"pika-select")&&(oe.onchange||(oe.setAttribute("onchange","return;"),l(oe,"change",M._onChange)));do if(f(se,"pika-single")||se===L.trigger)return;while(se=se.parentNode);M._v&&oe!==L.trigger&&se!==L.trigger&&M.hide()}},M.el=i.createElement("div"),M.el.className="pika-single"+(L.isRTL?" is-rtl":"")+(L.theme?" "+L.theme:""),l(M.el,"mousedown",M._onMouseDown,!0),l(M.el,"touchend",M._onMouseDown,!0),l(M.el,"change",M._onChange),L.keyboardInput&&l(i,"keydown",M._onKeyChange),L.field&&(L.container?L.container.appendChild(M.el):L.bound?i.body.appendChild(M.el):L.field.parentNode.insertBefore(M.el,L.field.nextSibling),l(L.field,"change",M._onInputChange),L.defaultDate||(L.defaultDate=M._parseFieldValue(),L.setDefaultDate=!0));var B=L.defaultDate;b(B)?L.setDefaultDate?M.setDate(B,!0):M.gotoDate(B):M.gotoDate(new Date),L.bound?(this.hide(),M.el.className+=" is-bound",l(L.trigger,"click",M._onInputClick),l(L.trigger,"focus",M._onInputFocus),l(L.trigger,"blur",M._onInputBlur)):this.show()};return ae.prototype={config:function(A){this._o||(this._o=S({},I,!0));var M=S(this._o,A,!0);M.isRTL=!!M.isRTL,M.field=M.field&&M.field.nodeName?M.field:null,M.theme=typeof M.theme=="string"&&M.theme?M.theme:null,M.bound=!!(M.bound!==void 0?M.field&&M.bound:M.field),M.trigger=M.trigger&&M.trigger.nodeName?M.trigger:M.field,M.disableWeekends=!!M.disableWeekends,M.disableDayFn=typeof M.disableDayFn=="function"?M.disableDayFn:null;var L=parseInt(M.numberOfMonths,10)||1;if(M.numberOfMonths=L>4?4:L,b(M.minDate)||(M.minDate=!1),b(M.maxDate)||(M.maxDate=!1),M.minDate&&M.maxDate&&M.maxDate<M.minDate&&(M.maxDate=M.minDate=!1),M.minDate&&this.setMinDate(M.minDate),M.maxDate&&this.setMaxDate(M.maxDate),w(M.yearRange)){var B=new Date().getFullYear()-10;M.yearRange[0]=parseInt(M.yearRange[0],10)||B,M.yearRange[1]=parseInt(M.yearRange[1],10)||B}else M.yearRange=Math.abs(parseInt(M.yearRange,10))||I.yearRange,M.yearRange>100&&(M.yearRange=100);return M},toString:function(A){return A=A||this._o.format,b(this._d)?this._o.toString?this._o.toString(this._d,A):o?n(this._d).format(A):this._d.toDateString():""},getMoment:function(){return o?n(this._d):null},setMoment:function(A,M){o&&n.isMoment(A)&&this.setDate(A.toDate(),M)},getDate:function(){return b(this._d)?new Date(this._d.getTime()):null},setDate:function(A,M){if(!A)return this._d=null,this._o.field&&(this._o.field.value="",C(this._o.field,"change",{firedBy:this})),this.draw();if(typeof A=="string"&&(A=new Date(Date.parse(A))),!!b(A)){var L=this._o.minDate,B=this._o.maxDate;b(L)&&A<L?A=L:b(B)&&A>B&&(A=B),this._d=new Date(A.getTime()),k(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),C(this._o.field,"change",{firedBy:this})),!M&&typeof this._o.onSelect=="function"&&this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(A){var M=!0;if(b(A)){if(this.calendars){var L=new Date(this.calendars[0].year,this.calendars[0].month,1),B=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),ne=A.getTime();B.setMonth(B.getMonth()+1),B.setDate(B.getDate()-1),M=ne<L.getTime()||B.getTime()<ne}M&&(this.calendars=[{month:A.getMonth(),year:A.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(A,M){var L=this.getDate()||new Date,B=parseInt(M)*24*60*60*1e3,ne;A==="add"?ne=new Date(L.valueOf()+B):A==="subtract"&&(ne=new Date(L.valueOf()-B)),this.setDate(ne)},adjustCalendars:function(){this.calendars[0]=O(this.calendars[0]);for(var A=1;A<this._o.numberOfMonths;A++)this.calendars[A]=O({month:this.calendars[0].month+A,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(A){isNaN(A)||(this.calendars[0].month=parseInt(A,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(A){isNaN(A)||(this.calendars[0].year=parseInt(A,10),this.adjustCalendars())},setMinDate:function(A){A instanceof Date?(k(A),this._o.minDate=A,this._o.minYear=A.getFullYear(),this._o.minMonth=A.getMonth()):(this._o.minDate=I.minDate,this._o.minYear=I.minYear,this._o.minMonth=I.minMonth,this._o.startRange=I.startRange),this.draw()},setMaxDate:function(A){A instanceof Date?(k(A),this._o.maxDate=A,this._o.maxYear=A.getFullYear(),this._o.maxMonth=A.getMonth()):(this._o.maxDate=I.maxDate,this._o.maxYear=I.maxYear,this._o.maxMonth=I.maxMonth,this._o.endRange=I.endRange),this.draw()},setStartRange:function(A){this._o.startRange=A},setEndRange:function(A){this._o.endRange=A},draw:function(A){if(!(!this._v&&!A)){var M=this._o,L=M.minYear,B=M.maxYear,ne=M.minMonth,oe=M.maxMonth,se="",j;this._y<=L&&(this._y=L,!isNaN(ne)&&this._m<ne&&(this._m=ne)),this._y>=B&&(this._y=B,!isNaN(oe)&&this._m>oe&&(this._m=oe));for(var ee=0;ee<M.numberOfMonths;ee++)j="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),se+='<div class="pika-lendar">'+Y(this,ee,this.calendars[ee].year,this.calendars[ee].month,this.calendars[0].year,j)+this.render(this.calendars[ee].year,this.calendars[ee].month,j)+"</div>";this.el.innerHTML=se,M.bound&&M.field.type!=="hidden"&&a(function(){M.trigger.focus()},1),typeof this._o.onDraw=="function"&&this._o.onDraw(this),M.bound&&M.field.setAttribute("aria-label",M.ariaLabel)}},adjustPosition:function(){var A,M,L,B,ne,oe,se,j,ee,J,te,ce;if(!this._o.container){if(this.el.style.position="absolute",A=this._o.trigger,M=A,L=this.el.offsetWidth,B=this.el.offsetHeight,ne=window.innerWidth||i.documentElement.clientWidth,oe=window.innerHeight||i.documentElement.clientHeight,se=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,te=!0,ce=!0,typeof A.getBoundingClientRect=="function")J=A.getBoundingClientRect(),j=J.left+window.pageXOffset,ee=J.bottom+window.pageYOffset;else for(j=M.offsetLeft,ee=M.offsetTop+M.offsetHeight;M=M.offsetParent;)j+=M.offsetLeft,ee+=M.offsetTop;(this._o.reposition&&j+L>ne||this._o.position.indexOf("right")>-1&&j-L+A.offsetWidth>0)&&(j=j-L+A.offsetWidth,te=!1),(this._o.reposition&&ee+B>oe+se||this._o.position.indexOf("top")>-1&&ee-B-A.offsetHeight>0)&&(ee=ee-B-A.offsetHeight,ce=!1),this.el.style.left=j+"px",this.el.style.top=ee+"px",p(this.el,te?"left-aligned":"right-aligned"),p(this.el,ce?"bottom-aligned":"top-aligned"),y(this.el,te?"right-aligned":"left-aligned"),y(this.el,ce?"top-aligned":"bottom-aligned")}},render:function(A,M,L){var B=this._o,ne=new Date,oe=D(A,M),se=new Date(A,M,1).getDay(),j=[],ee=[];k(ne),B.firstDay>0&&(se-=B.firstDay,se<0&&(se+=7));for(var J=M===0?11:M-1,te=M===11?0:M+1,ce=M===0?A-1:A,le=M===11?A+1:A,he=D(ce,J),W=oe+se,re=W;re>7;)re-=7;W+=7-re;for(var Z=!1,fe=0,pe=0;fe<W;fe++){var be=new Date(A,M,1+(fe-se)),ge=b(this._d)?x(be,this._d):!1,Re=x(be,ne),Ve=B.events.indexOf(be.toDateString())!==-1,Ne=fe<se||fe>=oe+se,Je=1+(fe-se),ke=M,ut=A,Yt=B.startRange&&x(B.startRange,be),rt=B.endRange&&x(B.endRange,be),Ot=B.startRange&&B.endRange&&B.startRange<be&&be<B.endRange,Ut=B.minDate&&be<B.minDate||B.maxDate&&be>B.maxDate||B.disableWeekends&&m(be)||B.disableDayFn&&B.disableDayFn(be);Ne&&(fe<se?(Je=he+Je,ke=J,ut=ce):(Je=Je-oe,ke=te,ut=le));var Lt={day:Je,month:ke,year:ut,hasEvent:Ve,isSelected:ge,isToday:Re,isDisabled:Ut,isEmpty:Ne,isStartRange:Yt,isEndRange:rt,isInRange:Ot,showDaysInNextAndPreviousMonths:B.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:B.enableSelectionDaysInNextAndPreviousMonths};B.pickWholeWeek&&ge&&(Z=!0),ee.push(z(Lt)),++pe===7&&(B.showWeekNumber&&ee.unshift($(fe-se,M,A,B.firstWeekOfYearMinDays)),j.push(K(ee,B.isRTL,B.pickWholeWeek,Z)),ee=[],pe=0,Z=!1)}return H(B,j,L)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),y(this.el,"is-hidden"),this._o.bound&&(l(i,"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var A=this._v;A!==!1&&(this._o.bound&&d(i,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),p(this.el,"is-hidden"),this._v=!1,A!==void 0&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){var A=this._o;this.hide(),d(this.el,"mousedown",this._onMouseDown,!0),d(this.el,"touchend",this._onMouseDown,!0),d(this.el,"change",this._onChange),A.keyboardInput&&d(i,"keydown",this._onKeyChange),A.field&&(d(A.field,"change",this._onInputChange),A.bound&&(d(A.trigger,"click",this._onInputClick),d(A.trigger,"focus",this._onInputFocus),d(A.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},ae})}(yl)),yl.exports}_F();function xF(e){return`(${RF(e)})`}function RF(e){return e.replace("-","")}function Oh(e,t={}){const{currencySymbol:n="",decimalPlaces:o=2,decimalSeparator:r=".",negativeClass:i,negativeInParentheses:a=!0,noHTML:l=!1,positiveClass:d,thousandsSeparator:u=",",zeroAsBlank:f=!1}=t;if(e==null||e==="")return"";if(!Number(e)&&f)return"";const p=(Number(e)||0)<0,y=Math.abs(Number(e)||0).toFixed(o),w=parseInt(y).toString(),b=w.length>3?w.length%3:0,v=(b?w.slice(0,b)+u:"")+w.slice(b).replace(/(\d{3})(?=\d)/g,`$1${u}`)+(o?r+y.slice(-o):""),D=`${n}${v}`,k=p?`-${D}`:D,x=p&&a?xF(k):k;return l?x:p?i?`<span class="${i}">${x}</span>`:x:d?`<span class="${d}">${x}</span>`:x}function Gv(e){return function(n,o,r){return Oh(r,e)}}const TF=Gv().name,kF=(e,t)=>{const n=e.sum&&e.sum[t.field];return n!==null?`${e.group.level?"total":"TOTAL"}: ${Oh(n)}`:""};function EF(e){if(!e.getSelectionModel())return Im(e);let t=e.getSelectedRows();return t.sort((n,o)=>n-o),t.length===0&&(t=Im(e)),t}function Im(e){const t=e.getData();return Array.from({length:t.getLength()},(n,o)=>o)}var Pc=(e=>(e.slickTable="slick-table",e.sorting="sorting",e))(Pc||{});function Fd(){return JSON.parse(localStorage.getItem(Pc.slickTable)||"{}")}function Ld(e){return e[Pc.sorting]||{}}function Nm(e,t){localStorage.setItem(Pc.slickTable,JSON.stringify({...e,sorting:t}))}class PF{getTableSorting(t){const n=Fd();return Ld(n)[t]}resetTableSorting(t){const n=Fd(),o=Ld(n);delete o[t],Nm(n,o)}setTableSorting(t,n,o){const r=Fd(),i=Ld(r);i[t]={columnId:n,isAscending:o},Nm(r,i)}}const $d=new PF;class DF{constructor(){this.emptyValue="1/1/1970"}dates(t,n){const o=Ss(t||this.emptyValue),r=Ss(n||this.emptyValue);return o-r}numbers(t,n){return Number(t||0)-Number(n||0)}stringsNumeric(t,n){return!t&&!n?0:t?n?t.localeCompare(n,void 0,{numeric:!0}):1:-1}strings(t,n){return(t||"").toLowerCase()>(n||"").toLowerCase()?1:(t||"").toLowerCase()<(n||"").toLowerCase()?-1:0}numbersWithSymbols(t,n){const o=Number((t||"0").match(/^\d+/g)?.[0]||0);return Number((n||"0").match(/^\d+/g)?.[0]||0)-o}}const OF=new DF;class Kv{constructor(){this.sort=OF,this.withFormatter=[Co.TEXT,Co.NUMBER_FORMATTED]}getSortFunction(t){let n="",o=!1,r;return(i,a)=>{const{grid:l,sortAsc:d,columnId:u}=a,f=a.sortCol;if(!l||!f)return;const p=f.field;if(!p)return;const y=f.sortAs;if(!y)return;const{formatter:w}=f,b=l.getData();d&&n===f?.id?(o=!0,$d.resetTableSorting(t),l.setSortColumns([]),n=""):(o=!1,n=u,$d.setTableSorting(t,u,d));const m=d?-1:1,v=b.getGrouping(),D=v.find(({getter:k})=>k===f.id);if(D){if(r||(r=v.map(({comparer:k})=>k)),o){const k=b.getGrouping(),x=k.findIndex(({getter:S})=>S===f.id);k[x].comparer=r[x],b.refresh();return}D.comparer=(k,x)=>{let S=k.value,C=x.value;return w&&this.withFormatter.includes(y)&&(S=w(0,0,S,f,null,l),C=w(0,0,C,f,null,l)),this.priority(k,x)||this.compare(S,C,m,y)}}else{const k=b.getItems(),x=b.getIdPropertyName();k.sort((S,C)=>{if(o)return S[x]-C[x];let O=S[p],I=C[p];return w&&this.withFormatter.includes(y)&&(O=w(0,0,O,f,S,l),I=w(0,0,I,f,C,l)),this.priority(S,C)||this.compare(O,I,m,y)})}b.refresh()}}priority(t,n){return 0}restoreSorting(t){const n=t.grid;if(!n)return;const o=$d.getTableSorting(t.id);if(o){const{columnId:r,isAscending:i}=o,a=this.getSortFunction(t.id),l=n.getColumns().find(({id:d})=>d===r);l&&(a(null,{grid:n,columnId:r,sortAsc:i,sortCol:l,sortCols:[]}),document.querySelector(`#${t.id} [data-id="${r}"] .slick-sort-indicator`)?.classList.add(`slick-sort-indicator-${i?"asc":"desc"}`),n.invalidate())}}compare(t,n,o,r){switch(r){case Co.DATE:return this.sort.dates(t,n)*o;case Co.NUMBER:case Co.NUMBER_FORMATTED:return this.sort.numbers(t,n)*o;case Co.TEXT_NUMERIC:return this.sort.stringsNumeric(t,n)*o;case Co.TEXT:return this.sort.strings(t,n)*o;default:return 0}}}const MF=new Kv;class IF{constructor(t,n){this.columnsWithTitle=t,this.columnsWithValue=n}calculate(t){let n=t.getColumns().length;for(;n--;)this.calculateColumn(n,t)}calculateColumn(t,n){const r=n.getColumns()[t].field;this.columnsWithTitle.includes(r)?this.addTitle(n,t):this.columnsWithValue.includes(r)&&this.addTotal(n,t)}addTitle(t,n){const r=t.getColumns()[n].id,i=t.getFooterRowColumn(r);i.textContent="TOTAL:"}addTotal(t,n){const o=t.getColumns()[n],r=o.field,i=t.getData(),a=this.displayedRows(i),l=this.totalAmountOf(a,r),d=t.getFooterRowColumn(r),u=o.formatter;d.textContent=`${u?u(0,0,l,o,null,t):l}`}displayedRows(t){const n=[],o=t.getLength();if(!o)return n;for(let r=0;r<o;r++)n.push(t.getItem(r));return n}totalAmountOf(t,n){return t.reduce((o,r)=>(r.isDeleted||(o+=Number(r[n])||0),o),0)}}function NF(e){const t={};if(!e)return t;const n=e.summaryColumnIds,o=e.grid;if(!o)return t;const r=o.getSelectedRows();o.getColumns().forEach((l,d)=>{const{formatter:u,id:f,name:p}=l;n.includes(f)&&(t[f]={cell:d,column:l,formatter:u,label:p,total:0,totalFormatted:u?u(0,0,0,l,{},o):"0"})});const a=o.getData();return r.forEach(l=>{const d=a.getItem(l);Object.keys(t).forEach(u=>{t[u].total+=d[u],t[u].totalFormatted=t[u].formatter?t[u].formatter(l,t[u].cell,t[u].total,t[u].column,d,o):`${t[u].total}`})}),t}const Xv=ie(_y)({alignItems:"center",color:"#1E456F",display:"flex",justifyContent:"space-between"}),AF=ie("span")({display:"flex",alignItems:"center"}),FF=ie("span")({marginLeft:"0.5em",width:"20px",cursor:"pointer",backgroundColor:"#1E456F","&:hover":{scale:"1.3"}}),Vd={Icon:FF,Total:AF},LF=({label:e,total:t,totalFormatted:n})=>{const[o,r]=Fe.useState(!1);function i(){navigator.clipboard.writeText(`${t}`),r(!0),setTimeout(()=>{r(!1)},1e3)}return E.jsxs(Xv,{children:[E.jsx("span",{children:`Total ${e}:`}),E.jsxs(Vd.Total,{children:[E.jsx("span",{children:`${n}`}),o?E.jsx(Vd.Icon,{className:"sgi sgi-check"}):E.jsx(Vy,{title:"Copy to clipboard",children:E.jsx(Vd.Icon,{className:"sgi sgi-content-copy",onClick:i})})]})]})},$F=ie(Gu)({"& .MuiPaper-root":{minWidth:"25em"}}),VF=ie(xy)({color:"#1E456F"}),jF=ie(pc)({padding:0}),BF=ie(ko)({borderColor:"#1E9577",color:"#1E9577",textTransform:"none"}),el={Button:BF,Dialog:$F,DialogTitle:VF,List:jF},WF=()=>{const[e,t]=Fe.useState(0),[n,o]=Fe.useState(!1),[r,i]=Fe.useState({});function a(){Uo.open=!1}return Fe.useEffect(()=>{function l(){const d=Uo.open;if(d){const u=Uo.table,f=u?.grid;t(f?.getSelectedRows().length||0),i(NF(u))}o(d)}return Uo.subscribe(l),()=>{Uo.unsubscribe(l)}},[]),n?E.jsxs(el.Dialog,{open:n,onClose:a,children:[E.jsx(el.DialogTitle,{children:"Selected rows summary"}),E.jsx(Xu,{children:E.jsxs(el.List,{children:[E.jsx(Xv,{children:`Number of selected rows: ${e}`}),Object.entries(r).map(([l,{label:d,total:u,totalFormatted:f}])=>E.jsx(oo,{children:E.jsx(LF,{label:d,total:u,totalFormatted:f})},l))]})}),E.jsx(Ku,{children:E.jsx(el.Button,{variant:"outlined",onClick:a,children:"Close"})})]}):null};function Mh(e,t,n){const{scrollWidth:o}=document.documentElement,{left:r,right:i}=e.getBoundingClientRect(),a=i-r,l=t+i>=o;e.style.left=`${l?t-a:t}px`,e.style.top=`${n}px`,e.style.visibility="visible"}const HF=ie(oo)({position:"fixed",top:"0",left:"0",right:"0",bottom:"0",zIndex:"2"}),zF={Wrapper:HF},Ih=({setIsOpened:e})=>E.jsx(zF.Wrapper,{onClick:()=>e(!1),onContextMenu:t=>{t.preventDefault(),e(!1)},"data-testid":"overlay"}),YF=ie(oo)({visibility:"hidden",borderRadius:"5px",backgroundColor:"#FFFFFF",boxShadow:"1px 1px 1px 1px gray",padding:"0.5em",position:"absolute",zIndex:10,userSelect:"none",fontSize:"inherit",top:0,left:0}),UF={Wrapper:YF},Nh=({children:e,id:t})=>E.jsx(UF.Wrapper,{id:t,children:e});function qF(e){const{columnId:t,table:n}=Rn;if(!t||!n)return;const o=n.filter.args;o.columnFilters&&(n.filter.args={...o,columnFilters:{...o.columnFilters,[t]:{...o.columnFilters[t],value:e}}},e[1]||e[2]?or.highlightColumn(n,t):or.resetColumn(n,t))}const rr=Uv(qF),js={1:"",2:""},Zv="column_filters",lo={filter:"🔎︎ Filter...",from:"🔎︎ From...",to:"🔎︎ To..."};function GF(e){switch(e){case hn.Boolean:return je.Boolean;case hn.Date:return je.DateEqual;case hn.MultipleSelect:return je.MultipleSelect;case hn.Number:case hn.NumberFormatted:return je.NumberEqual;case hn.Text:return je.TextContain}}function KF(e,t,n){Fe.useEffect(()=>{if(!e)return;const o=document.getElementById(Zv);if(!o)return;const{columnId:r,group:i,table:a,x:l,y:d}=Rn;if(!a?.grid)return;const f=a.filter.args;Mh(o,l,d);const{filterId:p,value:y}=f.columnFilters?.[r]||{},w=p||GF(i),b=y||js;a.filter.args={...f,columnFilters:{...f.columnFilters,[r]:{filterId:w,group:i,value:b}}},t(w),n(b)},[e])}function XF(e){Fe.useEffect(()=>{function t(){e(!0)}return Rn.subscribe(t),()=>{Rn.unsubscribe(t)}},[])}function yu(e){return{format:Yr.ui,value:e?xe(e,LN):null}}const ZF=ie(ko)({width:"5em",alignSelf:"flex-end"}),QF={Button:ZF},JF=({setIsOpened:e,setValue:t,value:n})=>{function o(){const{columnId:r,table:i}=Rn;if(!i||!i.grid)return;const l=i.filter.args;delete l.columnFilters?.[r],i.filter.args=l,or.resetColumn(i,r),t(js),e(!1)}return E.jsx(QF.Button,{disabled:!n[1]&&!n[2],onClick:o,variant:"outlined",size:"small",children:"Reset"})},eL=ie(fc)({padding:0}),tL=ie(Ry)({margin:"0.5em 0 0 1em"}),tl={Checkbox:eL,FormGroup:tL},nL=({setValue:e,value:t})=>{function n(o){e(o),rr(o)}return E.jsxs(tl.FormGroup,{children:[E.jsx(ul,{control:E.jsx(tl.Checkbox,{checked:!t[1]&&!t[2],onClick:()=>n({1:"",2:""}),size:"small"}),label:"All"}),E.jsx(ul,{control:E.jsx(tl.Checkbox,{checked:!!t[1],onClick:()=>n({1:"true",2:""}),size:"small"}),label:"Yes"}),E.jsx(ul,{control:E.jsx(tl.Checkbox,{checked:!!t[2],onClick:()=>n({1:"",2:"true"}),size:"small"}),label:"No"})]})},oL={Y:"year",YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:1},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},d:{sectionType:"weekDay",contentType:"digit",maxLength:1},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},rL={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Am=["Missing timezone plugin","To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`","Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone"].join(`
356
- `);class Qv{constructor({locale:t,formats:n,instance:o}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=oL,this.setLocaleToValue=r=>{const i=this.getCurrentLocaleCode();return i===r.locale()?r:r.locale(i)},this.hasTimezonePlugin=()=>typeof this.moment.tz<"u",this.createSystemDate=r=>{const i=this.moment(r).local();return this.locale===void 0?i:i.locale(this.locale)},this.createUTCDate=r=>{const i=this.moment.utc(r);return this.locale===void 0?i:i.locale(this.locale)},this.createTZDate=(r,i)=>{if(!this.hasTimezonePlugin())throw new Error(Am);const a=i==="default"?this.moment(r):this.moment.tz(r,i);return this.locale===void 0?a:a.locale(this.locale)},this.date=(r,i="default")=>r===null?null:i==="UTC"?this.createUTCDate(r):i==="system"||i==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(r):this.createTZDate(r,i),this.getInvalidDate=()=>this.moment(new Date("Invalid Date")),this.getTimezone=r=>{const i=r._z?.name,a=r.isUTC()?"UTC":"system";return i??this.moment.defaultZone?.name??a},this.setTimezone=(r,i)=>{if(this.getTimezone(r)===i)return r;if(i==="UTC")return r.clone().utc();if(i==="system")return r.clone().local();if(!this.hasTimezonePlugin()){if(i!=="default")throw new Error(Am);return r}const a=i==="default"?this.moment.defaultZone?.name??"system":i;if(a==="system")return r.clone().local();const l=r.clone();return l.tz(a),l},this.toJsDate=r=>r.toDate(),this.parse=(r,i)=>r===""?null:this.locale?this.moment(r,i,this.locale,!0):this.moment(r,i,!0),this.getCurrentLocaleCode=()=>this.locale||xe.locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(xe.localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=r=>{const i=/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;return r.match(i).map(a=>{const l=a[0];return l==="L"||l===";"?xe.localeData(this.getCurrentLocaleCode()).longDateFormat(a):a}).join("")},this.isValid=r=>r==null?!1:r.isValid(),this.format=(r,i)=>this.formatByString(r,this.formats[i]),this.formatByString=(r,i)=>{const a=r.clone();return a.locale(this.getCurrentLocaleCode()),a.format(i)},this.formatNumber=r=>r,this.isEqual=(r,i)=>r===null&&i===null?!0:r===null||i===null?!1:r.isSame(i),this.isSameYear=(r,i)=>r.isSame(i,"year"),this.isSameMonth=(r,i)=>r.isSame(i,"month"),this.isSameDay=(r,i)=>r.isSame(i,"day"),this.isSameHour=(r,i)=>r.isSame(i,"hour"),this.isAfter=(r,i)=>r.isAfter(i),this.isAfterYear=(r,i)=>r.isAfter(i,"year"),this.isAfterDay=(r,i)=>r.isAfter(i,"day"),this.isBefore=(r,i)=>r.isBefore(i),this.isBeforeYear=(r,i)=>r.isBefore(i,"year"),this.isBeforeDay=(r,i)=>r.isBefore(i,"day"),this.isWithinRange=(r,[i,a])=>r.isBetween(i,a,null,"[]"),this.startOfYear=r=>r.clone().startOf("year"),this.startOfMonth=r=>r.clone().startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r.clone()).startOf("week"),this.startOfDay=r=>r.clone().startOf("day"),this.endOfYear=r=>r.clone().endOf("year"),this.endOfMonth=r=>r.clone().endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r.clone()).endOf("week"),this.endOfDay=r=>r.clone().endOf("day"),this.addYears=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"years"):r.clone().add(i,"years"),this.addMonths=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"months"):r.clone().add(i,"months"),this.addWeeks=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"weeks"):r.clone().add(i,"weeks"),this.addDays=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"days"):r.clone().add(i,"days"),this.addHours=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"hours"):r.clone().add(i,"hours"),this.addMinutes=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"minutes"):r.clone().add(i,"minutes"),this.addSeconds=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"seconds"):r.clone().add(i,"seconds"),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month"),this.getDate=r=>r.get("date"),this.getHours=r=>r.get("hours"),this.getMinutes=r=>r.get("minutes"),this.getSeconds=r=>r.get("seconds"),this.getMilliseconds=r=>r.get("milliseconds"),this.setYear=(r,i)=>r.clone().year(i),this.setMonth=(r,i)=>r.clone().month(i),this.setDate=(r,i)=>r.clone().date(i),this.setHours=(r,i)=>r.clone().hours(i),this.setMinutes=(r,i)=>r.clone().minutes(i),this.setSeconds=(r,i)=>r.clone().seconds(i),this.setMilliseconds=(r,i)=>r.clone().milliseconds(i),this.getDaysInMonth=r=>r.daysInMonth(),this.getWeekArray=r=>{const i=this.startOfWeek(this.startOfMonth(r)),a=this.endOfWeek(this.endOfMonth(r));let l=0,d=i;const u=[];for(;d.isBefore(a);){const f=Math.floor(l/7);u[f]=u[f]||[],u[f].push(d),d=this.addDays(d,1),l+=1}return u},this.getWeekNumber=r=>r.week(),this.getDayOfWeek=r=>r.day()+1,this.moment=o||xe,this.locale=t,this.formats=Q({},rL,n)}getYearRange([t,n]){const o=this.startOfYear(t),r=this.endOfYear(n),i=[];let a=o;for(;this.isBefore(a,r);)i.push(a),a=this.addYears(a,1);return i}}const vi=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),sL=({openTo:e,defaultOpenTo:t,views:n,defaultViews:o})=>{const r=n??o;let i;if(e!=null)i=e;else if(r.includes(t))i=t;else if(r.length>0)i=r[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:r,openTo:i}},Ll=(e,t,n)=>{let o=t;return o=e.setHours(o,e.getHours(n)),o=e.setMinutes(o,e.getMinutes(n)),o=e.setSeconds(o,e.getSeconds(n)),o=e.setMilliseconds(o,e.getMilliseconds(n)),o},Fi=({date:e,disableFuture:t,disablePast:n,maxDate:o,minDate:r,isDateDisabled:i,utils:a,timezone:l})=>{const d=Ll(a,a.date(void 0,l),e);n&&a.isBefore(r,d)&&(r=d),t&&a.isAfter(o,d)&&(o=d);let u=e,f=e;for(a.isBefore(e,r)&&(u=r,f=null),a.isAfter(e,o)&&(f&&(f=o),u=null);u||f;){if(u&&a.isAfter(u,o)&&(u=null),f&&a.isBefore(f,r)&&(f=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(f){if(!i(f))return f;f=a.addDays(f,-1)}}return null},iL=(e,t)=>t==null||!e.isValid(t)?null:t,Jn=(e,t,n)=>t==null||!e.isValid(t)?n:t,aL=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Ah=(e,t)=>{const o=[e.startOfYear(t)];for(;o.length<12;){const r=o[o.length-1];o.push(e.addMonths(r,1))}return o},Jv=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),lL=["year","month","day"],Fm=e=>lL.includes(e),Fh=(e,{format:t,views:n},o)=>{if(t!=null)return t;const r=e.formats;return vi(n,["year"])?r.year:vi(n,["month"])?r.month:vi(n,["day"])?r.dayOfMonth:vi(n,["month","year"])?`${r.month} ${r.year}`:vi(n,["day","month"])?`${r.month} ${r.dayOfMonth}`:o?/en/.test(e.getCurrentLocaleCode())?r.normalDateWithWeekday:r.normalDate:r.keyboardDate},cL=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(o=>e.addDays(n,o))},dL=["hours","minutes","seconds"],uL=e=>dL.includes(e),Lm=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),hL=(e,t)=>(n,o)=>e?t.isAfter(n,o):Lm(n,t)>Lm(o,t),xo={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},fL=e=>Math.max(...e.map(t=>xo[t.type]??1)),bi=(e,t,n)=>{if(t===xo.year)return e.startOfYear(n);if(t===xo.month)return e.startOfMonth(n);if(t===xo.day)return e.startOfDay(n);let o=n;return t<xo.minutes&&(o=e.setMinutes(o,0)),t<xo.seconds&&(o=e.setSeconds(o,0)),t<xo.milliseconds&&(o=e.setMilliseconds(o,0)),o},pL=({props:e,utils:t,granularity:n,timezone:o,getTodayDate:r})=>{let i=r?r():bi(t,n,Jv(t,o));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=bi(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=bi(t,n,e.maxDate));const a=hL(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=bi(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Ll(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=bi(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Ll(t,i,e.maxTime))),i},Lh=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
357
- `));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},mL=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Dc=(e,t)=>{const n=[],o=e.date(void 0,"default"),r=e.startOfWeek(o),i=e.endOfWeek(o);let a=r;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(l=>e.formatByString(l,t))},eb=(e,t,n,o)=>{switch(n){case"month":return Ah(e,e.date(void 0,t)).map(r=>e.formatByString(r,o));case"weekDay":return Dc(e,o);case"meridiem":{const r=e.date(void 0,t);return[e.startOfDay(r),e.endOfDay(r)].map(i=>e.formatByString(i,o))}default:return[]}},$m="s",gL=["0","1","2","3","4","5","6","7","8","9"],yL=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),$m)==="0"?gL:Array.from({length:10}).map((o,r)=>e.formatByString(e.setSeconds(t,r),$m))},Ur=(e,t)=>{if(t[0]==="0")return e;const n=[];let o="";for(let r=0;r<e.length;r+=1){o+=e[r];const i=t.indexOf(o);i>-1&&(n.push(i.toString()),o="")}return n.join("")},$h=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),Vm=(e,t)=>{const n=Ur(e,t);return n!==" "&&!Number.isNaN(Number(n))},tb=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},nb=(e,t,n,o,r)=>{if(process.env.NODE_ENV!=="production"&&r.type!=="day"&&r.contentType==="digit-with-letter")throw new Error([`MUI X: The token "${r.format}" is a digit format with letter in it.'
355
+ */var _F=yl.exports,Mm;function xF(){return Mm||(Mm=1,function(e,t){(function(n,o){var r;{try{r=SF}catch{}e.exports=o(r)}})(_F,function(n){var o=typeof n=="function",r=!!window.addEventListener,i=window.document,a=window.setTimeout,l=function(A,M,L,B){r?A.addEventListener(M,L,!!B):A.attachEvent("on"+M,L)},d=function(A,M,L,B){r?A.removeEventListener(M,L,!!B):A.detachEvent("on"+M,L)},u=function(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")},f=function(A,M){return(" "+A.className+" ").indexOf(" "+M+" ")!==-1},p=function(A,M){f(A,M)||(A.className=A.className===""?M:A.className+" "+M)},y=function(A,M){A.className=u((" "+A.className+" ").replace(" "+M+" "," "))},w=function(A){return/Array/.test(Object.prototype.toString.call(A))},b=function(A){return/Date/.test(Object.prototype.toString.call(A))&&!isNaN(A.getTime())},m=function(A){var M=A.getDay();return M===0||M===6},v=function(A){return A%4===0&&A%100!==0||A%400===0},D=function(A,M){return[31,v(A)?29:28,31,30,31,30,31,31,30,31,30,31][M]},k=function(A){b(A)&&A.setHours(0,0,0,0)},x=function(A,M){return A.getTime()===M.getTime()},S=function(A,M,L){var B,ne;for(B in M)ne=A[B]!==void 0,ne&&typeof M[B]=="object"&&M[B]!==null&&M[B].nodeName===void 0?b(M[B])?L&&(A[B]=new Date(M[B].getTime())):w(M[B])?L&&(A[B]=M[B].slice(0)):A[B]=S({},M[B],L):(L||!ne)&&(A[B]=M[B]);return A},C=function(A,M,L){var B;i.createEvent?(B=i.createEvent("HTMLEvents"),B.initEvent(M,!0,!1),B=S(B,L),A.dispatchEvent(B)):i.createEventObject&&(B=i.createEventObject(),B=S(B,L),A.fireEvent("on"+M,B))},O=function(A){return A.month<0&&(A.year-=Math.ceil(Math.abs(A.month)/12),A.month+=12),A.month>11&&(A.year+=Math.floor(Math.abs(A.month)/12),A.month-=12),A},I={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},F=function(A,M,L){for(M+=A.firstDay;M>=7;)M-=7;return L?A.i18n.weekdaysShort[M]:A.i18n.weekdays[M]},z=function(A){var M=[],L="false";if(A.isEmpty)if(A.showDaysInNextAndPreviousMonths)M.push("is-outside-current-month"),A.enableSelectionDaysInNextAndPreviousMonths||M.push("is-selection-disabled");else return'<td class="is-empty"></td>';return A.isDisabled&&M.push("is-disabled"),A.isToday&&M.push("is-today"),A.isSelected&&(M.push("is-selected"),L="true"),A.hasEvent&&M.push("has-event"),A.isInRange&&M.push("is-inrange"),A.isStartRange&&M.push("is-startrange"),A.isEndRange&&M.push("is-endrange"),'<td data-day="'+A.day+'" class="'+M.join(" ")+'" aria-selected="'+L+'"><button class="pika-button pika-day" type="button" data-pika-year="'+A.year+'" data-pika-month="'+A.month+'" data-pika-day="'+A.day+'">'+A.day+"</button></td>"},R=function(A,M){A.setHours(0,0,0,0);var L=A.getDate(),B=A.getDay(),ne=M,oe=ne-1,se=7,j=function(le){return(le+se-1)%se};A.setDate(L+oe-j(B));var ee=new Date(A.getFullYear(),0,ne),J=24*60*60*1e3,te=(A.getTime()-ee.getTime())/J,ce=1+Math.round((te-oe+j(ee.getDay()))/se);return ce},$=function(A,M,L,B){var ne=new Date(L,M,A),oe=o?n(ne).isoWeek():R(ne,B);return'<td class="pika-week">'+oe+"</td>"},K=function(A,M,L,B){return'<tr class="pika-row'+(L?" pick-whole-week":"")+(B?" is-selected":"")+'">'+(M?A.reverse():A).join("")+"</tr>"},G=function(A){return"<tbody>"+A.join("")+"</tbody>"},q=function(A){var M,L=[];for(A.showWeekNumber&&L.push("<th></th>"),M=0;M<7;M++)L.push('<th scope="col"><abbr title="'+F(A,M)+'">'+F(A,M,!0)+"</abbr></th>");return"<thead><tr>"+(A.isRTL?L.reverse():L).join("")+"</tr></thead>"},Y=function(A,M,L,B,ne,oe){var se,j,ee,J=A._o,te=L===J.minYear,ce=L===J.maxYear,le='<div id="'+oe+'" class="pika-title" role="heading" aria-live="assertive">',he,W,re=!0,Z=!0;for(ee=[],se=0;se<12;se++)ee.push('<option value="'+(L===ne?se-M:12+se-M)+'"'+(se===B?' selected="selected"':"")+(te&&se<J.minMonth||ce&&se>J.maxMonth?' disabled="disabled"':"")+">"+J.i18n.months[se]+"</option>");for(he='<div class="pika-label">'+J.i18n.months[B]+'<select class="pika-select pika-select-month" tabindex="-1">'+ee.join("")+"</select></div>",w(J.yearRange)?(se=J.yearRange[0],j=J.yearRange[1]+1):(se=L-J.yearRange,j=1+L+J.yearRange),ee=[];se<j&&se<=J.maxYear;se++)se>=J.minYear&&ee.push('<option value="'+se+'"'+(se===L?' selected="selected"':"")+">"+se+"</option>");return W='<div class="pika-label">'+L+J.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+ee.join("")+"</select></div>",J.showMonthAfterYear?le+=W+he:le+=he+W,te&&(B===0||J.minMonth>=B)&&(re=!1),ce&&(B===11||J.maxMonth<=B)&&(Z=!1),M===0&&(le+='<button class="pika-prev'+(re?"":" is-disabled")+'" type="button">'+J.i18n.previousMonth+"</button>"),M===A._o.numberOfMonths-1&&(le+='<button class="pika-next'+(Z?"":" is-disabled")+'" type="button">'+J.i18n.nextMonth+"</button>"),le+="</div>"},H=function(A,M,L){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+L+'">'+q(A)+G(M)+"</table>"},ae=function(A){var M=this,L=M.config(A);M._onMouseDown=function(ne){if(M._v){ne=ne||window.event;var oe=ne.target||ne.srcElement;if(oe)if(f(oe,"is-disabled")||(f(oe,"pika-button")&&!f(oe,"is-empty")&&!f(oe.parentNode,"is-disabled")?(M.setDate(new Date(oe.getAttribute("data-pika-year"),oe.getAttribute("data-pika-month"),oe.getAttribute("data-pika-day"))),L.bound&&a(function(){M.hide(),L.blurFieldOnSelect&&L.field&&L.field.blur()},100)):f(oe,"pika-prev")?M.prevMonth():f(oe,"pika-next")&&M.nextMonth()),f(oe,"pika-select"))M._c=!0;else if(ne.preventDefault)ne.preventDefault();else return ne.returnValue=!1,!1}},M._onChange=function(ne){ne=ne||window.event;var oe=ne.target||ne.srcElement;oe&&(f(oe,"pika-select-month")?M.gotoMonth(oe.value):f(oe,"pika-select-year")&&M.gotoYear(oe.value))},M._onKeyChange=function(ne){if(ne=ne||window.event,M.isVisible())switch(ne.keyCode){case 13:case 27:L.field&&L.field.blur();break;case 37:M.adjustDate("subtract",1);break;case 38:M.adjustDate("subtract",7);break;case 39:M.adjustDate("add",1);break;case 40:M.adjustDate("add",7);break;case 8:case 46:M.setDate(null);break}},M._parseFieldValue=function(){if(L.parse)return L.parse(L.field.value,L.format);if(o){var ne=n(L.field.value,L.format,L.formatStrict);return ne&&ne.isValid()?ne.toDate():null}else return new Date(Date.parse(L.field.value))},M._onInputChange=function(ne){var oe;ne.firedBy!==M&&(oe=M._parseFieldValue(),b(oe)&&M.setDate(oe),M._v||M.show())},M._onInputFocus=function(){M.show()},M._onInputClick=function(){M.show()},M._onInputBlur=function(){var ne=i.activeElement;do if(f(ne,"pika-single"))return;while(ne=ne.parentNode);M._c||(M._b=a(function(){M.hide()},50)),M._c=!1},M._onClick=function(ne){ne=ne||window.event;var oe=ne.target||ne.srcElement,se=oe;if(oe){!r&&f(oe,"pika-select")&&(oe.onchange||(oe.setAttribute("onchange","return;"),l(oe,"change",M._onChange)));do if(f(se,"pika-single")||se===L.trigger)return;while(se=se.parentNode);M._v&&oe!==L.trigger&&se!==L.trigger&&M.hide()}},M.el=i.createElement("div"),M.el.className="pika-single"+(L.isRTL?" is-rtl":"")+(L.theme?" "+L.theme:""),l(M.el,"mousedown",M._onMouseDown,!0),l(M.el,"touchend",M._onMouseDown,!0),l(M.el,"change",M._onChange),L.keyboardInput&&l(i,"keydown",M._onKeyChange),L.field&&(L.container?L.container.appendChild(M.el):L.bound?i.body.appendChild(M.el):L.field.parentNode.insertBefore(M.el,L.field.nextSibling),l(L.field,"change",M._onInputChange),L.defaultDate||(L.defaultDate=M._parseFieldValue(),L.setDefaultDate=!0));var B=L.defaultDate;b(B)?L.setDefaultDate?M.setDate(B,!0):M.gotoDate(B):M.gotoDate(new Date),L.bound?(this.hide(),M.el.className+=" is-bound",l(L.trigger,"click",M._onInputClick),l(L.trigger,"focus",M._onInputFocus),l(L.trigger,"blur",M._onInputBlur)):this.show()};return ae.prototype={config:function(A){this._o||(this._o=S({},I,!0));var M=S(this._o,A,!0);M.isRTL=!!M.isRTL,M.field=M.field&&M.field.nodeName?M.field:null,M.theme=typeof M.theme=="string"&&M.theme?M.theme:null,M.bound=!!(M.bound!==void 0?M.field&&M.bound:M.field),M.trigger=M.trigger&&M.trigger.nodeName?M.trigger:M.field,M.disableWeekends=!!M.disableWeekends,M.disableDayFn=typeof M.disableDayFn=="function"?M.disableDayFn:null;var L=parseInt(M.numberOfMonths,10)||1;if(M.numberOfMonths=L>4?4:L,b(M.minDate)||(M.minDate=!1),b(M.maxDate)||(M.maxDate=!1),M.minDate&&M.maxDate&&M.maxDate<M.minDate&&(M.maxDate=M.minDate=!1),M.minDate&&this.setMinDate(M.minDate),M.maxDate&&this.setMaxDate(M.maxDate),w(M.yearRange)){var B=new Date().getFullYear()-10;M.yearRange[0]=parseInt(M.yearRange[0],10)||B,M.yearRange[1]=parseInt(M.yearRange[1],10)||B}else M.yearRange=Math.abs(parseInt(M.yearRange,10))||I.yearRange,M.yearRange>100&&(M.yearRange=100);return M},toString:function(A){return A=A||this._o.format,b(this._d)?this._o.toString?this._o.toString(this._d,A):o?n(this._d).format(A):this._d.toDateString():""},getMoment:function(){return o?n(this._d):null},setMoment:function(A,M){o&&n.isMoment(A)&&this.setDate(A.toDate(),M)},getDate:function(){return b(this._d)?new Date(this._d.getTime()):null},setDate:function(A,M){if(!A)return this._d=null,this._o.field&&(this._o.field.value="",C(this._o.field,"change",{firedBy:this})),this.draw();if(typeof A=="string"&&(A=new Date(Date.parse(A))),!!b(A)){var L=this._o.minDate,B=this._o.maxDate;b(L)&&A<L?A=L:b(B)&&A>B&&(A=B),this._d=new Date(A.getTime()),k(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),C(this._o.field,"change",{firedBy:this})),!M&&typeof this._o.onSelect=="function"&&this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(A){var M=!0;if(b(A)){if(this.calendars){var L=new Date(this.calendars[0].year,this.calendars[0].month,1),B=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),ne=A.getTime();B.setMonth(B.getMonth()+1),B.setDate(B.getDate()-1),M=ne<L.getTime()||B.getTime()<ne}M&&(this.calendars=[{month:A.getMonth(),year:A.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(A,M){var L=this.getDate()||new Date,B=parseInt(M)*24*60*60*1e3,ne;A==="add"?ne=new Date(L.valueOf()+B):A==="subtract"&&(ne=new Date(L.valueOf()-B)),this.setDate(ne)},adjustCalendars:function(){this.calendars[0]=O(this.calendars[0]);for(var A=1;A<this._o.numberOfMonths;A++)this.calendars[A]=O({month:this.calendars[0].month+A,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(A){isNaN(A)||(this.calendars[0].month=parseInt(A,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(A){isNaN(A)||(this.calendars[0].year=parseInt(A,10),this.adjustCalendars())},setMinDate:function(A){A instanceof Date?(k(A),this._o.minDate=A,this._o.minYear=A.getFullYear(),this._o.minMonth=A.getMonth()):(this._o.minDate=I.minDate,this._o.minYear=I.minYear,this._o.minMonth=I.minMonth,this._o.startRange=I.startRange),this.draw()},setMaxDate:function(A){A instanceof Date?(k(A),this._o.maxDate=A,this._o.maxYear=A.getFullYear(),this._o.maxMonth=A.getMonth()):(this._o.maxDate=I.maxDate,this._o.maxYear=I.maxYear,this._o.maxMonth=I.maxMonth,this._o.endRange=I.endRange),this.draw()},setStartRange:function(A){this._o.startRange=A},setEndRange:function(A){this._o.endRange=A},draw:function(A){if(!(!this._v&&!A)){var M=this._o,L=M.minYear,B=M.maxYear,ne=M.minMonth,oe=M.maxMonth,se="",j;this._y<=L&&(this._y=L,!isNaN(ne)&&this._m<ne&&(this._m=ne)),this._y>=B&&(this._y=B,!isNaN(oe)&&this._m>oe&&(this._m=oe));for(var ee=0;ee<M.numberOfMonths;ee++)j="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),se+='<div class="pika-lendar">'+Y(this,ee,this.calendars[ee].year,this.calendars[ee].month,this.calendars[0].year,j)+this.render(this.calendars[ee].year,this.calendars[ee].month,j)+"</div>";this.el.innerHTML=se,M.bound&&M.field.type!=="hidden"&&a(function(){M.trigger.focus()},1),typeof this._o.onDraw=="function"&&this._o.onDraw(this),M.bound&&M.field.setAttribute("aria-label",M.ariaLabel)}},adjustPosition:function(){var A,M,L,B,ne,oe,se,j,ee,J,te,ce;if(!this._o.container){if(this.el.style.position="absolute",A=this._o.trigger,M=A,L=this.el.offsetWidth,B=this.el.offsetHeight,ne=window.innerWidth||i.documentElement.clientWidth,oe=window.innerHeight||i.documentElement.clientHeight,se=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,te=!0,ce=!0,typeof A.getBoundingClientRect=="function")J=A.getBoundingClientRect(),j=J.left+window.pageXOffset,ee=J.bottom+window.pageYOffset;else for(j=M.offsetLeft,ee=M.offsetTop+M.offsetHeight;M=M.offsetParent;)j+=M.offsetLeft,ee+=M.offsetTop;(this._o.reposition&&j+L>ne||this._o.position.indexOf("right")>-1&&j-L+A.offsetWidth>0)&&(j=j-L+A.offsetWidth,te=!1),(this._o.reposition&&ee+B>oe+se||this._o.position.indexOf("top")>-1&&ee-B-A.offsetHeight>0)&&(ee=ee-B-A.offsetHeight,ce=!1),this.el.style.left=j+"px",this.el.style.top=ee+"px",p(this.el,te?"left-aligned":"right-aligned"),p(this.el,ce?"bottom-aligned":"top-aligned"),y(this.el,te?"right-aligned":"left-aligned"),y(this.el,ce?"top-aligned":"bottom-aligned")}},render:function(A,M,L){var B=this._o,ne=new Date,oe=D(A,M),se=new Date(A,M,1).getDay(),j=[],ee=[];k(ne),B.firstDay>0&&(se-=B.firstDay,se<0&&(se+=7));for(var J=M===0?11:M-1,te=M===11?0:M+1,ce=M===0?A-1:A,le=M===11?A+1:A,he=D(ce,J),W=oe+se,re=W;re>7;)re-=7;W+=7-re;for(var Z=!1,fe=0,pe=0;fe<W;fe++){var be=new Date(A,M,1+(fe-se)),ge=b(this._d)?x(be,this._d):!1,Re=x(be,ne),Ve=B.events.indexOf(be.toDateString())!==-1,Ne=fe<se||fe>=oe+se,Je=1+(fe-se),ke=M,ut=A,Yt=B.startRange&&x(B.startRange,be),rt=B.endRange&&x(B.endRange,be),Ot=B.startRange&&B.endRange&&B.startRange<be&&be<B.endRange,Ut=B.minDate&&be<B.minDate||B.maxDate&&be>B.maxDate||B.disableWeekends&&m(be)||B.disableDayFn&&B.disableDayFn(be);Ne&&(fe<se?(Je=he+Je,ke=J,ut=ce):(Je=Je-oe,ke=te,ut=le));var Lt={day:Je,month:ke,year:ut,hasEvent:Ve,isSelected:ge,isToday:Re,isDisabled:Ut,isEmpty:Ne,isStartRange:Yt,isEndRange:rt,isInRange:Ot,showDaysInNextAndPreviousMonths:B.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:B.enableSelectionDaysInNextAndPreviousMonths};B.pickWholeWeek&&ge&&(Z=!0),ee.push(z(Lt)),++pe===7&&(B.showWeekNumber&&ee.unshift($(fe-se,M,A,B.firstWeekOfYearMinDays)),j.push(K(ee,B.isRTL,B.pickWholeWeek,Z)),ee=[],pe=0,Z=!1)}return H(B,j,L)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),y(this.el,"is-hidden"),this._o.bound&&(l(i,"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var A=this._v;A!==!1&&(this._o.bound&&d(i,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),p(this.el,"is-hidden"),this._v=!1,A!==void 0&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){var A=this._o;this.hide(),d(this.el,"mousedown",this._onMouseDown,!0),d(this.el,"touchend",this._onMouseDown,!0),d(this.el,"change",this._onChange),A.keyboardInput&&d(i,"keydown",this._onKeyChange),A.field&&(d(A.field,"change",this._onInputChange),A.bound&&(d(A.trigger,"click",this._onInputClick),d(A.trigger,"focus",this._onInputFocus),d(A.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},ae})}(yl)),yl.exports}xF();function RF(e){return`(${TF(e)})`}function TF(e){return e.replace("-","")}function Oh(e,t={}){const{currencySymbol:n="",decimalPlaces:o=2,decimalSeparator:r=".",negativeClass:i,negativeInParentheses:a=!0,noHTML:l=!1,positiveClass:d,thousandsSeparator:u=",",zeroAsBlank:f=!1}=t;if(e==null||e==="")return"";if(!Number(e)&&f)return"";const p=(Number(e)||0)<0,y=Math.abs(Number(e)||0).toFixed(o),w=parseInt(y).toString(),b=w.length>3?w.length%3:0,v=(b?w.slice(0,b)+u:"")+w.slice(b).replace(/(\d{3})(?=\d)/g,`$1${u}`)+(o?r+y.slice(-o):""),D=`${n}${v}`,k=p?`-${D}`:D,x=p&&a?RF(k):k;return l?x:p?i?`<span class="${i}">${x}</span>`:x:d?`<span class="${d}">${x}</span>`:x}function Gv(e){return function(n,o,r){return Oh(r,e)}}const kF=Gv().name,EF=(e,t)=>{const n=e.sum&&e.sum[t.field];return n!==null?`${e.group.level?"total":"TOTAL"}: ${Oh(n)}`:""};function PF(e){if(!e.getSelectionModel())return Im(e);let t=e.getSelectedRows();return t.sort((n,o)=>n-o),t.length===0&&(t=Im(e)),t}function Im(e){const t=e.getData();return Array.from({length:t.getLength()},(n,o)=>o)}var Pc=(e=>(e.slickTable="slick-table",e.sorting="sorting",e))(Pc||{});function Fd(){return JSON.parse(localStorage.getItem(Pc.slickTable)||"{}")}function Ld(e){return e[Pc.sorting]||{}}function Nm(e,t){localStorage.setItem(Pc.slickTable,JSON.stringify({...e,sorting:t}))}class DF{getTableSorting(t){const n=Fd();return Ld(n)[t]}resetTableSorting(t){const n=Fd(),o=Ld(n);delete o[t],Nm(n,o)}setTableSorting(t,n,o){const r=Fd(),i=Ld(r);i[t]={columnId:n,isAscending:o},Nm(r,i)}}const $d=new DF;class OF{constructor(){this.emptyValue="1/1/1970"}dates(t,n){const o=Ss(t||this.emptyValue),r=Ss(n||this.emptyValue);return o-r}numbers(t,n){return Number(t||0)-Number(n||0)}stringsNumeric(t,n){return!t&&!n?0:t?n?t.localeCompare(n,void 0,{numeric:!0}):1:-1}strings(t,n){return(t||"").toLowerCase()>(n||"").toLowerCase()?1:(t||"").toLowerCase()<(n||"").toLowerCase()?-1:0}numbersWithSymbols(t,n){const o=Number((t||"0").match(/^\d+/g)?.[0]||0);return Number((n||"0").match(/^\d+/g)?.[0]||0)-o}}const MF=new OF;class Kv{constructor(){this.sort=MF,this.withFormatter=[Co.TEXT,Co.NUMBER_FORMATTED]}getSortFunction(t){let n="",o=!1,r;return(i,a)=>{const{grid:l,sortAsc:d,columnId:u}=a,f=a.sortCol;if(!l||!f)return;const p=f.field;if(!p)return;const y=f.sortAs;if(!y)return;const{formatter:w}=f,b=l.getData();d&&n===f?.id?(o=!0,$d.resetTableSorting(t),l.setSortColumns([]),n=""):(o=!1,n=u,$d.setTableSorting(t,u,d));const m=d?-1:1,v=b.getGrouping(),D=v.find(({getter:k})=>k===f.id);if(D){if(r||(r=v.map(({comparer:k})=>k)),o){const k=b.getGrouping(),x=k.findIndex(({getter:S})=>S===f.id);k[x].comparer=r[x],b.refresh();return}D.comparer=(k,x)=>{let S=k.value,C=x.value;return w&&this.withFormatter.includes(y)&&(S=w(0,0,S,f,null,l),C=w(0,0,C,f,null,l)),this.priority(k,x)||this.compare(S,C,m,y)}}else{const k=b.getItems(),x=b.getIdPropertyName();k.sort((S,C)=>{if(o)return S[x]-C[x];let O=S[p],I=C[p];return w&&this.withFormatter.includes(y)&&(O=w(0,0,O,f,S,l),I=w(0,0,I,f,C,l)),this.priority(S,C)||this.compare(O,I,m,y)})}b.refresh()}}priority(t,n){return 0}restoreSorting(t){const n=t.grid;if(!n)return;const o=$d.getTableSorting(t.id);if(o){const{columnId:r,isAscending:i}=o,a=this.getSortFunction(t.id),l=n.getColumns().find(({id:d})=>d===r);l&&(a(null,{grid:n,columnId:r,sortAsc:i,sortCol:l,sortCols:[]}),document.querySelector(`#${t.id} [data-id="${r}"] .slick-sort-indicator`)?.classList.add(`slick-sort-indicator-${i?"asc":"desc"}`),n.invalidate())}}compare(t,n,o,r){switch(r){case Co.DATE:return this.sort.dates(t,n)*o;case Co.NUMBER:case Co.NUMBER_FORMATTED:return this.sort.numbers(t,n)*o;case Co.TEXT_NUMERIC:return this.sort.stringsNumeric(t,n)*o;case Co.TEXT:return this.sort.strings(t,n)*o;default:return 0}}}const IF=new Kv;class NF{constructor(t,n){this.columnsWithTitle=t,this.columnsWithValue=n}calculate(t){let n=t.getColumns().length;for(;n--;)this.calculateColumn(n,t)}calculateColumn(t,n){const r=n.getColumns()[t].field;this.columnsWithTitle.includes(r)?this.addTitle(n,t):this.columnsWithValue.includes(r)&&this.addTotal(n,t)}addTitle(t,n){const r=t.getColumns()[n].id,i=t.getFooterRowColumn(r);i.textContent="TOTAL:"}addTotal(t,n){const o=t.getColumns()[n],r=o.field,i=t.getData(),a=this.displayedRows(i),l=this.totalAmountOf(a,r),d=t.getFooterRowColumn(r),u=o.formatter;d.textContent=`${u?u(0,0,l,o,null,t):l}`}displayedRows(t){const n=[],o=t.getLength();if(!o)return n;for(let r=0;r<o;r++)n.push(t.getItem(r));return n}totalAmountOf(t,n){return t.reduce((o,r)=>(r.isDeleted||(o+=Number(r[n])||0),o),0)}}function AF(e){const t={};if(!e)return t;const n=e.summaryColumnIds,o=e.grid;if(!o)return t;const r=o.getSelectedRows();o.getColumns().forEach((l,d)=>{const{formatter:u,id:f,name:p}=l;n.includes(f)&&(t[f]={cell:d,column:l,formatter:u,label:p,total:0,totalFormatted:u?u(0,0,0,l,{},o):"0"})});const a=o.getData();return r.forEach(l=>{const d=a.getItem(l);Object.keys(t).forEach(u=>{t[u].total+=d[u],t[u].totalFormatted=t[u].formatter?t[u].formatter(l,t[u].cell,t[u].total,t[u].column,d,o):`${t[u].total}`})}),t}const Xv=ie(_y)({alignItems:"center",color:"#1E456F",display:"flex",justifyContent:"space-between"}),FF=ie("span")({display:"flex",alignItems:"center"}),LF=ie("span")({marginLeft:"0.5em",width:"20px",cursor:"pointer",backgroundColor:"#1E456F","&:hover":{scale:"1.3"}}),Vd={Icon:LF,Total:FF},$F=({label:e,total:t,totalFormatted:n})=>{const[o,r]=Fe.useState(!1);function i(){navigator.clipboard.writeText(`${t}`),r(!0),setTimeout(()=>{r(!1)},1e3)}return E.jsxs(Xv,{children:[E.jsx("span",{children:`Total ${e}:`}),E.jsxs(Vd.Total,{children:[E.jsx("span",{children:`${n}`}),o?E.jsx(Vd.Icon,{className:"sgi sgi-check"}):E.jsx(Vy,{title:"Copy to clipboard",children:E.jsx(Vd.Icon,{className:"sgi sgi-content-copy",onClick:i})})]})]})},VF=ie(Gu)({"& .MuiPaper-root":{minWidth:"25em"}}),jF=ie(xy)({color:"#1E456F"}),BF=ie(pc)({padding:0}),WF=ie(ko)({borderColor:"#1E9577",color:"#1E9577",textTransform:"none"}),el={Button:WF,Dialog:VF,DialogTitle:jF,List:BF},HF=()=>{const[e,t]=Fe.useState(0),[n,o]=Fe.useState(!1),[r,i]=Fe.useState({});function a(){Uo.open=!1}return Fe.useEffect(()=>{function l(){const d=Uo.open;if(d){const u=Uo.table,f=u?.grid;t(f?.getSelectedRows().length||0),i(AF(u))}o(d)}return Uo.subscribe(l),()=>{Uo.unsubscribe(l)}},[]),n?E.jsxs(el.Dialog,{open:n,onClose:a,children:[E.jsx(el.DialogTitle,{children:"Selected rows summary"}),E.jsx(Xu,{children:E.jsxs(el.List,{children:[E.jsx(Xv,{children:`Number of selected rows: ${e}`}),Object.entries(r).map(([l,{label:d,total:u,totalFormatted:f}])=>E.jsx(oo,{children:E.jsx($F,{label:d,total:u,totalFormatted:f})},l))]})}),E.jsx(Ku,{children:E.jsx(el.Button,{variant:"outlined",onClick:a,children:"Close"})})]}):null};function Mh(e,t,n){const{scrollWidth:o}=document.documentElement,{left:r,right:i}=e.getBoundingClientRect(),a=i-r,l=t+i>=o;e.style.left=`${l?t-a:t}px`,e.style.top=`${n}px`,e.style.visibility="visible"}const zF=ie(oo)({position:"fixed",top:"0",left:"0",right:"0",bottom:"0",zIndex:"2"}),YF={Wrapper:zF},Ih=({setIsOpened:e})=>E.jsx(YF.Wrapper,{onClick:()=>e(!1),onContextMenu:t=>{t.preventDefault(),e(!1)},"data-testid":"overlay"}),UF=ie(oo)({visibility:"hidden",borderRadius:"5px",backgroundColor:"#FFFFFF",boxShadow:"1px 1px 1px 1px gray",padding:"0.5em",position:"absolute",zIndex:10,userSelect:"none",fontSize:"inherit",top:0,left:0}),qF={Wrapper:UF},Nh=({children:e,id:t})=>E.jsx(qF.Wrapper,{id:t,children:e});function GF(e){const{columnId:t,table:n}=Rn;if(!t||!n)return;const o=n.filter.args;o.columnFilters&&(n.filter.args={...o,columnFilters:{...o.columnFilters,[t]:{...o.columnFilters[t],value:e}}},e[1]||e[2]?or.highlightColumn(n,t):or.resetColumn(n,t))}const rr=Uv(GF),js={1:"",2:""},Zv="column_filters",lo={filter:"🔎︎ Filter...",from:"🔎︎ From...",to:"🔎︎ To..."};function KF(e){switch(e){case hn.Boolean:return je.Boolean;case hn.Date:return je.DateEqual;case hn.MultipleSelect:return je.MultipleSelect;case hn.Number:case hn.NumberFormatted:return je.NumberEqual;case hn.Text:return je.TextContain}}function XF(e,t,n){Fe.useEffect(()=>{if(!e)return;const o=document.getElementById(Zv);if(!o)return;const{columnId:r,group:i,table:a,x:l,y:d}=Rn;if(!a?.grid)return;const f=a.filter.args;Mh(o,l,d);const{filterId:p,value:y}=f.columnFilters?.[r]||{},w=p||KF(i),b=y||js;a.filter.args={...f,columnFilters:{...f.columnFilters,[r]:{filterId:w,group:i,value:b}}},t(w),n(b)},[e])}function ZF(e){Fe.useEffect(()=>{function t(){e(!0)}return Rn.subscribe(t),()=>{Rn.unsubscribe(t)}},[])}function yu(e){return{format:Yr.ui,value:e?xe(e,LN):null}}const QF=ie(ko)({width:"5em",alignSelf:"flex-end"}),JF={Button:QF},eL=({setIsOpened:e,setValue:t,value:n})=>{function o(){const{columnId:r,table:i}=Rn;if(!i||!i.grid)return;const l=i.filter.args;delete l.columnFilters?.[r],i.filter.args=l,or.resetColumn(i,r),t(js),e(!1)}return E.jsx(JF.Button,{disabled:!n[1]&&!n[2],onClick:o,variant:"outlined",size:"small",children:"Reset"})},tL=ie(fc)({padding:0}),nL=ie(Ry)({margin:"0.5em 0 0 1em"}),tl={Checkbox:tL,FormGroup:nL},oL=({setValue:e,value:t})=>{function n(o){e(o),rr(o)}return E.jsxs(tl.FormGroup,{children:[E.jsx(ul,{control:E.jsx(tl.Checkbox,{checked:!t[1]&&!t[2],onClick:()=>n({1:"",2:""}),size:"small"}),label:"All"}),E.jsx(ul,{control:E.jsx(tl.Checkbox,{checked:!!t[1],onClick:()=>n({1:"true",2:""}),size:"small"}),label:"Yes"}),E.jsx(ul,{control:E.jsx(tl.Checkbox,{checked:!!t[2],onClick:()=>n({1:"",2:"true"}),size:"small"}),label:"No"})]})},rL={Y:"year",YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:1},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},d:{sectionType:"weekDay",contentType:"digit",maxLength:1},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},sL={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Am=["Missing timezone plugin","To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`","Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone"].join(`
356
+ `);class Qv{constructor({locale:t,formats:n,instance:o}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=rL,this.setLocaleToValue=r=>{const i=this.getCurrentLocaleCode();return i===r.locale()?r:r.locale(i)},this.hasTimezonePlugin=()=>typeof this.moment.tz<"u",this.createSystemDate=r=>{const i=this.moment(r).local();return this.locale===void 0?i:i.locale(this.locale)},this.createUTCDate=r=>{const i=this.moment.utc(r);return this.locale===void 0?i:i.locale(this.locale)},this.createTZDate=(r,i)=>{if(!this.hasTimezonePlugin())throw new Error(Am);const a=i==="default"?this.moment(r):this.moment.tz(r,i);return this.locale===void 0?a:a.locale(this.locale)},this.date=(r,i="default")=>r===null?null:i==="UTC"?this.createUTCDate(r):i==="system"||i==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(r):this.createTZDate(r,i),this.getInvalidDate=()=>this.moment(new Date("Invalid Date")),this.getTimezone=r=>{const i=r._z?.name,a=r.isUTC()?"UTC":"system";return i??this.moment.defaultZone?.name??a},this.setTimezone=(r,i)=>{if(this.getTimezone(r)===i)return r;if(i==="UTC")return r.clone().utc();if(i==="system")return r.clone().local();if(!this.hasTimezonePlugin()){if(i!=="default")throw new Error(Am);return r}const a=i==="default"?this.moment.defaultZone?.name??"system":i;if(a==="system")return r.clone().local();const l=r.clone();return l.tz(a),l},this.toJsDate=r=>r.toDate(),this.parse=(r,i)=>r===""?null:this.locale?this.moment(r,i,this.locale,!0):this.moment(r,i,!0),this.getCurrentLocaleCode=()=>this.locale||xe.locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(xe.localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=r=>{const i=/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;return r.match(i).map(a=>{const l=a[0];return l==="L"||l===";"?xe.localeData(this.getCurrentLocaleCode()).longDateFormat(a):a}).join("")},this.isValid=r=>r==null?!1:r.isValid(),this.format=(r,i)=>this.formatByString(r,this.formats[i]),this.formatByString=(r,i)=>{const a=r.clone();return a.locale(this.getCurrentLocaleCode()),a.format(i)},this.formatNumber=r=>r,this.isEqual=(r,i)=>r===null&&i===null?!0:r===null||i===null?!1:r.isSame(i),this.isSameYear=(r,i)=>r.isSame(i,"year"),this.isSameMonth=(r,i)=>r.isSame(i,"month"),this.isSameDay=(r,i)=>r.isSame(i,"day"),this.isSameHour=(r,i)=>r.isSame(i,"hour"),this.isAfter=(r,i)=>r.isAfter(i),this.isAfterYear=(r,i)=>r.isAfter(i,"year"),this.isAfterDay=(r,i)=>r.isAfter(i,"day"),this.isBefore=(r,i)=>r.isBefore(i),this.isBeforeYear=(r,i)=>r.isBefore(i,"year"),this.isBeforeDay=(r,i)=>r.isBefore(i,"day"),this.isWithinRange=(r,[i,a])=>r.isBetween(i,a,null,"[]"),this.startOfYear=r=>r.clone().startOf("year"),this.startOfMonth=r=>r.clone().startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r.clone()).startOf("week"),this.startOfDay=r=>r.clone().startOf("day"),this.endOfYear=r=>r.clone().endOf("year"),this.endOfMonth=r=>r.clone().endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r.clone()).endOf("week"),this.endOfDay=r=>r.clone().endOf("day"),this.addYears=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"years"):r.clone().add(i,"years"),this.addMonths=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"months"):r.clone().add(i,"months"),this.addWeeks=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"weeks"):r.clone().add(i,"weeks"),this.addDays=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"days"):r.clone().add(i,"days"),this.addHours=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"hours"):r.clone().add(i,"hours"),this.addMinutes=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"minutes"):r.clone().add(i,"minutes"),this.addSeconds=(r,i)=>i<0?r.clone().subtract(Math.abs(i),"seconds"):r.clone().add(i,"seconds"),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month"),this.getDate=r=>r.get("date"),this.getHours=r=>r.get("hours"),this.getMinutes=r=>r.get("minutes"),this.getSeconds=r=>r.get("seconds"),this.getMilliseconds=r=>r.get("milliseconds"),this.setYear=(r,i)=>r.clone().year(i),this.setMonth=(r,i)=>r.clone().month(i),this.setDate=(r,i)=>r.clone().date(i),this.setHours=(r,i)=>r.clone().hours(i),this.setMinutes=(r,i)=>r.clone().minutes(i),this.setSeconds=(r,i)=>r.clone().seconds(i),this.setMilliseconds=(r,i)=>r.clone().milliseconds(i),this.getDaysInMonth=r=>r.daysInMonth(),this.getWeekArray=r=>{const i=this.startOfWeek(this.startOfMonth(r)),a=this.endOfWeek(this.endOfMonth(r));let l=0,d=i;const u=[];for(;d.isBefore(a);){const f=Math.floor(l/7);u[f]=u[f]||[],u[f].push(d),d=this.addDays(d,1),l+=1}return u},this.getWeekNumber=r=>r.week(),this.getDayOfWeek=r=>r.day()+1,this.moment=o||xe,this.locale=t,this.formats=Q({},sL,n)}getYearRange([t,n]){const o=this.startOfYear(t),r=this.endOfYear(n),i=[];let a=o;for(;this.isBefore(a,r);)i.push(a),a=this.addYears(a,1);return i}}const vi=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),iL=({openTo:e,defaultOpenTo:t,views:n,defaultViews:o})=>{const r=n??o;let i;if(e!=null)i=e;else if(r.includes(t))i=t;else if(r.length>0)i=r[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:r,openTo:i}},Ll=(e,t,n)=>{let o=t;return o=e.setHours(o,e.getHours(n)),o=e.setMinutes(o,e.getMinutes(n)),o=e.setSeconds(o,e.getSeconds(n)),o=e.setMilliseconds(o,e.getMilliseconds(n)),o},Fi=({date:e,disableFuture:t,disablePast:n,maxDate:o,minDate:r,isDateDisabled:i,utils:a,timezone:l})=>{const d=Ll(a,a.date(void 0,l),e);n&&a.isBefore(r,d)&&(r=d),t&&a.isAfter(o,d)&&(o=d);let u=e,f=e;for(a.isBefore(e,r)&&(u=r,f=null),a.isAfter(e,o)&&(f&&(f=o),u=null);u||f;){if(u&&a.isAfter(u,o)&&(u=null),f&&a.isBefore(f,r)&&(f=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(f){if(!i(f))return f;f=a.addDays(f,-1)}}return null},aL=(e,t)=>t==null||!e.isValid(t)?null:t,Jn=(e,t,n)=>t==null||!e.isValid(t)?n:t,lL=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Ah=(e,t)=>{const o=[e.startOfYear(t)];for(;o.length<12;){const r=o[o.length-1];o.push(e.addMonths(r,1))}return o},Jv=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),cL=["year","month","day"],Fm=e=>cL.includes(e),Fh=(e,{format:t,views:n},o)=>{if(t!=null)return t;const r=e.formats;return vi(n,["year"])?r.year:vi(n,["month"])?r.month:vi(n,["day"])?r.dayOfMonth:vi(n,["month","year"])?`${r.month} ${r.year}`:vi(n,["day","month"])?`${r.month} ${r.dayOfMonth}`:o?/en/.test(e.getCurrentLocaleCode())?r.normalDateWithWeekday:r.normalDate:r.keyboardDate},dL=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(o=>e.addDays(n,o))},uL=["hours","minutes","seconds"],hL=e=>uL.includes(e),Lm=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),fL=(e,t)=>(n,o)=>e?t.isAfter(n,o):Lm(n,t)>Lm(o,t),xo={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},pL=e=>Math.max(...e.map(t=>xo[t.type]??1)),bi=(e,t,n)=>{if(t===xo.year)return e.startOfYear(n);if(t===xo.month)return e.startOfMonth(n);if(t===xo.day)return e.startOfDay(n);let o=n;return t<xo.minutes&&(o=e.setMinutes(o,0)),t<xo.seconds&&(o=e.setSeconds(o,0)),t<xo.milliseconds&&(o=e.setMilliseconds(o,0)),o},mL=({props:e,utils:t,granularity:n,timezone:o,getTodayDate:r})=>{let i=r?r():bi(t,n,Jv(t,o));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=bi(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=bi(t,n,e.maxDate));const a=fL(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=bi(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Ll(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=bi(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Ll(t,i,e.maxTime))),i},Lh=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
357
+ `));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},gL=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Dc=(e,t)=>{const n=[],o=e.date(void 0,"default"),r=e.startOfWeek(o),i=e.endOfWeek(o);let a=r;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(l=>e.formatByString(l,t))},eb=(e,t,n,o)=>{switch(n){case"month":return Ah(e,e.date(void 0,t)).map(r=>e.formatByString(r,o));case"weekDay":return Dc(e,o);case"meridiem":{const r=e.date(void 0,t);return[e.startOfDay(r),e.endOfDay(r)].map(i=>e.formatByString(i,o))}default:return[]}},$m="s",yL=["0","1","2","3","4","5","6","7","8","9"],vL=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),$m)==="0"?yL:Array.from({length:10}).map((o,r)=>e.formatByString(e.setSeconds(t,r),$m))},Ur=(e,t)=>{if(t[0]==="0")return e;const n=[];let o="";for(let r=0;r<e.length;r+=1){o+=e[r];const i=t.indexOf(o);i>-1&&(n.push(i.toString()),o="")}return n.join("")},$h=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),Vm=(e,t)=>{const n=Ur(e,t);return n!==" "&&!Number.isNaN(Number(n))},tb=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},nb=(e,t,n,o,r)=>{if(process.env.NODE_ENV!=="production"&&r.type!=="day"&&r.contentType==="digit-with-letter")throw new Error([`MUI X: The token "${r.format}" is a digit format with letter in it.'
358
358
  This type of format is only supported for 'day' sections`].join(`
359
- `));if(r.type==="day"&&r.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,r.format)}let i=t.toString();return r.hasLeadingZerosInInput&&(i=tb(i,r.maxLength)),$h(i,o)},vL=(e,t,n,o,r,i,a,l)=>{const d=mL(o),u=o==="Home",f=o==="End",p=n.value===""||u||f,y=()=>{const b=r[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),m=x=>nb(e,x,b,i,n),v=n.type==="minutes"&&l?.minutesStep?l.minutesStep:1;let k=parseInt(Ur(n.value,i),10)+d*v;if(p){if(n.type==="year"&&!f&&!u)return e.formatByString(e.date(void 0,t),n.format);d>0||u?k=b.minimum:k=b.maximum}return k%v!==0&&((d<0||u)&&(k+=v-(v+k)%v),(d>0||f)&&(k-=k%v)),k>b.maximum?m(b.minimum+(k-b.maximum-1)%(b.maximum-b.minimum+1)):k<b.minimum?m(b.maximum-(b.minimum-k-1)%(b.maximum-b.minimum+1)):m(k)},w=()=>{const b=eb(e,t,n.type,n.format);if(b.length===0)return n.value;if(p)return d>0||u?b[0]:b[b.length-1];const D=((b.indexOf(n.value)+d)%b.length+b.length)%b.length;return b[D]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?y():w()},Vh=(e,t,n)=>{let o=e.value||e.placeholder;const r=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(o=Number(Ur(o,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!r&&o.length===1&&(o=`${o}‎`),t==="input-rtl"&&(o=`⁨${o}⁩`),o},jm=(e,t,n,o)=>{if(process.env.NODE_ENV!=="production"&&Lh(e,n).type==="weekDay")throw new Error("changeSectionValueFormat doesn't support week day formats");return e.formatByString(e.parse(t,n),o)},ob=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,rb=(e,t,n,o)=>{if(t!=="digit")return!1;const r=e.date(void 0,"default");switch(n){case"year":return ob(e,o)?e.formatByString(e.setYear(r,1),o)==="0001":e.formatByString(e.setYear(r,2001),o)==="01";case"month":return e.formatByString(e.startOfYear(r),o).length>1;case"day":return e.formatByString(e.startOfMonth(r),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(r),o).length>1;case"hours":return e.formatByString(e.setHours(r,1),o).length>1;case"minutes":return e.formatByString(e.setMinutes(r,1),o).length>1;case"seconds":return e.formatByString(e.setSeconds(r,1),o).length>1;default:throw new Error("Invalid section type")}},bL=(e,t,n)=>{const o=t.some(d=>d.type==="day"),r=[],i=[];for(let d=0;d<t.length;d+=1){const u=t[d];o&&u.type==="weekDay"||(r.push(u.format),i.push(Vh(u,"non-input",n)))}const a=r.join(" "),l=i.join(" ");return e.parse(l,a)},wL=e=>e.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),CL=(e,t,n)=>{const r=e.map(i=>{const a=Vh(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${r}⁩`:r},SL=(e,t,n)=>{const o=e.date(void 0,n),r=e.endOfYear(o),i=e.endOfDay(o),{maxDaysInMonth:a,longestMonth:l}=Ah(e,o).reduce((d,u)=>{const f=e.getDaysInMonth(u);return f>d.maxDaysInMonth?{maxDaysInMonth:f,longestMonth:u}:d},{maxDaysInMonth:0,longestMonth:null});return{year:({format:d})=>({minimum:0,maximum:ob(e,d)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(r)+1}),day:({currentDate:d})=>({minimum:1,maximum:d!=null&&e.isValid(d)?e.getDaysInMonth(d):a,longestMonth:l}),weekDay:({format:d,contentType:u})=>{if(u==="digit"){const f=Dc(e,d).map(Number);return{minimum:Math.min(...f),maximum:Math.max(...f)}}return{minimum:1,maximum:7}},hours:({format:d})=>{const u=e.getHours(i);return Ur(e.formatByString(e.endOfDay(o),d),t)!==u.toString()?{minimum:1,maximum:Number(Ur(e.formatByString(e.startOfDay(o),d),t))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}};let Bm=!1;const Wm=(e,t)=>{if(process.env.NODE_ENV!=="production"&&!Bm){const n=["empty"];["date","date-time"].includes(t)&&n.push("weekDay","day","month","year"),["time","date-time"].includes(t)&&n.push("hours","minutes","seconds","meridiem");const o=e.find(r=>!n.includes(r.type));o&&(console.warn(`MUI X: The field component you are using is not compatible with the "${o.type}" date section.`,`The supported date sections are ["${n.join('", "')}"]\`.`),Bm=!0)}},_L=(e,t,n,o)=>{switch(t.type){case"year":return e.setYear(o,e.getYear(n));case"month":return e.setMonth(o,e.getMonth(n));case"weekDay":{const r=Dc(e,t.format),i=e.formatByString(n,t.format),a=r.indexOf(i),d=r.indexOf(t.value)-a;return e.addDays(n,d)}case"day":return e.setDate(o,e.getDate(n));case"meridiem":{const r=e.getHours(n)<12,i=e.getHours(o);return r&&i>=12?e.addHours(o,-12):!r&&i<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(n));case"minutes":return e.setMinutes(o,e.getMinutes(n));case"seconds":return e.setSeconds(o,e.getSeconds(n));default:return o}},Hm={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},zm=(e,t,n,o,r)=>[...n].sort((i,a)=>Hm[i.type]-Hm[a.type]).reduce((i,a)=>!r||a.modified?_L(e,a,t,i):i,o),xL=()=>navigator.userAgent.toLowerCase().includes("android"),RL=(e,t)=>{const n={};if(!t)return e.forEach((d,u)=>{const f=u===0?null:u-1,p=u===e.length-1?null:u+1;n[u]={leftIndex:f,rightIndex:p}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const o={},r={};let i=0,a=0,l=e.length-1;for(;l>=0;){a=e.findIndex((d,u)=>u>=i&&d.endSeparator?.includes(" ")&&d.endSeparator!==" / "),a===-1&&(a=e.length-1);for(let d=a;d>=i;d-=1)r[d]=l,o[l]=d,l-=1;i=a+1}return e.forEach((d,u)=>{const f=r[u],p=f===0?null:o[f-1],y=f===e.length-1?null:o[f+1];n[u]={leftIndex:p,rightIndex:y}}),{neighbors:n,startIndex:o[0],endIndex:o[e.length-1]}},vu=(e,t)=>e==null?null:e==="all"?"all":typeof e=="string"?t.findIndex(n=>n.type===e):e,TL=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},kL=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},EL=["value","referenceDate"],Io={emptyValue:null,getTodayValue:Jv,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,o=Ye(e,EL);return t!=null&&o.utils.isValid(t)?t:n??pL(o)},cleanValue:iL,areValuesEqual:aL,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},PL={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,o)=>!e.isValid(t)&&!!n?n:o(t),getV7HiddenInputValueFromSections:wL,getV6InputValueFromSections:CL,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},DL=["localeText"],$l=T.createContext(null);process.env.NODE_ENV!=="production"&&($l.displayName="MuiPickersAdapterContext");const Oc=function(t){const{localeText:n}=t,o=Ye(t,DL),{utils:r,localeText:i}=T.useContext($l)??{utils:void 0,localeText:void 0},a=Nt({props:o,name:"MuiLocalizationProvider"}),{children:l,dateAdapter:d,dateFormats:u,dateLibInstance:f,adapterLocale:p,localeText:y}=a,w=T.useMemo(()=>Q({},y,i,n),[y,i,n]),b=T.useMemo(()=>{if(!d)return r||null;const D=new d({locale:p,formats:u,instance:f});if(!D.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
360
- `));return D},[d,p,u,f,r]),m=T.useMemo(()=>b?{minDate:b.date("1900-01-01T00:00:00.000"),maxDate:b.date("2099-12-31T00:00:00.000")}:null,[b]),v=T.useMemo(()=>({utils:b,defaultDates:m,localeText:w}),[m,b,w]);return E.jsx($l.Provider,{value:v,children:l})};process.env.NODE_ENV!=="production"&&(Oc.propTypes={adapterLocale:s.any,children:s.node,dateAdapter:s.func,dateFormats:s.shape({dayOfMonth:s.string,dayOfMonthFull:s.string,fullDate:s.string,fullTime:s.string,fullTime12h:s.string,fullTime24h:s.string,hours12h:s.string,hours24h:s.string,keyboardDate:s.string,keyboardDateTime:s.string,keyboardDateTime12h:s.string,keyboardDateTime24h:s.string,meridiem:s.string,minutes:s.string,month:s.string,monthShort:s.string,normalDate:s.string,normalDateWithWeekday:s.string,seconds:s.string,shortDate:s.string,weekday:s.string,weekdayShort:s.string,year:s.string}),dateLibInstance:s.any,localeText:s.object});const OL=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:Q({},e)}}}}),sb=e=>{const{utils:t,formatKey:n,contextTranslation:o,propsTranslation:r}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(r??o)(i,t,a)}},ib={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,o)=>`Select ${e}. ${!o&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${o??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},ML=ib;OL(ib);const Qr=()=>{const e=T.useContext($l);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
359
+ `));if(r.type==="day"&&r.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,r.format)}let i=t.toString();return r.hasLeadingZerosInInput&&(i=tb(i,r.maxLength)),$h(i,o)},bL=(e,t,n,o,r,i,a,l)=>{const d=gL(o),u=o==="Home",f=o==="End",p=n.value===""||u||f,y=()=>{const b=r[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),m=x=>nb(e,x,b,i,n),v=n.type==="minutes"&&l?.minutesStep?l.minutesStep:1;let k=parseInt(Ur(n.value,i),10)+d*v;if(p){if(n.type==="year"&&!f&&!u)return e.formatByString(e.date(void 0,t),n.format);d>0||u?k=b.minimum:k=b.maximum}return k%v!==0&&((d<0||u)&&(k+=v-(v+k)%v),(d>0||f)&&(k-=k%v)),k>b.maximum?m(b.minimum+(k-b.maximum-1)%(b.maximum-b.minimum+1)):k<b.minimum?m(b.maximum-(b.minimum-k-1)%(b.maximum-b.minimum+1)):m(k)},w=()=>{const b=eb(e,t,n.type,n.format);if(b.length===0)return n.value;if(p)return d>0||u?b[0]:b[b.length-1];const D=((b.indexOf(n.value)+d)%b.length+b.length)%b.length;return b[D]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?y():w()},Vh=(e,t,n)=>{let o=e.value||e.placeholder;const r=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(o=Number(Ur(o,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!r&&o.length===1&&(o=`${o}‎`),t==="input-rtl"&&(o=`⁨${o}⁩`),o},jm=(e,t,n,o)=>{if(process.env.NODE_ENV!=="production"&&Lh(e,n).type==="weekDay")throw new Error("changeSectionValueFormat doesn't support week day formats");return e.formatByString(e.parse(t,n),o)},ob=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,rb=(e,t,n,o)=>{if(t!=="digit")return!1;const r=e.date(void 0,"default");switch(n){case"year":return ob(e,o)?e.formatByString(e.setYear(r,1),o)==="0001":e.formatByString(e.setYear(r,2001),o)==="01";case"month":return e.formatByString(e.startOfYear(r),o).length>1;case"day":return e.formatByString(e.startOfMonth(r),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(r),o).length>1;case"hours":return e.formatByString(e.setHours(r,1),o).length>1;case"minutes":return e.formatByString(e.setMinutes(r,1),o).length>1;case"seconds":return e.formatByString(e.setSeconds(r,1),o).length>1;default:throw new Error("Invalid section type")}},wL=(e,t,n)=>{const o=t.some(d=>d.type==="day"),r=[],i=[];for(let d=0;d<t.length;d+=1){const u=t[d];o&&u.type==="weekDay"||(r.push(u.format),i.push(Vh(u,"non-input",n)))}const a=r.join(" "),l=i.join(" ");return e.parse(l,a)},CL=e=>e.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),SL=(e,t,n)=>{const r=e.map(i=>{const a=Vh(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${r}⁩`:r},_L=(e,t,n)=>{const o=e.date(void 0,n),r=e.endOfYear(o),i=e.endOfDay(o),{maxDaysInMonth:a,longestMonth:l}=Ah(e,o).reduce((d,u)=>{const f=e.getDaysInMonth(u);return f>d.maxDaysInMonth?{maxDaysInMonth:f,longestMonth:u}:d},{maxDaysInMonth:0,longestMonth:null});return{year:({format:d})=>({minimum:0,maximum:ob(e,d)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(r)+1}),day:({currentDate:d})=>({minimum:1,maximum:d!=null&&e.isValid(d)?e.getDaysInMonth(d):a,longestMonth:l}),weekDay:({format:d,contentType:u})=>{if(u==="digit"){const f=Dc(e,d).map(Number);return{minimum:Math.min(...f),maximum:Math.max(...f)}}return{minimum:1,maximum:7}},hours:({format:d})=>{const u=e.getHours(i);return Ur(e.formatByString(e.endOfDay(o),d),t)!==u.toString()?{minimum:1,maximum:Number(Ur(e.formatByString(e.startOfDay(o),d),t))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}};let Bm=!1;const Wm=(e,t)=>{if(process.env.NODE_ENV!=="production"&&!Bm){const n=["empty"];["date","date-time"].includes(t)&&n.push("weekDay","day","month","year"),["time","date-time"].includes(t)&&n.push("hours","minutes","seconds","meridiem");const o=e.find(r=>!n.includes(r.type));o&&(console.warn(`MUI X: The field component you are using is not compatible with the "${o.type}" date section.`,`The supported date sections are ["${n.join('", "')}"]\`.`),Bm=!0)}},xL=(e,t,n,o)=>{switch(t.type){case"year":return e.setYear(o,e.getYear(n));case"month":return e.setMonth(o,e.getMonth(n));case"weekDay":{const r=Dc(e,t.format),i=e.formatByString(n,t.format),a=r.indexOf(i),d=r.indexOf(t.value)-a;return e.addDays(n,d)}case"day":return e.setDate(o,e.getDate(n));case"meridiem":{const r=e.getHours(n)<12,i=e.getHours(o);return r&&i>=12?e.addHours(o,-12):!r&&i<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(n));case"minutes":return e.setMinutes(o,e.getMinutes(n));case"seconds":return e.setSeconds(o,e.getSeconds(n));default:return o}},Hm={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},zm=(e,t,n,o,r)=>[...n].sort((i,a)=>Hm[i.type]-Hm[a.type]).reduce((i,a)=>!r||a.modified?xL(e,a,t,i):i,o),RL=()=>navigator.userAgent.toLowerCase().includes("android"),TL=(e,t)=>{const n={};if(!t)return e.forEach((d,u)=>{const f=u===0?null:u-1,p=u===e.length-1?null:u+1;n[u]={leftIndex:f,rightIndex:p}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const o={},r={};let i=0,a=0,l=e.length-1;for(;l>=0;){a=e.findIndex((d,u)=>u>=i&&d.endSeparator?.includes(" ")&&d.endSeparator!==" / "),a===-1&&(a=e.length-1);for(let d=a;d>=i;d-=1)r[d]=l,o[l]=d,l-=1;i=a+1}return e.forEach((d,u)=>{const f=r[u],p=f===0?null:o[f-1],y=f===e.length-1?null:o[f+1];n[u]={leftIndex:p,rightIndex:y}}),{neighbors:n,startIndex:o[0],endIndex:o[e.length-1]}},vu=(e,t)=>e==null?null:e==="all"?"all":typeof e=="string"?t.findIndex(n=>n.type===e):e,kL=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},EL=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},PL=["value","referenceDate"],Io={emptyValue:null,getTodayValue:Jv,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,o=Ye(e,PL);return t!=null&&o.utils.isValid(t)?t:n??mL(o)},cleanValue:aL,areValuesEqual:lL,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},DL={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,o)=>!e.isValid(t)&&!!n?n:o(t),getV7HiddenInputValueFromSections:CL,getV6InputValueFromSections:SL,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},OL=["localeText"],$l=T.createContext(null);process.env.NODE_ENV!=="production"&&($l.displayName="MuiPickersAdapterContext");const Oc=function(t){const{localeText:n}=t,o=Ye(t,OL),{utils:r,localeText:i}=T.useContext($l)??{utils:void 0,localeText:void 0},a=Nt({props:o,name:"MuiLocalizationProvider"}),{children:l,dateAdapter:d,dateFormats:u,dateLibInstance:f,adapterLocale:p,localeText:y}=a,w=T.useMemo(()=>Q({},y,i,n),[y,i,n]),b=T.useMemo(()=>{if(!d)return r||null;const D=new d({locale:p,formats:u,instance:f});if(!D.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
360
+ `));return D},[d,p,u,f,r]),m=T.useMemo(()=>b?{minDate:b.date("1900-01-01T00:00:00.000"),maxDate:b.date("2099-12-31T00:00:00.000")}:null,[b]),v=T.useMemo(()=>({utils:b,defaultDates:m,localeText:w}),[m,b,w]);return E.jsx($l.Provider,{value:v,children:l})};process.env.NODE_ENV!=="production"&&(Oc.propTypes={adapterLocale:s.any,children:s.node,dateAdapter:s.func,dateFormats:s.shape({dayOfMonth:s.string,dayOfMonthFull:s.string,fullDate:s.string,fullTime:s.string,fullTime12h:s.string,fullTime24h:s.string,hours12h:s.string,hours24h:s.string,keyboardDate:s.string,keyboardDateTime:s.string,keyboardDateTime12h:s.string,keyboardDateTime24h:s.string,meridiem:s.string,minutes:s.string,month:s.string,monthShort:s.string,normalDate:s.string,normalDateWithWeekday:s.string,seconds:s.string,shortDate:s.string,weekday:s.string,weekdayShort:s.string,year:s.string}),dateLibInstance:s.any,localeText:s.object});const ML=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:Q({},e)}}}}),sb=e=>{const{utils:t,formatKey:n,contextTranslation:o,propsTranslation:r}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(r??o)(i,t,a)}},ib={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,o)=>`Select ${e}. ${!o&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${o??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},IL=ib;ML(ib);const Qr=()=>{const e=T.useContext($l);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
361
361
  `));if(e.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
362
- `));const t=T.useMemo(()=>Q({},ML,e.localeText),[e.localeText]);return T.useMemo(()=>Q({},e,{localeText:t}),[e,t])},Ft=()=>Qr().utils,_a=()=>Qr().defaultDates,Mc=e=>{const t=Ft(),n=T.useRef();return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};function IL(e){return Me("MuiPickersToolbar",e)}Pe("MuiPickersToolbar",["root","content"]);const NL=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],AL=e=>{const{classes:t,isLandscape:n}=e;return Ie({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},IL,t)},FL=ie("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),LL=ie("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),$L=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:a,hidden:l,titleId:d}=o,u=Ye(o,NL),f=o,p=AL(f);return l?null:E.jsxs(FL,Q({ref:n,className:Se(p.root,i),ownerState:f},u,{children:[E.jsx(bn,{color:"text.secondary",variant:"overline",id:d,children:a}),E.jsx(LL,{className:p.content,ownerState:f,children:r})]}))}),lr=()=>Qr().localeText;function VL(e){return Me("MuiDatePickerToolbar",e)}Pe("MuiDatePickerToolbar",["root","title"]);const jL=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],BL=e=>{const{classes:t}=e;return Ie({root:["root"],title:["title"]},VL,t)},WL=ie($L,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),HL=ie(bn,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),ab=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiDatePickerToolbar"}),{value:r,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:l="––",views:d,className:u}=o,f=Ye(o,jL),p=Ft(),y=lr(),w=BL(o),b=T.useMemo(()=>{if(!r)return l;const v=Fh(p,{format:a,views:d},!0);return p.formatByString(r,v)},[r,a,l,p,d]),m=o;return E.jsx(WL,Q({ref:n,toolbarTitle:y.datePickerToolbarTitle,isLandscape:i,className:Se(w.root,u)},f,{children:E.jsx(HL,{variant:"h4",align:i?"left":"center",ownerState:m,className:w.title,children:b})}))});process.env.NODE_ENV!=="production"&&(ab.propTypes={classes:s.object,className:s.string,disabled:s.bool,hidden:s.bool,isLandscape:s.bool.isRequired,onChange:s.func.isRequired,onViewChange:s.func.isRequired,readOnly:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),titleId:s.string,toolbarFormat:s.string,toolbarPlaceholder:s.node,value:s.object,view:s.oneOf(["day","month","year"]).isRequired,views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired).isRequired});function lb(e,t){const n=Ft(),o=_a(),r=Nt({props:e,name:t}),i=T.useMemo(()=>r.localeText?.toolbarTitle==null?r.localeText:Q({},r.localeText,{datePickerToolbarTitle:r.localeText.toolbarTitle}),[r.localeText]);return Q({},r,{localeText:i},sL({views:r.views,openTo:r.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,minDate:Jn(n,r.minDate,o.minDate),maxDate:Jn(n,r.maxDate,o.maxDate),slots:Q({toolbar:ab},r.slots)})}const xa=({props:e,value:t,timezone:n,adapter:o})=>{if(t===null)return null;const{shouldDisableDate:r,shouldDisableMonth:i,shouldDisableYear:a,disablePast:l,disableFuture:d}=e,u=o.utils.date(void 0,n),f=Jn(o.utils,e.minDate,o.defaultDates.minDate),p=Jn(o.utils,e.maxDate,o.defaultDates.maxDate);switch(!0){case!o.utils.isValid(t):return"invalidDate";case!!(r&&r(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(d&&o.utils.isAfterDay(t,u)):return"disableFuture";case!!(l&&o.utils.isBeforeDay(t,u)):return"disablePast";case!!(f&&o.utils.isBeforeDay(t,f)):return"minDate";case!!(p&&o.utils.isAfterDay(t,p)):return"maxDate";default:return null}};xa.valueManager=Io;const cb=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],zL=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],YL=["minDateTime","maxDateTime"],UL=[...cb,...zL,...YL],db=e=>UL.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function ub(e){const{props:t,validator:n,value:o,timezone:r,onError:i}=e,a=Qr(),l=T.useRef(n.valueManager.defaultErrorState),d=n({adapter:a,value:o,timezone:r,props:t}),u=n.valueManager.hasError(d);T.useEffect(()=>{i&&!n.valueManager.isSameError(d,l.current)&&i(d,o),l.current=d},[n,i,d,o]);const f=Te(p=>n({adapter:a,value:p,timezone:r,props:t}));return{validationError:d,hasValidationError:u,getValidationErrorForNewValue:f}}function qL(e){return Me("MuiPickersPopper",e)}Pe("MuiPickersPopper",["root","paper"]);function GL(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const KL=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},Ln=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Ln(t.shadowRoot):t:null},XL="@media (pointer: fine)",ZL="@media (prefers-reduced-motion: reduce)",Ps=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Ym=Ps&&Ps[1]?parseInt(Ps[1],10):null,Um=Ps&&Ps[2]?parseInt(Ps[2],10):null,QL=Ym&&Ym<10||Um&&Um<13||!1,hb=()=>Fg(ZL,{defaultMatches:!1})||QL,JL=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],e$=e=>{const{classes:t}=e;return Ie({root:["root"],paper:["paper"]},qL,t)},t$=ie(ac,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),n$=ie(Ys,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function o$(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function r$(e,t){const n=T.useRef(!1),o=T.useRef(!1),r=T.useRef(null),i=T.useRef(!1);T.useEffect(()=>{if(!e)return;function d(){i.current=!0}return document.addEventListener("mousedown",d,!0),document.addEventListener("touchstart",d,!0),()=>{document.removeEventListener("mousedown",d,!0),document.removeEventListener("touchstart",d,!0),i.current=!1}},[e]);const a=Te(d=>{if(!i.current)return;const u=o.current;o.current=!1;const f=Sn(r.current);if(!r.current||"clientX"in d&&o$(d,f))return;if(n.current){n.current=!1;return}let p;d.composedPath?p=d.composedPath().indexOf(r.current)>-1:p=!f.documentElement.contains(d.target)||r.current.contains(d.target),!p&&!u&&t(d)}),l=()=>{o.current=!0};return T.useEffect(()=>{if(e){const d=Sn(r.current),u=()=>{n.current=!0};return d.addEventListener("touchstart",a),d.addEventListener("touchmove",u),()=>{d.removeEventListener("touchstart",a),d.removeEventListener("touchmove",u)}}},[e,a]),T.useEffect(()=>{if(e){const d=Sn(r.current);return d.addEventListener("click",a),()=>{d.removeEventListener("click",a),o.current=!1}}},[e,a]),[r,l,l]}const s$=T.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:o,ownerState:r,children:i,paperSlotProps:a,paperClasses:l,onPaperClick:d,onPaperTouchStart:u}=e,f=Ye(e,JL),p=Q({},r,{placement:o}),y=pt({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:l,ownerState:p});return E.jsx(n,Q({},f,y,{onClick:w=>{d(w),y.onClick?.(w)},onTouchStart:w=>{u(w),y.onTouchStart?.(w)},ownerState:p,children:i}))});function i$(e){const t=Nt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:o,containerRef:r=null,shouldRestoreFocus:i,onBlur:a,onDismiss:l,open:d,role:u,placement:f,slots:p,slotProps:y,reduceAnimations:w}=t;T.useEffect(()=>{function Y(H){d&&H.key==="Escape"&&l()}return document.addEventListener("keydown",Y),()=>{document.removeEventListener("keydown",Y)}},[l,d]);const b=T.useRef(null);T.useEffect(()=>{u==="tooltip"||i&&!i()||(d?b.current=Ln(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[d,u,i]);const[m,v,D]=r$(d,a??l),k=T.useRef(null),x=ct(k,r),S=ct(x,m),C=t,O=e$(C),I=hb(),F=w??I,z=Y=>{Y.key==="Escape"&&(Y.stopPropagation(),l())},R=p?.desktopTransition??F?Gr:zr,$=p?.desktopTrapFocus??Ki,K=p?.desktopPaper??n$,G=p?.popper??t$,q=pt({elementType:G,externalSlotProps:y?.popper,additionalProps:{transition:!0,role:u,open:d,anchorEl:n,placement:f,onKeyDown:z},className:O.root,ownerState:t});return E.jsx(G,Q({},q,{children:({TransitionProps:Y,placement:H})=>E.jsx($,Q({open:d,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},y?.desktopTrapFocus,{children:E.jsx(R,Q({},Y,y?.desktopTransition,{children:E.jsx(s$,{PaperComponent:K,ownerState:C,popperPlacement:H,ref:S,onPaperClick:v,onPaperTouchStart:D,paperClasses:O.paper,paperSlotProps:y?.desktopPaper,children:o})}))}))}))}const qm=new Set;function a$(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
363
- `):e;qm.has(n)||(qm.add(n),t==="error"?console.error(n):console.warn(n))}const l$=({open:e,onOpen:t,onClose:n})=>{const o=T.useRef(typeof e=="boolean").current,[r,i]=T.useState(!1);T.useEffect(()=>{if(o){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[o,e]);const a=T.useCallback(l=>{o||i(l),l&&t&&t(),!l&&n&&n()},[o,t,n]);return{isOpen:r,setIsOpen:a}},jh=({timezone:e,value:t,defaultValue:n,onChange:o,valueManager:r})=>{const i=Ft(),a=T.useRef(n),l=t??a.current??r.emptyValue,d=T.useMemo(()=>r.getTimezone(i,l),[i,r,l]),u=Te(w=>d==null?w:r.setTimezone(i,d,w)),f=e??d??"default",p=T.useMemo(()=>r.setTimezone(i,f,l),[r,i,f,l]),y=Te((w,...b)=>{const m=u(w);o?.(m,...b)});return{value:p,handleValueChange:y,timezone:f}},Bh=({name:e,timezone:t,value:n,defaultValue:o,onChange:r,valueManager:i})=>{const[a,l]=ho({name:e,state:"value",controlled:n,default:o??i.emptyValue}),d=Te((u,...f)=>{l(u),r?.(u,...f)});return jh({timezone:t,value:a,defaultValue:void 0,onChange:d,valueManager:i})},c$=e=>{const{action:t,hasChanged:n,dateState:o,isControlled:r}=e,i=!r&&!o.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(o.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(o.lastPublishedValue):!1},d$=e=>{const{action:t,hasChanged:n,dateState:o,isControlled:r,closeOnSelect:i}=e,a=!r&&!o.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(o.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(o.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(o.lastCommittedValue):!1},u$=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},h$=({props:e,valueManager:t,valueType:n,wrapperVariant:o,validator:r})=>{const{onAccept:i,onChange:a,value:l,defaultValue:d,closeOnSelect:u=o==="desktop",timezone:f}=e,{current:p}=T.useRef(d),{current:y}=T.useRef(l!==void 0);process.env.NODE_ENV!=="production"&&(T.useEffect(()=>{y!==(l!==void 0)&&console.error([`MUI X: A component is changing the ${y?"":"un"}controlled value of a picker to be ${y?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled valuefor the lifetime of the component.","The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
362
+ `));const t=T.useMemo(()=>Q({},IL,e.localeText),[e.localeText]);return T.useMemo(()=>Q({},e,{localeText:t}),[e,t])},Ft=()=>Qr().utils,_a=()=>Qr().defaultDates,Mc=e=>{const t=Ft(),n=T.useRef();return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};function NL(e){return Me("MuiPickersToolbar",e)}Pe("MuiPickersToolbar",["root","content"]);const AL=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],FL=e=>{const{classes:t,isLandscape:n}=e;return Ie({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},NL,t)},LL=ie("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),$L=ie("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),VL=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:a,hidden:l,titleId:d}=o,u=Ye(o,AL),f=o,p=FL(f);return l?null:E.jsxs(LL,Q({ref:n,className:Se(p.root,i),ownerState:f},u,{children:[E.jsx(bn,{color:"text.secondary",variant:"overline",id:d,children:a}),E.jsx($L,{className:p.content,ownerState:f,children:r})]}))}),lr=()=>Qr().localeText;function jL(e){return Me("MuiDatePickerToolbar",e)}Pe("MuiDatePickerToolbar",["root","title"]);const BL=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],WL=e=>{const{classes:t}=e;return Ie({root:["root"],title:["title"]},jL,t)},HL=ie(VL,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),zL=ie(bn,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),ab=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiDatePickerToolbar"}),{value:r,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:l="––",views:d,className:u}=o,f=Ye(o,BL),p=Ft(),y=lr(),w=WL(o),b=T.useMemo(()=>{if(!r)return l;const v=Fh(p,{format:a,views:d},!0);return p.formatByString(r,v)},[r,a,l,p,d]),m=o;return E.jsx(HL,Q({ref:n,toolbarTitle:y.datePickerToolbarTitle,isLandscape:i,className:Se(w.root,u)},f,{children:E.jsx(zL,{variant:"h4",align:i?"left":"center",ownerState:m,className:w.title,children:b})}))});process.env.NODE_ENV!=="production"&&(ab.propTypes={classes:s.object,className:s.string,disabled:s.bool,hidden:s.bool,isLandscape:s.bool.isRequired,onChange:s.func.isRequired,onViewChange:s.func.isRequired,readOnly:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),titleId:s.string,toolbarFormat:s.string,toolbarPlaceholder:s.node,value:s.object,view:s.oneOf(["day","month","year"]).isRequired,views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired).isRequired});function lb(e,t){const n=Ft(),o=_a(),r=Nt({props:e,name:t}),i=T.useMemo(()=>r.localeText?.toolbarTitle==null?r.localeText:Q({},r.localeText,{datePickerToolbarTitle:r.localeText.toolbarTitle}),[r.localeText]);return Q({},r,{localeText:i},iL({views:r.views,openTo:r.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,minDate:Jn(n,r.minDate,o.minDate),maxDate:Jn(n,r.maxDate,o.maxDate),slots:Q({toolbar:ab},r.slots)})}const xa=({props:e,value:t,timezone:n,adapter:o})=>{if(t===null)return null;const{shouldDisableDate:r,shouldDisableMonth:i,shouldDisableYear:a,disablePast:l,disableFuture:d}=e,u=o.utils.date(void 0,n),f=Jn(o.utils,e.minDate,o.defaultDates.minDate),p=Jn(o.utils,e.maxDate,o.defaultDates.maxDate);switch(!0){case!o.utils.isValid(t):return"invalidDate";case!!(r&&r(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(d&&o.utils.isAfterDay(t,u)):return"disableFuture";case!!(l&&o.utils.isBeforeDay(t,u)):return"disablePast";case!!(f&&o.utils.isBeforeDay(t,f)):return"minDate";case!!(p&&o.utils.isAfterDay(t,p)):return"maxDate";default:return null}};xa.valueManager=Io;const cb=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],YL=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],UL=["minDateTime","maxDateTime"],qL=[...cb,...YL,...UL],db=e=>qL.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function ub(e){const{props:t,validator:n,value:o,timezone:r,onError:i}=e,a=Qr(),l=T.useRef(n.valueManager.defaultErrorState),d=n({adapter:a,value:o,timezone:r,props:t}),u=n.valueManager.hasError(d);T.useEffect(()=>{i&&!n.valueManager.isSameError(d,l.current)&&i(d,o),l.current=d},[n,i,d,o]);const f=Te(p=>n({adapter:a,value:p,timezone:r,props:t}));return{validationError:d,hasValidationError:u,getValidationErrorForNewValue:f}}function GL(e){return Me("MuiPickersPopper",e)}Pe("MuiPickersPopper",["root","paper"]);function KL(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const XL=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},Ln=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Ln(t.shadowRoot):t:null},ZL="@media (pointer: fine)",QL="@media (prefers-reduced-motion: reduce)",Ps=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Ym=Ps&&Ps[1]?parseInt(Ps[1],10):null,Um=Ps&&Ps[2]?parseInt(Ps[2],10):null,JL=Ym&&Ym<10||Um&&Um<13||!1,hb=()=>Fg(QL,{defaultMatches:!1})||JL,e$=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],t$=e=>{const{classes:t}=e;return Ie({root:["root"],paper:["paper"]},GL,t)},n$=ie(ac,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),o$=ie(Ys,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function r$(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function s$(e,t){const n=T.useRef(!1),o=T.useRef(!1),r=T.useRef(null),i=T.useRef(!1);T.useEffect(()=>{if(!e)return;function d(){i.current=!0}return document.addEventListener("mousedown",d,!0),document.addEventListener("touchstart",d,!0),()=>{document.removeEventListener("mousedown",d,!0),document.removeEventListener("touchstart",d,!0),i.current=!1}},[e]);const a=Te(d=>{if(!i.current)return;const u=o.current;o.current=!1;const f=Sn(r.current);if(!r.current||"clientX"in d&&r$(d,f))return;if(n.current){n.current=!1;return}let p;d.composedPath?p=d.composedPath().indexOf(r.current)>-1:p=!f.documentElement.contains(d.target)||r.current.contains(d.target),!p&&!u&&t(d)}),l=()=>{o.current=!0};return T.useEffect(()=>{if(e){const d=Sn(r.current),u=()=>{n.current=!0};return d.addEventListener("touchstart",a),d.addEventListener("touchmove",u),()=>{d.removeEventListener("touchstart",a),d.removeEventListener("touchmove",u)}}},[e,a]),T.useEffect(()=>{if(e){const d=Sn(r.current);return d.addEventListener("click",a),()=>{d.removeEventListener("click",a),o.current=!1}}},[e,a]),[r,l,l]}const i$=T.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:o,ownerState:r,children:i,paperSlotProps:a,paperClasses:l,onPaperClick:d,onPaperTouchStart:u}=e,f=Ye(e,e$),p=Q({},r,{placement:o}),y=pt({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:l,ownerState:p});return E.jsx(n,Q({},f,y,{onClick:w=>{d(w),y.onClick?.(w)},onTouchStart:w=>{u(w),y.onTouchStart?.(w)},ownerState:p,children:i}))});function a$(e){const t=Nt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:o,containerRef:r=null,shouldRestoreFocus:i,onBlur:a,onDismiss:l,open:d,role:u,placement:f,slots:p,slotProps:y,reduceAnimations:w}=t;T.useEffect(()=>{function Y(H){d&&H.key==="Escape"&&l()}return document.addEventListener("keydown",Y),()=>{document.removeEventListener("keydown",Y)}},[l,d]);const b=T.useRef(null);T.useEffect(()=>{u==="tooltip"||i&&!i()||(d?b.current=Ln(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[d,u,i]);const[m,v,D]=s$(d,a??l),k=T.useRef(null),x=ct(k,r),S=ct(x,m),C=t,O=t$(C),I=hb(),F=w??I,z=Y=>{Y.key==="Escape"&&(Y.stopPropagation(),l())},R=p?.desktopTransition??F?Gr:zr,$=p?.desktopTrapFocus??Ki,K=p?.desktopPaper??o$,G=p?.popper??n$,q=pt({elementType:G,externalSlotProps:y?.popper,additionalProps:{transition:!0,role:u,open:d,anchorEl:n,placement:f,onKeyDown:z},className:O.root,ownerState:t});return E.jsx(G,Q({},q,{children:({TransitionProps:Y,placement:H})=>E.jsx($,Q({open:d,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},y?.desktopTrapFocus,{children:E.jsx(R,Q({},Y,y?.desktopTransition,{children:E.jsx(i$,{PaperComponent:K,ownerState:C,popperPlacement:H,ref:S,onPaperClick:v,onPaperTouchStart:D,paperClasses:O.paper,paperSlotProps:y?.desktopPaper,children:o})}))}))}))}const qm=new Set;function l$(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
363
+ `):e;qm.has(n)||(qm.add(n),t==="error"?console.error(n):console.warn(n))}const c$=({open:e,onOpen:t,onClose:n})=>{const o=T.useRef(typeof e=="boolean").current,[r,i]=T.useState(!1);T.useEffect(()=>{if(o){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[o,e]);const a=T.useCallback(l=>{o||i(l),l&&t&&t(),!l&&n&&n()},[o,t,n]);return{isOpen:r,setIsOpen:a}},jh=({timezone:e,value:t,defaultValue:n,onChange:o,valueManager:r})=>{const i=Ft(),a=T.useRef(n),l=t??a.current??r.emptyValue,d=T.useMemo(()=>r.getTimezone(i,l),[i,r,l]),u=Te(w=>d==null?w:r.setTimezone(i,d,w)),f=e??d??"default",p=T.useMemo(()=>r.setTimezone(i,f,l),[r,i,f,l]),y=Te((w,...b)=>{const m=u(w);o?.(m,...b)});return{value:p,handleValueChange:y,timezone:f}},Bh=({name:e,timezone:t,value:n,defaultValue:o,onChange:r,valueManager:i})=>{const[a,l]=ho({name:e,state:"value",controlled:n,default:o??i.emptyValue}),d=Te((u,...f)=>{l(u),r?.(u,...f)});return jh({timezone:t,value:a,defaultValue:void 0,onChange:d,valueManager:i})},d$=e=>{const{action:t,hasChanged:n,dateState:o,isControlled:r}=e,i=!r&&!o.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(o.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(o.lastPublishedValue):!1},u$=e=>{const{action:t,hasChanged:n,dateState:o,isControlled:r,closeOnSelect:i}=e,a=!r&&!o.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(o.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(o.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(o.lastCommittedValue):!1},h$=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},f$=({props:e,valueManager:t,valueType:n,wrapperVariant:o,validator:r})=>{const{onAccept:i,onChange:a,value:l,defaultValue:d,closeOnSelect:u=o==="desktop",timezone:f}=e,{current:p}=T.useRef(d),{current:y}=T.useRef(l!==void 0);process.env.NODE_ENV!=="production"&&(T.useEffect(()=>{y!==(l!==void 0)&&console.error([`MUI X: A component is changing the ${y?"":"un"}controlled value of a picker to be ${y?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled valuefor the lifetime of the component.","The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
364
364
  `))},[l]),T.useEffect(()=>{!y&&p!==d&&console.error(["MUI X: A component is changing the defaultValue of an uncontrolled picker after being initialized. To suppress this warning opt to use a controlled value."].join(`
365
- `))},[JSON.stringify(p)]));const w=Ft(),b=Qr(),{isOpen:m,setIsOpen:v}=l$(e),{timezone:D,value:k,handleValueChange:x}=jh({timezone:f,value:l,defaultValue:p,onChange:a,valueManager:t}),[S,C]=T.useState(()=>{let j;return k!==void 0?j=k:p!==void 0?j=p:j=t.emptyValue,{draft:j,lastPublishedValue:j,lastCommittedValue:j,lastControlledValue:k,hasBeenModifiedSinceMount:!1}}),{getValidationErrorForNewValue:O}=ub({props:e,validator:r,timezone:D,value:S.draft,onError:e.onError}),I=Te(j=>{const ee={action:j,dateState:S,hasChanged:W=>!t.areValuesEqual(w,j.value,W),isControlled:y,closeOnSelect:u},J=c$(ee),te=d$(ee),ce=u$(ee);C(W=>Q({},W,{draft:j.value,lastPublishedValue:J?j.value:W.lastPublishedValue,lastCommittedValue:te?j.value:W.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let le=null;const he=()=>(le||(le={validationError:j.name==="setValueFromField"?j.context.validationError:O(j.value)},j.name==="setValueFromShortcut"&&(le.shortcut=j.shortcut)),le);J&&x(j.value,he()),te&&i&&i(j.value,he()),ce&&v(!1)});if(k!==void 0&&(S.lastControlledValue===void 0||!t.areValuesEqual(w,S.lastControlledValue,k))){const j=t.areValuesEqual(w,S.draft,k);C(ee=>Q({},ee,{lastControlledValue:k},j?{}:{lastCommittedValue:k,lastPublishedValue:k,draft:k,hasBeenModifiedSinceMount:!0}))}const F=Te(()=>{I({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),z=Te(()=>{I({value:S.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),R=Te(()=>{I({value:S.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),$=Te(()=>{I({value:S.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),K=Te(()=>{I({value:t.getTodayValue(w,D,n),name:"setValueFromAction",pickerAction:"today"})}),G=Te(j=>{j.preventDefault(),v(!0)}),q=Te(j=>{j?.preventDefault(),v(!1)}),Y=Te((j,ee="partial")=>I({name:"setValueFromView",value:j,selectionState:ee})),H=Te((j,ee,J)=>I({name:"setValueFromShortcut",value:j,changeImportance:ee,shortcut:J})),ae=Te((j,ee)=>I({name:"setValueFromField",value:j,context:ee})),A={onClear:F,onAccept:z,onDismiss:R,onCancel:$,onSetToday:K,onOpen:G,onClose:q},M={value:S.draft,onChange:ae},L=T.useMemo(()=>t.cleanValue(w,S.draft),[w,t,S.draft]),B={value:L,onChange:Y,onClose:q,open:m},oe=Q({},A,{value:L,onChange:Y,onSelectShortcut:H,isValid:j=>{const ee=r({adapter:b,value:j,timezone:D,props:e});return!t.hasError(ee)}}),se=T.useMemo(()=>({onOpen:G,onClose:q,open:m}),[m,q,G]);return{open:m,fieldProps:M,viewProps:B,layoutProps:oe,actions:A,contextValue:se}};let jd=!1;function fb({onChange:e,onViewChange:t,openTo:n,view:o,views:r,autoFocus:i,focusedView:a,onFocusedViewChange:l}){process.env.NODE_ENV!=="production"&&(jd||(o!=null&&!r.includes(o)&&(console.warn(`MUI X: \`view="${o}"\` is not a valid prop.`,`It must be an element of \`views=["${r.join('", "')}"]\`.`),jd=!0),o==null&&n!=null&&!r.includes(n)&&(console.warn(`MUI X: \`openTo="${n}"\` is not a valid prop.`,`It must be an element of \`views=["${r.join('", "')}"]\`.`),jd=!0)));const d=T.useRef(n),u=T.useRef(r),f=T.useRef(r.includes(n)?n:r[0]),[p,y]=ho({name:"useViews",state:"view",controlled:o,default:f.current}),w=T.useRef(i?p:null),[b,m]=ho({name:"useViews",state:"focusedView",controlled:a,default:w.current});T.useEffect(()=>{(d.current&&d.current!==n||u.current&&u.current.some(I=>!r.includes(I)))&&(y(r.includes(n)?n:r[0]),u.current=r,d.current=n)},[n,y,p,r]);const v=r.indexOf(p),D=r[v-1]??null,k=r[v+1]??null,x=Te((I,F)=>{m(F?I:z=>I===z?null:z),l?.(I,F)}),S=Te(I=>{x(I,!0),I!==p&&(y(I),t&&t(I))}),C=Te(()=>{k&&S(k)}),O=Te((I,F,z)=>{const R=F==="finish",$=z?r.indexOf(z)<r.length-1:!!k;if(e(I,R&&$?"partial":F,z),z&&z!==p){const G=r[r.indexOf(z)+1];G&&S(G)}else R&&C()});return{view:p,setView:S,focusedView:b,setFocusedView:x,nextView:k,previousView:D,defaultView:r.includes(n)?n:r[0],goToNextView:C,setValueAndGoToNextView:O}}const f$=["className","sx"],p$=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:o,rendererInterceptor:r,fieldRef:i})=>{const{onChange:a,open:l,onClose:d}=t,{view:u,views:f,openTo:p,onViewChange:y,viewRenderers:w,timezone:b}=e,m=Ye(e,f$),{view:v,setView:D,defaultView:k,focusedView:x,setFocusedView:S,setValueAndGoToNextView:C}=fb({view:u,views:f,openTo:p,onChange:a,onViewChange:y,autoFocus:o}),{hasUIView:O,viewModeLookup:I}=T.useMemo(()=>f.reduce((q,Y)=>{let H;return w[Y]!=null?H="UI":H="field",q.viewModeLookup[Y]=H,H==="UI"&&(q.hasUIView=!0),q},{hasUIView:!1,viewModeLookup:{}}),[w,f]),F=T.useMemo(()=>f.reduce((q,Y)=>w[Y]!=null&&uL(Y)?q+1:q,0),[w,f]),z=I[v],R=Te(()=>z==="UI"),[$,K]=T.useState(z==="UI"?v:null);return $!==v&&I[v]==="UI"&&K(v),ln(()=>{z==="field"&&l&&(d(),setTimeout(()=>{i?.current?.setSelectedSections(v),i?.current?.focusField(v)}))},[v]),ln(()=>{if(!l)return;let q=v;z==="field"&&$!=null&&(q=$),q!==k&&I[q]==="UI"&&I[k]==="UI"&&(q=k),q!==v&&D(q),S(q,!0)},[l]),{hasUIView:O,shouldRestoreFocus:R,layoutProps:{views:f,view:$,onViewChange:D},renderCurrentView:()=>{if($==null)return null;const q=w[$];if(q==null)return null;const Y=Q({},m,n,t,{views:f,timezone:b,onChange:C,view:$,onViewChange:D,focusedView:x,onFocusedViewChange:S,showViewSwitcher:F>1,timeViewsCount:F});return r?r(w,$,Y):q(Y)}}};function Gm(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const m$=(e,t)=>{const[n,o]=T.useState(Gm);return ln(()=>{const i=()=>{o(Gm())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),GL(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},g$=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:o})=>{const{orientation:r}=e,i=m$(n.views,r),a=to();return{layoutProps:Q({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:o,disabled:e.disabled,readOnly:e.readOnly})}};function y$(e){const{props:t,pickerValueResponse:n}=e;return T.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const pb=({props:e,valueManager:t,valueType:n,wrapperVariant:o,additionalViewProps:r,validator:i,autoFocusView:a,rendererInterceptor:l,fieldRef:d})=>{process.env.NODE_ENV!=="production"&&e.renderInput!=null&&a$(["MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const u=h$({props:e,valueManager:t,valueType:n,wrapperVariant:o,validator:i}),f=p$({props:e,additionalViewProps:r,autoFocusView:a,fieldRef:d,propsFromPickerValue:u.viewProps,rendererInterceptor:l}),p=g$({props:e,wrapperVariant:o,propsFromPickerValue:u.layoutProps,propsFromPickerViews:f.layoutProps}),y=y$({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:f.renderCurrentView,hasUIView:f.hasUIView,shouldRestoreFocus:f.shouldRestoreFocus,layoutProps:p.layoutProps,contextValue:u.contextValue,ownerState:y}};function mb(e){return Me("MuiPickersLayout",e)}const Dr=Pe("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),v$=["onAccept","onClear","onCancel","onSetToday","actions"];function gb(e){const{onAccept:t,onClear:n,onCancel:o,onSetToday:r,actions:i}=e,a=Ye(e,v$),l=lr();if(i==null||i.length===0)return null;const d=i?.map(u=>{switch(u){case"clear":return E.jsx(ko,{onClick:n,children:l.clearButtonLabel},u);case"cancel":return E.jsx(ko,{onClick:o,children:l.cancelButtonLabel},u);case"accept":return E.jsx(ko,{onClick:t,children:l.okButtonLabel},u);case"today":return E.jsx(ko,{onClick:r,children:l.todayButtonLabel},u);default:return null}});return E.jsx(Ku,Q({},a,{children:d}))}process.env.NODE_ENV!=="production"&&(gb.propTypes={actions:s.arrayOf(s.oneOf(["accept","cancel","clear","today"]).isRequired),disableSpacing:s.bool,onAccept:s.func.isRequired,onCancel:s.func.isRequired,onClear:s.func.isRequired,onSetToday:s.func.isRequired,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const oa=36,Ic=2,Nc=320,b$=280,Wh=336,w$=["items","changeImportance","isLandscape","onChange","isValid"],C$=["getValue"];function yb(e){const{items:t,changeImportance:n="accept",onChange:o,isValid:r}=e,i=Ye(e,w$);if(t==null||t.length===0)return null;const a=t.map(l=>{let{getValue:d}=l,u=Ye(l,C$);const f=d({isValid:r});return Q({},u,{label:u.label,onClick:()=>{o(f,n,u)},disabled:!r(f)})});return E.jsx(pc,Q({dense:!0,sx:[{maxHeight:Wh,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(l=>E.jsx(ky,{children:E.jsx(yy,Q({},l))},l.id??l.label))}))}process.env.NODE_ENV!=="production"&&(yb.propTypes={changeImportance:s.oneOf(["accept","set"]),className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,isLandscape:s.bool.isRequired,isValid:s.func.isRequired,items:s.arrayOf(s.shape({getValue:s.func.isRequired,id:s.string,label:s.string.isRequired})),onChange:s.func.isRequired,style:s.object,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function S$(e){return e.view!==null}const _$=e=>{const{classes:t,isLandscape:n}=e;return Ie({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},mb,t)},x$=e=>{const{wrapperVariant:t,onAccept:n,onClear:o,onCancel:r,onSetToday:i,view:a,views:l,onViewChange:d,value:u,onChange:f,onSelectShortcut:p,isValid:y,isLandscape:w,disabled:b,readOnly:m,children:v,slots:D,slotProps:k}=e,x=_$(e),S=D?.actionBar??gb,C=pt({elementType:S,externalSlotProps:k?.actionBar,additionalProps:{onAccept:n,onClear:o,onCancel:r,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:x.actionBar,ownerState:Q({},e,{wrapperVariant:t})}),O=E.jsx(S,Q({},C)),I=D?.toolbar,F=pt({elementType:I,externalSlotProps:k?.toolbar,additionalProps:{isLandscape:w,onChange:f,value:u,view:a,onViewChange:d,views:l,disabled:b,readOnly:m},className:x.toolbar,ownerState:Q({},e,{wrapperVariant:t})}),z=S$(F)&&I?E.jsx(I,Q({},F)):null,R=v,$=D?.tabs,K=a&&$?E.jsx($,Q({view:a,onViewChange:d,className:x.tabs},k?.tabs)):null,G=D?.shortcuts??yb,q=pt({elementType:G,externalSlotProps:k?.shortcuts,additionalProps:{isValid:y,isLandscape:w,onChange:p},className:x.shortcuts,ownerState:{isValid:y,isLandscape:w,onChange:p,wrapperVariant:t}}),Y=a&&G?E.jsx(G,Q({},q)):null;return{toolbar:z,content:R,tabs:K,actionBar:O,shortcuts:Y}},R$=e=>{const{isLandscape:t,classes:n}=e;return Ie({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},mb,n)},T$=ie("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Dr.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Dr.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Dr.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Dr.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Dr.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Dr.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Dr.shortcuts}`]:{gridColumn:3}}}]}),k$=ie("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Hh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:a,actionBar:l,shortcuts:d}=x$(o),{sx:u,className:f,isLandscape:p,wrapperVariant:y}=o,w=R$(o);return E.jsxs(T$,{ref:n,sx:u,className:Se(w.root,f),ownerState:o,children:[p?d:r,p?r:d,E.jsx(k$,{className:w.contentWrapper,children:y==="desktop"?E.jsxs(T.Fragment,{children:[i,a]}):E.jsxs(T.Fragment,{children:[a,i]})}),l]})});process.env.NODE_ENV!=="production"&&(Hh.propTypes={children:s.node,classes:s.object,className:s.string,disabled:s.bool,isLandscape:s.bool.isRequired,isRtl:s.bool.isRequired,isValid:s.func.isRequired,onAccept:s.func.isRequired,onCancel:s.func.isRequired,onChange:s.func.isRequired,onClear:s.func.isRequired,onClose:s.func.isRequired,onDismiss:s.func.isRequired,onOpen:s.func.isRequired,onSelectShortcut:s.func.isRequired,onSetToday:s.func.isRequired,onViewChange:s.func.isRequired,orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any,view:s.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),views:s.arrayOf(s.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]).isRequired).isRequired,wrapperVariant:s.oneOf(["desktop","mobile"])});const E$=T.createContext(null);function vb(e){const{contextValue:t,localeText:n,children:o}=e;return E.jsx(E$.Provider,{value:t,children:E.jsx(Oc,{localeText:n,children:o})})}const P$=["props","getOpenDialogAriaText"],D$=["ownerState"],O$=["ownerState"],M$=e=>{let{props:t,getOpenDialogAriaText:n}=e,o=Ye(e,P$);const{slots:r,slotProps:i,className:a,sx:l,format:d,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:y,timezone:w,name:b,label:m,inputRef:v,readOnly:D,disabled:k,autoFocus:x,localeText:S,reduceAnimations:C}=t,O=T.useRef(null),I=T.useRef(null),F=sr(),z=i?.toolbar?.hidden??!1,{open:R,actions:$,hasUIView:K,layoutProps:G,renderCurrentView:q,shouldRestoreFocus:Y,fieldProps:H,contextValue:ae,ownerState:A}=pb(Q({},o,{props:t,fieldRef:I,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),M=r.inputAdornment??Qu,L=pt({elementType:M,externalSlotProps:i?.inputAdornment,additionalProps:{position:"end"},ownerState:t}),B=Ye(L,D$),ne=r.openPickerButton??Us,oe=pt({elementType:ne,externalSlotProps:i?.openPickerButton,additionalProps:{disabled:k||D,onClick:R?$.onClose:$.onOpen,"aria-label":n(H.value),edge:B.position},ownerState:t}),se=Ye(oe,O$),j=r.openPickerIcon,ee=pt({elementType:j,externalSlotProps:i?.openPickerIcon,ownerState:A}),J=r.field,te=pt({elementType:J,externalSlotProps:i?.field,additionalProps:Q({},H,z&&{id:F},{readOnly:D,disabled:k,className:a,sx:l,format:d,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:y,timezone:w,label:m,name:b,autoFocus:x&&!t.open,focused:R?!0:void 0},v?{inputRef:v}:{}),ownerState:t});K&&(te.InputProps=Q({},te.InputProps,{ref:O},!t.disableOpenPicker&&{[`${B.position}Adornment`]:E.jsx(M,Q({},B,{children:E.jsx(ne,Q({},se,{children:E.jsx(j,Q({},ee))}))}))}));const ce=Q({textField:r.textField,clearIcon:r.clearIcon,clearButton:r.clearButton},te.slots),le=r.layout??Hh;let he=F;z&&(m?he=`${F}-label`:he=void 0);const W=Q({},i,{toolbar:Q({},i?.toolbar,{titleId:F}),popper:Q({"aria-labelledby":he},i?.popper)}),re=ct(I,te.unstableFieldRef);return{renderPicker:()=>E.jsxs(vb,{contextValue:ae,localeText:S,children:[E.jsx(J,Q({},te,{slots:ce,slotProps:W,unstableFieldRef:re})),E.jsx(i$,Q({role:"dialog",placement:"bottom-start",anchorEl:O.current},$,{open:R,slots:r,slotProps:W,shouldRestoreFocus:Y,reduceAnimations:C,children:E.jsx(le,Q({},G,W?.layout,{slots:r,slotProps:W,children:q()}))}))]})}},I$=fn(E.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),N$=fn(E.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),A$=fn(E.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),F$=fn(E.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");fn(E.jsxs(T.Fragment,{children:[E.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),E.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");fn(E.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");fn(E.jsxs(T.Fragment,{children:[E.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),E.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const L$=fn(E.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"}),"Clear"),$$=({utils:e,format:t})=>{let n=10,o=t,r=e.expandFormat(t);for(;r!==o;)if(o=r,r=e.expandFormat(o),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return r},V$=({utils:e,expandedFormat:t})=>{const n=[],{start:o,end:r}=e.escapedCharacters,i=new RegExp(`(\\${o}[^\\${r}]*\\${r})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},j$=(e,t,n,o)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),o).length,format:o});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:o});case"day":return t.fieldDayPlaceholder({format:o});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:o});case"hours":return t.fieldHoursPlaceholder({format:o});case"minutes":return t.fieldMinutesPlaceholder({format:o});case"seconds":return t.fieldSecondsPlaceholder({format:o});case"meridiem":return t.fieldMeridiemPlaceholder({format:o});default:return o}},B$=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:o,localizedDigits:r,now:i,token:a,startSeparator:l})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const d=Lh(e,a),u=rb(e,d.contentType,d.type,a),f=n?u:d.contentType==="digit",p=t!=null&&e.isValid(t);let y=p?e.formatByString(t,a):"",w=null;if(f)if(u)w=y===""?e.formatByString(i,a).length:y.length;else{if(d.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);w=d.maxLength,p&&(y=$h(tb(Ur(y,r),w),r))}return Q({},d,{format:a,maxLength:w,value:y,placeholder:j$(e,o,d,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:f,startSeparator:l,endSeparator:"",modified:!1})},W$=e=>{const{utils:t,expandedFormat:n,escapedParts:o}=e,r=t.date(void 0),i=[];let a="";const l=Object.keys(t.formatTokenMap).sort((w,b)=>b.length-w.length),d=/^([a-zA-Z]+)/,u=new RegExp(`^(${l.join("|")})*$`),f=new RegExp(`^(${l.join("|")})`),p=w=>o.find(b=>b.start<=w&&b.end>=w);let y=0;for(;y<n.length;){const w=p(y),b=w!=null,m=d.exec(n.slice(y))?.[1];if(!b&&m!=null&&u.test(m)){let v=m;for(;v.length>0;){const D=f.exec(v)[1];v=v.slice(D.length),i.push(B$(Q({},e,{now:r,token:D,startSeparator:a}))),a=""}y+=m.length}else{const v=n[y];b&&w?.start===y||w?.end===y||(i.length===0?a+=v:i[i.length-1].endSeparator+=v),y+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},H$=({isRtl:e,formatDensity:t,sections:n})=>n.map(o=>{const r=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return o.startSeparator=r(o.startSeparator),o.endSeparator=r(o.endSeparator),o}),Km=e=>{let t=$$(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=V$(Q({},e,{expandedFormat:t})),o=W$(Q({},e,{expandedFormat:t,escapedParts:n}));return H$(Q({},e,{sections:o}))},z$=e=>{const t=Ft(),n=lr(),o=Qr(),r=to(),{valueManager:i,fieldValueManager:a,valueType:l,validator:d,internalProps:u,internalProps:{value:f,defaultValue:p,referenceDate:y,onChange:w,format:b,formatDensity:m="dense",selectedSections:v,onSelectedSectionsChange:D,shouldRespectLeadingZeros:k=!1,timezone:x,enableAccessibleFieldDOMStructure:S=!1}}=e,{timezone:C,value:O,handleValueChange:I}=jh({timezone:x,value:f,defaultValue:p,onChange:w,valueManager:i}),F=T.useMemo(()=>yL(t),[t]),z=T.useMemo(()=>SL(t,F,C),[t,F,C]),R=T.useCallback((j,ee=null)=>a.getSectionsFromValue(t,j,ee,J=>Km({utils:t,localeText:n,localizedDigits:F,format:b,date:J,formatDensity:m,shouldRespectLeadingZeros:k,enableAccessibleFieldDOMStructure:S,isRtl:r})),[a,b,n,F,r,k,t,m,S]),[$,K]=T.useState(()=>{const j=R(O);Wm(j,l);const ee={sections:j,value:O,referenceValue:i.emptyValue,tempValueStrAndroid:null},J=fL(j),te=i.getInitialReferenceValue({referenceDate:y,value:O,utils:t,props:u,granularity:J,timezone:C});return Q({},ee,{referenceValue:te})}),[G,q]=ho({controlled:v,default:null,name:"useField",state:"selectedSections"}),Y=j=>{q(j),D?.(j)},H=T.useMemo(()=>vu(G,$.sections),[G,$.sections]),ae=H==="all"?0:H,A=({value:j,referenceValue:ee,sections:J})=>{if(K(ce=>Q({},ce,{sections:J,value:j,referenceValue:ee,tempValueStrAndroid:null})),i.areValuesEqual(t,$.value,j))return;const te={validationError:d({adapter:o,value:j,timezone:C,props:u})};I(j,te)},M=(j,ee)=>{const J=[...$.sections];return J[j]=Q({},J[j],{value:ee,modified:!0}),J},L=()=>{A({value:i.emptyValue,referenceValue:$.referenceValue,sections:R(i.emptyValue)})},B=()=>{if(ae==null)return;const j=$.sections[ae],ee=a.getActiveDateManager(t,$,j),te=ee.getSections($.sections).filter(W=>W.value!=="").length===(j.value===""?0:1),ce=M(ae,""),le=te?null:t.getInvalidDate(),he=ee.getNewValuesFromNewActiveDate(le);A(Q({},he,{sections:ce}))},ne=j=>{const ee=(ce,le)=>{const he=t.parse(ce,b);if(he==null||!t.isValid(he))return null;const W=Km({utils:t,localeText:n,localizedDigits:F,format:b,date:he,formatDensity:m,shouldRespectLeadingZeros:k,enableAccessibleFieldDOMStructure:S,isRtl:r});return zm(t,he,W,le,!1)},J=a.parseValueStr(j,$.referenceValue,ee),te=a.updateReferenceValue(t,J,$.referenceValue);A({value:J,referenceValue:te,sections:R(J,$.sections)})},oe=({activeSection:j,newSectionValue:ee,shouldGoToNextSection:J})=>{J&&ae<$.sections.length-1&&Y(ae+1);const te=a.getActiveDateManager(t,$,j),ce=M(ae,ee),le=te.getSections(ce),he=bL(t,le,F);let W,re;if(he!=null&&t.isValid(he)){const Z=zm(t,he,le,te.referenceDate,!0);W=te.getNewValuesFromNewActiveDate(Z),re=!0}else W=te.getNewValuesFromNewActiveDate(he),re=(he!=null&&!t.isValid(he))!=(te.date!=null&&!t.isValid(te.date));return re?A(Q({},W,{sections:ce})):K(Z=>Q({},Z,W,{sections:ce,tempValueStrAndroid:null}))},se=j=>K(ee=>Q({},ee,{tempValueStrAndroid:j}));return T.useEffect(()=>{const j=R($.value);Wm(j,l),K(ee=>Q({},ee,{sections:j}))},[b,t.locale,r]),T.useEffect(()=>{let j;i.areValuesEqual(t,$.value,O)?j=i.getTimezone(t,$.value)!==i.getTimezone(t,O):j=!0,j&&K(ee=>Q({},ee,{value:O,referenceValue:a.updateReferenceValue(t,O,ee.referenceValue),sections:R(O)}))},[O]),{state:$,activeSectionIndex:ae,parsedSelectedSections:H,setSelectedSections:Y,clearValue:L,clearActiveSection:B,updateSectionValue:oe,updateValueFromValueStr:ne,setTempAndroidValueStr:se,getSectionsFromValue:R,sectionsValueBoundaries:z,localizedDigits:F,timezone:C}},Y$=5e3,ms=e=>e.saveQuery!=null,U$=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:o,setTempAndroidValueStr:r,timezone:i})=>{const a=Ft(),[l,d]=T.useState(null),u=Te(()=>d(null));T.useEffect(()=>{l!=null&&e[l.sectionIndex]?.type!==l.sectionType&&u()},[e,l,u]),T.useEffect(()=>{if(l!=null){const b=setTimeout(()=>u(),Y$);return()=>{clearTimeout(b)}}return()=>{}},[l,u]);const f=({keyPressed:b,sectionIndex:m},v,D)=>{const k=b.toLowerCase(),x=e[m];if(l!=null&&(!D||D(l.value))&&l.sectionIndex===m){const C=`${l.value}${k}`,O=v(C,x);if(!ms(O))return d({sectionIndex:m,value:C,sectionType:x.type}),O}const S=v(k,x);return ms(S)&&!S.saveQuery?(u(),null):(d({sectionIndex:m,value:k,sectionType:x.type}),ms(S)?null:S)},p=b=>{const m=(k,x,S)=>{const C=x.filter(O=>O.toLowerCase().startsWith(S));return C.length===0?{saveQuery:!1}:{sectionValue:C[0],shouldGoToNextSection:C.length===1}},v=(k,x,S,C)=>{const O=I=>eb(a,i,x.type,I);if(x.contentType==="letter")return m(x.format,O(x.format),k);if(S&&C!=null&&Lh(a,S).contentType==="letter"){const I=O(S),F=m(S,I,k);return ms(F)?{saveQuery:!1}:Q({},F,{sectionValue:C(F.sectionValue,I)})}return{saveQuery:!1}};return f(b,(k,x)=>{switch(x.type){case"month":{const S=C=>jm(a,C,a.formats.month,x.format);return v(k,x,a.formats.month,S)}case"weekDay":{const S=(C,O)=>O.indexOf(C).toString();return v(k,x,a.formats.weekday,S)}case"meridiem":return v(k,x);default:return{saveQuery:!1}}})},y=b=>{const m=(D,k)=>{const x=Ur(D,o),S=Number(x),C=n[k.type]({currentDate:null,format:k.format,contentType:k.contentType});if(S>C.maximum)return{saveQuery:!1};if(S<C.minimum)return{saveQuery:!0};const O=S*10>C.maximum||x.length===C.maximum.toString().length;return{sectionValue:nb(a,S,C,o,k),shouldGoToNextSection:O}};return f(b,(D,k)=>{if(k.contentType==="digit"||k.contentType==="digit-with-letter")return m(D,k);if(k.type==="month"){rb(a,"digit","month","MM");const x=m(D,{type:k.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(ms(x))return x;const S=jm(a,x.sectionValue,"MM",k.format);return Q({},x,{sectionValue:S})}if(k.type==="weekDay"){const x=m(D,k);if(ms(x))return x;const S=Dc(a,k.format)[Number(x.sectionValue)-1];return Q({},x,{sectionValue:S})}return{saveQuery:!1}},D=>Vm(D,o))};return{applyCharacterEditing:Te(b=>{const m=e[b.sectionIndex],D=Vm(b.keyPressed,o)?y(Q({},b,{keyPressed:$h(b.keyPressed,o)})):p(b);if(D==null){r(null);return}t({activeSection:m,newSectionValue:D.sectionValue,shouldGoToNextSection:D.shouldGoToNextSection})}),resetCharacterQuery:u}},q$=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:o,onBlur:r,onClick:i,onFocus:a,onInput:l,onPaste:d,focused:u,autoFocus:f=!1},fieldValueManager:p,applyCharacterEditing:y,resetCharacterQuery:w,setSelectedSections:b,parsedSelectedSections:m,state:v,clearActiveSection:D,clearValue:k,updateSectionValue:x,updateValueFromValueStr:S,sectionOrder:C,areAllSectionsEmpty:O,sectionsValueBoundaries:I}=e,F=T.useRef(null),z=ct(o,F),R=lr(),$=Ft(),K=sr(),[G,q]=T.useState(!1),Y=T.useMemo(()=>({syncSelectionToDOM:()=>{if(!F.current)return;const re=document.getSelection();if(!re)return;if(m==null){re.rangeCount>0&&F.current.getRoot().contains(re.getRangeAt(0).startContainer)&&re.removeAllRanges(),G&&F.current.getRoot().blur();return}if(!F.current.getRoot().contains(Ln(document)))return;const Z=new window.Range;let fe;m==="all"?fe=F.current.getRoot():v.sections[m].type==="empty"?fe=F.current.getSectionContainer(m):fe=F.current.getSectionContent(m),Z.selectNodeContents(fe),fe.focus(),re.removeAllRanges(),re.addRange(Z)},getActiveSectionIndexFromDOM:()=>{const re=Ln(document);return!re||!F.current||!F.current.getRoot().contains(re)?null:F.current.getSectionIndexFromDOMElement(re)},focusField:(re=0)=>{if(!F.current)return;const Z=vu(re,v.sections);q(!0),F.current.getSectionContent(Z).focus()},setSelectedSections:re=>{if(!F.current)return;const Z=vu(re,v.sections);q((Z==="all"?0:Z)!==null),b(re)},isFieldFocused:()=>{const re=Ln(document);return!!F.current&&F.current.getRoot().contains(re)}}),[m,b,v.sections,G]),H=Te(re=>{if(!F.current)return;const Z=v.sections[re];F.current.getSectionContent(re).innerHTML=Z.value||Z.placeholder,Y.syncSelectionToDOM()}),ae=Te((re,...Z)=>{re.isDefaultPrevented()||!F.current||(q(!0),i?.(re,...Z),m==="all"?setTimeout(()=>{const fe=document.getSelection().getRangeAt(0).startOffset;if(fe===0){b(C.startIndex);return}let pe=0,be=0;for(;be<fe&&pe<v.sections.length;){const ge=v.sections[pe];pe+=1,be+=`${ge.startSeparator}${ge.value||ge.placeholder}${ge.endSeparator}`.length}b(pe-1)}):G?F.current.getRoot().contains(re.target)||b(C.startIndex):(q(!0),b(C.startIndex)))}),A=Te(re=>{if(l?.(re),!F.current||m!=="all")return;const fe=re.target.textContent??"";F.current.getRoot().innerHTML=v.sections.map(pe=>`${pe.startSeparator}${pe.value||pe.placeholder}${pe.endSeparator}`).join(""),Y.syncSelectionToDOM(),fe.length===0||fe.charCodeAt(0)===10?(w(),k(),b("all")):fe.length>1?S(fe):y({keyPressed:fe,sectionIndex:0})}),M=Te(re=>{if(d?.(re),n||m!=="all"){re.preventDefault();return}const Z=re.clipboardData.getData("text");re.preventDefault(),w(),S(Z)}),L=Te((...re)=>{if(a?.(...re),G||!F.current)return;q(!0),F.current.getSectionIndexFromDOMElement(Ln(document))!=null||b(C.startIndex)}),B=Te((...re)=>{r?.(...re),setTimeout(()=>{if(!F.current)return;const Z=Ln(document);!F.current.getRoot().contains(Z)&&(q(!1),b(null))})}),ne=Te(re=>Z=>{Z.isDefaultPrevented()||b(re)}),oe=Te(re=>{re.preventDefault()}),se=Te(re=>()=>{b(re)}),j=Te(re=>{if(re.preventDefault(),n||t||typeof m!="number")return;const Z=v.sections[m],fe=re.clipboardData.getData("text"),pe=/^[a-zA-Z]+$/.test(fe),be=/^[0-9]+$/.test(fe),ge=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(fe);Z.contentType==="letter"&&pe||Z.contentType==="digit"&&be||Z.contentType==="digit-with-letter"&&ge?(w(),x({activeSection:Z,newSectionValue:fe,shouldGoToNextSection:!0})):!pe&&!be&&(w(),S(fe))}),ee=Te(re=>{re.preventDefault(),re.dataTransfer.dropEffect="none"}),J=Te(re=>{if(!F.current)return;const Z=re.target,fe=Z.textContent??"",pe=F.current.getSectionIndexFromDOMElement(Z),be=v.sections[pe];if(n||!F.current){H(pe);return}if(fe.length===0){if(be.value===""){H(pe);return}const ge=re.nativeEvent.inputType;if(ge==="insertParagraph"||ge==="insertLineBreak"){H(pe);return}w(),D();return}y({keyPressed:fe,sectionIndex:pe}),H(pe)});ln(()=>{if(!(!G||!F.current)){if(m==="all")F.current.getRoot().focus();else if(typeof m=="number"){const re=F.current.getSectionContent(m);re&&re.focus()}}},[m,G]);const te=T.useMemo(()=>v.sections.reduce((re,Z)=>(re[Z.type]=I[Z.type]({currentDate:null,contentType:Z.contentType,format:Z.format}),re),{}),[I,v.sections]),ce=m==="all",le=T.useMemo(()=>v.sections.map((re,Z)=>{const fe=!ce&&!t&&!n;return{container:{"data-sectionindex":Z,onClick:ne(Z)},content:{tabIndex:ce||Z>0?-1:0,contentEditable:!ce&&!t&&!n,role:"spinbutton",id:`${K}-${re.type}`,"aria-labelledby":`${K}-${re.type}`,"aria-readonly":n,"aria-valuenow":kL(re,$),"aria-valuemin":te[re.type].minimum,"aria-valuemax":te[re.type].maximum,"aria-valuetext":re.value?TL(re,$):R.empty,"aria-label":R[re.type],"aria-disabled":t,spellCheck:fe?!1:void 0,autoCapitalize:fe?"off":void 0,autoCorrect:fe?"off":void 0,[parseInt(T.version,10)>=17?"enterKeyHint":"enterkeyhint"]:fe?"next":void 0,children:re.value||re.placeholder,onInput:J,onPaste:j,onFocus:se(Z),onDragOver:ee,onMouseUp:oe,inputMode:re.contentType==="letter"?"text":"numeric"},before:{children:re.startSeparator},after:{children:re.endSeparator}}}),[v.sections,se,j,ee,J,ne,oe,t,n,ce,R,$,te,K]),he=Te(re=>{S(re.target.value)}),W=T.useMemo(()=>O?"":p.getV7HiddenInputValueFromSections(v.sections),[O,v.sections,p]);return T.useEffect(()=>{if(F.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
366
- `));f&&F.current&&F.current.getSectionContent(C.startIndex).focus()},[]),{interactions:Y,returnedValue:{autoFocus:f,readOnly:n,focused:u??G,sectionListRef:z,onBlur:B,onClick:ae,onFocus:L,onInput:A,onPaste:M,enableAccessibleFieldDOMStructure:!0,elements:le,tabIndex:m===0?-1:0,contentEditable:ce,value:W,onChange:he,areAllSectionsEmpty:O}}},_s=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),G$=(e,t,n)=>{let o=0,r=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const l=e[a],d=Vh(l,n?"input-rtl":"input-ltr",t),u=`${l.startSeparator}${d}${l.endSeparator}`,f=_s(u).length,p=u.length,y=_s(d),w=r+(y===""?0:d.indexOf(y[0]))+l.startSeparator.length,b=w+y.length;i.push(Q({},l,{start:o,end:o+f,startInInput:w,endInInput:b})),o+=f,r+=p}return i},K$=e=>{const t=to(),n=T.useRef(),o=T.useRef(),{forwardedProps:{onFocus:r,onClick:i,onPaste:a,onBlur:l,inputRef:d,placeholder:u},internalProps:{readOnly:f=!1,disabled:p=!1},parsedSelectedSections:y,activeSectionIndex:w,state:b,fieldValueManager:m,valueManager:v,applyCharacterEditing:D,resetCharacterQuery:k,updateSectionValue:x,updateValueFromValueStr:S,clearActiveSection:C,clearValue:O,setTempAndroidValueStr:I,setSelectedSections:F,getSectionsFromValue:z,areAllSectionsEmpty:R,localizedDigits:$}=e,K=T.useRef(null),G=ct(d,K),q=T.useMemo(()=>G$(b.sections,$,t),[b.sections,$,t]),Y=T.useMemo(()=>({syncSelectionToDOM:()=>{if(!K.current)return;if(y==null){K.current.scrollLeft&&(K.current.scrollLeft=0);return}if(K.current!==Ln(document))return;const J=K.current.scrollTop;if(y==="all")K.current.select();else{const te=q[y],ce=te.type==="empty"?te.startInInput-te.startSeparator.length:te.startInInput,le=te.type==="empty"?te.endInInput+te.endSeparator.length:te.endInInput;(ce!==K.current.selectionStart||le!==K.current.selectionEnd)&&K.current===Ln(document)&&K.current.setSelectionRange(ce,le),clearTimeout(o.current),o.current=setTimeout(()=>{K.current&&K.current===Ln(document)&&K.current.selectionStart===K.current.selectionEnd&&(K.current.selectionStart!==ce||K.current.selectionEnd!==le)&&Y.syncSelectionToDOM()})}K.current.scrollTop=J},getActiveSectionIndexFromDOM:()=>{const J=K.current.selectionStart??0,te=K.current.selectionEnd??0;if(J===0&&te===0)return null;const ce=J<=q[0].startInInput?1:q.findIndex(le=>le.startInInput-le.startSeparator.length>J);return ce===-1?q.length-1:ce-1},focusField:(J=0)=>{K.current?.focus(),F(J)},setSelectedSections:J=>F(J),isFieldFocused:()=>K.current===Ln(document)}),[K,y,q,F]),H=()=>{const J=K.current.selectionStart??0;let te;J<=q[0].startInInput||J>=q[q.length-1].endInInput?te=1:te=q.findIndex(le=>le.startInInput-le.startSeparator.length>J);const ce=te===-1?q.length-1:te-1;F(ce)},ae=Te((...J)=>{r?.(...J);const te=K.current;clearTimeout(n.current),n.current=setTimeout(()=>{!te||te!==K.current||w==null&&(te.value.length&&Number(te.selectionEnd)-Number(te.selectionStart)===te.value.length?F("all"):H())})}),A=Te((J,...te)=>{J.isDefaultPrevented()||(i?.(J,...te),H())}),M=Te(J=>{if(a?.(J),J.preventDefault(),f||p)return;const te=J.clipboardData.getData("text");if(typeof y=="number"){const ce=b.sections[y],le=/^[a-zA-Z]+$/.test(te),he=/^[0-9]+$/.test(te),W=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(te);if(ce.contentType==="letter"&&le||ce.contentType==="digit"&&he||ce.contentType==="digit-with-letter"&&W){k(),x({activeSection:ce,newSectionValue:te,shouldGoToNextSection:!0});return}if(le||he)return}k(),S(te)}),L=Te((...J)=>{l?.(...J),F(null)}),B=Te(J=>{if(f)return;const te=J.target.value;if(te===""){k(),O();return}const ce=J.nativeEvent.data,le=ce&&ce.length>1,he=le?ce:te,W=_s(he);if(w==null||le){S(le?ce:W);return}let re;if(y==="all"&&W.length===1)re=W;else{const Z=_s(m.getV6InputValueFromSections(q,$,t));let fe=-1,pe=-1;for(let Ve=0;Ve<Z.length;Ve+=1)fe===-1&&Z[Ve]!==W[Ve]&&(fe=Ve),pe===-1&&Z[Z.length-Ve-1]!==W[W.length-Ve-1]&&(pe=Ve);const be=q[w];if(fe<be.start||Z.length-pe-1>be.end)return;const Re=W.length-Z.length+be.end-_s(be.endSeparator||"").length;re=W.slice(be.start+_s(be.startSeparator||"").length,Re)}if(re.length===0){xL()&&I(he),k(),C();return}D({keyPressed:re,sectionIndex:w})}),ne=T.useMemo(()=>u!==void 0?u:m.getV6InputValueFromSections(z(v.emptyValue),$,t),[u,m,z,v.emptyValue,$,t]),oe=T.useMemo(()=>b.tempValueStrAndroid??m.getV6InputValueFromSections(b.sections,$,t),[b.sections,m,b.tempValueStrAndroid,$,t]);T.useEffect(()=>(K.current&&K.current===Ln(document)&&F("all"),()=>{clearTimeout(n.current),clearTimeout(o.current)}),[]);const se=T.useMemo(()=>w==null||b.sections[w].contentType==="letter"?"text":"numeric",[w,b.sections]),ee=!(K.current&&K.current===Ln(document))&&R;return{interactions:Y,returnedValue:{readOnly:f,onBlur:L,onClick:A,onFocus:ae,onPaste:M,inputRef:G,enableAccessibleFieldDOMStructure:!1,placeholder:ne,inputMode:se,autoComplete:"off",value:ee?"":oe,onChange:B}}},X$=e=>{const t=Ft(),{internalProps:n,internalProps:{unstableFieldRef:o,minutesStep:r,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:l=!1},forwardedProps:{onKeyDown:d,error:u,clearable:f,onClear:p},fieldValueManager:y,valueManager:w,validator:b}=e,m=to(),v=z$(e),{state:D,activeSectionIndex:k,parsedSelectedSections:x,setSelectedSections:S,clearValue:C,clearActiveSection:O,updateSectionValue:I,setTempAndroidValueStr:F,sectionsValueBoundaries:z,localizedDigits:R,timezone:$}=v,K=U$({sections:D.sections,updateSectionValue:I,sectionsValueBoundaries:z,localizedDigits:R,setTempAndroidValueStr:F,timezone:$}),{resetCharacterQuery:G}=K,q=w.areValuesEqual(t,D.value,w.emptyValue),Y=i?q$:K$,H=T.useMemo(()=>RL(D.sections,m&&!i),[D.sections,m,i]),{returnedValue:ae,interactions:A}=Y(Q({},e,v,K,{areAllSectionsEmpty:q,sectionOrder:H})),M=Te(j=>{if(d?.(j),!a)switch(!0){case((j.ctrlKey||j.metaKey)&&String.fromCharCode(j.keyCode)==="A"&&!j.shiftKey&&!j.altKey):{j.preventDefault(),S("all");break}case j.key==="ArrowRight":{if(j.preventDefault(),x==null)S(H.startIndex);else if(x==="all")S(H.endIndex);else{const ee=H.neighbors[x].rightIndex;ee!==null&&S(ee)}break}case j.key==="ArrowLeft":{if(j.preventDefault(),x==null)S(H.endIndex);else if(x==="all")S(H.startIndex);else{const ee=H.neighbors[x].leftIndex;ee!==null&&S(ee)}break}case j.key==="Delete":{if(j.preventDefault(),l)break;x==null||x==="all"?C():O(),G();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(j.key):{if(j.preventDefault(),l||k==null)break;const ee=D.sections[k],J=y.getActiveDateManager(t,D,ee),te=vL(t,$,ee,j.key,z,R,J.date,{minutesStep:r});I({activeSection:ee,newSectionValue:te,shouldGoToNextSection:!1});break}}});ln(()=>{A.syncSelectionToDOM()});const{hasValidationError:L}=ub({props:n,validator:b,timezone:$,value:D.value,onError:n.onError}),B=T.useMemo(()=>u!==void 0?u:L,[L,u]);T.useEffect(()=>{!B&&k==null&&G()},[D.referenceValue,k,B]),T.useEffect(()=>{D.tempValueStrAndroid!=null&&k!=null&&(G(),O())},[D.sections]),T.useImperativeHandle(o,()=>({getSections:()=>D.sections,getActiveSectionIndex:A.getActiveSectionIndexFromDOM,setSelectedSections:A.setSelectedSections,focusField:A.focusField,isFieldFocused:A.isFieldFocused}));const ne=Te((j,...ee)=>{j.preventDefault(),p?.(j,...ee),C(),A.isFieldFocused()?S(H.startIndex):A.focusField(0)}),oe={onKeyDown:M,onClear:ne,error:B,clearable:!!(f&&!q&&!l&&!a)},se={disabled:a,readOnly:l};return Q({},e.forwardedProps,oe,se,ae)},Z$=["clearable","onClear","InputProps","sx","slots","slotProps"],Q$=["ownerState"],J$=e=>{const t=lr(),{clearable:n,onClear:o,InputProps:r,sx:i,slots:a,slotProps:l}=e,d=Ye(e,Z$),u=a?.clearButton??Us,f=pt({elementType:u,externalSlotProps:l?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),p=Ye(f,Q$),y=a?.clearIcon??L$,w=pt({elementType:y,externalSlotProps:l?.clearIcon,ownerState:{}});return Q({},d,{InputProps:Q({},r,{endAdornment:E.jsxs(T.Fragment,{children:[n&&E.jsx(Qu,{position:"end",sx:{marginRight:r?.endAdornment?-1:-1.5},children:E.jsx(u,Q({},p,{onClick:o,children:E.jsx(y,Q({fontSize:"small"},w))}))}),r?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},eV=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],tV=(e,t)=>T.useMemo(()=>{const n=Q({},e),o={},r=i=>{n.hasOwnProperty(i)&&(o[i]=n[i],delete n[i])};return eV.forEach(r),cb.forEach(r),{forwardedProps:n,internalProps:o}},[e,t]),nV=e=>{const t=Ft(),n=_a();return Q({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Jn(t,e.minDate,n.minDate),maxDate:Jn(t,e.maxDate,n.maxDate)})},oV=e=>{const t=nV(e),{forwardedProps:n,internalProps:o}=tV(t,"date");return X$({forwardedProps:n,internalProps:o,valueManager:Io,fieldValueManager:PL,validator:xa,valueType:"date"})};function rV(e){return Me("MuiPickersTextField",e)}Pe("MuiPickersTextField",["root","focused","disabled","error","required"]);function sV(e){return Me("MuiPickersInputBase",e)}const Ds=Pe("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function iV(e){return Me("MuiPickersSectionList",e)}const wi=Pe("MuiPickersSectionList",["root","section","sectionContent"]),aV=["slots","slotProps","elements","sectionListRef"],bb=ie("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),wb=ie("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Cb=ie("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Sb=ie("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),lV=e=>{const{classes:t}=e;return Ie({root:["root"],section:["section"],sectionContent:["sectionContent"]},iV,t)};function _b(e){const{slots:t,slotProps:n,element:o,classes:r}=e,i=t?.section??wb,a=pt({elementType:i,externalSlotProps:n?.section,externalForwardedProps:o.container,className:r.section,ownerState:{}}),l=t?.sectionContent??Sb,d=pt({elementType:l,externalSlotProps:n?.sectionContent,externalForwardedProps:o.content,additionalProps:{suppressContentEditableWarning:!0},className:r.sectionContent,ownerState:{}}),u=t?.sectionSeparator??Cb,f=pt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:o.before,ownerState:{position:"before"}}),p=pt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:o.after,ownerState:{position:"after"}});return E.jsxs(i,Q({},a,{children:[E.jsx(u,Q({},f)),E.jsx(l,Q({},d)),E.jsx(u,Q({},p))]}))}process.env.NODE_ENV!=="production"&&(_b.propTypes={classes:s.object.isRequired,element:s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired}).isRequired,slotProps:s.object,slots:s.object});const xb=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:a,sectionListRef:l}=o,d=Ye(o,aV),u=lV(o),f=T.useRef(null),p=ct(n,f),y=m=>{if(!f.current)throw new Error(`MUI X: Cannot call sectionListRef.${m} before the mount of the component.`);return f.current};T.useImperativeHandle(l,()=>({getRoot(){return y("getRoot")},getSectionContainer(m){return y("getSectionContainer").querySelector(`.${wi.section}[data-sectionindex="${m}"]`)},getSectionContent(m){return y("getSectionContent").querySelector(`.${wi.section}[data-sectionindex="${m}"] .${wi.sectionContent}`)},getSectionIndexFromDOMElement(m){const v=y("getSectionIndexFromDOMElement");if(m==null||!v.contains(m))return null;let D=null;return m.classList.contains(wi.section)?D=m:m.classList.contains(wi.sectionContent)&&(D=m.parentElement),D==null?null:Number(D.dataset.sectionindex)}}));const w=r?.root??bb,b=pt({elementType:w,externalSlotProps:i?.root,externalForwardedProps:d,additionalProps:{ref:p,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return E.jsx(w,Q({},b,{children:b.contentEditable?a.map(({content:m,before:v,after:D})=>`${v.children}${m.children}${D.children}`).join(""):E.jsx(T.Fragment,{children:a.map((m,v)=>E.jsx(_b,{slots:r,slotProps:i,element:m,classes:u},v))})}))});process.env.NODE_ENV!=="production"&&(xb.propTypes={classes:s.object,contentEditable:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object});const cV=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],dV=e=>Math.round(e*1e5)/1e5,Ac=ie("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>Q({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${dV(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),zh=ie(bb,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:o,label:r})=>!t&&!n&&!o&&r==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),uV=ie(wb,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),hV=ie(Sb,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),fV=ie(Cb,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),pV=ie("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(Q({},rR)),mV=e=>{const{focused:t,disabled:n,error:o,classes:r,fullWidth:i,readOnly:a,color:l,size:d,endAdornment:u,startAdornment:f}=e,p={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",o&&"error",i&&"fullWidth",`color${we(l)}`,d==="small"&&"inputSizeSmall",!!f&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Ie(p,sV,r)},Fc=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:a,onChange:l,id:d,endAdornment:u,startAdornment:f,renderSuffix:p,slots:y,slotProps:w,contentEditable:b,tabIndex:m,onInput:v,onPaste:D,onKeyDown:k,name:x,readOnly:S,inputProps:C,inputRef:O,sectionListRef:I}=o,F=Ye(o,cV),z=T.useRef(null),R=ct(n,z),$=ct(C?.ref,O),K=to(),G=Nn();if(!G)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const q=L=>{if(G.disabled){L.stopPropagation();return}G.onFocus?.(L)};T.useEffect(()=>{G&&G.setAdornedStart(!!f)},[G,f]),T.useEffect(()=>{G&&(i?G.onEmpty():G.onFilled())},[G,i]);const Y=Q({},o,G,{isRtl:K}),H=mV(Y),ae=y?.root||Ac,A=pt({elementType:ae,externalSlotProps:w?.root,externalForwardedProps:F,additionalProps:{"aria-invalid":G.error,ref:R},className:H.root,ownerState:Y}),M=y?.input||zh;return E.jsxs(ae,Q({},A,{children:[f,E.jsx(xb,{sectionListRef:I,elements:r,contentEditable:b,tabIndex:m,className:H.sectionsContainer,onFocus:q,onBlur:G.onBlur,onInput:v,onPaste:D,onKeyDown:k,slots:{root:M,section:uV,sectionContent:hV,sectionSeparator:fV},slotProps:{root:{ownerState:Y},sectionContent:{className:Ds.sectionContent},sectionSeparator:({position:L})=>({className:L==="before"?Ds.sectionBefore:Ds.sectionAfter})}}),u,p?p(Q({},G)):null,E.jsx(pV,Q({name:x,className:H.input,value:a,onChange:l,id:d,"aria-hidden":"true",tabIndex:-1,readOnly:S,required:G.required,disabled:G.disabled},C,{ref:$}))]}))});process.env.NODE_ENV!=="production"&&(Fc.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});function gV(e){return Me("MuiPickersOutlinedInput",e)}const ao=Q({},Ds,Pe("MuiPickersOutlinedInput",["root","notchedOutline","input"])),yV=["children","className","label","notched","shrink"],vV=ie("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{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%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Xm=ie("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),bV=ie("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function wV(e){const{className:t,label:n}=e,o=Ye(e,yV),r=n!=null&&n!=="",i=Q({},e,{withLabel:r});return E.jsx(vV,Q({"aria-hidden":!0,className:t},o,{ownerState:i,children:E.jsx(bV,{ownerState:i,children:r?E.jsx(Xm,{children:n}):E.jsx(Xm,{className:"notranslate",children:"​"})})}))}const CV=["label","autoFocus","ownerState","notched"],SV=ie(Ac,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ao.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ao.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${ao.focused} .${ao.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${ao.disabled}`]:{[`& .${ao.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${ao.error} .${ao.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>(e.vars??e).palette[n]?.main??!1).map(n=>({props:{color:n},style:{[`&.${ao.focused}:not(.${ao.error}) .${ao.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),_V=ie(zh,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),xV=e=>{const{classes:t}=e,o=Ie({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},gV,t);return Q({},t,o)},Yh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:a}=o,l=Ye(o,CV),d=Nn(),u=Q({},o,i,d,{color:d?.color||"primary"}),f=xV(u);return E.jsx(Fc,Q({slots:{root:SV,input:_V},renderSuffix:p=>E.jsx(wV,{shrink:!!(a||p.adornedStart||p.focused||p.filled),notched:!!(a||p.adornedStart||p.focused||p.filled),className:f.notchedOutline,label:r!=null&&r!==""&&d?.required?E.jsxs(T.Fragment,{children:[r," ","*"]}):r,ownerState:u})},l,{label:r,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Yh.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,notched:s.bool,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});Yh.muiName="Input";function RV(e){return Me("MuiPickersFilledInput",e)}const Or=Q({},Ds,Pe("MuiPickersFilledInput",["root","underline","input"])),TV=["label","autoFocus","disableUnderline","ownerState"],kV=ie(Ac,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ll(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${Or.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Or.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>({props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Or.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Or.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Or.disabled}, .${Or.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Or.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),EV=ie(zh,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),PV=e=>{const{classes:t,disableUnderline:n}=e,r=Ie({root:["root",!n&&"underline"],input:["input"]},RV,t);return Q({},t,r)},Uh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=o,l=Ye(o,TV),d=Nn(),u=Q({},o,a,d,{color:d?.color||"primary"}),f=PV(u);return E.jsx(Fc,Q({slots:{root:kV,input:EV},slotProps:{root:{disableUnderline:i}}},l,{label:r,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Uh.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,disableUnderline:s.bool,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,hiddenLabel:s.bool,id:s.string,inputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});Uh.muiName="Input";function DV(e){return Me("MuiPickersFilledInput",e)}const Ci=Q({},Ds,Pe("MuiPickersInput",["root","input"])),OV=["label","autoFocus","disableUnderline","ownerState"],MV=ie(Ac,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(o=>(e.vars??e).palette[o].main).map(o=>({props:{color:o},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ci.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ci.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ci.disabled}, .${Ci.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Ci.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),IV=e=>{const{classes:t,disableUnderline:n}=e,r=Ie({root:["root",!n&&"underline"],input:["input"]},DV,t);return Q({},t,r)},qh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=o,l=Ye(o,OV),d=Nn(),u=Q({},o,a,d,{disableUnderline:i,color:d?.color||"primary"}),f=IV(u);return E.jsx(Fc,Q({slots:{root:MV}},l,{label:r,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(qh.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,disableUnderline:s.bool,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});qh.muiName="Input";const NV=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],AV={standard:qh,filled:Uh,outlined:Yh},FV=ie(pa,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),LV=e=>{const{focused:t,disabled:n,classes:o,required:r}=e;return Ie({root:["root",t&&!n&&"focused",n&&"disabled",r&&"required"]},rV,o)},Rb=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:a,color:l="primary",disabled:d=!1,error:u=!1,variant:f="outlined",required:p=!1,InputProps:y,inputProps:w,inputRef:b,sectionListRef:m,elements:v,areAllSectionsEmpty:D,onClick:k,onKeyDown:x,onKeyUp:S,onPaste:C,onInput:O,endAdornment:I,startAdornment:F,tabIndex:z,contentEditable:R,focused:$,value:K,onChange:G,fullWidth:q,id:Y,name:H,helperText:ae,FormHelperTextProps:A,label:M,InputLabelProps:L}=o,B=Ye(o,NV),ne=T.useRef(null),oe=ct(n,ne),se=sr(Y),j=ae&&se?`${se}-helper-text`:void 0,ee=M&&se?`${se}-label`:void 0,J=Q({},o,{color:l,disabled:d,error:u,focused:$,required:p,variant:f}),te=LV(J),ce=AV[f];return E.jsxs(FV,Q({className:Se(te.root,a),ref:oe,focused:$,onFocus:r,onBlur:i,disabled:d,variant:f,error:u,color:l,fullWidth:q,required:p,ownerState:J},B,{children:[E.jsx(ma,Q({htmlFor:se,id:ee},L,{children:M})),E.jsx(ce,Q({elements:v,areAllSectionsEmpty:D,onClick:k,onKeyDown:x,onKeyUp:S,onInput:O,onPaste:C,endAdornment:I,startAdornment:F,tabIndex:z,contentEditable:R,value:K,onChange:G,id:se,fullWidth:q,inputProps:w,inputRef:b,sectionListRef:m,label:M,name:H,role:"group","aria-labelledby":ee},y)),ae&&E.jsx(Zu,Q({id:j},A,{children:ae}))]}))});process.env.NODE_ENV!=="production"&&(Rb.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,contentEditable:s.bool.isRequired,disabled:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,error:s.bool.isRequired,focused:s.bool,FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onBlur:s.func.isRequired,onChange:s.func.isRequired,onClick:s.func.isRequired,onFocus:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,readOnly:s.bool,required:s.bool,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),size:s.oneOf(["medium","small"]),startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired,variant:s.oneOf(["filled","outlined","standard"])});const $V=["enableAccessibleFieldDOMStructure"],VV=["InputProps","readOnly"],jV=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],BV=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=Ye(e,$V);if(t){const{InputProps:p,readOnly:y}=n,w=Ye(n,VV);return Q({},w,{InputProps:Q({},p??{},{readOnly:y})})}const{onPaste:o,onKeyDown:r,inputMode:i,readOnly:a,InputProps:l,inputProps:d,inputRef:u}=n,f=Ye(n,jV);return Q({},f,{InputProps:Q({},l??{},{readOnly:a}),inputProps:Q({},d??{},{inputMode:i,onPaste:o,onKeyDown:r,ref:u})})},WV=["slots","slotProps","InputProps","inputProps"],Gh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiDateField"}),{slots:r,slotProps:i,InputProps:a,inputProps:l}=o,d=Ye(o,WV),u=o,f=r?.textField??(t.enableAccessibleFieldDOMStructure?Rb:Vs),p=pt({elementType:f,externalSlotProps:i?.textField,externalForwardedProps:d,additionalProps:{ref:n},ownerState:u});p.inputProps=Q({},l,p.inputProps),p.InputProps=Q({},a,p.InputProps);const y=oV(p),w=BV(y),b=J$(Q({},w,{slots:r,slotProps:i}));return E.jsx(f,Q({},b))});process.env.NODE_ENV!=="production"&&(Gh.propTypes={autoFocus:s.bool,className:s.string,clearable:s.bool,color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,enableAccessibleFieldDOMStructure:s.bool,focused:s.bool,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxDate:s.object,minDate:s.object,name:s.string,onBlur:s.func,onChange:s.func,onClear:s.func,onError:s.func,onFocus:s.func,onSelectedSectionsChange:s.func,readOnly:s.bool,referenceDate:s.object,required:s.bool,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,shouldRespectLeadingZeros:s.bool,size:s.oneOf(["medium","small"]),slotProps:s.object,slots:s.object,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,unstableFieldRef:s.oneOfType([s.func,s.object]),value:s.object,variant:s.oneOf(["filled","outlined","standard"])});const Tb=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:i,disablePast:a,timezone:l})=>{const d=Qr();return T.useCallback(u=>xa({adapter:d,value:u,timezone:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:i,disablePast:a}})!==null,[d,e,t,n,o,r,i,a,l])},HV=(e,t,n)=>(o,r)=>{switch(r.type){case"changeMonth":return Q({},o,{slideDirection:r.direction,currentMonth:r.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=r.newTimezone;if(n.getTimezone(o.currentMonth)===i)return o;let a=n.setTimezone(o.currentMonth,i);return n.getMonth(a)!==n.getMonth(o.currentMonth)&&(a=n.setMonth(a,n.getMonth(o.currentMonth))),Q({},o,{currentMonth:a})}case"finishMonthSwitchingAnimation":return Q({},o,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(o.focusedDay!=null&&r.focusedDay!=null&&n.isSameDay(r.focusedDay,o.focusedDay))return o;const i=r.focusedDay!=null&&!t&&!n.isSameMonth(o.currentMonth,r.focusedDay);return Q({},o,{focusedDay:r.focusedDay,isMonthSwitchingAnimating:i&&!e&&!r.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(r.focusedDay):o.currentMonth,slideDirection:r.focusedDay!=null&&n.isAfterDay(r.focusedDay,o.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},zV=e=>{const{value:t,referenceDate:n,disableFuture:o,disablePast:r,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:l,onMonthChange:d,reduceAnimations:u,shouldDisableDate:f,timezone:p}=e,y=Ft(),w=T.useRef(HV(!!u,i,y)).current,b=T.useMemo(()=>Io.getInitialReferenceValue({value:t,utils:y,timezone:p,props:e,referenceDate:n,granularity:xo.day}),[n,p]),[m,v]=T.useReducer(w,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:y.startOfMonth(b),slideDirection:"left"});T.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:y.getTimezone(b)})},[b,y]);const D=T.useCallback(O=>{v(Q({type:"changeMonth"},O)),d&&d(O.newMonth)},[d]),k=T.useCallback(O=>{const I=O;y.isSameMonth(I,m.currentMonth)||D({newMonth:y.startOfMonth(I),direction:y.isAfterDay(I,m.currentMonth)?"left":"right"})},[m.currentMonth,D,y]),x=Tb({shouldDisableDate:f,minDate:l,maxDate:a,disableFuture:o,disablePast:r,timezone:p}),S=T.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]),C=Te((O,I)=>{x(O)||v({type:"changeFocusedDay",focusedDay:O,withoutMonthSwitchingAnimation:I})});return{referenceDate:b,calendarState:m,changeMonth:k,changeFocusedDay:C,isDateDisabled:x,onMonthSwitchingAnimationEnd:S,handleChangeMonth:D}},YV=e=>Me("MuiPickersFadeTransitionGroup",e);Pe("MuiPickersFadeTransitionGroup",["root"]);const UV=e=>{const{classes:t}=e;return Ie({root:["root"]},YV,t)},qV=ie(da,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function kb(e){const t=Nt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:o,reduceAnimations:r,transKey:i}=t,a=UV(t),l=qr();return r?n:E.jsx(qV,{className:Se(a.root,o),children:E.jsx(Gr,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:n},i)})}function GV(e){return Me("MuiPickersDay",e)}const Mr=Pe("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),KV=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],XV=e=>{const{selected:t,disableMargin:n,disableHighlightToday:o,today:r,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:l,classes:d}=e,u=a&&!l;return Ie({root:["root",t&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!o&&r&&"today",a&&l&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},GV,d)},Eb=({theme:e})=>Q({},e.typography.caption,{width:oa,height:oa,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:tt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:tt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Mr.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Mr.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Mr.disabled}:not(.${Mr.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Mr.disabled}&.${Mr.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Ic}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Mr.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Pb=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},ZV=ie(br,{name:"MuiPickersDay",slot:"Root",overridesResolver:Pb})(Eb),QV=ie("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Pb})(({theme:e})=>Q({},Eb({theme:e}),{opacity:0,pointerEvents:"none"})),Si=()=>{},Db=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:a,disabled:l=!1,disableHighlightToday:d=!1,disableMargin:u=!1,isAnimating:f,onClick:p,onDaySelect:y,onFocus:w=Si,onBlur:b=Si,onKeyDown:m=Si,onMouseDown:v=Si,onMouseEnter:D=Si,outsideCurrentMonth:k,selected:x=!1,showDaysOutsideCurrentMonth:S=!1,children:C,today:O=!1}=o,I=Ye(o,KV),F=Q({},o,{autoFocus:r,disabled:l,disableHighlightToday:d,disableMargin:u,selected:x,showDaysOutsideCurrentMonth:S,today:O}),z=XV(F),R=Ft(),$=T.useRef(null),K=ct($,n);ln(()=>{r&&!l&&!f&&!k&&$.current.focus()},[r,l,f,k]);const G=Y=>{v(Y),k&&Y.preventDefault()},q=Y=>{l||y(a),k&&Y.currentTarget.focus(),p&&p(Y)};return k&&!S?E.jsx(QV,{className:Se(z.root,z.hiddenDaySpacingFiller,i),ownerState:F,role:I.role}):E.jsx(ZV,Q({className:Se(z.root,i),ref:K,centerRipple:!0,disabled:l,tabIndex:x?0:-1,onKeyDown:Y=>m(Y,a),onFocus:Y=>w(Y,a),onBlur:Y=>b(Y,a),onMouseEnter:Y=>D(Y,a),onClick:q,onMouseDown:G},I,{ownerState:F,children:C||R.format(a,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(Db.propTypes={action:s.oneOfType([s.func,s.shape({current:s.shape({focusVisible:s.func.isRequired})})]),centerRipple:s.bool,classes:s.object,className:s.string,component:s.elementType,day:s.object.isRequired,disabled:s.bool,disableHighlightToday:s.bool,disableMargin:s.bool,disableRipple:s.bool,disableTouchRipple:s.bool,focusRipple:s.bool,focusVisibleClassName:s.string,isAnimating:s.bool,isFirstVisibleCell:s.bool.isRequired,isLastVisibleCell:s.bool.isRequired,onBlur:s.func,onDaySelect:s.func.isRequired,onFocus:s.func,onFocusVisible:s.func,onKeyDown:s.func,onMouseEnter:s.func,outsideCurrentMonth:s.bool.isRequired,selected:s.bool,showDaysOutsideCurrentMonth:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,today:s.bool,TouchRippleProps:s.object,touchRippleRef:s.oneOfType([s.func,s.shape({current:s.shape({pulsate:s.func.isRequired,start:s.func.isRequired,stop:s.func.isRequired})})])});const JV=T.memo(Db),ej=e=>Me("MuiPickersSlideTransition",e),Yn=Pe("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),tj=["children","className","reduceAnimations","slideDirection","transKey","classes"],nj=e=>{const{classes:t,slideDirection:n}=e,o={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Ie(o,ej,t)},oj=ie(da,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Yn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Yn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Yn.slideEnterActive}`]:t.slideEnterActive},{[`.${Yn.slideExit}`]:t.slideExit},{[`.${Yn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Yn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Yn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Yn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Yn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Yn.slideExit}`]:{transform:"translate(0%)"},[`& .${Yn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Yn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function rj(e){const t=Nt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:o,reduceAnimations:r,transKey:i}=t,a=Ye(t,tj),l=nj(t),d=qr();if(r)return E.jsx("div",{className:Se(l.root,o),children:n});const u={exit:l.exit,enterActive:l.enterActive,enter:l.enter,exitActive:l.exitActive};return E.jsx(oj,{className:Se(l.root,o),childFactory:f=>T.cloneElement(f,{classNames:u}),role:"presentation",children:E.jsx(Fu,Q({mountOnEnter:!0,unmountOnExit:!0,timeout:d.transitions.duration.complex,classNames:u},a,{children:n}),i)})}const sj=e=>Me("MuiDayCalendar",e);Pe("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const ij=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],aj=["ownerState"],lj=e=>{const{classes:t}=e;return Ie({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},sj,t)},Ob=(oa+Ic*2)*6,cj=ie("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dj=ie("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),uj=ie(bn,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),hj=ie(bn,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),fj=ie(bn,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>Q({},e.typography.caption,{width:oa,height:oa,padding:0,margin:`0 ${Ic}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),pj=ie("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Ob}),mj=ie(rj,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Ob}),gj=ie("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),yj=ie("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Ic}px 0`,display:"flex",justifyContent:"center"});function vj(e){let{parentProps:t,day:n,focusableDay:o,selectedDays:r,isDateDisabled:i,currentMonthNumber:a,isViewFocused:l}=e,d=Ye(e,ij);const{disabled:u,disableHighlightToday:f,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:y,slots:w,slotProps:b,timezone:m}=t,v=Ft(),D=Mc(m),k=o!==null&&v.isSameDay(n,o),x=r.some(K=>v.isSameDay(K,n)),S=v.isSameDay(n,D),C=w?.day??JV,O=pt({elementType:C,externalSlotProps:b?.day,additionalProps:Q({disableHighlightToday:f,showDaysOutsideCurrentMonth:y,role:"gridcell",isAnimating:p,"data-timestamp":v.toJsDate(n).valueOf()},d),ownerState:Q({},t,{day:n,selected:x})}),I=Ye(O,aj),F=T.useMemo(()=>u||i(n),[u,i,n]),z=T.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),R=T.useMemo(()=>{const K=v.startOfMonth(v.setMonth(n,a));return y?v.isSameDay(n,v.startOfWeek(K)):v.isSameDay(n,K)},[a,n,y,v]),$=T.useMemo(()=>{const K=v.endOfMonth(v.setMonth(n,a));return y?v.isSameDay(n,v.endOfWeek(K)):v.isSameDay(n,K)},[a,n,y,v]);return E.jsx(C,Q({},I,{day:n,disabled:F,autoFocus:l&&k,today:S,outsideCurrentMonth:z,isFirstVisibleCell:R,isLastVisibleCell:$,selected:x,tabIndex:k?0:-1,"aria-selected":x,"aria-current":S?"date":void 0}))}function bj(e){const t=Nt({props:e,name:"MuiDayCalendar"}),n=Ft(),{onFocusedDayChange:o,className:r,currentMonth:i,selectedDays:a,focusedDay:l,loading:d,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:y,renderLoading:w=()=>E.jsx("span",{children:"..."}),slideDirection:b,TransitionProps:m,disablePast:v,disableFuture:D,minDate:k,maxDate:x,shouldDisableDate:S,shouldDisableMonth:C,shouldDisableYear:O,dayOfWeekFormatter:I=pe=>n.format(pe,"weekdayShort").charAt(0).toUpperCase(),hasFocus:F,onFocusedViewChange:z,gridLabelId:R,displayWeekNumber:$,fixedWeekNumber:K,autoFocus:G,timezone:q}=t,Y=Mc(q),H=lj(t),ae=to(),A=Tb({shouldDisableDate:S,shouldDisableMonth:C,shouldDisableYear:O,minDate:k,maxDate:x,disablePast:v,disableFuture:D,timezone:q}),M=lr(),[L,B]=ho({name:"DayCalendar",state:"hasFocus",controlled:F,default:G??!1}),[ne,oe]=T.useState(()=>l||Y),se=Te(pe=>{p||u(pe)}),j=pe=>{A(pe)||(o(pe),oe(pe),z?.(!0),B(!0))},ee=Te((pe,be)=>{switch(pe.key){case"ArrowUp":j(n.addDays(be,-7)),pe.preventDefault();break;case"ArrowDown":j(n.addDays(be,7)),pe.preventDefault();break;case"ArrowLeft":{const ge=n.addDays(be,ae?1:-1),Re=n.addMonths(be,ae?1:-1),Ve=Fi({utils:n,date:ge,minDate:ae?ge:n.startOfMonth(Re),maxDate:ae?n.endOfMonth(Re):ge,isDateDisabled:A,timezone:q});j(Ve||ge),pe.preventDefault();break}case"ArrowRight":{const ge=n.addDays(be,ae?-1:1),Re=n.addMonths(be,ae?-1:1),Ve=Fi({utils:n,date:ge,minDate:ae?n.startOfMonth(Re):ge,maxDate:ae?ge:n.endOfMonth(Re),isDateDisabled:A,timezone:q});j(Ve||ge),pe.preventDefault();break}case"Home":j(n.startOfWeek(be)),pe.preventDefault();break;case"End":j(n.endOfWeek(be)),pe.preventDefault();break;case"PageUp":j(n.addMonths(be,1)),pe.preventDefault();break;case"PageDown":j(n.addMonths(be,-1)),pe.preventDefault();break}}),J=Te((pe,be)=>j(be)),te=Te((pe,be)=>{L&&n.isSameDay(ne,be)&&z?.(!1)}),ce=n.getMonth(i),le=n.getYear(i),he=T.useMemo(()=>a.filter(pe=>!!pe).map(pe=>n.startOfDay(pe)),[n,a]),W=`${le}-${ce}`,re=T.useMemo(()=>T.createRef(),[W]),Z=T.useMemo(()=>{const pe=n.startOfMonth(i),be=n.endOfMonth(i);return A(ne)||n.isAfterDay(ne,be)||n.isBeforeDay(ne,pe)?Fi({utils:n,date:ne,minDate:pe,maxDate:be,disablePast:v,disableFuture:D,isDateDisabled:A,timezone:q}):ne},[i,D,v,ne,A,n,q]),fe=T.useMemo(()=>{const pe=n.getWeekArray(i);let be=n.addMonths(i,1);for(;K&&pe.length<K;){const ge=n.getWeekArray(be),Re=n.isSameDay(pe[pe.length-1][0],ge[0][0]);ge.slice(Re?1:0).forEach(Ve=>{pe.length<K&&pe.push(Ve)}),be=n.addMonths(be,1)}return pe},[i,K,n]);return E.jsxs(cj,{role:"grid","aria-labelledby":R,className:H.root,children:[E.jsxs(dj,{role:"row",className:H.header,children:[$&&E.jsx(hj,{variant:"caption",role:"columnheader","aria-label":M.calendarWeekNumberHeaderLabel,className:H.weekNumberLabel,children:M.calendarWeekNumberHeaderText}),cL(n,Y).map((pe,be)=>E.jsx(uj,{variant:"caption",role:"columnheader","aria-label":n.format(pe,"weekday"),className:H.weekDayLabel,children:I(pe)},be.toString()))]}),d?E.jsx(pj,{className:H.loadingContainer,children:w()}):E.jsx(mj,Q({transKey:W,onExited:f,reduceAnimations:y,slideDirection:b,className:Se(r,H.slideTransition)},m,{nodeRef:re,children:E.jsx(gj,{ref:re,role:"rowgroup",className:H.monthContainer,children:fe.map((pe,be)=>E.jsxs(yj,{role:"row",className:H.weekContainer,"aria-rowindex":be+1,children:[$&&E.jsx(fj,{className:H.weekNumber,role:"rowheader","aria-label":M.calendarWeekNumberAriaLabelText(n.getWeekNumber(pe[0])),children:M.calendarWeekNumberText(n.getWeekNumber(pe[0]))}),pe.map((ge,Re)=>E.jsx(vj,{parentProps:t,day:ge,selectedDays:he,focusableDay:Z,onKeyDown:ee,onFocus:J,onBlur:te,onDaySelect:se,isDateDisabled:A,currentMonthNumber:ce,isViewFocused:L,"aria-colindex":Re+1},ge.toString()))]},`week-${pe[0]}`))})}))]})}function wj(e){return Me("MuiPickersMonth",e)}const nl=Pe("MuiPickersMonth",["root","monthButton","disabled","selected"]),Cj=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Sj=e=>{const{disabled:t,selected:n,classes:o}=e;return Ie({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},wj,o)},_j=ie("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),xj=ie("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${nl.disabled}`]:t.disabled},{[`&.${nl.selected}`]:t.selected}]})(({theme:e})=>Q({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:tt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:tt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${nl.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${nl.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Rj=T.memo(function(t){const n=Nt({props:t,name:"MuiPickersMonth"}),{autoFocus:o,className:r,children:i,disabled:a,selected:l,value:d,tabIndex:u,onClick:f,onKeyDown:p,onFocus:y,onBlur:w,"aria-current":b,"aria-label":m,slots:v,slotProps:D}=n,k=Ye(n,Cj),x=T.useRef(null),S=Sj(n);ln(()=>{o&&x.current?.focus()},[o]);const C=v?.monthButton??xj,O=pt({elementType:C,externalSlotProps:D?.monthButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:x,type:"button",role:"radio","aria-current":b,"aria-checked":l,"aria-label":m,onClick:I=>f(I,d),onKeyDown:I=>p(I,d),onFocus:I=>y(I,d),onBlur:I=>w(I,d)},ownerState:n,className:S.monthButton});return E.jsx(_j,Q({className:Se(S.root,r),ownerState:n},k,{children:E.jsx(C,Q({},O))}))});function Tj(e){return Me("MuiMonthCalendar",e)}Pe("MuiMonthCalendar",["root"]);const kj=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],Ej=e=>{const{classes:t}=e;return Ie({root:["root"]},Tj,t)};function Pj(e,t){const n=Ft(),o=_a(),r=Nt({props:e,name:t});return Q({disableFuture:!1,disablePast:!1},r,{minDate:Jn(n,r.minDate,o.minDate),maxDate:Jn(n,r.maxDate,o.maxDate)})}const Dj=ie("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Nc,boxSizing:"border-box"}),Mb=T.forwardRef(function(t,n){const o=Pj(t,"MuiMonthCalendar"),{className:r,value:i,defaultValue:a,referenceDate:l,disabled:d,disableFuture:u,disablePast:f,maxDate:p,minDate:y,onChange:w,shouldDisableMonth:b,readOnly:m,autoFocus:v=!1,onMonthFocus:D,hasFocus:k,onFocusedViewChange:x,monthsPerRow:S=3,timezone:C,gridLabelId:O,slots:I,slotProps:F}=o,z=Ye(o,kj),{value:R,handleValueChange:$,timezone:K}=Bh({name:"MonthCalendar",timezone:C,value:i,defaultValue:a,onChange:w,valueManager:Io}),G=Mc(K),q=to(),Y=Ft(),H=T.useMemo(()=>Io.getInitialReferenceValue({value:R,utils:Y,props:o,timezone:K,referenceDate:l,granularity:xo.month}),[]),ae=o,A=Ej(ae),M=T.useMemo(()=>Y.getMonth(G),[Y,G]),L=T.useMemo(()=>R!=null?Y.getMonth(R):null,[R,Y]),[B,ne]=T.useState(()=>L||Y.getMonth(H)),[oe,se]=ho({name:"MonthCalendar",state:"hasFocus",controlled:k,default:v??!1}),j=Te(W=>{se(W),x&&x(W)}),ee=T.useCallback(W=>{const re=Y.startOfMonth(f&&Y.isAfter(G,y)?G:y),Z=Y.startOfMonth(u&&Y.isBefore(G,p)?G:p),fe=Y.startOfMonth(W);return Y.isBefore(fe,re)||Y.isAfter(fe,Z)?!0:b?b(fe):!1},[u,f,p,y,G,b,Y]),J=Te((W,re)=>{if(m)return;const Z=Y.setMonth(R??H,re);$(Z)}),te=Te(W=>{ee(Y.setMonth(R??H,W))||(ne(W),j(!0),D&&D(W))});T.useEffect(()=>{ne(W=>L!==null&&W!==L?L:W)},[L]);const ce=Te((W,re)=>{switch(W.key){case"ArrowUp":te((12+re-3)%12),W.preventDefault();break;case"ArrowDown":te((12+re+3)%12),W.preventDefault();break;case"ArrowLeft":te((12+re+(q?1:-1))%12),W.preventDefault();break;case"ArrowRight":te((12+re+(q?-1:1))%12),W.preventDefault();break}}),le=Te((W,re)=>{te(re)}),he=Te((W,re)=>{B===re&&j(!1)});return E.jsx(Dj,Q({ref:n,className:Se(A.root,r),ownerState:ae,role:"radiogroup","aria-labelledby":O},z,{children:Ah(Y,R??H).map(W=>{const re=Y.getMonth(W),Z=Y.format(W,"monthShort"),fe=Y.format(W,"month"),pe=re===L,be=d||ee(W);return E.jsx(Rj,{selected:pe,value:re,onClick:J,onKeyDown:ce,autoFocus:oe&&re===B,disabled:be,tabIndex:re===B&&!be?0:-1,onFocus:le,onBlur:he,"aria-current":M===re?"date":void 0,"aria-label":fe,monthsPerRow:S,slots:I,slotProps:F,children:Z},Z)})}))});process.env.NODE_ENV!=="production"&&(Mb.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableMonth:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object});function Oj(e){return Me("MuiPickersYear",e)}const ol=Pe("MuiPickersYear",["root","yearButton","selected","disabled"]),Mj=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Ij=e=>{const{disabled:t,selected:n,classes:o}=e;return Ie({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Oj,o)},Nj=ie("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Aj=ie("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${ol.disabled}`]:t.disabled},{[`&.${ol.selected}`]:t.selected}]})(({theme:e})=>Q({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:tt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:tt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${ol.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${ol.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Fj=T.memo(function(t){const n=Nt({props:t,name:"MuiPickersYear"}),{autoFocus:o,className:r,children:i,disabled:a,selected:l,value:d,tabIndex:u,onClick:f,onKeyDown:p,onFocus:y,onBlur:w,"aria-current":b,slots:m,slotProps:v}=n,D=Ye(n,Mj),k=T.useRef(null),x=Ij(n);ln(()=>{o&&k.current?.focus()},[o]);const S=m?.yearButton??Aj,C=pt({elementType:S,externalSlotProps:v?.yearButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:k,type:"button",role:"radio","aria-current":b,"aria-checked":l,onClick:O=>f(O,d),onKeyDown:O=>p(O,d),onFocus:O=>y(O,d),onBlur:O=>w(O,d)},ownerState:n,className:x.yearButton});return E.jsx(Nj,Q({className:Se(x.root,r),ownerState:n},D,{children:E.jsx(S,Q({},C))}))});function Lj(e){return Me("MuiYearCalendar",e)}Pe("MuiYearCalendar",["root"]);const $j=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],Vj=e=>{const{classes:t}=e;return Ie({root:["root"]},Lj,t)};function jj(e,t){const n=Ft(),o=_a(),r=Nt({props:e,name:t});return Q({disablePast:!1,disableFuture:!1},r,{yearsPerRow:r.yearsPerRow??3,minDate:Jn(n,r.minDate,o.minDate),maxDate:Jn(n,r.maxDate,o.maxDate)})}const Bj=ie("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Nc,maxHeight:b$,boxSizing:"border-box",position:"relative"}),Ib=T.forwardRef(function(t,n){const o=jj(t,"MuiYearCalendar"),{autoFocus:r,className:i,value:a,defaultValue:l,referenceDate:d,disabled:u,disableFuture:f,disablePast:p,maxDate:y,minDate:w,onChange:b,readOnly:m,shouldDisableYear:v,onYearFocus:D,hasFocus:k,onFocusedViewChange:x,yearsOrder:S="asc",yearsPerRow:C,timezone:O,gridLabelId:I,slots:F,slotProps:z}=o,R=Ye(o,$j),{value:$,handleValueChange:K,timezone:G}=Bh({name:"YearCalendar",timezone:O,value:a,defaultValue:l,onChange:b,valueManager:Io}),q=Mc(G),Y=to(),H=Ft(),ae=T.useMemo(()=>Io.getInitialReferenceValue({value:$,utils:H,props:o,timezone:G,referenceDate:d,granularity:xo.year}),[]),A=o,M=Vj(A),L=T.useMemo(()=>H.getYear(q),[H,q]),B=T.useMemo(()=>$!=null?H.getYear($):null,[$,H]),[ne,oe]=T.useState(()=>B||H.getYear(ae)),[se,j]=ho({name:"YearCalendar",state:"hasFocus",controlled:k,default:r??!1}),ee=Te(ge=>{j(ge),x&&x(ge)}),J=T.useCallback(ge=>{if(p&&H.isBeforeYear(ge,q)||f&&H.isAfterYear(ge,q)||w&&H.isBeforeYear(ge,w)||y&&H.isAfterYear(ge,y))return!0;if(!v)return!1;const Re=H.startOfYear(ge);return v(Re)},[f,p,y,w,q,v,H]),te=Te((ge,Re)=>{if(m)return;const Ve=H.setYear($??ae,Re);K(Ve)}),ce=Te(ge=>{J(H.setYear($??ae,ge))||(oe(ge),ee(!0),D?.(ge))});T.useEffect(()=>{oe(ge=>B!==null&&ge!==B?B:ge)},[B]);const le=S!=="desc"?C*1:C*-1,he=Y&&S==="asc"||!Y&&S==="desc"?-1:1,W=Te((ge,Re)=>{switch(ge.key){case"ArrowUp":ce(Re-le),ge.preventDefault();break;case"ArrowDown":ce(Re+le),ge.preventDefault();break;case"ArrowLeft":ce(Re-he),ge.preventDefault();break;case"ArrowRight":ce(Re+he),ge.preventDefault();break}}),re=Te((ge,Re)=>{ce(Re)}),Z=Te((ge,Re)=>{ne===Re&&ee(!1)}),fe=T.useRef(null),pe=ct(n,fe);T.useEffect(()=>{if(r||fe.current===null)return;const ge=fe.current.querySelector('[tabindex="0"]');if(!ge)return;const Re=ge.offsetHeight,Ve=ge.offsetTop,Ne=fe.current.clientHeight,Je=fe.current.scrollTop,ke=Ve+Re;Re>Ne||Ve<Je||(fe.current.scrollTop=ke-Ne/2-Re/2)},[r]);const be=H.getYearRange([w,y]);return S==="desc"&&be.reverse(),E.jsx(Bj,Q({ref:pe,className:Se(M.root,i),ownerState:A,role:"radiogroup","aria-labelledby":I},R,{children:be.map(ge=>{const Re=H.getYear(ge),Ve=Re===B,Ne=u||J(ge);return E.jsx(Fj,{selected:Ve,value:Re,onClick:te,onKeyDown:W,autoFocus:se&&Re===ne,disabled:Ne,tabIndex:Re===ne&&!Ne?0:-1,onFocus:re,onBlur:Z,"aria-current":L===Re?"date":void 0,yearsPerRow:C,slots:F,slotProps:z,children:H.format(ge,"year")},H.format(ge,"year"))})}))});process.env.NODE_ENV!=="production"&&(Ib.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,onChange:s.func,onFocusedViewChange:s.func,onYearFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableYear:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Wj=e=>Me("MuiPickersCalendarHeader",e),Hj=Pe("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function zj(e){return Me("MuiPickersArrowSwitcher",e)}Pe("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const Yj=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],Uj=["ownerState"],qj=["ownerState"],Gj=ie("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Kj=ie("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Zm=ie(Us,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),Xj=e=>{const{classes:t}=e;return Ie({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},zj,t)},Zj=T.forwardRef(function(t,n){const o=to(),r=Nt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:l,slotProps:d,isNextDisabled:u,isNextHidden:f,onGoToNext:p,nextLabel:y,isPreviousDisabled:w,isPreviousHidden:b,onGoToPrevious:m,previousLabel:v,labelId:D}=r,k=Ye(r,Yj),x=r,S=Xj(x),C={isDisabled:u,isHidden:f,goTo:p,label:y},O={isDisabled:w,isHidden:b,goTo:m,label:v},I=l?.previousIconButton??Zm,F=pt({elementType:I,externalSlotProps:d?.previousIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"end",onClick:O.goTo},ownerState:Q({},x,{hidden:O.isHidden}),className:Se(S.button,S.previousIconButton)}),z=l?.nextIconButton??Zm,R=pt({elementType:z,externalSlotProps:d?.nextIconButton,additionalProps:{size:"medium",title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:"start",onClick:C.goTo},ownerState:Q({},x,{hidden:C.isHidden}),className:Se(S.button,S.nextIconButton)}),$=l?.leftArrowIcon??N$,K=pt({elementType:$,externalSlotProps:d?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:S.leftArrowIcon}),G=Ye(K,Uj),q=l?.rightArrowIcon??A$,Y=pt({elementType:q,externalSlotProps:d?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:S.rightArrowIcon}),H=Ye(Y,qj);return E.jsxs(Gj,Q({ref:n,className:Se(S.root,a),ownerState:x},k,{children:[E.jsx(I,Q({},F,{children:o?E.jsx(q,Q({},H)):E.jsx($,Q({},G))})),i?E.jsx(bn,{variant:"subtitle1",component:"span",id:D,children:i}):E.jsx(Kj,{className:S.spacer,ownerState:x}),E.jsx(z,Q({},R,{children:o?E.jsx($,Q({},G)):E.jsx(q,Q({},H))}))]}))});function Qj(e,{disableFuture:t,maxDate:n,timezone:o}){const r=Ft();return T.useMemo(()=>{const i=r.date(void 0,o),a=r.startOfMonth(t&&r.isBefore(i,n)?i:n);return!r.isAfter(a,e)},[t,n,e,r,o])}function Jj(e,{disablePast:t,minDate:n,timezone:o}){const r=Ft();return T.useMemo(()=>{const i=r.date(void 0,o),a=r.startOfMonth(t&&r.isAfter(i,n)?i:n);return!r.isBefore(a,e)},[t,n,e,r,o])}const eB=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],tB=["ownerState"],nB=e=>{const{classes:t}=e;return Ie({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Wj,t)},oB=ie("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),rB=ie("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>Q({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),sB=ie("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),iB=ie(Us,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${Hj.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),aB=ie(I$,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),Nb=T.forwardRef(function(t,n){const o=lr(),r=Ft(),i=Nt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:l,currentMonth:d,disabled:u,disableFuture:f,disablePast:p,maxDate:y,minDate:w,onMonthChange:b,onViewChange:m,view:v,reduceAnimations:D,views:k,labelId:x,className:S,timezone:C,format:O=`${r.formats.month} ${r.formats.year}`}=i,I=Ye(i,eB),F=i,z=nB(i),R=a?.switchViewButton??iB,$=pt({elementType:R,externalSlotProps:l?.switchViewButton,additionalProps:{size:"small","aria-label":o.calendarViewSwitchingButtonAriaLabel(v)},ownerState:F,className:z.switchViewButton}),K=a?.switchViewIcon??aB,G=pt({elementType:K,externalSlotProps:l?.switchViewIcon,ownerState:F,className:z.switchViewIcon}),q=Ye(G,tB),Y=()=>b(r.addMonths(d,1),"left"),H=()=>b(r.addMonths(d,-1),"right"),ae=Qj(d,{disableFuture:f,maxDate:y,timezone:C}),A=Jj(d,{disablePast:p,minDate:w,timezone:C}),M=()=>{if(!(k.length===1||!m||u))if(k.length===2)m(k.find(B=>B!==v)||k[0]);else{const B=k.indexOf(v)!==0?0:1;m(k[B])}};if(k.length===1&&k[0]==="year")return null;const L=r.formatByString(d,O);return E.jsxs(oB,Q({},I,{ownerState:F,className:Se(z.root,S),ref:n,children:[E.jsxs(rB,{role:"presentation",onClick:M,ownerState:F,"aria-live":"polite",className:z.labelContainer,children:[E.jsx(kb,{reduceAnimations:D,transKey:L,children:E.jsx(sB,{id:x,ownerState:F,className:z.label,children:L})}),k.length>1&&!u&&E.jsx(R,Q({},$,{children:E.jsx(K,Q({},q))}))]}),E.jsx(Gr,{in:v==="day",children:E.jsx(Zj,{slots:a,slotProps:l,onGoToPrevious:H,isPreviousDisabled:A,previousLabel:o.previousMonth,onGoToNext:Y,isNextDisabled:ae,nextLabel:o.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(Nb.propTypes={classes:s.object,className:s.string,currentMonth:s.object.isRequired,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,format:s.string,labelId:s.string,maxDate:s.object.isRequired,minDate:s.object.isRequired,onMonthChange:s.func.isRequired,onViewChange:s.func,reduceAnimations:s.bool.isRequired,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string.isRequired,view:s.oneOf(["day","month","year"]).isRequired,views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired).isRequired});const lB=ie("div")({overflow:"hidden",width:Nc,maxHeight:Wh,display:"flex",flexDirection:"column",margin:"0 auto"}),cB=e=>Me("MuiDateCalendar",e);Pe("MuiDateCalendar",["root","viewTransitionContainer"]);const dB=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],uB=e=>{const{classes:t}=e;return Ie({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},cB,t)};function hB(e,t){const n=Ft(),o=_a(),r=hb(),i=Nt({props:e,name:t});return Q({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??r,renderLoading:i.renderLoading??(()=>E.jsx("span",{children:"..."})),minDate:Jn(n,i.minDate,o.minDate),maxDate:Jn(n,i.maxDate,o.maxDate)})}const fB=ie(lB,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Wh}),pB=ie(kb,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Ab=T.forwardRef(function(t,n){const o=Ft(),r=sr(),i=hB(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:l,value:d,defaultValue:u,referenceDate:f,disableFuture:p,disablePast:y,onChange:w,onYearChange:b,onMonthChange:m,reduceAnimations:v,shouldDisableDate:D,shouldDisableMonth:k,shouldDisableYear:x,view:S,views:C,openTo:O,className:I,disabled:F,readOnly:z,minDate:R,maxDate:$,disableHighlightToday:K,focusedView:G,onFocusedViewChange:q,showDaysOutsideCurrentMonth:Y,fixedWeekNumber:H,dayOfWeekFormatter:ae,slots:A,slotProps:M,loading:L,renderLoading:B,displayWeekNumber:ne,yearsOrder:oe,yearsPerRow:se,monthsPerRow:j,timezone:ee}=i,J=Ye(i,dB),{value:te,handleValueChange:ce,timezone:le}=Bh({name:"DateCalendar",timezone:ee,value:d,defaultValue:u,onChange:w,valueManager:Io}),{view:he,setView:W,focusedView:re,setFocusedView:Z,goToNextView:fe,setValueAndGoToNextView:pe}=fb({view:S,views:C,openTo:O,onChange:ce,onViewChange:l,autoFocus:a,focusedView:G,onFocusedViewChange:q}),{referenceDate:be,calendarState:ge,changeFocusedDay:Re,changeMonth:Ve,handleChangeMonth:Ne,isDateDisabled:Je,onMonthSwitchingAnimationEnd:ke}=zV({value:te,referenceDate:f,reduceAnimations:v,onMonthChange:m,minDate:R,maxDate:$,shouldDisableDate:D,disablePast:y,disableFuture:p,timezone:le}),ut=F&&te||R,Yt=F&&te||$,rt=`${r}-grid-label`,Ot=re!==null,Ut=A?.calendarHeader??Nb,Lt=pt({elementType:Ut,externalSlotProps:M?.calendarHeader,additionalProps:{views:C,view:he,currentMonth:ge.currentMonth,onViewChange:W,onMonthChange:(at,Zt)=>Ne({newMonth:at,direction:Zt}),minDate:ut,maxDate:Yt,disabled:F,disablePast:y,disableFuture:p,reduceAnimations:v,timezone:le,labelId:rt},ownerState:i}),Ue=Te(at=>{const Zt=o.startOfMonth(at),pn=o.endOfMonth(at),Qt=Je(at)?Fi({utils:o,date:at,minDate:o.isBefore(R,Zt)?Zt:R,maxDate:o.isAfter($,pn)?pn:$,disablePast:y,disableFuture:p,isDateDisabled:Je,timezone:le}):at;Qt?(pe(Qt,"finish"),m?.(Zt)):(fe(),Ve(Zt)),Re(Qt,!0)}),Be=Te(at=>{const Zt=o.startOfYear(at),pn=o.endOfYear(at),Qt=Je(at)?Fi({utils:o,date:at,minDate:o.isBefore(R,Zt)?Zt:R,maxDate:o.isAfter($,pn)?pn:$,disablePast:y,disableFuture:p,isDateDisabled:Je,timezone:le}):at;Qt?(pe(Qt,"finish"),b?.(Qt)):(fe(),Ve(Zt)),Re(Qt,!0)}),rn=Te(at=>ce(at&&Ll(o,at,te??be),"finish",he));T.useEffect(()=>{te!=null&&o.isValid(te)&&Ve(te)},[te]);const dn=i,Oe=uB(dn),We={disablePast:y,disableFuture:p,maxDate:$,minDate:R},ht={disableHighlightToday:K,readOnly:z,disabled:F,timezone:le,gridLabelId:rt,slots:A,slotProps:M},nn=T.useRef(he);T.useEffect(()=>{nn.current!==he&&(re===nn.current&&Z(he,!0),nn.current=he)},[re,Z,he]);const An=T.useMemo(()=>[te],[te]);return E.jsxs(fB,Q({ref:n,className:Se(Oe.root,I),ownerState:dn},J,{children:[E.jsx(Ut,Q({},Lt,{slots:A,slotProps:M})),E.jsx(pB,{reduceAnimations:v,className:Oe.viewTransitionContainer,transKey:he,ownerState:dn,children:E.jsxs("div",{children:[he==="year"&&E.jsx(Ib,Q({},We,ht,{value:te,onChange:Be,shouldDisableYear:x,hasFocus:Ot,onFocusedViewChange:at=>Z("year",at),yearsOrder:oe,yearsPerRow:se,referenceDate:be})),he==="month"&&E.jsx(Mb,Q({},We,ht,{hasFocus:Ot,className:I,value:te,onChange:Ue,shouldDisableMonth:k,onFocusedViewChange:at=>Z("month",at),monthsPerRow:j,referenceDate:be})),he==="day"&&E.jsx(bj,Q({},ge,We,ht,{onMonthSwitchingAnimationEnd:ke,onFocusedDayChange:Re,reduceAnimations:v,selectedDays:An,onSelectedDaysChange:rn,shouldDisableDate:D,shouldDisableMonth:k,shouldDisableYear:x,hasFocus:Ot,onFocusedViewChange:at=>Z("day",at),showDaysOutsideCurrentMonth:Y,fixedWeekNumber:H,dayOfWeekFormatter:ae,displayWeekNumber:ne,loading:L,renderLoading:B}))]})})]}))});process.env.NODE_ENV!=="production"&&(Ab.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,fixedWeekNumber:s.number,focusedView:s.oneOf(["day","month","year"]),loading:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthChange:s.func,onViewChange:s.func,onYearChange:s.func,openTo:s.oneOf(["day","month","year"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Os=({view:e,onViewChange:t,views:n,focusedView:o,onFocusedViewChange:r,value:i,defaultValue:a,referenceDate:l,onChange:d,className:u,classes:f,disableFuture:p,disablePast:y,minDate:w,maxDate:b,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:D,reduceAnimations:k,onMonthChange:x,monthsPerRow:S,onYearChange:C,yearsOrder:O,yearsPerRow:I,slots:F,slotProps:z,loading:R,renderLoading:$,disableHighlightToday:K,readOnly:G,disabled:q,showDaysOutsideCurrentMonth:Y,dayOfWeekFormatter:H,sx:ae,autoFocus:A,fixedWeekNumber:M,displayWeekNumber:L,timezone:B})=>E.jsx(Ab,{view:e,onViewChange:t,views:n.filter(Fm),focusedView:o&&Fm(o)?o:null,onFocusedViewChange:r,value:i,defaultValue:a,referenceDate:l,onChange:d,className:u,classes:f,disableFuture:p,disablePast:y,minDate:w,maxDate:b,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:D,reduceAnimations:k,onMonthChange:x,monthsPerRow:S,onYearChange:C,yearsOrder:O,yearsPerRow:I,slots:F,slotProps:z,loading:R,renderLoading:$,disableHighlightToday:K,readOnly:G,disabled:q,showDaysOutsideCurrentMonth:Y,dayOfWeekFormatter:H,sx:ae,autoFocus:A,fixedWeekNumber:M,displayWeekNumber:L,timezone:B}),Fb=T.forwardRef(function(t,n){const o=lr(),r=Ft(),i=lb(t,"MuiDesktopDatePicker"),a=Q({day:Os,month:Os,year:Os},i.viewRenderers),l=Q({},i,{viewRenderers:a,format:Fh(r,i,!1),yearsPerRow:i.yearsPerRow??4,slots:Q({openPickerIcon:F$,field:Gh},i.slots),slotProps:Q({},i.slotProps,{field:u=>Q({},oc(i.slotProps?.field,u),db(i),{ref:n}),toolbar:Q({hidden:!0},i.slotProps?.toolbar)})}),{renderPicker:d}=M$({props:l,valueManager:Io,valueType:"date",getOpenDialogAriaText:sb({utils:r,formatKey:"fullDate",contextTranslation:o.openDatePickerDialogue,propsTranslation:l.localeText?.openDatePickerDialogue}),validator:xa});return d()});Fb.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:zt,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const mB=ie(Gu)({[`& .${Ii.container}`]:{outline:0},[`& .${Ii.paper}`]:{outline:0,minWidth:Nc}}),gB=ie(Xu)({"&:first-of-type":{padding:0}});function yB(e){const{children:t,onDismiss:n,open:o,slots:r,slotProps:i}=e,a=r?.dialog??mB,l=r?.mobileTransition??Gr;return E.jsx(a,Q({open:o,onClose:n},i?.dialog,{TransitionComponent:l,TransitionProps:i?.mobileTransition,PaperComponent:r?.mobilePaper,PaperProps:i?.mobilePaper,children:E.jsx(gB,{children:t})}))}const vB=["props","getOpenDialogAriaText"],bB=e=>{let{props:t,getOpenDialogAriaText:n}=e,o=Ye(e,vB);const{slots:r,slotProps:i,className:a,sx:l,format:d,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:y,timezone:w,name:b,label:m,inputRef:v,readOnly:D,disabled:k,localeText:x}=t,S=T.useRef(null),C=sr(),O=i?.toolbar?.hidden??!1,{open:I,actions:F,layoutProps:z,renderCurrentView:R,fieldProps:$,contextValue:K}=pb(Q({},o,{props:t,fieldRef:S,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),G=r.field,q=pt({elementType:G,externalSlotProps:i?.field,additionalProps:Q({},$,O&&{id:C},!(k||D)&&{onClick:F.onOpen,onKeyDown:KL(F.onOpen)},{readOnly:D??!0,disabled:k,className:a,sx:l,format:d,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:y,timezone:w,label:m,name:b},v?{inputRef:v}:{}),ownerState:t});q.inputProps=Q({},q.inputProps,{"aria-label":n($.value)});const Y=Q({textField:r.textField},q.slots),H=r.layout??Hh;let ae=C;O&&(m?ae=`${C}-label`:ae=void 0);const A=Q({},i,{toolbar:Q({},i?.toolbar,{titleId:C}),mobilePaper:Q({"aria-labelledby":ae},i?.mobilePaper)}),M=ct(S,q.unstableFieldRef);return{renderPicker:()=>E.jsxs(vb,{contextValue:K,localeText:x,children:[E.jsx(G,Q({},q,{slots:Y,slotProps:A,unstableFieldRef:M})),E.jsx(yB,Q({},F,{open:I,slots:r,slotProps:A,children:E.jsx(H,Q({},z,A?.layout,{slots:r,slotProps:A,children:R()}))}))]})}},Lb=T.forwardRef(function(t,n){const o=lr(),r=Ft(),i=lb(t,"MuiMobileDatePicker"),a=Q({day:Os,month:Os,year:Os},i.viewRenderers),l=Q({},i,{viewRenderers:a,format:Fh(r,i,!1),slots:Q({field:Gh},i.slots),slotProps:Q({},i.slotProps,{field:u=>Q({},oc(i.slotProps?.field,u),db(i),{ref:n}),toolbar:Q({hidden:!1},i.slotProps?.toolbar)})}),{renderPicker:d}=bB({props:l,valueManager:Io,valueType:"date",getOpenDialogAriaText:sb({utils:r,formatKey:"fullDate",contextTranslation:o.openDatePickerDialogue,propsTranslation:l.localeText?.openDatePickerDialogue}),validator:xa});return d()});Lb.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:zt,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const wB=["desktopModeMediaQuery"],Vl=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=XL}=o,i=Ye(o,wB);return Fg(r,{defaultMatches:!0})?E.jsx(Fb,Q({ref:n},i)):E.jsx(Lb,Q({ref:n},i))});process.env.NODE_ENV!=="production"&&(Vl.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,desktopModeMediaQuery:s.string,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:zt,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const bu=ie(oo)({"& label[data-shrink=false]":{top:"-5px",fontSize:"14px"},"& .MuiOutlinedInput-root":{height:"40px"}}),CB=({setValue:e,value:t})=>{function n(r){const i=r?.format(Yr.db)||"",a={...t,1:i===pu?js[1]:i};e(a),rr(a)}function o(r){const i=r?.format(Yr.db)||"",a={...t,2:i===pu?js[2]:i};e(a),rr(a)}return E.jsxs(Oc,{dateAdapter:Qv,children:[E.jsx(bu,{children:E.jsx(Vl,{label:lo.from,onChange:n,...yu(t[1])})}),E.jsx(bu,{children:E.jsx(Vl,{label:lo.to,onChange:o,...yu(t[2])})})]})},Bd=({label:e,setValue:t,value:n})=>{function o(r){const i=r?.format(Yr.db)||"",a={...n,1:i===pu?js[1]:i};t(a),rr(a)}return E.jsx(Oc,{dateAdapter:Qv,children:E.jsx(bu,{children:E.jsx(Vl,{label:e,onChange:o,...yu(n[1])})})})},Qm={label:"",options:[]};function SB(){const{columnId:e,table:t}=Rn,n=t?.grid;if(!n)return Qm;const o=n?.getColumns().find(({id:p})=>p===e);if(!o)return Qm;const r=o.name,i=[],{formatter:a,id:l}=o,d=n.getData(),u=new Set;d.getItems().forEach(p=>{u.add(a?a(0,0,p[l],o,null,n):p[l])});for(const p of u)i.push(p);return{label:r,options:i}}function _B(e,t){return typeof e=="string"&&typeof t=="string"?e.localeCompare(t):typeof e=="number"&&typeof t=="number"?e-t:0}const xB=ie(fc)({padding:0}),Jm={Checkbox:xB},RB=({setValue:e,value:t})=>{const n=JSON.parse(t[1]||'["All"]'),{label:o,options:r}=SB(),i=a=>{const l=a.target.value;let d;l[l.length-1]==="All"||!l.length?d={1:"",2:""}:(l.length>1&&l[0]==="All"&&l.shift(),d={...t,1:JSON.stringify(l)}),e(d),rr(d)};return E.jsxs(pa,{size:"small",children:[E.jsx(ma,{id:"column-filter-multiple-select-label",children:o}),E.jsxs(ga,{labelId:"column-filter-multiple-select-label",id:"column-filter-multiple-select",multiple:!0,value:n,onChange:i,input:E.jsx($s,{label:o}),renderValue:a=>a.join(", "),children:[E.jsxs(Pl,{value:"All",children:[E.jsx(Jm.Checkbox,{checked:n.indexOf("All")>-1}),E.jsx(ou,{primary:"All"})]},0),r.sort(_B).map(a=>E.jsxs(Pl,{value:a,children:[E.jsx(Jm.Checkbox,{checked:n.indexOf(a)>-1}),E.jsx(ou,{primary:a})]},a))]})]})},TB=({setValue:e,value:t})=>{function n(r){const i={...t,1:r.target.value};e(i),rr(i)}function o(r){const i={...t,2:r.target.value};e(i),rr(i)}return E.jsxs(Fe.Fragment,{children:[E.jsx(Vs,{label:lo.from,value:t[1],type:"number",onChange:n,size:"small",autoComplete:"off"}),E.jsx(Vs,{label:lo.to,value:t[2],type:"number",onChange:o,size:"small",autoComplete:"off"})]})},Wd=({label:e,setValue:t,value:n})=>{function o(r){const i={...n,1:r.target.value};t(i),rr(i)}return E.jsx(Vs,{label:e,value:n[1],type:"number",onChange:o,size:"small",autoComplete:"off"})},rl=({setValue:e,value:t})=>{function n(o){const r={...t,1:o.target.value};e(r),rr(r)}return E.jsx(Vs,{label:lo.filter,value:t[1],onChange:n,size:"small",autoComplete:"off"})},kB=({filterId:e,setValue:t,value:n})=>E.jsxs(Fe.Fragment,{children:[e===je.Boolean&&E.jsx(nL,{setValue:t,value:n}),e===je.TextEqual&&E.jsx(rl,{setValue:t,value:n}),e===je.TextNotEqual&&E.jsx(rl,{setValue:t,value:n}),e===je.TextContain&&E.jsx(rl,{setValue:t,value:n}),e===je.TextNotContain&&E.jsx(rl,{setValue:t,value:n}),e===je.MultipleSelect&&E.jsx(RB,{setValue:t,value:n}),e===je.NumberEqual&&E.jsx(Wd,{label:lo.filter,setValue:t,value:n}),e===je.NumberFrom&&E.jsx(Wd,{label:lo.from,setValue:t,value:n}),e===je.NumberTo&&E.jsx(Wd,{label:lo.to,setValue:t,value:n}),e===je.NumberBetween&&E.jsx(TB,{setValue:t,value:n}),e===je.DateEqual&&E.jsx(Bd,{label:lo.filter,setValue:t,value:n}),e===je.DateFrom&&E.jsx(Bd,{label:lo.from,setValue:t,value:n}),e===je.DateTo&&E.jsx(Bd,{label:lo.to,setValue:t,value:n}),e===je.DateBetween&&E.jsx(CB,{setValue:t,value:n})]}),EB=ie(Pl)({fontSize:"12px"}),eg={MenuItem:EB},PB=({name:e,list:t,onChange:n,defaultValue:o,value:r,showSelect:i=!0,dataTestId:a,width:l="12.8em",height:d,disabled:u=!1})=>E.jsxs(pa,{variant:"outlined",size:"small",children:[E.jsx(ma,{id:"reportType",children:e}),E.jsxs(ga,{labelId:"reportType",id:e,label:e,autoWidth:!0,value:`${r??(o||0)}`,defaultValue:`${o||0}`,onChange:n,disabled:u,"data-testid":a,MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},disableScrollLock:!0},sx:{height:d,width:l},children:[i&&E.jsx(eg.MenuItem,{value:0,id:"Select",children:"Select"}),t.map((f,p)=>E.jsx(eg.MenuItem,{value:f.id,id:"selectedReport",disabled:f.isDisabled,children:f.labelForSelect||f.name},p))]})]}),DB={id:je.DateBetween,name:"Between"},OB={id:je.DateEqual,name:"Equal"},MB={id:je.DateFrom,name:"From"},IB={id:je.DateTo,name:"To"},NB={id:je.NumberBetween,name:"Between"},AB={id:je.NumberEqual,name:"Equal"},FB={id:je.NumberFrom,name:"From"},LB={id:je.NumberTo,name:"To"},$B={id:je.TextContain,name:"Contains"},VB={id:je.TextEqual,name:"Equal"},jB={id:je.TextNotContain,name:"Does not contain"},BB={id:je.TextNotEqual,name:"Not equal"},tg=[AB,FB,LB,NB],WB={[hn.Boolean]:[],[hn.Date]:[OB,MB,IB,DB],[hn.MultipleSelect]:[],[hn.Number]:tg,[hn.NumberFormatted]:tg,[hn.Text]:[$B,jB,VB,BB]},HB=({filterId:e,setFilterId:t})=>{const n=WB[Rn.group],o=n.some(({id:i})=>i===e)?e:n[0]?.id;function r(i){const{columnId:a,table:l}=Rn;if(!a||!l)return;const d=l.filter.args,u=i.target.value;d.columnFilters&&(l.filter.args={...d,columnFilters:{...d.columnFilters,[a]:{...d.columnFilters[a],filterId:u}}},t(u))}return o?E.jsx(PB,{name:"",list:n,onChange:r,width:"100%",showSelect:!1,value:o}):null},zB=ie(oo)({display:"flex",flexDirection:"column",rowGap:"0.5em",width:"12em"}),YB={Wrapper:zB},UB=()=>{const[e,t]=Fe.useState(js),[n,o]=Fe.useState(je.TextContain),[r,i]=Fe.useState(!1);return XF(i),KF(r,o,t),r?E.jsxs(Fe.Fragment,{children:[E.jsx(Ih,{setIsOpened:i}),E.jsx(Nh,{id:Zv,children:E.jsxs(YB.Wrapper,{children:[E.jsx(HB,{filterId:n,setFilterId:o}),E.jsx(kB,{filterId:n,setValue:t,value:e}),E.jsx(JF,{setIsOpened:i,setValue:t,value:e})]})})]}):null},$b="context_menu";function qB(e){Fe.useEffect(()=>{function t(){e(!0),setTimeout(()=>{const n=document.getElementById($b);if(!n)return;const{x:o,y:r}=wn;Mh(n,o,r)},0)}return wn.subscribe(t),()=>{wn.unsubscribe(t)}},[])}const GB=ie("ul")({display:"flex",flexDirection:"column",rowGap:"0.5em",margin:"0",paddingLeft:"0.5em"}),KB=ie("li")({display:"flex",alignItems:"center",columnGap:"0.5em",cursor:"pointer","&:hover":{scale:"1.05"}}),XB=ie("span")({backgroundColor:"#1E456F"}),cn={Ul:GB,Li:KB,Icon:XB},ZB=({clientId:e,clientName:t,setIsOpened:n})=>{const o=()=>{const r=wn.table,i=r?.grid;if(!r||!i){n(!1);return}r.downloadManager.download(r,e,t),n(!1)};return E.jsxs(cn.Li,{onClick:o,children:[E.jsx(cn.Icon,{className:"sgi sgi-download"}),"Download as CSV"]})},QB=({setIsOpened:e})=>{const t=wn.table;function n(){t&&(t.grouping={isGrouped:!0},e(!1))}return t?.grouping.isGrouped!==!1?null:E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-link"}),"Group"]})};function JB(e){return e?Object.values(e.filter.args.columnFilters||{}).some(({value:t})=>t[1]||t[2]):!1}const eW=({setIsOpened:e})=>{const t=wn.table;function n(){if(!t){e(!1);return}const o=t.filter.args;delete o.columnFilters,t.filter.args=o,or.highlightAllColumns(o,t.id),e(!1)}return JB(t)?E.jsxs(Fe.Fragment,{children:[E.jsx(El,{}),E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-notification-clear-all"}),"Reset column filters"]})]}):null},tW=({setIsOpened:e})=>{const t=wn.table,o=t?.grid?.getSelectedRows();function r(){t&&(e(!1),Uo.table=t,Uo.open=!0)}return!t?.summaryColumnIds.length||Number(o?.length)<2?null:E.jsxs(cn.Li,{onClick:r,children:[E.jsx(cn.Icon,{className:"sgi sgi-checkbox-multiple-outline"}),"Summary"]})},nW=({setIsOpened:e})=>{const t=wn.table;function n(){t&&(t.grouping={isGrouped:!1},e(!1))}return t?.grouping.isGrouped?E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-link-off"}),"Ungroup"]}):null},oW=({setIsOpened:e})=>{const t=wn.table;function n(){const o=t?.grid;if(!o)return;o.getData().collapseAllGroups(),e(!1)}return t?.grouping.isGrouped?E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-collapse-all-outline"}),"Collapse all groups"]}):null},rW=({setIsOpened:e})=>{function t(){const n=wn.table,o=n?.grid;if(!o||!n){e(!1);return}window.navigator.clipboard.writeText(n.downloadManager.createCSV(n)).then(()=>{}).catch(()=>{}),o.getSelectionModel()&&o.setSelectedRows([]),e(!1)}return E.jsxs(cn.Li,{onClick:t,children:[E.jsx(cn.Icon,{className:"sgi sgi-content-copy"}),"Copy to clipboard"]})},sW=({setIsOpened:e})=>{const t=wn.table;function n(){const o=t?.grid;if(!o)return;o.getData().expandAllGroups(),e(!1)}return t?.grouping.isGrouped?E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-expand-all-outline"}),"Expand all groups"]}):null},iW=({clientId:e,clientName:t,setIsOpened:n})=>{function o(){const r=wn.table;r?.printer.print(r,e,t),n(!1)}return E.jsxs(cn.Li,{onClick:o,children:[E.jsx(cn.Icon,{className:"sgi sgi-printer"}),"Print"]})},aW=({clientId:e,clientName:t})=>{const[n,o]=Fe.useState(!1);return qB(o),n?E.jsxs(Fe.Fragment,{children:[E.jsx(Ih,{setIsOpened:o}),E.jsx(Nh,{id:$b,children:E.jsxs(cn.Ul,{children:[E.jsx(iW,{clientId:e,clientName:t,setIsOpened:o}),E.jsx(rW,{setIsOpened:o}),E.jsx(ZB,{clientId:e,clientName:t,setIsOpened:o}),E.jsx(eW,{setIsOpened:o}),E.jsx(nW,{setIsOpened:o}),E.jsx(QB,{setIsOpened:o}),E.jsx(sW,{setIsOpened:o}),E.jsx(oW,{setIsOpened:o}),E.jsx(tW,{setIsOpened:o})]})})]}):null},Vb="header-context-menu";function lW(e){Fe.useEffect(()=>{function t(){e(!0),setTimeout(()=>{const n=document.getElementById(Vb);if(!n)return;const{x:o,y:r}=uo;Mh(n,o,r)},0)}return uo.subscribe(t),()=>{uo.unsubscribe(t)}},[])}function Kh(e){const t=uo.table;if(!t?.columnPicker)return;t.columnPicker.visibleColumnIds=[...e];const n=t.grid;if(!n)return;n.setColumns(t.columnPicker.initialColumns.filter(({id:r})=>e.includes(r)));const o=t.filter.args;t.filter.register(n,t.id),or.highlightAllColumns(o,t.id),t.totalCalculator?.calculate(n)}const cW=({setChecked:e})=>{function t(){const n=uo.table;if(!n?.columnPicker)return;const o=n.columnPicker.initialColumns.map(({id:r})=>r);e(o),Kh(o)}return E.jsx(ko,{onClick:t,size:"small",sx:{textTransform:"none"},variant:"contained",children:"Check all"})},dW=({checked:e,setChecked:t})=>{function n(){const o=e.filter(r=>r==="_checkbox_selector"||r==="isEdited");t(o),Kh(o)}return E.jsx(ko,{onClick:n,size:"small",sx:{textTransform:"none"},variant:"contained",children:"Uncheck all"})},uW=ie(ko)({display:"flex",alignItems:"center",justifyContent:"flex-start",columnGap:"0.5em",textTransform:"none",color:"#1E456F",padding:"0"}),hW=ie(fc)({padding:0}),ng={Checkbox:hW,Button:uW},fW=({checked:e,columnId:t,columnName:n,setChecked:o})=>{function r(){const i=e.indexOf(t),a=[...e];~i?a.splice(i,1):a.push(t),o(a),Kh(a)}return E.jsxs(ng.Button,{onClick:r,children:[E.jsx(ng.Checkbox,{checked:e.includes(t),size:"small"}),E.jsx(oo,{children:n})]})},pW=ie(oo)({color:"#1e456f",marginBottom:"0.6em",fontSize:"1rem"}),mW={Wrapper:pW},gW=()=>E.jsx(mW.Wrapper,{className:"header-context-menu-header",children:"Columns"}),yW=ie(oo)({columnGap:"0.5em",display:"flex",justifyContent:"flex-end",marginTop:"0.5em"}),vW=ie(oo)({maxHeight:"35em",overflowY:"auto"}),og={ButtonsGroup:yW,ItemsGroup:vW},bW=()=>{const[e,t]=Fe.useState([]),[n,o]=Fe.useState(!1);if(lW(o),Fe.useEffect(()=>{if(!n)return;const i=uo.table;i?.columnPicker&&t([...i.columnPicker.visibleColumnIds])},[n]),!n)return null;const r=uo.table;return r?.columnPicker?E.jsxs(Fe.Fragment,{children:[E.jsx(Ih,{setIsOpened:o}),E.jsxs(Nh,{id:Vb,children:[E.jsx(gW,{}),E.jsx(og.ItemsGroup,{children:r.columnPicker.initialColumns.filter(({id:i})=>i!=="_checkbox_selector"&&i!=="isEdited").map(({id:i,name:a})=>E.jsx(Fe.Fragment,{children:E.jsx(fW,{checked:e,columnId:i,columnName:a,setChecked:t})},i))}),E.jsxs(og.ButtonsGroup,{className:"header-context-menu-footer",children:[E.jsx(cW,{setChecked:t}),E.jsx(dW,{checked:e,setChecked:t})]})]})]}):null};exports.Autocomplete=wF;exports.ColumnFilters=UB;exports.ColumnPicker=DD;exports.ColumnSorter=Kv;exports.ContextMenu=aW;exports.DecoratorColumnFilter=XA;exports.DecoratorFilter=Nv;exports.DefaultHotKeys=ID;exports.DefaultPrinter=Wv;exports.DeletedRowsFilter=VN;exports.EColumnFilter=je;exports.EColumnFiltersGroup=hn;exports.ESortType=Co;exports.FORMATTER_NUMBER=TF;exports.Filter=Iv;exports.HeaderContextMenu=bW;exports.HotKeysDecorator=mc;exports.PopupSummary=WF;exports.PreventCopying=ND;exports.RedoUndoOnly=AD;exports.Skeleton=TD;exports.SlickTable=nF;exports.SlickgridTable=HA;exports.TotalCalculator=IF;exports.WithSummary=$N;exports.WithoutHotKeys=By;exports.columnCheckboxSelector=zA;exports.columnIsEdited=UA;exports.commitCurrentEdit=Th;exports.copySelectedRows=zv;exports.formatNumber=Oh;exports.formatterGroupTotals=kF;exports.getDisplayedRows=Ec;exports.getFormatterNumber=Gv;exports.getNextId=Fl;exports.handleHeaderButtons=Av;exports.headerButtons=or;exports.hotKeysCopy=Eh;exports.hotKeysDelete=Hv;exports.hotKeysRedo=Ph;exports.hotKeysUndo=Dh;exports.openColumnFilter=BN;exports.openContextMenu=Yv;exports.useListenIfTablesWereEdited=pF;
365
+ `))},[JSON.stringify(p)]));const w=Ft(),b=Qr(),{isOpen:m,setIsOpen:v}=c$(e),{timezone:D,value:k,handleValueChange:x}=jh({timezone:f,value:l,defaultValue:p,onChange:a,valueManager:t}),[S,C]=T.useState(()=>{let j;return k!==void 0?j=k:p!==void 0?j=p:j=t.emptyValue,{draft:j,lastPublishedValue:j,lastCommittedValue:j,lastControlledValue:k,hasBeenModifiedSinceMount:!1}}),{getValidationErrorForNewValue:O}=ub({props:e,validator:r,timezone:D,value:S.draft,onError:e.onError}),I=Te(j=>{const ee={action:j,dateState:S,hasChanged:W=>!t.areValuesEqual(w,j.value,W),isControlled:y,closeOnSelect:u},J=d$(ee),te=u$(ee),ce=h$(ee);C(W=>Q({},W,{draft:j.value,lastPublishedValue:J?j.value:W.lastPublishedValue,lastCommittedValue:te?j.value:W.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let le=null;const he=()=>(le||(le={validationError:j.name==="setValueFromField"?j.context.validationError:O(j.value)},j.name==="setValueFromShortcut"&&(le.shortcut=j.shortcut)),le);J&&x(j.value,he()),te&&i&&i(j.value,he()),ce&&v(!1)});if(k!==void 0&&(S.lastControlledValue===void 0||!t.areValuesEqual(w,S.lastControlledValue,k))){const j=t.areValuesEqual(w,S.draft,k);C(ee=>Q({},ee,{lastControlledValue:k},j?{}:{lastCommittedValue:k,lastPublishedValue:k,draft:k,hasBeenModifiedSinceMount:!0}))}const F=Te(()=>{I({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),z=Te(()=>{I({value:S.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),R=Te(()=>{I({value:S.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),$=Te(()=>{I({value:S.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),K=Te(()=>{I({value:t.getTodayValue(w,D,n),name:"setValueFromAction",pickerAction:"today"})}),G=Te(j=>{j.preventDefault(),v(!0)}),q=Te(j=>{j?.preventDefault(),v(!1)}),Y=Te((j,ee="partial")=>I({name:"setValueFromView",value:j,selectionState:ee})),H=Te((j,ee,J)=>I({name:"setValueFromShortcut",value:j,changeImportance:ee,shortcut:J})),ae=Te((j,ee)=>I({name:"setValueFromField",value:j,context:ee})),A={onClear:F,onAccept:z,onDismiss:R,onCancel:$,onSetToday:K,onOpen:G,onClose:q},M={value:S.draft,onChange:ae},L=T.useMemo(()=>t.cleanValue(w,S.draft),[w,t,S.draft]),B={value:L,onChange:Y,onClose:q,open:m},oe=Q({},A,{value:L,onChange:Y,onSelectShortcut:H,isValid:j=>{const ee=r({adapter:b,value:j,timezone:D,props:e});return!t.hasError(ee)}}),se=T.useMemo(()=>({onOpen:G,onClose:q,open:m}),[m,q,G]);return{open:m,fieldProps:M,viewProps:B,layoutProps:oe,actions:A,contextValue:se}};let jd=!1;function fb({onChange:e,onViewChange:t,openTo:n,view:o,views:r,autoFocus:i,focusedView:a,onFocusedViewChange:l}){process.env.NODE_ENV!=="production"&&(jd||(o!=null&&!r.includes(o)&&(console.warn(`MUI X: \`view="${o}"\` is not a valid prop.`,`It must be an element of \`views=["${r.join('", "')}"]\`.`),jd=!0),o==null&&n!=null&&!r.includes(n)&&(console.warn(`MUI X: \`openTo="${n}"\` is not a valid prop.`,`It must be an element of \`views=["${r.join('", "')}"]\`.`),jd=!0)));const d=T.useRef(n),u=T.useRef(r),f=T.useRef(r.includes(n)?n:r[0]),[p,y]=ho({name:"useViews",state:"view",controlled:o,default:f.current}),w=T.useRef(i?p:null),[b,m]=ho({name:"useViews",state:"focusedView",controlled:a,default:w.current});T.useEffect(()=>{(d.current&&d.current!==n||u.current&&u.current.some(I=>!r.includes(I)))&&(y(r.includes(n)?n:r[0]),u.current=r,d.current=n)},[n,y,p,r]);const v=r.indexOf(p),D=r[v-1]??null,k=r[v+1]??null,x=Te((I,F)=>{m(F?I:z=>I===z?null:z),l?.(I,F)}),S=Te(I=>{x(I,!0),I!==p&&(y(I),t&&t(I))}),C=Te(()=>{k&&S(k)}),O=Te((I,F,z)=>{const R=F==="finish",$=z?r.indexOf(z)<r.length-1:!!k;if(e(I,R&&$?"partial":F,z),z&&z!==p){const G=r[r.indexOf(z)+1];G&&S(G)}else R&&C()});return{view:p,setView:S,focusedView:b,setFocusedView:x,nextView:k,previousView:D,defaultView:r.includes(n)?n:r[0],goToNextView:C,setValueAndGoToNextView:O}}const p$=["className","sx"],m$=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:o,rendererInterceptor:r,fieldRef:i})=>{const{onChange:a,open:l,onClose:d}=t,{view:u,views:f,openTo:p,onViewChange:y,viewRenderers:w,timezone:b}=e,m=Ye(e,p$),{view:v,setView:D,defaultView:k,focusedView:x,setFocusedView:S,setValueAndGoToNextView:C}=fb({view:u,views:f,openTo:p,onChange:a,onViewChange:y,autoFocus:o}),{hasUIView:O,viewModeLookup:I}=T.useMemo(()=>f.reduce((q,Y)=>{let H;return w[Y]!=null?H="UI":H="field",q.viewModeLookup[Y]=H,H==="UI"&&(q.hasUIView=!0),q},{hasUIView:!1,viewModeLookup:{}}),[w,f]),F=T.useMemo(()=>f.reduce((q,Y)=>w[Y]!=null&&hL(Y)?q+1:q,0),[w,f]),z=I[v],R=Te(()=>z==="UI"),[$,K]=T.useState(z==="UI"?v:null);return $!==v&&I[v]==="UI"&&K(v),ln(()=>{z==="field"&&l&&(d(),setTimeout(()=>{i?.current?.setSelectedSections(v),i?.current?.focusField(v)}))},[v]),ln(()=>{if(!l)return;let q=v;z==="field"&&$!=null&&(q=$),q!==k&&I[q]==="UI"&&I[k]==="UI"&&(q=k),q!==v&&D(q),S(q,!0)},[l]),{hasUIView:O,shouldRestoreFocus:R,layoutProps:{views:f,view:$,onViewChange:D},renderCurrentView:()=>{if($==null)return null;const q=w[$];if(q==null)return null;const Y=Q({},m,n,t,{views:f,timezone:b,onChange:C,view:$,onViewChange:D,focusedView:x,onFocusedViewChange:S,showViewSwitcher:F>1,timeViewsCount:F});return r?r(w,$,Y):q(Y)}}};function Gm(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const g$=(e,t)=>{const[n,o]=T.useState(Gm);return ln(()=>{const i=()=>{o(Gm())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),KL(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},y$=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:o})=>{const{orientation:r}=e,i=g$(n.views,r),a=to();return{layoutProps:Q({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:o,disabled:e.disabled,readOnly:e.readOnly})}};function v$(e){const{props:t,pickerValueResponse:n}=e;return T.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const pb=({props:e,valueManager:t,valueType:n,wrapperVariant:o,additionalViewProps:r,validator:i,autoFocusView:a,rendererInterceptor:l,fieldRef:d})=>{process.env.NODE_ENV!=="production"&&e.renderInput!=null&&l$(["MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const u=f$({props:e,valueManager:t,valueType:n,wrapperVariant:o,validator:i}),f=m$({props:e,additionalViewProps:r,autoFocusView:a,fieldRef:d,propsFromPickerValue:u.viewProps,rendererInterceptor:l}),p=y$({props:e,wrapperVariant:o,propsFromPickerValue:u.layoutProps,propsFromPickerViews:f.layoutProps}),y=v$({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:f.renderCurrentView,hasUIView:f.hasUIView,shouldRestoreFocus:f.shouldRestoreFocus,layoutProps:p.layoutProps,contextValue:u.contextValue,ownerState:y}};function mb(e){return Me("MuiPickersLayout",e)}const Dr=Pe("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),b$=["onAccept","onClear","onCancel","onSetToday","actions"];function gb(e){const{onAccept:t,onClear:n,onCancel:o,onSetToday:r,actions:i}=e,a=Ye(e,b$),l=lr();if(i==null||i.length===0)return null;const d=i?.map(u=>{switch(u){case"clear":return E.jsx(ko,{onClick:n,children:l.clearButtonLabel},u);case"cancel":return E.jsx(ko,{onClick:o,children:l.cancelButtonLabel},u);case"accept":return E.jsx(ko,{onClick:t,children:l.okButtonLabel},u);case"today":return E.jsx(ko,{onClick:r,children:l.todayButtonLabel},u);default:return null}});return E.jsx(Ku,Q({},a,{children:d}))}process.env.NODE_ENV!=="production"&&(gb.propTypes={actions:s.arrayOf(s.oneOf(["accept","cancel","clear","today"]).isRequired),disableSpacing:s.bool,onAccept:s.func.isRequired,onCancel:s.func.isRequired,onClear:s.func.isRequired,onSetToday:s.func.isRequired,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const oa=36,Ic=2,Nc=320,w$=280,Wh=336,C$=["items","changeImportance","isLandscape","onChange","isValid"],S$=["getValue"];function yb(e){const{items:t,changeImportance:n="accept",onChange:o,isValid:r}=e,i=Ye(e,C$);if(t==null||t.length===0)return null;const a=t.map(l=>{let{getValue:d}=l,u=Ye(l,S$);const f=d({isValid:r});return Q({},u,{label:u.label,onClick:()=>{o(f,n,u)},disabled:!r(f)})});return E.jsx(pc,Q({dense:!0,sx:[{maxHeight:Wh,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(l=>E.jsx(ky,{children:E.jsx(yy,Q({},l))},l.id??l.label))}))}process.env.NODE_ENV!=="production"&&(yb.propTypes={changeImportance:s.oneOf(["accept","set"]),className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,isLandscape:s.bool.isRequired,isValid:s.func.isRequired,items:s.arrayOf(s.shape({getValue:s.func.isRequired,id:s.string,label:s.string.isRequired})),onChange:s.func.isRequired,style:s.object,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function _$(e){return e.view!==null}const x$=e=>{const{classes:t,isLandscape:n}=e;return Ie({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},mb,t)},R$=e=>{const{wrapperVariant:t,onAccept:n,onClear:o,onCancel:r,onSetToday:i,view:a,views:l,onViewChange:d,value:u,onChange:f,onSelectShortcut:p,isValid:y,isLandscape:w,disabled:b,readOnly:m,children:v,slots:D,slotProps:k}=e,x=x$(e),S=D?.actionBar??gb,C=pt({elementType:S,externalSlotProps:k?.actionBar,additionalProps:{onAccept:n,onClear:o,onCancel:r,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:x.actionBar,ownerState:Q({},e,{wrapperVariant:t})}),O=E.jsx(S,Q({},C)),I=D?.toolbar,F=pt({elementType:I,externalSlotProps:k?.toolbar,additionalProps:{isLandscape:w,onChange:f,value:u,view:a,onViewChange:d,views:l,disabled:b,readOnly:m},className:x.toolbar,ownerState:Q({},e,{wrapperVariant:t})}),z=_$(F)&&I?E.jsx(I,Q({},F)):null,R=v,$=D?.tabs,K=a&&$?E.jsx($,Q({view:a,onViewChange:d,className:x.tabs},k?.tabs)):null,G=D?.shortcuts??yb,q=pt({elementType:G,externalSlotProps:k?.shortcuts,additionalProps:{isValid:y,isLandscape:w,onChange:p},className:x.shortcuts,ownerState:{isValid:y,isLandscape:w,onChange:p,wrapperVariant:t}}),Y=a&&G?E.jsx(G,Q({},q)):null;return{toolbar:z,content:R,tabs:K,actionBar:O,shortcuts:Y}},T$=e=>{const{isLandscape:t,classes:n}=e;return Ie({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},mb,n)},k$=ie("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Dr.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Dr.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Dr.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Dr.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Dr.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Dr.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Dr.shortcuts}`]:{gridColumn:3}}}]}),E$=ie("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Hh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:a,actionBar:l,shortcuts:d}=R$(o),{sx:u,className:f,isLandscape:p,wrapperVariant:y}=o,w=T$(o);return E.jsxs(k$,{ref:n,sx:u,className:Se(w.root,f),ownerState:o,children:[p?d:r,p?r:d,E.jsx(E$,{className:w.contentWrapper,children:y==="desktop"?E.jsxs(T.Fragment,{children:[i,a]}):E.jsxs(T.Fragment,{children:[a,i]})}),l]})});process.env.NODE_ENV!=="production"&&(Hh.propTypes={children:s.node,classes:s.object,className:s.string,disabled:s.bool,isLandscape:s.bool.isRequired,isRtl:s.bool.isRequired,isValid:s.func.isRequired,onAccept:s.func.isRequired,onCancel:s.func.isRequired,onChange:s.func.isRequired,onClear:s.func.isRequired,onClose:s.func.isRequired,onDismiss:s.func.isRequired,onOpen:s.func.isRequired,onSelectShortcut:s.func.isRequired,onSetToday:s.func.isRequired,onViewChange:s.func.isRequired,orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any,view:s.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),views:s.arrayOf(s.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]).isRequired).isRequired,wrapperVariant:s.oneOf(["desktop","mobile"])});const P$=T.createContext(null);function vb(e){const{contextValue:t,localeText:n,children:o}=e;return E.jsx(P$.Provider,{value:t,children:E.jsx(Oc,{localeText:n,children:o})})}const D$=["props","getOpenDialogAriaText"],O$=["ownerState"],M$=["ownerState"],I$=e=>{let{props:t,getOpenDialogAriaText:n}=e,o=Ye(e,D$);const{slots:r,slotProps:i,className:a,sx:l,format:d,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:y,timezone:w,name:b,label:m,inputRef:v,readOnly:D,disabled:k,autoFocus:x,localeText:S,reduceAnimations:C}=t,O=T.useRef(null),I=T.useRef(null),F=sr(),z=i?.toolbar?.hidden??!1,{open:R,actions:$,hasUIView:K,layoutProps:G,renderCurrentView:q,shouldRestoreFocus:Y,fieldProps:H,contextValue:ae,ownerState:A}=pb(Q({},o,{props:t,fieldRef:I,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),M=r.inputAdornment??Qu,L=pt({elementType:M,externalSlotProps:i?.inputAdornment,additionalProps:{position:"end"},ownerState:t}),B=Ye(L,O$),ne=r.openPickerButton??Us,oe=pt({elementType:ne,externalSlotProps:i?.openPickerButton,additionalProps:{disabled:k||D,onClick:R?$.onClose:$.onOpen,"aria-label":n(H.value),edge:B.position},ownerState:t}),se=Ye(oe,M$),j=r.openPickerIcon,ee=pt({elementType:j,externalSlotProps:i?.openPickerIcon,ownerState:A}),J=r.field,te=pt({elementType:J,externalSlotProps:i?.field,additionalProps:Q({},H,z&&{id:F},{readOnly:D,disabled:k,className:a,sx:l,format:d,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:y,timezone:w,label:m,name:b,autoFocus:x&&!t.open,focused:R?!0:void 0},v?{inputRef:v}:{}),ownerState:t});K&&(te.InputProps=Q({},te.InputProps,{ref:O},!t.disableOpenPicker&&{[`${B.position}Adornment`]:E.jsx(M,Q({},B,{children:E.jsx(ne,Q({},se,{children:E.jsx(j,Q({},ee))}))}))}));const ce=Q({textField:r.textField,clearIcon:r.clearIcon,clearButton:r.clearButton},te.slots),le=r.layout??Hh;let he=F;z&&(m?he=`${F}-label`:he=void 0);const W=Q({},i,{toolbar:Q({},i?.toolbar,{titleId:F}),popper:Q({"aria-labelledby":he},i?.popper)}),re=ct(I,te.unstableFieldRef);return{renderPicker:()=>E.jsxs(vb,{contextValue:ae,localeText:S,children:[E.jsx(J,Q({},te,{slots:ce,slotProps:W,unstableFieldRef:re})),E.jsx(a$,Q({role:"dialog",placement:"bottom-start",anchorEl:O.current},$,{open:R,slots:r,slotProps:W,shouldRestoreFocus:Y,reduceAnimations:C,children:E.jsx(le,Q({},G,W?.layout,{slots:r,slotProps:W,children:q()}))}))]})}},N$=fn(E.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),A$=fn(E.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),F$=fn(E.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),L$=fn(E.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");fn(E.jsxs(T.Fragment,{children:[E.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),E.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");fn(E.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");fn(E.jsxs(T.Fragment,{children:[E.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),E.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const $$=fn(E.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"}),"Clear"),V$=({utils:e,format:t})=>{let n=10,o=t,r=e.expandFormat(t);for(;r!==o;)if(o=r,r=e.expandFormat(o),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return r},j$=({utils:e,expandedFormat:t})=>{const n=[],{start:o,end:r}=e.escapedCharacters,i=new RegExp(`(\\${o}[^\\${r}]*\\${r})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},B$=(e,t,n,o)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),o).length,format:o});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:o});case"day":return t.fieldDayPlaceholder({format:o});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:o});case"hours":return t.fieldHoursPlaceholder({format:o});case"minutes":return t.fieldMinutesPlaceholder({format:o});case"seconds":return t.fieldSecondsPlaceholder({format:o});case"meridiem":return t.fieldMeridiemPlaceholder({format:o});default:return o}},W$=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:o,localizedDigits:r,now:i,token:a,startSeparator:l})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const d=Lh(e,a),u=rb(e,d.contentType,d.type,a),f=n?u:d.contentType==="digit",p=t!=null&&e.isValid(t);let y=p?e.formatByString(t,a):"",w=null;if(f)if(u)w=y===""?e.formatByString(i,a).length:y.length;else{if(d.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);w=d.maxLength,p&&(y=$h(tb(Ur(y,r),w),r))}return Q({},d,{format:a,maxLength:w,value:y,placeholder:B$(e,o,d,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:f,startSeparator:l,endSeparator:"",modified:!1})},H$=e=>{const{utils:t,expandedFormat:n,escapedParts:o}=e,r=t.date(void 0),i=[];let a="";const l=Object.keys(t.formatTokenMap).sort((w,b)=>b.length-w.length),d=/^([a-zA-Z]+)/,u=new RegExp(`^(${l.join("|")})*$`),f=new RegExp(`^(${l.join("|")})`),p=w=>o.find(b=>b.start<=w&&b.end>=w);let y=0;for(;y<n.length;){const w=p(y),b=w!=null,m=d.exec(n.slice(y))?.[1];if(!b&&m!=null&&u.test(m)){let v=m;for(;v.length>0;){const D=f.exec(v)[1];v=v.slice(D.length),i.push(W$(Q({},e,{now:r,token:D,startSeparator:a}))),a=""}y+=m.length}else{const v=n[y];b&&w?.start===y||w?.end===y||(i.length===0?a+=v:i[i.length-1].endSeparator+=v),y+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},z$=({isRtl:e,formatDensity:t,sections:n})=>n.map(o=>{const r=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return o.startSeparator=r(o.startSeparator),o.endSeparator=r(o.endSeparator),o}),Km=e=>{let t=V$(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=j$(Q({},e,{expandedFormat:t})),o=H$(Q({},e,{expandedFormat:t,escapedParts:n}));return z$(Q({},e,{sections:o}))},Y$=e=>{const t=Ft(),n=lr(),o=Qr(),r=to(),{valueManager:i,fieldValueManager:a,valueType:l,validator:d,internalProps:u,internalProps:{value:f,defaultValue:p,referenceDate:y,onChange:w,format:b,formatDensity:m="dense",selectedSections:v,onSelectedSectionsChange:D,shouldRespectLeadingZeros:k=!1,timezone:x,enableAccessibleFieldDOMStructure:S=!1}}=e,{timezone:C,value:O,handleValueChange:I}=jh({timezone:x,value:f,defaultValue:p,onChange:w,valueManager:i}),F=T.useMemo(()=>vL(t),[t]),z=T.useMemo(()=>_L(t,F,C),[t,F,C]),R=T.useCallback((j,ee=null)=>a.getSectionsFromValue(t,j,ee,J=>Km({utils:t,localeText:n,localizedDigits:F,format:b,date:J,formatDensity:m,shouldRespectLeadingZeros:k,enableAccessibleFieldDOMStructure:S,isRtl:r})),[a,b,n,F,r,k,t,m,S]),[$,K]=T.useState(()=>{const j=R(O);Wm(j,l);const ee={sections:j,value:O,referenceValue:i.emptyValue,tempValueStrAndroid:null},J=pL(j),te=i.getInitialReferenceValue({referenceDate:y,value:O,utils:t,props:u,granularity:J,timezone:C});return Q({},ee,{referenceValue:te})}),[G,q]=ho({controlled:v,default:null,name:"useField",state:"selectedSections"}),Y=j=>{q(j),D?.(j)},H=T.useMemo(()=>vu(G,$.sections),[G,$.sections]),ae=H==="all"?0:H,A=({value:j,referenceValue:ee,sections:J})=>{if(K(ce=>Q({},ce,{sections:J,value:j,referenceValue:ee,tempValueStrAndroid:null})),i.areValuesEqual(t,$.value,j))return;const te={validationError:d({adapter:o,value:j,timezone:C,props:u})};I(j,te)},M=(j,ee)=>{const J=[...$.sections];return J[j]=Q({},J[j],{value:ee,modified:!0}),J},L=()=>{A({value:i.emptyValue,referenceValue:$.referenceValue,sections:R(i.emptyValue)})},B=()=>{if(ae==null)return;const j=$.sections[ae],ee=a.getActiveDateManager(t,$,j),te=ee.getSections($.sections).filter(W=>W.value!=="").length===(j.value===""?0:1),ce=M(ae,""),le=te?null:t.getInvalidDate(),he=ee.getNewValuesFromNewActiveDate(le);A(Q({},he,{sections:ce}))},ne=j=>{const ee=(ce,le)=>{const he=t.parse(ce,b);if(he==null||!t.isValid(he))return null;const W=Km({utils:t,localeText:n,localizedDigits:F,format:b,date:he,formatDensity:m,shouldRespectLeadingZeros:k,enableAccessibleFieldDOMStructure:S,isRtl:r});return zm(t,he,W,le,!1)},J=a.parseValueStr(j,$.referenceValue,ee),te=a.updateReferenceValue(t,J,$.referenceValue);A({value:J,referenceValue:te,sections:R(J,$.sections)})},oe=({activeSection:j,newSectionValue:ee,shouldGoToNextSection:J})=>{J&&ae<$.sections.length-1&&Y(ae+1);const te=a.getActiveDateManager(t,$,j),ce=M(ae,ee),le=te.getSections(ce),he=wL(t,le,F);let W,re;if(he!=null&&t.isValid(he)){const Z=zm(t,he,le,te.referenceDate,!0);W=te.getNewValuesFromNewActiveDate(Z),re=!0}else W=te.getNewValuesFromNewActiveDate(he),re=(he!=null&&!t.isValid(he))!=(te.date!=null&&!t.isValid(te.date));return re?A(Q({},W,{sections:ce})):K(Z=>Q({},Z,W,{sections:ce,tempValueStrAndroid:null}))},se=j=>K(ee=>Q({},ee,{tempValueStrAndroid:j}));return T.useEffect(()=>{const j=R($.value);Wm(j,l),K(ee=>Q({},ee,{sections:j}))},[b,t.locale,r]),T.useEffect(()=>{let j;i.areValuesEqual(t,$.value,O)?j=i.getTimezone(t,$.value)!==i.getTimezone(t,O):j=!0,j&&K(ee=>Q({},ee,{value:O,referenceValue:a.updateReferenceValue(t,O,ee.referenceValue),sections:R(O)}))},[O]),{state:$,activeSectionIndex:ae,parsedSelectedSections:H,setSelectedSections:Y,clearValue:L,clearActiveSection:B,updateSectionValue:oe,updateValueFromValueStr:ne,setTempAndroidValueStr:se,getSectionsFromValue:R,sectionsValueBoundaries:z,localizedDigits:F,timezone:C}},U$=5e3,ms=e=>e.saveQuery!=null,q$=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:o,setTempAndroidValueStr:r,timezone:i})=>{const a=Ft(),[l,d]=T.useState(null),u=Te(()=>d(null));T.useEffect(()=>{l!=null&&e[l.sectionIndex]?.type!==l.sectionType&&u()},[e,l,u]),T.useEffect(()=>{if(l!=null){const b=setTimeout(()=>u(),U$);return()=>{clearTimeout(b)}}return()=>{}},[l,u]);const f=({keyPressed:b,sectionIndex:m},v,D)=>{const k=b.toLowerCase(),x=e[m];if(l!=null&&(!D||D(l.value))&&l.sectionIndex===m){const C=`${l.value}${k}`,O=v(C,x);if(!ms(O))return d({sectionIndex:m,value:C,sectionType:x.type}),O}const S=v(k,x);return ms(S)&&!S.saveQuery?(u(),null):(d({sectionIndex:m,value:k,sectionType:x.type}),ms(S)?null:S)},p=b=>{const m=(k,x,S)=>{const C=x.filter(O=>O.toLowerCase().startsWith(S));return C.length===0?{saveQuery:!1}:{sectionValue:C[0],shouldGoToNextSection:C.length===1}},v=(k,x,S,C)=>{const O=I=>eb(a,i,x.type,I);if(x.contentType==="letter")return m(x.format,O(x.format),k);if(S&&C!=null&&Lh(a,S).contentType==="letter"){const I=O(S),F=m(S,I,k);return ms(F)?{saveQuery:!1}:Q({},F,{sectionValue:C(F.sectionValue,I)})}return{saveQuery:!1}};return f(b,(k,x)=>{switch(x.type){case"month":{const S=C=>jm(a,C,a.formats.month,x.format);return v(k,x,a.formats.month,S)}case"weekDay":{const S=(C,O)=>O.indexOf(C).toString();return v(k,x,a.formats.weekday,S)}case"meridiem":return v(k,x);default:return{saveQuery:!1}}})},y=b=>{const m=(D,k)=>{const x=Ur(D,o),S=Number(x),C=n[k.type]({currentDate:null,format:k.format,contentType:k.contentType});if(S>C.maximum)return{saveQuery:!1};if(S<C.minimum)return{saveQuery:!0};const O=S*10>C.maximum||x.length===C.maximum.toString().length;return{sectionValue:nb(a,S,C,o,k),shouldGoToNextSection:O}};return f(b,(D,k)=>{if(k.contentType==="digit"||k.contentType==="digit-with-letter")return m(D,k);if(k.type==="month"){rb(a,"digit","month","MM");const x=m(D,{type:k.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(ms(x))return x;const S=jm(a,x.sectionValue,"MM",k.format);return Q({},x,{sectionValue:S})}if(k.type==="weekDay"){const x=m(D,k);if(ms(x))return x;const S=Dc(a,k.format)[Number(x.sectionValue)-1];return Q({},x,{sectionValue:S})}return{saveQuery:!1}},D=>Vm(D,o))};return{applyCharacterEditing:Te(b=>{const m=e[b.sectionIndex],D=Vm(b.keyPressed,o)?y(Q({},b,{keyPressed:$h(b.keyPressed,o)})):p(b);if(D==null){r(null);return}t({activeSection:m,newSectionValue:D.sectionValue,shouldGoToNextSection:D.shouldGoToNextSection})}),resetCharacterQuery:u}},G$=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:o,onBlur:r,onClick:i,onFocus:a,onInput:l,onPaste:d,focused:u,autoFocus:f=!1},fieldValueManager:p,applyCharacterEditing:y,resetCharacterQuery:w,setSelectedSections:b,parsedSelectedSections:m,state:v,clearActiveSection:D,clearValue:k,updateSectionValue:x,updateValueFromValueStr:S,sectionOrder:C,areAllSectionsEmpty:O,sectionsValueBoundaries:I}=e,F=T.useRef(null),z=ct(o,F),R=lr(),$=Ft(),K=sr(),[G,q]=T.useState(!1),Y=T.useMemo(()=>({syncSelectionToDOM:()=>{if(!F.current)return;const re=document.getSelection();if(!re)return;if(m==null){re.rangeCount>0&&F.current.getRoot().contains(re.getRangeAt(0).startContainer)&&re.removeAllRanges(),G&&F.current.getRoot().blur();return}if(!F.current.getRoot().contains(Ln(document)))return;const Z=new window.Range;let fe;m==="all"?fe=F.current.getRoot():v.sections[m].type==="empty"?fe=F.current.getSectionContainer(m):fe=F.current.getSectionContent(m),Z.selectNodeContents(fe),fe.focus(),re.removeAllRanges(),re.addRange(Z)},getActiveSectionIndexFromDOM:()=>{const re=Ln(document);return!re||!F.current||!F.current.getRoot().contains(re)?null:F.current.getSectionIndexFromDOMElement(re)},focusField:(re=0)=>{if(!F.current)return;const Z=vu(re,v.sections);q(!0),F.current.getSectionContent(Z).focus()},setSelectedSections:re=>{if(!F.current)return;const Z=vu(re,v.sections);q((Z==="all"?0:Z)!==null),b(re)},isFieldFocused:()=>{const re=Ln(document);return!!F.current&&F.current.getRoot().contains(re)}}),[m,b,v.sections,G]),H=Te(re=>{if(!F.current)return;const Z=v.sections[re];F.current.getSectionContent(re).innerHTML=Z.value||Z.placeholder,Y.syncSelectionToDOM()}),ae=Te((re,...Z)=>{re.isDefaultPrevented()||!F.current||(q(!0),i?.(re,...Z),m==="all"?setTimeout(()=>{const fe=document.getSelection().getRangeAt(0).startOffset;if(fe===0){b(C.startIndex);return}let pe=0,be=0;for(;be<fe&&pe<v.sections.length;){const ge=v.sections[pe];pe+=1,be+=`${ge.startSeparator}${ge.value||ge.placeholder}${ge.endSeparator}`.length}b(pe-1)}):G?F.current.getRoot().contains(re.target)||b(C.startIndex):(q(!0),b(C.startIndex)))}),A=Te(re=>{if(l?.(re),!F.current||m!=="all")return;const fe=re.target.textContent??"";F.current.getRoot().innerHTML=v.sections.map(pe=>`${pe.startSeparator}${pe.value||pe.placeholder}${pe.endSeparator}`).join(""),Y.syncSelectionToDOM(),fe.length===0||fe.charCodeAt(0)===10?(w(),k(),b("all")):fe.length>1?S(fe):y({keyPressed:fe,sectionIndex:0})}),M=Te(re=>{if(d?.(re),n||m!=="all"){re.preventDefault();return}const Z=re.clipboardData.getData("text");re.preventDefault(),w(),S(Z)}),L=Te((...re)=>{if(a?.(...re),G||!F.current)return;q(!0),F.current.getSectionIndexFromDOMElement(Ln(document))!=null||b(C.startIndex)}),B=Te((...re)=>{r?.(...re),setTimeout(()=>{if(!F.current)return;const Z=Ln(document);!F.current.getRoot().contains(Z)&&(q(!1),b(null))})}),ne=Te(re=>Z=>{Z.isDefaultPrevented()||b(re)}),oe=Te(re=>{re.preventDefault()}),se=Te(re=>()=>{b(re)}),j=Te(re=>{if(re.preventDefault(),n||t||typeof m!="number")return;const Z=v.sections[m],fe=re.clipboardData.getData("text"),pe=/^[a-zA-Z]+$/.test(fe),be=/^[0-9]+$/.test(fe),ge=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(fe);Z.contentType==="letter"&&pe||Z.contentType==="digit"&&be||Z.contentType==="digit-with-letter"&&ge?(w(),x({activeSection:Z,newSectionValue:fe,shouldGoToNextSection:!0})):!pe&&!be&&(w(),S(fe))}),ee=Te(re=>{re.preventDefault(),re.dataTransfer.dropEffect="none"}),J=Te(re=>{if(!F.current)return;const Z=re.target,fe=Z.textContent??"",pe=F.current.getSectionIndexFromDOMElement(Z),be=v.sections[pe];if(n||!F.current){H(pe);return}if(fe.length===0){if(be.value===""){H(pe);return}const ge=re.nativeEvent.inputType;if(ge==="insertParagraph"||ge==="insertLineBreak"){H(pe);return}w(),D();return}y({keyPressed:fe,sectionIndex:pe}),H(pe)});ln(()=>{if(!(!G||!F.current)){if(m==="all")F.current.getRoot().focus();else if(typeof m=="number"){const re=F.current.getSectionContent(m);re&&re.focus()}}},[m,G]);const te=T.useMemo(()=>v.sections.reduce((re,Z)=>(re[Z.type]=I[Z.type]({currentDate:null,contentType:Z.contentType,format:Z.format}),re),{}),[I,v.sections]),ce=m==="all",le=T.useMemo(()=>v.sections.map((re,Z)=>{const fe=!ce&&!t&&!n;return{container:{"data-sectionindex":Z,onClick:ne(Z)},content:{tabIndex:ce||Z>0?-1:0,contentEditable:!ce&&!t&&!n,role:"spinbutton",id:`${K}-${re.type}`,"aria-labelledby":`${K}-${re.type}`,"aria-readonly":n,"aria-valuenow":EL(re,$),"aria-valuemin":te[re.type].minimum,"aria-valuemax":te[re.type].maximum,"aria-valuetext":re.value?kL(re,$):R.empty,"aria-label":R[re.type],"aria-disabled":t,spellCheck:fe?!1:void 0,autoCapitalize:fe?"off":void 0,autoCorrect:fe?"off":void 0,[parseInt(T.version,10)>=17?"enterKeyHint":"enterkeyhint"]:fe?"next":void 0,children:re.value||re.placeholder,onInput:J,onPaste:j,onFocus:se(Z),onDragOver:ee,onMouseUp:oe,inputMode:re.contentType==="letter"?"text":"numeric"},before:{children:re.startSeparator},after:{children:re.endSeparator}}}),[v.sections,se,j,ee,J,ne,oe,t,n,ce,R,$,te,K]),he=Te(re=>{S(re.target.value)}),W=T.useMemo(()=>O?"":p.getV7HiddenInputValueFromSections(v.sections),[O,v.sections,p]);return T.useEffect(()=>{if(F.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
366
+ `));f&&F.current&&F.current.getSectionContent(C.startIndex).focus()},[]),{interactions:Y,returnedValue:{autoFocus:f,readOnly:n,focused:u??G,sectionListRef:z,onBlur:B,onClick:ae,onFocus:L,onInput:A,onPaste:M,enableAccessibleFieldDOMStructure:!0,elements:le,tabIndex:m===0?-1:0,contentEditable:ce,value:W,onChange:he,areAllSectionsEmpty:O}}},_s=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),K$=(e,t,n)=>{let o=0,r=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const l=e[a],d=Vh(l,n?"input-rtl":"input-ltr",t),u=`${l.startSeparator}${d}${l.endSeparator}`,f=_s(u).length,p=u.length,y=_s(d),w=r+(y===""?0:d.indexOf(y[0]))+l.startSeparator.length,b=w+y.length;i.push(Q({},l,{start:o,end:o+f,startInInput:w,endInInput:b})),o+=f,r+=p}return i},X$=e=>{const t=to(),n=T.useRef(),o=T.useRef(),{forwardedProps:{onFocus:r,onClick:i,onPaste:a,onBlur:l,inputRef:d,placeholder:u},internalProps:{readOnly:f=!1,disabled:p=!1},parsedSelectedSections:y,activeSectionIndex:w,state:b,fieldValueManager:m,valueManager:v,applyCharacterEditing:D,resetCharacterQuery:k,updateSectionValue:x,updateValueFromValueStr:S,clearActiveSection:C,clearValue:O,setTempAndroidValueStr:I,setSelectedSections:F,getSectionsFromValue:z,areAllSectionsEmpty:R,localizedDigits:$}=e,K=T.useRef(null),G=ct(d,K),q=T.useMemo(()=>K$(b.sections,$,t),[b.sections,$,t]),Y=T.useMemo(()=>({syncSelectionToDOM:()=>{if(!K.current)return;if(y==null){K.current.scrollLeft&&(K.current.scrollLeft=0);return}if(K.current!==Ln(document))return;const J=K.current.scrollTop;if(y==="all")K.current.select();else{const te=q[y],ce=te.type==="empty"?te.startInInput-te.startSeparator.length:te.startInInput,le=te.type==="empty"?te.endInInput+te.endSeparator.length:te.endInInput;(ce!==K.current.selectionStart||le!==K.current.selectionEnd)&&K.current===Ln(document)&&K.current.setSelectionRange(ce,le),clearTimeout(o.current),o.current=setTimeout(()=>{K.current&&K.current===Ln(document)&&K.current.selectionStart===K.current.selectionEnd&&(K.current.selectionStart!==ce||K.current.selectionEnd!==le)&&Y.syncSelectionToDOM()})}K.current.scrollTop=J},getActiveSectionIndexFromDOM:()=>{const J=K.current.selectionStart??0,te=K.current.selectionEnd??0;if(J===0&&te===0)return null;const ce=J<=q[0].startInInput?1:q.findIndex(le=>le.startInInput-le.startSeparator.length>J);return ce===-1?q.length-1:ce-1},focusField:(J=0)=>{K.current?.focus(),F(J)},setSelectedSections:J=>F(J),isFieldFocused:()=>K.current===Ln(document)}),[K,y,q,F]),H=()=>{const J=K.current.selectionStart??0;let te;J<=q[0].startInInput||J>=q[q.length-1].endInInput?te=1:te=q.findIndex(le=>le.startInInput-le.startSeparator.length>J);const ce=te===-1?q.length-1:te-1;F(ce)},ae=Te((...J)=>{r?.(...J);const te=K.current;clearTimeout(n.current),n.current=setTimeout(()=>{!te||te!==K.current||w==null&&(te.value.length&&Number(te.selectionEnd)-Number(te.selectionStart)===te.value.length?F("all"):H())})}),A=Te((J,...te)=>{J.isDefaultPrevented()||(i?.(J,...te),H())}),M=Te(J=>{if(a?.(J),J.preventDefault(),f||p)return;const te=J.clipboardData.getData("text");if(typeof y=="number"){const ce=b.sections[y],le=/^[a-zA-Z]+$/.test(te),he=/^[0-9]+$/.test(te),W=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(te);if(ce.contentType==="letter"&&le||ce.contentType==="digit"&&he||ce.contentType==="digit-with-letter"&&W){k(),x({activeSection:ce,newSectionValue:te,shouldGoToNextSection:!0});return}if(le||he)return}k(),S(te)}),L=Te((...J)=>{l?.(...J),F(null)}),B=Te(J=>{if(f)return;const te=J.target.value;if(te===""){k(),O();return}const ce=J.nativeEvent.data,le=ce&&ce.length>1,he=le?ce:te,W=_s(he);if(w==null||le){S(le?ce:W);return}let re;if(y==="all"&&W.length===1)re=W;else{const Z=_s(m.getV6InputValueFromSections(q,$,t));let fe=-1,pe=-1;for(let Ve=0;Ve<Z.length;Ve+=1)fe===-1&&Z[Ve]!==W[Ve]&&(fe=Ve),pe===-1&&Z[Z.length-Ve-1]!==W[W.length-Ve-1]&&(pe=Ve);const be=q[w];if(fe<be.start||Z.length-pe-1>be.end)return;const Re=W.length-Z.length+be.end-_s(be.endSeparator||"").length;re=W.slice(be.start+_s(be.startSeparator||"").length,Re)}if(re.length===0){RL()&&I(he),k(),C();return}D({keyPressed:re,sectionIndex:w})}),ne=T.useMemo(()=>u!==void 0?u:m.getV6InputValueFromSections(z(v.emptyValue),$,t),[u,m,z,v.emptyValue,$,t]),oe=T.useMemo(()=>b.tempValueStrAndroid??m.getV6InputValueFromSections(b.sections,$,t),[b.sections,m,b.tempValueStrAndroid,$,t]);T.useEffect(()=>(K.current&&K.current===Ln(document)&&F("all"),()=>{clearTimeout(n.current),clearTimeout(o.current)}),[]);const se=T.useMemo(()=>w==null||b.sections[w].contentType==="letter"?"text":"numeric",[w,b.sections]),ee=!(K.current&&K.current===Ln(document))&&R;return{interactions:Y,returnedValue:{readOnly:f,onBlur:L,onClick:A,onFocus:ae,onPaste:M,inputRef:G,enableAccessibleFieldDOMStructure:!1,placeholder:ne,inputMode:se,autoComplete:"off",value:ee?"":oe,onChange:B}}},Z$=e=>{const t=Ft(),{internalProps:n,internalProps:{unstableFieldRef:o,minutesStep:r,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:l=!1},forwardedProps:{onKeyDown:d,error:u,clearable:f,onClear:p},fieldValueManager:y,valueManager:w,validator:b}=e,m=to(),v=Y$(e),{state:D,activeSectionIndex:k,parsedSelectedSections:x,setSelectedSections:S,clearValue:C,clearActiveSection:O,updateSectionValue:I,setTempAndroidValueStr:F,sectionsValueBoundaries:z,localizedDigits:R,timezone:$}=v,K=q$({sections:D.sections,updateSectionValue:I,sectionsValueBoundaries:z,localizedDigits:R,setTempAndroidValueStr:F,timezone:$}),{resetCharacterQuery:G}=K,q=w.areValuesEqual(t,D.value,w.emptyValue),Y=i?G$:X$,H=T.useMemo(()=>TL(D.sections,m&&!i),[D.sections,m,i]),{returnedValue:ae,interactions:A}=Y(Q({},e,v,K,{areAllSectionsEmpty:q,sectionOrder:H})),M=Te(j=>{if(d?.(j),!a)switch(!0){case((j.ctrlKey||j.metaKey)&&String.fromCharCode(j.keyCode)==="A"&&!j.shiftKey&&!j.altKey):{j.preventDefault(),S("all");break}case j.key==="ArrowRight":{if(j.preventDefault(),x==null)S(H.startIndex);else if(x==="all")S(H.endIndex);else{const ee=H.neighbors[x].rightIndex;ee!==null&&S(ee)}break}case j.key==="ArrowLeft":{if(j.preventDefault(),x==null)S(H.endIndex);else if(x==="all")S(H.startIndex);else{const ee=H.neighbors[x].leftIndex;ee!==null&&S(ee)}break}case j.key==="Delete":{if(j.preventDefault(),l)break;x==null||x==="all"?C():O(),G();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(j.key):{if(j.preventDefault(),l||k==null)break;const ee=D.sections[k],J=y.getActiveDateManager(t,D,ee),te=bL(t,$,ee,j.key,z,R,J.date,{minutesStep:r});I({activeSection:ee,newSectionValue:te,shouldGoToNextSection:!1});break}}});ln(()=>{A.syncSelectionToDOM()});const{hasValidationError:L}=ub({props:n,validator:b,timezone:$,value:D.value,onError:n.onError}),B=T.useMemo(()=>u!==void 0?u:L,[L,u]);T.useEffect(()=>{!B&&k==null&&G()},[D.referenceValue,k,B]),T.useEffect(()=>{D.tempValueStrAndroid!=null&&k!=null&&(G(),O())},[D.sections]),T.useImperativeHandle(o,()=>({getSections:()=>D.sections,getActiveSectionIndex:A.getActiveSectionIndexFromDOM,setSelectedSections:A.setSelectedSections,focusField:A.focusField,isFieldFocused:A.isFieldFocused}));const ne=Te((j,...ee)=>{j.preventDefault(),p?.(j,...ee),C(),A.isFieldFocused()?S(H.startIndex):A.focusField(0)}),oe={onKeyDown:M,onClear:ne,error:B,clearable:!!(f&&!q&&!l&&!a)},se={disabled:a,readOnly:l};return Q({},e.forwardedProps,oe,se,ae)},Q$=["clearable","onClear","InputProps","sx","slots","slotProps"],J$=["ownerState"],eV=e=>{const t=lr(),{clearable:n,onClear:o,InputProps:r,sx:i,slots:a,slotProps:l}=e,d=Ye(e,Q$),u=a?.clearButton??Us,f=pt({elementType:u,externalSlotProps:l?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),p=Ye(f,J$),y=a?.clearIcon??$$,w=pt({elementType:y,externalSlotProps:l?.clearIcon,ownerState:{}});return Q({},d,{InputProps:Q({},r,{endAdornment:E.jsxs(T.Fragment,{children:[n&&E.jsx(Qu,{position:"end",sx:{marginRight:r?.endAdornment?-1:-1.5},children:E.jsx(u,Q({},p,{onClick:o,children:E.jsx(y,Q({fontSize:"small"},w))}))}),r?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},tV=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],nV=(e,t)=>T.useMemo(()=>{const n=Q({},e),o={},r=i=>{n.hasOwnProperty(i)&&(o[i]=n[i],delete n[i])};return tV.forEach(r),cb.forEach(r),{forwardedProps:n,internalProps:o}},[e,t]),oV=e=>{const t=Ft(),n=_a();return Q({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Jn(t,e.minDate,n.minDate),maxDate:Jn(t,e.maxDate,n.maxDate)})},rV=e=>{const t=oV(e),{forwardedProps:n,internalProps:o}=nV(t,"date");return Z$({forwardedProps:n,internalProps:o,valueManager:Io,fieldValueManager:DL,validator:xa,valueType:"date"})};function sV(e){return Me("MuiPickersTextField",e)}Pe("MuiPickersTextField",["root","focused","disabled","error","required"]);function iV(e){return Me("MuiPickersInputBase",e)}const Ds=Pe("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function aV(e){return Me("MuiPickersSectionList",e)}const wi=Pe("MuiPickersSectionList",["root","section","sectionContent"]),lV=["slots","slotProps","elements","sectionListRef"],bb=ie("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),wb=ie("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Cb=ie("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Sb=ie("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),cV=e=>{const{classes:t}=e;return Ie({root:["root"],section:["section"],sectionContent:["sectionContent"]},aV,t)};function _b(e){const{slots:t,slotProps:n,element:o,classes:r}=e,i=t?.section??wb,a=pt({elementType:i,externalSlotProps:n?.section,externalForwardedProps:o.container,className:r.section,ownerState:{}}),l=t?.sectionContent??Sb,d=pt({elementType:l,externalSlotProps:n?.sectionContent,externalForwardedProps:o.content,additionalProps:{suppressContentEditableWarning:!0},className:r.sectionContent,ownerState:{}}),u=t?.sectionSeparator??Cb,f=pt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:o.before,ownerState:{position:"before"}}),p=pt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:o.after,ownerState:{position:"after"}});return E.jsxs(i,Q({},a,{children:[E.jsx(u,Q({},f)),E.jsx(l,Q({},d)),E.jsx(u,Q({},p))]}))}process.env.NODE_ENV!=="production"&&(_b.propTypes={classes:s.object.isRequired,element:s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired}).isRequired,slotProps:s.object,slots:s.object});const xb=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:a,sectionListRef:l}=o,d=Ye(o,lV),u=cV(o),f=T.useRef(null),p=ct(n,f),y=m=>{if(!f.current)throw new Error(`MUI X: Cannot call sectionListRef.${m} before the mount of the component.`);return f.current};T.useImperativeHandle(l,()=>({getRoot(){return y("getRoot")},getSectionContainer(m){return y("getSectionContainer").querySelector(`.${wi.section}[data-sectionindex="${m}"]`)},getSectionContent(m){return y("getSectionContent").querySelector(`.${wi.section}[data-sectionindex="${m}"] .${wi.sectionContent}`)},getSectionIndexFromDOMElement(m){const v=y("getSectionIndexFromDOMElement");if(m==null||!v.contains(m))return null;let D=null;return m.classList.contains(wi.section)?D=m:m.classList.contains(wi.sectionContent)&&(D=m.parentElement),D==null?null:Number(D.dataset.sectionindex)}}));const w=r?.root??bb,b=pt({elementType:w,externalSlotProps:i?.root,externalForwardedProps:d,additionalProps:{ref:p,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return E.jsx(w,Q({},b,{children:b.contentEditable?a.map(({content:m,before:v,after:D})=>`${v.children}${m.children}${D.children}`).join(""):E.jsx(T.Fragment,{children:a.map((m,v)=>E.jsx(_b,{slots:r,slotProps:i,element:m,classes:u},v))})}))});process.env.NODE_ENV!=="production"&&(xb.propTypes={classes:s.object,contentEditable:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object});const dV=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],uV=e=>Math.round(e*1e5)/1e5,Ac=ie("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>Q({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${uV(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),zh=ie(bb,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:o,label:r})=>!t&&!n&&!o&&r==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),hV=ie(wb,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),fV=ie(Sb,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),pV=ie(Cb,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),mV=ie("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(Q({},rR)),gV=e=>{const{focused:t,disabled:n,error:o,classes:r,fullWidth:i,readOnly:a,color:l,size:d,endAdornment:u,startAdornment:f}=e,p={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",o&&"error",i&&"fullWidth",`color${we(l)}`,d==="small"&&"inputSizeSmall",!!f&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Ie(p,iV,r)},Fc=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:a,onChange:l,id:d,endAdornment:u,startAdornment:f,renderSuffix:p,slots:y,slotProps:w,contentEditable:b,tabIndex:m,onInput:v,onPaste:D,onKeyDown:k,name:x,readOnly:S,inputProps:C,inputRef:O,sectionListRef:I}=o,F=Ye(o,dV),z=T.useRef(null),R=ct(n,z),$=ct(C?.ref,O),K=to(),G=Nn();if(!G)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const q=L=>{if(G.disabled){L.stopPropagation();return}G.onFocus?.(L)};T.useEffect(()=>{G&&G.setAdornedStart(!!f)},[G,f]),T.useEffect(()=>{G&&(i?G.onEmpty():G.onFilled())},[G,i]);const Y=Q({},o,G,{isRtl:K}),H=gV(Y),ae=y?.root||Ac,A=pt({elementType:ae,externalSlotProps:w?.root,externalForwardedProps:F,additionalProps:{"aria-invalid":G.error,ref:R},className:H.root,ownerState:Y}),M=y?.input||zh;return E.jsxs(ae,Q({},A,{children:[f,E.jsx(xb,{sectionListRef:I,elements:r,contentEditable:b,tabIndex:m,className:H.sectionsContainer,onFocus:q,onBlur:G.onBlur,onInput:v,onPaste:D,onKeyDown:k,slots:{root:M,section:hV,sectionContent:fV,sectionSeparator:pV},slotProps:{root:{ownerState:Y},sectionContent:{className:Ds.sectionContent},sectionSeparator:({position:L})=>({className:L==="before"?Ds.sectionBefore:Ds.sectionAfter})}}),u,p?p(Q({},G)):null,E.jsx(mV,Q({name:x,className:H.input,value:a,onChange:l,id:d,"aria-hidden":"true",tabIndex:-1,readOnly:S,required:G.required,disabled:G.disabled},C,{ref:$}))]}))});process.env.NODE_ENV!=="production"&&(Fc.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});function yV(e){return Me("MuiPickersOutlinedInput",e)}const ao=Q({},Ds,Pe("MuiPickersOutlinedInput",["root","notchedOutline","input"])),vV=["children","className","label","notched","shrink"],bV=ie("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{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%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Xm=ie("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),wV=ie("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function CV(e){const{className:t,label:n}=e,o=Ye(e,vV),r=n!=null&&n!=="",i=Q({},e,{withLabel:r});return E.jsx(bV,Q({"aria-hidden":!0,className:t},o,{ownerState:i,children:E.jsx(wV,{ownerState:i,children:r?E.jsx(Xm,{children:n}):E.jsx(Xm,{className:"notranslate",children:"​"})})}))}const SV=["label","autoFocus","ownerState","notched"],_V=ie(Ac,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ao.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ao.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${ao.focused} .${ao.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${ao.disabled}`]:{[`& .${ao.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${ao.error} .${ao.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>(e.vars??e).palette[n]?.main??!1).map(n=>({props:{color:n},style:{[`&.${ao.focused}:not(.${ao.error}) .${ao.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),xV=ie(zh,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),RV=e=>{const{classes:t}=e,o=Ie({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},yV,t);return Q({},t,o)},Yh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:a}=o,l=Ye(o,SV),d=Nn(),u=Q({},o,i,d,{color:d?.color||"primary"}),f=RV(u);return E.jsx(Fc,Q({slots:{root:_V,input:xV},renderSuffix:p=>E.jsx(CV,{shrink:!!(a||p.adornedStart||p.focused||p.filled),notched:!!(a||p.adornedStart||p.focused||p.filled),className:f.notchedOutline,label:r!=null&&r!==""&&d?.required?E.jsxs(T.Fragment,{children:[r," ","*"]}):r,ownerState:u})},l,{label:r,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Yh.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,notched:s.bool,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});Yh.muiName="Input";function TV(e){return Me("MuiPickersFilledInput",e)}const Or=Q({},Ds,Pe("MuiPickersFilledInput",["root","underline","input"])),kV=["label","autoFocus","disableUnderline","ownerState"],EV=ie(Ac,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ll(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${Or.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Or.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>({props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Or.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Or.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Or.disabled}, .${Or.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Or.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),PV=ie(zh,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),DV=e=>{const{classes:t,disableUnderline:n}=e,r=Ie({root:["root",!n&&"underline"],input:["input"]},TV,t);return Q({},t,r)},Uh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=o,l=Ye(o,kV),d=Nn(),u=Q({},o,a,d,{color:d?.color||"primary"}),f=DV(u);return E.jsx(Fc,Q({slots:{root:EV,input:PV},slotProps:{root:{disableUnderline:i}}},l,{label:r,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Uh.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,disableUnderline:s.bool,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,hiddenLabel:s.bool,id:s.string,inputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});Uh.muiName="Input";function OV(e){return Me("MuiPickersFilledInput",e)}const Ci=Q({},Ds,Pe("MuiPickersInput",["root","input"])),MV=["label","autoFocus","disableUnderline","ownerState"],IV=ie(Ac,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(o=>(e.vars??e).palette[o].main).map(o=>({props:{color:o},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ci.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ci.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ci.disabled}, .${Ci.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Ci.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),NV=e=>{const{classes:t,disableUnderline:n}=e,r=Ie({root:["root",!n&&"underline"],input:["input"]},OV,t);return Q({},t,r)},qh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=o,l=Ye(o,MV),d=Nn(),u=Q({},o,a,d,{disableUnderline:i,color:d?.color||"primary"}),f=NV(u);return E.jsx(Fc,Q({slots:{root:IV}},l,{label:r,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(qh.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,disableUnderline:s.bool,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});qh.muiName="Input";const AV=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],FV={standard:qh,filled:Uh,outlined:Yh},LV=ie(pa,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),$V=e=>{const{focused:t,disabled:n,classes:o,required:r}=e;return Ie({root:["root",t&&!n&&"focused",n&&"disabled",r&&"required"]},sV,o)},Rb=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:a,color:l="primary",disabled:d=!1,error:u=!1,variant:f="outlined",required:p=!1,InputProps:y,inputProps:w,inputRef:b,sectionListRef:m,elements:v,areAllSectionsEmpty:D,onClick:k,onKeyDown:x,onKeyUp:S,onPaste:C,onInput:O,endAdornment:I,startAdornment:F,tabIndex:z,contentEditable:R,focused:$,value:K,onChange:G,fullWidth:q,id:Y,name:H,helperText:ae,FormHelperTextProps:A,label:M,InputLabelProps:L}=o,B=Ye(o,AV),ne=T.useRef(null),oe=ct(n,ne),se=sr(Y),j=ae&&se?`${se}-helper-text`:void 0,ee=M&&se?`${se}-label`:void 0,J=Q({},o,{color:l,disabled:d,error:u,focused:$,required:p,variant:f}),te=$V(J),ce=FV[f];return E.jsxs(LV,Q({className:Se(te.root,a),ref:oe,focused:$,onFocus:r,onBlur:i,disabled:d,variant:f,error:u,color:l,fullWidth:q,required:p,ownerState:J},B,{children:[E.jsx(ma,Q({htmlFor:se,id:ee},L,{children:M})),E.jsx(ce,Q({elements:v,areAllSectionsEmpty:D,onClick:k,onKeyDown:x,onKeyUp:S,onInput:O,onPaste:C,endAdornment:I,startAdornment:F,tabIndex:z,contentEditable:R,value:K,onChange:G,id:se,fullWidth:q,inputProps:w,inputRef:b,sectionListRef:m,label:M,name:H,role:"group","aria-labelledby":ee},y)),ae&&E.jsx(Zu,Q({id:j},A,{children:ae}))]}))});process.env.NODE_ENV!=="production"&&(Rb.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,contentEditable:s.bool.isRequired,disabled:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,error:s.bool.isRequired,focused:s.bool,FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onBlur:s.func.isRequired,onChange:s.func.isRequired,onClick:s.func.isRequired,onFocus:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,readOnly:s.bool,required:s.bool,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),size:s.oneOf(["medium","small"]),startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired,variant:s.oneOf(["filled","outlined","standard"])});const VV=["enableAccessibleFieldDOMStructure"],jV=["InputProps","readOnly"],BV=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],WV=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=Ye(e,VV);if(t){const{InputProps:p,readOnly:y}=n,w=Ye(n,jV);return Q({},w,{InputProps:Q({},p??{},{readOnly:y})})}const{onPaste:o,onKeyDown:r,inputMode:i,readOnly:a,InputProps:l,inputProps:d,inputRef:u}=n,f=Ye(n,BV);return Q({},f,{InputProps:Q({},l??{},{readOnly:a}),inputProps:Q({},d??{},{inputMode:i,onPaste:o,onKeyDown:r,ref:u})})},HV=["slots","slotProps","InputProps","inputProps"],Gh=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiDateField"}),{slots:r,slotProps:i,InputProps:a,inputProps:l}=o,d=Ye(o,HV),u=o,f=r?.textField??(t.enableAccessibleFieldDOMStructure?Rb:Vs),p=pt({elementType:f,externalSlotProps:i?.textField,externalForwardedProps:d,additionalProps:{ref:n},ownerState:u});p.inputProps=Q({},l,p.inputProps),p.InputProps=Q({},a,p.InputProps);const y=rV(p),w=WV(y),b=eV(Q({},w,{slots:r,slotProps:i}));return E.jsx(f,Q({},b))});process.env.NODE_ENV!=="production"&&(Gh.propTypes={autoFocus:s.bool,className:s.string,clearable:s.bool,color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,enableAccessibleFieldDOMStructure:s.bool,focused:s.bool,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:zt,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxDate:s.object,minDate:s.object,name:s.string,onBlur:s.func,onChange:s.func,onClear:s.func,onError:s.func,onFocus:s.func,onSelectedSectionsChange:s.func,readOnly:s.bool,referenceDate:s.object,required:s.bool,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,shouldRespectLeadingZeros:s.bool,size:s.oneOf(["medium","small"]),slotProps:s.object,slots:s.object,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,unstableFieldRef:s.oneOfType([s.func,s.object]),value:s.object,variant:s.oneOf(["filled","outlined","standard"])});const Tb=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:i,disablePast:a,timezone:l})=>{const d=Qr();return T.useCallback(u=>xa({adapter:d,value:u,timezone:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:i,disablePast:a}})!==null,[d,e,t,n,o,r,i,a,l])},zV=(e,t,n)=>(o,r)=>{switch(r.type){case"changeMonth":return Q({},o,{slideDirection:r.direction,currentMonth:r.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=r.newTimezone;if(n.getTimezone(o.currentMonth)===i)return o;let a=n.setTimezone(o.currentMonth,i);return n.getMonth(a)!==n.getMonth(o.currentMonth)&&(a=n.setMonth(a,n.getMonth(o.currentMonth))),Q({},o,{currentMonth:a})}case"finishMonthSwitchingAnimation":return Q({},o,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(o.focusedDay!=null&&r.focusedDay!=null&&n.isSameDay(r.focusedDay,o.focusedDay))return o;const i=r.focusedDay!=null&&!t&&!n.isSameMonth(o.currentMonth,r.focusedDay);return Q({},o,{focusedDay:r.focusedDay,isMonthSwitchingAnimating:i&&!e&&!r.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(r.focusedDay):o.currentMonth,slideDirection:r.focusedDay!=null&&n.isAfterDay(r.focusedDay,o.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},YV=e=>{const{value:t,referenceDate:n,disableFuture:o,disablePast:r,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:l,onMonthChange:d,reduceAnimations:u,shouldDisableDate:f,timezone:p}=e,y=Ft(),w=T.useRef(zV(!!u,i,y)).current,b=T.useMemo(()=>Io.getInitialReferenceValue({value:t,utils:y,timezone:p,props:e,referenceDate:n,granularity:xo.day}),[n,p]),[m,v]=T.useReducer(w,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:y.startOfMonth(b),slideDirection:"left"});T.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:y.getTimezone(b)})},[b,y]);const D=T.useCallback(O=>{v(Q({type:"changeMonth"},O)),d&&d(O.newMonth)},[d]),k=T.useCallback(O=>{const I=O;y.isSameMonth(I,m.currentMonth)||D({newMonth:y.startOfMonth(I),direction:y.isAfterDay(I,m.currentMonth)?"left":"right"})},[m.currentMonth,D,y]),x=Tb({shouldDisableDate:f,minDate:l,maxDate:a,disableFuture:o,disablePast:r,timezone:p}),S=T.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]),C=Te((O,I)=>{x(O)||v({type:"changeFocusedDay",focusedDay:O,withoutMonthSwitchingAnimation:I})});return{referenceDate:b,calendarState:m,changeMonth:k,changeFocusedDay:C,isDateDisabled:x,onMonthSwitchingAnimationEnd:S,handleChangeMonth:D}},UV=e=>Me("MuiPickersFadeTransitionGroup",e);Pe("MuiPickersFadeTransitionGroup",["root"]);const qV=e=>{const{classes:t}=e;return Ie({root:["root"]},UV,t)},GV=ie(da,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function kb(e){const t=Nt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:o,reduceAnimations:r,transKey:i}=t,a=qV(t),l=qr();return r?n:E.jsx(GV,{className:Se(a.root,o),children:E.jsx(Gr,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:n},i)})}function KV(e){return Me("MuiPickersDay",e)}const Mr=Pe("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),XV=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],ZV=e=>{const{selected:t,disableMargin:n,disableHighlightToday:o,today:r,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:l,classes:d}=e,u=a&&!l;return Ie({root:["root",t&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!o&&r&&"today",a&&l&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},KV,d)},Eb=({theme:e})=>Q({},e.typography.caption,{width:oa,height:oa,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:tt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:tt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Mr.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Mr.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Mr.disabled}:not(.${Mr.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Mr.disabled}&.${Mr.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Ic}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Mr.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Pb=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},QV=ie(br,{name:"MuiPickersDay",slot:"Root",overridesResolver:Pb})(Eb),JV=ie("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Pb})(({theme:e})=>Q({},Eb({theme:e}),{opacity:0,pointerEvents:"none"})),Si=()=>{},Db=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:a,disabled:l=!1,disableHighlightToday:d=!1,disableMargin:u=!1,isAnimating:f,onClick:p,onDaySelect:y,onFocus:w=Si,onBlur:b=Si,onKeyDown:m=Si,onMouseDown:v=Si,onMouseEnter:D=Si,outsideCurrentMonth:k,selected:x=!1,showDaysOutsideCurrentMonth:S=!1,children:C,today:O=!1}=o,I=Ye(o,XV),F=Q({},o,{autoFocus:r,disabled:l,disableHighlightToday:d,disableMargin:u,selected:x,showDaysOutsideCurrentMonth:S,today:O}),z=ZV(F),R=Ft(),$=T.useRef(null),K=ct($,n);ln(()=>{r&&!l&&!f&&!k&&$.current.focus()},[r,l,f,k]);const G=Y=>{v(Y),k&&Y.preventDefault()},q=Y=>{l||y(a),k&&Y.currentTarget.focus(),p&&p(Y)};return k&&!S?E.jsx(JV,{className:Se(z.root,z.hiddenDaySpacingFiller,i),ownerState:F,role:I.role}):E.jsx(QV,Q({className:Se(z.root,i),ref:K,centerRipple:!0,disabled:l,tabIndex:x?0:-1,onKeyDown:Y=>m(Y,a),onFocus:Y=>w(Y,a),onBlur:Y=>b(Y,a),onMouseEnter:Y=>D(Y,a),onClick:q,onMouseDown:G},I,{ownerState:F,children:C||R.format(a,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(Db.propTypes={action:s.oneOfType([s.func,s.shape({current:s.shape({focusVisible:s.func.isRequired})})]),centerRipple:s.bool,classes:s.object,className:s.string,component:s.elementType,day:s.object.isRequired,disabled:s.bool,disableHighlightToday:s.bool,disableMargin:s.bool,disableRipple:s.bool,disableTouchRipple:s.bool,focusRipple:s.bool,focusVisibleClassName:s.string,isAnimating:s.bool,isFirstVisibleCell:s.bool.isRequired,isLastVisibleCell:s.bool.isRequired,onBlur:s.func,onDaySelect:s.func.isRequired,onFocus:s.func,onFocusVisible:s.func,onKeyDown:s.func,onMouseEnter:s.func,outsideCurrentMonth:s.bool.isRequired,selected:s.bool,showDaysOutsideCurrentMonth:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,today:s.bool,TouchRippleProps:s.object,touchRippleRef:s.oneOfType([s.func,s.shape({current:s.shape({pulsate:s.func.isRequired,start:s.func.isRequired,stop:s.func.isRequired})})])});const ej=T.memo(Db),tj=e=>Me("MuiPickersSlideTransition",e),Yn=Pe("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),nj=["children","className","reduceAnimations","slideDirection","transKey","classes"],oj=e=>{const{classes:t,slideDirection:n}=e,o={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Ie(o,tj,t)},rj=ie(da,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Yn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Yn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Yn.slideEnterActive}`]:t.slideEnterActive},{[`.${Yn.slideExit}`]:t.slideExit},{[`.${Yn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Yn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Yn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Yn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Yn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Yn.slideExit}`]:{transform:"translate(0%)"},[`& .${Yn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Yn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function sj(e){const t=Nt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:o,reduceAnimations:r,transKey:i}=t,a=Ye(t,nj),l=oj(t),d=qr();if(r)return E.jsx("div",{className:Se(l.root,o),children:n});const u={exit:l.exit,enterActive:l.enterActive,enter:l.enter,exitActive:l.exitActive};return E.jsx(rj,{className:Se(l.root,o),childFactory:f=>T.cloneElement(f,{classNames:u}),role:"presentation",children:E.jsx(Fu,Q({mountOnEnter:!0,unmountOnExit:!0,timeout:d.transitions.duration.complex,classNames:u},a,{children:n}),i)})}const ij=e=>Me("MuiDayCalendar",e);Pe("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const aj=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],lj=["ownerState"],cj=e=>{const{classes:t}=e;return Ie({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},ij,t)},Ob=(oa+Ic*2)*6,dj=ie("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),uj=ie("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),hj=ie(bn,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),fj=ie(bn,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),pj=ie(bn,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>Q({},e.typography.caption,{width:oa,height:oa,padding:0,margin:`0 ${Ic}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),mj=ie("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Ob}),gj=ie(sj,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Ob}),yj=ie("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),vj=ie("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Ic}px 0`,display:"flex",justifyContent:"center"});function bj(e){let{parentProps:t,day:n,focusableDay:o,selectedDays:r,isDateDisabled:i,currentMonthNumber:a,isViewFocused:l}=e,d=Ye(e,aj);const{disabled:u,disableHighlightToday:f,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:y,slots:w,slotProps:b,timezone:m}=t,v=Ft(),D=Mc(m),k=o!==null&&v.isSameDay(n,o),x=r.some(K=>v.isSameDay(K,n)),S=v.isSameDay(n,D),C=w?.day??ej,O=pt({elementType:C,externalSlotProps:b?.day,additionalProps:Q({disableHighlightToday:f,showDaysOutsideCurrentMonth:y,role:"gridcell",isAnimating:p,"data-timestamp":v.toJsDate(n).valueOf()},d),ownerState:Q({},t,{day:n,selected:x})}),I=Ye(O,lj),F=T.useMemo(()=>u||i(n),[u,i,n]),z=T.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),R=T.useMemo(()=>{const K=v.startOfMonth(v.setMonth(n,a));return y?v.isSameDay(n,v.startOfWeek(K)):v.isSameDay(n,K)},[a,n,y,v]),$=T.useMemo(()=>{const K=v.endOfMonth(v.setMonth(n,a));return y?v.isSameDay(n,v.endOfWeek(K)):v.isSameDay(n,K)},[a,n,y,v]);return E.jsx(C,Q({},I,{day:n,disabled:F,autoFocus:l&&k,today:S,outsideCurrentMonth:z,isFirstVisibleCell:R,isLastVisibleCell:$,selected:x,tabIndex:k?0:-1,"aria-selected":x,"aria-current":S?"date":void 0}))}function wj(e){const t=Nt({props:e,name:"MuiDayCalendar"}),n=Ft(),{onFocusedDayChange:o,className:r,currentMonth:i,selectedDays:a,focusedDay:l,loading:d,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:y,renderLoading:w=()=>E.jsx("span",{children:"..."}),slideDirection:b,TransitionProps:m,disablePast:v,disableFuture:D,minDate:k,maxDate:x,shouldDisableDate:S,shouldDisableMonth:C,shouldDisableYear:O,dayOfWeekFormatter:I=pe=>n.format(pe,"weekdayShort").charAt(0).toUpperCase(),hasFocus:F,onFocusedViewChange:z,gridLabelId:R,displayWeekNumber:$,fixedWeekNumber:K,autoFocus:G,timezone:q}=t,Y=Mc(q),H=cj(t),ae=to(),A=Tb({shouldDisableDate:S,shouldDisableMonth:C,shouldDisableYear:O,minDate:k,maxDate:x,disablePast:v,disableFuture:D,timezone:q}),M=lr(),[L,B]=ho({name:"DayCalendar",state:"hasFocus",controlled:F,default:G??!1}),[ne,oe]=T.useState(()=>l||Y),se=Te(pe=>{p||u(pe)}),j=pe=>{A(pe)||(o(pe),oe(pe),z?.(!0),B(!0))},ee=Te((pe,be)=>{switch(pe.key){case"ArrowUp":j(n.addDays(be,-7)),pe.preventDefault();break;case"ArrowDown":j(n.addDays(be,7)),pe.preventDefault();break;case"ArrowLeft":{const ge=n.addDays(be,ae?1:-1),Re=n.addMonths(be,ae?1:-1),Ve=Fi({utils:n,date:ge,minDate:ae?ge:n.startOfMonth(Re),maxDate:ae?n.endOfMonth(Re):ge,isDateDisabled:A,timezone:q});j(Ve||ge),pe.preventDefault();break}case"ArrowRight":{const ge=n.addDays(be,ae?-1:1),Re=n.addMonths(be,ae?-1:1),Ve=Fi({utils:n,date:ge,minDate:ae?n.startOfMonth(Re):ge,maxDate:ae?ge:n.endOfMonth(Re),isDateDisabled:A,timezone:q});j(Ve||ge),pe.preventDefault();break}case"Home":j(n.startOfWeek(be)),pe.preventDefault();break;case"End":j(n.endOfWeek(be)),pe.preventDefault();break;case"PageUp":j(n.addMonths(be,1)),pe.preventDefault();break;case"PageDown":j(n.addMonths(be,-1)),pe.preventDefault();break}}),J=Te((pe,be)=>j(be)),te=Te((pe,be)=>{L&&n.isSameDay(ne,be)&&z?.(!1)}),ce=n.getMonth(i),le=n.getYear(i),he=T.useMemo(()=>a.filter(pe=>!!pe).map(pe=>n.startOfDay(pe)),[n,a]),W=`${le}-${ce}`,re=T.useMemo(()=>T.createRef(),[W]),Z=T.useMemo(()=>{const pe=n.startOfMonth(i),be=n.endOfMonth(i);return A(ne)||n.isAfterDay(ne,be)||n.isBeforeDay(ne,pe)?Fi({utils:n,date:ne,minDate:pe,maxDate:be,disablePast:v,disableFuture:D,isDateDisabled:A,timezone:q}):ne},[i,D,v,ne,A,n,q]),fe=T.useMemo(()=>{const pe=n.getWeekArray(i);let be=n.addMonths(i,1);for(;K&&pe.length<K;){const ge=n.getWeekArray(be),Re=n.isSameDay(pe[pe.length-1][0],ge[0][0]);ge.slice(Re?1:0).forEach(Ve=>{pe.length<K&&pe.push(Ve)}),be=n.addMonths(be,1)}return pe},[i,K,n]);return E.jsxs(dj,{role:"grid","aria-labelledby":R,className:H.root,children:[E.jsxs(uj,{role:"row",className:H.header,children:[$&&E.jsx(fj,{variant:"caption",role:"columnheader","aria-label":M.calendarWeekNumberHeaderLabel,className:H.weekNumberLabel,children:M.calendarWeekNumberHeaderText}),dL(n,Y).map((pe,be)=>E.jsx(hj,{variant:"caption",role:"columnheader","aria-label":n.format(pe,"weekday"),className:H.weekDayLabel,children:I(pe)},be.toString()))]}),d?E.jsx(mj,{className:H.loadingContainer,children:w()}):E.jsx(gj,Q({transKey:W,onExited:f,reduceAnimations:y,slideDirection:b,className:Se(r,H.slideTransition)},m,{nodeRef:re,children:E.jsx(yj,{ref:re,role:"rowgroup",className:H.monthContainer,children:fe.map((pe,be)=>E.jsxs(vj,{role:"row",className:H.weekContainer,"aria-rowindex":be+1,children:[$&&E.jsx(pj,{className:H.weekNumber,role:"rowheader","aria-label":M.calendarWeekNumberAriaLabelText(n.getWeekNumber(pe[0])),children:M.calendarWeekNumberText(n.getWeekNumber(pe[0]))}),pe.map((ge,Re)=>E.jsx(bj,{parentProps:t,day:ge,selectedDays:he,focusableDay:Z,onKeyDown:ee,onFocus:J,onBlur:te,onDaySelect:se,isDateDisabled:A,currentMonthNumber:ce,isViewFocused:L,"aria-colindex":Re+1},ge.toString()))]},`week-${pe[0]}`))})}))]})}function Cj(e){return Me("MuiPickersMonth",e)}const nl=Pe("MuiPickersMonth",["root","monthButton","disabled","selected"]),Sj=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],_j=e=>{const{disabled:t,selected:n,classes:o}=e;return Ie({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},Cj,o)},xj=ie("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),Rj=ie("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${nl.disabled}`]:t.disabled},{[`&.${nl.selected}`]:t.selected}]})(({theme:e})=>Q({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:tt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:tt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${nl.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${nl.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Tj=T.memo(function(t){const n=Nt({props:t,name:"MuiPickersMonth"}),{autoFocus:o,className:r,children:i,disabled:a,selected:l,value:d,tabIndex:u,onClick:f,onKeyDown:p,onFocus:y,onBlur:w,"aria-current":b,"aria-label":m,slots:v,slotProps:D}=n,k=Ye(n,Sj),x=T.useRef(null),S=_j(n);ln(()=>{o&&x.current?.focus()},[o]);const C=v?.monthButton??Rj,O=pt({elementType:C,externalSlotProps:D?.monthButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:x,type:"button",role:"radio","aria-current":b,"aria-checked":l,"aria-label":m,onClick:I=>f(I,d),onKeyDown:I=>p(I,d),onFocus:I=>y(I,d),onBlur:I=>w(I,d)},ownerState:n,className:S.monthButton});return E.jsx(xj,Q({className:Se(S.root,r),ownerState:n},k,{children:E.jsx(C,Q({},O))}))});function kj(e){return Me("MuiMonthCalendar",e)}Pe("MuiMonthCalendar",["root"]);const Ej=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],Pj=e=>{const{classes:t}=e;return Ie({root:["root"]},kj,t)};function Dj(e,t){const n=Ft(),o=_a(),r=Nt({props:e,name:t});return Q({disableFuture:!1,disablePast:!1},r,{minDate:Jn(n,r.minDate,o.minDate),maxDate:Jn(n,r.maxDate,o.maxDate)})}const Oj=ie("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Nc,boxSizing:"border-box"}),Mb=T.forwardRef(function(t,n){const o=Dj(t,"MuiMonthCalendar"),{className:r,value:i,defaultValue:a,referenceDate:l,disabled:d,disableFuture:u,disablePast:f,maxDate:p,minDate:y,onChange:w,shouldDisableMonth:b,readOnly:m,autoFocus:v=!1,onMonthFocus:D,hasFocus:k,onFocusedViewChange:x,monthsPerRow:S=3,timezone:C,gridLabelId:O,slots:I,slotProps:F}=o,z=Ye(o,Ej),{value:R,handleValueChange:$,timezone:K}=Bh({name:"MonthCalendar",timezone:C,value:i,defaultValue:a,onChange:w,valueManager:Io}),G=Mc(K),q=to(),Y=Ft(),H=T.useMemo(()=>Io.getInitialReferenceValue({value:R,utils:Y,props:o,timezone:K,referenceDate:l,granularity:xo.month}),[]),ae=o,A=Pj(ae),M=T.useMemo(()=>Y.getMonth(G),[Y,G]),L=T.useMemo(()=>R!=null?Y.getMonth(R):null,[R,Y]),[B,ne]=T.useState(()=>L||Y.getMonth(H)),[oe,se]=ho({name:"MonthCalendar",state:"hasFocus",controlled:k,default:v??!1}),j=Te(W=>{se(W),x&&x(W)}),ee=T.useCallback(W=>{const re=Y.startOfMonth(f&&Y.isAfter(G,y)?G:y),Z=Y.startOfMonth(u&&Y.isBefore(G,p)?G:p),fe=Y.startOfMonth(W);return Y.isBefore(fe,re)||Y.isAfter(fe,Z)?!0:b?b(fe):!1},[u,f,p,y,G,b,Y]),J=Te((W,re)=>{if(m)return;const Z=Y.setMonth(R??H,re);$(Z)}),te=Te(W=>{ee(Y.setMonth(R??H,W))||(ne(W),j(!0),D&&D(W))});T.useEffect(()=>{ne(W=>L!==null&&W!==L?L:W)},[L]);const ce=Te((W,re)=>{switch(W.key){case"ArrowUp":te((12+re-3)%12),W.preventDefault();break;case"ArrowDown":te((12+re+3)%12),W.preventDefault();break;case"ArrowLeft":te((12+re+(q?1:-1))%12),W.preventDefault();break;case"ArrowRight":te((12+re+(q?-1:1))%12),W.preventDefault();break}}),le=Te((W,re)=>{te(re)}),he=Te((W,re)=>{B===re&&j(!1)});return E.jsx(Oj,Q({ref:n,className:Se(A.root,r),ownerState:ae,role:"radiogroup","aria-labelledby":O},z,{children:Ah(Y,R??H).map(W=>{const re=Y.getMonth(W),Z=Y.format(W,"monthShort"),fe=Y.format(W,"month"),pe=re===L,be=d||ee(W);return E.jsx(Tj,{selected:pe,value:re,onClick:J,onKeyDown:ce,autoFocus:oe&&re===B,disabled:be,tabIndex:re===B&&!be?0:-1,onFocus:le,onBlur:he,"aria-current":M===re?"date":void 0,"aria-label":fe,monthsPerRow:S,slots:I,slotProps:F,children:Z},Z)})}))});process.env.NODE_ENV!=="production"&&(Mb.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableMonth:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object});function Mj(e){return Me("MuiPickersYear",e)}const ol=Pe("MuiPickersYear",["root","yearButton","selected","disabled"]),Ij=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Nj=e=>{const{disabled:t,selected:n,classes:o}=e;return Ie({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Mj,o)},Aj=ie("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Fj=ie("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${ol.disabled}`]:t.disabled},{[`&.${ol.selected}`]:t.selected}]})(({theme:e})=>Q({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:tt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:tt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${ol.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${ol.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Lj=T.memo(function(t){const n=Nt({props:t,name:"MuiPickersYear"}),{autoFocus:o,className:r,children:i,disabled:a,selected:l,value:d,tabIndex:u,onClick:f,onKeyDown:p,onFocus:y,onBlur:w,"aria-current":b,slots:m,slotProps:v}=n,D=Ye(n,Ij),k=T.useRef(null),x=Nj(n);ln(()=>{o&&k.current?.focus()},[o]);const S=m?.yearButton??Fj,C=pt({elementType:S,externalSlotProps:v?.yearButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:k,type:"button",role:"radio","aria-current":b,"aria-checked":l,onClick:O=>f(O,d),onKeyDown:O=>p(O,d),onFocus:O=>y(O,d),onBlur:O=>w(O,d)},ownerState:n,className:x.yearButton});return E.jsx(Aj,Q({className:Se(x.root,r),ownerState:n},D,{children:E.jsx(S,Q({},C))}))});function $j(e){return Me("MuiYearCalendar",e)}Pe("MuiYearCalendar",["root"]);const Vj=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],jj=e=>{const{classes:t}=e;return Ie({root:["root"]},$j,t)};function Bj(e,t){const n=Ft(),o=_a(),r=Nt({props:e,name:t});return Q({disablePast:!1,disableFuture:!1},r,{yearsPerRow:r.yearsPerRow??3,minDate:Jn(n,r.minDate,o.minDate),maxDate:Jn(n,r.maxDate,o.maxDate)})}const Wj=ie("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Nc,maxHeight:w$,boxSizing:"border-box",position:"relative"}),Ib=T.forwardRef(function(t,n){const o=Bj(t,"MuiYearCalendar"),{autoFocus:r,className:i,value:a,defaultValue:l,referenceDate:d,disabled:u,disableFuture:f,disablePast:p,maxDate:y,minDate:w,onChange:b,readOnly:m,shouldDisableYear:v,onYearFocus:D,hasFocus:k,onFocusedViewChange:x,yearsOrder:S="asc",yearsPerRow:C,timezone:O,gridLabelId:I,slots:F,slotProps:z}=o,R=Ye(o,Vj),{value:$,handleValueChange:K,timezone:G}=Bh({name:"YearCalendar",timezone:O,value:a,defaultValue:l,onChange:b,valueManager:Io}),q=Mc(G),Y=to(),H=Ft(),ae=T.useMemo(()=>Io.getInitialReferenceValue({value:$,utils:H,props:o,timezone:G,referenceDate:d,granularity:xo.year}),[]),A=o,M=jj(A),L=T.useMemo(()=>H.getYear(q),[H,q]),B=T.useMemo(()=>$!=null?H.getYear($):null,[$,H]),[ne,oe]=T.useState(()=>B||H.getYear(ae)),[se,j]=ho({name:"YearCalendar",state:"hasFocus",controlled:k,default:r??!1}),ee=Te(ge=>{j(ge),x&&x(ge)}),J=T.useCallback(ge=>{if(p&&H.isBeforeYear(ge,q)||f&&H.isAfterYear(ge,q)||w&&H.isBeforeYear(ge,w)||y&&H.isAfterYear(ge,y))return!0;if(!v)return!1;const Re=H.startOfYear(ge);return v(Re)},[f,p,y,w,q,v,H]),te=Te((ge,Re)=>{if(m)return;const Ve=H.setYear($??ae,Re);K(Ve)}),ce=Te(ge=>{J(H.setYear($??ae,ge))||(oe(ge),ee(!0),D?.(ge))});T.useEffect(()=>{oe(ge=>B!==null&&ge!==B?B:ge)},[B]);const le=S!=="desc"?C*1:C*-1,he=Y&&S==="asc"||!Y&&S==="desc"?-1:1,W=Te((ge,Re)=>{switch(ge.key){case"ArrowUp":ce(Re-le),ge.preventDefault();break;case"ArrowDown":ce(Re+le),ge.preventDefault();break;case"ArrowLeft":ce(Re-he),ge.preventDefault();break;case"ArrowRight":ce(Re+he),ge.preventDefault();break}}),re=Te((ge,Re)=>{ce(Re)}),Z=Te((ge,Re)=>{ne===Re&&ee(!1)}),fe=T.useRef(null),pe=ct(n,fe);T.useEffect(()=>{if(r||fe.current===null)return;const ge=fe.current.querySelector('[tabindex="0"]');if(!ge)return;const Re=ge.offsetHeight,Ve=ge.offsetTop,Ne=fe.current.clientHeight,Je=fe.current.scrollTop,ke=Ve+Re;Re>Ne||Ve<Je||(fe.current.scrollTop=ke-Ne/2-Re/2)},[r]);const be=H.getYearRange([w,y]);return S==="desc"&&be.reverse(),E.jsx(Wj,Q({ref:pe,className:Se(M.root,i),ownerState:A,role:"radiogroup","aria-labelledby":I},R,{children:be.map(ge=>{const Re=H.getYear(ge),Ve=Re===B,Ne=u||J(ge);return E.jsx(Lj,{selected:Ve,value:Re,onClick:te,onKeyDown:W,autoFocus:se&&Re===ne,disabled:Ne,tabIndex:Re===ne&&!Ne?0:-1,onFocus:re,onBlur:Z,"aria-current":L===Re?"date":void 0,yearsPerRow:C,slots:F,slotProps:z,children:H.format(ge,"year")},H.format(ge,"year"))})}))});process.env.NODE_ENV!=="production"&&(Ib.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,onChange:s.func,onFocusedViewChange:s.func,onYearFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableYear:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Hj=e=>Me("MuiPickersCalendarHeader",e),zj=Pe("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function Yj(e){return Me("MuiPickersArrowSwitcher",e)}Pe("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const Uj=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],qj=["ownerState"],Gj=["ownerState"],Kj=ie("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Xj=ie("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Zm=ie(Us,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),Zj=e=>{const{classes:t}=e;return Ie({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Yj,t)},Qj=T.forwardRef(function(t,n){const o=to(),r=Nt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:l,slotProps:d,isNextDisabled:u,isNextHidden:f,onGoToNext:p,nextLabel:y,isPreviousDisabled:w,isPreviousHidden:b,onGoToPrevious:m,previousLabel:v,labelId:D}=r,k=Ye(r,Uj),x=r,S=Zj(x),C={isDisabled:u,isHidden:f,goTo:p,label:y},O={isDisabled:w,isHidden:b,goTo:m,label:v},I=l?.previousIconButton??Zm,F=pt({elementType:I,externalSlotProps:d?.previousIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"end",onClick:O.goTo},ownerState:Q({},x,{hidden:O.isHidden}),className:Se(S.button,S.previousIconButton)}),z=l?.nextIconButton??Zm,R=pt({elementType:z,externalSlotProps:d?.nextIconButton,additionalProps:{size:"medium",title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:"start",onClick:C.goTo},ownerState:Q({},x,{hidden:C.isHidden}),className:Se(S.button,S.nextIconButton)}),$=l?.leftArrowIcon??A$,K=pt({elementType:$,externalSlotProps:d?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:S.leftArrowIcon}),G=Ye(K,qj),q=l?.rightArrowIcon??F$,Y=pt({elementType:q,externalSlotProps:d?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:S.rightArrowIcon}),H=Ye(Y,Gj);return E.jsxs(Kj,Q({ref:n,className:Se(S.root,a),ownerState:x},k,{children:[E.jsx(I,Q({},F,{children:o?E.jsx(q,Q({},H)):E.jsx($,Q({},G))})),i?E.jsx(bn,{variant:"subtitle1",component:"span",id:D,children:i}):E.jsx(Xj,{className:S.spacer,ownerState:x}),E.jsx(z,Q({},R,{children:o?E.jsx($,Q({},G)):E.jsx(q,Q({},H))}))]}))});function Jj(e,{disableFuture:t,maxDate:n,timezone:o}){const r=Ft();return T.useMemo(()=>{const i=r.date(void 0,o),a=r.startOfMonth(t&&r.isBefore(i,n)?i:n);return!r.isAfter(a,e)},[t,n,e,r,o])}function eB(e,{disablePast:t,minDate:n,timezone:o}){const r=Ft();return T.useMemo(()=>{const i=r.date(void 0,o),a=r.startOfMonth(t&&r.isAfter(i,n)?i:n);return!r.isBefore(a,e)},[t,n,e,r,o])}const tB=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],nB=["ownerState"],oB=e=>{const{classes:t}=e;return Ie({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Hj,t)},rB=ie("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),sB=ie("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>Q({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),iB=ie("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),aB=ie(Us,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${zj.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),lB=ie(N$,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),Nb=T.forwardRef(function(t,n){const o=lr(),r=Ft(),i=Nt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:l,currentMonth:d,disabled:u,disableFuture:f,disablePast:p,maxDate:y,minDate:w,onMonthChange:b,onViewChange:m,view:v,reduceAnimations:D,views:k,labelId:x,className:S,timezone:C,format:O=`${r.formats.month} ${r.formats.year}`}=i,I=Ye(i,tB),F=i,z=oB(i),R=a?.switchViewButton??aB,$=pt({elementType:R,externalSlotProps:l?.switchViewButton,additionalProps:{size:"small","aria-label":o.calendarViewSwitchingButtonAriaLabel(v)},ownerState:F,className:z.switchViewButton}),K=a?.switchViewIcon??lB,G=pt({elementType:K,externalSlotProps:l?.switchViewIcon,ownerState:F,className:z.switchViewIcon}),q=Ye(G,nB),Y=()=>b(r.addMonths(d,1),"left"),H=()=>b(r.addMonths(d,-1),"right"),ae=Jj(d,{disableFuture:f,maxDate:y,timezone:C}),A=eB(d,{disablePast:p,minDate:w,timezone:C}),M=()=>{if(!(k.length===1||!m||u))if(k.length===2)m(k.find(B=>B!==v)||k[0]);else{const B=k.indexOf(v)!==0?0:1;m(k[B])}};if(k.length===1&&k[0]==="year")return null;const L=r.formatByString(d,O);return E.jsxs(rB,Q({},I,{ownerState:F,className:Se(z.root,S),ref:n,children:[E.jsxs(sB,{role:"presentation",onClick:M,ownerState:F,"aria-live":"polite",className:z.labelContainer,children:[E.jsx(kb,{reduceAnimations:D,transKey:L,children:E.jsx(iB,{id:x,ownerState:F,className:z.label,children:L})}),k.length>1&&!u&&E.jsx(R,Q({},$,{children:E.jsx(K,Q({},q))}))]}),E.jsx(Gr,{in:v==="day",children:E.jsx(Qj,{slots:a,slotProps:l,onGoToPrevious:H,isPreviousDisabled:A,previousLabel:o.previousMonth,onGoToNext:Y,isNextDisabled:ae,nextLabel:o.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(Nb.propTypes={classes:s.object,className:s.string,currentMonth:s.object.isRequired,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,format:s.string,labelId:s.string,maxDate:s.object.isRequired,minDate:s.object.isRequired,onMonthChange:s.func.isRequired,onViewChange:s.func,reduceAnimations:s.bool.isRequired,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string.isRequired,view:s.oneOf(["day","month","year"]).isRequired,views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired).isRequired});const cB=ie("div")({overflow:"hidden",width:Nc,maxHeight:Wh,display:"flex",flexDirection:"column",margin:"0 auto"}),dB=e=>Me("MuiDateCalendar",e);Pe("MuiDateCalendar",["root","viewTransitionContainer"]);const uB=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],hB=e=>{const{classes:t}=e;return Ie({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},dB,t)};function fB(e,t){const n=Ft(),o=_a(),r=hb(),i=Nt({props:e,name:t});return Q({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??r,renderLoading:i.renderLoading??(()=>E.jsx("span",{children:"..."})),minDate:Jn(n,i.minDate,o.minDate),maxDate:Jn(n,i.maxDate,o.maxDate)})}const pB=ie(cB,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Wh}),mB=ie(kb,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Ab=T.forwardRef(function(t,n){const o=Ft(),r=sr(),i=fB(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:l,value:d,defaultValue:u,referenceDate:f,disableFuture:p,disablePast:y,onChange:w,onYearChange:b,onMonthChange:m,reduceAnimations:v,shouldDisableDate:D,shouldDisableMonth:k,shouldDisableYear:x,view:S,views:C,openTo:O,className:I,disabled:F,readOnly:z,minDate:R,maxDate:$,disableHighlightToday:K,focusedView:G,onFocusedViewChange:q,showDaysOutsideCurrentMonth:Y,fixedWeekNumber:H,dayOfWeekFormatter:ae,slots:A,slotProps:M,loading:L,renderLoading:B,displayWeekNumber:ne,yearsOrder:oe,yearsPerRow:se,monthsPerRow:j,timezone:ee}=i,J=Ye(i,uB),{value:te,handleValueChange:ce,timezone:le}=Bh({name:"DateCalendar",timezone:ee,value:d,defaultValue:u,onChange:w,valueManager:Io}),{view:he,setView:W,focusedView:re,setFocusedView:Z,goToNextView:fe,setValueAndGoToNextView:pe}=fb({view:S,views:C,openTo:O,onChange:ce,onViewChange:l,autoFocus:a,focusedView:G,onFocusedViewChange:q}),{referenceDate:be,calendarState:ge,changeFocusedDay:Re,changeMonth:Ve,handleChangeMonth:Ne,isDateDisabled:Je,onMonthSwitchingAnimationEnd:ke}=YV({value:te,referenceDate:f,reduceAnimations:v,onMonthChange:m,minDate:R,maxDate:$,shouldDisableDate:D,disablePast:y,disableFuture:p,timezone:le}),ut=F&&te||R,Yt=F&&te||$,rt=`${r}-grid-label`,Ot=re!==null,Ut=A?.calendarHeader??Nb,Lt=pt({elementType:Ut,externalSlotProps:M?.calendarHeader,additionalProps:{views:C,view:he,currentMonth:ge.currentMonth,onViewChange:W,onMonthChange:(at,Zt)=>Ne({newMonth:at,direction:Zt}),minDate:ut,maxDate:Yt,disabled:F,disablePast:y,disableFuture:p,reduceAnimations:v,timezone:le,labelId:rt},ownerState:i}),Ue=Te(at=>{const Zt=o.startOfMonth(at),pn=o.endOfMonth(at),Qt=Je(at)?Fi({utils:o,date:at,minDate:o.isBefore(R,Zt)?Zt:R,maxDate:o.isAfter($,pn)?pn:$,disablePast:y,disableFuture:p,isDateDisabled:Je,timezone:le}):at;Qt?(pe(Qt,"finish"),m?.(Zt)):(fe(),Ve(Zt)),Re(Qt,!0)}),Be=Te(at=>{const Zt=o.startOfYear(at),pn=o.endOfYear(at),Qt=Je(at)?Fi({utils:o,date:at,minDate:o.isBefore(R,Zt)?Zt:R,maxDate:o.isAfter($,pn)?pn:$,disablePast:y,disableFuture:p,isDateDisabled:Je,timezone:le}):at;Qt?(pe(Qt,"finish"),b?.(Qt)):(fe(),Ve(Zt)),Re(Qt,!0)}),rn=Te(at=>ce(at&&Ll(o,at,te??be),"finish",he));T.useEffect(()=>{te!=null&&o.isValid(te)&&Ve(te)},[te]);const dn=i,Oe=hB(dn),We={disablePast:y,disableFuture:p,maxDate:$,minDate:R},ht={disableHighlightToday:K,readOnly:z,disabled:F,timezone:le,gridLabelId:rt,slots:A,slotProps:M},nn=T.useRef(he);T.useEffect(()=>{nn.current!==he&&(re===nn.current&&Z(he,!0),nn.current=he)},[re,Z,he]);const An=T.useMemo(()=>[te],[te]);return E.jsxs(pB,Q({ref:n,className:Se(Oe.root,I),ownerState:dn},J,{children:[E.jsx(Ut,Q({},Lt,{slots:A,slotProps:M})),E.jsx(mB,{reduceAnimations:v,className:Oe.viewTransitionContainer,transKey:he,ownerState:dn,children:E.jsxs("div",{children:[he==="year"&&E.jsx(Ib,Q({},We,ht,{value:te,onChange:Be,shouldDisableYear:x,hasFocus:Ot,onFocusedViewChange:at=>Z("year",at),yearsOrder:oe,yearsPerRow:se,referenceDate:be})),he==="month"&&E.jsx(Mb,Q({},We,ht,{hasFocus:Ot,className:I,value:te,onChange:Ue,shouldDisableMonth:k,onFocusedViewChange:at=>Z("month",at),monthsPerRow:j,referenceDate:be})),he==="day"&&E.jsx(wj,Q({},ge,We,ht,{onMonthSwitchingAnimationEnd:ke,onFocusedDayChange:Re,reduceAnimations:v,selectedDays:An,onSelectedDaysChange:rn,shouldDisableDate:D,shouldDisableMonth:k,shouldDisableYear:x,hasFocus:Ot,onFocusedViewChange:at=>Z("day",at),showDaysOutsideCurrentMonth:Y,fixedWeekNumber:H,dayOfWeekFormatter:ae,displayWeekNumber:ne,loading:L,renderLoading:B}))]})})]}))});process.env.NODE_ENV!=="production"&&(Ab.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,fixedWeekNumber:s.number,focusedView:s.oneOf(["day","month","year"]),loading:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthChange:s.func,onViewChange:s.func,onYearChange:s.func,openTo:s.oneOf(["day","month","year"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Os=({view:e,onViewChange:t,views:n,focusedView:o,onFocusedViewChange:r,value:i,defaultValue:a,referenceDate:l,onChange:d,className:u,classes:f,disableFuture:p,disablePast:y,minDate:w,maxDate:b,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:D,reduceAnimations:k,onMonthChange:x,monthsPerRow:S,onYearChange:C,yearsOrder:O,yearsPerRow:I,slots:F,slotProps:z,loading:R,renderLoading:$,disableHighlightToday:K,readOnly:G,disabled:q,showDaysOutsideCurrentMonth:Y,dayOfWeekFormatter:H,sx:ae,autoFocus:A,fixedWeekNumber:M,displayWeekNumber:L,timezone:B})=>E.jsx(Ab,{view:e,onViewChange:t,views:n.filter(Fm),focusedView:o&&Fm(o)?o:null,onFocusedViewChange:r,value:i,defaultValue:a,referenceDate:l,onChange:d,className:u,classes:f,disableFuture:p,disablePast:y,minDate:w,maxDate:b,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:D,reduceAnimations:k,onMonthChange:x,monthsPerRow:S,onYearChange:C,yearsOrder:O,yearsPerRow:I,slots:F,slotProps:z,loading:R,renderLoading:$,disableHighlightToday:K,readOnly:G,disabled:q,showDaysOutsideCurrentMonth:Y,dayOfWeekFormatter:H,sx:ae,autoFocus:A,fixedWeekNumber:M,displayWeekNumber:L,timezone:B}),Fb=T.forwardRef(function(t,n){const o=lr(),r=Ft(),i=lb(t,"MuiDesktopDatePicker"),a=Q({day:Os,month:Os,year:Os},i.viewRenderers),l=Q({},i,{viewRenderers:a,format:Fh(r,i,!1),yearsPerRow:i.yearsPerRow??4,slots:Q({openPickerIcon:L$,field:Gh},i.slots),slotProps:Q({},i.slotProps,{field:u=>Q({},oc(i.slotProps?.field,u),db(i),{ref:n}),toolbar:Q({hidden:!0},i.slotProps?.toolbar)})}),{renderPicker:d}=I$({props:l,valueManager:Io,valueType:"date",getOpenDialogAriaText:sb({utils:r,formatKey:"fullDate",contextTranslation:o.openDatePickerDialogue,propsTranslation:l.localeText?.openDatePickerDialogue}),validator:xa});return d()});Fb.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:zt,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const gB=ie(Gu)({[`& .${Ii.container}`]:{outline:0},[`& .${Ii.paper}`]:{outline:0,minWidth:Nc}}),yB=ie(Xu)({"&:first-of-type":{padding:0}});function vB(e){const{children:t,onDismiss:n,open:o,slots:r,slotProps:i}=e,a=r?.dialog??gB,l=r?.mobileTransition??Gr;return E.jsx(a,Q({open:o,onClose:n},i?.dialog,{TransitionComponent:l,TransitionProps:i?.mobileTransition,PaperComponent:r?.mobilePaper,PaperProps:i?.mobilePaper,children:E.jsx(yB,{children:t})}))}const bB=["props","getOpenDialogAriaText"],wB=e=>{let{props:t,getOpenDialogAriaText:n}=e,o=Ye(e,bB);const{slots:r,slotProps:i,className:a,sx:l,format:d,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:y,timezone:w,name:b,label:m,inputRef:v,readOnly:D,disabled:k,localeText:x}=t,S=T.useRef(null),C=sr(),O=i?.toolbar?.hidden??!1,{open:I,actions:F,layoutProps:z,renderCurrentView:R,fieldProps:$,contextValue:K}=pb(Q({},o,{props:t,fieldRef:S,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),G=r.field,q=pt({elementType:G,externalSlotProps:i?.field,additionalProps:Q({},$,O&&{id:C},!(k||D)&&{onClick:F.onOpen,onKeyDown:XL(F.onOpen)},{readOnly:D??!0,disabled:k,className:a,sx:l,format:d,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:p,onSelectedSectionsChange:y,timezone:w,label:m,name:b},v?{inputRef:v}:{}),ownerState:t});q.inputProps=Q({},q.inputProps,{"aria-label":n($.value)});const Y=Q({textField:r.textField},q.slots),H=r.layout??Hh;let ae=C;O&&(m?ae=`${C}-label`:ae=void 0);const A=Q({},i,{toolbar:Q({},i?.toolbar,{titleId:C}),mobilePaper:Q({"aria-labelledby":ae},i?.mobilePaper)}),M=ct(S,q.unstableFieldRef);return{renderPicker:()=>E.jsxs(vb,{contextValue:K,localeText:x,children:[E.jsx(G,Q({},q,{slots:Y,slotProps:A,unstableFieldRef:M})),E.jsx(vB,Q({},F,{open:I,slots:r,slotProps:A,children:E.jsx(H,Q({},z,A?.layout,{slots:r,slotProps:A,children:R()}))}))]})}},Lb=T.forwardRef(function(t,n){const o=lr(),r=Ft(),i=lb(t,"MuiMobileDatePicker"),a=Q({day:Os,month:Os,year:Os},i.viewRenderers),l=Q({},i,{viewRenderers:a,format:Fh(r,i,!1),slots:Q({field:Gh},i.slots),slotProps:Q({},i.slotProps,{field:u=>Q({},oc(i.slotProps?.field,u),db(i),{ref:n}),toolbar:Q({hidden:!1},i.slotProps?.toolbar)})}),{renderPicker:d}=wB({props:l,valueManager:Io,valueType:"date",getOpenDialogAriaText:sb({utils:r,formatKey:"fullDate",contextTranslation:o.openDatePickerDialogue,propsTranslation:l.localeText?.openDatePickerDialogue}),validator:xa});return d()});Lb.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:zt,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const CB=["desktopModeMediaQuery"],Vl=T.forwardRef(function(t,n){const o=Nt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=ZL}=o,i=Ye(o,CB);return Fg(r,{defaultMatches:!0})?E.jsx(Fb,Q({ref:n},i)):E.jsx(Lb,Q({ref:n},i))});process.env.NODE_ENV!=="production"&&(Vl.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,desktopModeMediaQuery:s.string,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:zt,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const bu=ie(oo)({"& label[data-shrink=false]":{top:"-5px",fontSize:"14px"},"& .MuiOutlinedInput-root":{height:"40px"}}),SB=({setValue:e,value:t})=>{function n(r){const i=r?.format(Yr.db)||"",a={...t,1:i===pu?js[1]:i};e(a),rr(a)}function o(r){const i=r?.format(Yr.db)||"",a={...t,2:i===pu?js[2]:i};e(a),rr(a)}return E.jsxs(Oc,{dateAdapter:Qv,children:[E.jsx(bu,{children:E.jsx(Vl,{label:lo.from,onChange:n,...yu(t[1])})}),E.jsx(bu,{children:E.jsx(Vl,{label:lo.to,onChange:o,...yu(t[2])})})]})},Bd=({label:e,setValue:t,value:n})=>{function o(r){const i=r?.format(Yr.db)||"",a={...n,1:i===pu?js[1]:i};t(a),rr(a)}return E.jsx(Oc,{dateAdapter:Qv,children:E.jsx(bu,{children:E.jsx(Vl,{label:e,onChange:o,...yu(n[1])})})})},Qm={label:"",options:[]};function _B(){const{columnId:e,table:t}=Rn,n=t?.grid;if(!n)return Qm;const o=n?.getColumns().find(({id:p})=>p===e);if(!o)return Qm;const r=o.name,i=[],{formatter:a,id:l}=o,d=n.getData(),u=new Set;d.getItems().forEach(p=>{u.add(a?a(0,0,p[l],o,null,n):p[l])});for(const p of u)i.push(p);return{label:r,options:i}}function xB(e,t){return typeof e=="string"&&typeof t=="string"?e.localeCompare(t):typeof e=="number"&&typeof t=="number"?e-t:0}const RB=ie(fc)({padding:0}),Jm={Checkbox:RB},TB=({setValue:e,value:t})=>{const n=JSON.parse(t[1]||'["All"]'),{label:o,options:r}=_B(),i=a=>{const l=a.target.value;let d;l[l.length-1]==="All"||!l.length?d={1:"",2:""}:(l.length>1&&l[0]==="All"&&l.shift(),d={...t,1:JSON.stringify(l)}),e(d),rr(d)};return E.jsxs(pa,{size:"small",children:[E.jsx(ma,{id:"column-filter-multiple-select-label",children:o}),E.jsxs(ga,{labelId:"column-filter-multiple-select-label",id:"column-filter-multiple-select",multiple:!0,value:n,onChange:i,input:E.jsx($s,{label:o}),renderValue:a=>a.join(", "),children:[E.jsxs(Pl,{value:"All",children:[E.jsx(Jm.Checkbox,{checked:n.indexOf("All")>-1}),E.jsx(ou,{primary:"All"})]},0),r.sort(xB).map(a=>E.jsxs(Pl,{value:a,children:[E.jsx(Jm.Checkbox,{checked:n.indexOf(a)>-1}),E.jsx(ou,{primary:a})]},a))]})]})},kB=({setValue:e,value:t})=>{function n(r){const i={...t,1:r.target.value};e(i),rr(i)}function o(r){const i={...t,2:r.target.value};e(i),rr(i)}return E.jsxs(Fe.Fragment,{children:[E.jsx(Vs,{label:lo.from,value:t[1],type:"number",onChange:n,size:"small",autoComplete:"off"}),E.jsx(Vs,{label:lo.to,value:t[2],type:"number",onChange:o,size:"small",autoComplete:"off"})]})},Wd=({label:e,setValue:t,value:n})=>{function o(r){const i={...n,1:r.target.value};t(i),rr(i)}return E.jsx(Vs,{label:e,value:n[1],type:"number",onChange:o,size:"small",autoComplete:"off"})},rl=({setValue:e,value:t})=>{function n(o){const r={...t,1:o.target.value};e(r),rr(r)}return E.jsx(Vs,{label:lo.filter,value:t[1],onChange:n,size:"small",autoComplete:"off"})},EB=({filterId:e,setValue:t,value:n})=>E.jsxs(Fe.Fragment,{children:[e===je.Boolean&&E.jsx(oL,{setValue:t,value:n}),e===je.TextEqual&&E.jsx(rl,{setValue:t,value:n}),e===je.TextNotEqual&&E.jsx(rl,{setValue:t,value:n}),e===je.TextContain&&E.jsx(rl,{setValue:t,value:n}),e===je.TextNotContain&&E.jsx(rl,{setValue:t,value:n}),e===je.MultipleSelect&&E.jsx(TB,{setValue:t,value:n}),e===je.NumberEqual&&E.jsx(Wd,{label:lo.filter,setValue:t,value:n}),e===je.NumberFrom&&E.jsx(Wd,{label:lo.from,setValue:t,value:n}),e===je.NumberTo&&E.jsx(Wd,{label:lo.to,setValue:t,value:n}),e===je.NumberBetween&&E.jsx(kB,{setValue:t,value:n}),e===je.DateEqual&&E.jsx(Bd,{label:lo.filter,setValue:t,value:n}),e===je.DateFrom&&E.jsx(Bd,{label:lo.from,setValue:t,value:n}),e===je.DateTo&&E.jsx(Bd,{label:lo.to,setValue:t,value:n}),e===je.DateBetween&&E.jsx(SB,{setValue:t,value:n})]}),PB=ie(Pl)({fontSize:"12px"}),eg={MenuItem:PB},DB=({name:e,list:t,onChange:n,defaultValue:o,value:r,showSelect:i=!0,dataTestId:a,width:l="12.8em",height:d,disabled:u=!1})=>E.jsxs(pa,{variant:"outlined",size:"small",children:[E.jsx(ma,{id:"reportType",children:e}),E.jsxs(ga,{labelId:"reportType",id:e,label:e,autoWidth:!0,value:`${r??(o||0)}`,defaultValue:`${o||0}`,onChange:n,disabled:u,"data-testid":a,MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},disableScrollLock:!0},sx:{height:d,width:l},children:[i&&E.jsx(eg.MenuItem,{value:0,id:"Select",children:"Select"}),t.map((f,p)=>E.jsx(eg.MenuItem,{value:f.id,id:"selectedReport",disabled:f.isDisabled,children:f.labelForSelect||f.name},p))]})]}),OB={id:je.DateBetween,name:"Between"},MB={id:je.DateEqual,name:"Equal"},IB={id:je.DateFrom,name:"From"},NB={id:je.DateTo,name:"To"},AB={id:je.NumberBetween,name:"Between"},FB={id:je.NumberEqual,name:"Equal"},LB={id:je.NumberFrom,name:"From"},$B={id:je.NumberTo,name:"To"},VB={id:je.TextContain,name:"Contains"},jB={id:je.TextEqual,name:"Equal"},BB={id:je.TextNotContain,name:"Does not contain"},WB={id:je.TextNotEqual,name:"Not equal"},tg=[FB,LB,$B,AB],HB={[hn.Boolean]:[],[hn.Date]:[MB,IB,NB,OB],[hn.MultipleSelect]:[],[hn.Number]:tg,[hn.NumberFormatted]:tg,[hn.Text]:[VB,BB,jB,WB]},zB=({filterId:e,setFilterId:t})=>{const n=HB[Rn.group],o=n.some(({id:i})=>i===e)?e:n[0]?.id;function r(i){const{columnId:a,table:l}=Rn;if(!a||!l)return;const d=l.filter.args,u=i.target.value;d.columnFilters&&(l.filter.args={...d,columnFilters:{...d.columnFilters,[a]:{...d.columnFilters[a],filterId:u}}},t(u))}return o?E.jsx(DB,{name:"",list:n,onChange:r,width:"100%",showSelect:!1,value:o}):null},YB=ie(oo)({display:"flex",flexDirection:"column",rowGap:"0.5em",width:"12em"}),UB={Wrapper:YB},qB=()=>{const[e,t]=Fe.useState(js),[n,o]=Fe.useState(je.TextContain),[r,i]=Fe.useState(!1);return ZF(i),XF(r,o,t),r?E.jsxs(Fe.Fragment,{children:[E.jsx(Ih,{setIsOpened:i}),E.jsx(Nh,{id:Zv,children:E.jsxs(UB.Wrapper,{children:[E.jsx(zB,{filterId:n,setFilterId:o}),E.jsx(EB,{filterId:n,setValue:t,value:e}),E.jsx(eL,{setIsOpened:i,setValue:t,value:e})]})})]}):null},$b="context_menu";function GB(e){Fe.useEffect(()=>{function t(){e(!0),setTimeout(()=>{const n=document.getElementById($b);if(!n)return;const{x:o,y:r}=wn;Mh(n,o,r)},0)}return wn.subscribe(t),()=>{wn.unsubscribe(t)}},[])}const KB=ie("ul")({display:"flex",flexDirection:"column",rowGap:"0.5em",margin:"0",paddingLeft:"0.5em"}),XB=ie("li")({display:"flex",alignItems:"center",columnGap:"0.5em",cursor:"pointer","&:hover":{scale:"1.05"}}),ZB=ie("span")({backgroundColor:"#1E456F"}),cn={Ul:KB,Li:XB,Icon:ZB},QB=({clientId:e,clientName:t,setIsOpened:n})=>{const o=()=>{const r=wn.table,i=r?.grid;if(!r||!i){n(!1);return}r.downloadManager.download(r,e,t),n(!1)};return E.jsxs(cn.Li,{onClick:o,children:[E.jsx(cn.Icon,{className:"sgi sgi-download"}),"Download as CSV"]})},JB=({setIsOpened:e})=>{const t=wn.table;function n(){t&&(t.grouping={isGrouped:!0},e(!1))}return t?.grouping.isGrouped!==!1?null:E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-link"}),"Group"]})};function eW(e){return e?Object.values(e.filter.args.columnFilters||{}).some(({value:t})=>t[1]||t[2]):!1}const tW=({setIsOpened:e})=>{const t=wn.table;function n(){if(!t){e(!1);return}const o=t.filter.args;delete o.columnFilters,t.filter.args=o,or.highlightAllColumns(o,t.id),e(!1)}return eW(t)?E.jsxs(Fe.Fragment,{children:[E.jsx(El,{}),E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-notification-clear-all"}),"Reset column filters"]})]}):null},nW=({setIsOpened:e})=>{const t=wn.table,o=t?.grid?.getSelectedRows();function r(){t&&(e(!1),Uo.table=t,Uo.open=!0)}return!t?.summaryColumnIds.length||Number(o?.length)<2?null:E.jsxs(cn.Li,{onClick:r,children:[E.jsx(cn.Icon,{className:"sgi sgi-checkbox-multiple-outline"}),"Summary"]})},oW=({setIsOpened:e})=>{const t=wn.table;function n(){t&&(t.grouping={isGrouped:!1},e(!1))}return t?.grouping.isGrouped?E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-link-off"}),"Ungroup"]}):null},rW=({setIsOpened:e})=>{const t=wn.table;function n(){const o=t?.grid;if(!o)return;o.getData().collapseAllGroups(),e(!1)}return t?.grouping.isGrouped?E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-collapse-all-outline"}),"Collapse all groups"]}):null},sW=({setIsOpened:e})=>{function t(){const n=wn.table,o=n?.grid;if(!o||!n){e(!1);return}window.navigator.clipboard.writeText(n.downloadManager.createCSV(n)).then(()=>{}).catch(()=>{}),o.getSelectionModel()&&o.setSelectedRows([]),e(!1)}return E.jsxs(cn.Li,{onClick:t,children:[E.jsx(cn.Icon,{className:"sgi sgi-content-copy"}),"Copy to clipboard"]})},iW=({setIsOpened:e})=>{const t=wn.table;function n(){const o=t?.grid;if(!o)return;o.getData().expandAllGroups(),e(!1)}return t?.grouping.isGrouped?E.jsxs(cn.Li,{onClick:n,children:[E.jsx(cn.Icon,{className:"sgi sgi-expand-all-outline"}),"Expand all groups"]}):null},aW=({clientId:e,clientName:t,setIsOpened:n})=>{function o(){const r=wn.table;r?.printer.print(r,e,t),n(!1)}return E.jsxs(cn.Li,{onClick:o,children:[E.jsx(cn.Icon,{className:"sgi sgi-printer"}),"Print"]})},lW=({clientId:e,clientName:t})=>{const[n,o]=Fe.useState(!1);return GB(o),n?E.jsxs(Fe.Fragment,{children:[E.jsx(Ih,{setIsOpened:o}),E.jsx(Nh,{id:$b,children:E.jsxs(cn.Ul,{children:[E.jsx(aW,{clientId:e,clientName:t,setIsOpened:o}),E.jsx(sW,{setIsOpened:o}),E.jsx(QB,{clientId:e,clientName:t,setIsOpened:o}),E.jsx(tW,{setIsOpened:o}),E.jsx(oW,{setIsOpened:o}),E.jsx(JB,{setIsOpened:o}),E.jsx(iW,{setIsOpened:o}),E.jsx(rW,{setIsOpened:o}),E.jsx(nW,{setIsOpened:o})]})})]}):null},Vb="header-context-menu";function cW(e){Fe.useEffect(()=>{function t(){e(!0),setTimeout(()=>{const n=document.getElementById(Vb);if(!n)return;const{x:o,y:r}=uo;Mh(n,o,r)},0)}return uo.subscribe(t),()=>{uo.unsubscribe(t)}},[])}function Kh(e){const t=uo.table;if(!t?.columnPicker)return;t.columnPicker.visibleColumnIds=[...e];const n=t.grid;if(!n)return;n.setColumns(t.columnPicker.initialColumns.filter(({id:r})=>e.includes(r)));const o=t.filter.args;t.filter.register(n,t.id),or.highlightAllColumns(o,t.id),t.totalCalculator?.calculate(n)}const dW=({setChecked:e})=>{function t(){const n=uo.table;if(!n?.columnPicker)return;const o=n.columnPicker.initialColumns.map(({id:r})=>r);e(o),Kh(o)}return E.jsx(ko,{onClick:t,size:"small",sx:{textTransform:"none"},variant:"contained",children:"Check all"})},uW=({checked:e,setChecked:t})=>{function n(){const o=e.filter(r=>r==="_checkbox_selector"||r==="isEdited");t(o),Kh(o)}return E.jsx(ko,{onClick:n,size:"small",sx:{textTransform:"none"},variant:"contained",children:"Uncheck all"})},hW=ie(ko)({display:"flex",alignItems:"center",justifyContent:"flex-start",columnGap:"0.5em",textTransform:"none",color:"#1E456F",padding:"0"}),fW=ie(fc)({padding:0}),ng={Checkbox:fW,Button:hW},pW=({checked:e,columnId:t,columnName:n,setChecked:o})=>{function r(){const i=e.indexOf(t),a=[...e];~i?a.splice(i,1):a.push(t),o(a),Kh(a)}return E.jsxs(ng.Button,{onClick:r,children:[E.jsx(ng.Checkbox,{checked:e.includes(t),size:"small"}),E.jsx(oo,{children:n})]})},mW=ie(oo)({color:"#1e456f",marginBottom:"0.6em",fontSize:"1rem"}),gW={Wrapper:mW},yW=()=>E.jsx(gW.Wrapper,{className:"header-context-menu-header",children:"Columns"}),vW=ie(oo)({columnGap:"0.5em",display:"flex",justifyContent:"flex-end",marginTop:"0.5em"}),bW=ie(oo)({maxHeight:"35em",overflowY:"auto"}),og={ButtonsGroup:vW,ItemsGroup:bW},wW=()=>{const[e,t]=Fe.useState([]),[n,o]=Fe.useState(!1);if(cW(o),Fe.useEffect(()=>{if(!n)return;const i=uo.table;i?.columnPicker&&t([...i.columnPicker.visibleColumnIds])},[n]),!n)return null;const r=uo.table;return r?.columnPicker?E.jsxs(Fe.Fragment,{children:[E.jsx(Ih,{setIsOpened:o}),E.jsxs(Nh,{id:Vb,children:[E.jsx(yW,{}),E.jsx(og.ItemsGroup,{children:r.columnPicker.initialColumns.filter(({id:i})=>i!=="_checkbox_selector"&&i!=="isEdited").map(({id:i,name:a})=>E.jsx(Fe.Fragment,{children:E.jsx(pW,{checked:e,columnId:i,columnName:a,setChecked:t})},i))}),E.jsxs(og.ButtonsGroup,{className:"header-context-menu-footer",children:[E.jsx(dW,{setChecked:t}),E.jsx(uW,{checked:e,setChecked:t})]})]})]}):null};exports.Autocomplete=CF;exports.ColumnFilters=qB;exports.ColumnPicker=DD;exports.ColumnSorter=Kv;exports.ContextMenu=lW;exports.DecoratorColumnFilter=ZA;exports.DecoratorFilter=Nv;exports.DefaultHotKeys=ID;exports.DefaultPrinter=Wv;exports.DeletedRowsFilter=VN;exports.EColumnFilter=je;exports.EColumnFiltersGroup=hn;exports.ESortType=Co;exports.FORMATTER_NUMBER=kF;exports.Filter=Iv;exports.HeaderContextMenu=wW;exports.HotKeysDecorator=mc;exports.PopupSummary=HF;exports.PreventCopying=ND;exports.RedoUndoOnly=AD;exports.Skeleton=TD;exports.SlickTable=oF;exports.SlickgridTable=zA;exports.TotalCalculator=NF;exports.WithSummary=$N;exports.WithoutHotKeys=By;exports.columnCheckboxSelector=YA;exports.columnIsEdited=qA;exports.commitCurrentEdit=Th;exports.copySelectedRows=zv;exports.formatNumber=Oh;exports.formatterGroupTotals=EF;exports.getDisplayedRows=Ec;exports.getFormatterNumber=Gv;exports.getNextId=Fl;exports.handleHeaderButtons=Av;exports.headerButtons=or;exports.hotKeysCopy=Eh;exports.hotKeysDelete=Hv;exports.hotKeysRedo=Ph;exports.hotKeysUndo=Dh;exports.openColumnFilter=BN;exports.openContextMenu=Yv;exports.useListenIfTablesWereEdited=mF;