/*! For license information please see main.6541e9e9.js.LICENSE.txt */ (function(){var __webpack_modules__={8700:function(e,t,n){"use strict";var r;function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n>16,a=n>>8&255,s=255&n;return"#"+(16777216+65536*(Math.round((r-i)*o)+i)+256*(Math.round((r-a)*o)+a)+(Math.round((r-s)*o)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(t,n){return e.isColorHex(n)?this.shadeHexColor(t,n):this.shadeRGBColor(t,n)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===a(e)&&!Array.isArray(e)&&null!=e}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,n=[];for(t=0;tt.length?e:t}))),e.length>t.length?e:t}),0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==e.substring(0,1)&&(e="#999999");var n=e.replace("#","");n=n.match(new RegExp("(.{"+n.length/3+"})","g"));for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"x",n=e.toString().slice();return n.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,n){if(n>=e.length)for(var r=n-e.length+1;r--;)e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e.style.key=t[n])}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var r=e.indexOf("Edge/");return r>0&&parseInt(e.substring(r+5,e.indexOf(".",r)),10)}}]),e}(),g=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.setEasingFunctions()}return l(e,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":default:e="<>";break;case"swing":e=function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1};break;case"bounce":e=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375};break;case"elastic":e=function(e){return e===!!e?e:Math.pow(2,-10*e)*Math.sin((e-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,n,r){e.attr(t).animate(r).attr(n)}},{key:"animateMarker",value:function(e,t,n,r,o,i){t||(t=0),e.attr({r:t,width:t,height:t}).animate(r,o).attr({r:n,width:n.width,height:n.height}).afterAll((function(){i()}))}},{key:"animateCircle",value:function(e,t,n,r,o){e.attr({r:t.r,cx:t.cx,cy:t.cy}).animate(r,o).attr({r:n.r,cx:n.cx,cy:n.cy})}},{key:"animateRect",value:function(e,t,n,r,o){e.attr(t).animate(r).attr(n).afterAll((function(){return o()}))}},{key:"animatePathsGradually",value:function(e){var t=e.el,n=e.realIndex,r=e.j,o=e.fill,i=e.pathFrom,a=e.pathTo,s=e.speed,c=e.delay,l=this.w,p=0;l.config.chart.animations.animateGradually.enabled&&(p=l.config.chart.animations.animateGradually.delay),l.config.chart.animations.dynamicAnimation.enabled&&l.globals.dataChanged&&"bar"!==l.config.chart.type&&(p=0),this.morphSVG(t,n,r,"line"!==l.config.chart.type||l.globals.comboCharts?o:"stroke",i,a,s,c*p)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(e){e.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,n,r,o,i,a,s){var c=this,l=this.w;o||(o=e.attr("pathFrom")),i||(i=e.attr("pathTo"));var p=function(e){return"radar"===l.config.chart.type&&(a=1),"M 0 ".concat(l.globals.gridHeight)};(!o||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=p()),(!i||i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i=p()),l.globals.shouldAnimate||(a=1),e.plot(o).animate(1,l.globals.easing,s).plot(o).animate(a,l.globals.easing,s).plot(i).afterAll((function(){m.isNumber(n)?n===l.globals.series[l.globals.maxValsInArrayIndex].length-2&&l.globals.shouldAnimate&&c.animationCompleted(e):"none"!==r&&l.globals.shouldAnimate&&(!l.globals.comboCharts&&t===l.globals.series.length-1||l.globals.comboCharts)&&c.animationCompleted(e),c.showDelayedElements()}))}}]),e}(),v=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"getDefaultFilter",value:function(e,t){var n=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==n.config.states.normal.filter?this.applyFilter(e,t,n.config.states.normal.filter.type,n.config.states.normal.filter.value):n.config.chart.dropShadow.enabled&&this.dropShadow(e,n.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var n=this.w;n.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,n.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,n){var r=this,o=this.w,i=n.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter((function(e){var n=o.config.chart.dropShadow;(n.enabled?r.addShadow(e,t,n):e).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:i}})})),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,n){var r=this,o=this.w,i=n.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter((function(e){var n=o.config.chart.dropShadow;(n.enabled?r.addShadow(e,t,n):e).componentTransfer({rgb:{type:"linear",slope:i}})})),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(n){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:r});break;case"darken":this.addDarkenFilter(e,t,{intensity:r})}}},{key:"addShadow",value:function(e,t,n){var r=n.blur,o=n.top,i=n.left,a=n.color,s=n.opacity,c=e.flood(Array.isArray(a)?a[t]:a,s).composite(e.sourceAlpha,"in").offset(i,o).gaussianBlur(r).merge(e.source);return e.blend(e.source,c)}},{key:"dropShadow",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.top,o=t.left,i=t.blur,a=t.color,s=t.opacity,c=t.noUserSpaceOnUse,l=this.w;return e.unfilter(!0),m.isIE()&&"radialBar"===l.config.chart.type||(a=Array.isArray(a)?a[n]:a,e.filter((function(e){var t;t=m.isSafari()||m.isFirefox()||m.isIE()?e.flood(a,s).composite(e.sourceAlpha,"in").offset(o,r).gaussianBlur(i):e.flood(a,s).composite(e.sourceAlpha,"in").offset(o,r).gaussianBlur(i).merge(e.source),e.blend(e.source,t)})),c||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,n){var r=this.w;if(void 0!==r.globals.selectedDataPoints[t]&&r.globals.selectedDataPoints[t].indexOf(n)>-1){e.node.setAttribute("selected",!0);var o=r.config.states.active.filter;"none"!==o&&this.applyFilter(e,t,o.type,o.value)}}},{key:"_scaleFilterSize",value:function(e){!function(t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),e}(),A=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"drawLine",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt",c=this.w,l=c.globals.dom.Paper.line().attr({x1:e,y1:t,x2:n,y2:r,stroke:o,"stroke-dasharray":i,"stroke-width":a,"stroke-linecap":s});return l}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,p=this.w,u=p.globals.dom.Paper.rect();return u.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,rx:o,ry:o,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==c?c:"none","stroke-dasharray":l}),u.node.setAttribute("fill",i),u}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",o=this.w,i=o.globals.dom.Paper.polygon(e).attr({fill:r,stroke:t,"stroke-width":n});return i}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.w;e<0&&(e=0);var r=n.globals.dom.Paper.circle(2*e);return null!==t&&r.attr(t),r}},{key:"drawPath",value:function(e){var t=e.d,n=void 0===t?"":t,r=e.stroke,o=void 0===r?"#a8a8a8":r,i=e.strokeWidth,a=void 0===i?1:i,s=e.fill,c=e.fillOpacity,l=void 0===c?1:c,p=e.strokeOpacity,u=void 0===p?1:p,d=e.classes,b=e.strokeLinecap,f=void 0===b?null:b,h=e.strokeDashArray,M=void 0===h?0:h,z=this.w;return null===f&&(f=z.config.stroke.lineCap),(n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n="M 0 ".concat(z.globals.gridHeight)),z.globals.dom.Paper.path(n).attr({fill:s,"fill-opacity":l,stroke:o,"stroke-opacity":u,"stroke-linecap":f,"stroke-width":a,"stroke-dasharray":M,class:d})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,n=t.globals.dom.Paper.group();return null!==e&&n.attr(e),n}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null;return null===n?r=["L",e,t].join(" "):"H"===n?r=["H",e].join(" "):"V"===n&&(r=["V",t].join(" ")),r}},{key:"curve",value:function(e,t,n,r,o,i){return["C",e,t,n,r,o,i].join(" ")}},{key:"quadraticCurve",value:function(e,t,n,r){return["Q",e,t,n,r].join(" ")}},{key:"arc",value:function(e,t,n,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c="A";s&&(c="a");var l=[c,e,t,n,r,o,i,a].join(" ");return l}},{key:"renderPaths",value:function(e){var t,n=e.j,r=e.realIndex,o=e.pathFrom,a=e.pathTo,s=e.stroke,c=e.strokeWidth,l=e.strokeLinecap,p=e.fill,u=e.animationDelay,d=e.initialSpeed,b=e.dataChangeSpeed,f=e.className,h=e.shouldClipToGrid,M=void 0===h||h,z=e.bindEventsOnPaths,O=void 0===z||z,m=e.drawShadow,A=void 0===m||m,y=this.w,x=new v(this.ctx),q=new g(this.ctx),w=this.w.config.chart.animations.enabled,W=w&&this.w.config.chart.animations.dynamicAnimation.enabled,R=!!(w&&!y.globals.resized||W&&y.globals.dataChanged&&y.globals.shouldAnimate);R?t=o:(t=a,y.globals.animationEnded=!0);var C,_=y.config.stroke.dashArray;C=Array.isArray(_)?_[r]:y.config.stroke.dashArray;var S=this.drawPath({d:t,stroke:s,strokeWidth:c,fill:p,fillOpacity:1,classes:f,strokeLinecap:l,strokeDashArray:C});if(S.attr("index",r),M&&S.attr({"clip-path":"url(#gridRectMask".concat(y.globals.cuid,")")}),"none"!==y.config.states.normal.filter.type)x.getDefaultFilter(S,r);else if(y.config.chart.dropShadow.enabled&&A&&(!y.config.chart.dropShadow.enabledOnSeries||y.config.chart.dropShadow.enabledOnSeries&&-1!==y.config.chart.dropShadow.enabledOnSeries.indexOf(r))){var k=y.config.chart.dropShadow;x.dropShadow(S,k,r)}O&&(S.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,S)),S.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,S)),S.node.addEventListener("mousedown",this.pathMouseDown.bind(this,S))),S.attr({pathTo:a,pathFrom:o});var L={el:S,j:n,realIndex:r,pathFrom:o,pathTo:a,fill:p,strokeWidth:c,delay:u};return!w||y.globals.resized||y.globals.dataChanged?!y.globals.resized&&y.globals.dataChanged||q.showDelayedElements():q.animatePathsGradually(i(i({},L),{},{speed:d})),y.globals.dataChanged&&W&&R&&q.animatePathsGradually(i(i({},L),{},{speed:b})),S}},{key:"drawPattern",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=this.w,a=i.globals.dom.Paper.pattern(t,n,(function(i){"horizontalLines"===e?i.line(0,0,n,0).stroke({color:r,width:o+1}):"verticalLines"===e?i.line(0,0,0,t).stroke({color:r,width:o+1}):"slantedLines"===e?i.line(0,0,t,n).stroke({color:r,width:o}):"squares"===e?i.rect(t,n).fill("none").stroke({color:r,width:o}):"circles"===e&&i.circle(t).fill("none").stroke({color:r,width:o})}));return a}},{key:"drawGradient",value:function(e,t,n,r,o){var i,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,p=this.w;t.length<9&&0===t.indexOf("#")&&(t=m.hexToRgba(t,r)),n.length<9&&0===n.indexOf("#")&&(n=m.hexToRgba(n,o));var u=0,d=1,b=1,f=null;null!==s&&(u=void 0!==s[0]?s[0]/100:0,d=void 0!==s[1]?s[1]/100:1,b=void 0!==s[2]?s[2]/100:1,f=void 0!==s[3]?s[3]/100:null);var h=!("donut"!==p.config.chart.type&&"pie"!==p.config.chart.type&&"polarArea"!==p.config.chart.type&&"bubble"!==p.config.chart.type);if(i=null===c||0===c.length?p.globals.dom.Paper.gradient(h?"radial":"linear",(function(e){e.at(u,t,r),e.at(d,n,o),e.at(b,n,o),null!==f&&e.at(f,t,r)})):p.globals.dom.Paper.gradient(h?"radial":"linear",(function(e){(Array.isArray(c[l])?c[l]:c).forEach((function(t){e.at(t.offset/100,t.color,t.opacity)}))})),h){var M=p.globals.gridWidth/2,z=p.globals.gridHeight/2;"bubble"!==p.config.chart.type?i.attr({gradientUnits:"userSpaceOnUse",cx:M,cy:z,r:a}):i.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===e?i.from(0,0).to(0,1):"diagonal"===e?i.from(0,0).to(1,1):"horizontal"===e?i.from(0,1).to(1,1):"diagonal2"===e&&i.from(1,0).to(0,1);return i}},{key:"getTextBasedOnMaxWidth",value:function(e){var t=e.text,n=e.maxWidth,r=e.fontSize,o=e.fontFamily,i=this.getTextRects(t,r,o),a=i.width/t.length,s=Math.floor(n/a);return n-1){var s=n.globals.selectedDataPoints[o].indexOf(i);n.globals.selectedDataPoints[o].splice(s,1)}}else{if(!n.config.states.active.allowMultipleDataPointsSelection&&n.globals.selectedDataPoints.length>0){n.globals.selectedDataPoints=[];var c=n.globals.dom.Paper.select(".apexcharts-series path").members,l=n.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,p=function(e){Array.prototype.forEach.call(e,(function(e){e.node.setAttribute("selected","false"),r.getDefaultFilter(e,o)}))};p(c),p(l)}e.node.setAttribute("selected","true"),a="true",void 0===n.globals.selectedDataPoints[o]&&(n.globals.selectedDataPoints[o]=[]),n.globals.selectedDataPoints[o].push(i)}if("true"===a){var u=n.config.states.active.filter;if("none"!==u)r.applyFilter(e,o,u.type,u.value);else if("none"!==n.config.states.hover.filter&&!n.globals.isTouchDevice){var d=n.config.states.hover.filter;r.applyFilter(e,o,d.type,d.value)}}else"none"!==n.config.states.active.filter.type&&("none"===n.config.states.hover.filter.type||n.globals.isTouchDevice?r.getDefaultFilter(e,o):(d=n.config.states.hover.filter,r.applyFilter(e,o,d.type,d.value)));"function"==typeof n.config.chart.events.dataPointSelection&&n.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:n.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:i,w:n}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:n.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:i,w:n}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&"function"==typeof e.getBBox&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=this.w,a=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:n,foreColor:"#fff",opacity:0});r&&a.attr("transform",r),i.globals.dom.Paper.add(a);var s=a.bbox();return o||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(e,t,n){if("function"==typeof e.getComputedTextLength&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=n/1.1)){for(var r=t.length-3;r>0;r-=3)if(e.getSubStringLength(0,r)<=n/1.1)return void(e.textContent=t.substring(0,r)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n])}}]),e}(),y=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"getStackedSeriesTotals",value:function(){var e=this.w,t=[];if(0===e.globals.series.length)return t;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;return null===e?this.w.config.series.reduce((function(e,t){return e+t}),0):this.w.globals.series[e].reduce((function(e,t){return e+t}),0)}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter((function(e){return null!==e})):this.w.config.series[e].data.filter((function(e){return null!==e}))).length}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every((function(e,t,n){return e===n[0]}))}},{key:"getCategoryLabels",value:function(e){var t=this.w,n=e.slice();return t.config.xaxis.convertedCatToNumeric&&(n=e.map((function(e,n){return t.config.xaxis.labels.formatter(e-t.globals.minX+1)}))),n}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map((function(e){return e.length})).indexOf(Math.max.apply(Math,e.globals.series.map((function(e){return e.length}))))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach((function(e){t=Math.max(t,e)})),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach((function(e){t=Math.max(t,e.size)})),t>0&&(t+=e.config.markers.hover.sizeOffset+1),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map((function(e,t){var n=0;if(Array.isArray(e))for(var r=0;re&&n.globals.seriesX[o][a]0&&(t=!0),{comboBarCount:n,comboCharts:t}}},{key:"extendArrayProps",value:function(e,t,n){return t.yaxis&&(t=e.extendYAxis(t,n)),t.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t.annotations.xaxis&&(t=e.extendXAxisAnnotations(t)),t.annotations.points&&(t=e.extendPointAnnotations(t))),t}}]),e}(),x=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t}return l(e,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.w;if("vertical"===e.label.orientation){var r=null!==t?t:0,o=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(r,"']"));if(null!==o){var i=o.getBoundingClientRect();o.setAttribute("x",parseFloat(o.getAttribute("x"))-i.height+4),"top"===e.label.position?o.setAttribute("y",parseFloat(o.getAttribute("y"))+i.width):o.setAttribute("y",parseFloat(o.getAttribute("y"))-i.width);var a=this.annoCtx.graphics.rotateAroundCenter(o),s=a.x,c=a.y;o.setAttribute("transform","rotate(-90 ".concat(s," ").concat(c,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var n=this.w;if(!e||void 0===t.label.text||void 0!==t.label.text&&!String(t.label.text).trim())return null;var r=n.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),o=e.getBoundingClientRect(),i=t.label.style.padding.left,a=t.label.style.padding.right,s=t.label.style.padding.top,c=t.label.style.padding.bottom;"vertical"===t.label.orientation&&(s=t.label.style.padding.left,c=t.label.style.padding.right,i=t.label.style.padding.top,a=t.label.style.padding.bottom);var l=o.left-r.left-i,p=o.top-r.top-s,u=this.annoCtx.graphics.drawRect(l-n.globals.barPadForNumericAxis,p,o.width+i+a,o.height+s+c,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&u.node.classList.add(t.id),u}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,n=function(n,r,o){var i=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(r,"']"));if(i){var a=i.parentNode,s=e.addBackgroundToAnno(i,n);s&&(a.insertBefore(s.node,i),n.label.mouseEnter&&s.node.addEventListener("mouseenter",n.label.mouseEnter.bind(e,n)),n.label.mouseLeave&&s.node.addEventListener("mouseleave",n.label.mouseLeave.bind(e,n)),n.label.click&&s.node.addEventListener("click",n.label.click.bind(e,n)))}};t.config.annotations.xaxis.map((function(e,t){n(e,t,"xaxis")})),t.config.annotations.yaxis.map((function(e,t){n(e,t,"yaxis")})),t.config.annotations.points.map((function(e,t){n(e,t,"point")}))}},{key:"getY1Y2",value:function(e,t){var n,r="y1"===e?t.y:t.y2,o=this.w;if(this.annoCtx.invertAxis){var i=o.globals.labels.indexOf(r);o.config.xaxis.convertedCatToNumeric&&(i=o.globals.categoryLabels.indexOf(r));var a=o.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(i+1)+")");a&&(n=parseFloat(a.getAttribute("y")))}else{var s;s=o.config.yaxis[t.yAxisIndex].logarithmic?(r=new y(this.annoCtx.ctx).getLogVal(r,t.yAxisIndex))/o.globals.yLogRatio[t.yAxisIndex]:(r-o.globals.minYArr[t.yAxisIndex])/(o.globals.yRange[t.yAxisIndex]/o.globals.gridHeight),n=o.globals.gridHeight-s,!t.marker||void 0!==t.y&&null!==t.y||(n=0),o.config.yaxis[t.yAxisIndex]&&o.config.yaxis[t.yAxisIndex].reversed&&(n=s)}return n}},{key:"getX1X2",value:function(e,t){var n=this.w,r=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,o=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,i=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,a=(t.x-r)/(i/n.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(a=(o-t.x)/(i/n.globals.gridWidth)),"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||n.globals.dataFormatXNumeric||(a=this.getStringX(t.x));var s=(t.x2-r)/(i/n.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(s=(o-t.x2)/(i/n.globals.gridWidth)),"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||n.globals.dataFormatXNumeric||(s=this.getStringX(t.x2)),void 0!==t.x&&null!==t.x||!t.marker||(a=n.globals.gridWidth),"x1"===e?a:s}},{key:"getStringX",value:function(e){var t=this.w,n=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var r=t.globals.labels.indexOf(e),o=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(r+1)+")");return o&&(n=parseFloat(o.getAttribute("x"))),n}}]),e}(),q=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new x(this.annoCtx)}return l(e,[{key:"addXaxisAnnotation",value:function(e,t,n){var r,o=this.w,i=this.helpers.getX1X2("x1",e),a=e.label.text,s=e.strokeDashArray;if(m.isNumber(i)){if(null===e.x2||void 0===e.x2){var c=this.annoCtx.graphics.drawLine(i+e.offsetX,0+e.offsetY,i+e.offsetX,o.globals.gridHeight+e.offsetY,e.borderColor,s,e.borderWidth);t.appendChild(c.node),e.id&&c.node.classList.add(e.id)}else{if((r=this.helpers.getX1X2("x2",e))a){var l=a;a=r,r=l}var p=this.annoCtx.graphics.drawRect(0+e.offsetX,r+e.offsetY,this._getYAxisAnnotationWidth(e),a-r,0,e.fillColor,e.opacity,1,e.borderColor,i);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),t.appendChild(p.node),e.id&&p.node.classList.add(e.id)}var u="right"===e.label.position?o.globals.gridWidth:0,d=this.annoCtx.graphics.drawText({x:u+e.label.offsetX,y:(null!=r?r:a)+e.label.offsetY-3,text:s,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});d.attr({rel:n}),t.appendChild(d.node)}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return t.globals.gridWidth,(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.map((function(t,r){e.addYaxisAnnotation(t,n.node,r)})),n}}]),e}(),W=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t,this.helpers=new x(this.annoCtx)}return l(e,[{key:"addPointAnnotation",value:function(e,t,n){this.w;var r=this.helpers.getX1X2("x1",e),o=this.helpers.getY1Y2("y1",e);if(m.isNumber(r)){var i={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},a=this.annoCtx.graphics.drawMarker(r+e.marker.offsetX,o+e.marker.offsetY,i);t.appendChild(a.node);var s=e.label.text?e.label.text:"",c=this.annoCtx.graphics.drawText({x:r+e.label.offsetX,y:o+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:s,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(c.attr({rel:n}),t.appendChild(c.node),e.customSVG.SVG){var l=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});l.attr({transform:"translate(".concat(r+e.customSVG.offsetX,", ").concat(o+e.customSVG.offsetY,")")}),l.node.innerHTML=e.customSVG.SVG,t.appendChild(l.node)}if(e.image.path){var p=e.image.width?e.image.width:20,u=e.image.height?e.image.height:20;a=this.annoCtx.addImage({x:r+e.image.offsetX-p/2,y:o+e.image.offsetY-u/2,width:p,height:u,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&a.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&a.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&a.node.addEventListener("click",e.click.bind(this,e))}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((function(t,r){e.addPointAnnotation(t,n.node,r)})),n}}]),e}(),R={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},C=function(){function e(){s(this,e),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return l(e,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[R],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(e){return new Date(e).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal"}},bubble:{minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce((function(e,t){return e+t}),0)/e.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce((function(e,t){return e+t}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return null!==e?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),e}(),_=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.graphics=new A(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new x(this),this.xAxisAnnotations=new q(this),this.yAxisAnnotations=new w(this),this.pointsAnnotations=new W(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return l(e,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),o=e.config.chart.animations.enabled,i=[t,n,r],a=[n.node,t.node,r.node],s=0;s<3;s++)e.globals.dom.elGraphical.add(i[s]),!o||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&a[s].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map((function(t,n){e.addImage(t,n)}))}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map((function(t,n){e.addText(t,n)}))}},{key:"addXaxisAnnotation",value:function(e,t,n){this.xAxisAnnotations.addXaxisAnnotation(e,t,n)}},{key:"addYaxisAnnotation",value:function(e,t,n){this.yAxisAnnotations.addYaxisAnnotation(e,t,n)}},{key:"addPointAnnotation",value:function(e,t,n){this.pointsAnnotations.addPointAnnotation(e,t,n)}},{key:"addText",value:function(e,t){var n=e.x,r=e.y,o=e.text,i=e.textAnchor,a=e.foreColor,s=e.fontSize,c=e.fontFamily,l=e.fontWeight,p=e.cssClass,u=e.backgroundColor,d=e.borderWidth,b=e.strokeDashArray,f=e.borderRadius,h=e.borderColor,M=e.appendTo,z=void 0===M?".apexcharts-annotations":M,O=e.paddingLeft,m=void 0===O?4:O,g=e.paddingRight,v=void 0===g?4:g,A=e.paddingBottom,y=void 0===A?2:A,x=e.paddingTop,q=void 0===x?2:x,w=this.w,W=this.graphics.drawText({x:n,y:r,text:o,textAnchor:i||"start",fontSize:s||"12px",fontWeight:l||"regular",fontFamily:c||w.config.chart.fontFamily,foreColor:a||w.config.chart.foreColor,cssClass:p}),R=w.globals.dom.baseEl.querySelector(z);R&&R.appendChild(W.node);var C=W.bbox();if(o){var _=this.graphics.drawRect(C.x-m,C.y-q,C.width+m+v,C.height+y+q,f,u||"transparent",1,d,h,b);R.insertBefore(_.node,W.node)}}},{key:"addImage",value:function(e,t){var n=this.w,r=e.path,o=e.x,i=void 0===o?0:o,a=e.y,s=void 0===a?0:a,c=e.width,l=void 0===c?20:c,p=e.height,u=void 0===p?20:p,d=e.appendTo,b=void 0===d?".apexcharts-annotations":d,f=n.globals.dom.Paper.image(r);f.size(l,u).move(i,s);var h=n.globals.dom.baseEl.querySelector(b);return h&&h.appendChild(f.node),f}},{key:"addXaxisAnnotationExternal",value:function(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:"xaxis",contextMethod:n.addXaxisAnnotation}),n}},{key:"addYaxisAnnotationExternal",value:function(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:"yaxis",contextMethod:n.addYaxisAnnotation}),n}},{key:"addPointAnnotationExternal",value:function(e,t,n){return void 0===this.invertAxis&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:"point",contextMethod:n.addPointAnnotation}),n}},{key:"addAnnotationExternal",value:function(e){var t=e.params,n=e.pushToMemory,r=e.context,o=e.type,i=e.contextMethod,a=r,s=a.w,c=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations")),l=c.childNodes.length+1,p=new C,u=Object.assign({},"xaxis"===o?p.xAxisAnnotation:"yaxis"===o?p.yAxisAnnotation:p.pointAnnotation),d=m.extend(u,t);switch(o){case"xaxis":this.addXaxisAnnotation(d,c,l);break;case"yaxis":this.addYaxisAnnotation(d,c,l);break;case"point":this.addPointAnnotation(d,c,l)}var b=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(l,"']")),f=this.helpers.addBackgroundToAnno(b,d);return f&&c.insertBefore(f.node,b),n&&s.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:m.randomId(),method:i,label:"addAnnotation",params:t}),r}},{key:"clearAnnotations",value:function(e){var t=e.w,n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map((function(e,n){"addText"!==e.label&&"addAnnotation"!==e.label||t.globals.memory.methodsToExec.splice(n,1)})),n=m.listToArray(n),Array.prototype.forEach.call(n,(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}))}},{key:"removeAnnotation",value:function(e,t){var n=e.w,r=n.globals.dom.baseEl.querySelectorAll(".".concat(t));r&&(n.globals.memory.methodsToExec.map((function(e,r){e.id===t&&n.globals.memory.methodsToExec.splice(r,1)})),Array.prototype.forEach.call(r,(function(e){e.parentElement.removeChild(e)})))}}]),e}(),S=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.opts=null,this.seriesIndex=0}return l(e,[{key:"clippedImgArea",value:function(e){var t=this.w,n=t.config,r=parseInt(t.globals.gridWidth,10),o=parseInt(t.globals.gridHeight,10),i=r>o?r:o,a=e.image,s=0,c=0;void 0===e.width&&void 0===e.height?void 0!==n.fill.image.width&&void 0!==n.fill.image.height?(s=n.fill.image.width+1,c=n.fill.image.height):(s=i+1,c=i):(s=e.width,c=e.height);var l=document.createElementNS(t.globals.SVGNS,"pattern");A.setAttrs(l,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:s+"px",height:c+"px"});var p=document.createElementNS(t.globals.SVGNS,"image");l.appendChild(p),p.setAttributeNS(window.SVG.xlink,"href",a),A.setAttrs(p,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:c+"px"}),p.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(l)}},{key:"getSeriesIndex",value:function(e){var t=this.w;return("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||"heatmap"===t.config.chart.type||"treemap"===t.config.chart.type?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var n,r,o,i=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var a=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(a=t.globals.seriesColors[this.seriesIndex]),"function"==typeof a&&(a=a({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var s=this.getFillType(this.seriesIndex),c=Array.isArray(i.fill.opacity)?i.fill.opacity[this.seriesIndex]:i.fill.opacity;e.color&&(a=e.color);var l=a;if(-1===a.indexOf("rgb")?a.length<9&&(l=m.hexToRgba(a,c)):a.indexOf("rgba")>-1&&(c=m.getOpacityFromRGBA(a)),e.opacity&&(c=e.opacity),"pattern"===s&&(r=this.handlePatternFill(r,a,c,l)),"gradient"===s&&(o=this.handleGradientFill(a,c,this.seriesIndex)),"image"===s){var p=i.fill.image.src,u=e.patternID?e.patternID:"";this.clippedImgArea({opacity:c,image:Array.isArray(p)?e.seriesNumber-1&&(p=m.getOpacityFromRGBA(l));var u=void 0===o.fill.gradient.opacityTo?t:Array.isArray(o.fill.gradient.opacityTo)?o.fill.gradient.opacityTo[n]:o.fill.gradient.opacityTo;if(void 0===o.fill.gradient.gradientToColors||0===o.fill.gradient.gradientToColors.length)r="dark"===o.fill.gradient.shade?s.shadeColor(-1*parseFloat(o.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?m.rgb2hex(e):e):s.shadeColor(parseFloat(o.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?m.rgb2hex(e):e);else if(o.fill.gradient.gradientToColors[i.seriesNumber]){var d=o.fill.gradient.gradientToColors[i.seriesNumber];r=d,d.indexOf("rgba")>-1&&(u=m.getOpacityFromRGBA(d))}else r=e;if(o.fill.gradient.inverseColors){var b=l;l=r,r=b}return l.indexOf("rgb")>-1&&(l=m.rgb2hex(l)),r.indexOf("rgb")>-1&&(r=m.rgb2hex(r)),a.drawGradient(c,l,r,p,u,i.size,o.fill.gradient.stops,o.fill.gradient.colorStops,n)}}]),e}(),k=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],a=this.w,s=t,c=e,l=null,p=new A(this.ctx),u=a.config.markers.discrete&&a.config.markers.discrete.length;if((a.globals.markers.size[t]>0||i||u)&&(l=p.group({class:i||u?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(c.x))for(var d=0;d0:a.config.markers.size>0;if(h||i||u){m.isNumber(c.y[d])?f+=" w".concat(m.randomId()):f="apexcharts-nullpoint";var M=this.getMarkerConfig({cssClass:f,seriesIndex:t,dataPointIndex:b});a.config.series[s].data[b]&&(a.config.series[s].data[b].fillColor&&(M.pointFillColor=a.config.series[s].data[b].fillColor),a.config.series[s].data[b].strokeColor&&(M.pointStrokeColor=a.config.series[s].data[b].strokeColor)),r&&(M.pSize=r),(o=p.drawMarker(c.x[d],c.y[d],M)).attr("rel",b),o.attr("j",b),o.attr("index",t),o.node.setAttribute("default-marker-size",M.pSize);var z=new v(this.ctx);z.setSelectionFilter(o,t,b),this.addEvents(o),l&&l.add(o)}else void 0===a.globals.pointsArray[t]&&(a.globals.pointsArray[t]=[]),a.globals.pointsArray[t].push([c.x[d],c.y[d]])}return l}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,n=e.seriesIndex,r=e.dataPointIndex,o=void 0===r?null:r,i=e.finishRadius,a=void 0===i?null:i,s=this.w,c=this.getMarkerStyle(n),l=s.globals.markers.size[n],p=s.config.markers;return null!==o&&p.discrete.length&&p.discrete.map((function(e){e.seriesIndex===n&&e.dataPointIndex===o&&(c.pointStrokeColor=e.strokeColor,c.pointFillColor=e.fillColor,l=e.size,c.pointShape=e.shape)})),{pSize:null===a?l:a,pRadius:p.radius,width:Array.isArray(p.width)?p.width[n]:p.width,height:Array.isArray(p.height)?p.height[n]:p.height,pointStrokeWidth:Array.isArray(p.strokeWidth)?p.strokeWidth[n]:p.strokeWidth,pointStrokeColor:c.pointStrokeColor,pointFillColor:c.pointFillColor,shape:c.pointShape||(Array.isArray(p.shape)?p.shape[n]:p.shape),class:t,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[n]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[n]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[n]:p.fillOpacity,seriesIndex:n}}},{key:"addEvents",value:function(e){var t=this.w,n=new A(this.ctx);e.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",n.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",n.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,n=t.globals.markers.colors,r=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(r)?r[e]:r,pointFillColor:Array.isArray(n)?n[e]:n}}}]),e}(),L=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return l(e,[{key:"draw",value:function(e,t,n){var r=this.w,o=new A(this.ctx),i=n.realIndex,a=n.pointsPos,s=n.zRatio,c=n.elParent,l=o.group({class:"apexcharts-series-markers apexcharts-series-".concat(r.config.chart.type)});if(l.attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),Array.isArray(a.x))for(var p=0;ph.maxBubbleRadius&&(f=h.maxBubbleRadius)}r.config.chart.animations.enabled||(b=f);var M=a.x[p],z=a.y[p];if(b=b||0,null!==z&&void 0!==r.globals.series[i][u]||(d=!1),d){var O=this.drawPoint(M,z,b,f,i,u,t);l.add(O)}c.add(l)}}},{key:"drawPoint",value:function(e,t,n,r,o,i,a){var s=this.w,c=o,l=new g(this.ctx),p=new v(this.ctx),u=new S(this.ctx),d=new k(this.ctx),b=new A(this.ctx),f=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:c,dataPointIndex:i,finishRadius:"bubble"===s.config.chart.type||s.globals.comboCharts&&s.config.series[o]&&"bubble"===s.config.series[o].type?r:null});r=f.pSize;var h,M=u.fillPath({seriesNumber:o,dataPointIndex:i,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:s.globals.series[o][a]});if("circle"===f.shape?h=b.drawCircle(n):"square"!==f.shape&&"rect"!==f.shape||(h=b.drawRect(0,0,f.width-f.pointStrokeWidth/2,f.height-f.pointStrokeWidth/2,f.pRadius)),s.config.series[c].data[i]&&s.config.series[c].data[i].fillColor&&(M=s.config.series[c].data[i].fillColor),h.attr({x:e-f.width/2-f.pointStrokeWidth/2,y:t-f.height/2-f.pointStrokeWidth/2,cx:e,cy:t,fill:M,"fill-opacity":f.pointFillOpacity,stroke:f.pointStrokeColor,r:r,"stroke-width":f.pointStrokeWidth,"stroke-dasharray":f.pointStrokeDashArray,"stroke-opacity":f.pointStrokeOpacity}),s.config.chart.dropShadow.enabled){var z=s.config.chart.dropShadow;p.dropShadow(h,z,o)}if(!this.initialAnim||s.globals.dataChanged||s.globals.resized)s.globals.animationEnded=!0;else{var O=s.config.chart.animations.speed;l.animateMarker(h,0,"circle"===f.shape?r:{width:f.width,height:f.height},O,s.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(h)}),100)}))}if(s.globals.dataChanged&&"circle"===f.shape)if(this.dynamicAnim){var m,y,x,q,w=s.config.chart.animations.dynamicAnimation.speed;null!=(q=s.globals.previousPaths[o]&&s.globals.previousPaths[o][a])&&(m=q.x,y=q.y,x=void 0!==q.r?q.r:r);for(var W=0;Ws.globals.gridHeight+u&&(t=s.globals.gridHeight+u/2),void 0===s.globals.dataLabelsRects[r]&&(s.globals.dataLabelsRects[r]=[]),s.globals.dataLabelsRects[r].push({x:e,y:t,width:p,height:u});var d=s.globals.dataLabelsRects[r].length-2,b=void 0!==s.globals.lastDrawnDataLabelsIndexes[r]?s.globals.lastDrawnDataLabelsIndexes[r][s.globals.lastDrawnDataLabelsIndexes[r].length-1]:0;if(void 0!==s.globals.dataLabelsRects[r][d]){var f=s.globals.dataLabelsRects[r][b];(e>f.x+f.width+2||t>f.y+f.height+2||e+p4&&void 0!==arguments[4]?arguments[4]:2,i=this.w,a=new A(this.ctx),s=i.config.dataLabels,c=0,l=0,p=n,u=null;if(!s.enabled||!Array.isArray(e.x))return u;u=a.group({class:"apexcharts-data-labels"});for(var d=0;dt.globals.gridWidth+h.textRects.width+10)&&(s="");var M=t.globals.dataLabels.style.colors[i];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(M=t.globals.dataLabels.style.colors[a]),"function"==typeof M&&(M=M({series:t.globals.series,seriesIndex:i,dataPointIndex:a,w:t})),d&&(M=d);var z=u.offsetX,O=u.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(z=0,O=0),h.drawnextLabel){var m=n.drawText({width:100,height:parseInt(u.style.fontSize,10),x:r+z,y:o+O,foreColor:M,textAnchor:c||u.textAnchor,text:s,fontSize:l||u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight||"normal"});if(m.attr({class:"apexcharts-datalabel",cx:r,cy:o}),u.dropShadow.enabled){var g=u.dropShadow;new v(this.ctx).dropShadow(m,g)}p.add(m),void 0===t.globals.lastDrawnDataLabelsIndexes[i]&&(t.globals.lastDrawnDataLabelsIndexes[i]=[]),t.globals.lastDrawnDataLabelsIndexes[i].push(a)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var n=this.w,r=n.config.dataLabels.background,o=r.padding,i=r.padding/2,a=t.width,s=t.height,c=new A(this.ctx).drawRect(t.x-o,t.y-i/2,a+2*o,s+i,r.borderRadius,"transparent"===n.config.chart.background?"#fff":n.config.chart.background,r.opacity,r.borderWidth,r.borderColor);return r.dropShadow.enabled&&new v(this.ctx).dropShadow(c,r.dropShadow),c}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),n=0;nn.globals.gridHeight&&(p=n.globals.gridHeight-d)),{bcx:a,bcy:i,dataLabelsX:t,dataLabelsY:p}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,n=e.x,r=e.i,o=e.j,i=e.bcy,a=e.barHeight,s=e.barWidth,c=e.textRects,l=e.dataLabelsX,p=e.strokeWidth,u=e.barDataLabelsConfig,d=e.offX,b=e.offY,f=t.globals.gridHeight/t.globals.dataPoints;s=Math.abs(s);var h=i-(this.barCtx.isRangeBar?0:f)+a/2+c.height/2+b-3,M=this.barCtx.series[r][o]<0,z=n;switch(this.barCtx.isReversed&&(z=n+s-(M?2*s:0),n=t.globals.gridWidth-s),u.position){case"center":l=M?z+s/2-d:Math.max(c.width/2,z-s/2)+d;break;case"bottom":l=M?z+s-p-Math.round(c.width/2)-d:z-s+p+Math.round(c.width/2)+d;break;case"top":l=M?z-p+Math.round(c.width/2)-d:z-p-Math.round(c.width/2)+d}return t.config.chart.stacked||(l<0?l=l+c.width+p:l+c.width/2>t.globals.gridWidth&&(l=t.globals.gridWidth-c.width-p)),{bcx:n,bcy:i,dataLabelsX:l,dataLabelsY:h}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,n=e.y,r=e.val,o=e.i,a=e.j,s=e.textRects,c=e.barHeight,l=e.barWidth,p=e.dataLabelsConfig,u=this.w,d="rotate(0)";"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(t,", ").concat(n,")"));var b=new E(this.barCtx.ctx),f=new A(this.barCtx.ctx),h=p.formatter,M=null,z=u.globals.collapsedSeriesIndices.indexOf(o)>-1;if(p.enabled&&!z){M=f.group({class:"apexcharts-data-labels",transform:d});var O="";void 0!==r&&(O=h(r,{seriesIndex:o,dataPointIndex:a,w:u}));var m=u.globals.series[o][a]<0,g=u.config.plotOptions.bar.dataLabels.position;"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&("top"===g&&(p.textAnchor=m?"end":"start"),"center"===g&&(p.textAnchor="middle"),"bottom"===g&&(p.textAnchor=m?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&lMath.abs(l)&&(O=""):s.height/1.6>Math.abs(c)&&(O=""));var v=i({},p);this.barCtx.isHorizontal&&r<0&&("start"===p.textAnchor?v.textAnchor="end":"end"===p.textAnchor&&(v.textAnchor="start")),b.plotDataLabelsText({x:t,y:n,text:O,i:o,j:a,parent:M,dataLabelsConfig:v,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return M}}]),e}(),N=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.legendInactiveClass="legend-mouseover-inactive"}return l(e,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(m.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var t=this.getSeriesByName(e),n=parseInt(t.getAttribute("data:realIndex"),10);return{isHidden:t.classList.contains("apexcharts-series-collapsed"),realIndex:n}}},{key:"addCollapsedClassToSeries",value:function(e,t){var n=this.w;function r(n){for(var r=0;r0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.w,o=m.clone(r.globals.initialSeries);r.globals.previousPaths=[],n?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),r.config.series=o,e&&(t&&(r.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(o,r.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,n=0;n-1&&(e[n].data=[]);return e}},{key:"toggleSeriesOnHover",value:function(e,t){var n=this.w;t||(t=e.target);var r=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===e.type){var o=parseInt(t.getAttribute("rel"),10)-1,i=null,a=null;n.globals.axisCharts||"radialBar"===n.config.chart.type?n.globals.axisCharts?(i=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(o,"']")),a=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(o,"']"))):i=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(o+1,"']")):i=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(o+1,"'] path"));for(var s=0;s=e.from&&r<=e.to&&o[t].classList.remove(n.legendInactiveClass)}}(r.config.plotOptions.heatmap.colorScale.ranges[a])}else"mouseout"===e.type&&i("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",n=this.w,r=0;if(n.config.series.length>1)for(var o=n.config.series.map((function(t,r){var o=!1;return e&&(o="bar"===n.config.series[r].type||"column"===n.config.series[r].type),t.data&&t.data.length>0&&!o?r:-1})),i="asc"===t?0:o.length-1;"asc"===t?i=0;"asc"===t?i++:i--)if(-1!==o[i]){r=o[i];break}return r}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(t,n,r){for(var o=t[n].childNodes,i={type:r,paths:[],realIndex:t[n].getAttribute("data:realIndex")},a=0;a0)for(var r=function(t){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(t,"'] rect")),r=[],o=function(e){var t=function(t){return n[e].getAttribute(t)},o={x:parseFloat(t("x")),y:parseFloat(t("y")),width:parseFloat(t("width")),height:parseFloat(t("height"))};r.push({rect:o,color:n[e].getAttribute("color")})},i=0;i0)for(var r=0;r0?e:[]}))}}]),e}(),P=function(){function e(t){s(this,e),this.w=t.w,this.barCtx=t}return l(e,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var n=0;n0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[n].length),t.globals.isXNumeric)for(var r=0;rt.globals.minX&&t.globals.seriesX[n][r]0&&(r=c.globals.minXDiff/u),(i=r/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(i=1)}a=c.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?c.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),e=c.globals.padHorizontal+(r-i*this.barCtx.seriesLen)/2}return{x:e,y:t,yDivision:n,xDivision:r,barHeight:o,barWidth:i,zeroH:a,zeroW:s}}},{key:"getPathFillColor",value:function(e,t,n,r){var o=this.w,i=new S(this.barCtx.ctx),a=null,s=this.barCtx.barOptions.distributed?n:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(r){e[t][n]>=r.from&&e[t][n]<=r.to&&(a=r.color)})),o.config.series[t].data[n]&&o.config.series[t].data[n].fillColor&&(a=o.config.series[t].data[n].fillColor),i.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:r,dataPointIndex:n,color:a,value:e[t][n]})}},{key:"getStrokeWidth",value:function(e,t,n){var r=0,o=this.w;return void 0===this.barCtx.series[e][t]||null===this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,o.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),r}},{key:"barBackground",value:function(e){var t=e.j,n=e.i,r=e.x1,o=e.x2,i=e.y1,a=e.y2,s=e.elSeries,c=this.w,l=new A(this.barCtx.ctx),p=new N(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&p===n){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var u=this.barCtx.barOptions.colors.backgroundBarColors[t],d=l.drawRect(void 0!==r?r:0,void 0!==i?i:0,void 0!==o?o:c.globals.gridWidth,void 0!==a?a:c.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,u,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(d),d.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t=e.barWidth,n=e.barXPosition,r=e.yRatio,o=e.y1,i=e.y2,a=e.strokeWidth,s=e.series,c=e.realIndex,l=e.i,p=e.j,u=e.w,d=new A(this.barCtx.ctx);(a=Array.isArray(a)?a[c]:a)||(a=0);var b={barWidth:t,strokeWidth:a,yRatio:r,barXPosition:n,y1:o,y2:i},f=this.getRoundedBars(u,b,s,l,p),h=n,M=n+t,z=d.move(h,o),O=d.move(h,o),m=d.line(M-a,o);return u.globals.previousPaths.length>0&&(O=this.barCtx.getPreviousPath(c,p,!1)),z=z+d.line(h,f.y2)+f.pathWithRadius+d.line(M-a,f.y2)+m+m+"z",O=O+d.line(h,o)+m+m+m+m+m+d.line(h,o),u.config.chart.stacked&&(this.barCtx.yArrj.push(f.y2WithRadius),this.barCtx.yArrjF.push(Math.abs(o-f.y2WithRadius)),this.barCtx.yArrjVal.push(this.barCtx.series[l][p])),{pathTo:z,pathFrom:O}}},{key:"getBarpaths",value:function(e){var t=e.barYPosition,n=e.barHeight,r=e.x1,o=e.x2,i=e.strokeWidth,a=e.series,s=e.realIndex,c=e.i,l=e.j,p=e.w,u=new A(this.barCtx.ctx);(i=Array.isArray(i)?i[s]:i)||(i=0);var d={barHeight:n,strokeWidth:i,barYPosition:t,x2:o,x1:r},b=this.getRoundedBars(p,d,a,c,l),f=u.move(r,t),h=u.move(r,t);p.globals.previousPaths.length>0&&(h=this.barCtx.getPreviousPath(s,l,!1));var M=t,z=t+n,O=u.line(r,z-i);return f=f+u.line(b.x2,M)+b.pathWithRadius+u.line(b.x2,z-i)+O+O+"z",h=h+u.line(r,M)+O+O+O+O+O+u.line(r,M),p.config.chart.stacked&&(this.barCtx.xArrj.push(b.x2WithRadius),this.barCtx.xArrjF.push(Math.abs(r-b.x2WithRadius)),this.barCtx.xArrjVal.push(this.barCtx.series[c][l])),{pathTo:f,pathFrom:h}}},{key:"getRoundedBars",value:function(e,t,n,r,o){var i=new A(this.barCtx.ctx),a=0,s=e.config.plotOptions.bar.borderRadius,c=Array.isArray(s);if(a=c?s[r>s.length-1?s.length-1:r]:s,e.config.chart.stacked&&n.length>1&&r!==this.barCtx.radiusOnSeriesNumber&&!c&&(a=0),this.barCtx.isHorizontal){var l="",p=t.x2;if(Math.abs(t.x1-t.x2)0:n[r][o]<0;u&&(a*=-1),p-=a,l=i.quadraticCurve(p+a,t.barYPosition,p+a,t.barYPosition+(u?-1*a:a))+i.line(p+a,t.barYPosition+t.barHeight-t.strokeWidth-(u?-1*a:a))+i.quadraticCurve(p+a,t.barYPosition+t.barHeight-t.strokeWidth,p,t.barYPosition+t.barHeight-t.strokeWidth)}return{pathWithRadius:l,x2WithRadius:p+a,x2:p}}var d="",b=t.y2;if(Math.abs(t.y1-t.y2)=0;a--)this.barCtx.zeroSerieses.indexOf(a)>-1&&a===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var s=t.length-1;s>=0;s--)n.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n?t:null;return null!=e&&(r=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n?t:null;return null!=e&&(r=t-e/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),r}},{key:"getGoalValues",value:function(e,t,n,r,o){var i=this,a=this.w,s=[];return a.globals.seriesGoals[r]&&a.globals.seriesGoals[r][o]&&Array.isArray(a.globals.seriesGoals[r][o])&&a.globals.seriesGoals[r][o].forEach((function(r){var o;s.push((p(o={},e,"x"===e?i.getXForValue(r.value,t,!1):i.getYForValue(r.value,n,!1)),p(o,"attrs",r),o))})),s}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,n=e.barYPosition,r=e.goalX,o=e.goalY,i=e.barWidth,a=e.barHeight,s=new A(this.barCtx.ctx),c=s.group({className:"apexcharts-bar-goals-groups"}),l=null;return this.barCtx.isHorizontal?Array.isArray(r)&&r.forEach((function(e){var t=void 0!==e.attrs.strokeHeight?e.attrs.strokeHeight:a/2,r=n+t+a/2;l=s.drawLine(e.x,r-2*t,e.x,r,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),c.add(l)})):Array.isArray(o)&&o.forEach((function(e){var n=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:i/2,r=t+n+i/2;l=s.drawLine(r-2*n,e.y,r,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),c.add(l)})),c}}]),e}(),B=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w;var r=this.w;this.barOptions=r.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=r.config.stroke.width,this.isNullValue=!1,this.isRangeBar=r.globals.seriesRangeBar.length&&this.isHorizontal,this.xyRatios=n,null!==this.xyRatios&&(this.xRatio=n.xRatio,this.initialXRatio=n.initialXRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0,this.barHelpers=new P(this)}return l(e,[{key:"draw",value:function(e,t){var n=this.w,r=new A(this.ctx),o=new y(this.ctx,n);e=o.getLogSeries(e),this.series=e,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var a=r.group({class:"apexcharts-bar-series apexcharts-plot-series"});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var s=0,c=0;s0&&(this.visibleI=this.visibleI+1);var g=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=z),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;var x=this.barHelpers.initialPositions();f=x.y,g=x.barHeight,p=x.yDivision,d=x.zeroW,b=x.x,v=x.barWidth,l=x.xDivision,u=x.zeroH,this.horizontal||M.push(b+v/2);for(var q=r.group({class:"apexcharts-datalabels","data:realIndex":z}),w=r.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),W=0;W0&&M.push(b+v/2),h.push(f);var k=this.barHelpers.getPathFillColor(e,s,W,z);this.renderSeries({realIndex:z,pathFill:k,j:W,i:s,pathFrom:C.pathFrom,pathTo:C.pathTo,strokeWidth:R,elSeries:O,x:b,y:f,series:e,barHeight:g,barWidth:v,elDataLabelsWrap:q,elGoalsMarkers:w,visibleSeries:this.visibleI,type:"bar"})}n.globals.seriesXvalues[z]=M,n.globals.seriesYvalues[z]=h,a.add(O)}return a}},{key:"renderSeries",value:function(e){var t=e.realIndex,n=e.pathFill,r=e.lineFill,o=e.j,i=e.i,a=e.pathFrom,s=e.pathTo,c=e.strokeWidth,l=e.elSeries,p=e.x,u=e.y,d=e.y1,b=e.y2,f=e.series,h=e.barHeight,M=e.barWidth,z=e.barYPosition,O=e.elDataLabelsWrap,m=e.elGoalsMarkers,g=e.visibleSeries,y=e.type,x=this.w,q=new A(this.ctx);r||(r=this.barOptions.distributed?x.globals.stroke.colors[o]:x.globals.stroke.colors[t]),x.config.series[i].data[o]&&x.config.series[i].data[o].strokeColor&&(r=x.config.series[i].data[o].strokeColor),this.isNullValue&&(n="none");var w=o/x.config.chart.animations.animateGradually.delay*(x.config.chart.animations.speed/x.globals.dataPoints)/2.4,W=q.renderPaths({i:i,j:o,realIndex:t,pathFrom:a,pathTo:s,stroke:r,strokeWidth:c,strokeLineCap:x.config.stroke.lineCap,fill:n,animationDelay:w,initialSpeed:x.config.chart.animations.speed,dataChangeSpeed:x.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(y,"-area")});W.attr("clip-path","url(#gridRectMask".concat(x.globals.cuid,")"));var R=x.config.forecastDataPoints;R.count>0&&o>=x.globals.dataPoints-R.count&&(W.node.setAttribute("stroke-dasharray",R.dashArray),W.node.setAttribute("stroke-width",R.strokeWidth),W.node.setAttribute("fill-opacity",R.fillOpacity)),void 0!==d&&void 0!==b&&(W.attr("data-range-y1",d),W.attr("data-range-y2",b)),new v(this.ctx).setSelectionFilter(W,t,o),l.add(W);var C=new T(this).handleBarDataLabels({x:p,y:u,y1:d,y2:b,i:i,j:o,series:f,realIndex:t,barHeight:h,barWidth:M,barYPosition:z,renderedPath:W,visibleSeries:g});return null!==C&&O.add(C),l.add(O),m&&l.add(m),l}},{key:"drawBarPaths",value:function(e){var t=e.indexes,n=e.barHeight,r=e.strokeWidth,o=e.zeroW,i=e.x,a=e.y,s=e.yDivision,c=e.elSeries,l=this.w,p=t.i,u=t.j;l.globals.isXNumeric&&(a=(l.globals.seriesX[p][u]-l.globals.minX)/this.invertedXRatio-n);var d=a+n*this.visibleI;i=this.barHelpers.getXForValue(this.series[p][u],o);var b=this.barHelpers.getBarpaths({barYPosition:d,barHeight:n,x1:o,x2:i,strokeWidth:r,series:this.series,realIndex:t.realIndex,i:p,j:u,w:l});return l.globals.isXNumeric||(a+=s),this.barHelpers.barBackground({j:u,i:p,y1:d-n*this.visibleI,y2:n*this.seriesLen,elSeries:c}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x:i,y:a,goalX:this.barHelpers.getGoalValues("x",o,null,p,u),barYPosition:d}}},{key:"drawColumnPaths",value:function(e){var t=e.indexes,n=e.x,r=e.y,o=e.xDivision,i=e.barWidth,a=e.zeroH,s=e.strokeWidth,c=e.elSeries,l=this.w,p=t.realIndex,u=t.i,d=t.j,b=t.bc;if(l.globals.isXNumeric){var f=p;l.globals.seriesX[p].length||(f=l.globals.maxValsInArrayIndex),n=(l.globals.seriesX[f][d]-l.globals.minX)/this.xRatio-i*this.seriesLen/2}var h=n+i*this.visibleI;r=this.barHelpers.getYForValue(this.series[u][d],a);var M=this.barHelpers.getColumnPaths({barXPosition:h,barWidth:i,y1:a,y2:r,strokeWidth:s,series:this.series,realIndex:t.realIndex,i:u,j:d,w:l});return l.globals.isXNumeric||(n+=o),this.barHelpers.barBackground({bc:b,j:d,i:u,x1:h-s/2-i*this.visibleI,x2:i*this.seriesLen+s/2,elSeries:c}),{pathTo:M.pathTo,pathFrom:M.pathFrom,x:n,y:r,goalY:this.barHelpers.getGoalValues("y",null,a,u,d),barXPosition:h}}},{key:"getPreviousPath",value:function(e,t){for(var n,r=this.w,o=0;o0&&parseInt(i.realIndex,10)===parseInt(e,10)&&void 0!==r.globals.previousPaths[o].paths[t]&&(n=r.globals.previousPaths[o].paths[t].d)}return n}}]),e}(),X=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return l(e,[{key:"isValidDate",value:function(e){return!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var n=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(n)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var n=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,o=["\0"].concat(M(n.months)),i=["\x01"].concat(M(n.shortMonths)),a=["\x02"].concat(M(n.days)),s=["\x03"].concat(M(n.shortDays));function c(e,t){var n=e+"";for(t=t||2;n.length12?d-12:0===d?12:d;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+c(d))).replace(/(^|[^\\])H/g,"$1"+d)).replace(/(^|[^\\])hh+/g,"$1"+c(b))).replace(/(^|[^\\])h/g,"$1"+b);var f=r?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+c(f))).replace(/(^|[^\\])m/g,"$1"+f);var h=r?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+c(h))).replace(/(^|[^\\])s/g,"$1"+h);var z=r?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+c(z,3)),z=Math.round(z/10),t=t.replace(/(^|[^\\])ff/g,"$1"+c(z)),z=Math.round(z/10);var O=d<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+z)).replace(/(^|[^\\])TT+/g,"$1"+O)).replace(/(^|[^\\])T/g,"$1"+O.charAt(0));var m=O.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+m)).replace(/(^|[^\\])t/g,"$1"+m.charAt(0));var g=-e.getTimezoneOffset(),v=r||!g?"Z":g>0?"+":"-";if(!r){var A=(g=Math.abs(g))%60;v+=c(Math.floor(g/60))+":"+c(A)}t=t.replace(/(^|[^\\])K/g,"$1"+v);var y=(r?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(a[0],"g"),a[y])).replace(new RegExp(s[0],"g"),s[y])).replace(new RegExp(o[0],"g"),o[p])).replace(new RegExp(i[0],"g"),i[p])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,n){var r=this.w;void 0!==r.config.xaxis.min&&(e=r.config.xaxis.min),void 0!==r.config.xaxis.max&&(t=r.config.xaxis.max);var o=this.getDate(e),i=this.getDate(t),a=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,n){return this.determineDaysOfMonths(e,t)-n}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,n){var r=this.daysCntOfYear[t]+n;return t>1&&this.isLeapYear()&&r++,r}},{key:"determineDaysOfMonths",value:function(e,t){var n=30;switch(e=m.monthMod(e),!0){case this.months30.indexOf(e)>-1:2===e&&(n=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:n=31}return n}}]),e}(),j=function(e){u(n,B);var t=h(n);function n(){return s(this,n),t.apply(this,arguments)}return l(n,[{key:"draw",value:function(e,t){var n=this.w,r=new A(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=n.globals.seriesRangeStart,this.seriesRangeEnd=n.globals.seriesRangeEnd,this.barHelpers.initVariables(e);for(var o=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),a=0;a0&&(this.visibleI=this.visibleI+1);var h=0,M=0;this.yRatio.length>1&&(this.yaxisIndex=b);var z=this.barHelpers.initialPositions();u=z.y,l=z.zeroW,p=z.x,M=z.barWidth,s=z.xDivision,c=z.zeroH;for(var O=r.group({class:"apexcharts-datalabels","data:realIndex":b}),g=r.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),v=0;v0}));return r=c.config.plotOptions.bar.rangeBarGroupRows?o+a*d:o+i*this.visibleI+a*d,b>-1&&!c.config.plotOptions.bar.rangeBarOverlap&&(l=c.globals.seriesRangeBar[t][b].overlaps).indexOf(p)>-1&&(r=(i=s.barHeight/l.length)*this.visibleI+a*(100-parseInt(this.barOptions.barHeight,10))/100/2+i*(this.visibleI+l.indexOf(p))+a*d),{barYPosition:r,barHeight:i}}},{key:"drawRangeColumnPaths",value:function(e){var t=e.indexes,n=e.x;e.strokeWidth;var r=e.xDivision,o=e.barWidth,i=e.zeroH,a=this.w,s=t.i,c=t.j,l=this.yRatio[this.yaxisIndex],p=t.realIndex,u=this.getRangeValue(p,c),d=Math.min(u.start,u.end),b=Math.max(u.start,u.end);a.globals.isXNumeric&&(n=(a.globals.seriesX[s][c]-a.globals.minX)/this.xRatio-o/2);var f=n+o*this.visibleI;void 0===this.series[s][c]||null===this.series[s][c]?d=i:(d=i-d/l,b=i-b/l);var h=Math.abs(b-d),M=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:o,y1:d,y2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:t.realIndex,i:p,j:c,w:a});return a.globals.isXNumeric||(n+=r),{pathTo:M.pathTo,pathFrom:M.pathFrom,barHeight:h,x:n,y:b,goalY:this.barHelpers.getGoalValues("y",null,i,s,c),barXPosition:f}}},{key:"drawRangeBarPaths",value:function(e){var t=e.indexes,n=e.y,r=e.y1,o=e.y2,i=e.yDivision,a=e.barHeight,s=e.barYPosition,c=e.zeroW,l=this.w,p=c+r/this.invertedYRatio,u=c+o/this.invertedYRatio,d=Math.abs(u-p),b=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:p,x2:u,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:t.realIndex,realIndex:t.realIndex,j:t.j,w:l});return l.globals.isXNumeric||(n+=i),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:d,x:u,goalX:this.barHelpers.getGoalValues("x",c,null,t.realIndex,t.j),y:n}}},{key:"getRangeValue",value:function(e,t){var n=this.w;return{start:n.globals.seriesRangeStart[e][t],end:n.globals.seriesRangeEnd[e][t]}}},{key:"getTooltipValues",value:function(e){var t=e.ctx,n=e.seriesIndex,r=e.dataPointIndex,o=e.y1,i=e.y2,a=e.w,s=a.globals.seriesRangeStart[n][r],c=a.globals.seriesRangeEnd[n][r],l=a.globals.labels[r],p=a.config.series[n].name?a.config.series[n].name:"",u=a.config.tooltip.y.formatter,d=a.config.tooltip.y.title.formatter,b={w:a,seriesIndex:n,dataPointIndex:r,start:s,end:c};"function"==typeof d&&(p=d(p,b)),Number.isFinite(o)&&Number.isFinite(i)&&(s=o,c=i,a.config.series[n].data[r].x&&(l=a.config.series[n].data[r].x+":"),"function"==typeof u&&(l=u(l,b)));var f="",h="",M=a.globals.colors[n];if(void 0===a.config.tooltip.x.formatter)if("datetime"===a.config.xaxis.type){var z=new X(t);f=z.formatDate(z.getDate(s),a.config.tooltip.x.format),h=z.formatDate(z.getDate(c),a.config.tooltip.x.format)}else f=s,h=c;else f=a.config.tooltip.x.formatter(s),h=a.config.tooltip.x.formatter(c);return{start:s,end:c,startVal:f,endVal:h,ylabel:l,color:M,seriesName:p}}},{key:"buildCustomTooltipHTML",value:function(e){return'
'+(e.seriesName||"")+'
'+e.ylabel+' '+e.start+' - '+e.end+"
"}}]),n}(),I=function(){function e(t){s(this,e),this.opts=t}return l(e,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0,m.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var n=t.seriesIndex,r=t.dataPointIndex,o=t.w;return e._getBoxTooltip(o,n,r,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var n=t.seriesIndex,r=t.dataPointIndex,o=t.w;return e._getBoxTooltip(o,n,r,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){t.ctx;var n=t.seriesIndex,r=t.dataPointIndex,o=t.w,i=o.globals.seriesRangeStart[n][r];return o.globals.seriesRangeEnd[n][r]-i},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(e){var t=new j(e.ctx,null),n=t.getTooltipValues(e),r=n.color,o=n.seriesName,i=n.ylabel,a=n.startVal,s=n.endVal;return t.buildCustomTooltipHTML({color:r,seriesName:o,ylabel:i,start:a,end:s})}(e):function(e){var t=new j(e.ctx,null),n=t.getTooltipValues(e),r=n.color,o=n.seriesName,i=n.ylabel,a=n.start,s=n.end;return t.buildCustomTooltipHTML({color:r,seriesName:o,ylabel:i,start:a,end:s})}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(e){return m.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach((function(t,n){e.yaxis[n].min=0,e.yaxis[n].max=100})),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(e){return"number"==typeof e&&e?e.toFixed(0)+"%":e}),e}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,n){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(e){return m.isNumber(e)?Math.floor(e):e};var r=e.xaxis.labels.formatter,o=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return n&&n.length&&(o=n.map((function(e){return Array.isArray(e)?e:String(e)}))),o&&o.length&&(e.xaxis.labels.formatter=function(e){return m.isNumber(e)?r(o[Math.floor(e)-1]):r(e)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(e,t,n,r,o){var i=e.globals.seriesCandleO[t][n],a=e.globals.seriesCandleH[t][n],s=e.globals.seriesCandleM[t][n],c=e.globals.seriesCandleL[t][n],l=e.globals.seriesCandleC[t][n];return e.config.series[t].type&&e.config.series[t].type!==o?'
\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": ").concat(e.globals.series[t][n],"\n
"):'
')+"
".concat(r[0],': ')+i+"
"+"
".concat(r[1],': ')+a+"
"+(s?"
".concat(r[2],': ')+s+"
":"")+"
".concat(r[3],': ')+c+"
"+"
".concat(r[4],': ')+l+"
"}}]),e}(),D=function(){function e(t){s(this,e),this.opts=t}return l(e,[{key:"init",value:function(e){var t=e.responsiveOverride,n=this.opts,r=new C,o=new I(n);this.chartType=n.chart.type,"histogram"===this.chartType&&(n.chart.type="bar",n=m.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},n)),n=this.extendYAxis(n),n=this.extendAnnotations(n);var i=r.init(),s={};if(n&&"object"===a(n)){var c={};c=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(n.chart.type)?o[n.chart.type]():o.line(),n.chart.brush&&n.chart.brush.enabled&&(c=o.brush(c)),n.chart.stacked&&"100%"===n.chart.stackType&&(n=o.stacked100(n)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(n),n.xaxis=n.xaxis||window.Apex.xaxis||{},t||(n.xaxis.convertedCatToNumeric=!1),((n=this.checkForCatToNumericXAxis(this.chartType,c,n)).chart.sparkline&&n.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(c=o.sparkline(c)),s=m.extend(i,c)}var l=m.extend(s,window.Apex);return i=m.extend(l,n),this.handleUserInputErrors(i)}},{key:"checkForCatToNumericXAxis",value:function(e,t,n){var r=new I(n),o=("bar"===e||"boxPlot"===e)&&n.plotOptions&&n.plotOptions.bar&&n.plotOptions.bar.horizontal,i="pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e,a="datetime"!==n.xaxis.type&&"numeric"!==n.xaxis.type,s=n.xaxis.tickPlacement?n.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return o||i||!a||"between"===s||(n=r.convertCatToNumeric(n)),n}},{key:"extendYAxis",value:function(e,t){var n=new C;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=m.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[m.extend(n.yAxis,e.yaxis)]:e.yaxis=m.extendArray(e.yaxis,n.yAxis);var r=!1;e.yaxis.forEach((function(e){e.logarithmic&&(r=!0)}));var o=e.series;return t&&!o&&(o=t.config.series),r&&o.length!==e.yaxis.length&&o.length&&(e.yaxis=o.map((function(t,r){if(t.name||(o[r].name="series-".concat(r+1)),e.yaxis[r])return e.yaxis[r].seriesName=o[r].name,e.yaxis[r];var i=m.extend(n.yAxis,e.yaxis[0]);return i.show=!1,i}))),r&&o.length>1&&o.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),e}},{key:"extendAnnotations",value:function(e){return void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new C;return e.annotations.yaxis=m.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new C;return e.annotations.xaxis=m.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new C;return e.annotations.points=m.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.chart.background||(e.chart.background="#424242"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===t.chart.type&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),e}(),F=function(){function e(){s(this,e)}return l(e,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRangeBar=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasGroups=!1,e.groups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.xaxisLabelsCount=0,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=m.extend({},e),t.initialSeries=m.clone(e.series),t.lastXAxis=m.clone(t.initialConfig.xaxis),t.lastYAxis=m.clone(t.initialConfig.yaxis),t}}]),e}(),H=function(){function e(t){s(this,e),this.opts=t}return l(e,[{key:"init",value:function(){var e=new D(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new F).init(e)}}}]),e}(),V=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new y(this.ctx)}return l(e,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new N(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new N(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&void 0!==e[this.activeSeriesIndex].data[0]&&null!==e[this.activeSeriesIndex].data[0]&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var n=this.w.config,r=this.w.globals,o="boxPlot"===n.chart.type||"boxPlot"===n.series[t].type,i=0;i=5?this.twoDSeries.push(m.parseNumber(e[t].data[i][4])):this.twoDSeries.push(m.parseNumber(e[t].data[i][1])),r.dataFormatXNumeric=!0),"datetime"===n.xaxis.type){var a=new Date(e[t].data[i][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(e[t].data[i][0]);for(var s=0;s-1&&(i=this.activeSeriesIndex);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:this.ctx,r=this.w.config,o=this.w.globals,i=new X(n),a=r.labels.length>0?r.labels.slice():r.xaxis.categories.slice();o.isRangeBar="rangeBar"===r.chart.type&&o.isBarHorizontal,o.hasGroups="category"===r.xaxis.type&&r.xaxis.group.groups.length>0,o.hasGroups&&(o.groups=r.xaxis.group.groups);for(var s=function(){for(var e=0;e0&&(this.twoDSeriesX=a,o.seriesX.push(this.twoDSeriesX))),o.labels.push(this.twoDSeriesX);var l=e[c].data.map((function(e){return m.parseNumber(e)}));o.series.push(l)}o.seriesZ.push(this.threeDSeries),void 0!==e[c].name?o.seriesNames.push(e[c].name):o.seriesNames.push("series-"+parseInt(c+1,10)),void 0!==e[c].color?o.seriesColors.push(e[c].color):o.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,n=this.w.config;t.series=e.slice(),t.seriesNames=n.labels.slice();for(var r=0;r0?n.labels=t.xaxis.categories:t.labels.length>0?n.labels=t.labels.slice():this.fallbackToCategory?(n.labels=n.labels[0],n.seriesRangeBar.length&&(n.seriesRangeBar.map((function(e){e.forEach((function(e){n.labels.indexOf(e.x)<0&&e.x&&n.labels.push(e.x)}))})),n.labels=n.labels.filter((function(e,t,n){return n.indexOf(e)===t}))),t.xaxis.convertedCatToNumeric&&(new I(t).convertCatToNumericXaxis(t,this.ctx,n.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,n=this.w.config,r=[];if(t.axisCharts){if(t.series.length>0)if(this.isFormatXY())for(var o=n.series.map((function(e,t){return e.data.filter((function(e,t,n){return n.findIndex((function(t){return t.x===e.x}))===t}))})),i=o.reduce((function(e,t,n,r){return r[e].length>t.length?e:n}),0),a=0;a0&&n<100?e.toFixed(1):e.toFixed(0)}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?e.toFixed(1):e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter?t.globals.ttKeyFormatter=t.config.tooltip.x.formatter:t.globals.ttKeyFormatter=t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach((function(n,r){void 0!==n.labels.formatter?t.globals.yLabelFormatters[r]=n.labels.formatter:t.globals.yLabelFormatters[r]=function(o){return t.globals.xyCharts?Array.isArray(o)?o.map((function(t){return e.defaultYFormatter(t,n,r)})):e.defaultYFormatter(o,n,r):o}})),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce((function(e,t){return e.length>t.length?e:t}),0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),e}(),G=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"getLabel",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=this.w,c=void 0===e[r]?"":e[r],l=c,p=s.globals.xLabelFormatter,u=s.config.xaxis.labels.formatter,d=!1,b=new U(this.ctx),f=c;a&&(l=b.xLabelFormat(p,c,f,{i:r,dateFormatter:new X(this.ctx).formatDate,w:s}),void 0!==u&&(l=u(c,e[r],{i:r,dateFormatter:new X(this.ctx).formatDate,w:s})));var h=function(e){var n=null;return t.forEach((function(e){"month"===e.unit?n="year":"day"===e.unit?n="month":"hour"===e.unit?n="day":"minute"===e.unit&&(n="hour")})),n===e};t.length>0?(d=h(t[r].unit),n=t[r].position,l=t[r].value):"datetime"===s.config.xaxis.type&&void 0===u&&(l=""),void 0===l&&(l=""),l=Array.isArray(l)?l:l.toString();var M=new A(this.ctx),z={};z=s.globals.rotateXLabels&&a?M.getTextRects(l,parseInt(i,10),null,"rotate(".concat(s.config.xaxis.labels.rotate," 0 0)"),!1):M.getTextRects(l,parseInt(i,10));var O=!s.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(l)&&(0===l.indexOf("NaN")||0===l.toLowerCase().indexOf("invalid")||l.toLowerCase().indexOf("infinity")>=0||o.indexOf(l)>=0&&O)&&(l=""),{x:n,text:l,textRect:z,isBold:d}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,n){var r=this.w,o=r.config.xaxis.tickAmount;return"dataPoints"===o&&(o=Math.round(r.globals.gridWidth/120)),o>n||e%Math.round(n/(o+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,n,r,o){var i=this.w;if(0===e&&i.globals.skipFirstTimelinelabel&&(t.text=""),e===n-1&&i.globals.skipLastTimelinelabel&&(t.text=""),i.config.xaxis.labels.hideOverlappingLabels&&r.length>0){var a=o[o.length-1];t.x0){!0===s.config.yaxis[o].opposite&&(e+=r.width);for(var p=t;p>=0;p--){var u=l+t/10+s.config.yaxis[o].labels.offsetY-1;s.globals.isBarHorizontal&&(u=i*p),"heatmap"===s.config.chart.type&&(u+=i/2);var d=c.drawLine(e+n.offsetX-r.width+r.offsetX,u+r.offsetY,e+n.offsetX+r.offsetX,u+r.offsetY,r.color);a.add(d),l+=i}}}}]),e}(),Y=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"scaleSvgNode",value:function(e,t){var n=parseFloat(e.getAttributeNS(null,"width")),r=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",n*t),e.setAttributeNS(null,"height",r*t),e.setAttributeNS(null,"viewBox","0 0 "+n+" "+r)}},{key:"fixSvgStringForIe11",value:function(e){if(!m.isIE11())return e.replace(/ /g," ");var t=0,n=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(e){return 2===++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':e}));return(n=n.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){null==e&&(e=1);var t=this.w.globals.dom.Paper.svg();if(1!==e){var n=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(n,e),t=(new XMLSerializer).serializeToString(n)}return this.fixSvgStringForIe11(t)}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),n=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(r,(function(e){e.setAttribute("width",0)})),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[0].setAttribute("x2",-500)),n&&n[0]&&(n[0].setAttribute("y",-100),n[0].setAttribute("y1",-100),n[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise((function(n){var r=t.w,o=e?e.scale||e.width/r.globals.svgWidth:1;t.cleanup();var i=document.createElement("canvas");i.width=r.globals.svgWidth*o,i.height=parseInt(r.globals.dom.elWrap.style.height,10)*o;var a="transparent"===r.config.chart.background?"#fff":r.config.chart.background,s=i.getContext("2d");s.fillStyle=a,s.fillRect(0,0,i.width*o,i.height*o);var c=t.getSvgString(o);if(window.canvg&&m.isIE11()){var l=window.canvg.Canvg.fromString(s,c,{ignoreClear:!0,ignoreDimensions:!0});l.start();var p=i.msToBlob();l.stop(),n({blob:p})}else{var u="data:image/svg+xml,"+encodeURIComponent(c),d=new Image;d.crossOrigin="anonymous",d.onload=function(){if(s.drawImage(d,0,0),i.msToBlob){var e=i.msToBlob();n({blob:e})}else{var t=i.toDataURL("image/png");n({imgURI:t})}},d.src=u}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var e=this;this.dataURI().then((function(t){var n=t.imgURI,r=t.blob;r?navigator.msSaveOrOpenBlob(r,e.w.globals.chartID+".png"):e.triggerDownload(n,e.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(e){var t=this,n=e.series,r=e.fileName,o=e.columnDelimiter,i=void 0===o?",":o,a=e.lineDelimiter,s=void 0===a?"\n":a,c=this.w;n||(n=c.config.series);var l=[],p=[],u="",d=new V(this.ctx),b=new G(this.ctx),f=function(e){var n="";if(c.globals.axisCharts){if("category"===c.config.xaxis.type||c.config.xaxis.convertedCatToNumeric)if(c.globals.isBarHorizontal){var r=c.globals.yLabelFormatters[0],o=new N(t.ctx).getActiveConfigSeriesIndex();n=r(c.globals.labels[e],{seriesIndex:o,dataPointIndex:e,w:c})}else n=b.getLabel(c.globals.labels,c.globals.timescaleLabels,0,e).text;"datetime"===c.config.xaxis.type&&(c.config.xaxis.categories.length?n=c.config.xaxis.categories[e]:c.config.labels.length&&(n=c.config.labels[e]))}else n=c.config.labels[e];return Array.isArray(n)&&(n=n.join(" ")),m.isNumber(n)?n:n.split(i).join("")};l.push(c.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===c.config.chart.type?(l.push("minimum"),l.push("q1"),l.push("median"),l.push("q3"),l.push("maximum")):"candlestick"===c.config.chart.type?(l.push("open"),l.push("high"),l.push("low"),l.push("close")):"rangeBar"===c.config.chart.type?(l.push("minimum"),l.push("maximum")):n.map((function(e,t){var n=e.name?e.name:"series-".concat(t);c.globals.axisCharts&&l.push(n.split(i).join("")?n.split(i).join(""):"series-".concat(t))})),c.globals.axisCharts||(l.push(c.config.chart.toolbar.export.csv.headerValue),p.push(l.join(i))),n.map((function(e,t){c.globals.axisCharts?function(e,t){if(l.length&&0===t&&p.push(l.join(i)),e.data&&e.data.length)for(var r=0;r=10?c.config.chart.toolbar.export.csv.dateFormatter(o):m.isNumber(o)?o:o.split(i).join("")));for(var a=0;a0&&!n.globals.isBarHorizontal&&(this.xaxisLabels=n.globals.timescaleLabels.slice()),n.config.xaxis.overwriteCategories&&(this.xaxisLabels=n.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===n.config.xaxis.position?this.offY=0:this.offY=n.globals.gridHeight+1,this.offY=this.offY+n.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===n.config.chart.type&&n.config.plotOptions.bar.horizontal,this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.xaxisBorderWidth=n.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=n.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=n.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=n.config.xaxis.axisBorder.height,this.yaxis=n.config.yaxis[0]}return l(e,[{key:"drawXaxis",value:function(){var e=this.w,t=new A(this.ctx),n=t.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),r=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});n.add(r);for(var o=[],i=0;i6&&void 0!==arguments[6]?arguments[6]:{},l=[],p=[],u=this.w,d=c.xaxisFontSize||this.xaxisFontSize,b=c.xaxisFontFamily||this.xaxisFontFamily,f=c.xaxisForeColors||this.xaxisForeColors,h=c.fontWeight||u.config.xaxis.labels.style.fontWeight,M=c.cssClass||u.config.xaxis.labels.style.cssClass,z=u.globals.padHorizontal,O=r.length,m="category"===u.config.xaxis.type?u.globals.dataPoints:O;if(o){var g=m>1?m-1:m;a=u.globals.gridWidth/g,z=z+i(0,a)/2+u.config.xaxis.labels.offsetX}else a=u.globals.gridWidth/m,z=z+i(0,a)+u.config.xaxis.labels.offsetX;for(var v=function(o){var c=z-i(o,a)/2+u.config.xaxis.labels.offsetX;0===o&&1===O&&a/2===z&&1===m&&(c=u.globals.gridWidth/2);var g=s.axesUtils.getLabel(r,u.globals.timescaleLabels,c,o,l,d,e),v=28;if(u.globals.rotateXLabels&&e&&(v=22),e||(v=v+parseFloat(d)+(u.globals.xAxisLabelsHeight-u.globals.xAxisGroupLabelsHeight)+(u.globals.rotateXLabels?10:0)),g=void 0!==u.config.xaxis.tickAmount&&"dataPoints"!==u.config.xaxis.tickAmount&&"datetime"!==u.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(o,g,O):s.axesUtils.checkForOverflowingLabels(o,g,O,l,p),e&&g.text&&u.globals.xaxisLabelsCount++,u.config.xaxis.labels.show){var A=t.drawText({x:g.x,y:s.offY+u.config.xaxis.labels.offsetY+v-("top"===u.config.xaxis.position?u.globals.xAxisHeight+u.config.xaxis.axisTicks.height-2:0),text:g.text,textAnchor:"middle",fontWeight:g.isBold?600:h,fontSize:d,fontFamily:b,foreColor:Array.isArray(f)?e&&u.config.xaxis.convertedCatToNumeric?f[u.globals.minX+o-1]:f[o]:f,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+M});if(n.add(A),e){var y=document.createElementNS(u.globals.SVGNS,"title");y.textContent=Array.isArray(g.text)?g.text.join(" "):g.text,A.node.appendChild(y),""!==g.text&&(l.push(g.text),p.push(g))}}or.globals.gridWidth)){var i=this.offY+r.config.xaxis.axisTicks.offsetY;if(t=t+i+r.config.xaxis.axisTicks.height,"top"===r.config.xaxis.position&&(t=i-r.config.xaxis.axisTicks.height),r.config.xaxis.axisTicks.show){var a=new A(this.ctx).drawLine(e+r.config.xaxis.axisTicks.offsetX,i+r.config.xaxis.offsetY,o+r.config.xaxis.axisTicks.offsetX,t+r.config.xaxis.offsetY,r.config.xaxis.axisTicks.color);n.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],n=this.xaxisLabels.length,r=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var o=0;o0){var l=o[o.length-1].getBBox(),p=o[0].getBBox();l.x<-20&&o[o.length-1].parentNode.removeChild(o[o.length-1]),p.x+p.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&o[0].parentNode.removeChild(o[0]);for(var u=0;u0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return l(e,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,n=new A(this.ctx);null===e&&(e=n.group({class:"apexcharts-grid"}));var r=n.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),o=n.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(o),e.add(r),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,n=new A(this.ctx),r=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var o=0;e.config.stroke.width.forEach((function(e){o=Math.max(o,e)})),r=o}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var i=e.config.chart.type,a=0,s=0;("bar"===i||"rangeBar"===i||"candlestick"===i||"boxPlot"===i||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(a=e.config.grid.padding.left,s=e.config.grid.padding.right,t.barPadForNumericAxis>a&&(a=t.barPadForNumericAxis,s=t.barPadForNumericAxis)),t.dom.elGridRect=n.drawRect(-r/2-a-2,-r/2,t.gridWidth+r+s+a+4,t.gridHeight+r,0,"#fff");var c=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=n.drawRect(2*-c,2*-c,t.gridWidth+4*c,t.gridHeight+4*c,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var l=t.dom.baseEl.querySelector("defs");l.appendChild(t.dom.elGridRectMask),l.appendChild(t.dom.elForecastMask),l.appendChild(t.dom.elNonForecastMask),l.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,n=e.x1,r=e.y1,o=e.x2,i=e.y2,a=e.xCount,s=e.parent,c=this.w;if(!(0===t&&c.globals.skipFirstTimelinelabel||t===a-1&&c.globals.skipLastTimelinelabel&&!c.config.xaxis.labels.formatter||"radar"===c.config.chart.type)){c.config.grid.xaxis.lines.show&&this._drawGridLine({x1:n,y1:r,x2:o,y2:i,parent:s});var l=0;if(c.globals.hasGroups&&"between"===c.config.xaxis.tickPlacement){var p=c.globals.groups;if(p){for(var u=0,d=0;u2));o++);return!e.globals.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(r=e.globals.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(n=e.config.xaxis.tickAmount)),this._drawXYLines({xCount:n,tickAmount:r})):(n=r,r=e.globals.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:r})),this.drawGridBands(n,r),{el:this.elg,xAxisTickWidth:e.globals.gridWidth/n}}},{key:"drawGridBands",value:function(e,t){var n=this.w;if(void 0!==n.config.grid.row.colors&&n.config.grid.row.colors.length>0)for(var r=0,o=n.globals.gridHeight/t,i=n.globals.gridWidth,a=0,s=0;a=n.config.grid.row.colors.length&&(s=0),this._drawGridBandRect({c:s,x1:0,y1:r,x2:i,y2:o,type:"row"}),r+=n.globals.gridHeight/t;if(void 0!==n.config.grid.column.colors&&n.config.grid.column.colors.length>0)for(var c=n.globals.isBarHorizontal||"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric?e:e-1,l=n.globals.padHorizontal,p=n.globals.padHorizontal+n.globals.gridWidth/c,u=n.globals.gridHeight,d=0,b=0;d=n.config.grid.column.colors.length&&(b=0),this._drawGridBandRect({c:b,x1:l,y1:0,x2:p,y2:u,type:"column"}),l+=n.globals.gridWidth/c}}]),e}(),$=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"niceScale",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=this.w,a=Math.abs(t-e);if("dataPoints"===(n=this._adjustTicksForSmallRange(n,r,a))&&(n=i.globals.dataPoints-1),e===Number.MIN_VALUE&&0===t||!m.isNumber(e)&&!m.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE){e=0,t=n;var s=this.linearScale(e,t,n);return s}e>t?(console.warn("axis.min cannot be greater than axis.max"),t=e+.1):e===t&&(e=0===e?0:e-.5,t=0===t?2:t+.5);var c=[];a<1&&o&&("candlestick"===i.config.chart.type||"candlestick"===i.config.series[r].type||"boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[r].type||i.globals.isRangeData)&&(t*=1.01);var l=n+1;l<2?l=2:l>2&&(l-=2);var p=a/l,u=Math.floor(m.log10(p)),d=Math.pow(10,u),b=Math.round(p/d);b<1&&(b=1);var f=b*d,h=f*Math.floor(e/f),M=f*Math.ceil(t/f),z=h;if(o&&a>2){for(;c.push(z),!((z+=f)>M););return{result:c,niceMin:c[0],niceMax:c[c.length-1]}}var O=e;(c=[]).push(O);for(var g=Math.abs(t-e)/n,v=0;v<=n;v++)O+=g,c.push(O);return c[c.length-2]>=t&&c.pop(),{result:c,niceMin:c[0],niceMax:c[c.length-1]}}},{key:"linearScale",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length>3?arguments[3]:void 0,o=Math.abs(t-e);"dataPoints"===(n=this._adjustTicksForSmallRange(n,r,o))&&(n=this.w.globals.dataPoints-1);var i=o/n;n===Number.MAX_VALUE&&(n=10,i=1);for(var a=[],s=e;n>=0;)a.push(s),s+=i,n-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(e,t,n){t<=0&&(t=Math.max(e,n)),e<=0&&(e=Math.min(t,n));for(var r=[],o=Math.ceil(Math.log(t)/Math.log(n)+1),i=Math.floor(Math.log(e)/Math.log(n));i5)r.allSeriesCollapsed=!1,r.yAxisScale[e]=this.logarithmicScale(t,n,i.logBase),r.yAxisScale[e]=i.forceNiceScale?this.logarithmicScaleNice(t,n,i.logBase):this.logarithmicScale(t,n,i.logBase);else if(n!==-Number.MAX_VALUE&&m.isNumber(n))if(r.allSeriesCollapsed=!1,void 0===i.min&&void 0===i.max||i.forceNiceScale){var s=void 0===o.yaxis[e].max&&void 0===o.yaxis[e].min||o.yaxis[e].forceNiceScale;r.yAxisScale[e]=this.niceScale(t,n,i.tickAmount?i.tickAmount:a<5&&a>1?a+1:5,e,s)}else r.yAxisScale[e]=this.linearScale(t,n,i.tickAmount,e);else r.yAxisScale[e]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(e,t){var n=this.w,r=n.globals,o=n.config.xaxis,i=Math.abs(t-e);return t!==-Number.MAX_VALUE&&m.isNumber(t)?r.xAxisScale=this.linearScale(e,t,o.tickAmount?o.tickAmount:i<5&&i>1?i+1:5,0):r.xAxisScale=this.linearScale(0,5,5),r.xAxisScale}},{key:"setMultipleYScales",value:function(){var e=this,t=this.w.globals,n=this.w.config,r=t.minYArr.concat([]),o=t.maxYArr.concat([]),i=[];n.yaxis.forEach((function(t,a){var s=a;n.series.forEach((function(e,n){e.name===t.seriesName&&(s=n,a!==n?i.push({index:n,similarIndex:a,alreadyExists:!0}):i.push({index:n}))}));var c=r[s],l=o[s];e.setYScaleForIndex(a,c,l)})),this.sameScaleInMultipleAxes(r,o,i)}},{key:"sameScaleInMultipleAxes",value:function(e,t,n){var r=this,o=this.w.config,i=this.w.globals,a=[];n.forEach((function(e){e.alreadyExists&&(void 0===a[e.index]&&(a[e.index]=[]),a[e.index].push(e.index),a[e.index].push(e.similarIndex))})),i.yAxisSameScaleIndices=a,a.forEach((function(e,t){a.forEach((function(n,r){var o,i;t!==r&&(o=e,i=n,o.filter((function(e){return-1!==i.indexOf(e)}))).length>0&&(a[t]=a[t].concat(a[r]))}))}));var s=a.map((function(e){return e.filter((function(t,n){return e.indexOf(t)===n}))})).map((function(e){return e.sort()}));a=a.filter((function(e){return!!e}));var c=s.slice(),l=c.map((function(e){return JSON.stringify(e)}));c=c.filter((function(e,t){return l.indexOf(JSON.stringify(e))===t}));var p=[],u=[];e.forEach((function(e,n){c.forEach((function(r,o){r.indexOf(n)>-1&&(void 0===p[o]&&(p[o]=[],u[o]=[]),p[o].push({key:n,value:e}),u[o].push({key:n,value:t[n]}))}))}));var d=Array.apply(null,Array(c.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),b=Array.apply(null,Array(c.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);p.forEach((function(e,t){e.forEach((function(e,n){d[t]=Math.min(e.value,d[t])}))})),u.forEach((function(e,t){e.forEach((function(e,n){b[t]=Math.max(e.value,b[t])}))})),e.forEach((function(e,t){u.forEach((function(e,n){var a=d[n],s=b[n];o.chart.stacked&&(s=0,e.forEach((function(e,t){e.value!==-Number.MAX_VALUE&&(s+=e.value),a!==Number.MIN_VALUE&&(a+=p[n][t].value)}))),e.forEach((function(n,c){e[c].key===t&&(void 0!==o.yaxis[t].min&&(a="function"==typeof o.yaxis[t].min?o.yaxis[t].min(i.minY):o.yaxis[t].min),void 0!==o.yaxis[t].max&&(s="function"==typeof o.yaxis[t].max?o.yaxis[t].max(i.maxY):o.yaxis[t].max),r.setYScaleForIndex(t,a,s))}))}))}))}},{key:"autoScaleY",value:function(e,t,n){e||(e=this);var r=e.w;if(r.globals.isMultipleYAxis||r.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),t;var o=r.globals.seriesX[0],i=r.config.chart.stacked;return t.forEach((function(e,a){for(var s=0,c=0;c=n.xaxis.min){s=c;break}var l,p,u=r.globals.minYArr[a],d=r.globals.maxYArr[a],b=r.globals.stackedSeriesTotals;r.globals.series.forEach((function(a,c){var f=a[s];i?(f=b[s],l=p=f,b.forEach((function(e,t){o[t]<=n.xaxis.max&&o[t]>=n.xaxis.min&&(e>p&&null!==e&&(p=e),a[t]=n.xaxis.min){var i=e,a=e;r.globals.series.forEach((function(n,r){null!==e&&(i=Math.min(n[t],i),a=Math.max(n[t],a))})),a>p&&null!==a&&(p=a),iu&&(l=u),t.length>1?(t[c].min=void 0===e.min?l:e.min,t[c].max=void 0===e.max?p:e.max):(t[0].min=void 0===e.min?l:e.min,t[0].max=void 0===e.max?p:e.max)}))})),t}}]),e}(),J=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.scales=new $(t)}return l(e,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=this.w.config,i=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===r&&(r=e+1);var c=i.series,l=c,p=c;"candlestick"===o.chart.type?(l=i.seriesCandleL,p=i.seriesCandleH):"boxPlot"===o.chart.type?(l=i.seriesCandleO,p=i.seriesCandleC):i.isRangeData&&(l=i.seriesRangeStart,p=i.seriesRangeEnd);for(var u=e;ul[u][d]&&l[u][d]<0&&(s=l[u][d])):i.hasNullValues=!0}}return"rangeBar"===o.chart.type&&i.seriesRangeStart.length&&i.isBarHorizontal&&(s=t),"bar"===o.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:t,highestY:n}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var n=Number.MAX_VALUE;if(e.isMultipleYAxis)for(var r=0;r=0&&n<=10||void 0!==t.yaxis[0].min||void 0!==t.yaxis[0].max)&&(a=0),e.minY=n-5*a/100,n>0&&e.minY<0&&(e.minY=0),e.maxY=e.maxY+5*a/100}return t.yaxis.forEach((function(t,n){void 0!==t.max&&("number"==typeof t.max?e.maxYArr[n]=t.max:"function"==typeof t.max&&(e.maxYArr[n]=t.max(e.isMultipleYAxis?e.maxYArr[n]:e.maxY)),e.maxY=e.maxYArr[n]),void 0!==t.min&&("number"==typeof t.min?e.minYArr[n]=t.min:"function"==typeof t.min&&(e.minYArr[n]=t.min(e.isMultipleYAxis?e.minYArr[n]===Number.MIN_VALUE?0:e.minYArr[n]:e.minY)),e.minY=e.minYArr[n])})),e.isBarHorizontal&&["min","max"].forEach((function(n){void 0!==t.xaxis[n]&&"number"==typeof t.xaxis[n]&&("min"===n?e.minY=t.xaxis[n]:e.maxY=t.xaxis[n])})),e.isMultipleYAxis?(this.scales.setMultipleYScales(),e.minY=n,e.yAxisScale.forEach((function(t,n){e.minYArr[n]=t.niceMin,e.maxYArr[n]=t.niceMax}))):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.yAxisScale[0].niceMin,e.maxYArr[0]=e.yAxisScale[0].niceMax),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,t=this.w.config,n="numeric"===t.xaxis.type||"datetime"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var t=0;te.dataPoints&&0!==e.dataPoints&&(r=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(r=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(r=e.maxX-e.minX-1)):r=t.xaxis.tickAmount,e.xTickAmount=r,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var o=[],i=e.minX-1;i0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,r-1),e.seriesX=e.labels.slice());n&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ)for(var t=0;t0){var o=t-r[n-1];o>0&&(e.minXDiff=Math.min(o,e.minXDiff))}})),1!==e.dataPoints&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var e=this.w.globals,t=[],n=[];if(e.series.length)for(var r=0;r0?o=o+parseFloat(e.series[a][r])+1e-4:i+=parseFloat(e.series[a][r])),a===e.series.length-1&&(t.push(o),n.push(i));for(var s=0;s=0;z--)M(z);if(void 0!==n.config.yaxis[e].title.text){var O=r.group({class:"apexcharts-yaxis-title"}),m=0;n.config.yaxis[e].opposite&&(m=n.globals.translateYAxisX[e]);var g=r.drawText({x:m,y:n.globals.gridHeight/2+n.globals.translateY+n.config.yaxis[e].title.offsetY,text:n.config.yaxis[e].title.text,textAnchor:"end",foreColor:n.config.yaxis[e].title.style.color,fontSize:n.config.yaxis[e].title.style.fontSize,fontWeight:n.config.yaxis[e].title.style.fontWeight,fontFamily:n.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[e].title.style.cssClass});O.add(g),c.add(O)}var v=n.config.yaxis[e].axisBorder,y=31+v.offsetX;if(n.config.yaxis[e].opposite&&(y=-31-v.offsetX),v.show){var x=r.drawLine(y,n.globals.translateY+v.offsetY-2,y,n.globals.gridHeight+n.globals.translateY+v.offsetY+2,v.color,0,v.width);c.add(x)}return n.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(y,p,v,n.config.yaxis[e].axisTicks,e,u,c),c}},{key:"drawYaxisInversed",value:function(e){var t=this.w,n=new A(this.ctx),r=n.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),o=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(o);var i=t.globals.yAxisScale[e].result.length-1,a=t.globals.gridWidth/i+.1,s=a+t.config.xaxis.labels.offsetX,c=t.globals.xLabelFormatter,l=t.globals.yAxisScale[e].result.slice(),p=t.globals.timescaleLabels;p.length>0&&(this.xaxisLabels=p.slice(),i=(l=p.slice()).length),l=this.axesUtils.checkForReversedLabels(e,l);var u=p.length;if(t.config.xaxis.labels.show)for(var d=u?0:i;u?d=0;u?d++:d--){var b=l[d];b=c(b,d,t);var f=t.globals.gridWidth+t.globals.padHorizontal-(s-a+t.config.xaxis.labels.offsetX);if(p.length){var h=this.axesUtils.getLabel(l,p,f,d,this.drawnLabels,this.xaxisFontSize);f=h.x,b=h.text,this.drawnLabels.push(h.text),0===d&&t.globals.skipFirstTimelinelabel&&(b=""),d===l.length-1&&t.globals.skipLastTimelinelabel&&(b="")}var M=n.drawText({x:f,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:b,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});o.add(M),M.tspan(b);var z=document.createElementNS(t.globals.SVGNS,"title");z.textContent=b,M.node.appendChild(z),s+=a}return this.inversedYAxisTitleText(r),this.inversedYAxisBorder(r),r}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,n=new A(this.ctx),r=t.config.xaxis.axisBorder;if(r.show){var o=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(o-=15);var i=n.drawLine(t.globals.padHorizontal+o+r.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,r.color,0,r.height);e.add(i)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,n=new A(this.ctx);if(void 0!==t.config.xaxis.title.text){var r=n.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),o=n.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});r.add(o),e.add(r)}}},{key:"yAxisTitleRotate",value:function(e,t){var n=this.w,r=new A(this.ctx),o={width:0,height:0},i={width:0,height:0},a=n.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==a&&(o=a.getBoundingClientRect());var s=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==s&&(i=s.getBoundingClientRect()),null!==s){var c=this.xPaddingForYAxisTitle(e,o,i,t);s.setAttribute("x",c.xPos-(t?10:0))}if(null!==s){var l=r.rotateAroundCenter(s);s.setAttribute("transform","rotate(".concat(t?-1*n.config.yaxis[e].title.rotate:n.config.yaxis[e].title.rotate," ").concat(l.x," ").concat(l.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,n,r){var o=this.w,i=0,a=0,s=10;return void 0===o.config.yaxis[e].title.text||e<0?{xPos:a,padd:0}:(r?(a=t.width+o.config.yaxis[e].title.offsetX+n.width/2+s/2,0===(i+=1)&&(a-=s/2)):(a=-1*t.width+o.config.yaxis[e].title.offsetX+s/2+n.width/2,o.globals.isBarHorizontal&&(s=25,a=-1*t.width-o.config.yaxis[e].title.offsetX-s)),{xPos:a,padd:s})}},{key:"setYAxisXPosition",value:function(e,t){var n=this.w,r=0,o=0,i=18,a=1;n.config.yaxis.length>1&&(this.multipleYs=!0),n.config.yaxis.map((function(s,c){var l=n.globals.ignoreYAxisIndexes.indexOf(c)>-1||!s.show||s.floating||0===e[c].width,p=e[c].width+t[c].width;s.opposite?n.globals.isBarHorizontal?(o=n.globals.gridWidth+n.globals.translateX-1,n.globals.translateYAxisX[c]=o-s.labels.offsetX):(o=n.globals.gridWidth+n.globals.translateX+a,l||(a=a+p+20),n.globals.translateYAxisX[c]=o-s.labels.offsetX+20):(r=n.globals.translateX-i,l||(i=i+p+20),n.globals.translateYAxisX[c]=r+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=m.listToArray(t)).forEach((function(t,n){var r=e.config.yaxis[n];if(r&&void 0!==r.labels.align){var o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(n,"'] .apexcharts-yaxis-texts-g")),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(n,"'] .apexcharts-yaxis-label"));i=m.listToArray(i);var a=o.getBoundingClientRect();"left"===r.labels.align?(i.forEach((function(e,t){e.setAttribute("text-anchor","start")})),r.opposite||o.setAttribute("transform","translate(-".concat(a.width,", 0)"))):"center"===r.labels.align?(i.forEach((function(e,t){e.setAttribute("text-anchor","middle")})),o.setAttribute("transform","translate(".concat(a.width/2*(r.opposite?1:-1),", 0)"))):"right"===r.labels.align&&(i.forEach((function(e,t){e.setAttribute("text-anchor","end")})),r.opposite&&o.setAttribute("transform","translate(".concat(a.width,", 0)")))}}))}}]),e}(),ee=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.documentEvent=m.bind(this.documentEvent,this)}return l(e,[{key:"addEventListener",value:function(e,t){var n=this.w;n.globals.events.hasOwnProperty(e)?n.globals.events[e].push(t):n.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var n=this.w;if(n.globals.events.hasOwnProperty(e)){var r=n.globals.events[e].indexOf(t);-1!==r&&n.globals.events[e].splice(r,1)}}},{key:"fireEvent",value:function(e,t){var n=this.w;if(n.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var r=n.globals.events[e],o=r.length,i=0;i0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var n=t.filter((function(t){return t.name===e}))[0];if(!n)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var r=m.extend(R,n);this.w.globals.locale=r.options}}]),e}(),ne=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"drawAxis",value:function(e,t){var n,r,o=this.w.globals,i=this.w.config,a=new K(this.ctx),s=new Z(this.ctx);o.axisCharts&&"radar"!==e&&(o.isBarHorizontal?(r=s.drawYaxisInversed(0),n=a.drawXaxisInversed(0),o.dom.elGraphical.add(n),o.dom.elGraphical.add(r)):(n=a.drawXaxis(),o.dom.elGraphical.add(n),i.yaxis.map((function(e,t){-1===o.ignoreYAxisIndexes.indexOf(t)&&(r=s.drawYaxis(t),o.dom.Paper.add(r))}))))}}]),e}(),re=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new A(this.ctx),n=new v(this.ctx),r=e.config.xaxis.crosshairs.fill.gradient,o=e.config.xaxis.crosshairs.dropShadow,i=e.config.xaxis.crosshairs.fill.type,a=r.colorFrom,s=r.colorTo,c=r.opacityFrom,l=r.opacityTo,p=r.stops,u=o.enabled,d=o.left,b=o.top,f=o.blur,h=o.color,M=o.opacity,z=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===i&&(z=t.drawGradient("vertical",a,s,c,l,null,p,null));var O=t.drawRect();1===e.config.xaxis.crosshairs.width&&(O=t.drawLine());var g=e.globals.gridHeight;(!m.isNumber(g)||g<0)&&(g=0);var y=e.config.xaxis.crosshairs.width;(!m.isNumber(y)||y<0)&&(y=0),O.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:g,width:y,height:g,fill:z,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),u&&(O=n.dropShadow(O,{left:d,top:b,blur:f,color:h,opacity:M})),e.globals.dom.elGraphical.add(O)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new A(this.ctx),n=e.config.yaxis[0].crosshairs,r=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var o=t.drawLine(-r,0,e.globals.gridWidth+r,0,n.stroke.color,n.stroke.dashArray,n.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(o)}var i=t.drawLine(-r,0,e.globals.gridWidth+r,0,n.stroke.color,0,0);i.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(i)}}]),e}(),oe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"checkResponsiveConfig",value:function(e){var t=this,n=this.w,r=n.config;if(0!==r.responsive.length){var o=r.responsive.slice();o.sort((function(e,t){return e.breakpoint>t.breakpoint?1:t.breakpoint>e.breakpoint?-1:0})).reverse();var i=new D({}),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=o[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>r){var s=y.extendArrayProps(i,n.globals.initialConfig,n);e=m.extend(s,e),e=m.extend(n.config,e),t.overrideResponsiveOptions(e)}else for(var c=0;c0&&"function"==typeof t.config.colors[0]&&(t.globals.colors=t.config.series.map((function(n,r){var o=t.config.colors[r];return o||(o=t.config.colors[0]),"function"==typeof o?(e.isColorFn=!0,o({value:t.globals.axisCharts?t.globals.series[r][0]?t.globals.series[r][0]:0:t.globals.series[r],seriesIndex:r,dataPointIndex:r,w:t})):o})))),t.globals.seriesColors.map((function(e,n){e&&(t.globals.colors[n]=e)})),t.config.theme.monochrome.enabled){var r=[],o=t.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(o=t.globals.series[0].length*t.globals.series.length);for(var i=t.config.theme.monochrome.color,a=1/(o/t.config.theme.monochrome.shadeIntensity),s=t.config.theme.monochrome.shadeTo,c=0,l=0;l2&&void 0!==arguments[2]?arguments[2]:null,r=this.w,o=t||r.globals.series.length;if(null===n&&(n=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===r.config.chart.type&&r.config.plotOptions.heatmap.colorScale.inverse),n&&r.globals.series.length&&(o=r.globals.series[r.globals.maxValsInArrayIndex].length*r.globals.series.length),e.lengthe.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(e,t){var n=e;if(this.w.globals.isMultiLineX){var r=t.map((function(e,t){return Array.isArray(e)?e.length:1})),o=Math.max.apply(Math,M(r));n=t[r.indexOf(o)]}return n}}]),e}(),ce=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return l(e,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,n=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===n.length&&(n=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var r=this.getxAxisTimeScaleLabelsCoords();e={width:r.width,height:r.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var o=t.globals.xLabelFormatter,i=m.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,n);t.globals.isBarHorizontal&&(a=i=t.globals.yAxisScale[0].result.reduce((function(e,t){return e.length>t.length?e:t}),0));var s=new U(this.dCtx.ctx),c=i;i=s.xLabelFormat(o,i,c,{i:void 0,dateFormatter:new X(this.dCtx.ctx).formatDate,w:t}),a=s.xLabelFormat(o,a,c,{i:void 0,dateFormatter:new X(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===i||""===String(i).trim())&&(a=i="1");var l=new A(this.dCtx.ctx),p=l.getTextRects(i,t.config.xaxis.labels.style.fontSize),u=p;if(i!==a&&(u=l.getTextRects(a,t.config.xaxis.labels.style.fontSize)),(e={width:p.width>=u.width?p.width:u.width,height:p.height>=u.height?p.height:u.height}).width*n.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var d=function(e){return l.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};p=d(i),i!==a&&(u=d(a)),e.height=(p.height>u.height?p.height:u.height)/1.5,e.width=p.width>u.width?p.width:u.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,t=this.w;if(!t.globals.hasGroups)return{width:0,height:0};var n,r=(null===(e=t.config.xaxis.group.style)||void 0===e?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,o=t.globals.groups.map((function(e){return e.title})),i=m.getLargestStringFromArr(o),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,o),s=new A(this.dCtx.ctx),c=s.getTextRects(i,r),l=c;return i!==a&&(l=s.getTextRects(a,r)),n={width:c.width>=l.width?c.width:l.width,height:c.height>=l.height?c.height:l.height},t.config.xaxis.labels.show||(n={width:0,height:0}),{width:n.width,height:n.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,n=0;if(void 0!==e.config.xaxis.title.text){var r=new A(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=r.width,n=r.height}return{width:t,height:n}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var n=this.dCtx.timescaleLabels.map((function(e){return e.value})),r=n.reduce((function(e,t){return void 0===e?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):e.length>t.length?e:t}),0);return 1.05*(e=new A(this.dCtx.ctx).getTextRects(r,t.config.xaxis.labels.style.fontSize)).width*n.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,n=this.w,r=n.globals,o=n.config,i=o.xaxis.type,a=e.width;r.skipLastTimelinelabel=!1,r.skipFirstTimelinelabel=!1;var s=n.config.yaxis[0].opposite&&n.globals.isBarHorizontal,c=function(e,s){(function(e){return-1!==r.collapsedSeriesIndices.indexOf(e)})(s)||function(e){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var s=t.dCtx.timescaleLabels[0],c=t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+a/1.75-t.dCtx.yAxisWidthRight,l=s.position-a/1.75+t.dCtx.yAxisWidthLeft,p="right"===n.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0;c>r.svgWidth-r.translateX-p&&(r.skipLastTimelinelabel=!0),l<-(e.show&&!e.floating||"bar"!==o.chart.type&&"candlestick"!==o.chart.type&&"rangeBar"!==o.chart.type&&"boxPlot"!==o.chart.type?10:a/1.75)&&(r.skipFirstTimelinelabel=!0)}else"datetime"===i?t.dCtx.gridPad.rightString(s.niceMax).length?p:s.niceMax,d=l(u,{seriesIndex:a,dataPointIndex:-1,w:t}),b=d;if(void 0!==d&&0!==d.length||(d=u),t.globals.isBarHorizontal){r=0;var f=t.globals.labels.slice();d=l(d=m.getLargestStringFromArr(f),{seriesIndex:a,dataPointIndex:-1,w:t}),b=e.dCtx.dimHelpers.getLargestStringFromMultiArr(d,f)}var h=new A(e.dCtx.ctx),M="rotate(".concat(i.labels.rotate," 0 0)"),z=h.getTextRects(d,i.labels.style.fontSize,i.labels.style.fontFamily,M,!1),O=z;d!==b&&(O=h.getTextRects(b,i.labels.style.fontSize,i.labels.style.fontFamily,M,!1)),n.push({width:(c>O.width||c>z.width?c:O.width>z.width?O.width:z.width)+r,height:O.height>z.height?O.height:z.height})}else n.push({width:0,height:0})})),n}},{key:"getyAxisTitleCoords",value:function(){var e=this,t=this.w,n=[];return t.config.yaxis.map((function(t,r){if(t.show&&void 0!==t.title.text){var o=new A(e.dCtx.ctx),i="rotate(".concat(t.title.rotate," 0 0)"),a=o.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,i,!1);n.push({width:a.width,height:a.height})}else n.push({width:0,height:0})})),n}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,n=0,r=0,o=e.globals.yAxisScale.length>1?10:0,i=new G(this.dCtx.ctx),a=function(a,s){var c=e.config.yaxis[s].floating,l=0;a.width>0&&!c?(l=a.width+o,function(t){return e.globals.ignoreYAxisIndexes.indexOf(t)>-1}(s)&&(l=l-a.width-o)):l=c||i.isYAxisHidden(s)?0:5,e.config.yaxis[s].opposite?r+=l:n+=l,t+=l};return e.globals.yLabelsCoords.map((function(e,t){a(e,t)})),e.globals.yTitleCoords.map((function(e,t){a(e,t)})),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=n,this.dCtx.yAxisWidthRight=r,t}}]),e}(),pe=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return l(e,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w;if(t.globals.noData||t.globals.allSeriesCollapsed)return 0;var n=function(e){return"bar"===e||"rangeBar"===e||"candlestick"===e||"boxPlot"===e},r=t.config.chart.type,o=0,i=n(r)?t.config.series.length:1;if(t.globals.comboBarCount>0&&(i=t.globals.comboBarCount),t.globals.collapsedSeries.forEach((function(e){n(e.type)&&(i-=1)})),t.config.chart.stacked&&(i=1),(n(r)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&i>0){var a,s,c=Math.abs(t.globals.initialMaxX-t.globals.initialMinX);c<=3&&(c=t.globals.dataPoints),a=c/e,t.globals.minXDiff&&t.globals.minXDiff/a>0&&(s=t.globals.minXDiff/a),s>e/2&&(s/=2),(o=s/i*parseInt(t.config.plotOptions.bar.columnWidth,10)/100)<1&&(o=1),o=o/(i>1?1:1.5)+5,t.globals.barPadForNumericAxis=o}return o}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,n=t.globals,r=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==t.config[n].text?r+=t.config[n].margin:r+=e.dCtx.isSparkline||!t.globals.axisCharts?0:5})),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(r+=10);var o=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),i=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");n.gridHeight=n.gridHeight-o.height-i.height-r,n.translateY=n.translateY+o.height+i.height+r}},{key:"setGridXPosForDualYAxis",value:function(e,t){var n=this.w,r=new G(this.dCtx.ctx);n.config.yaxis.map((function(o,i){-1!==n.globals.ignoreYAxisIndexes.indexOf(i)||o.floating||r.isYAxisHidden(i)||(o.opposite&&(n.globals.translateX=n.globals.translateX-(t[i].width+e[i].width)-parseInt(n.config.yaxis[i].labels.style.fontSize,10)/1.2-12),n.globals.translateX<2&&(n.globals.translateX=2))}))}}]),e}(),ue=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new se(this),this.dimYAxis=new le(this),this.dimXAxis=new ce(this),this.dimGrid=new pe(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return l(e,[{key:"plotCoords",value:function(){var e=this,t=this.w,n=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&(t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||z(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),r=n[0],o=n[1];e.gridPad[r]=Math.max(o,e.w.globals.markers.largestSize/1.5)})),n.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),n.gridHeight=n.gridHeight-this.gridPad.top-this.gridPad.bottom,n.gridWidth=n.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var r=this.dimGrid.gridPadForColumnsInNumericAxis(n.gridWidth);n.gridWidth=n.gridWidth-2*r,n.translateX=n.translateX+this.gridPad.left+this.xPadLeft+(r>0?r+4:0),n.translateY=n.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,n=t.globals,r=this.dimYAxis.getyAxisLabelsCoords(),o=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map((function(e,n){t.globals.yLabelsCoords.push({width:r[n].width,index:n}),t.globals.yTitleCoords.push({width:o[n].width,index:n})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var i=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(i,s,a),n.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,n.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(n.rotateXLabels=!1,n.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),n.translateXAxisY=n.translateXAxisY+t.config.xaxis.labels.offsetY,n.translateXAxisX=n.translateXAxisX+t.config.xaxis.labels.offsetX;var c=this.yAxisWidth,l=this.xAxisHeight;n.xAxisLabelsHeight=this.xAxisHeight-s.height,n.xAxisGroupLabelsHeight=n.xAxisLabelsHeight-i.height,n.xAxisLabelsWidth=this.xAxisWidth,n.xAxisHeight=this.xAxisHeight;var p=10;("radar"===t.config.chart.type||this.isSparkline)&&(c=0,l=n.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(c=0,l=0,p=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(i);var u=function(){n.translateX=c,n.gridHeight=n.svgHeight-e.lgRect.height-l-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),n.gridWidth=n.svgWidth-c};switch("top"===t.config.xaxis.position&&(p=n.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":n.translateY=p,u();break;case"top":n.translateY=this.lgRect.height+p,u();break;case"left":n.translateY=p,n.translateX=this.lgRect.width+c,n.gridHeight=n.svgHeight-l-12,n.gridWidth=n.svgWidth-this.lgRect.width-c;break;case"right":n.translateY=p,n.translateX=c,n.gridHeight=n.svgHeight-l-12,n.gridWidth=n.svgWidth-this.lgRect.width-c-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(o,r),new Z(this.ctx).setYAxisXPosition(r,o)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,n=e.config,r=0;e.config.legend.show&&!e.config.legend.floating&&(r=20);var o="pie"===n.chart.type||"polarArea"===n.chart.type||"donut"===n.chart.type?"pie":"radialBar",i=n.plotOptions[o].offsetY,a=n.plotOptions[o].offsetX;if(!n.legend.show||n.legend.floating)return t.gridHeight=t.svgHeight-n.grid.padding.left+n.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=i,void(t.translateX=a+(t.svgWidth-t.gridWidth)/2);switch(n.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=i-10,t.translateX=a+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+i+10,t.translateX=a+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-r,t.gridHeight="auto"!==n.chart.height?t.svgHeight:t.gridWidth,t.translateY=i,t.translateX=a+this.lgRect.width+r;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-r-5,t.gridHeight="auto"!==n.chart.height?t.svgHeight:t.gridWidth,t.translateY=i,t.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,n){var r=this.w,o=r.globals.hasGroups?2:1,i=n.height+e.height+t.height,a=r.globals.isMultiLineX?1.2:r.globals.LINE_HEIGHT_RATIO,s=r.globals.rotateXLabels?22:10,c=r.globals.rotateXLabels&&"bottom"===r.config.legend.position?10:0;this.xAxisHeight=i*a+o*s+c,this.xAxisWidth=e.width,this.xAxisHeight-t.height>r.config.xaxis.labels.maxHeight&&(this.xAxisHeight=r.config.xaxis.labels.maxHeight),r.config.xaxis.labels.minHeight&&this.xAxisHeightp&&(this.yAxisWidth=p)}}]),e}(),de=function(){function e(t){s(this,e),this.w=t.w,this.lgCtx=t}return l(e,[{key:"getLegendStyles",value:function(){var e=document.createElement("style");e.setAttribute("type","text/css");var t=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return e.appendChild(t),e}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),t=e.width;return{clwh:e.height,clww:t}}},{key:"appendToForeignObject",value:function(){var e=this.w.globals;e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject");var t=e.dom.elLegendForeign;t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("width",e.svgWidth),t.setAttribute("height",e.svgHeight),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.appendChild(e.dom.elLegendWrap),t.appendChild(this.getLegendStyles()),e.dom.Paper.node.insertBefore(t,e.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(e,t){var n=this,r=this.w;if(r.globals.axisCharts||"radialBar"===r.config.chart.type){r.globals.resized=!0;var o=null,i=null;r.globals.risingSeries=[],r.globals.axisCharts?(o=r.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),i=parseInt(o.getAttribute("data:realIndex"),10)):(o=r.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),i=parseInt(o.getAttribute("rel"),10)-1),t?[{cs:r.globals.collapsedSeries,csi:r.globals.collapsedSeriesIndices},{cs:r.globals.ancillaryCollapsedSeries,csi:r.globals.ancillaryCollapsedSeriesIndices}].forEach((function(e){n.riseCollapsedSeries(e.cs,e.csi,i)})):this.hideSeries({seriesEl:o,realIndex:i})}else{var a=r.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),s=r.config.chart.type;if("pie"===s||"polarArea"===s||"donut"===s){var c=r.config.plotOptions.pie.donut.labels;new A(this.lgCtx.ctx).pathMouseDown(a.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(a.members[0].node,c)}a.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,n=e.realIndex,r=this.w,o=m.clone(r.config.series);if(r.globals.axisCharts){var i=!1;if(r.config.yaxis[n]&&r.config.yaxis[n].show&&r.config.yaxis[n].showAlways&&(i=!0,r.globals.ancillaryCollapsedSeriesIndices.indexOf(n)<0&&(r.globals.ancillaryCollapsedSeries.push({index:n,data:o[n].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.globals.ancillaryCollapsedSeriesIndices.push(n))),!i){r.globals.collapsedSeries.push({index:n,data:o[n].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.globals.collapsedSeriesIndices.push(n);var a=r.globals.risingSeries.indexOf(n);r.globals.risingSeries.splice(a,1)}}else r.globals.collapsedSeries.push({index:n,data:o[n]}),r.globals.collapsedSeriesIndices.push(n);for(var s=t.childNodes,c=0;c0){for(var i=0;i-1&&(e[r].data=[])})):e.forEach((function(n,r){t.globals.collapsedSeriesIndices.indexOf(r)>-1&&(e[r]=0)})),e}}]),e}(),be=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new de(this)}return l(e,[{key:"init",value:function(){var e=this.w,t=e.globals,n=e.config;if((n.legend.showForSingleSeries&&1===t.series.length||this.isBarsDistributed||t.series.length>1||!t.axisCharts)&&n.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),m.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===n.legend.position||"top"===n.legend.position?this.legendAlignHorizontal():"right"!==n.legend.position&&"left"!==n.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var e=this,t=this.w,n=t.config.legend.fontFamily,r=t.globals.seriesNames,o=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var i=t.config.plotOptions.heatmap.colorScale.ranges;r=i.map((function(e){return e.name?e.name:e.from+" - "+e.to})),o=i.map((function(e){return e.color}))}else this.isBarsDistributed&&(r=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(r=t.config.legend.customLegendItems);for(var a=t.globals.legendFormatter,s=t.config.legend.inverseOrder,c=s?r.length-1:0;s?c>=0:c<=r.length-1;s?c--:c++){var l=a(r[c],{seriesIndex:c,w:t}),p=!1,u=!1;if(t.globals.collapsedSeries.length>0)for(var d=0;d0)for(var b=0;b0?c-10:0)+(l>0?l-10:0)}r.style.position="absolute",i=i+e+n.config.legend.offsetX,a=a+t+n.config.legend.offsetY,r.style.left=i+"px",r.style.top=a+"px","bottom"===n.config.legend.position?(r.style.top="auto",r.style.bottom=5-n.config.legend.offsetY+"px"):"right"===n.config.legend.position&&(r.style.left="auto",r.style.right=25+n.config.legend.offsetX+"px"),["width","height"].forEach((function(e){r.style[e]&&(r.style[e]=parseInt(n.config.legend[e],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var t=this.legendHelpers.getLegendBBox(),n=new ue(this.ctx),r=n.dimHelpers.getTitleSubtitleCoords("title"),o=n.dimHelpers.getTitleSubtitleCoords("subtitle"),i=0;"bottom"===e.config.legend.position?i=-t.clwh/1.8:"top"===e.config.legend.position&&(i=r.height+o.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,i)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendBBox(),n=0;"left"===e.config.legend.position&&(n=20),"right"===e.config.legend.position&&(n=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(n,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,n=e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if("heatmap"===t.config.chart.type||this.isBarsDistributed){if(n){var r=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,r,this.w]),new N(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&n&&new N(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var n=parseInt(e.target.getAttribute("rel"),10)-1,r="true"===e.target.getAttribute("data:collapsed"),o=this.w.config.chart.events.legendClick;"function"==typeof o&&o(this.ctx,n,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,n,this.w]);var i=this.w.config.legend.markers.onClick;"function"==typeof i&&e.target.classList.contains("apexcharts-legend-marker")&&(i(this.ctx,n,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,n,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(n,r)}}}]),e}(),fe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=n.globals.minX,this.maxX=n.globals.maxX}return l(e,[{key:"createToolbar",value:function(){var e=this,t=this.w,n=function(){return document.createElement("div")},r=n();if(r.setAttribute("class","apexcharts-toolbar"),r.style.top=t.config.chart.toolbar.offsetY+"px",r.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(r),this.elZoom=n(),this.elZoomIn=n(),this.elZoomOut=n(),this.elPan=n(),this.elSelection=n(),this.elZoomReset=n(),this.elMenuIcon=n(),this.elMenu=n(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var o=0;o\n \n \n\n'),a("zoomOut",this.elZoomOut,'\n \n \n\n');var s=function(n){e.t[n]&&t.config.chart[n].enabled&&i.push({el:"zoom"===n?e.elZoom:e.elSelection,icon:"string"==typeof e.t[n]?e.t[n]:"zoom"===n?'\n \n \n \n':'\n \n \n',title:e.localeValues["zoom"===n?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(n,"-icon")})};s("zoom"),s("selection"),this.t.pan&&t.config.chart.zoom.enabled&&i.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("reset",this.elZoomReset,'\n \n \n'),this.t.download&&i.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var c=0;c0&&t.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:e.globals.gridWidth,maxY:e.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var e=this.w,t=this.xyRatios;if(!e.globals.zoomEnabled)if(void 0!==e.globals.selection&&null!==e.globals.selection)this.drawSelectionRect(e.globals.selection);else if(void 0!==e.config.chart.selection.xaxis.min&&void 0!==e.config.chart.selection.xaxis.max){var n=(e.config.chart.selection.xaxis.min-e.globals.minX)/t.xRatio,r={x:n,y:0,width:e.globals.gridWidth-(e.globals.maxX-e.config.chart.selection.xaxis.max)/t.xRatio-n,height:e.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(r),this.makeSelectionRectDraggable(),"function"==typeof e.config.chart.events.selection&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=e.translateX,a=void 0===i?0:i,s=e.translateY,c=void 0===s?0:s,l=this.w,p=this.zoomRect,u=this.selectionRect;if(this.dragged||null!==l.globals.selection){var d={transform:"translate("+a+", "+c+")"};l.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),p.attr({x:t,y:n,width:r,height:o,fill:l.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":l.config.chart.zoom.zoomedArea.fill.opacity,stroke:l.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":l.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":l.config.chart.zoom.zoomedArea.stroke.opacity}),A.setAttrs(p.node,d)),l.globals.selectionEnabled&&(u.attr({x:t,y:n,width:r>0?r:0,height:o>0?o:0,fill:l.config.chart.selection.fill.color,"fill-opacity":l.config.chart.selection.fill.opacity,stroke:l.config.chart.selection.stroke.color,"stroke-width":l.config.chart.selection.stroke.width,"stroke-dasharray":l.config.chart.selection.stroke.dashArray,"stroke-opacity":l.config.chart.selection.stroke.opacity}),A.setAttrs(u.node,d))}}},{key:"hideSelectionRect",value:function(e){e&&e.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(e){var t,n=e.context,r=e.zoomtype,o=this.w,i=n,a=this.gridRect.getBoundingClientRect(),s=i.startX-1,c=i.startY,l=!1,p=!1,u=i.clientX-a.left-s,d=i.clientY-a.top-c;return Math.abs(u+s)>o.globals.gridWidth?u=o.globals.gridWidth-s:i.clientX-a.left<0&&(u=s),s>i.clientX-a.left&&(l=!0,u=Math.abs(u)),c>i.clientY-a.top&&(p=!0,d=Math.abs(d)),t="x"===r?{x:l?s-u:s,y:0,width:u,height:o.globals.gridHeight}:"y"===r?{x:0,y:p?c-d:c,width:o.globals.gridWidth,height:d}:{x:l?s-u:s,y:p?c-d:c,width:u,height:d},i.drawSelectionRect(t),i.selectionDragging("resizing"),t}},{key:"selectionDragging",value:function(e,t){var n=this,r=this.w,o=this.xyRatios,i=this.selectionRect,a=0;"resizing"===e&&(a=30);var s=function(e){return parseFloat(i.node.getAttribute(e))},c={x:s("x"),y:s("y"),width:s("width"),height:s("height")};r.globals.selection=c,"function"==typeof r.config.chart.events.selection&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var e=n.gridRect.getBoundingClientRect(),t=i.node.getBoundingClientRect(),a={xaxis:{min:r.globals.xAxisScale.niceMin+(t.left-e.left)*o.xRatio,max:r.globals.xAxisScale.niceMin+(t.right-e.left)*o.xRatio},yaxis:{min:r.globals.yAxisScale[0].niceMin+(e.bottom-t.bottom)*o.yRatio[0],max:r.globals.yAxisScale[0].niceMax-(t.top-e.top)*o.yRatio[0]}};r.config.chart.events.selection(n.ctx,a),r.config.chart.brush.enabled&&void 0!==r.config.chart.events.brushScrolled&&r.config.chart.events.brushScrolled(n.ctx,a)}),a))}},{key:"selectionDrawn",value:function(e){var t=e.context,n=e.zoomtype,r=this.w,o=t,i=this.xyRatios,a=this.ctx.toolbar;if(o.startX>o.endX){var s=o.startX;o.startX=o.endX,o.endX=s}if(o.startY>o.endY){var c=o.startY;o.startY=o.endY,o.endY=c}var l=void 0,p=void 0;r.globals.isRangeBar?(l=r.globals.yAxisScale[0].niceMin+o.startX*i.invertedYRatio,p=r.globals.yAxisScale[0].niceMin+o.endX*i.invertedYRatio):(l=r.globals.xAxisScale.niceMin+o.startX*i.xRatio,p=r.globals.xAxisScale.niceMin+o.endX*i.xRatio);var u=[],d=[];if(r.config.yaxis.forEach((function(e,t){u.push(r.globals.yAxisScale[t].niceMax-i.yRatio[t]*o.startY),d.push(r.globals.yAxisScale[t].niceMax-i.yRatio[t]*o.endY)})),o.dragged&&(o.dragX>10||o.dragY>10)&&l!==p)if(r.globals.zoomEnabled){var b=m.clone(r.globals.initialConfig.yaxis),f=m.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(l=Math.floor(l),p=Math.floor(p),l<1&&(l=1,p=r.globals.dataPoints),p-l<2&&(p=l+1)),"xy"!==n&&"x"!==n||(f={min:l,max:p}),"xy"!==n&&"y"!==n||b.forEach((function(e,t){b[t].min=d[t],b[t].max=u[t]})),r.config.chart.zoom.autoScaleYaxis){var h=new $(o.ctx);b=h.autoScaleY(o.ctx,b,{xaxis:f})}if(a){var M=a.getBeforeZoomRange(f,b);M&&(f=M.xaxis?M.xaxis:f,b=M.yaxis?M.yaxis:b)}var z={xaxis:f};r.config.chart.group||(z.yaxis=b),o.ctx.updateHelpers._updateOptions(z,!1,o.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof r.config.chart.events.zoomed&&a.zoomCallback(f,b)}else if(r.globals.selectionEnabled){var O,g=null;O={min:l,max:p},"xy"!==n&&"y"!==n||(g=m.clone(r.config.yaxis)).forEach((function(e,t){g[t].min=d[t],g[t].max=u[t]})),r.globals.selection=o.selection,"function"==typeof r.config.chart.events.selection&&r.config.chart.events.selection(o.ctx,{xaxis:O,yaxis:g})}}},{key:"panDragging",value:function(e){var t=e.context,n=this.w,r=t;if(void 0!==n.globals.lastClientPosition.x){var o=n.globals.lastClientPosition.x-r.clientX,i=n.globals.lastClientPosition.y-r.clientY;Math.abs(o)>Math.abs(i)&&o>0?this.moveDirection="left":Math.abs(o)>Math.abs(i)&&o<0?this.moveDirection="right":Math.abs(i)>Math.abs(o)&&i>0?this.moveDirection="up":Math.abs(i)>Math.abs(o)&&i<0&&(this.moveDirection="down")}n.globals.lastClientPosition={x:r.clientX,y:r.clientY};var a=n.globals.isRangeBar?n.globals.minY:n.globals.minX,s=n.globals.isRangeBar?n.globals.maxY:n.globals.maxX;n.config.xaxis.convertedCatToNumeric||r.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var e=this.w,t=e.globals.minX,n=e.globals.maxX,r=(e.globals.maxX-e.globals.minX)/2;"left"===this.moveDirection?(t=e.globals.minX+r,n=e.globals.maxX+r):"right"===this.moveDirection&&(t=e.globals.minX-r,n=e.globals.maxX-r),t=Math.floor(t),n=Math.floor(n),this.updateScrolledChart({xaxis:{min:t,max:n}},t,n)}},{key:"panScrolled",value:function(e,t){var n=this.w,r=this.xyRatios,o=m.clone(n.globals.initialConfig.yaxis),i=r.xRatio,a=n.globals.minX,s=n.globals.maxX;n.globals.isRangeBar&&(i=r.invertedYRatio,a=n.globals.minY,s=n.globals.maxY),"left"===this.moveDirection?(e=a+n.globals.gridWidth/15*i,t=s+n.globals.gridWidth/15*i):"right"===this.moveDirection&&(e=a-n.globals.gridWidth/15*i,t=s-n.globals.gridWidth/15*i),n.globals.isRangeBar||(en.globals.initialMaxX)&&(e=a,t=s);var c={min:e,max:t};n.config.chart.zoom.autoScaleYaxis&&(o=new $(this.ctx).autoScaleY(this.ctx,o,{xaxis:c}));var l={xaxis:{min:e,max:t}};n.config.chart.group||(l.yaxis=o),this.updateScrolledChart(l,e,t)}},{key:"updateScrolledChart",value:function(e,t,n){var r=this.w;this.ctx.updateHelpers._updateOptions(e,!1,!1),"function"==typeof r.config.chart.events.scrolled&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:t,max:n}})}}]),n}(),Me=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx}return l(e,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,n=e.elGrid,r=e.clientX,o=e.clientY,i=this.w,a=n.getBoundingClientRect(),s=a.width,c=a.height,l=s/(i.globals.dataPoints-1),p=c/i.globals.dataPoints,u=this.hasBars();!i.globals.comboCharts&&!u||i.config.xaxis.convertedCatToNumeric||(l=s/i.globals.dataPoints);var d=r-a.left-i.globals.barPadForNumericAxis,b=o-a.top;d<0||b<0||d>s||b>c?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):i.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):i.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var f=Math.round(d/l),h=Math.floor(b/p);u&&!i.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(d/l),f-=1);var M=null,z=null,O=[],g=[];if(i.globals.seriesXvalues.forEach((function(e){O.push([e[0]+1e-6].concat(e))})),i.globals.seriesYvalues.forEach((function(e){g.push([e[0]+1e-6].concat(e))})),O=O.map((function(e){return e.filter((function(e){return m.isNumber(e)}))})),g=g.map((function(e){return e.filter((function(e){return m.isNumber(e)}))})),i.globals.isXNumeric){var v=this.ttCtx.getElGrid().getBoundingClientRect(),A=d*(v.width/s),y=b*(v.height/c);M=(z=this.closestInMultiArray(A,y,O,g)).index,f=z.j,null!==M&&(O=i.globals.seriesXvalues[M],f=(z=this.closestInArray(A,O)).index)}return i.globals.capturedSeriesIndex=null===M?-1:M,(!f||f<1)&&(f=0),i.globals.isBarHorizontal?i.globals.capturedDataPointIndex=h:i.globals.capturedDataPointIndex=f,{capturedSeries:M,j:i.globals.isBarHorizontal?h:f,hoverX:d,hoverY:b}}},{key:"closestInMultiArray",value:function(e,t,n,r){var o=this.w,i=0,a=null,s=-1;o.globals.series.length>1?i=this.getFirstActiveXArray(n):a=0;var c=n[i][0],l=Math.abs(e-c);if(n.forEach((function(t){t.forEach((function(t,n){var r=Math.abs(e-t);r0?t:-1})),o=0;o0)for(var r=0;rn?-1:0}));var t=[];return e.forEach((function(e){t.push(e.querySelector(".apexcharts-marker"))})),t}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,n=t.config.markers.hover.size;return void 0===n&&(n=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),n}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,n=this.ttCtx;0===n.allTooltipSeriesGroups.length&&(n.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var r=n.allTooltipSeriesGroups,o=0;o ').concat(n.attrs.name,""),t+="
".concat(n.val,"
")})),O.innerHTML=e+"",m.innerHTML=t+""};a?c.globals.seriesGoals[t][n]&&Array.isArray(c.globals.seriesGoals[t][n])?g():(O.innerHTML="",m.innerHTML=""):g()}else O.innerHTML="",m.innerHTML="";null!==f&&(r[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=c.config.tooltip.z.title,r[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==f?f:""),a&&h[0]&&(null==p||c.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||c.globals.collapsedSeriesIndices.indexOf(t)>-1?h[0].parentNode.style.display="none":h[0].parentNode.style.display=c.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var n=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");n&&(n.classList.add("apexcharts-active"),n.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,n=e.j,r=this.w,o=this.ctx.series.filteredSeriesX(),i="",a="",s=null,c=null,l={series:r.globals.series,seriesIndex:t,dataPointIndex:n,w:r},p=r.globals.ttZFormatter;null===n?c=r.globals.series[t]:r.globals.isXNumeric&&"treemap"!==r.config.chart.type?(i=o[t][n],0===o[t].length&&(i=o[this.tooltipUtil.getFirstActiveXArray(o)][n])):i=void 0!==r.globals.labels[n]?r.globals.labels[n]:"";var u=i;return i=r.globals.isXNumeric&&"datetime"===r.config.xaxis.type?new U(this.ctx).xLabelFormat(r.globals.ttKeyFormatter,u,u,{i:void 0,dateFormatter:new X(this.ctx).formatDate,w:this.w}):r.globals.isBarHorizontal?r.globals.yLabelFormatters[0](u,l):r.globals.xLabelFormatter(u,l),void 0!==r.config.tooltip.x.formatter&&(i=r.globals.ttKeyFormatter(u,l)),r.globals.seriesZ.length>0&&r.globals.seriesZ[t].length>0&&(s=p(r.globals.seriesZ[t][n],r)),a="function"==typeof r.config.xaxis.tooltip.formatter?r.globals.xaxisTooltipFormatter(u,l):i,{val:Array.isArray(c)?c.join(" "):c,xVal:Array.isArray(i)?i.join(" "):i,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,n=e.j,r=e.y1,o=e.y2,i=e.w,a=this.ttCtx.getElTooltip(),s=i.config.tooltip.custom;Array.isArray(s)&&s[t]&&(s=s[t]),a.innerHTML=s({ctx:this.ctx,series:i.globals.series,seriesIndex:t,dataPointIndex:n,y1:r,y2:o,w:i})}}]),e}(),Oe=function(){function e(t){s(this,e),this.ttCtx=t,this.ctx=t.ctx,this.w=t.w}return l(e,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.ttCtx,r=this.w,o=n.getElXCrosshairs(),i=e-n.xcrosshairsWidth/2,a=r.globals.labels.slice().length;if(null!==t&&(i=r.globals.gridWidth/a*t),null===o||r.globals.isBarHorizontal||(o.setAttribute("x",i),o.setAttribute("x1",i),o.setAttribute("x2",i),o.setAttribute("y2",r.globals.gridHeight),o.classList.add("apexcharts-active")),i<0&&(i=0),i>r.globals.gridWidth&&(i=r.globals.gridWidth),n.isXAxisTooltipEnabled){var s=i;"tickWidth"!==r.config.xaxis.crosshairs.width&&"barWidth"!==r.config.xaxis.crosshairs.width||(s=i+n.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&A.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&A.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,n=this.ttCtx;if(null!==n.xaxisTooltip&&0!==n.xcrosshairsWidth){n.xaxisTooltip.classList.add("apexcharts-active");var r,o=n.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=n.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e))e+=t.globals.translateX,r=new A(this.ctx).getTextRects(n.xaxisTooltipText.innerHTML),n.xaxisTooltipText.style.minWidth=r.width+"px",n.xaxisTooltip.style.left=e+"px",n.xaxisTooltip.style.top=o+"px"}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,n=this.ttCtx;null===n.yaxisTTEls&&(n.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var r=parseInt(n.ycrosshairsHidden.getAttribute("y1"),10),o=t.globals.translateY+r,i=n.yaxisTTEls[e].getBoundingClientRect().height,a=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(a-=26),o-=i/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(n.yaxisTTEls[e].classList.add("apexcharts-active"),n.yaxisTTEls[e].style.top=o+"px",n.yaxisTTEls[e].style.left=a+t.config.yaxis[e].tooltip.offsetX+"px"):n.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.w,o=this.ttCtx,i=o.getElTooltip(),a=o.tooltipRect,s=null!==n?parseFloat(n):1,c=parseFloat(e)+s+5,l=parseFloat(t)+s/2;if(c>r.globals.gridWidth/2&&(c=c-a.ttWidth-s-10),c>r.globals.gridWidth-a.ttWidth-10&&(c=r.globals.gridWidth-a.ttWidth),c<-20&&(c=-20),r.config.tooltip.followCursor){var p=o.getElGrid(),u=p.getBoundingClientRect();l=o.e.clientY+r.globals.translateY-u.top-a.ttHeight/2}else r.globals.isBarHorizontal||(a.ttHeight/2+l>r.globals.gridHeight&&(l=r.globals.gridHeight-a.ttHeight+r.globals.translateY),l<0&&(l=0));isNaN(c)||(c+=r.globals.translateX,i.style.left=c+"px",i.style.top=l+"px")}},{key:"moveMarkers",value:function(e,t){var n=this.w,r=this.ttCtx;if(n.globals.markers.size[e]>0)for(var o=n.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),i=0;i0&&(l.setAttribute("r",s),l.setAttribute("cx",n),l.setAttribute("cy",r)),this.moveXCrosshairs(n),i.fixedTooltip||this.moveTooltip(n,r,s)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,n=this.ttCtx,r=n.w,o=0,i=0,a=r.globals.pointsArray;t=new N(this.ctx).getActiveConfigSeriesIndex(!0);var s=n.tooltipUtil.getHoverMarkerSize(t);a[t]&&(o=a[t][e][0],i=a[t][e][1]);var c=n.tooltipUtil.getAllMarkers();if(null!==c)for(var l=0;l0?(c[l]&&c[l].setAttribute("r",s),c[l]&&c[l].setAttribute("cy",u)):c[l]&&c[l].setAttribute("r",0)}}if(this.moveXCrosshairs(o),!n.fixedTooltip){var d=i||r.globals.gridHeight;this.moveTooltip(o,d,s)}}},{key:"moveStickyTooltipOverBars",value:function(e){var t=this.w,n=this.ttCtx,r=t.globals.columnSeries?t.globals.columnSeries.length:t.globals.series.length,o=r>=2&&r%2==0?Math.floor(r/2):Math.floor(r/2)+1;t.globals.isBarHorizontal&&(o=new N(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var i=t.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"']")),a=i?parseFloat(i.getAttribute("cx")):0,s=i?parseFloat(i.getAttribute("cy")):0,c=i?parseFloat(i.getAttribute("barWidth")):0,l=i?parseFloat(i.getAttribute("barHeight")):0,p=n.getElGrid().getBoundingClientRect(),u=i.classList.contains("apexcharts-candlestick-area")||i.classList.contains("apexcharts-boxPlot-area");if(t.globals.isXNumeric?(i&&!u&&(a-=r%2!=0?c/2:0),i&&u&&t.globals.comboCharts&&(a-=c/2)):t.globals.isBarHorizontal||(a=n.xAxisTicksPositions[e-1]+n.dataPointsDividedWidth/2,isNaN(a)&&(a=n.xAxisTicksPositions[e]-n.dataPointsDividedWidth/2)),t.globals.isBarHorizontal?(s>t.globals.gridHeight/2&&(s-=n.tooltipRect.ttHeight),(s=s+t.config.grid.padding.top+l/3)+l>t.globals.gridHeight&&(s=t.globals.gridHeight-l)):t.config.tooltip.followCursor?s=n.e.clientY-p.top-n.tooltipRect.ttHeight/2:s+n.tooltipRect.ttHeight+15>t.globals.gridHeight&&(s=t.globals.gridHeight),s<-10&&(s=-10),t.globals.isBarHorizontal||this.moveXCrosshairs(a),!n.fixedTooltip){var d=s||t.globals.gridHeight;this.moveTooltip(a,d)}}}]),e}(),me=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new Oe(t)}return l(e,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new A(this.ctx),n=new k(this.ctx),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");r=M(r),e.config.chart.stacked&&r.sort((function(e,t){return parseFloat(e.getAttribute("data:realIndex"))-parseFloat(t.getAttribute("data:realIndex"))}));for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=this.w;"bubble"!==o.config.chart.type&&this.newPointSize(e,t);var i=t.getAttribute("cx"),a=t.getAttribute("cy");if(null!==n&&null!==r&&(i=n,a=r),this.tooltipPosition.moveXCrosshairs(i),!this.fixedTooltip){if("radar"===o.config.chart.type){var s=this.ttCtx.getElGrid(),c=s.getBoundingClientRect();i=this.ttCtx.e.clientX-c.left}this.tooltipPosition.moveTooltip(i,a,o.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,n=this,r=this.ttCtx,o=e,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=t.config.markers.hover.size,s=0;s=0?e[t].setAttribute("r",n):e[t].setAttribute("r",0)}}}]),e}(),ge=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t}return l(e,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,n=e.opt,r=e.x,o=e.y,i=e.type,a=this.ttCtx,s=this.w;if(t.target.classList.contains("apexcharts-".concat(i,"-rect"))){var c=this.getAttr(t,"i"),l=this.getAttr(t,"j"),p=this.getAttr(t,"cx"),u=this.getAttr(t,"cy"),d=this.getAttr(t,"width"),b=this.getAttr(t,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:c,j:l,shared:!1,e:t}),s.globals.capturedSeriesIndex=c,s.globals.capturedDataPointIndex=l,r=p+a.tooltipRect.ttWidth/2+d,o=u+a.tooltipRect.ttHeight/2-b/2,a.tooltipPosition.moveXCrosshairs(p+d/2),r>s.globals.gridWidth/2&&(r=p-a.tooltipRect.ttWidth/2+d),a.w.config.tooltip.followCursor){var f=s.globals.dom.elWrap.getBoundingClientRect();r=s.globals.clientX-f.left-(r>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),o=s.globals.clientY-f.top-(o>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:r,y:o}}},{key:"handleMarkerTooltip",value:function(e){var t,n,r=e.e,o=e.opt,i=e.x,a=e.y,s=this.w,c=this.ttCtx;if(r.target.classList.contains("apexcharts-marker")){var l=parseInt(o.paths.getAttribute("cx"),10),p=parseInt(o.paths.getAttribute("cy"),10),u=parseFloat(o.paths.getAttribute("val"));if(n=parseInt(o.paths.getAttribute("rel"),10),t=parseInt(o.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,c.intersect){var d=m.findAncestor(o.paths,"apexcharts-series");d&&(t=parseInt(d.getAttribute("data:realIndex"),10))}if(c.tooltipLabels.drawSeriesTexts({ttItems:o.ttItems,i:t,j:n,shared:!c.showOnIntersect&&s.config.tooltip.shared,e:r}),"mouseup"===r.type&&c.markerClick(r,t,n),s.globals.capturedSeriesIndex=t,s.globals.capturedDataPointIndex=n,i=l,a=p+s.globals.translateY-1.4*c.tooltipRect.ttHeight,c.w.config.tooltip.followCursor){var b=c.getElGrid().getBoundingClientRect();a=c.e.clientY+s.globals.translateY-b.top}u<0&&(a=p),c.marker.enlargeCurrentPoint(n,o.paths,i,a)}return{x:i,y:a}}},{key:"handleBarTooltip",value:function(e){var t,n,r=e.e,o=e.opt,i=this.w,a=this.ttCtx,s=a.getElTooltip(),c=0,l=0,p=0,u=this.getBarTooltipXY({e:r,opt:o});t=u.i;var d=u.barHeight,b=u.j;i.globals.capturedSeriesIndex=t,i.globals.capturedDataPointIndex=b,i.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!i.config.tooltip.shared?(l=u.x,p=u.y,n=Array.isArray(i.config.stroke.width)?i.config.stroke.width[t]:i.config.stroke.width,c=l):i.globals.comboCharts||i.config.tooltip.shared||(c/=2),isNaN(p)?p=i.globals.svgHeight-a.tooltipRect.ttHeight:p<0&&(p=0);var f=parseInt(o.paths.parentNode.getAttribute("data:realIndex"),10),h=i.globals.isMultipleYAxis?i.config.yaxis[f]&&i.config.yaxis[f].reversed:i.config.yaxis[0].reversed;if(l+a.tooltipRect.ttWidth>i.globals.gridWidth&&!h?l-=a.tooltipRect.ttWidth:l<0&&(l=0),a.w.config.tooltip.followCursor){var M=a.getElGrid().getBoundingClientRect();p=a.e.clientY-M.top}null===a.tooltip&&(a.tooltip=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),i.config.tooltip.shared||(i.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(c+n/2):a.tooltipPosition.moveXCrosshairs(c)),!a.fixedTooltip&&(!i.config.tooltip.shared||i.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(h&&(l-=a.tooltipRect.ttWidth)<0&&(l=0),!h||i.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||(p=p+d-2*(i.globals.series[t][b]<0?d:0)),a.tooltipRect.ttHeight+p>i.globals.gridHeight?p=i.globals.gridHeight-a.tooltipRect.ttHeight+i.globals.translateY:(p=p+i.globals.translateY-a.tooltipRect.ttHeight/2)<0&&(p=0),s.style.left=l+i.globals.translateX+"px",s.style.top=p+"px")}},{key:"getBarTooltipXY",value:function(e){var t=e.e,n=e.opt,r=this.w,o=null,i=this.ttCtx,a=0,s=0,c=0,l=0,p=0,u=t.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var d=t.target,b=d.getBoundingClientRect(),f=n.elGrid.getBoundingClientRect(),h=b.height;p=b.height;var M=b.width,z=parseInt(d.getAttribute("cx"),10),O=parseInt(d.getAttribute("cy"),10);l=parseFloat(d.getAttribute("barWidth"));var m="touchmove"===t.type?t.touches[0].clientX:t.clientX;o=parseInt(d.getAttribute("j"),10),a=parseInt(d.parentNode.getAttribute("rel"),10)-1;var g=d.getAttribute("data-range-y1"),v=d.getAttribute("data-range-y2");r.globals.comboCharts&&(a=parseInt(d.parentNode.getAttribute("data:realIndex"),10)),i.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:a,j:o,y1:g?parseInt(g,10):null,y2:v?parseInt(v,10):null,shared:!i.showOnIntersect&&r.config.tooltip.shared,e:t}),r.config.tooltip.followCursor?r.globals.isBarHorizontal?(s=m-f.left+15,c=O-i.dataPointsDividedHeight+h/2-i.tooltipRect.ttHeight/2):(s=r.globals.isXNumeric?z-M/2:z-i.dataPointsDividedWidth+M/2,c=t.clientY-f.top-i.tooltipRect.ttHeight/2-15):r.globals.isBarHorizontal?((s=z)0&&n.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,n){var r=this.ttCtx,o=this.w,i=o.globals.yLabelFormatters[e];if(r.yaxisTooltips[e]){var a=r.getElGrid().getBoundingClientRect(),s=(t-a.top)*n.yRatio[e],c=o.globals.maxYArr[e]-o.globals.minYArr[e],l=o.globals.minYArr[e]+(c-s);r.tooltipPosition.moveYCrosshairs(t-a.top),r.yaxisTooltipText[e].innerHTML=i(l),r.tooltipPosition.moveYAxisTooltip(e)}}}]),e}(),Ae=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new Me(this),this.tooltipLabels=new ze(this),this.tooltipPosition=new Oe(this),this.marker=new me(this),this.intersect=new ge(this),this.axesTooltip=new ve(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return l(e,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map((function(e,n){return!!(e.show&&e.tooltip.enabled&&t.globals.axisCharts)})),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var n=document.createElement("div");if(n.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&n.classList.add(t.config.tooltip.cssClass),n.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(n),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var r=new K(this.ctx);this.xAxisTicksPositions=r.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,n.appendChild(this.tooltipTitle));var o=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(o=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(o),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,n=this.w,r=[],o=this.getElTooltip(),i=function(i){var a=document.createElement("div");a.classList.add("apexcharts-tooltip-series-group"),a.style.order=n.config.tooltip.inverseOrder?e-i:i+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(i)<0&&a.classList.add("apexcharts-tooltip-series-group-hidden");var s=document.createElement("span");s.classList.add("apexcharts-tooltip-marker"),s.style.backgroundColor=n.globals.colors[i],a.appendChild(s);var c=document.createElement("div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=t.tConfig.style.fontFamily||n.config.chart.fontFamily,c.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach((function(e){var t=document.createElement("div");t.classList.add("apexcharts-tooltip-".concat(e,"-group"));var n=document.createElement("span");n.classList.add("apexcharts-tooltip-text-".concat(e,"-label")),t.appendChild(n);var r=document.createElement("span");r.classList.add("apexcharts-tooltip-text-".concat(e,"-value")),t.appendChild(r),c.appendChild(t)})),a.appendChild(c),o.appendChild(a),r.push(a)},a=0;a0&&this.addPathsEventListeners(b,p),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(p)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),n=t.getBoundingClientRect(),r=n.width+10,o=n.height+10,i=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(i=i+e.globals.svgWidth-r+10),s.indexOf("bottom")>-1&&(a=a+e.globals.svgHeight-o-10),t.style.left=i+"px",t.style.top=a+"px",{x:i,y:a,ttWidth:r,ttHeight:o}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var n=this,r=function(r){var o={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(t){return e[r].addEventListener(t,n.onSeriesHover.bind(n,o),{capture:!1,passive:!0})}))},o=0;o=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){n.seriesHover(e,t)}),100-r))}},{key:"seriesHover",value:function(e,t){var n=this;this.lastHoverTime=Date.now();var r=[],o=this.w;o.config.chart.group&&(r=this.ctx.getGroupedCharts()),o.globals.axisCharts&&(o.globals.minX===-1/0&&o.globals.maxX===1/0||0===o.globals.dataPoints)||(r.length?r.forEach((function(r){var o=n.getElTooltip(r),i={paths:e.paths,tooltipEl:o,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===n.w.globals.minX&&r.w.globals.maxX===n.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:i,e:t})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,n=e.ttCtx,r=e.opt,o=e.e,i=t.w,a=this.getElTooltip();a&&(n.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},n.e=o,!n.tooltipUtil.hasBars()||i.globals.comboCharts||n.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new N(t).toggleSeriesOnHover(o,o.target.parentNode),n.fixedTooltip&&n.drawFixedTooltipRect(),i.globals.axisCharts?n.axisChartsTooltips({e:o,opt:r,tooltipRect:n.tooltipRect}):n.nonAxisChartsTooltips({e:o,opt:r,tooltipRect:n.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,n,r=e.e,o=e.opt,i=this.w,a=o.elGrid.getBoundingClientRect(),s="touchmove"===r.type?r.touches[0].clientX:r.clientX,c="touchmove"===r.type?r.touches[0].clientY:r.clientY;if(this.clientY=c,this.clientX=s,i.globals.capturedSeriesIndex=-1,i.globals.capturedDataPointIndex=-1,ca.top+a.height)this.handleMouseOut(o);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){var l=parseInt(o.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(l)<0)return void this.handleMouseOut(o)}var p=this.getElTooltip(),u=this.getElXCrosshairs(),d=i.globals.xyCharts||"bar"===i.config.chart.type&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===r.type||"touchmove"===r.type||"mouseup"===r.type){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.globals.series.length)return;null!==u&&u.classList.add("apexcharts-active");var b=this.yaxisTooltips.filter((function(e){return!0===e}));if(null!==this.ycrosshairs&&b.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect)this.handleStickyTooltip(r,s,c,o);else if("heatmap"===i.config.chart.type||"treemap"===i.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:r,opt:o,x:t,y:n,type:i.config.chart.type});t=f.x,n=f.y,p.style.left=t+"px",p.style.top=n+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:r,opt:o}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:r,opt:o,x:t,y:n});if(this.yaxisTooltips.length)for(var h=0;hc.width?this.handleMouseOut(r):null!==s?this.handleStickyCapturedSeries(e,s,r,a):(this.tooltipUtil.isXoverlap(a)||o.globals.isBarHorizontal)&&this.create(e,this,0,a,r.ttItems)}},{key:"handleStickyCapturedSeries",value:function(e,t,n,r){var o=this.w;this.tConfig.shared||null!==o.globals.series[t][r]?void 0!==o.globals.series[t][r]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(r)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,r,n.ttItems):this.create(e,this,t,r,n.ttItems,!1):this.tooltipUtil.isXoverlap(r)&&this.create(e,this,0,r,n.ttItems):this.handleMouseOut(n)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new A(this.ctx),n=e.globals.dom.Paper.select(".apexcharts-bar-area"),r=0;r5&&void 0!==arguments[5]?arguments[5]:null,a=this.w,s=t;"mouseup"===e.type&&this.markerClick(e,n,r),null===i&&(i=this.tConfig.shared);var c=this.tooltipUtil.hasMarkers(),l=this.tooltipUtil.getElBars();if(a.config.legend.tooltipHoverFormatter){var p=a.config.legend.tooltipHoverFormatter,u=Array.from(this.legendLabels);u.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)}));for(var d=0;d0?s.marker.enlargePoints(r):s.tooltipPosition.moveDynamicPointsOnHover(r)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(l),this.barSeriesHeight>0)){var z=new A(this.ctx),O=a.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(r,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(r);for(var m=0;m0&&(this.totalItems+=e[a].length);for(var s=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),c=0,l=0,p=function(o,a){var p=void 0,u=void 0,d=void 0,b=void 0,f=[],h=[],M=r.globals.comboCharts?t[o]:o;n.yRatio.length>1&&(n.yaxisIndex=M),n.isReversed=r.config.yaxis[n.yaxisIndex]&&r.config.yaxis[n.yaxisIndex].reversed;var z=n.graphics.group({class:"apexcharts-series",seriesName:m.escapeString(r.globals.seriesNames[M]),rel:o+1,"data:realIndex":M});n.ctx.series.addCollapsedClassToSeries(z,M);var O=n.graphics.group({class:"apexcharts-datalabels","data:realIndex":M}),g=0,v=0,A=n.initialPositions(c,l,p,u,d,b);l=A.y,g=A.barHeight,u=A.yDivision,b=A.zeroW,c=A.x,v=A.barWidth,p=A.xDivision,d=A.zeroH,n.yArrj=[],n.yArrjF=[],n.yArrjVal=[],n.xArrj=[],n.xArrjF=[],n.xArrjVal=[],1===n.prevY.length&&n.prevY[0].every((function(e){return isNaN(e)}))&&(n.prevY[0]=n.prevY[0].map((function(e){return d})),n.prevYF[0]=n.prevYF[0].map((function(e){return 0})));for(var y=0;y1?(n=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:s*parseInt(c.config.plotOptions.bar.columnWidth,10)/100,o=this.baseLineY[this.yaxisIndex]+(this.isReversed?c.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),e=c.globals.padHorizontal+(n-s)/2),{x:e,y:t,yDivision:r,xDivision:n,barHeight:a,barWidth:s,zeroH:o,zeroW:i}}},{key:"drawStackedBarPaths",value:function(e){for(var t,n=e.indexes,r=e.barHeight,o=e.strokeWidth,i=e.zeroW,a=e.x,s=e.y,c=e.yDivision,l=e.elSeries,p=this.w,u=s,d=n.i,b=n.j,f=0,h=0;h0){var M=i;this.prevXVal[d-1][b]<0?M=this.series[d][b]>=0?this.prevX[d-1][b]+f-2*(this.isReversed?f:0):this.prevX[d-1][b]:this.prevXVal[d-1][b]>=0&&(M=this.series[d][b]>=0?this.prevX[d-1][b]:this.prevX[d-1][b]-f+2*(this.isReversed?f:0)),t=M}else t=i;a=null===this.series[d][b]?t:t+this.series[d][b]/this.invertedYRatio-2*(this.isReversed?this.series[d][b]/this.invertedYRatio:0);var z=this.barHelpers.getBarpaths({barYPosition:u,barHeight:r,x1:t,x2:a,strokeWidth:o,series:this.series,realIndex:n.realIndex,i:d,j:b,w:p});return this.barHelpers.barBackground({j:b,i:d,y1:u,y2:r,elSeries:l}),s+=c,{pathTo:z.pathTo,pathFrom:z.pathFrom,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(e){var t=e.indexes,n=e.x,r=e.y,o=e.xDivision,i=e.barWidth,a=e.zeroH;e.strokeWidth;var s=e.elSeries,c=this.w,l=t.i,p=t.j,u=t.bc;if(c.globals.isXNumeric){var d=c.globals.seriesX[l][p];d||(d=0),n=(d-c.globals.minX)/this.xRatio-i/2}for(var b,f=n,h=0,M=0;M0&&!c.globals.isXNumeric||l>0&&c.globals.isXNumeric&&c.globals.seriesX[l-1][p]===c.globals.seriesX[l][p]){var z,O,m=Math.min(this.yRatio.length+1,l+1);if(void 0!==this.prevY[l-1])for(var g=1;g=0?O-h+2*(this.isReversed?h:0):O;break}if(this.prevYVal[l-v][p]>=0){z=this.series[l][p]>=0?O:O+h-2*(this.isReversed?h:0);break}}void 0===z&&(z=c.globals.gridHeight),b=this.prevYF[0].every((function(e){return 0===e}))&&this.prevYF.slice(1,l).every((function(e){return e.every((function(e){return isNaN(e)}))}))?c.globals.gridHeight-a:z}else b=c.globals.gridHeight-a;r=b-this.series[l][p]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[l][p]/this.yRatio[this.yaxisIndex]:0);var A=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:i,y1:b,y2:r,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:t.realIndex,i:l,j:p,w:c});return this.barHelpers.barBackground({bc:u,j:p,i:l,x1:f,x2:i,elSeries:s}),n+=o,{pathTo:A.pathTo,pathFrom:A.pathFrom,x:c.globals.isXNumeric?n-o:n,y:r}}}]),n}(),xe=function(e){u(n,B);var t=h(n);function n(){return s(this,n),t.apply(this,arguments)}return l(n,[{key:"draw",value:function(e,t){var n=this,r=this.w,o=new A(this.ctx),a=new S(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal;var s=new y(this.ctx,r);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);for(var c=o.group({class:"apexcharts-".concat(r.config.chart.type,"-series apexcharts-plot-series")}),l=function(s){n.isBoxPlot="boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[s].type;var l,p,u,d,b,f,h=void 0,M=void 0,z=[],O=[],g=r.globals.comboCharts?t[s]:s,v=o.group({class:"apexcharts-series",seriesName:m.escapeString(r.globals.seriesNames[g]),rel:s+1,"data:realIndex":g});n.ctx.series.addCollapsedClassToSeries(v,g),e[s].length>0&&(n.visibleI=n.visibleI+1),n.yRatio.length>1&&(n.yaxisIndex=g);var A=n.barHelpers.initialPositions();M=A.y,b=A.barHeight,p=A.yDivision,d=A.zeroW,h=A.x,f=A.barWidth,l=A.xDivision,u=A.zeroH,O.push(h+f/2);for(var y=o.group({class:"apexcharts-datalabels","data:realIndex":g}),x=function(t){var o=n.barHelpers.getStrokeWidth(s,t,g),c=null,m={indexes:{i:s,j:t,realIndex:g},x:h,y:M,strokeWidth:o,elSeries:v};c=n.isHorizontal?n.drawHorizontalBoxPaths(i(i({},m),{},{yDivision:p,barHeight:b,zeroW:d})):n.drawVerticalBoxPaths(i(i({},m),{},{xDivision:l,barWidth:f,zeroH:u})),M=c.y,h=c.x,t>0&&O.push(h+f/2),z.push(M),c.pathTo.forEach((function(i,l){var p=!n.isBoxPlot&&n.candlestickOptions.wick.useFillColor?c.color[l]:r.globals.stroke.colors[s],u=a.fillPath({seriesNumber:g,dataPointIndex:t,color:c.color[l],value:e[s][t]});n.renderSeries({realIndex:g,pathFill:u,lineFill:p,j:t,i:s,pathFrom:c.pathFrom,pathTo:i,strokeWidth:o,elSeries:v,x:h,y:M,series:e,barHeight:b,barWidth:f,elDataLabelsWrap:y,visibleSeries:n.visibleI,type:r.config.chart.type})}))},q=0;qz.c&&(u=!1);var g=Math.min(z.o,z.c),v=Math.max(z.o,z.c),y=z.m;s.globals.isXNumeric&&(n=(s.globals.seriesX[M][p]-s.globals.minX)/this.xRatio-o/2);var x=n+o*this.visibleI;void 0===this.series[l][p]||null===this.series[l][p]?(g=i,v=i):(g=i-g/h,v=i-v/h,O=i-z.h/h,m=i-z.l/h,y=i-z.m/h);var q=c.move(x,i),w=c.move(x+o/2,g);return s.globals.previousPaths.length>0&&(w=this.getPreviousPath(M,p,!0)),q=this.isBoxPlot?[c.move(x,g)+c.line(x+o/2,g)+c.line(x+o/2,O)+c.line(x+o/4,O)+c.line(x+o-o/4,O)+c.line(x+o/2,O)+c.line(x+o/2,g)+c.line(x+o,g)+c.line(x+o,y)+c.line(x,y)+c.line(x,g+a/2),c.move(x,y)+c.line(x+o,y)+c.line(x+o,v)+c.line(x+o/2,v)+c.line(x+o/2,m)+c.line(x+o-o/4,m)+c.line(x+o/4,m)+c.line(x+o/2,m)+c.line(x+o/2,v)+c.line(x,v)+c.line(x,y)+"z"]:[c.move(x,v)+c.line(x+o/2,v)+c.line(x+o/2,O)+c.line(x+o/2,v)+c.line(x+o,v)+c.line(x+o,g)+c.line(x+o/2,g)+c.line(x+o/2,m)+c.line(x+o/2,g)+c.line(x,g)+c.line(x,v-a/2)],w+=c.move(x,g),s.globals.isXNumeric||(n+=r),{pathTo:q,pathFrom:w,x:n,y:v,barXPosition:x,color:this.isBoxPlot?f:u?[d]:[b]}}},{key:"drawHorizontalBoxPaths",value:function(e){var t=e.indexes;e.x;var n=e.y,r=e.yDivision,o=e.barHeight,i=e.zeroW,a=e.strokeWidth,s=this.w,c=new A(this.ctx),l=t.i,p=t.j,u=this.boxOptions.colors.lower;this.isBoxPlot&&(u=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var d=this.invertedYRatio,b=t.realIndex,f=this.getOHLCValue(b,p),h=i,M=i,z=Math.min(f.o,f.c),O=Math.max(f.o,f.c),m=f.m;s.globals.isXNumeric&&(n=(s.globals.seriesX[b][p]-s.globals.minX)/this.invertedXRatio-o/2);var g=n+o*this.visibleI;void 0===this.series[l][p]||null===this.series[l][p]?(z=i,O=i):(z=i+z/d,O=i+O/d,h=i+f.h/d,M=i+f.l/d,m=i+f.m/d);var v=c.move(i,g),y=c.move(z,g+o/2);return s.globals.previousPaths.length>0&&(y=this.getPreviousPath(b,p,!0)),v=[c.move(z,g)+c.line(z,g+o/2)+c.line(h,g+o/2)+c.line(h,g+o/2-o/4)+c.line(h,g+o/2+o/4)+c.line(h,g+o/2)+c.line(z,g+o/2)+c.line(z,g+o)+c.line(m,g+o)+c.line(m,g)+c.line(z+a/2,g),c.move(m,g)+c.line(m,g+o)+c.line(O,g+o)+c.line(O,g+o/2)+c.line(M,g+o/2)+c.line(M,g+o-o/4)+c.line(M,g+o/4)+c.line(M,g+o/2)+c.line(O,g+o/2)+c.line(O,g)+c.line(m,g)+"z"],y+=c.move(z,g),s.globals.isXNumeric||(n+=r),{pathTo:v,pathFrom:y,x:O,y:n,barYPosition:g,color:u}}},{key:"getOHLCValue",value:function(e,t){var n=this.w;return{o:this.isBoxPlot?n.globals.seriesCandleH[e][t]:n.globals.seriesCandleO[e][t],h:this.isBoxPlot?n.globals.seriesCandleO[e][t]:n.globals.seriesCandleH[e][t],m:n.globals.seriesCandleM[e][t],l:this.isBoxPlot?n.globals.seriesCandleC[e][t]:n.globals.seriesCandleL[e][t],c:this.isBoxPlot?n.globals.seriesCandleL[e][t]:n.globals.seriesCandleC[e][t]}}}]),n}(),qe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,n=e.config.plotOptions[e.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map((function(e,n){e.from<=0&&(t=!0)})),t}},{key:"getShadeColor",value:function(e,t,n,r){var o=this.w,i=1,a=o.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,n);o.globals.hasNegs||r?i=o.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(i=1-s.percent/100,"treemap"===e&&(i=(1-s.percent/100)*(1.25*a)));var c=s.color,l=new m;return o.config.plotOptions[e].enableShades&&(c="dark"===this.w.config.theme.mode?m.hexToRgba(l.shadeColor(-1*i,s.color),o.config.fill.opacity):m.hexToRgba(l.shadeColor(i,s.color),o.config.fill.opacity)),{color:c,colorProps:s}}},{key:"determineColor",value:function(e,t,n){var r=this.w,o=r.globals.series[t][n],i=r.config.plotOptions[e],a=i.colorScale.inverse?n:t;i.distributed&&"treemap"===r.config.chart.type&&(a=n);var s=r.globals.colors[a],c=null,l=Math.min.apply(Math,M(r.globals.series[t])),p=Math.max.apply(Math,M(r.globals.series[t]));i.distributed||"heatmap"!==e||(l=r.globals.minY,p=r.globals.maxY),void 0!==i.colorScale.min&&(l=i.colorScale.minr.globals.maxY?i.colorScale.max:r.globals.maxY);var u=Math.abs(p)+Math.abs(l),d=100*o/(0===u?u-1e-6:u);return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(e,t){if(o>=e.from&&o<=e.to){s=e.color,c=e.foreColor?e.foreColor:null,l=e.from,p=e.to;var n=Math.abs(p)+Math.abs(l);d=100*o/(0===n?n-1e-6:n)}})),{color:s,foreColor:c,percent:d}}},{key:"calculateDataLabels",value:function(e){var t=e.text,n=e.x,r=e.y,o=e.i,i=e.j,a=e.colorProps,s=e.fontSize,c=this.w.config.dataLabels,l=new A(this.ctx),p=new E(this.ctx),u=null;if(c.enabled){u=l.group({class:"apexcharts-data-labels"});var d=c.offsetX,b=c.offsetY,f=n+d,h=r+parseFloat(c.style.fontSize)/3+b;p.plotDataLabelsText({x:f,y:h,text:t,i:o,j:i,color:a.foreColor,parent:u,fontSize:s,dataLabelsConfig:c})}return u}},{key:"addListeners",value:function(e){var t=new A(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),e}(),we=function(){function e(t,n){s(this,e),this.ctx=t,this.w=t.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new qe(t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return l(e,[{key:"draw",value:function(e){var t=this.w,n=new A(this.ctx),r=n.group({class:"apexcharts-heatmap"});r.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var o=t.globals.gridWidth/t.globals.dataPoints,i=t.globals.gridHeight/t.globals.series.length,a=0,s=!1;this.negRange=this.helpers.checkColorRange();var c=e.slice();t.config.yaxis[0].reversed&&(s=!0,c.reverse());for(var l=s?0:c.length-1;s?l=0;s?l++:l--){var p=n.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:m.escapeString(t.globals.seriesNames[l]),rel:l+1,"data:realIndex":l});if(this.ctx.series.addCollapsedClassToSeries(p,l),t.config.chart.dropShadow.enabled){var u=t.config.chart.dropShadow;new v(this.ctx).dropShadow(p,u,l)}for(var d=0,b=t.config.plotOptions.heatmap.shadeIntensity,f=0;f-1&&this.pieClicked(u),n.config.dataLabels.enabled){var y=O.x,x=O.y,q=100*b/this.fullAngle+"%";if(0!==b&&n.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(r+a):r+a=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(s=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(s)>this.fullAngle&&(s-=this.fullAngle);var c=Math.PI*(s-90)/180,l=t.centerX+o*Math.cos(a),p=t.centerY+o*Math.sin(a),u=t.centerX+o*Math.cos(c),d=t.centerY+o*Math.sin(c),b=m.polarToCartesian(t.centerX,t.centerY,t.donutSize,s),f=m.polarToCartesian(t.centerX,t.centerY,t.donutSize,i),h=r>180?1:0,M=["M",l,p,"A",o,o,0,h,1,u,d];return"donut"===t.chartType?[].concat(M,["L",b.x,b.y,"A",t.donutSize,t.donutSize,0,h,0,f.x,f.y,"L",l,p,"z"]).join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[].concat(M,["L",t.centerX,t.centerY,"L",l,p]).join(" "):[].concat(M).join(" ")}},{key:"drawPolarElements",value:function(e){var t=this.w,n=new $(this.ctx),r=new A(this.ctx),o=new We(this.ctx),i=r.group(),a=r.group(),s=n.niceScale(0,Math.ceil(this.maxY),t.config.yaxis[0].tickAmount,0,!0),c=s.result.reverse(),l=s.result.length;this.maxY=s.niceMax;for(var p=t.globals.radialSize,u=p/(l-1),d=0;d1&&e.total.show&&(o=e.total.color);var a=i.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");n=(0,e.value.formatter)(n,i),r||"function"!=typeof e.total.formatter||(n=e.total.formatter(i));var c=t===e.total.label;t=e.name.formatter(t,c,i),null!==a&&(a.textContent=t),null!==s&&(s.textContent=n),null!==a&&(a.style.fill=o)}},{key:"printDataLabelsInner",value:function(e,t){var n=this.w,r=e.getAttribute("data:value"),o=n.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];n.globals.series.length>1&&this.printInnerLabels(t,o,r,e);var i=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==i&&(i.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,n=this.w,r=new A(this.ctx),o=n.config.plotOptions.polarArea.spokes;if(0!==o.strokeWidth){for(var i=[],a=360/n.globals.series.length,s=0;s1)a&&!t.total.showAlways?c({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(t,t.total.label,t.total.formatter(o));else if(c({makeSliceOut:!1,printLabel:!0}),!a)if(o.globals.selectedDataPoints.length&&o.globals.series.length>1)if(o.globals.selectedDataPoints[0].length>0){var l=o.globals.selectedDataPoints[0],p=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(l));this.printDataLabelsInner(p,t)}else i&&o.globals.selectedDataPoints.length&&0===o.globals.selectedDataPoints[0].length&&(i.style.opacity=0);else i&&o.globals.series.length>1&&(i.style.opacity=0)}}]),e}(),Ce=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new A(this.ctx),this.lineColorArr=void 0!==n.globals.stroke.colors?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight0&&(h=t.getPreviousPath(s));for(var M=0;M=10?e.x>0?(n="start",r+=10):e.x<0&&(n="end",r-=10):n="middle",Math.abs(e.y)>=t-10&&(e.y<0?o-=10:e.y>0&&(o+=10)),{textAnchor:n,newX:r,newY:o}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,n=null,r=0;r0&&parseInt(o.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[r].paths[0]&&(n=t.globals.previousPaths[r].paths[0].d)}return n}},{key:"getDataPointsPos",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var r=[],o=0;o=360&&(d=360-Math.abs(this.startAngle)-.1);var b=n.drawPath({d:"",stroke:p,strokeWidth:a*parseInt(l.strokeWidth,10)/100,fill:"none",strokeOpacity:l.opacity,classes:"apexcharts-radialbar-area"});if(l.dropShadow.enabled){var f=l.dropShadow;o.dropShadow(b,f)}c.add(b),b.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(b,{centerX:e.centerX,centerY:e.centerY,endAngle:d,startAngle:u,size:e.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:t.globals.easing})}return r}},{key:"drawArcs",value:function(e){var t=this.w,n=new A(this.ctx),r=new S(this.ctx),o=new v(this.ctx),i=n.group(),a=this.getStrokeWidth(e);e.size=e.size-a/2;var s=t.config.plotOptions.radialBar.hollow.background,c=e.size-a*e.series.length-this.margin*e.series.length-a*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,l=c-t.config.plotOptions.radialBar.hollow.margin;void 0!==t.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(e,i,c,s));var p=this.drawHollow({size:l,centerX:e.centerX,centerY:e.centerY,fill:s||"transparent"});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){var u=t.config.plotOptions.radialBar.hollow.dropShadow;o.dropShadow(p,u)}var d=1;!this.radialDataLabels.total.show&&t.globals.series.length>1&&(d=0);var b=null;this.radialDataLabels.show&&(b=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:c,centerX:e.centerX,centerY:e.centerY,opacity:d})),"back"===t.config.plotOptions.radialBar.hollow.position&&(i.add(p),b&&i.add(b));var f=!1;t.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var h=f?e.series.length-1:0;f?h>=0:h100?100:e.series[h])/100,x=Math.round(this.totalAngle*y)+this.startAngle,q=void 0;t.globals.dataChanged&&(g=this.startAngle,q=Math.round(this.totalAngle*m.negToZero(t.globals.previousPaths[h])/100)+g),Math.abs(x)+Math.abs(O)>=360&&(x-=.01),Math.abs(q)+Math.abs(g)>=360&&(q-=.01);var w=x-O,W=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[h]:t.config.stroke.dashArray,R=n.drawPath({d:"",stroke:z,strokeWidth:a,fill:"none",fillOpacity:t.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+h,strokeDashArray:W});if(A.setAttrs(R.node,{"data:angle":w,"data:value":e.series[h]}),t.config.chart.dropShadow.enabled){var C=t.config.chart.dropShadow;o.dropShadow(R,C,h)}o.setSelectionFilter(R,0,h),this.addListeners(R,this.radialDataLabels),M.add(R),R.attr({index:0,j:h});var _=0;!this.initialAnim||t.globals.resized||t.globals.dataChanged||(_=t.config.chart.animations.speed),t.globals.dataChanged&&(_=t.config.chart.animations.dynamicAnimation.speed),this.animDur=_/(1.2*e.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(R,{centerX:e.centerX,centerY:e.centerY,endAngle:x,startAngle:O,prevEndAngle:q,prevStartAngle:g,size:e.size,i:h,totalItems:2,animBeginArr:this.animBeginArr,dur:_,shouldSetPrevPaths:!0,easing:t.globals.easing})}return{g:i,elHollow:p,dataLabels:b}}},{key:"drawHollow",value:function(e){var t=new A(this.ctx).drawCircle(2*e.size);return t.attr({class:"apexcharts-radialbar-hollow",cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill}),t}},{key:"drawHollowImage",value:function(e,t,n,r){var o=this.w,i=new S(this.ctx),a=m.randomId(),s=o.config.plotOptions.radialBar.hollow.image;if(o.config.plotOptions.radialBar.hollow.imageClipped)i.clippedImgArea({width:n,height:n,image:s,patternID:"pattern".concat(o.globals.cuid).concat(a)}),r="url(#pattern".concat(o.globals.cuid).concat(a,")");else{var c=o.config.plotOptions.radialBar.hollow.imageWidth,l=o.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===c&&void 0===l){var p=o.globals.dom.Paper.image(s).loaded((function(t){this.move(e.centerX-t.width/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+o.config.plotOptions.radialBar.hollow.imageOffsetY)}));t.add(p)}else{var u=o.globals.dom.Paper.image(s).loaded((function(t){this.move(e.centerX-c/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-l/2+o.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(c,l)}));t.add(u)}}return r}},{key:"getStrokeWidth",value:function(e){var t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}}]),n}(),Se=function(){function e(t){s(this,e),this.w=t.w,this.lineCtx=t}return l(e,[{key:"sameValueSeriesFix",value:function(e,t){var n=this.w;if("line"===n.config.chart.type&&("gradient"===n.config.fill.type||"gradient"===n.config.fill.type[e])&&new y(this.lineCtx.ctx,n).seriesHaveSameValues(e)){var r=t[e].slice();r[r.length-1]=r[r.length-1]+1e-6,t[e]=r}return t}},{key:"calculatePoints",value:function(e){var t=e.series,n=e.realIndex,r=e.x,o=e.y,i=e.i,a=e.j,s=e.prevY,c=this.w,l=[],p=[];if(0===a){var u=this.lineCtx.categoryAxisCorrection+c.config.markers.offsetX;c.globals.isXNumeric&&(u=(c.globals.seriesX[n][0]-c.globals.minX)/this.lineCtx.xRatio+c.config.markers.offsetX),l.push(u),p.push(m.isNumber(t[i][0])?s+c.config.markers.offsetY:null),l.push(r+c.config.markers.offsetX),p.push(m.isNumber(t[i][a+1])?o+c.config.markers.offsetY:null)}else l.push(r+c.config.markers.offsetX),p.push(m.isNumber(t[i][a+1])?o+c.config.markers.offsetY:null);return{x:l,y:p}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,n=e.pathFromArea,r=e.realIndex,o=this.w,i=0;i0&&parseInt(a.realIndex,10)===parseInt(r,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,t=o.globals.previousPaths[i].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,n=o.globals.previousPaths[i].paths[0].d,o.config.stroke.show&&o.globals.previousPaths[i].paths[1]&&(t=o.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:t,pathFromArea:n}}},{key:"determineFirstPrevY",value:function(e){var t=e.i,n=e.series,r=e.prevY,o=e.lineYPosition,i=this.w;if(void 0!==n[t][0])r=(o=i.config.chart.stacked&&t>0?this.lineCtx.prevSeriesY[t-1][0]:this.lineCtx.zeroY)-n[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?n[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(i.config.chart.stacked&&t>0&&void 0===n[t][0])for(var a=t-1;a>=0;a--)if(null!==n[a][0]&&void 0!==n[a][0]){r=o=this.lineCtx.prevSeriesY[a][0];break}return{prevY:r,lineYPosition:o}}}]),e}(),ke=function(){function e(t,n,r){s(this,e),this.ctx=t,this.w=t.w,this.xyRatios=n,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||r,this.scatter=new L(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Se(this),this.markers=new k(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return l(e,[{key:"draw",value:function(e,t,n){var r=this.w,o=new A(this.ctx),i=r.globals.comboCharts?t:r.config.chart.type,a=o.group({class:"apexcharts-".concat(i,"-series apexcharts-plot-series")}),s=new y(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=s.getLogSeries(e),this.yRatio=s.getLogYRatios(this.yRatio);for(var c=[],l=0;l0&&(b=(r.globals.seriesX[p][0]-r.globals.minX)/this.xRatio),d.push(b);var f,h=b,M=h,z=this.zeroY;z=this.lineHelpers.determineFirstPrevY({i:l,series:e,prevY:z,lineYPosition:0}).prevY,u.push(z),f=z;var O=this._calculatePathsFrom({series:e,i:l,realIndex:p,prevX:M,prevY:z}),m=this._iterateOverDataPoints({series:e,realIndex:p,i:l,x:b,y:1,pX:h,pY:f,pathsFrom:O,linePaths:[],areaPaths:[],seriesIndex:n,lineYPosition:0,xArrj:d,yArrj:u});this._handlePaths({type:i,realIndex:p,i:l,paths:m}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),c.push(this.elSeries)}if(r.config.chart.stacked)for(var g=c.length;g>0;g--)a.add(c[g-1]);else for(var v=0;v1&&(this.yaxisIndex=n),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?r.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>r.globals.gridHeight||"end"===r.config.plotOptions.area.fillTo)&&(this.areaBottomY=r.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=o.group({class:"apexcharts-series",seriesName:m.escapeString(r.globals.seriesNames[n])}),this.elPointsMain=o.group({class:"apexcharts-series-markers-wrap","data:realIndex":n}),this.elDataLabelsWrap=o.group({class:"apexcharts-datalabels","data:realIndex":n});var i=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":i,rel:t+1,"data:realIndex":n}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,n,r,o,i=e.series,a=e.i,s=e.realIndex,c=e.prevX,l=e.prevY,p=this.w,u=new A(this.ctx);if(null===i[a][0]){for(var d=0;d0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:r,pathFromArea:o,realIndex:s});r=b.pathFromLine,o=b.pathFromArea}return{prevX:c,prevY:l,linePath:t,areaPath:n,pathFromLine:r,pathFromArea:o}}},{key:"_handlePaths",value:function(e){var t=e.type,n=e.realIndex,r=e.i,o=e.paths,a=this.w,s=new A(this.ctx),c=new S(this.ctx);this.prevSeriesY.push(o.yArrj),a.globals.seriesXvalues[n]=o.xArrj,a.globals.seriesYvalues[n]=o.yArrj;var l=a.config.forecastDataPoints;if(l.count>0){var p=a.globals.seriesXvalues[n][a.globals.seriesXvalues[n].length-l.count-1],u=s.drawRect(p,0,a.globals.gridWidth,a.globals.gridHeight,0);a.globals.dom.elForecastMask.appendChild(u.node);var d=s.drawRect(0,0,p,a.globals.gridHeight,0);a.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:n});var b={i:r,realIndex:n,animationDelay:r,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var f=c.fillPath({seriesNumber:n}),h=0;h0){var y=s.renderPaths(g);y.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&y.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(y),y.attr("clip-path","url(#forecastMask".concat(a.globals.cuid,")")),v.attr("clip-path","url(#nonForecastMask".concat(a.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){for(var t=e.series,n=e.realIndex,r=e.i,o=e.x,i=e.y,a=e.pX,s=e.pY,c=e.pathsFrom,l=e.linePaths,p=e.areaPaths,u=e.seriesIndex,d=e.lineYPosition,b=e.xArrj,f=e.yArrj,h=this.w,M=new A(this.ctx),z=this.yRatio,O=c.prevY,g=c.linePath,v=c.areaPath,y=c.pathFromLine,x=c.pathFromArea,q=m.isNumber(h.globals.minYArr[n])?h.globals.minYArr[n]:h.globals.minY,w=h.globals.dataPoints>1?h.globals.dataPoints-1:h.globals.dataPoints,W=0;W0&&h.globals.collapsedSeries.length-1){t--;break}return t>=0?t:0}(r-1)][W+1]:this.zeroY,i=R?d-q/z[this.yaxisIndex]+2*(this.isReversed?q/z[this.yaxisIndex]:0):d-t[r][W+1]/z[this.yaxisIndex]+2*(this.isReversed?t[r][W+1]/z[this.yaxisIndex]:0),b.push(o),f.push(i);var _=this.lineHelpers.calculatePoints({series:t,x:o,y:i,realIndex:n,i:r,j:W,prevY:O}),S=this._createPaths({series:t,i:r,realIndex:n,j:W,x:o,y:i,pX:a,pY:s,linePath:g,areaPath:v,linePaths:l,areaPaths:p,seriesIndex:u});p=S.areaPaths,l=S.linePaths,a=S.pX,s=S.pY,v=S.areaPath,g=S.linePath,this.appendPathFrom&&(y+=M.line(o,this.zeroY),x+=M.line(o,this.zeroY)),this.handleNullDataPoints(t,_,r,W,n),this._handleMarkersAndLabels({pointsPos:_,series:t,x:o,y:i,prevY:O,i:r,j:W,realIndex:n})}return{yArrj:f,xArrj:b,pathFromArea:x,areaPaths:p,pathFromLine:y,linePaths:l}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.pointsPos;e.series,e.x,e.y,e.prevY;var n=e.i,r=e.j,o=e.realIndex,i=this.w,a=new E(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:o,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{i.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var s=this.markers.plotChartMarkers(t,o,r+1);null!==s&&this.elPointsMain.add(s)}var c=a.drawDataLabel(t,o,r+1,null);null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(e){var t=e.series,n=e.i,r=e.realIndex,o=e.j,i=e.x,a=e.y,s=e.pX,c=e.pY,l=e.linePath,p=e.areaPath,u=e.linePaths,d=e.areaPaths,b=e.seriesIndex,f=this.w,h=new A(this.ctx),M=f.config.stroke.curve,z=this.areaBottomY;if(Array.isArray(f.config.stroke.curve)&&(M=Array.isArray(b)?f.config.stroke.curve[b[n]]:f.config.stroke.curve[n]),"smooth"===M){var O=.35*(i-s);f.globals.hasNullValues?(null!==t[n][o]&&(null!==t[n][o+1]?(l=h.move(s,c)+h.curve(s+O,c,i-O,a,i+1,a),p=h.move(s+1,c)+h.curve(s+O,c,i-O,a,i+1,a)+h.line(i,z)+h.line(s,z)+"z"):(l=h.move(s,c),p=h.move(s,c)+"z")),u.push(l),d.push(p)):(l+=h.curve(s+O,c,i-O,a,i,a),p+=h.curve(s+O,c,i-O,a,i,a)),s=i,c=a,o===t[n].length-2&&(p=p+h.curve(s,c,i,a,i,z)+h.move(i,a)+"z",f.globals.hasNullValues||(u.push(l),d.push(p)))}else{if(null===t[n][o+1]){l+=h.move(i,a);var m=f.globals.isXNumeric?(f.globals.seriesX[r][o]-f.globals.minX)/this.xRatio:i-this.xDivision;p=p+h.line(m,z)+h.move(i,a)+"z"}null===t[n][o]&&(l+=h.move(i,a),p+=h.move(i,z)),"stepline"===M?(l=l+h.line(i,null,"H")+h.line(null,a,"V"),p=p+h.line(i,null,"H")+h.line(null,a,"V")):"straight"===M&&(l+=h.line(i,a),p+=h.line(i,a)),o===t[n].length-2&&(p=p+h.line(i,z)+h.move(i,a)+"z",u.push(l),d.push(p))}return{linePaths:u,areaPaths:d,pX:s,pY:c,linePath:l,areaPath:p}}},{key:"handleNullDataPoints",value:function(e,t,n,r,o){var i=this.w;if(null===e[n][r]&&i.config.markers.showNullDataPoints||1===e[n].length){var a=this.markers.plotChartMarkers(t,o,r+1,this.strokeWidth-i.config.markers.strokeWidth/2,!0);null!==a&&this.elPointsMain.add(a)}}}]),e}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function e(t,n,r,o){this.xoffset=t,this.yoffset=n,this.height=o,this.width=r,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(e){var t,n=[],r=this.xoffset,o=this.yoffset,a=i(e)/this.height,s=i(e)/this.width;if(this.width>=this.height)for(t=0;t=this.height){var r=t/this.height,o=this.width-r;n=new e(this.xoffset+r,this.yoffset,o,this.height)}else{var i=t/this.width,a=this.height-i;n=new e(this.xoffset,this.yoffset+i,this.width,a)}return n}}function t(t,r,o,a,s){return a=void 0===a?0:a,s=void 0===s?0:s,function(e){var t,n,r=[];for(t=0;t=r(o,n))}(t,c=e[0],s)?(t.push(c),n(e.slice(1),t,o,a)):(l=o.cutArea(i(t),a),a.push(o.getCoordinates(t)),n(e,[],l,a)),a;a.push(o.getCoordinates(t))}function r(e,t){var n=Math.min.apply(Math,e),r=Math.max.apply(Math,e),o=i(e);return Math.max(Math.pow(t,2)*r/Math.pow(o,2),Math.pow(o,2)/(Math.pow(t,2)*n))}function o(e){return e&&e.constructor===Array}function i(e){var t,n=0;for(t=0;ti-r&&c.width<=a-o){var l=s.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(l.x," ").concat(l.y,")"))}}},{key:"animateTreemap",value:function(e,t,n,r){var o=new g(this.ctx);o.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:n.x,y:n.y,width:n.width,height:n.height},r,(function(){o.animationCompleted(e)}))}}]),e}(),Ne=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return l(e,[{key:"calculateTimeScaleTicks",value:function(e,t){var n=this,r=this.w;if(r.globals.allSeriesCollapsed)return r.globals.labels=[],r.globals.timescaleLabels=[],[];var o=new X(this.ctx),a=(t-e)/864e5;this.determineInterval(a),r.globals.disableZoomIn=!1,r.globals.disableZoomOut=!1,a<.00011574074074074075?r.globals.disableZoomIn=!0:a>5e4&&(r.globals.disableZoomOut=!0);var s=o.getTimeUnitsfromTimestamp(e,t,this.utc),c=r.globals.gridWidth/a,l=c/24,p=l/60,u=p/60,d=Math.floor(24*a),b=Math.floor(1440*a),f=Math.floor(86400*a),h=Math.floor(a),M=Math.floor(a/30),z=Math.floor(a/365),O={minMillisecond:s.minMillisecond,minSecond:s.minSecond,minMinute:s.minMinute,minHour:s.minHour,minDate:s.minDate,minMonth:s.minMonth,minYear:s.minYear},m={firstVal:O,currentMillisecond:O.minMillisecond,currentSecond:O.minSecond,currentMinute:O.minMinute,currentHour:O.minHour,currentMonthDate:O.minDate,currentDate:O.minDate,currentMonth:O.minMonth,currentYear:O.minYear,daysWidthOnXAxis:c,hoursWidthOnXAxis:l,minutesWidthOnXAxis:p,secondsWidthOnXAxis:u,numberOfSeconds:f,numberOfMinutes:b,numberOfHours:d,numberOfDays:h,numberOfMonths:M,numberOfYears:z};switch(this.tickInterval){case"years":this.generateYearScale(m);break;case"months":case"half_year":this.generateMonthScale(m);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(m);break;case"hours":this.generateHourScale(m);break;case"minutes_fives":case"minutes":this.generateMinuteScale(m);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(m)}var g=this.timeScaleArray.map((function(e){var t={position:e.position,unit:e.unit,year:e.year,day:e.day?e.day:1,hour:e.hour?e.hour:0,month:e.month+1};return"month"===e.unit?i(i({},t),{},{day:1,value:e.value+1}):"day"===e.unit||"hour"===e.unit?i(i({},t),{},{value:e.value}):"minute"===e.unit?i(i({},t),{},{value:e.value,minute:e.value}):"second"===e.unit?i(i({},t),{},{value:e.value,minute:e.minute,second:e.second}):e}));return g.filter((function(e){var t=1,o=Math.ceil(r.globals.gridWidth/120),i=e.value;void 0!==r.config.xaxis.tickAmount&&(o=r.config.xaxis.tickAmount),g.length>o&&(t=Math.floor(g.length/o));var a=!1,s=!1;switch(n.tickInterval){case"years":"year"===e.unit&&(a=!0);break;case"half_year":t=7,"year"===e.unit&&(a=!0);break;case"months":t=1,"year"===e.unit&&(a=!0);break;case"months_fortnight":t=15,"year"!==e.unit&&"month"!==e.unit||(a=!0),30===i&&(s=!0);break;case"months_days":t=10,"month"===e.unit&&(a=!0),30===i&&(s=!0);break;case"week_days":t=8,"month"===e.unit&&(a=!0);break;case"days":t=1,"month"===e.unit&&(a=!0);break;case"hours":"day"===e.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":i%5!=0&&(s=!0);break;case"seconds_tens":i%10!=0&&(s=!0)}if("hours"===n.tickInterval||"minutes_fives"===n.tickInterval||"seconds_tens"===n.tickInterval||"seconds_fives"===n.tickInterval){if(!s)return!0}else if((i%t==0||a)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var n=this.w,r=this.formatDates(e),o=this.removeOverlappingTS(r);n.globals.timescaleLabels=o.slice(),new ue(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,n=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case n>15:this.tickInterval="minutes_fives";break;case n>5:this.tickInterval="minutes";break;case n>1:this.tickInterval="seconds_tens";break;case 60*n>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,n=e.currentMonth,r=e.currentYear,o=e.daysWidthOnXAxis,i=e.numberOfYears,a=t.minYear,s=0,c=new X(this.ctx),l="year";if(t.minDate>1||t.minMonth>0){var p=c.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);s=(c.determineDaysOfYear(t.minYear)-p+1)*o,a=t.minYear+1,this.timeScaleArray.push({position:s,value:a,unit:l,year:a,month:m.monthMod(n+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:s,value:a,unit:l,year:r,month:m.monthMod(n+1)});for(var u=a,d=s,b=0;b1){c=(l.determineDaysOfMonths(r+1,t.minYear)-n+1)*i,s=m.monthMod(r+1);var d=o+u,b=m.monthMod(s),f=s;0===s&&(p="year",f=d,b=1,d+=u+=1),this.timeScaleArray.push({position:c,value:f,unit:p,year:d,month:b})}else this.timeScaleArray.push({position:c,value:s,unit:p,year:o,month:m.monthMod(r)});for(var h=s+1,M=c,z=0,O=1;za.determineDaysOfMonths(t+1,n)?(l=1,s="month",d=t+=1,t):t},u=(24-t.minHour)*o,d=c,b=p(l,n,r);0===t.minHour&&1===t.minDate?(u=0,d=m.monthMod(t.minMonth),s="month",l=t.minDate,i++):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(u=0,c=t.minDate,d=c,b=p(l=c,n,r)),this.timeScaleArray.push({position:u,value:d,unit:s,year:this._getYear(r,b,0),month:m.monthMod(b),day:l});for(var f=u,h=0;hs.determineDaysOfMonths(t+1,o)&&(h=1,t+=1),{month:t,date:h}},p=function(e,t){return e>s.determineDaysOfMonths(t+1,o)?t+=1:t},u=60-(t.minMinute+t.minSecond/60),d=u*i,b=t.minHour+1,f=b+1;60===u&&(d=0,f=(b=t.minHour)+1);var h=n,M=p(h,r);this.timeScaleArray.push({position:d,value:b,unit:c,day:h,hour:f,year:o,month:m.monthMod(M)});for(var z=d,O=0;O=24&&(f=0,c="day",M=l(h+=1,M).month,M=p(h,M));var g=this._getYear(o,M,0);z=0===f&&0===O?u*i:60*i+z;var v=0===f?h:f;this.timeScaleArray.push({position:z,value:v,unit:c,hour:f,day:h,year:g,month:m.monthMod(M)}),f++}}},{key:"generateMinuteScale",value:function(e){for(var t=e.currentMillisecond,n=e.currentSecond,r=e.currentMinute,o=e.currentHour,i=e.currentDate,a=e.currentMonth,s=e.currentYear,c=e.minutesWidthOnXAxis,l=e.secondsWidthOnXAxis,p=e.numberOfMinutes,u=r+1,d=i,b=a,f=s,h=o,M=(60-n-t/1e3)*l,z=0;z=60&&(u=0,24===(h+=1)&&(h=0)),this.timeScaleArray.push({position:M,value:u,unit:"minute",hour:h,minute:u,day:d,year:this._getYear(f,b,0),month:m.monthMod(b)}),M+=c,u++}},{key:"generateSecondScale",value:function(e){for(var t=e.currentMillisecond,n=e.currentSecond,r=e.currentMinute,o=e.currentHour,i=e.currentDate,a=e.currentMonth,s=e.currentYear,c=e.secondsWidthOnXAxis,l=e.numberOfSeconds,p=n+1,u=r,d=i,b=a,f=s,h=o,M=(1e3-t)/1e3*c,z=0;z=60&&(p=0,++u>=60&&(u=0,24===++h&&(h=0))),this.timeScaleArray.push({position:M,value:p,unit:"second",hour:h,minute:u,second:p,day:d,year:this._getYear(f,b,0),month:m.monthMod(b)}),M+=c,p++}},{key:"createRawDateString",value:function(e,t){var n=e.year;return 0===e.month&&(e.month=1),n+="-"+("0"+e.month.toString()).slice(-2),"day"===e.unit?n+="day"===e.unit?"-"+("0"+t).slice(-2):"-01":n+="-"+("0"+(e.day?e.day:"1")).slice(-2),"hour"===e.unit?n+="hour"===e.unit?"T"+("0"+t).slice(-2):"T00":n+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),"minute"===e.unit?n+=":"+("0"+t).slice(-2):n+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),"second"===e.unit?n+=":"+("0"+t).slice(-2):n+=":00",this.utc&&(n+=".000Z"),n}},{key:"formatDates",value:function(e){var t=this,n=this.w;return e.map((function(e){var r=e.value.toString(),o=new X(t.ctx),i=t.createRawDateString(e,r),a=o.getDate(o.parseDate(i));if(t.utc||(a=o.getDate(o.parseDateWithTimezone(i))),void 0===n.config.xaxis.labels.format){var s="dd MMM",c=n.config.xaxis.labels.datetimeFormatter;"year"===e.unit&&(s=c.year),"month"===e.unit&&(s=c.month),"day"===e.unit&&(s=c.day),"hour"===e.unit&&(s=c.hour),"minute"===e.unit&&(s=c.minute),"second"===e.unit&&(s=c.second),r=o.formatDate(a,s)}else r=o.formatDate(a,n.config.xaxis.labels.format);return{dateString:i,position:e.position,value:r,unit:e.unit,year:e.year,month:e.month}}))}},{key:"removeOverlappingTS",value:function(e){var t,n=this,r=new A(this.ctx),o=!1;e.length>0&&e[0].value&&e.every((function(t){return t.value.length===e[0].value.length}))&&(o=!0,t=r.getTextRects(e[0].value).width);var i=0,a=e.map((function(a,s){if(s>0&&n.w.config.xaxis.labels.hideOverlappingLabels){var c=o?t:r.getTextRects(e[i].value).width,l=e[i].position;return a.position>l+c+10?(i=s,a):null}return a}));return a.filter((function(e){return null!==e}))}},{key:"_getYear",value:function(e,t,n){return e+Math.floor(t/12)+n}}]),e}(),Pe=function(){function e(t,n){s(this,e),this.ctx=n,this.w=n.w,this.el=t}return l(e,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,n=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(n)>-1,e.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(n)>-1,e.isBarHorizontal=("bar"===t.chart.type||"rangeBar"===t.chart.type||"boxPlot"===t.chart.type)&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),A.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background=t.chart.background,this.setSVGDimensions(),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elAnnotations=e.dom.Paper.group().attr({class:"apexcharts-annotations"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elWrap.appendChild(e.dom.elLegendWrap),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var n=this.w,r=n.config,o=n.globals,i={series:[],i:[]},a={series:[],i:[]},s={series:[],i:[]},c={series:[],i:[]},l={series:[],i:[]},p={series:[],i:[]},u={series:[],i:[]};o.series.map((function(t,d){var b=0;void 0!==e[d].type?("column"===e[d].type||"bar"===e[d].type?(o.series.length>1&&r.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),l.series.push(t),l.i.push(d),b++,n.globals.columnSeries=l.series):"area"===e[d].type?(a.series.push(t),a.i.push(d),b++):"line"===e[d].type?(i.series.push(t),i.i.push(d),b++):"scatter"===e[d].type?(s.series.push(t),s.i.push(d)):"bubble"===e[d].type?(c.series.push(t),c.i.push(d),b++):"candlestick"===e[d].type?(p.series.push(t),p.i.push(d),b++):"boxPlot"===e[d].type?(u.series.push(t),u.i.push(d),b++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),b>1&&(o.comboCharts=!0)):(i.series.push(t),i.i.push(d))}));var d=new ke(this.ctx,t),b=new xe(this.ctx,t);this.ctx.pie=new Re(this.ctx);var f=new _e(this.ctx);this.ctx.rangeBar=new j(this.ctx,t);var h=new Ce(this.ctx),M=[];if(o.comboCharts){if(a.series.length>0&&M.push(d.draw(a.series,"area",a.i)),l.series.length>0)if(n.config.chart.stacked){var z=new ye(this.ctx,t);M.push(z.draw(l.series,l.i))}else this.ctx.bar=new B(this.ctx,t),M.push(this.ctx.bar.draw(l.series,l.i));if(i.series.length>0&&M.push(d.draw(i.series,"line",i.i)),p.series.length>0&&M.push(b.draw(p.series,p.i)),u.series.length>0&&M.push(b.draw(u.series,u.i)),s.series.length>0){var O=new ke(this.ctx,t,!0);M.push(O.draw(s.series,"scatter",s.i))}if(c.series.length>0){var m=new ke(this.ctx,t,!0);M.push(m.draw(c.series,"bubble",c.i))}}else switch(r.chart.type){case"line":M=d.draw(o.series,"line");break;case"area":M=d.draw(o.series,"area");break;case"bar":r.chart.stacked?M=new ye(this.ctx,t).draw(o.series):(this.ctx.bar=new B(this.ctx,t),M=this.ctx.bar.draw(o.series));break;case"candlestick":case"boxPlot":M=new xe(this.ctx,t).draw(o.series);break;case"rangeBar":M=this.ctx.rangeBar.draw(o.series);break;case"heatmap":M=new we(this.ctx,t).draw(o.series);break;case"treemap":M=new Te(this.ctx,t).draw(o.series);break;case"pie":case"donut":case"polarArea":M=this.ctx.pie.draw(o.series);break;case"radialBar":M=f.draw(o.series);break;case"radar":M=h.draw(o.series);break;default:M=d.draw(o.series)}return M}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var n=m.getDimensions(this.el),r=t.chart.width.toString().split(/[0-9]+/g).pop();"%"===r?m.isNumber(n[0])&&(0===n[0].width&&(n=m.getDimensions(this.el.parentNode)),e.svgWidth=n[0]*parseInt(t.chart.width,10)/100):"px"!==r&&""!==r||(e.svgWidth=parseInt(t.chart.width,10));var o=t.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===o){var i=m.getDimensions(this.el.parentNode);e.svgHeight=i[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.axisCharts?e.svgHeight=e.svgWidth/1.61:e.svgHeight=e.svgWidth/1.2;if(e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),A.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==o){var a=t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+a+"px"}e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,t=e.translateY,n={transform:"translate("+e.translateX+", "+t+")"};A.setAttrs(e.dom.elGraphical.node,n)}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,n=0,r=e.config.chart.sparkline.enabled?1:15;r+=e.config.grid.padding.bottom,"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||!e.config.legend.show||e.config.legend.floating||(n=new be(this.ctx).legendHelpers.getLegendBBox().clwh+10);var o=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),i=2.05*e.globals.radialSize;if(o&&!e.config.chart.sparkline.enabled&&0!==e.config.plotOptions.radialBar.startAngle){var a=m.getBoundingClientRect(o);i=a.bottom;var s=a.bottom-a.top;i=Math.max(2.05*e.globals.radialSize,s)}var c=i+t.translateY+n+r;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",c),e.config.chart.height&&String(e.config.chart.height).indexOf("%")>0||(t.dom.elWrap.style.height=c+"px",A.setAttrs(t.dom.Paper.node,{height:c}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=c+"px")}},{key:"coreCalculations",value:function(){new J(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map((function(e){return[]}))},n=new F,r=this.w.globals;n.initGlobalVars(r),r.seriesXvalues=t(),r.seriesYvalues=t()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var e=null,t=this.w;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new re(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new re(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ne(this.ctx);var n=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?n=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(n=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(n)}e=new y(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&"function"!=typeof t.config.chart.events.selection){var n=t.config.chart.brush.targets||[t.config.chart.brush.target];n.forEach((function(t){var n=ApexCharts.getChartByID(t);n.w.globals.brushSource=e.ctx,"function"!=typeof n.w.config.chart.events.zoomed&&(n.w.config.chart.events.zoomed=function(){e.updateSourceChart(n)}),"function"!=typeof n.w.config.chart.events.scrolled&&(n.w.config.chart.events.scrolled=function(){e.updateSourceChart(n)})})),t.config.chart.events.selection=function(e,r){n.forEach((function(e){var n=ApexCharts.getChartByID(e),o=m.clone(t.config.yaxis);if(t.config.chart.brush.autoScaleYaxis&&1===n.w.globals.series.length){var a=new $(n);o=a.autoScaleY(n,o,r)}var s=n.w.config.yaxis.reduce((function(e,t,r){return[].concat(M(e),[i(i({},n.w.config.yaxis[r]),{},{min:o[0].min,max:o[0].max})])}),[]);n.ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max},yaxis:s},!1,!1,!1,!1)}))}}}}]),e}(),Be=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"_updateOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(s){var c=[t.ctx];o&&(c=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(c=[t.ctx],t.ctx.w.globals.isExecCalled=!1),c.forEach((function(o,l){var p=o.w;if(p.globals.shouldAnimate=r,n||(p.globals.resized=!0,p.globals.dataChanged=!0,r&&o.series.getPreviousPaths()),e&&"object"===a(e)&&(o.config=new D(e),e=y.extendArrayProps(o.config,e,p),o.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,p.config=m.extend(p.config,e),i&&(p.globals.lastXAxis=e.xaxis?m.clone(e.xaxis):[],p.globals.lastYAxis=e.yaxis?m.clone(e.yaxis):[],p.globals.initialConfig=m.extend({},p.config),p.globals.initialSeries=m.clone(p.config.series),e.series))){for(var u=0;u2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(o){var i,a=n.w;return a.globals.shouldAnimate=t,a.globals.dataChanged=!0,t&&n.ctx.series.getPreviousPaths(),a.globals.axisCharts?(0===(i=e.map((function(e,t){return n._extendSeries(e,t)}))).length&&(i=[{data:[]}]),a.config.series=i):a.config.series=e.slice(),r&&(a.globals.initialConfig.series=m.clone(a.config.series),a.globals.initialSeries=m.clone(a.config.series)),n.ctx.update().then((function(){o(n.ctx)}))}))}},{key:"_extendSeries",value:function(e,t){var n=this.w,r=n.config.series[t];return i(i({},n.config.series[t]),{},{name:e.name?e.name:r&&r.name,color:e.color?e.color:r&&r.color,type:e.type?e.type:r&&r.type,data:e.data?e.data:r&&r.data})}},{key:"toggleDataPointSelection",value:function(e,t){var n=this.w,r=null,o=".apexcharts-series[data\\:realIndex='".concat(e,"']");return n.globals.axisCharts?r=n.globals.dom.Paper.select("".concat(o," path[j='").concat(t,"'], ").concat(o," circle[j='").concat(t,"'], ").concat(o," rect[j='").concat(t,"']")).members[0]:void 0===t&&(r=n.globals.dom.Paper.select("".concat(o," path[j='").concat(e,"']")).members[0],"pie"!==n.config.chart.type&&"polarArea"!==n.config.chart.type&&"donut"!==n.config.chart.type||this.ctx.pie.pieClicked(e)),r?(new A(this.ctx).pathMouseDown(r,null),r.node?r.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach((function(n){void 0!==e.xaxis[n]&&(t.config.xaxis[n]=e.xaxis[n],t.globals.lastXAxis[n]=e.xaxis[n])})),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var n=new I(e);e=n.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&"100%"===e.chart.stackType&&(Array.isArray(e.yaxis)?e.yaxis.forEach((function(t,n){e.yaxis[n].min=0,e.yaxis[n].max=100})):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,n=this.w,r=n.globals.lastXAxis,o=n.globals.lastYAxis;e&&e.xaxis&&(r=e.xaxis),e&&e.yaxis&&(o=e.yaxis),n.config.xaxis.min=r.min,n.config.xaxis.max=r.max;n.config.yaxis.map((function(e,r){n.globals.zoomed||void 0!==o[r]?function(e){void 0!==o[e]&&(n.config.yaxis[e].min=o[e].min,n.config.yaxis[e].max=o[e].max)}(r):void 0!==t.ctx.opts.yaxis[r]&&(e.min=t.ctx.opts.yaxis[r].min,e.max=t.ctx.opts.yaxis[r].max)}))}}]),e}();Le="undefined"!=typeof window?window:void 0,Ee=function(e,t){var n=(void 0!==this?this:e).SVG=function(e){if(n.supported)return e=new n.Doc(e),n.parser.draw||n.prepare(),e};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.dev",n.supported=!0,!n.supported)return!1;n.did=1e3,n.eid=function(e){return"Svgjs"+u(e)+n.did++},n.create=function(e){var n=t.createElementNS(this.ns,e);return n.setAttribute("id",this.eid(e)),n},n.extend=function(){var e,t;t=(e=[].slice.call(arguments)).pop();for(var r=e.length-1;r>=0;r--)if(e[r])for(var o in t)e[r].prototype[o]=t[o];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(e){var t="function"==typeof e.create?e.create:function(){this.constructor.call(this,n.create(e.create))};return e.inherit&&(t.prototype=new e.inherit),e.extend&&n.extend(t,e.extend),e.construct&&n.extend(e.parent||n.Container,e.construct),t},n.adopt=function(t){return t?t.instance?t.instance:((r="svg"==t.nodeName?t.parentNode instanceof e.SVGElement?new n.Nested:new n.Doc:"linearGradient"==t.nodeName?new n.Gradient("linear"):"radialGradient"==t.nodeName?new n.Gradient("radial"):n[u(t.nodeName)]?new(n[u(t.nodeName)]):new n.Element(t)).type=t.nodeName,r.node=t,t.instance=r,r instanceof n.Doc&&r.namespace().defs(),r.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),r):null;var r},n.prepare=function(){var e=t.getElementsByTagName("body")[0],r=(e?new n.Doc(e):n.adopt(t.documentElement).nested()).size(2,0);n.parser={body:e||t.documentElement,draw:r.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:r.polyline().node,path:r.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},t.addEventListener("DOMContentLoaded",(function(){n.parser.draw||n.prepare()}),!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},n.utils={map:function(e,t){for(var n=e.length,r=[],o=0;o1?1:e,new n.Color({r:~~(this.r+(this.destination.r-this.r)*e),g:~~(this.g+(this.destination.g-this.g)*e),b:~~(this.b+(this.destination.b-this.b)*e)})):this}}),n.Color.test=function(e){return e+="",n.regex.isHex.test(e)||n.regex.isRgb.test(e)},n.Color.isRgb=function(e){return e&&"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b},n.Color.isColor=function(e){return n.Color.isRgb(e)||n.Color.test(e)},n.Array=function(e,t){0==(e=(e||[]).valueOf()).length&&t&&(e=t.valueOf()),this.value=this.parse(e)},n.extend(n.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(e){return e=e.valueOf(),Array.isArray(e)?e:this.split(e)}}),n.PointArray=function(e,t){n.Array.call(this,e,t||[[0,0]])},n.PointArray.prototype=new n.Array,n.PointArray.prototype.constructor=n.PointArray;for(var r={M:function(e,t,n){return t.x=n.x=e[0],t.y=n.y=e[1],["M",t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],["L",e[0],e[1]]},H:function(e,t){return t.x=e[0],["H",e[0]]},V:function(e,t){return t.y=e[0],["V",e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],["C",e[0],e[1],e[2],e[3],e[4],e[5]]},Q:function(e,t){return t.x=e[2],t.y=e[3],["Q",e[0],e[1],e[2],e[3]]},Z:function(e,t,n){return t.x=n.x,t.y=n.y,["Z"]}},o="mlhvqtcsaz".split(""),i=0,s=o.length;ic);return i},bbox:function(){return n.parser.draw||n.prepare(),n.parser.path.setAttribute("d",this.toString()),n.parser.path.getBBox()}}),n.Number=n.invent({create:function(e,t){this.value=0,this.unit=t||"","number"==typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"==typeof e?(t=e.match(n.regex.numberAndUnit))&&(this.value=parseFloat(t[1]),"%"==t[5]?this.value/=100:"s"==t[5]&&(this.value*=1e3),this.unit=t[5]):e instanceof n.Number&&(this.value=e.valueOf(),this.unit=e.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(e){return e=new n.Number(e),new n.Number(this+e,this.unit||e.unit)},minus:function(e){return e=new n.Number(e),new n.Number(this-e,this.unit||e.unit)},times:function(e){return e=new n.Number(e),new n.Number(this*e,this.unit||e.unit)},divide:function(e){return e=new n.Number(e),new n.Number(this/e,this.unit||e.unit)},to:function(e){var t=new n.Number(this);return"string"==typeof e&&(t.unit=e),t},morph:function(e){return this.destination=new n.Number(e),e.relative&&(this.destination.value+=this.value),this},at:function(e){return this.destination?new n.Number(this.destination).minus(this).times(e).plus(this):this}}}),n.Element=n.invent({create:function(e){this._stroke=n.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=e)&&(this.type=e.nodeName,this.node.instance=this,this._stroke=e.getAttribute("stroke")||this._stroke)},extend:{x:function(e){return this.attr("x",e)},y:function(e){return this.attr("y",e)},cx:function(e){return null==e?this.x()+this.width()/2:this.x(e-this.width()/2)},cy:function(e){return null==e?this.y()+this.height()/2:this.y(e-this.height()/2)},move:function(e,t){return this.x(e).y(t)},center:function(e,t){return this.cx(e).cy(t)},width:function(e){return this.attr("width",e)},height:function(e){return this.attr("height",e)},size:function(e,t){var r=b(this,e,t);return this.width(new n.Number(r.width)).height(new n.Number(r.height))},clone:function(e){this.writeDataToDom();var t=M(this.node.cloneNode(!0));return e?e.add(t):this.after(t),t},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(e){return this.after(e).remove(),e},addTo:function(e){return e.put(this)},putIn:function(e){return e.add(this)},id:function(e){return this.attr("id",e)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var e=this.attr("class");return null==e?[]:e.trim().split(n.regex.delimiter)},hasClass:function(e){return-1!=this.classes().indexOf(e)},addClass:function(e){if(!this.hasClass(e)){var t=this.classes();t.push(e),this.attr("class",t.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter((function(t){return t!=e})).join(" ")),this},toggleClass:function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)},reference:function(e){return n.get(this.attr(e))},parent:function(t){var r=this;if(!r.node.parentNode)return null;if(r=n.adopt(r.node.parentNode),!t)return r;for(;r&&r.node instanceof e.SVGElement;){if("string"==typeof t?r.matches(t):r instanceof t)return r;if(!r.node.parentNode||"#document"==r.node.parentNode.nodeName)return null;r=n.adopt(r.node.parentNode)}},doc:function(){return this instanceof n.Doc?this:this.parent(n.Doc)},parents:function(e){var t=[],n=this;do{if(!(n=n.parent(e))||!n.node)break;t.push(n)}while(n.parent);return t},matches:function(e){return function(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}(this.node,e)},native:function(){return this.node},svg:function(e){var r=t.createElement("svg");if(!(e&&this instanceof n.Parent))return r.appendChild(e=t.createElement("svg")),this.writeDataToDom(),e.appendChild(this.node.cloneNode(!0)),r.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");r.innerHTML=""+e.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var o=0,i=r.firstChild.childNodes.length;o":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return 1-Math.cos(e*Math.PI/2)}},n.morph=function(e){return function(t,r){return new n.MorphObj(t,r).at(e)}},n.Situation=n.invent({create:function(e){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new n.Number(e.duration).valueOf(),this.delay=new n.Number(e.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=e.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),n.FX=n.invent({create:function(e){this._target=e,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(e,t,r){"object"===a(e)&&(t=e.ease,r=e.delay,e=e.duration);var o=new n.Situation({duration:e||1e3,delay:r||0,ease:n.easing[t||"-"]||t});return this.queue(o),this},target:function(e){return e&&e instanceof n.Element?(this._target=e,this):this._target},timeToAbsPos:function(e){return(e-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(e){return this.situation.duration/this._speed*e+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=e.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){e.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(e){return("function"==typeof e||e instanceof n.Situation)&&this.situations.push(e),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof n.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var e,t=this.situation;if(t.init)return this;for(var r in t.animations){e=this.target()[r](),Array.isArray(e)||(e=[e]),Array.isArray(t.animations[r])||(t.animations[r]=[t.animations[r]]);for(var o=e.length;o--;)t.animations[r][o]instanceof n.Number&&(e[o]=new n.Number(e[o])),t.animations[r][o]=e[o].morph(t.animations[r][o])}for(var r in t.attrs)t.attrs[r]=new n.MorphObj(this.target().attr(r),t.attrs[r]);for(var r in t.styles)t.styles[r]=new n.MorphObj(this.target().style(r),t.styles[r]);return t.initialTransformation=this.target().matrixify(),t.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(e,t){var n=this.active;return this.active=!1,t&&this.clearQueue(),e&&this.situation&&(!n&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(e){var t=this.last();return this.target().on("finished.fx",(function n(r){r.detail.situation==t&&(e.call(this,t),this.off("finished.fx",n))})),this._callStart()},during:function(e){var t=this.last(),r=function(r){r.detail.situation==t&&e.call(this,r.detail.pos,n.morph(r.detail.pos),r.detail.eased,t)};return this.target().off("during.fx",r).on("during.fx",r),this.after((function(){this.off("during.fx",r)})),this._callStart()},afterAll:function(e){var t=function t(n){e.call(this),this.off("allfinished.fx",t)};return this.target().off("allfinished.fx",t).on("allfinished.fx",t),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(e,t,n){return this.last()[n||"animations"][e]=t,this._callStart()},step:function(e){var t,n,r;e||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(t=Math.max(this.absPos,0),n=Math.floor(t),!0===this.situation.loops||nthis.lastPos&&i<=o&&(this.situation.once[i].call(this.target(),this.pos,o),delete this.situation.once[i]);return this.active&&this.target().fire("during",{pos:this.pos,eased:o,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=o,this):this},eachAt:function(){var e,t=this,r=this.target(),o=this.situation;for(var i in o.animations)e=[].concat(o.animations[i]).map((function(e){return"string"!=typeof e&&e.at?e.at(o.ease(t.pos),t.pos):e})),r[i].apply(r,e);for(var i in o.attrs)e=[i].concat(o.attrs[i]).map((function(e){return"string"!=typeof e&&e.at?e.at(o.ease(t.pos),t.pos):e})),r.attr.apply(r,e);for(var i in o.styles)e=[i].concat(o.styles[i]).map((function(e){return"string"!=typeof e&&e.at?e.at(o.ease(t.pos),t.pos):e})),r.style.apply(r,e);if(o.transforms.length){e=o.initialTransformation,i=0;for(var a=o.transforms.length;i=0;--r)this[m[r]]=null!=e[m[r]]?e[m[r]]:t[m[r]]},extend:{extract:function(){var e=f(this,0,1);f(this,1,0);var t=180/Math.PI*Math.atan2(e.y,e.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(t*Math.PI/180)+this.f*Math.sin(t*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(t*Math.PI/180)+this.e*Math.sin(-t*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new n.Matrix(this)}},clone:function(){return new n.Matrix(this)},morph:function(e){return this.destination=new n.Matrix(e),this},multiply:function(e){return new n.Matrix(this.native().multiply(function(e){return e instanceof n.Matrix||(e=new n.Matrix(e)),e}(e).native()))},inverse:function(){return new n.Matrix(this.native().inverse())},translate:function(e,t){return new n.Matrix(this.native().translate(e||0,t||0))},native:function(){for(var e=n.parser.native.createSVGMatrix(),t=m.length-1;t>=0;t--)e[m[t]]=this[m[t]];return e},toString:function(){return"matrix("+O(this.a)+","+O(this.b)+","+O(this.c)+","+O(this.d)+","+O(this.e)+","+O(this.f)+")"}},parent:n.Element,construct:{ctm:function(){return new n.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof n.Nested){var e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new n.Matrix(t)}return new n.Matrix(this.node.getScreenCTM())}}}),n.Point=n.invent({create:function(e,t){var n;n=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===a(e)?{x:e.x,y:e.y}:null!=e?{x:e,y:null!=t?t:e}:{x:0,y:0},this.x=n.x,this.y=n.y},extend:{clone:function(){return new n.Point(this)},morph:function(e,t){return this.destination=new n.Point(e,t),this}}}),n.extend(n.Element,{point:function(e,t){return new n.Point(e,t).transform(this.screenCTM().inverse())}}),n.extend(n.Element,{attr:function(e,t,r){if(null==e){for(e={},r=(t=this.node.attributes).length-1;r>=0;r--)e[t[r].nodeName]=n.regex.isNumber.test(t[r].nodeValue)?parseFloat(t[r].nodeValue):t[r].nodeValue;return e}if("object"===a(e))for(var o in e)this.attr(o,e[o]);else if(null===t)this.node.removeAttribute(e);else{if(null==t)return null==(t=this.node.getAttribute(e))?n.defaults.attrs[e]:n.regex.isNumber.test(t)?parseFloat(t):t;"stroke-width"==e?this.attr("stroke",parseFloat(t)>0?this._stroke:null):"stroke"==e&&(this._stroke=t),"fill"!=e&&"stroke"!=e||(n.regex.isImage.test(t)&&(t=this.doc().defs().image(t,0,0)),t instanceof n.Image&&(t=this.doc().defs().pattern(0,0,(function(){this.add(t)})))),"number"==typeof t?t=new n.Number(t):n.Color.isColor(t)?t=new n.Color(t):Array.isArray(t)&&(t=new n.Array(t)),"leading"==e?this.leading&&this.leading(t):"string"==typeof r?this.node.setAttributeNS(r,e,t.toString()):this.node.setAttribute(e,t.toString()),!this.rebuild||"font-size"!=e&&"x"!=e||this.rebuild(e,t)}return this}}),n.extend(n.Element,{transform:function(e,t){var r;return"object"!==a(e)?(r=new n.Matrix(this).extract(),"string"==typeof e?r[e]:r):(r=new n.Matrix(this),t=!!t||!!e.relative,null!=e.a&&(r=t?r.multiply(new n.Matrix(e)):new n.Matrix(e)),this.attr("transform",r))}}),n.extend(n.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(n.regex.transforms).slice(0,-1).map((function(e){var t=e.trim().split("(");return[t[0],t[1].split(n.regex.delimiter).map((function(e){return parseFloat(e)}))]})).reduce((function(e,t){return"matrix"==t[0]?e.multiply(h(t[1])):e[t[0]].apply(e,t[1])}),new n.Matrix)},toParent:function(e){if(this==e)return this;var t=this.screenCTM(),n=e.screenCTM().inverse();return this.addTo(e).untransform().transform(n.multiply(t)),this},toDoc:function(){return this.toParent(this.doc())}}),n.Transformation=n.invent({create:function(e,t){if(arguments.length>1&&"boolean"!=typeof t)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(e))for(var n=0,r=this.arguments.length;n=0},index:function(e){return[].slice.call(this.node.childNodes).indexOf(e.node)},get:function(e){return n.adopt(this.node.childNodes[e])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(e,t){for(var r=this.children(),o=0,i=r.length;o=0;r--)t.childNodes[r]instanceof e.SVGElement&&M(t.childNodes[r]);return n.adopt(t).id(n.eid(t.nodeName))}function z(e){return null==e.x&&(e.x=0,e.y=0,e.width=0,e.height=0),e.w=e.width,e.h=e.height,e.x2=e.x+e.width,e.y2=e.y+e.height,e.cx=e.x+e.width/2,e.cy=e.y+e.height/2,e}function O(e){return Math.abs(e)>1e-37?e:0}["fill","stroke"].forEach((function(e){var t={};t[e]=function(t){if(void 0===t)return this;if("string"==typeof t||n.Color.isRgb(t)||t&&"function"==typeof t.fill)this.attr(e,t);else for(var r=c[e].length-1;r>=0;r--)null!=t[c[e][r]]&&this.attr(c.prefix(e,c[e][r]),t[c[e][r]]);return this},n.extend(n.Element,n.FX,t)})),n.extend(n.Element,n.FX,{translate:function(e,t){return this.transform({x:e,y:t})},matrix:function(e){return this.attr("transform",new n.Matrix(6==arguments.length?[].slice.call(arguments):e))},opacity:function(e){return this.attr("opacity",e)},dx:function(e){return this.x(new n.Number(e).plus(this instanceof n.FX?0:this.x()),!0)},dy:function(e){return this.y(new n.Number(e).plus(this instanceof n.FX?0:this.y()),!0)}}),n.extend(n.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(e){return this.node.getPointAtLength(e)}}),n.Set=n.invent({create:function(e){Array.isArray(e)?this.members=e:this.clear()},extend:{add:function(){for(var e=[].slice.call(arguments),t=0,n=e.length;t-1&&this.members.splice(t,1),this},each:function(e){for(var t=0,n=this.members.length;t=0},index:function(e){return this.members.indexOf(e)},get:function(e){return this.members[e]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(e){return new n.Set(e)}}}),n.FX.Set=n.invent({create:function(e){this.set=e}}),n.Set.inherit=function(){var e=[];for(var t in n.Shape.prototype)"function"==typeof n.Shape.prototype[t]&&"function"!=typeof n.Set.prototype[t]&&e.push(t);for(var t in e.forEach((function(e){n.Set.prototype[e]=function(){for(var t=0,r=this.members.length;t=0;e--)delete this.memory()[arguments[e]];return this},memory:function(){return this._memory||(this._memory={})}}),n.get=function(e){var r=t.getElementById(function(e){var t=(e||"").toString().match(n.regex.reference);if(t)return t[1]}(e)||e);return n.adopt(r)},n.select=function(e,r){return new n.Set(n.utils.map((r||t).querySelectorAll(e),(function(e){return n.adopt(e)})))},n.extend(n.Parent,{select:function(e){return n.select(e,this.node)}});var m="abcdef".split("");if("function"!=typeof e.CustomEvent){var g=function(e,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var r=t.createEvent("CustomEvent");return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r};g.prototype=e.Event.prototype,n.CustomEvent=g}else n.CustomEvent=e.CustomEvent;return n},void 0!==(r=function(){return Ee(Le,Le.document)}.call(t,n,t,e))&&(e.exports=r),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(e,t){return this.add(e,t),!e.attr("in")&&this.autoSetIn&&e.attr("in",this.source),e.attr("result")||e.attr("result",e),e},blend:function(e,t,n){return this.put(new SVG.BlendEffect(e,t,n))},colorMatrix:function(e,t){return this.put(new SVG.ColorMatrixEffect(e,t))},convolveMatrix:function(e){return this.put(new SVG.ConvolveMatrixEffect(e))},componentTransfer:function(e){return this.put(new SVG.ComponentTransferEffect(e))},composite:function(e,t,n){return this.put(new SVG.CompositeEffect(e,t,n))},flood:function(e,t){return this.put(new SVG.FloodEffect(e,t))},offset:function(e,t){return this.put(new SVG.OffsetEffect(e,t))},image:function(e){return this.put(new SVG.ImageEffect(e))},merge:function(){var e=[void 0];for(var t in arguments)e.push(arguments[t]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,e)))},gaussianBlur:function(e,t){return this.put(new SVG.GaussianBlurEffect(e,t))},morphology:function(e,t){return this.put(new SVG.MorphologyEffect(e,t))},diffuseLighting:function(e,t,n){return this.put(new SVG.DiffuseLightingEffect(e,t,n))},displacementMap:function(e,t,n,r,o){return this.put(new SVG.DisplacementMapEffect(e,t,n,r,o))},specularLighting:function(e,t,n,r){return this.put(new SVG.SpecularLightingEffect(e,t,n,r))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(e,t,n,r,o){return this.put(new SVG.TurbulenceEffect(e,t,n,r,o))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(e){var t=this.put(new SVG.Filter);return"function"==typeof e&&e.call(t,t),t}}),SVG.extend(SVG.Container,{filter:function(e){return this.defs().filter(e)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(e){return this.filterer=e instanceof SVG.Element?e:this.doc().filter(e),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(e){return this.filterer&&!0===e&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",e)},result:function(e){return null==e?this.attr("result"):this.attr("result",e)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",e)},result:function(e){return null==e?this.attr("result"):this.attr("result",e)},toString:function(){return this.result()}}});var e={blend:function(e,t){return this.parent()&&this.parent().blend(this,e,t)},colorMatrix:function(e,t){return this.parent()&&this.parent().colorMatrix(e,t).in(this)},convolveMatrix:function(e){return this.parent()&&this.parent().convolveMatrix(e).in(this)},componentTransfer:function(e){return this.parent()&&this.parent().componentTransfer(e).in(this)},composite:function(e,t){return this.parent()&&this.parent().composite(this,e,t)},flood:function(e,t){return this.parent()&&this.parent().flood(e,t)},offset:function(e,t){return this.parent()&&this.parent().offset(e,t).in(this)},image:function(e){return this.parent()&&this.parent().image(e)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(e,t){return this.parent()&&this.parent().gaussianBlur(e,t).in(this)},morphology:function(e,t){return this.parent()&&this.parent().morphology(e,t).in(this)},diffuseLighting:function(e,t,n){return this.parent()&&this.parent().diffuseLighting(e,t,n).in(this)},displacementMap:function(e,t,n,r){return this.parent()&&this.parent().displacementMap(this,e,t,n,r)},specularLighting:function(e,t,n,r){return this.parent()&&this.parent().specularLighting(e,t,n,r).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(e,t,n,r,o){return this.parent()&&this.parent().turbulence(e,t,n,r,o).in(this)}};SVG.extend(SVG.Effect,e),SVG.extend(SVG.ParentEffect,e),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(e){this.attr("in",e)}}});var t={blend:function(e,t,n){this.attr({in:e,in2:t,mode:n||"normal"})},colorMatrix:function(e,t){"matrix"==e&&(t=o(t)),this.attr({type:e,values:void 0===t?null:t})},convolveMatrix:function(e){e=o(e),this.attr({order:Math.sqrt(e.split(" ").length),kernelMatrix:e})},composite:function(e,t,n){this.attr({in:e,in2:t,operator:n})},flood:function(e,t){this.attr("flood-color",e),null!=t&&this.attr("flood-opacity",t)},offset:function(e,t){this.attr({dx:e,dy:t})},image:function(e){this.attr("href",e,SVG.xlink)},displacementMap:function(e,t,n,r,o){this.attr({in:e,in2:t,scale:n,xChannelSelector:r,yChannelSelector:o})},gaussianBlur:function(e,t){null!=e||null!=t?this.attr("stdDeviation",i(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(e,t){this.attr({operator:e,radius:t})},tile:function(){},turbulence:function(e,t,n,r,o){this.attr({numOctaves:t,seed:n,stitchTiles:r,baseFrequency:e,type:o})}},n={merge:function(){var e;if(arguments[0]instanceof SVG.Set){var t=this;arguments[0].each((function(e){this instanceof SVG.MergeNode?t.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&t.put(new SVG.MergeNode(this))}))}else{e=Array.isArray(arguments[0])?arguments[0]:arguments;for(var n=0;n1&&(R*=r=Math.sqrt(r),C*=r),o=(new SVG.Matrix).rotate(_).scale(1/R,1/C).rotate(-_),T=T.transform(o),s=(i=[(N=N.transform(o)).x-T.x,N.y-T.y])[0]*i[0]+i[1]*i[1],a=Math.sqrt(s),i[0]/=a,i[1]/=a,c=s<4?Math.sqrt(1-s/4):0,S===k&&(c*=-1),l=new SVG.Point((N.x+T.x)/2+c*-i[1],(N.y+T.y)/2+c*i[0]),p=new SVG.Point(T.x-l.x,T.y-l.y),u=new SVG.Point(N.x-l.x,N.y-l.y),d=Math.acos(p.x/Math.sqrt(p.x*p.x+p.y*p.y)),p.y<0&&(d*=-1),b=Math.acos(u.x/Math.sqrt(u.x*u.x+u.y*u.y)),u.y<0&&(b*=-1),k&&d>b&&(b+=2*Math.PI),!k&&di.maxX-t.width&&(a=(r=i.maxX-t.width)-this.startPoints.box.x),null!=i.minY&&oi.maxY-t.height&&(s=(o=i.maxY-t.height)-this.startPoints.box.y),null!=i.snapToGrid&&(r-=r%i.snapToGrid,o-=o%i.snapToGrid,a-=a%i.snapToGrid,s-=s%i.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:a,y:s},!0):this.el.move(r,o));return n},e.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(t,n){"function"!=typeof t&&"object"!=typeof t||(n=t,t=!0);var r=this.remember("_draggable")||new e(this);return(t=void 0===t||t)?r.init(n||{},t):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function e(e){this.el=e,e.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(e,t,n){var r="string"!=typeof e?e:t[e];return n?r/2:r},this.pointCoords=function(e,t){var n=this.pointsList[e];return{x:this.pointCoord(n[0],t,"t"===e||"b"===e),y:this.pointCoord(n[1],t,"r"===e||"l"===e)}}}e.prototype.init=function(e,t){var n=this.el.bbox();this.options={};var r=this.el.selectize.defaults.points;for(var o in this.el.selectize.defaults)this.options[o]=this.el.selectize.defaults[o],void 0!==t[o]&&(this.options[o]=t[o]);var i=["points","pointsExclude"];for(var o in i){var a=this.options[i[o]];"string"==typeof a?a=a.length>0?a.split(/\s*,\s*/i):[]:"boolean"==typeof a&&"points"===i[o]&&(a=a?r:[]),this.options[i[o]]=a}this.options.points=[r,this.options.points].reduce((function(e,t){return e.filter((function(e){return t.indexOf(e)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(e,t){return e.filter((function(e){return t.indexOf(e)<0}))})),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(n.x,n.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},e.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},e.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map((function(t){return[t[0]-e.x,t[1]-e.y]}))},e.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),n=0,r=t.length;n0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y+n[1]).size(this.parameters.box.width-n[0],this.parameters.box.height-n[1])}};break;case"rt":this.calc=function(e,t){var n=this.snapToGrid(e,t,2);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).size(this.parameters.box.width+n[0],this.parameters.box.height-n[1])}};break;case"rb":this.calc=function(e,t){var n=this.snapToGrid(e,t,0);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+n[0],this.parameters.box.height+n[1])}};break;case"lb":this.calc=function(e,t){var n=this.snapToGrid(e,t,1);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).size(this.parameters.box.width-n[0],this.parameters.box.height+n[1])}};break;case"t":this.calc=function(e,t){var n=this.snapToGrid(e,t,2);if(this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).height(this.parameters.box.height-n[1])}};break;case"r":this.calc=function(e,t){var n=this.snapToGrid(e,t,0);if(this.parameters.box.width+n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+n[0])}};break;case"b":this.calc=function(e,t){var n=this.snapToGrid(e,t,0);if(this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+n[1])}};break;case"l":this.calc=function(e,t){var n=this.snapToGrid(e,t,1);if(this.parameters.box.width-n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).width(this.parameters.box.width-n[0])}};break;case"rot":this.calc=function(e,t){var n=e+this.parameters.p.x,r=t+this.parameters.p.y,o=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),i=Math.atan2(r-this.parameters.box.y-this.parameters.box.height/2,n-this.parameters.box.x-this.parameters.box.width/2),a=this.parameters.rotation+180*(i-o)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(a-a%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(e,t){var n=this.snapToGrid(e,t,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),r=this.el.array().valueOf();r[this.parameters.i][0]=this.parameters.pointCoords[0]+n[0],r[this.parameters.i][1]=this.parameters.pointCoords[1]+n[1],this.el.plot(r)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",(function(e){t.update(e||window.event)})),SVG.on(window,"touchend.resize",(function(){t.done()})),SVG.on(window,"mousemove.resize",(function(e){t.update(e||window.event)})),SVG.on(window,"mouseup.resize",(function(){t.done()}))},e.prototype.update=function(e){if(e){var t=this._extractPosition(e),n=this.transformPoint(t.x,t.y),r=n.x-this.parameters.p.x,o=n.y-this.parameters.p.y;this.lastUpdateCall=[r,o],this.calc(r,o),this.el.fire("resizing",{dx:r,dy:o,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},e.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},e.prototype.snapToGrid=function(e,t,n,r){var o;return void 0!==r?o=[(n+e)%this.options.snapToGrid,(r+t)%this.options.snapToGrid]:(n=null==n?3:n,o=[(this.parameters.box.x+e+(1&n?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&n?0:this.parameters.box.height))%this.options.snapToGrid]),e<0&&(o[0]-=this.options.snapToGrid),t<0&&(o[1]-=this.options.snapToGrid),e-=Math.abs(o[0])a.maxX&&(e=a.maxX-o),void 0!==a.minY&&i+ta.maxY&&(t=a.maxY-i),[e,t]},e.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var n=e.slice(),r=this.parameters.box.width/this.parameters.box.height,o=this.parameters.box.width+e[0],i=this.parameters.box.height-e[1],a=o/i;return ar&&(n[0]=this.parameters.box.width-i*r,t&&(n[0]=-n[0])),n},SVG.extend(SVG.Element,{resize:function(t){return(this.remember("_resizeHandler")||new e(this)).init(t||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var Xe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new g(this.ctx),this.ctx.axes=new ne(this.ctx),this.ctx.core=new Pe(this.ctx.el,this.ctx),this.ctx.config=new D({}),this.ctx.data=new V(this.ctx),this.ctx.grid=new Q(this.ctx),this.ctx.graphics=new A(this.ctx),this.ctx.coreUtils=new y(this.ctx),this.ctx.crosshairs=new re(this.ctx),this.ctx.events=new ee(this.ctx),this.ctx.exports=new Y(this.ctx),this.ctx.localization=new te(this.ctx),this.ctx.options=new C,this.ctx.responsive=new oe(this.ctx),this.ctx.series=new N(this.ctx),this.ctx.theme=new ie(this.ctx),this.ctx.formatters=new U(this.ctx),this.ctx.titleSubtitle=new ae(this.ctx),this.ctx.legend=new be(this.ctx),this.ctx.toolbar=new fe(this.ctx),this.ctx.dimensions=new ue(this.ctx),this.ctx.updateHelpers=new Be(this.ctx),this.ctx.zoomPanSelection=new he(this.ctx),this.ctx.w.globals.tooltip=new Ae(this.ctx)}}]),e}(),je=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each((function(e,t){this.removeClass("*"),this.off(),this.stop()}),!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,n=e.isUpdating,r=this.w.globals.dom.Paper.node;r.parentNode&&r.parentNode.parentNode&&!n&&(r.parentNode.parentNode.style.minHeight="unset");var o=this.w.globals.dom.baseEl;o&&this.ctx.eventList.forEach((function(e){o.removeEventListener(e,t.ctx.events.documentEvent)}));var i=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(i.Paper),i.Paper.remove(),i.elWrap=null,i.elGraphical=null,i.elAnnotations=null,i.elLegendWrap=null,i.baseEl=null,i.elGridRect=null,i.elGridRectMask=null,i.elGridRectMarkerMask=null,i.elForecastMask=null,i.elNonForecastMask=null,i.elDefs=null}}]),e}(),Ie=new WeakMap,De=function(){function e(t,n){s(this,e),this.opts=n,this.ctx=this,this.w=new H(n).init(),this.el=t,this.w.globals.cuid=m.randomId(),this.w.globals.chartID=this.w.config.chart.id?m.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Xe(this).initModules(),this.create=m.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return l(e,[{key:"render",value:function(){var e=this;return new Promise((function(t,n){if(null!==e.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var r=e.w.config.chart.events.beforeMount;if("function"==typeof r&&r(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(e,t){var n=!1;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var r=e.getBoundingClientRect();"none"!==e.style.display&&0!==r.width||(n=!0)}var o=new ResizeObserver((function(r){n&&t.call(e,r),n=!0}));e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(e.children).forEach((function(e){return o.observe(e)})):o.observe(e),Ie.set(t,o)}(e.el.parentNode,e.parentResizeHandler),!e.css){var o=e.el.getRootNode&&e.el.getRootNode(),i=m.is("ShadowRoot",o),a=e.el.ownerDocument,s=a.getElementById("apexcharts-css");!i&&s||(e.css=document.createElement("style"),e.css.id="apexcharts-css",e.css.textContent='.apexcharts-canvas {\n position: relative;\n user-select: none;\n /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px;\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n}\n\n\n.apexcharts-inner {\n position: relative;\n}\n\n.apexcharts-text tspan {\n font-family: inherit;\n}\n\n.legend-mouseover-inactive {\n transition: 0.15s ease all;\n opacity: 0.20;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0;\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, 0.96);\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, 0.8);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit;\n}\n\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #ECEFF1;\n border-bottom: 1px solid #ddd;\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid #333;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n font-weight: 600;\n margin-left: 5px;\n}\n\n.apexcharts-tooltip-title:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-z-value:empty {\n display: none;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n font-weight: 600;\n}\n\n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-goals-group, \n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n display: flex;\n}\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px;\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0px;\n margin-right: 10px;\n border-radius: 50%;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px;\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0 !important;\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-box, .apexcharts-custom-tooltip {\n padding: 4px 8px;\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse;\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0;\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: bold;\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px;\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777;\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: bold;\n display: block;\n margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n opacity: 0;\n padding: 9px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-left: -6px;\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-left: -7px;\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%;\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%;\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #ECEFF1;\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #ECEFF1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n opacity: 0;\n padding: 4px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-top: -6px;\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-top: -7px;\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%;\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%;\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1;\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none;\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0;\n}\n\n.apexcharts-selection-rect {\n cursor: move;\n}\n\n.svg_select_boundingRect, .svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n}\n.apexcharts-selection-rect + g .svg_select_boundingRect,\n.apexcharts-selection-rect + g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden;\n}\n\n.apexcharts-selection-rect + g .svg_select_points_l,\n.apexcharts-selection-rect + g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible;\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon,\n.apexcharts-reset-icon,\n.apexcharts-pan-icon,\n.apexcharts-selection-icon,\n.apexcharts-menu-icon,\n.apexcharts-toolbar-custom-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6E8192;\n text-align: center;\n}\n\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-menu-icon svg {\n fill: #6E8192;\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(0.76)\n}\n\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {\n fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {\n fill: #008FFB;\n}\n\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg {\n fill: #333;\n}\n\n.apexcharts-selection-icon,\n.apexcharts-menu-icon {\n position: relative;\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px;\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-reset-icon,\n.apexcharts-menu-icon {\n transform: scale(0.85);\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(0.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n transform: scale(0.62);\n position: relative;\n left: 1px;\n top: 0px;\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6E8192;\n stroke-width: 2;\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008FFB;\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333;\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0px 6px 2px 6px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: 0.15s ease all;\n pointer-events: none;\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: 0.15s ease all;\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer;\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee;\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n}\n\n@media screen and (min-width: 768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1;\n }\n}\n\n.apexcharts-datalabel.apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabels,\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value {\n cursor: default;\n pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease;\n}\n\n.apexcharts-canvas .apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-gridline,\n.apexcharts-annotation-rect,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-point-annotation-label,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line,\n.apexcharts-zoom-rect,\n.apexcharts-toolbar svg,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-radar-series path,\n.apexcharts-radar-series polygon {\n pointer-events: none;\n}\n\n\n/* markers */\n\n.apexcharts-marker {\n transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n\n/* Resize generated styles */\n\n@keyframes resizeanim {\n from {\n opacity: 0;\n }\n to {\n opacity: 0;\n }\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n}\n\n.resize-triggers,\n.resize-triggers>div,\n.contract-trigger:before {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.resize-triggers>div {\n background: #eee;\n overflow: auto;\n}\n\n.contract-trigger:before {\n width: 200%;\n height: 200%;\n}',i?o.prepend(e.css):a.head.appendChild(e.css))}var c=e.create(e.w.config.series,{});if(!c)return t(e);e.mount(c).then((function(){"function"==typeof e.w.config.chart.events.mounted&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(c)})).catch((function(e){n(e)}))}else n(new Error("Element not found"))}))}},{key:"create",value:function(e,t){var n=this.w;new Xe(this).initModules();var r=this.w.globals;if(r.noData=!1,r.animationEnded=!1,this.responsive.checkResponsiveConfig(t),n.config.xaxis.convertedCatToNumeric&&new I(n.config).convertCatToNumericXaxis(n.config,this.ctx),null===this.el)return r.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===n.config.chart.type&&(n.config.grid.show=!1,n.config.yaxis[0].show=!1),0===r.svgWidth)return r.animationEnded=!0,null;var o=y.checkComboSeries(e);r.comboCharts=o.comboCharts,r.comboBarCount=o.comboBarCount;var i=e.every((function(e){return e.data&&0===e.data.length}));(0===e.length||i)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(e),this.theme.init(),new k(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),r.noData&&r.collapsedSeries.length!==r.series.length&&!n.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),r.axisCharts&&(this.core.coreCalculations(),"category"!==n.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=n.globals.minX,this.ctx.toolbar.maxX=n.globals.maxX),this.formatters.heatmapLabelFormatters(),new y(this).getLargestMarkerSize(),this.dimensions.plotCoords();var a=this.core.xySettings();this.grid.createGridMask();var s=this.core.plotChartType(e,a),c=new E(this);c.bringForward(),n.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition();var l={plot:{left:n.globals.translateX,top:n.globals.translateY,width:n.globals.gridWidth,height:n.globals.gridHeight}};return{elGraph:s,xyRatios:a,elInner:n.globals.dom.elGraphical,dimensions:l}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this,r=n.w;return new Promise((function(o,i){if(null===n.el)return i(new Error("Not enough data to display or target element not found"));(null===t||r.globals.allSeriesCollapsed)&&n.series.handleNoData(),"treemap"!==r.config.chart.type&&n.axes.drawAxis(r.config.chart.type,t.xyRatios),n.grid=new Q(n);var a=n.grid.drawGrid();n.annotations=new _(n),n.annotations.drawImageAnnos(),n.annotations.drawTextAnnos(),"back"===r.config.grid.position&&a&&r.globals.dom.elGraphical.add(a.el);var s=new K(e.ctx),c=new Z(e.ctx);if(null!==a&&(s.xAxisLabelCorrections(a.xAxisTickWidth),c.setYAxisTextAlignments(),r.config.yaxis.map((function(e,t){-1===r.globals.ignoreYAxisIndexes.indexOf(t)&&c.yAxisTitleRotate(t,e.opposite)}))),"back"===r.config.annotations.position&&(r.globals.dom.Paper.add(r.globals.dom.elAnnotations),n.annotations.drawAxesAnnotations()),Array.isArray(t.elGraph))for(var l=0;l0&&r.globals.memory.methodsToExec.forEach((function(e){e.method(e.params,!1,e.context)})),r.globals.axisCharts||r.globals.noData||n.core.resizeNonAxisCharts(),o(n)}))}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,e=this.parentResizeHandler,(t=Ie.get(e))&&(t.disconnect(),Ie.delete(e));var n=this.w.config.chart.id;n&&Apex._chartInstances.forEach((function(e,t){e.id===m.escapeString(n)&&Apex._chartInstances.splice(t,1)})),new je(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w;return a.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((function(e,n){return t.updateHelpers._extendSeries(e,n)}))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,n,r,o,i)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,n)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.w.config.series.slice();return r.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(r,t,n)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this;n.w.globals.dataChanged=!0,n.series.getPreviousPaths();for(var r=n.w.config.series.slice(),o=0;o0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(e,t)}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addXaxisAnnotationExternal(e,t,r)}},{key:"addYaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addYaxisAnnotationExternal(e,t,r)}},{key:"addPointAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;n&&(r=n),r.annotations.addPointAnnotationExternal(e,t,r)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=this;t&&(n=t),n.annotations.removeAnnotation(n,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new J(this.ctx);return t.getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new J(this.ctx);return t.getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new Y(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Y(this.ctx);return t.exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;"function"==typeof e&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=m.escapeString(e),n=Apex._chartInstances.filter((function(e){return e.id===t}))[0];return n&&n.chart}},{key:"initOnLoad",value:function(){for(var t=document.querySelectorAll("[data-apexcharts]"),n=0;n2?o-2:0),a=2;a=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){p.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){p.headers[e]=r.merge(c)})),e.exports=p},6789:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7600:function(e){e.exports={version:"0.27.2"}},4049:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},6261:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8089:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},1397:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e,t){t=t||new FormData;var n=[];function o(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(i,a){if(r.isPlainObject(i)||r.isArray(i)){if(-1!==n.indexOf(i))throw Error("Circular reference detected in "+a);n.push(i),r.forEach(i,(function(n,i){if(!r.isUndefined(n)){var s,c=a?a+"."+i:i;if(n&&!a&&"object"===typeof n)if(r.endsWith(i,"{}"))n=JSON.stringify(n);else if(r.endsWith(i,"[]")&&(s=r.toArray(n)))return void s.forEach((function(e){!r.isUndefined(e)&&t.append(c,o(e))}));e(n,c)}})),n.pop()}else t.append(a,o(i))}(e),t}},7835:function(e,t,n){"use strict";var r=n(7600).version,o=n(4531),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new o(i(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],s=t[a];if(s){var c=e[a],l=void 0===c||s(c,a,e);if(!0!==l)throw new o("option "+a+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+a,o.ERR_BAD_OPTION)}},validators:i}},3589:function(e,t,n){"use strict";var r,o=n(4049),i=Object.prototype.toString,a=(r=Object.create(null),function(e){var t=i.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function c(e){return Array.isArray(e)}function l(e){return"undefined"===typeof e}var p=s("ArrayBuffer");function u(e){return null!==e&&"object"===typeof e}function d(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var b=s("Date"),f=s("File"),h=s("Blob"),M=s("FileList");function z(e){return"[object Function]"===i.call(e)}var O=s("URLSearchParams");function m(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),c(e))for(var n=0,r=e.length;n0;)a[i=r[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:v,isFileList:M}},4802:function(e,t,n){var r,o,i;o=[],r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){c(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,n){var s=a.URL||a.webkitURL,c=document.createElement("a");t=t||e.name||"download",c.download=t,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?i(c):o(c.href)?r(e,t,n):i(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){i(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(o(e))r(e,n,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var i="application/octet-stream"===e.type,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&c||s)&&"undefined"!=typeof FileReader){var p=new FileReader;p.onloadend=function(){var e=p.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},p.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,d=u.createObjectURL(e);o?o.location=d:location.href=d,o=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});a.saveAs=c.saveAs=c,e.exports=c},void 0===(i="function"===typeof r?r.apply(t,o):r)||(e.exports=i)},2110:function(e,t,n){"use strict";var r=n(8309),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,p=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,b=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var o=b(n);o&&o!==f&&e(t,o,r)}var a=p(n);u&&(a=a.concat(u(n)));for(var s=c(t),h=c(n),M=0;M"']/g,Q=RegExp(Y.source),$=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(oe.source),ae=/^\s+/,se=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,pe=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,be=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,Me=/^[-+]0x[0-9a-f]+$/i,ze=/^0b[01]+$/i,Oe=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ae=/($^)/,ye=/['\n\r\u2028\u2029\\]/g,xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",qe="\\u2700-\\u27bf",we="a-z\\xdf-\\xf6\\xf8-\\xff",We="A-Z\\xc0-\\xd6\\xd8-\\xde",Re="\\ufe0e\\ufe0f",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_e="['\u2019]",Se="[\\ud800-\\udfff]",ke="["+Ce+"]",Le="["+xe+"]",Ee="\\d+",Te="[\\u2700-\\u27bf]",Ne="["+we+"]",Pe="[^\\ud800-\\udfff"+Ce+Ee+qe+we+We+"]",Be="\\ud83c[\\udffb-\\udfff]",Xe="[^\\ud800-\\udfff]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",De="["+We+"]",Fe="(?:"+Ne+"|"+Pe+")",He="(?:"+De+"|"+Pe+")",Ve="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ue="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Le+"|"+Be+")"+"?",Ye="[\\ufe0e\\ufe0f]?",Ke=Ye+Ge+("(?:\\u200d(?:"+[Xe,je,Ie].join("|")+")"+Ye+Ge+")*"),Qe="(?:"+[Te,je,Ie].join("|")+")"+Ke,$e="(?:"+[Xe+Le+"?",Le,je,Ie,Se].join("|")+")",Je=RegExp(_e,"g"),Ze=RegExp(Le,"g"),et=RegExp(Be+"(?="+Be+")|"+$e+Ke,"g"),tt=RegExp([De+"?"+Ne+"+"+Ve+"(?="+[ke,De,"$"].join("|")+")",He+"+"+Ue+"(?="+[ke,De+Fe,"$"].join("|")+")",De+"?"+Fe+"+"+Ve,De+"+"+Ue,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,Qe].join("|"),"g"),nt=RegExp("[\\u200d\\ud800-\\udfff"+xe+Re+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],it=-1,at={};at[N]=at[P]=at[B]=at[X]=at[j]=at[I]=at[D]=at[F]=at[H]=!0,at[O]=at[m]=at[E]=at[g]=at[T]=at[v]=at[A]=at[y]=at[q]=at[w]=at[W]=at[C]=at[_]=at[S]=at[L]=!1;var st={};st[O]=st[m]=st[E]=st[T]=st[g]=st[v]=st[N]=st[P]=st[B]=st[X]=st[j]=st[q]=st[w]=st[W]=st[C]=st[_]=st[S]=st[k]=st[I]=st[D]=st[F]=st[H]=!0,st[A]=st[y]=st[L]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,pt=parseInt,ut="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,dt="object"==typeof self&&self&&self.Object===Object&&self,bt=ut||dt||Function("return this")(),ft=t&&!t.nodeType&&t,ht=ft&&e&&!e.nodeType&&e,Mt=ht&&ht.exports===ft,zt=Mt&&ut.process,Ot=function(){try{var e=ht&&ht.require&&ht.require("util").types;return e||zt&&zt.binding&&zt.binding("util")}catch(t){}}(),mt=Ot&&Ot.isArrayBuffer,gt=Ot&&Ot.isDate,vt=Ot&&Ot.isMap,At=Ot&&Ot.isRegExp,yt=Ot&&Ot.isSet,xt=Ot&&Ot.isTypedArray;function qt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function wt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function kt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function tn(e,t){for(var n=e.length;n--&&It(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var rn=Ut({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),on=Ut({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+ct[e]}function sn(e){return nt.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function pn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n",""":'"',"'":"'"});var zn=function e(t){var n=(t=null==t?bt:zn.defaults(bt.Object(),t,zn.pick(bt,ot))).Array,r=t.Date,se=t.Error,xe=t.Function,qe=t.Math,we=t.Object,We=t.RegExp,Re=t.String,Ce=t.TypeError,_e=n.prototype,Se=xe.prototype,ke=we.prototype,Le=t["__core-js_shared__"],Ee=Se.toString,Te=ke.hasOwnProperty,Ne=0,Pe=function(){var e=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Be=ke.toString,Xe=Ee.call(we),je=bt._,Ie=We("^"+Ee.call(Te).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),De=Mt?t.Buffer:o,Fe=t.Symbol,He=t.Uint8Array,Ve=De?De.allocUnsafe:o,Ue=ln(we.getPrototypeOf,we),Ge=we.create,Ye=ke.propertyIsEnumerable,Ke=_e.splice,Qe=Fe?Fe.isConcatSpreadable:o,$e=Fe?Fe.iterator:o,et=Fe?Fe.toStringTag:o,nt=function(){try{var e=bi(we,"defineProperty");return e({},"",{}),e}catch(t){}}(),ct=t.clearTimeout!==bt.clearTimeout&&t.clearTimeout,ut=r&&r.now!==bt.Date.now&&r.now,dt=t.setTimeout!==bt.setTimeout&&t.setTimeout,ft=qe.ceil,ht=qe.floor,zt=we.getOwnPropertySymbols,Ot=De?De.isBuffer:o,Bt=t.isFinite,Ut=_e.join,On=ln(we.keys,we),mn=qe.max,gn=qe.min,vn=r.now,An=t.parseInt,yn=qe.random,xn=_e.reverse,qn=bi(t,"DataView"),wn=bi(t,"Map"),Wn=bi(t,"Promise"),Rn=bi(t,"Set"),Cn=bi(t,"WeakMap"),_n=bi(we,"create"),Sn=Cn&&new Cn,kn={},Ln=ji(qn),En=ji(wn),Tn=ji(Wn),Nn=ji(Rn),Pn=ji(Cn),Bn=Fe?Fe.prototype:o,Xn=Bn?Bn.valueOf:o,jn=Bn?Bn.toString:o;function In(e){if(rs(e)&&!Ua(e)&&!(e instanceof Vn)){if(e instanceof Hn)return e;if(Te.call(e,"__wrapped__"))return Ii(e)}return new Hn(e)}var Dn=function(){function e(){}return function(t){if(!ns(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Fn(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=M,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function lr(e,t,n,r,i,a){var s,c=1&t,l=2&t,p=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!ns(e))return e;var u=Ua(e);if(u){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Te.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return So(e,s)}else{var d=Mi(e),b=d==y||d==x;if(Qa(e))return qo(e,c);if(d==W||d==O||b&&!i){if(s=l||b?{}:Oi(e),!c)return l?function(e,t){return ko(e,hi(e),t)}(e,function(e,t){return e&&ko(t,Es(t),e)}(s,e)):function(e,t){return ko(e,fi(e),t)}(e,ir(s,e))}else{if(!st[d])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case E:return wo(e);case g:case v:return new r(+e);case T:return function(e,t){var n=t?wo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case P:case B:case X:case j:case I:case D:case F:case H:return Wo(e,n);case q:return new r;case w:case S:return new r(e);case C:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new r;case k:return o=e,Xn?we(Xn.call(o)):{}}var o}(e,d,c)}}a||(a=new Qn);var f=a.get(e);if(f)return f;a.set(e,s),cs(e)?e.forEach((function(r){s.add(lr(r,t,n,r,e,a))})):os(e)&&e.forEach((function(r,o){s.set(o,lr(r,t,n,o,e,a))}));var h=u?o:(p?l?ai:ii:l?Es:Ls)(e);return Wt(h||e,(function(r,o){h&&(r=e[o=r]),nr(s,o,lr(r,t,n,o,e,a))})),s}function pr(e,t,n){var r=n.length;if(null==e)return!r;for(e=we(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ce(i);return Li((function(){e.apply(o,n)}),t)}function dr(e,t,n,r){var o=-1,i=St,a=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=Lt(t,$t(n))),r?(i=kt,a=!1):t.length>=200&&(i=Zt,a=!1,t=new Kn(t));e:for(;++o-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(wn||Gn),string:new Un}},Yn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return ui(this,e).get(e)},Yn.prototype.has=function(e){return ui(this,e).has(e)},Yn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,a),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!wn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(e,t),this.size=n.size,this};var br=To(vr),fr=To(Ar,!0);function hr(e,t){var n=!0;return br(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function Mr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?Or(s,t-1,n,r,o):Et(o,s):r||(o[o.length]=s)}return o}var mr=No(),gr=No(!0);function vr(e,t){return e&&mr(e,t,Ls)}function Ar(e,t){return e&&gr(e,t,Ls)}function yr(e,t){return _t(t,(function(t){return Za(e[t])}))}function xr(e,t){for(var n=0,r=(t=vo(t,e)).length;null!=e&&nt}function Rr(e,t){return null!=e&&Te.call(e,t)}function Cr(e,t){return null!=e&&t in we(e)}function _r(e,t,r){for(var i=r?kt:St,a=e[0].length,s=e.length,c=s,l=n(s),p=1/0,u=[];c--;){var d=e[c];c&&t&&(d=Lt(d,$t(t))),p=gn(d.length,p),l[c]=!r&&(t||a>=120&&d.length>=120)?new Kn(c&&d):o}d=e[0];var b=-1,f=l[0];e:for(;++b=s?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Ur(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&Ke.call(s,c,1),Ke.call(e,c,1);return e}function Yr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;gi(o)?Ke.call(e,o,1):bo(e,o)}}return e}function Kr(e,t){return e+ht(yn()*(t-e+1))}function Qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=ht(t/2))&&(e+=e)}while(t);return n}function $r(e,t){return Ei(Ri(e,t,ic),e+"")}function Jr(e){return Jn(Ds(e))}function Zr(e,t){var n=Ds(e);return Pi(n,cr(t,0,n.length))}function eo(e,t,n,r){if(!ns(e))return e;for(var i=-1,a=(t=vo(t,e)).length,s=a-1,c=e;null!=c&&++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=n(i);++o>>1,a=e[i];null!==a&&!ps(a)&&(n?a<=t:a=200){var l=t?null:$o(e);if(l)return un(l);a=!1,o=Zt,c=new Kn}else c=t?[]:s;e:for(;++r=r?e:oo(e,t,n)}var xo=ct||function(e){return bt.clearTimeout(e)};function qo(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function wo(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Wo(e,t){var n=t?wo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ro(e,t){if(e!==t){var n=e!==o,r=null===e,i=e===e,a=ps(e),s=t!==o,c=null===t,l=t===t,p=ps(t);if(!c&&!p&&!a&&e>t||a&&s&&l&&!c&&!p||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!p&&e1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&vi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=we(t);++r-1?i[a?t[s]:s]:o}}function Io(e){return oi((function(t){var n=t.length,r=n,a=Hn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ce(i);if(a&&!c&&"wrapper"==ci(s))var c=new Hn([],!0)}for(r=c?r:n;++r1&&m.reverse(),b&&pc))return!1;var p=a.get(e),u=a.get(t);if(p&&u)return p==t&&u==e;var d=-1,b=!0,f=2&n?new Kn:o;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Wt(z,(function(n){var r="_."+n[0];t&n[1]&&!St(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(pe):[]}(r),n)))}function Ni(e){var t=0,n=0;return function(){var r=vn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Pi(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,sa(e,n)}));function fa(e){var t=In(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var Ma=oi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&gi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new Hn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var za=Lo((function(e,t,n){Te.call(e,n)?++e[n]:ar(e,n,1)}));var Oa=jo(Vi),ma=jo(Ui);function ga(e,t){return(Ua(e)?Wt:br)(e,pi(t,3))}function va(e,t){return(Ua(e)?Rt:fr)(e,pi(t,3))}var Aa=Lo((function(e,t,n){Te.call(e,n)?e[n].push(t):ar(e,n,[t])}));var ya=$r((function(e,t,r){var o=-1,i="function"==typeof t,a=Ya(e)?n(e.length):[];return br(e,(function(e){a[++o]=i?qt(t,e,r):Sr(e,t,r)})),a})),xa=Lo((function(e,t,n){ar(e,n,t)}));function qa(e,t){return(Ua(e)?Lt:jr)(e,pi(t,3))}var wa=Lo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Wa=$r((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vi(e,t[0],t[1])?t=[]:n>2&&vi(t[0],t[1],t[2])&&(t=[t[0]]),Vr(e,Or(t,1),[])})),Ra=ut||function(){return bt.Date.now()};function Ca(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Zo(e,u,o,o,o,o,t)}function _a(e,t){var n;if("function"!=typeof t)throw new Ce(i);return e=Ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Sa=$r((function(e,t,n){var r=1;if(n.length){var o=pn(n,li(Sa));r|=l}return Zo(e,r,t,n,o)})),ka=$r((function(e,t,n){var r=3;if(n.length){var o=pn(n,li(ka));r|=l}return Zo(t,r,e,n,o)}));function La(e,t,n){var r,a,s,c,l,p,u=0,d=!1,b=!1,f=!0;if("function"!=typeof e)throw new Ce(i);function h(t){var n=r,i=a;return r=a=o,u=t,c=e.apply(i,n)}function M(e){return u=e,l=Li(O,t),d?h(e):c}function z(e){var n=e-p;return p===o||n>=t||n<0||b&&e-u>=s}function O(){var e=Ra();if(z(e))return m(e);l=Li(O,function(e){var n=t-(e-p);return b?gn(n,s-(e-u)):n}(e))}function m(e){return l=o,f&&r?h(e):(r=a=o,c)}function g(){var e=Ra(),n=z(e);if(r=arguments,a=this,p=e,n){if(l===o)return M(p);if(b)return xo(l),l=Li(O,t),h(p)}return l===o&&(l=Li(O,t)),c}return t=Os(t)||0,ns(n)&&(d=!!n.leading,s=(b="maxWait"in n)?mn(Os(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),g.cancel=function(){l!==o&&xo(l),u=0,r=p=a=l=o},g.flush=function(){return l===o?c:m(Ra())},g}var Ea=$r((function(e,t){return ur(e,1,t)})),Ta=$r((function(e,t,n){return ur(e,Os(t)||0,n)}));function Na(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(i);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Na.Cache||Yn),n}function Pa(e){if("function"!=typeof e)throw new Ce(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Na.Cache=Yn;var Ba=Ao((function(e,t){var n=(t=1==t.length&&Ua(t[0])?Lt(t[0],$t(pi())):Lt(Or(t,1),$t(pi()))).length;return $r((function(r){for(var o=-1,i=gn(r.length,n);++o=t})),Va=kr(function(){return arguments}())?kr:function(e){return rs(e)&&Te.call(e,"callee")&&!Ye.call(e,"callee")},Ua=n.isArray,Ga=mt?$t(mt):function(e){return rs(e)&&wr(e)==E};function Ya(e){return null!=e&&ts(e.length)&&!Za(e)}function Ka(e){return rs(e)&&Ya(e)}var Qa=Ot||Oc,$a=gt?$t(gt):function(e){return rs(e)&&wr(e)==v};function Ja(e){if(!rs(e))return!1;var t=wr(e);return t==A||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function Za(e){if(!ns(e))return!1;var t=wr(e);return t==y||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==Ms(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ns(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rs(e){return null!=e&&"object"==typeof e}var os=vt?$t(vt):function(e){return rs(e)&&Mi(e)==q};function is(e){return"number"==typeof e||rs(e)&&wr(e)==w}function as(e){if(!rs(e)||wr(e)!=W)return!1;var t=Ue(e);if(null===t)return!0;var n=Te.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ee.call(n)==Xe}var ss=At?$t(At):function(e){return rs(e)&&wr(e)==C};var cs=yt?$t(yt):function(e){return rs(e)&&Mi(e)==_};function ls(e){return"string"==typeof e||!Ua(e)&&rs(e)&&wr(e)==S}function ps(e){return"symbol"==typeof e||rs(e)&&wr(e)==k}var us=xt?$t(xt):function(e){return rs(e)&&ts(e.length)&&!!at[wr(e)]};var ds=Yo(Xr),bs=Yo((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ya(e))return ls(e)?fn(e):So(e);if($e&&e[$e])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[$e]());var t=Mi(e);return(t==q?cn:t==_?un:Ds)(e)}function hs(e){return e?(e=Os(e))===b||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function Ms(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function zs(e){return e?cr(Ms(e),0,M):0}function Os(e){if("number"==typeof e)return e;if(ps(e))return h;if(ns(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ns(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var n=ze.test(e);return n||me.test(e)?pt(e.slice(2),n?2:8):Me.test(e)?h:+e}function ms(e){return ko(e,Es(e))}function gs(e){return null==e?"":po(e)}var vs=Eo((function(e,t){if(qi(t)||Ya(t))ko(t,Ls(t),e);else for(var n in t)Te.call(t,n)&&nr(e,n,t[n])})),As=Eo((function(e,t){ko(t,Es(t),e)})),ys=Eo((function(e,t,n,r){ko(t,Es(t),e,r)})),xs=Eo((function(e,t,n,r){ko(t,Ls(t),e,r)})),qs=oi(sr);var ws=$r((function(e,t){e=we(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&vi(t[0],t[1],i)&&(r=1);++n1),t})),ko(e,ai(e),n),r&&(n=lr(n,7,ni));for(var o=t.length;o--;)bo(n,t[o]);return n}));var Bs=oi((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return Cs(e,n)}))}(e,t)}));function Xs(e,t){if(null==e)return{};var n=Lt(ai(e),(function(e){return[e]}));return t=pi(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var js=Jo(Ls),Is=Jo(Es);function Ds(e){return null==e?[]:Jt(e,Ls(e))}var Fs=Bo((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Js(gs(e).toLowerCase())}function Vs(e){return(e=gs(e))&&e.replace(ve,rn).replace(Ze,"")}var Us=Bo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Bo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ys=Po("toLowerCase");var Ks=Bo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Qs=Bo((function(e,t,n){return e+(n?" ":"")+Js(t)}));var $s=Bo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Js=Po("toUpperCase");function Zs(e,t,n){return e=gs(e),(t=n?o:t)===o?function(e){return rt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var ec=$r((function(e,t){try{return qt(e,o,t)}catch(n){return Ja(n)?n:new se(n)}})),tc=oi((function(e,t){return Wt(t,(function(t){t=Xi(t),ar(e,t,Sa(e[t],e))})),e}));function nc(e){return function(){return e}}var rc=Io(),oc=Io(!0);function ic(e){return e}function ac(e){return Nr("function"==typeof e?e:lr(e,1))}var sc=$r((function(e,t){return function(n){return Sr(n,e,t)}})),cc=$r((function(e,t){return function(n){return Sr(e,n,t)}}));function lc(e,t,n){var r=Ls(t),o=yr(t,r);null!=n||ns(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=yr(t,Ls(t)));var i=!(ns(n)&&"chain"in n)||!!n.chain,a=Za(e);return Wt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=So(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Et([this.value()],arguments))})})),e}function pc(){}var uc=Vo(Lt),dc=Vo(Ct),bc=Vo(Pt);function fc(e){return Ai(e)?Vt(Xi(e)):function(e){return function(t){return xr(t,e)}}(e)}var hc=Go(),Mc=Go(!0);function zc(){return[]}function Oc(){return!1}var mc=Ho((function(e,t){return e+t}),0),gc=Qo("ceil"),vc=Ho((function(e,t){return e/t}),1),Ac=Qo("floor");var yc=Ho((function(e,t){return e*t}),1),xc=Qo("round"),qc=Ho((function(e,t){return e-t}),0);return In.after=function(e,t){if("function"!=typeof t)throw new Ce(i);return e=Ms(e),function(){if(--e<1)return t.apply(this,arguments)}},In.ary=Ca,In.assign=vs,In.assignIn=As,In.assignInWith=ys,In.assignWith=xs,In.at=qs,In.before=_a,In.bind=Sa,In.bindAll=tc,In.bindKey=ka,In.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},In.chain=fa,In.chunk=function(e,t,r){t=(r?vi(e,t,r):t===o)?1:mn(Ms(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,c=n(ft(i/t));ai?0:i+n),(r=r===o||r>i?i:Ms(r))<0&&(r+=i),r=n>r?0:zs(r);n>>0)?(e=gs(e))&&("string"==typeof t||null!=t&&!ss(t))&&!(t=po(t))&&sn(e)?yo(fn(e),0,n):e.split(t,n):[]},In.spread=function(e,t){if("function"!=typeof e)throw new Ce(i);return t=null==t?0:mn(Ms(t),0),$r((function(n){var r=n[t],o=yo(n,0,t);return r&&Et(o,r),qt(e,this,o)}))},In.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},In.take=function(e,t,n){return e&&e.length?oo(e,0,(t=n||t===o?1:Ms(t))<0?0:t):[]},In.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?oo(e,(t=r-(t=n||t===o?1:Ms(t)))<0?0:t,r):[]},In.takeRightWhile=function(e,t){return e&&e.length?ho(e,pi(t,3),!1,!0):[]},In.takeWhile=function(e,t){return e&&e.length?ho(e,pi(t,3)):[]},In.tap=function(e,t){return t(e),e},In.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Ce(i);return ns(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),La(e,t,{leading:r,maxWait:t,trailing:o})},In.thru=ha,In.toArray=fs,In.toPairs=js,In.toPairsIn=Is,In.toPath=function(e){return Ua(e)?Lt(e,Xi):ps(e)?[e]:So(Bi(gs(e)))},In.toPlainObject=ms,In.transform=function(e,t,n){var r=Ua(e),o=r||Qa(e)||us(e);if(t=pi(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ns(e)&&Za(i)?Dn(Ue(e)):{}}return(o?Wt:vr)(e,(function(e,r,o){return t(n,e,r,o)})),n},In.unary=function(e){return Ca(e,1)},In.union=ra,In.unionBy=oa,In.unionWith=ia,In.uniq=function(e){return e&&e.length?uo(e):[]},In.uniqBy=function(e,t){return e&&e.length?uo(e,pi(t,2)):[]},In.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},In.unset=function(e,t){return null==e||bo(e,t)},In.unzip=aa,In.unzipWith=sa,In.update=function(e,t,n){return null==e?e:fo(e,t,go(n))},In.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:fo(e,t,go(n),r)},In.values=Ds,In.valuesIn=function(e){return null==e?[]:Jt(e,Es(e))},In.without=ca,In.words=Zs,In.wrap=function(e,t){return Xa(go(t),e)},In.xor=la,In.xorBy=pa,In.xorWith=ua,In.zip=da,In.zipObject=function(e,t){return Oo(e||[],t||[],nr)},In.zipObjectDeep=function(e,t){return Oo(e||[],t||[],eo)},In.zipWith=ba,In.entries=js,In.entriesIn=Is,In.extend=As,In.extendWith=ys,lc(In,In),In.add=mc,In.attempt=ec,In.camelCase=Fs,In.capitalize=Hs,In.ceil=gc,In.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=Os(n))===n?n:0),t!==o&&(t=(t=Os(t))===t?t:0),cr(Os(e),t,n)},In.clone=function(e){return lr(e,4)},In.cloneDeep=function(e){return lr(e,5)},In.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:o)},In.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:o)},In.conformsTo=function(e,t){return null==t||pr(e,t,Ls(t))},In.deburr=Vs,In.defaultTo=function(e,t){return null==e||e!==e?t:e},In.divide=vc,In.endsWith=function(e,t,n){e=gs(e),t=po(t);var r=e.length,i=n=n===o?r:cr(Ms(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},In.eq=Da,In.escape=function(e){return(e=gs(e))&&$.test(e)?e.replace(K,on):e},In.escapeRegExp=function(e){return(e=gs(e))&&ie.test(e)?e.replace(oe,"\\$&"):e},In.every=function(e,t,n){var r=Ua(e)?Ct:hr;return n&&vi(e,t,n)&&(t=o),r(e,pi(t,3))},In.find=Oa,In.findIndex=Vi,In.findKey=function(e,t){return Xt(e,pi(t,3),vr)},In.findLast=ma,In.findLastIndex=Ui,In.findLastKey=function(e,t){return Xt(e,pi(t,3),Ar)},In.floor=Ac,In.forEach=ga,In.forEachRight=va,In.forIn=function(e,t){return null==e?e:mr(e,pi(t,3),Es)},In.forInRight=function(e,t){return null==e?e:gr(e,pi(t,3),Es)},In.forOwn=function(e,t){return e&&vr(e,pi(t,3))},In.forOwnRight=function(e,t){return e&&Ar(e,pi(t,3))},In.get=Rs,In.gt=Fa,In.gte=Ha,In.has=function(e,t){return null!=e&&zi(e,t,Rr)},In.hasIn=Cs,In.head=Yi,In.identity=ic,In.includes=function(e,t,n,r){e=Ya(e)?e:Ds(e),n=n&&!r?Ms(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),ls(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&It(e,t,n)>-1},In.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Ms(n);return o<0&&(o=mn(r+o,0)),It(e,t,o)},In.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=gn(t,n)&&e=-9007199254740991&&e<=f},In.isSet=cs,In.isString=ls,In.isSymbol=ps,In.isTypedArray=us,In.isUndefined=function(e){return e===o},In.isWeakMap=function(e){return rs(e)&&Mi(e)==L},In.isWeakSet=function(e){return rs(e)&&"[object WeakSet]"==wr(e)},In.join=function(e,t){return null==e?"":Ut.call(e,t)},In.kebabCase=Us,In.last=Ji,In.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Ms(n))<0?mn(r+i,0):gn(i,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):jt(e,Ft,i,!0)},In.lowerCase=Gs,In.lowerFirst=Ys,In.lt=ds,In.lte=bs,In.max=function(e){return e&&e.length?Mr(e,ic,Wr):o},In.maxBy=function(e,t){return e&&e.length?Mr(e,pi(t,2),Wr):o},In.mean=function(e){return Ht(e,ic)},In.meanBy=function(e,t){return Ht(e,pi(t,2))},In.min=function(e){return e&&e.length?Mr(e,ic,Xr):o},In.minBy=function(e,t){return e&&e.length?Mr(e,pi(t,2),Xr):o},In.stubArray=zc,In.stubFalse=Oc,In.stubObject=function(){return{}},In.stubString=function(){return""},In.stubTrue=function(){return!0},In.multiply=yc,In.nth=function(e,t){return e&&e.length?Hr(e,Ms(t)):o},In.noConflict=function(){return bt._===this&&(bt._=je),this},In.noop=pc,In.now=Ra,In.pad=function(e,t,n){e=gs(e);var r=(t=Ms(t))?bn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Uo(ht(o),n)+e+Uo(ft(o),n)},In.padEnd=function(e,t,n){e=gs(e);var r=(t=Ms(t))?bn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=yn();return gn(e+i*(t-e+lt("1e-"+((i+"").length-1))),t)}return Kr(e,t)},In.reduce=function(e,t,n){var r=Ua(e)?Tt:Gt,o=arguments.length<3;return r(e,pi(t,4),n,o,br)},In.reduceRight=function(e,t,n){var r=Ua(e)?Nt:Gt,o=arguments.length<3;return r(e,pi(t,4),n,o,fr)},In.repeat=function(e,t,n){return t=(n?vi(e,t,n):t===o)?1:Ms(t),Qr(gs(e),t)},In.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},In.result=function(e,t,n){var r=-1,i=(t=vo(t,e)).length;for(i||(i=1,e=o);++rf)return[];var n=M,r=gn(e,M);t=pi(t),e-=M;for(var o=Kt(r,t);++n=a)return e;var c=n-bn(r);if(c<1)return r;var l=s?yo(s,0,c).join(""):e.slice(0,c);if(i===o)return l+r;if(s&&(c+=l.length-c),ss(i)){if(e.slice(c).search(i)){var p,u=l;for(i.global||(i=We(i.source,gs(he.exec(i))+"g")),i.lastIndex=0;p=i.exec(u);)var d=p.index;l=l.slice(0,d===o?c:d)}}else if(e.indexOf(po(i),c)!=c){var b=l.lastIndexOf(i);b>-1&&(l=l.slice(0,b))}return l+r},In.unescape=function(e){return(e=gs(e))&&Q.test(e)?e.replace(Y,Mn):e},In.uniqueId=function(e){var t=++Ne;return gs(e)+t},In.upperCase=$s,In.upperFirst=Js,In.each=ga,In.eachRight=va,In.first=Yi,lc(In,function(){var e={};return vr(In,(function(t,n){Te.call(In.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),In.VERSION="4.17.21",Wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){In[e].placeholder=In})),Wt(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===o?1:mn(Ms(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,M),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Wt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:pi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Wt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),Wt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(ic)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=$r((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return Sr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(Pa(pi(e)))},Vn.prototype.slice=function(e,t){e=Ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=Ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(M)},vr(Vn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=In[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(In.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,c=t instanceof Vn,l=s[0],p=c||Ua(t),u=function(e){var t=i.apply(In,Et([e],s));return r&&d?t[0]:t};p&&n&&"function"==typeof l&&1!=l.length&&(c=p=!1);var d=this.__chain__,b=!!this.__actions__.length,f=a&&!d,h=c&&!b;if(!a&&p){t=h?t:new Vn(this);var M=e.apply(t,s);return M.__actions__.push({func:ha,args:[u],thisArg:o}),new Hn(M,d)}return f&&h?e.apply(this,s):(M=this.thru(u),f?r?M.value()[0]:M.value():M)})})),Wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=_e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);In.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ua(o)?o:[],e)}return this[n]((function(n){return t.apply(Ua(n)?n:[],e)}))}})),vr(Vn.prototype,(function(e,t){var n=In[t];if(n){var r=n.name+"";Te.call(kn,r)||(kn[r]=[]),kn[r].push({name:t,func:n})}})),kn[Do(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=So(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=So(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=So(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},In.prototype.plant=function(e){for(var t,n=this;n instanceof Fn;){var r=Ii(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},In.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[na],thisArg:o}),new Hn(t,this.__chain__)}return this.thru(na)},In.prototype.toJSON=In.prototype.valueOf=In.prototype.value=function(){return Mo(this.__wrapped__,this.__actions__)},In.prototype.first=In.prototype.head,$e&&(In.prototype[$e]=function(){return this}),In}();bt._=zn,(r=function(){return zn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},3528:function(e,t,n){(e.exports=n(8001)).tz.load(n(1128))},8001:function(e,t,n){var r,o,i;!function(a,s){"use strict";e.exports?e.exports=s(n(2426)):(o=[n(2426)],void 0===(i="function"===typeof(r=s)?r.apply(t,o):r)||(e.exports=i))}(0,(function(e){"use strict";void 0===e.version&&e.default&&(e=e.default);var t,n={},r={},o={},i={},a={};e&&"string"===typeof e.version||C("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var s=e.version.split("."),c=+s[0],l=+s[1];function p(e){return e>96?e-87:e>64?e-29:e-48}function u(e){var t=0,n=e.split("."),r=n[0],o=n[1]||"",i=1,a=0,s=1;for(45===e.charCodeAt(0)&&(t=1,s=-1);t3){var t=i[x(e)];if(t)return t;C("Moment Timezone found "+e+" from the Intl api, but did not have that data loaded.")}}catch(p){}var n,r,o,a=function(){var e,t,n,r=(new Date).getFullYear()-2,o=new z(new Date(r,0,1)),i=[o];for(n=1;n<48;n++)(t=new z(new Date(r,n,1))).offset!==o.offset&&(e=m(o,t),i.push(e),i.push(new z(new Date(e.at+6e4)))),o=t;for(n=0;n<4;n++)i.push(new z(new Date(r+n,0,1))),i.push(new z(new Date(r+n,6,1)));return i}(),s=a.length,c=A(a),l=[];for(r=0;r0?l[0].zone.name:void 0}function x(e){return(e||"").toLowerCase().replace(/\//g,"_")}function q(e){var t,r,o,a;for("string"===typeof e&&(e=[e]),t=0;t= 2.6.0. You are using Moment.js "+e.version+". See momentjs.com"),h.prototype={_set:function(e){this.name=e.name,this.abbrs=e.abbrs,this.untils=e.untils,this.offsets=e.offsets,this.population=e.population},_index:function(e){var t,n=+e,r=this.untils;for(t=0;tr&&_.moveInvalidForward&&(t=r),i0&&(this._z=null),S.apply(this,arguments)}),e.tz.setDefault=function(t){return(c<2||2===c&&l<9)&&C("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+e.version+"."),e.defaultZone=t?w(t):null,e};var T=e.momentProperties;return"[object Array]"===Object.prototype.toString.call(T)?(T.push("_z"),T.push("_a")):T&&(T._z=null),e}))},593:function(e,t,n){!function(e){"use strict";var t=/^(janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,n=/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?)/i,r=/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?|janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,o=[/^janv/i,/^f\xe9vr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^ao\xfbt/i,/^sept/i,/^oct/i,/^nov/i,/^d\xe9c/i];e.defineLocale("fr",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:t,monthsShortStrictRegex:n,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(2426))},2426:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function o(e){t=e}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function l(e){return void 0===e}function p(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],o=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var N=/(\[[^\[]*\])|(\\)?([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,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},X={};function j(e,t,n,r){var o=r;"string"===typeof r&&(o=function(){return this[r]()}),e&&(X[e]=o),t&&(X[t[0]]=function(){return T(o.apply(this,arguments),t[1],t[2])}),n&&(X[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function I(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function D(e){var t,n,r=e.match(N);for(t=0,n=r.length;t=0&&P.test(e);)e=e.replace(P,r),P.lastIndex=0,n-=1;return e}var V={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 U(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var G="Invalid date";function Y(){return this._invalidDate}var K="%d",Q=/\d{1,2}/;function $(e){return this._ordinal.replace("%d",e)}var J={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 Z(e,t,n,r){var o=this._relativeTime[n];return C(o)?o(e,t,n,r):o.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function oe(e){var t,n,r={};for(n in e)s(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var ie={};function ae(e,t){ie[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ie[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function ce(e){return e%4===0&&e%100!==0||e%400===0}function le(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function pe(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=le(t)),n}function ue(e,t){return function(n){return null!=n?(be(this,e,n),r.updateOffset(this,t),this):de(this,e)}}function de(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ce(e.year())&&1===e.month()&&29===e.date()?(n=pe(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ze(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function fe(e){return C(this[e=re(e)])?this[e]():this}function he(e,t){if("object"===typeof e){var n,r=se(e=oe(e)),o=r.length;for(n=0;n68?1900:2e3)};var Mt=ue("FullYear",!0);function zt(){return ce(this.year())}function Ot(e,t,n,r,o,i,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,i,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,i,a),s}function mt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[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 gt(e,t,n){var r=7+t-n;return-(7+mt(e,0,r).getUTCDay()-t)%7+r-1}function vt(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+gt(e,r,o);return s<=0?a=ht(i=e-1)+s:s>ht(e)?(i=e+1,a=s-ht(e)):(i=e,a=s),{year:i,dayOfYear:a}}function At(e,t,n){var r,o,i=gt(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+yt(o=e.year()-1,t,n):a>yt(e.year(),t,n)?(r=a-yt(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function yt(e,t,n){var r=gt(e,t,n),o=gt(e+1,t,n);return(ht(e)-r+o)/7}function xt(e){return At(e,this._week.dow,this._week.doy).week}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ae("week",5),ae("isoWeek",5),Ee("w",Ae),Ee("ww",Ae,Oe),Ee("W",Ae),Ee("WW",Ae,Oe),je(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=pe(e)}));var qt={dow:0,doy:6};function wt(){return this._week.dow}function Wt(){return this._week.doy}function Rt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ct(e){var t=At(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function _t(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function St(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function kt(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("d",0,"do","day"),j("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),j("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),j("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ae("day",11),ae("weekday",11),ae("isoWeekday",11),Ee("d",Ae),Ee("e",Ae),Ee("E",Ae),Ee("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ee("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ee("dddd",(function(e,t){return t.weekdaysRegex(e)})),je(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:M(n).invalidWeekday=e})),je(["d","e","E"],(function(e,t,n,r){t[r]=pe(e)}));var Lt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Et="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Tt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Nt=Le,Pt=Le,Bt=Le;function Xt(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?kt(n,this._week.dow):e?n[e.day()]:n}function jt(e){return!0===e?kt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function It(e){return!0===e?kt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Dt(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=De.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=De.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=De.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=De.call(this._weekdaysParse,a))||-1!==(o=De.call(this._shortWeekdaysParse,a))||-1!==(o=De.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=De.call(this._shortWeekdaysParse,a))||-1!==(o=De.call(this._weekdaysParse,a))||-1!==(o=De.call(this._minWeekdaysParse,a))?o:null:-1!==(o=De.call(this._minWeekdaysParse,a))||-1!==(o=De.call(this._weekdaysParse,a))||-1!==(o=De.call(this._shortWeekdaysParse,a))?o:null}function Ft(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Dt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=_t(e,this.localeData()),this.add(e-t,"d")):t}function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ut(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=St(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Nt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Pt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Bt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],c=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=Pe(this.weekdaysMin(n,"")),o=Pe(this.weekdaysShort(n,"")),i=Pe(this.weekdays(n,"")),a.push(r),s.push(o),c.push(i),l.push(r),l.push(o),l.push(i);a.sort(e),s.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $t(){return this.hours()%12||12}function Jt(){return this.hours()||24}function Zt(e,t){j(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,$t),j("k",["kk",2],0,Jt),j("hmm",0,0,(function(){return""+$t.apply(this)+T(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+$t.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+T(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)})),Zt("a",!0),Zt("A",!1),ne("hour","h"),ae("hour",13),Ee("a",en),Ee("A",en),Ee("H",Ae),Ee("h",Ae),Ee("k",Ae),Ee("HH",Ae,Oe),Ee("hh",Ae,Oe),Ee("kk",Ae,Oe),Ee("hmm",ye),Ee("hmmss",xe),Ee("Hmm",ye),Ee("Hmmss",xe),Xe(["H","HH"],Ue),Xe(["k","kk"],(function(e,t,n){var r=pe(e);t[Ue]=24===r?0:r})),Xe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Xe(["h","hh"],(function(e,t,n){t[Ue]=pe(e),M(n).bigHour=!0})),Xe("hmm",(function(e,t,n){var r=e.length-2;t[Ue]=pe(e.substr(0,r)),t[Ge]=pe(e.substr(r)),M(n).bigHour=!0})),Xe("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ue]=pe(e.substr(0,r)),t[Ge]=pe(e.substr(r,2)),t[Ye]=pe(e.substr(o)),M(n).bigHour=!0})),Xe("Hmm",(function(e,t,n){var r=e.length-2;t[Ue]=pe(e.substr(0,r)),t[Ge]=pe(e.substr(r))})),Xe("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ue]=pe(e.substr(0,r)),t[Ge]=pe(e.substr(r,2)),t[Ye]=pe(e.substr(o))}));var nn=/[ap]\.?m?\.?/i,rn=ue("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:L,longDateFormat:V,invalidDate:G,ordinal:K,dayOfMonthOrdinalParse:Q,relativeTime:J,months:et,monthsShort:tt,week:qt,weekdays:Lt,weekdaysMin:Tt,weekdaysShort:Et,meridiemParse:nn},cn={},ln={};function pn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=fn(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&pn(o,n)>=t-1)break;t--}i++}return an}function bn(e){return null!=e.match("^[^/\\\\]*$")}function fn(t){var n=null;if(void 0===cn[t]&&e&&e.exports&&bn(t))try{n=an._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),hn(n)}catch(r){cn[t]=null}return cn[t]}function hn(e,t){var n;return e&&((n=l(t)?On(e):Mn(e,t))?an=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function Mn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=cn[e])R("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."),r=cn[e]._config;else if(null!=t.parentLocale)if(null!=cn[t.parentLocale])r=cn[t.parentLocale]._config;else{if(null==(n=fn(t.parentLocale)))return ln[t.parentLocale]||(ln[t.parentLocale]=[]),ln[t.parentLocale].push({name:e,config:t}),null;r=n._config}return cn[e]=new k(S(r,t)),ln[e]&&ln[e].forEach((function(e){Mn(e.name,e.config)})),hn(e),cn[e]}return delete cn[e],null}function zn(e,t){if(null!=t){var n,r,o=sn;null!=cn[e]&&null!=cn[e].parentLocale?cn[e].set(S(cn[e]._config,t)):(null!=(r=fn(e))&&(o=r._config),t=S(o,t),null==r&&(t.abbr=e),(n=new k(t)).parentLocale=cn[e],cn[e]=n),hn(e)}else null!=cn[e]&&(null!=cn[e].parentLocale?(cn[e]=cn[e].parentLocale,e===hn()&&hn(e)):null!=cn[e]&&delete cn[e]);return cn[e]}function On(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!i(e)){if(t=fn(e))return t;e=[e]}return dn(e)}function mn(){return w(cn)}function gn(e){var t,n=e._a;return n&&-2===M(e).overflow&&(t=n[He]<0||n[He]>11?He:n[Ve]<1||n[Ve]>Ze(n[Fe],n[He])?Ve:n[Ue]<0||n[Ue]>24||24===n[Ue]&&(0!==n[Ge]||0!==n[Ye]||0!==n[Ke])?Ue:n[Ge]<0||n[Ge]>59?Ge:n[Ye]<0||n[Ye]>59?Ye:n[Ke]<0||n[Ke]>999?Ke:-1,M(e)._overflowDayOfYear&&(tVe)&&(t=Ve),M(e)._overflowWeeks&&-1===t&&(t=Qe),M(e)._overflowWeekday&&-1===t&&(t=$e),M(e).overflow=t),e}var vn=/^\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)?)?$/,An=/^\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)?)?$/,yn=/Z|[+-]\d\d(?::?\d\d)?/,xn=[["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]],qn=[["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/]],wn=/^\/?Date\((-?\d+)/i,Wn=/^(?:(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}))$/,Rn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Cn(e){var t,n,r,o,i,a,s=e._i,c=vn.exec(s)||An.exec(s),l=xn.length,p=qn.length;if(c){for(M(e).iso=!0,t=0,n=l;tht(i)||0===e._dayOfYear)&&(M(e)._overflowDayOfYear=!0),n=mt(i,0,e._dayOfYear),e._a[He]=n.getUTCMonth(),e._a[Ve]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ue]&&0===e._a[Ge]&&0===e._a[Ye]&&0===e._a[Ke]&&(e._nextDay=!0,e._a[Ue]=0),e._d=(e._useUTC?mt:Ot).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ue]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==o&&(M(e).weekdayMismatch=!0)}}function jn(e){var t,n,r,o,i,a,s,c,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,a=4,n=Pn(t.GG,e._a[Fe],At(Kn(),1,4).year),r=Pn(t.W,1),((o=Pn(t.E,1))<1||o>7)&&(c=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,l=At(Kn(),i,a),n=Pn(t.gg,e._a[Fe],l.year),r=Pn(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(c=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(c=!0)):o=i),r<1||r>yt(n,i,a)?M(e)._overflowWeeks=!0:null!=c?M(e)._overflowWeekday=!0:(s=vt(n,r,o,i,a),e._a[Fe]=s.year,e._dayOfYear=s.dayOfYear)}function In(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],M(e).empty=!0;var t,n,o,i,a,s,c,l=""+e._i,p=l.length,u=0;for(c=(o=H(e._f,e._locale).match(N)||[]).length,t=0;t0&&M(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),u+=n.length),X[i]?(n?M(e).empty=!1:M(e).unusedTokens.push(i),Ie(i,n,e)):e._strict&&!n&&M(e).unusedTokens.push(i);M(e).charsLeftOver=p-u,l.length>0&&M(e).unusedInput.push(l),e._a[Ue]<=12&&!0===M(e).bigHour&&e._a[Ue]>0&&(M(e).bigHour=void 0),M(e).parsedDateParts=e._a.slice(0),M(e).meridiem=e._meridiem,e._a[Ue]=Dn(e._locale,e._a[Ue],e._meridiem),null!==(s=M(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(s,e._a[Fe])),Xn(e),gn(e)}else Tn(e);else Cn(e)}function Dn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Fn(e){var t,n,r,o,i,a,s=!1,c=e._f.length;if(0===c)return M(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis?this:e:O()}));function Jn(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Kn();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ar(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=Un(t))._a?(e=t._isUTC?f(t._a):Kn(t._a),this._isDSTShifted=this.isValid()&&lr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function yr(){return!!this.isValid()&&!this._isUTC}function xr(){return!!this.isValid()&&this._isUTC}function qr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var wr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Wr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Rr(e,t){var n,r,o,i=e,a=null;return sr(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:p(e)||!isNaN(+e)?(i={},t?i[t]=+e:i.milliseconds=+e):(a=wr.exec(e))?(n="-"===a[1]?-1:1,i={y:0,d:pe(a[Ve])*n,h:pe(a[Ue])*n,m:pe(a[Ge])*n,s:pe(a[Ye])*n,ms:pe(cr(1e3*a[Ke]))*n}):(a=Wr.exec(e))?(n="-"===a[1]?-1:1,i={y:Cr(a[2],n),M:Cr(a[3],n),w:Cr(a[4],n),d:Cr(a[5],n),h:Cr(a[6],n),m:Cr(a[7],n),s:Cr(a[8],n)}):null==i?i={}:"object"===typeof i&&("from"in i||"to"in i)&&(o=Sr(Kn(i.from),Kn(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),r=new ar(i),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Cr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function _r(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Sr(e,t){var n;return e.isValid()&&t.isValid()?(t=br(t,e),e.isBefore(t)?n=_r(e,t):((n=_r(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function kr(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(R(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."),o=n,n=r,r=o),Lr(this,Rr(n,r),e),this}}function Lr(e,t,n,o){var i=t._milliseconds,a=cr(t._days),s=cr(t._months);e.isValid()&&(o=null==o||o,s&<(e,de(e,"Month")+s*n),a&&be(e,"Date",de(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),o&&r.updateOffset(e,a||s))}Rr.fn=ar.prototype,Rr.invalid=ir;var Er=kr(1,"add"),Tr=kr(-1,"subtract");function Nr(e){return"string"===typeof e||e instanceof String}function Pr(e){return y(e)||u(e)||Nr(e)||p(e)||Xr(e)||Br(e)||null===e||void 0===e}function Br(e){var t,n,r=a(e)&&!c(e),o=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=i.length;for(t=0;tn.valueOf():n.valueOf()9999?F(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(n,"Z")):F(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,o="moment",i="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=i+'[")]',this.format(e+t+n+r)}function to(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)}function no(e,t){return this.isValid()&&(y(e)&&e.isValid()||Kn(e).isValid())?Rr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ro(e){return this.from(Kn(),e)}function oo(e,t){return this.isValid()&&(y(e)&&e.isValid()||Kn(e).isValid())?Rr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function io(e){return this.to(Kn(),e)}function ao(e){var t;return void 0===e?this._locale._abbr:(null!=(t=On(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var so=q("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function co(){return this._locale}var lo=1e3,po=60*lo,uo=60*po,bo=3506328*uo;function fo(e,t){return(e%t+t)%t}function ho(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-bo:new Date(e,t,n).valueOf()}function Mo(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-bo:Date.UTC(e,t,n)}function zo(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?Mo:ho,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-=fo(t+(this._isUTC?0:this.utcOffset()*po),uo);break;case"minute":t=this._d.valueOf(),t-=fo(t,po);break;case"second":t=this._d.valueOf(),t-=fo(t,lo)}return this._d.setTime(t),r.updateOffset(this,!0),this}function Oo(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?Mo:ho,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+=uo-fo(t+(this._isUTC?0:this.utcOffset()*po),uo)-1;break;case"minute":t=this._d.valueOf(),t+=po-fo(t,po)-1;break;case"second":t=this._d.valueOf(),t+=lo-fo(t,lo)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function mo(){return this._d.valueOf()-6e4*(this._offset||0)}function go(){return Math.floor(this.valueOf()/1e3)}function vo(){return new Date(this.valueOf())}function Ao(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function yo(){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 xo(){return this.isValid()?this.toISOString():null}function qo(){return z(this)}function wo(){return b({},M(this))}function Wo(){return M(this).overflow}function Ro(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Co(e,t){var n,o,i,a=this._eras||On("en")._eras;for(n=0,o=a.length;n=0)return c[r]}function So(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function ko(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e(i=yt(e,r,o))&&(t=i),Jo.call(this,e,t,n,r,o))}function Jo(e,t,n,r,o){var i=vt(e,t,n,r,o),a=mt(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zo(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}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"),Ee("N",Xo),Ee("NN",Xo),Ee("NNN",Xo),Ee("NNNN",jo),Ee("NNNNN",Io),Xe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?M(n).era=o:M(n).invalidEra=e})),Ee("y",Re),Ee("yy",Re),Ee("yyy",Re),Ee("yyyy",Re),Ee("yo",Do),Xe(["y","yy","yyy","yyyy"],Fe),Xe(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Fe]=n._locale.eraYearOrdinalParse(e,o):t[Fe]=parseInt(e,10)})),j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Ho("gggg","weekYear"),Ho("ggggg","weekYear"),Ho("GGGG","isoWeekYear"),Ho("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ae("weekYear",1),ae("isoWeekYear",1),Ee("G",Ce),Ee("g",Ce),Ee("GG",Ae,Oe),Ee("gg",Ae,Oe),Ee("GGGG",we,ge),Ee("gggg",we,ge),Ee("GGGGG",We,ve),Ee("ggggg",We,ve),je(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=pe(e)})),je(["gg","GG"],(function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)})),j("Q",0,"Qo","quarter"),ne("quarter","Q"),ae("quarter",7),Ee("Q",ze),Xe("Q",(function(e,t){t[He]=3*(pe(e)-1)})),j("D",["DD",2],"Do","date"),ne("date","D"),ae("date",9),Ee("D",Ae),Ee("DD",Ae,Oe),Ee("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Xe(["D","DD"],Ve),Xe("Do",(function(e,t){t[Ve]=pe(e.match(Ae)[0])}));var ei=ue("Date",!0);function ti(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}j("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ae("dayOfYear",4),Ee("DDD",qe),Ee("DDDD",me),Xe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=pe(e)})),j("m",["mm",2],0,"minute"),ne("minute","m"),ae("minute",14),Ee("m",Ae),Ee("mm",Ae,Oe),Xe(["m","mm"],Ge);var ni=ue("Minutes",!1);j("s",["ss",2],0,"second"),ne("second","s"),ae("second",15),Ee("s",Ae),Ee("ss",Ae,Oe),Xe(["s","ss"],Ye);var ri,oi,ii=ue("Seconds",!1);for(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 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ae("millisecond",16),Ee("S",qe,ze),Ee("SS",qe,Oe),Ee("SSS",qe,me),ri="SSSS";ri.length<=9;ri+="S")Ee(ri,Re);function ai(e,t){t[Ke]=pe(1e3*("0."+e))}for(ri="S";ri.length<=9;ri+="S")Xe(ri,ai);function si(){return this._isUTC?"UTC":""}function ci(){return this._isUTC?"Coordinated Universal Time":""}oi=ue("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var li=A.prototype;function pi(e){return Kn(1e3*e)}function ui(){return Kn.apply(null,arguments).parseZone()}function di(e){return e}li.add=Er,li.calendar=Dr,li.clone=Fr,li.diff=Qr,li.endOf=Oo,li.format=to,li.from=no,li.fromNow=ro,li.to=oo,li.toNow=io,li.get=fe,li.invalidAt=Wo,li.isAfter=Hr,li.isBefore=Vr,li.isBetween=Ur,li.isSame=Gr,li.isSameOrAfter=Yr,li.isSameOrBefore=Kr,li.isValid=qo,li.lang=so,li.locale=ao,li.localeData=co,li.max=$n,li.min=Qn,li.parsingFlags=wo,li.set=he,li.startOf=zo,li.subtract=Tr,li.toArray=Ao,li.toObject=yo,li.toDate=vo,li.toISOString=Zr,li.inspect=eo,"undefined"!==typeof Symbol&&null!=Symbol.for&&(li[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),li.toJSON=xo,li.toString=Jr,li.unix=go,li.valueOf=mo,li.creationData=Ro,li.eraName=ko,li.eraNarrow=Lo,li.eraAbbr=Eo,li.eraYear=To,li.year=Mt,li.isLeapYear=zt,li.weekYear=Vo,li.isoWeekYear=Uo,li.quarter=li.quarters=Zo,li.month=pt,li.daysInMonth=ut,li.week=li.weeks=Rt,li.isoWeek=li.isoWeeks=Ct,li.weeksInYear=Ko,li.weeksInWeekYear=Qo,li.isoWeeksInYear=Go,li.isoWeeksInISOWeekYear=Yo,li.date=ei,li.day=li.days=Ht,li.weekday=Vt,li.isoWeekday=Ut,li.dayOfYear=ti,li.hour=li.hours=rn,li.minute=li.minutes=ni,li.second=li.seconds=ii,li.millisecond=li.milliseconds=oi,li.utcOffset=hr,li.utc=zr,li.local=Or,li.parseZone=mr,li.hasAlignedHourOffset=gr,li.isDST=vr,li.isLocal=yr,li.isUtcOffset=xr,li.isUtc=qr,li.isUTC=qr,li.zoneAbbr=si,li.zoneName=ci,li.dates=q("dates accessor is deprecated. Use date instead.",ei),li.months=q("months accessor is deprecated. Use month instead",pt),li.years=q("years accessor is deprecated. Use year instead",Mt),li.zone=q("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Mr),li.isDSTShifted=q("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ar);var bi=k.prototype;function fi(e,t,n,r){var o=On(),i=f().set(r,t);return o[n](i,e)}function hi(e,t,n){if(p(e)&&(t=e,e=void 0),e=e||"",null!=t)return fi(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=fi(e,r,n,"month");return o}function Mi(e,t,n,r){"boolean"===typeof e?(p(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,p(t)&&(n=t,t=void 0),t=t||"");var o,i=On(),a=e?i._week.dow:0,s=[];if(null!=n)return fi(t,(n+a)%7,r,"day");for(o=0;o<7;o++)s[o]=fi(t,(o+a)%7,r,"day");return s}function zi(e,t){return hi(e,t,"months")}function Oi(e,t){return hi(e,t,"monthsShort")}function mi(e,t,n){return Mi(e,t,n,"weekdays")}function gi(e,t,n){return Mi(e,t,n,"weekdaysShort")}function vi(e,t,n){return Mi(e,t,n,"weekdaysMin")}bi.calendar=E,bi.longDateFormat=U,bi.invalidDate=Y,bi.ordinal=$,bi.preparse=di,bi.postformat=di,bi.relativeTime=Z,bi.pastFuture=ee,bi.set=_,bi.eras=Co,bi.erasParse=_o,bi.erasConvertYear=So,bi.erasAbbrRegex=Po,bi.erasNameRegex=No,bi.erasNarrowRegex=Bo,bi.months=it,bi.monthsShort=at,bi.monthsParse=ct,bi.monthsRegex=bt,bi.monthsShortRegex=dt,bi.week=xt,bi.firstDayOfYear=Wt,bi.firstDayOfWeek=wt,bi.weekdays=Xt,bi.weekdaysMin=It,bi.weekdaysShort=jt,bi.weekdaysParse=Ft,bi.weekdaysRegex=Gt,bi.weekdaysShortRegex=Yt,bi.weekdaysMinRegex=Kt,bi.isPM=tn,bi.meridiem=on,hn("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;return e+(1===pe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=q("moment.lang is deprecated. Use moment.locale instead.",hn),r.langData=q("moment.langData is deprecated. Use moment.localeData instead.",On);var Ai=Math.abs;function yi(){var e=this._data;return this._milliseconds=Ai(this._milliseconds),this._days=Ai(this._days),this._months=Ai(this._months),e.milliseconds=Ai(e.milliseconds),e.seconds=Ai(e.seconds),e.minutes=Ai(e.minutes),e.hours=Ai(e.hours),e.months=Ai(e.months),e.years=Ai(e.years),this}function xi(e,t,n,r){var o=Rr(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function qi(e,t){return xi(this,e,t,1)}function wi(e,t){return xi(this,e,t,-1)}function Wi(e){return e<0?Math.floor(e):Math.ceil(e)}function Ri(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,c=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*Wi(_i(s)+a),a=0,s=0),c.milliseconds=i%1e3,e=le(i/1e3),c.seconds=e%60,t=le(e/60),c.minutes=t%60,n=le(t/60),c.hours=n%24,a+=le(n/24),s+=o=le(Ci(a)),a-=Wi(_i(o)),r=le(s/12),s%=12,c.days=a,c.months=s,c.years=r,this}function Ci(e){return 4800*e/146097}function _i(e){return 146097*e/4800}function Si(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ci(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(_i(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function ki(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*pe(this._months/12):NaN}function Li(e){return function(){return this.as(e)}}var Ei=Li("ms"),Ti=Li("s"),Ni=Li("m"),Pi=Li("h"),Bi=Li("d"),Xi=Li("w"),ji=Li("M"),Ii=Li("Q"),Di=Li("y");function Fi(){return Rr(this)}function Hi(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Vi(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ui=Vi("milliseconds"),Gi=Vi("seconds"),Yi=Vi("minutes"),Ki=Vi("hours"),Qi=Vi("days"),$i=Vi("months"),Ji=Vi("years");function Zi(){return le(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function na(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function ra(e,t,n,r){var o=Rr(e).abs(),i=ea(o.as("s")),a=ea(o.as("m")),s=ea(o.as("h")),c=ea(o.as("d")),l=ea(o.as("M")),p=ea(o.as("w")),u=ea(o.as("y")),d=i<=n.ss&&["s",i]||i0,d[4]=r,na.apply(null,d)}function oa(e){return void 0===e?ea:"function"===typeof e&&(ea=e,!0)}function ia(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,i=ta;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(o=e),"object"===typeof t&&(i=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=ra(this,!o,i,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)}var sa=Math.abs;function ca(e){return(e>0)-(e<0)||+e}function la(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,i,a,s,c=sa(this._milliseconds)/1e3,l=sa(this._days),p=sa(this._months),u=this.asSeconds();return u?(e=le(c/60),t=le(e/60),c%=60,e%=60,n=le(p/12),p%=12,r=c?c.toFixed(3).replace(/\.?0+$/,""):"",o=u<0?"-":"",i=ca(this._months)!==ca(u)?"-":"",a=ca(this._days)!==ca(u)?"-":"",s=ca(this._milliseconds)!==ca(u)?"-":"",o+"P"+(n?i+n+"Y":"")+(p?i+p+"M":"")+(l?a+l+"D":"")+(t||e||c?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(c?s+r+"S":"")):"P0D"}var pa=ar.prototype;return pa.isValid=or,pa.abs=yi,pa.add=qi,pa.subtract=wi,pa.as=Si,pa.asMilliseconds=Ei,pa.asSeconds=Ti,pa.asMinutes=Ni,pa.asHours=Pi,pa.asDays=Bi,pa.asWeeks=Xi,pa.asMonths=ji,pa.asQuarters=Ii,pa.asYears=Di,pa.valueOf=ki,pa._bubble=Ri,pa.clone=Fi,pa.get=Hi,pa.milliseconds=Ui,pa.seconds=Gi,pa.minutes=Yi,pa.hours=Ki,pa.days=Qi,pa.weeks=Zi,pa.months=$i,pa.years=Ji,pa.humanize=aa,pa.toISOString=la,pa.toString=la,pa.toJSON=la,pa.locale=ao,pa.localeData=co,pa.toIsoString=q("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",la),pa.lang=so,j("X",0,0,"unix"),j("x",0,0,"valueOf"),Ee("x",Ce),Ee("X",ke),Xe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Xe("x",(function(e,t,n){n._d=new Date(pe(e))})),r.version="2.29.4",o(Kn),r.fn=li,r.min=Zn,r.max=er,r.now=tr,r.utc=f,r.unix=pi,r.months=zi,r.isDate=u,r.locale=hn,r.invalid=O,r.duration=Rr,r.isMoment=y,r.weekdays=mi,r.parseZone=ui,r.localeData=On,r.isDuration=sr,r.monthsShort=Oi,r.weekdaysMin=vi,r.defineLocale=Mn,r.updateLocale=zn,r.locales=mn,r.weekdaysShort=gi,r.normalizeUnits=re,r.relativeTimeRounding=oa,r.relativeTimeThreshold=ia,r.calendarFormat=Ir,r.prototype=li,r.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"},r}()},1725:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,i){for(var a,s,c=o(e),l=1;l
',o.appendChild(o.__resizeTriggers__),n(o),o.addEventListener("scroll",r,!0),a&&(o.__resizeTriggers__.__animationListener__=function(e){e.animationName==u&&n(o)},o.__resizeTriggers__.addEventListener(a,o.__resizeTriggers__.__animationListener__))}o.__resizeListeners__.push(i)},removeResizeListener:function(e,t){if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",r,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(a,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}var TT=["children","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","style"],NT=t.forwardRef((function(e,n){var r=e.children,o=e.defaultHeight,i=void 0===o?null:o,a=e.defaultWidth,l=void 0===a?null:a,p=e.disableHeight,u=void 0!==p&&p,d=e.disableWidth,b=void 0!==d&&d,f=e.nonce,h=e.onResize,M=e.style,z=Qe(e,TT),O=s(t.useState({height:i,width:l}),2),m=O[0],g=O[1],v=t.useRef(null),A=t.useRef(null),y=oO((function(){if(A.current){var e=A.current.offsetHeight||0,t=A.current.offsetWidth||0,n=QM(A.current).getComputedStyle(A.current),r=parseInt(n.paddingLeft,10)||0,o=parseInt(n.paddingRight,10)||0,i=e-(parseInt(n.paddingTop,10)||0)-(parseInt(n.paddingBottom,10)||0),a=t-r-o;(!u&&m.height!==i||!b&&m.width!==a)&&(g({height:i,width:a}),h&&h({height:i,width:a}))}}));uz((function(){var e;if(A.current=v.current.parentElement,A){var t=QM(null!=(e=A.current)?e:void 0),n=ET(f,t);return n.addResizeListener(A.current,y),y(),function(){n.removeResizeListener(A.current,y)}}}),[f,y]);var x={overflow:"visible"},q={};u||(x.height=0,q.height=m.height),b||(x.width=0,q.width=m.width);var w=LM(v,n);return(0,Cn.jsx)("div",c({ref:w,style:c({},x,M)},z,{children:null===m.height&&null===m.width?null:r(q)}))})),PT=function(e){return e.sorting},BT=HE(PT,(function(e){return e.sortedRows})),XT=HE(BT,zT,(function(e,t){return e.map((function(e){return{id:e,model:t[e]}}))})),jT=HE(PT,(function(e){return e.sortModel})),IT=HE(jT,(function(e){return e.reduce((function(t,n,r){return t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?r+1:void 0},t}),{})})),DT=function(e){return e.filter},FT=HE(DT,(function(e){return e.filterModel})),HT=(HE(FT,(function(e){return e.quickFilterValues})),HE(DT,(function(e){return e.visibleRowsLookup}))),VT=HE(DT,(function(e){return e.filteredRowsLookup})),UT=HE(DT,(function(e){return e.filteredDescendantCountLookup})),GT=HE(HT,XT,(function(e,t){return t.filter((function(t){return!1!==e[t.id]}))})),YT=HE(GT,(function(e){return e.map((function(e){return e.id}))})),KT=HE(VT,XT,(function(e,t){return t.filter((function(t){return!1!==e[t.id]}))})),QT=HE(KT,(function(e){return e.map((function(e){return e.id}))})),$T=HE(GT,mT,vT,(function(e,t,n){return n<2?e:e.filter((function(e){var n;return 0===(null==(n=t[e.id])?void 0:n.depth)}))})),JT=HE(GT,(function(e){return e.length})),ZT=HE($T,(function(e){return e.length})),eN=HE(FT,GE,(function(e,t){var n;return null==(n=e.items)?void 0:n.filter((function(e){var n,r;if(!e.columnField)return!1;var o=t[e.columnField];if(null==o||!o.filterOperators||0===(null==o||null==(n=o.filterOperators)?void 0:n.length))return!1;var i=o.filterOperators.find((function(t){return t.value===e.operatorValue}));return!!i&&(!i.InputComponent||null!=e.value&&""!==(null==(r=e.value)?void 0:r.toString()))}))})),tN=HE(eN,(function(e){return e.reduce((function(e,t){return e[t.columnField]?e[t.columnField].push(t):e[t.columnField]=[t],e}),{})}));function nN(e){var n,r,o=oT(),i=iT(),a=rT(o,dT),l=s(t.useState((function(){var e,t;return null!=(e=null==(t=o.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null})),2),p=l[0],u=l[1],d=t.useCallback((function(){var e,t;u(null!=(e=null==(t=o.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null)}),[o]);uz((function(){return o.current.subscribeEvent("viewportInnerSizeChange",d)}),[o,d]);var b=null!=(n=null==p?void 0:p.height)?n:0;return i.autoHeight&&0===b&&(b="auto"),p?(0,Cn.jsx)("div",c({style:{height:b,width:null!=(r=null==p?void 0:p.width)?r:0,position:"absolute",top:a,bottom:"auto"===b?0:void 0}},e)):null}function rN(){var e,t,n,r=oT(),o=iT(),i=rT(r,fT),a=rT(r,JT),s=rT(r,hT),l=!s&&i>0&&0===a,p=null;s||0!==i||(p=(0,Cn.jsx)(o.components.NoRowsOverlay,c({},null==(e=o.componentsProps)?void 0:e.noRowsOverlay)));l&&(p=(0,Cn.jsx)(o.components.NoResultsOverlay,c({},null==(t=o.componentsProps)?void 0:t.noResultsOverlay)));s&&(p=(0,Cn.jsx)(o.components.LoadingOverlay,c({},null==(n=o.componentsProps)?void 0:n.loadingOverlay)));return null===p?null:(0,Cn.jsx)(nN,{children:p})}function oN(e){var n=e.children,r=e.VirtualScrollerComponent,o=e.ColumnHeadersComponent,i=oT(),a=iT(),c=rT(i,dT),l=s(t.useState(a.disableVirtualization),2),p=l[0],u=l[1],d=t.useCallback((function(){u(!0)}),[]),b=t.useCallback((function(){u(!1)}),[]);t.useEffect((function(){u(a.disableVirtualization)}),[a.disableVirtualization]),i.current.unstable_disableVirtualization=d,i.current.unstable_enableVirtualization=b;var f=t.useRef(null),h=t.useRef(null),M=t.useRef(null),z=t.useRef(null);i.current.columnHeadersContainerElementRef=h,i.current.columnHeadersElementRef=f,i.current.windowRef=M,i.current.renderingZoneRef=z;var O=t.useCallback((function(e){i.current.publishEvent("resize",e)}),[i]);return(0,Cn.jsxs)(_T,{children:[(0,Cn.jsx)(rN,{}),(0,Cn.jsx)(o,{ref:h,innerRef:f}),(0,Cn.jsx)(NT,{nonce:a.nonce,disableHeight:a.autoHeight,onResize:O,children:function(e){var t={width:e.width,height:e.height?e.height-c:"auto",marginTop:c};return(0,Cn.jsx)(r,{ref:M,style:t,disableVirtualization:p})}}),n]})}function iN(){var e,n=oT(),r=iT(),o=t.useRef(null);return n.current.footerRef=o,r.hideFooter?null:(0,Cn.jsx)("div",{ref:o,children:(0,Cn.jsx)(r.components.Footer,c({},null==(e=r.componentsProps)?void 0:e.footer))})}function aN(e){return"function"===typeof e}function sN(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var cN=function(e,t,n){return Math.max(t,Math.min(n,e))};function lN(e,t){if(e===t)return!0;if(e&&t&&"object"===typeof e&&"object"===typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){var n=e.length;if(n!==t.length)return!1;for(var r=0;r>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/4294967296}}(e);return function(){return t+(n-t)*r()}}function uN(e){return"function"===typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}var dN=function(){try{var e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(t){return!1}}()&&null!=window.localStorage.getItem("DEBUG"),bN=function(){},fN={debug:bN,info:bN,warn:bN,error:bN},hN=["debug","info","warn","error"];function MN(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console,r=hN.indexOf(t);if(-1===r)throw new Error("MUI: Log level ".concat(t," not recognized."));var o=hN.reduce((function(t,o,i){return t[o]=i>=r?function(){for(var t=arguments.length,r=new Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:mN;Ce(this,e),this.timeouts=new Map,this.cleanupTimeout=mN,this.cleanupTimeout=t}return Se(e,[{key:"register",value:function(e,t,n){var r=this;this.timeouts||(this.timeouts=new Map);var o=setTimeout((function(){"function"===typeof t&&t(),r.timeouts.delete(n.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(n.cleanupToken,o)}},{key:"unregister",value:function(e){var t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}},{key:"reset",value:function(){var e=this;this.timeouts&&(this.timeouts.forEach((function(t,n){e.unregister({cleanupToken:n})})),this.timeouts=void 0)}}]),e}(),vN=function(){function e(){Ce(this,e),this.registry=new FinalizationRegistry((function(e){"function"===typeof e&&e()}))}return Se(e,[{key:"register",value:function(e,t,n){this.registry.register(e,t,n)}},{key:"unregister",value:function(e){this.registry.unregister(e)}},{key:"reset",value:function(){}}]),e}();!function(e){e.DataGrid="DataGrid",e.DataGridPro="DataGridPro"}(ON||(ON={}));var AN=Se((function e(){Ce(this,e)}));var yN={registry:null},xN=function(e){var n=0;return function(r,o,i,a){null===e.registry&&(e.registry="undefined"!==typeof FinalizationRegistry?new vN:new gN);var c=s(t.useState(new AN),1)[0],l=t.useRef(null),p=t.useRef();p.current=i;var u=t.useRef(null);if(!l.current&&p.current){l.current=r.current.subscribeEvent(o,(function(e,t,n){var r;t.defaultMuiPrevented||(null==(r=p.current)||r.call(p,e,t,n))}),a),n+=1,u.current={cleanupToken:n},e.registry.register(c,(function(){var e;null==(e=l.current)||e.call(l),l.current=null,u.current=null}),u.current)}else!p.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));t.useEffect((function(){if(!l.current&&p.current){l.current=r.current.subscribeEvent(o,(function(e,t,n){var r;t.defaultMuiPrevented||(null==(r=p.current)||r.call(p,e,t,n))}),a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),function(){var e;null==(e=l.current)||e.call(l),l.current=null}}),[r,o,a])}}(yN),qN={isFirst:!0};function wN(e,t,n){xN(e,t,n,qN)}var WN=function(){function e(){Ce(this,e),this.maxListeners=10,this.warnOnce=!1,this.events={}}return Se(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.events[e];r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),n.isFirst?r.highPriority.set(t,!0):r.regular.set(t,!0)}},{key:"removeListener",value:function(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}},{key:"removeAllListeners",value:function(){this.events={}}},{key:"emit",value:function(e){var t=this.events[e];if(t){for(var n=Array.from(t.highPriority.keys()),r=Array.from(t.regular.keys()),o=arguments.length,i=new Array(o>1?o-1:0),a=1;a=0;s-=1){var c=n[s];t.highPriority.has(c)&&c.apply(this,i)}for(var l=0;l1)throw new Error("You're not allowed to update several sub-state in one transaction. You already updated ".concat(s[0].stateId,", therefore, you're not allowed to update ").concat(s.map((function(e){return e.stateId})).join(", ")," in the same transaction."));if(a||(e.current.state=i,e.current.publishEvent&&e.current.publishEvent("stateChange",i)),1===s.length){var c=s[0],l=c.stateId,p=c.hasPropChanged,u=r.current[l],d=u.stateSelector(i,e.current.instanceId);if(u.propOnChange&&p){var b=n.signature===ON.DataGridPro?{api:e.current,reason:o}:{reason:o};u.propOnChange(d,b)}a||e.current.publishEvent(u.changeEvent,d,{reason:o})}return!a}),[e,n.signature]),l=t.useCallback((function(t,n,r){return e.current.setState((function(e){return c({},e,ne({},t,n(e[t])))}),r)}),[e]),p=t.useCallback((function(){return o((function(){return e.current.state}))}),[e]);zN(e,{setState:a,forceUpdate:p,unstable_updateControlState:l,unstable_registerControlState:i})}(r,n),function(e){var n=t.useRef({}),r=t.useCallback((function(e){e&&Object.values(e.appliers).forEach((function(e){e()}))}),[]),o=t.useCallback((function(e,t,o){n.current[e]||(n.current[e]={processors:new Map,appliers:{}});var i=n.current[e];return i.processors.get(t)!==o&&(i.processors.set(t,o),r(i)),function(){n.current[e].processors.set(t,null)}}),[r]),i=t.useCallback((function(e,t,r){return n.current[e]||(n.current[e]={processors:new Map,appliers:{}}),n.current[e].appliers[t]=r,function(){var r=Qe(n.current[e].appliers,[t].map(_N));n.current[e].appliers=r}}),[]),a=t.useCallback((function(e){var t=n.current[e];r(t)}),[r]),s=t.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r ")),"- ".concat(n.join(" > "))].join("\n"));r[t.field]=n}else{var o=t.groupId;t.children.forEach((function(t){e(t,[].concat(Le(n),[o]),r)}))}},IN=function(e){if(!e)return{};var t={};return e.forEach((function(e){jN(e,[],t)})),t},DN=function e(t){var n={};return t.forEach((function(t){if(!PN(t)){var r=t.groupId,o=t.children,i=Qe(t,XN);if(!r)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn("MUI: group groupId=".concat(r," has no children."));var a=c({},i,{groupId:r}),s=e(o);if(void 0!==s[r]||void 0!==n[r])throw new Error("MUI: The groupId ".concat(r," is used multiple times in the columnGroupingModel."));n=c({},n,s,ne({},r,a))}})),c({},n)},FN=function(e,t){var n;return c({},e,{columnGrouping:{lookup:DN(null!=(n=t.columnGroupingModel)?n:[]),groupCollapsedModel:{}}})},HN=function(e){return"Escape"===e},VN=function(e){return"Enter"===e},UN=function(e){return"Tab"===e},GN=function(e){return" "===e},YN=function(e){return"Delete"===e||"Backspace"===e};function KN(e){return 1===e.key.length&&!1===e.ctrlKey&&!1===e.metaKey}var QN=["Enter","Escape","Tab"],$N=["Enter","Tab"],JN=function(e){return VN(e.key)||YN(e.key)||KN(e)},ZN=function(e){return $N.indexOf(e)>-1},eP=function(e){return function(e){return"Home"===e||"End"===e}(e)||function(e){return 0===e.indexOf("Arrow")}(e)||function(e){return 0===e.indexOf("Page")}(e)||GN(e)},tP=function(e){return!!e.key},nP=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","getValue","api"],rP=t.forwardRef((function(e,n){var r,o=e.field,i=e.id,a=e.value,s=e.rowNode,l=e.hasFocus,p=e.tabIndex,u=Qe(e,nP),d=oT(),b=iT(),f=function(e){return Cf({root:["checkboxInput"]},kE,e.classes)}({classes:b.classes}),h=t.useRef(null),M=t.useRef(),z=LM(h,n),O=d.current.getCellElement(i,o);t.useLayoutEffect((function(){0===p&&O&&(O.tabIndex=-1)}),[O,p]),t.useLayoutEffect((function(){if(l){var e,t=null==(e=h.current)?void 0:e.querySelector("input");null==t||t.focus()}else M.current&&M.current.stop({})}),[l]);var m=t.useCallback((function(t){GN(t.key)&&t.stopPropagation(),eP(t.key)&&!t.shiftKey&&d.current.publishEvent("cellNavigationKeyDown",e,t)}),[d,e]);if("footer"===s.position)return null;var g=d.current.isRowSelectable(i),v=d.current.getLocaleText(a?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return s.isPinned?null:(0,Cn.jsx)(b.components.BaseCheckbox,c({ref:z,tabIndex:p,checked:a,onChange:function(e){var t={value:e.target.checked,id:i};d.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:f.root,inputProps:{"aria-label":v},onKeyDown:m,disabled:!g,touchRippleRef:M},null==(r=b.componentsProps)?void 0:r.baseCheckbox,u))})),oP=t.memo(rP),iP=function(e){return e.focus},aP=HE(iP,(function(e){return e.cell})),sP=HE(iP,(function(e){return e.columnHeader})),cP=function(e){return e.tabIndex},lP=HE(cP,(function(e){return e.cell})),pP=HE(cP,(function(e){return e.columnHeader})),uP=function(e){return e.selection},dP=HE(uP,(function(e){return e.length})),bP=HE(uP,zT,(function(e,t){return new Map(e.map((function(e){return[e,t[e]]})))})),fP=HE(uP,(function(e){return e.reduce((function(e,t){return e[t]=t,e}),{})})),hP=function(e){return e.pagination},MP=HE(hP,(function(e){return e.page})),zP=HE(hP,(function(e){return e.pageSize})),OP=(HE(hP,(function(e){return e.pageCount})),HE(hP,mT,vT,GT,$T,(function(e,t,n,r,o){var i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=Math.min(a+e.pageSize-1,i-1);if(-1===a||-1===s)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:s};for(var c=o[a],l=s-a+1,p=r.findIndex((function(e){return e.id===c.id})),u=p,d=0;u0)&&(u+=1),0===b&&(d+=1)}return{firstRowIndex:p,lastRowIndex:u-1}}))),mP=HE(GT,OP,(function(e,t){return t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]})),gP=HE(YT,OP,(function(e,t){return t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]})),vP=["field","colDef"],AP=t.forwardRef((function(e,n){var r,o=Qe(e,vP),i=s(t.useState(!1),2)[1],a=oT(),l=iT(),p=function(e){return Cf({root:["checkboxInput"]},kE,e.classes)}({classes:l.classes}),u=rT(a,pP),d=rT(a,uP),b=rT(a,YT),f=rT(a,gP),h=t.useMemo((function(){return"function"!==typeof l.isRowSelectable?d:d.filter((function(e){return!!a.current.getRow(e)&&l.isRowSelectable(a.current.getRowParams(e))}))}),[a,l.isRowSelectable,d]),M=t.useMemo((function(){return(l.pagination&&l.checkboxSelectionVisibleOnly?f:b).reduce((function(e,t){return e[t]=!0,e}),{})}),[l.pagination,l.checkboxSelectionVisibleOnly,f,b]),z=t.useMemo((function(){return h.filter((function(e){return M[e]})).length}),[h,M]),O=z>0&&z0,g=null!==u&&u.field===e.field?0:-1;t.useLayoutEffect((function(){var t=a.current.getColumnHeaderElement(e.field);0===g&&t&&(t.tabIndex=-1)}),[g,a,e.field]);var v=t.useCallback((function(t){" "===t.key&&a.current.publishEvent("headerSelectionCheckboxChange",{value:!m}),eP(t.key)&&!t.shiftKey&&a.current.publishEvent("columnHeaderNavigationKeyDown",e,t)}),[a,e,m]),A=t.useCallback((function(){i((function(e){return!e}))}),[]);t.useEffect((function(){return a.current.subscribeEvent("selectionChange",A)}),[a,A]);var y=a.current.getLocaleText(m?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,Cn.jsx)(l.components.BaseCheckbox,c({ref:n,indeterminate:O,checked:m,onChange:function(e){var t={value:e.target.checked};a.current.publishEvent("headerSelectionCheckboxChange",t)},className:p.root,inputProps:{"aria-label":y},tabIndex:g,onKeyDown:v},null==(r=l.componentsProps)?void 0:r.baseCheckbox,o))})),yP=cm((0,Cn.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),xP=cm((0,Cn.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),qP=cm((0,Cn.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),wP=cm((0,Cn.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),WP=cm((0,Cn.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),RP=cm((0,Cn.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),CP=cm((0,Cn.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),_P=(cm((0,Cn.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),cm((0,Cn.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),cm((0,Cn.jsx)("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon")),SP=cm((0,Cn.jsx)("path",{d:"M11 19V5h2v14z"}),"Separator"),kP=cm((0,Cn.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),LP=cm((0,Cn.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),EP=cm((0,Cn.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),TP=cm((0,Cn.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),NP=cm((0,Cn.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),PP=cm((0,Cn.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),BP=cm((0,Cn.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),XP=cm((0,Cn.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),jP=cm((0,Cn.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),IP=cm((0,Cn.jsx)("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),DP=cm((0,Cn.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),FP=cm((0,Cn.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");function HP(e){return"object"===typeof e&&null!==e?e.value:e}function VP(e,t){if(void 0!==t){var n=t.find((function(t){var n=HP(t);return String(n)===String(e)}));return HP(n)}}var UP=["item","applyValue","type","apiRef","focusElementRef"];var GP=function(e,t,n){var r=e.valueOptions,o=e.valueFormatter,i=e.field;return[""].concat(Le("function"===typeof r?r({field:i}):r||[])).map((function(e){var r="object"===typeof e,a=r?e.value:e,s=r?e.value:e,c=o&&""!==e?o({value:e,field:i,api:t}):e,l=r?e.label:c;return(0,Cn.jsx)(n,{value:s,children:l},a)}))};function YP(e){var n,r,o,i,a,l=e.item,p=e.applyValue,u=e.type,d=e.apiRef,b=e.focusElementRef,f=Qe(e,UP);var h=t.useRef(),M=s(t.useState(null!=(n=l.value)?n:""),2),z=M[0],O=M[1],m=s(t.useState(!1),2),g=m[0],v=m[1],A=cS(),y=iT(),x=null==(o=((null==(r=y.componentsProps)?void 0:r.baseSelect)||{}).native)||o,q="singleSelect"===u?{select:!0,SelectProps:c({native:x},null==(i=y.componentsProps)?void 0:i.baseSelect),children:GP(d.current.getColumn(l.columnField),d.current,x?"option":nm)}:{},w=t.useCallback((function(e){var t=e.target.value;if("singleSelect"===u){var n=d.current.getColumn(l.columnField),r="function"===typeof n.valueOptions?n.valueOptions({field:n.field}):n.valueOptions;t=VP(t,r)}clearTimeout(h.current),O(String(t)),v(!0),h.current=setTimeout((function(){p(c({},l,{value:t})),v(!1)}),500)}),[d,p,l,u]);t.useEffect((function(){return function(){clearTimeout(h.current)}}),[]),t.useEffect((function(){var e,t=null!=(e=l.value)?e:"";O(String(t))}),[l.value]);var W=g?{endAdornment:(0,Cn.jsx)(XP,{})}:f.InputProps;return(0,Cn.jsx)(y.components.BaseTextField,c({id:A,label:d.current.getLocaleText("filterPanelInputLabel"),placeholder:d.current.getLocaleText("filterPanelInputPlaceholder"),value:z,onChange:w,variant:"standard",type:u||"text",InputProps:W,InputLabelProps:{shrink:!0},inputRef:b},q,f,null==(a=y.componentsProps)?void 0:a.baseTextField))}var KP=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","getValue","isValidating","debounceMs","isProcessingProps","onValueChange"],QP=$f(XA,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:function(e,t){return t.editInputCell}})((function(e){return c({},e.theme.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})})),$P=t.forwardRef((function(e,n){var r,o,i=iT(),a=e.id,l=e.value,p=e.field,u=e.colDef,d=e.hasFocus,b=e.debounceMs,f=void 0===b?null!=(r=i.experimentalFeatures)&&r.newEditingApi?200:500:b,h=e.isProcessingProps,M=e.onValueChange,z=Qe(e,KP),O=oT(),m=t.useRef(),g=s(t.useState(l),2),v=g[0],A=g[1],y=function(e){return Cf({root:["editInputCell"]},kE,e.classes)}({classes:i.classes}),x=t.useCallback(function(){var e=lb(sb().mark((function e(t){var n,r,o,s;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.target.value,!M){e.next=4;break}return e.next=4,M(t,r);case 4:o=O.current.getColumn(p),s=r,o.valueParser&&null!=(n=i.experimentalFeatures)&&n.newEditingApi&&(s=o.valueParser(r,O.current.getCellParams(a,p))),A(s),O.current.setEditCellValue({id:a,field:p,value:s,debounceMs:f,unstable_skipValueParser:!0},t);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[O,f,p,a,M,null==(o=i.experimentalFeatures)?void 0:o.newEditingApi]),q=O.current.unstable_getEditCellMeta?O.current.unstable_getEditCellMeta(a,p):{};return t.useEffect((function(){"debouncedSetEditCellValue"!==q.changeReason&&A(l)}),[q.changeReason,l]),uz((function(){d&&m.current.focus()}),[d]),(0,Cn.jsx)(QP,c({ref:n,inputRef:m,className:y.root,fullWidth:!0,type:"number"===u.type?u.type:"text",value:null!=v?v:"",onChange:x,endAdornment:h?(0,Cn.jsx)(XP,{}):void 0},z))})),JP=IE(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),ZP=function(e,t){return t&&e.length>1?(JP(),[e[0]]):e},eB=function(e,t){return function(n){return c({},n,{sorting:c({},n.sorting,{sortModel:ZP(e,t)})})}},tB=function(e,t){var n=e.indexOf(t);return t&&-1!==n&&n+1!==e.length?e[n+1]:e[0]},nB=function(e,t){return null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null},rB=new Intl.Collator,oB=function(e,t){var n=nB(e,t);return null!==n?n:Number(e)-Number(t)},iB=function(e,t){var n=nB(e,t);return null!==n?n:e>t?1:e0&&void 0!==arguments[0]&&arguments[0];return[{value:"contains",getApplyFilterFn:function(t){if(!t.value)return null;var n=e?t.value:t.value.trim(),r=new RegExp(sN(n),"i");return function(e){var t=e.value;return null!=t&&r.test(t.toString())}},InputComponent:YP},{value:"equals",getApplyFilterFn:function(t){if(!t.value)return null;var n=e?t.value:t.value.trim(),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return function(e){var t=e.value;return null!=t&&0===r.compare(n,t.toString())}},InputComponent:YP},{value:"startsWith",getApplyFilterFn:function(t){if(!t.value)return null;var n=e?t.value:t.value.trim(),r=new RegExp("^".concat(sN(n),".*$"),"i");return function(e){var t=e.value;return null!=t&&r.test(t.toString())}},InputComponent:YP},{value:"endsWith",getApplyFilterFn:function(t){if(!t.value)return null;var n=e?t.value:t.value.trim(),r=new RegExp(".*".concat(sN(n),"$"),"i");return function(e){var t=e.value;return null!=t&&r.test(t.toString())}},InputComponent:YP},{value:"isEmpty",getApplyFilterFn:function(){return function(e){var t=e.value;return""===t||null==t}},requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:function(){return function(e){var t=e.value;return""!==t&&null!=t}},requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:function(t){if(!Array.isArray(t.value)||0===t.value.length)return null;var n=e?t.value:t.value.map((function(e){return e.trim()})),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return function(e){var t=e.value;return null!=t&&n.some((function(e){return 0===r.compare(e,t.toString()||"")}))}},InputComponent:sB}]}(),renderEditCell:function(e){return(0,Cn.jsx)($P,c({},e))},getApplyQuickFilterFn:function(e){if(!e)return null;var t=new RegExp(sN(e),"i");return function(e){var n=e.value;return null!=n&&t.test(n.toString())}}},lB=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","getValue"],pB=function(e){var n=e.value,r=Qe(e,lB),o=oT(),i=iT(),a=function(e){return Cf({root:["booleanCell"]},kE,e.classes)}({classes:i.classes}),s=t.useMemo((function(){return n?i.components.BooleanCellTrueIcon:i.components.BooleanCellFalseIcon}),[i.components.BooleanCellFalseIcon,i.components.BooleanCellTrueIcon,n]);return(0,Cn.jsx)(s,c({fontSize:"small",className:a.root,titleAccess:o.current.getLocaleText(n?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(n)},r))},uB=t.memo(pB),dB=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","getValue","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function bB(e){var n,r=e.id,o=e.value,i=e.field,a=e.className,l=e.hasFocus,p=e.onValueChange,u=Qe(e,dB),d=oT(),b=t.useRef(null),f=cS(),h=s(t.useState(o),2),M=h[0],z=h[1],O=iT(),m=function(e){return Cf({root:["editBooleanCell"]},kE,e.classes)}({classes:O.classes}),g=t.useCallback(function(){var e=lb(sb().mark((function e(t){var n;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.target.checked,!p){e.next=4;break}return e.next=4,p(t,n);case 4:return z(n),e.next=7,d.current.setEditCellValue({id:r,field:i,value:n},t);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[d,i,r,p]);return t.useEffect((function(){z(o)}),[o]),uz((function(){l&&b.current.focus()}),[l]),(0,Cn.jsx)("label",c({htmlFor:f,className:ub(m.root,a)},u,{children:(0,Cn.jsx)(O.components.BaseCheckbox,c({id:f,inputRef:b,checked:Boolean(M),onChange:g,size:"small"},null==(n=O.componentsProps)?void 0:n.baseCheckbox))}))}var fB=["item","applyValue","apiRef","focusElementRef"];function hB(e){var n,r,o,i,a=e.item,l=e.applyValue,p=e.apiRef,u=e.focusElementRef,d=Qe(e,fB),b=s(t.useState(a.value||""),2),f=b[0],h=b[1],M=iT(),z=null==(r=((null==(n=M.componentsProps)?void 0:n.baseSelect)||{}).native)||r,O=z?"option":nm,m=t.useCallback((function(e){var t=e.target.value;h(t),l(c({},a,{value:t}))}),[l,a]);return t.useEffect((function(){h(a.value||"")}),[a.value]),(0,Cn.jsxs)(M.components.BaseTextField,c({label:p.current.getLocaleText("filterPanelInputLabel"),value:f,onChange:m,select:!0,variant:"standard",SelectProps:c({native:z,displayEmpty:!0},null==(o=M.componentsProps)?void 0:o.baseSelect),InputLabelProps:{shrink:!0},inputRef:u},d,null==(i=M.componentsProps)?void 0:i.baseTextField,{children:[(0,Cn.jsx)(O,{value:"",children:p.current.getLocaleText("filterValueAny")}),(0,Cn.jsx)(O,{value:"true",children:p.current.getLocaleText("filterValueTrue")}),(0,Cn.jsx)(O,{value:"false",children:p.current.getLocaleText("filterValueFalse")})]}))}var MB=c({},cB,{type:"boolean",align:"center",headerAlign:"center",renderCell:function(e){return e.rowNode.isAutoGenerated?"":(0,Cn.jsx)(uB,c({},e))},renderEditCell:function(e){return(0,Cn.jsx)(bB,c({},e))},sortComparator:oB,valueFormatter:function(e){var t=e.value,n=e.api;return t?n.getLocaleText("booleanCellTrueLabel"):n.getLocaleText("booleanCellFalseLabel")},filterOperators:[{value:"is",getApplyFilterFn:function(e){if(!e.value)return null;var t="true"===e.value;return function(e){var n=e.value;return Boolean(n)===t}},InputComponent:hB}],getApplyQuickFilterFn:void 0,aggregable:!1}),zB="__check__",OB=c({},MB,{field:zB,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,valueGetter:function(e){return void 0!==fP(e.api.state,e.api.instanceId)[e.id]},renderHeader:function(e){return(0,Cn.jsx)(AP,c({},e))},renderCell:function(e){return(0,Cn.jsx)(oP,c({},e))}}),mB=function(e,n){var r=function(e){var n=e.classes;return t.useMemo((function(){return Cf({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},kE,n)}),[n])}({classes:n.classes}),o=t.useCallback((function(t){var o=c({},OB,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),i=n.checkboxSelection,a=null!=t.lookup[zB];return i&&!a?(t.lookup[zB]=o,t.all=[zB].concat(Le(t.all))):!i&&a?(delete t.lookup[zB],t.all=t.all.filter((function(e){return e!==zB}))):i&&a&&(t.lookup[zB]=c({},o,t.lookup[zB])),t}),[e,r,n.checkboxSelection]);NN(e,"hydrateColumns",o)},gB=function(e,n,r,o){var i=t.useCallback((function(){e.current.unstable_registerStrategyProcessor(n,r,o)}),[e,o,r,n]);TN((function(){i()}));var a=t.useRef(!0);t.useEffect((function(){a.current?a.current=!1:i()}),[i])},vB=function(e){for(var t=e.ids,n=e.idRowsLookup,r=e.idToIdLookup,o=e.previousTree,i={},a=0;a-1:!n.documentElement.contains(e.target)||u.current.contains(e.target))||!o&&t||s(e))})),M=function(e){return function(t){b.current=!0;var r=n.props[e];r&&r(t)}},z={ref:f};return!1!==l&&(z[l]=M(l)),t.useEffect((function(){if(!1!==l){var e=yB(l),t=Dh(u.current),n=function(){p.current=!0};return t.addEventListener(e,h),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,h),t.removeEventListener("touchmove",n)}}}),[h,l]),!1!==a&&(z[a]=M(a)),t.useEffect((function(){if(!1!==a){var e=yB(a),t=Dh(u.current);return t.addEventListener(e,h),function(){t.removeEventListener(e,h)}}}),[h,a]),(0,Cn.jsx)(t.Fragment,{children:t.cloneElement(n,z)})},RB=["open","target","onClickAway","children","position","className","onExited"],CB=$f(lC,{name:"MuiDataGrid",slot:"Menu",overridesResolver:function(e,t){return t.menu}})((function(e){return ne({zIndex:e.theme.zIndex.modal},"& .".concat(LE.menuList),{outline:0})})),_B={"bottom-start":"top left","bottom-end":"top right"},SB=function(e){var n,r=e.open,o=e.target,i=e.onClickAway,a=e.children,s=e.position,l=e.className,p=e.onExited,u=Qe(e,RB),d=oT(),b=t.useRef(o),f=t.useRef(r),h=iT(),M=function(e){return Cf({root:["menu"]},kE,e.classes)}({classes:h.classes});t.useEffect((function(){f.current&&b.current&&b.current.focus();var e=r?"menuOpen":"menuClose";d.current.publishEvent(e,{target:o}),f.current=r,b.current=o}),[d,r,o]);return(0,Cn.jsx)(CB,c({as:h.components.BasePopper,className:ub(l,M.root),open:r,anchorEl:o,transition:!0,placement:s},u,null==(n=h.componentsProps)?void 0:n.basePopper,{children:function(e){var t,n=e.TransitionProps,r=e.placement;return(0,Cn.jsx)(WB,{onClickAway:i,mouseEvent:"onMouseDown",children:(0,Cn.jsx)(Tz,c({},n,{style:{transformOrigin:_B[r]},onExited:(t=null==n?void 0:n.onExited,function(e){t&&t(),p&&p(e)}),children:(0,Cn.jsx)(Lh,{children:a})}))})}}))},kB=["colDef","id","api","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","getValue","tabIndex","position","focusElementRef"],LB=function(e){var n=e.colDef,r=e.id,o=e.hasFocus,i=e.tabIndex,a=e.position,l=void 0===a?"bottom-end":a,p=e.focusElementRef,u=Qe(e,kB),d=s(t.useState(-1),2),b=d[0],f=d[1],h=s(t.useState(!1),2),M=h[0],z=h[1],O=oT(),m=t.useRef(null),g=t.useRef(null),v=t.useRef(!1),A=t.useRef({}),y=cS(),x=cS(),q=iT();if(t.useLayoutEffect((function(){o||Object.entries(A.current).forEach((function(e){var t=s(e,2),n=t[0],r=t[1];null==r||r.stop({},(function(){delete A.current[n]}))}))}),[o]),t.useEffect((function(){b<0||!m.current||(b>=m.current.children.length||m.current.children[b].focus())}),[b]),t.useEffect((function(){o||(f(-1),v.current=!1)}),[o]),t.useImperativeHandle(p,(function(){return{focus:function(){v.current||f(0)}}}),[]),!function(e){return"function"===typeof e.getActions}(n))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");var w=n.getActions(O.current.getRowParams(r)),W=w.filter((function(e){return!e.props.showInMenu})),R=w.filter((function(e){return e.props.showInMenu})),C=W.length+(R.length?1:0);t.useEffect((function(){b>=C&&f(C-1)}),[b,C]);var _=function(){z(!1)},S=function(e){return function(t){A.current[e]=t}},k=function(e,t){return function(n){f(e),v.current=!0,t&&t(n)}};return(0,Cn.jsxs)("div",c({role:"menu",ref:m,tabIndex:-1,className:LE.actionsCell,onKeyDown:function(e){if(!(C<=1)){var t=b;"ArrowRight"===e.key?t+=1:"ArrowLeft"===e.key&&(t-=1),t<0||t>=C||t!==b&&(e.preventDefault(),e.stopPropagation(),f(t))}}},u,{children:[W.map((function(e,n){return t.cloneElement(e,{key:n,touchRippleRef:S(n),onClick:k(n,e.props.onClick),tabIndex:b===n?i:-1})})),R.length>0&&x&&(0,Cn.jsx)(Im,{ref:g,id:x,"aria-label":O.current.getLocaleText("actionsCellMore"),"aria-controls":y,"aria-expanded":M?"true":void 0,"aria-haspopup":"true",role:"menuitem",size:"small",onClick:function(){z(!0),f(C-1),v.current=!0},touchRippleRef:S(x),tabIndex:b===W.length?i:-1,children:(0,Cn.jsx)(q.components.MoreActionsIcon,{fontSize:"small"})}),R.length>0&&(0,Cn.jsx)(SB,{onClickAway:_,onClick:_,open:M,target:g.current,position:l,children:(0,Cn.jsx)(Cz,{id:y,className:LE.menuList,onKeyDown:function(e){"Tab"===e.key&&e.preventDefault(),["Tab","Enter","Escape"].includes(e.key)&&_()},"aria-labelledby":x,variant:"menu",autoFocusItem:!0,children:R.map((function(e,n){return t.cloneElement(e,{key:n})}))})})]}))},EB="actions",TB=c({},cB,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:function(e){return(0,Cn.jsx)(LB,c({},e))},getApplyQuickFilterFn:void 0});!function(e){e.Cell="cell",e.Row="row"}(xB||(xB={})),function(e){e.Edit="edit",e.View="view"}(qB||(qB={})),function(e){e.Edit="edit",e.View="view"}(wB||(wB={}));var NB=function(e,t){var n,r;return t.pagination&&"client"===t.paginationMode?(r=OP(e),n=mP(e)):r=0===(n=GT(e)).length?null:{firstRowIndex:0,lastRowIndex:n.length-1},{rows:n,range:r}},PB=function(e,n){var r=NB(e,n);return t.useMemo((function(){return{rows:r.rows,range:r.range}}),[r.rows,r.range])},BB="__detail_panel_toggle__",XB=function(e,t){return null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e]},jB=function(e,t){var n;return c({},e,{selection:null!=(n=XB(t.selectionModel))?n:[]})},IB=function(e,n,r){var o=t.useRef(),i=t.useRef("mui-".concat(Math.round(1e9*Math.random()))),a=t.useCallback((function(){o.current=e.current.unstable_registerPipeApplier(n,i.current,r)}),[e,r,n]);TN((function(){a()}));var s=t.useRef(!0);t.useEffect((function(){return s.current?s.current=!1:a(),function(){o.current&&(o.current(),o.current=null)}}),[a])},DB=function(e){return null==e?null:Number(e)},FB=function(){return[{label:"=",value:"=",getApplyFilterFn:function(e){return null==e.value||Number.isNaN(e.value)?null:function(t){var n=t.value;return DB(n)===e.value}},InputComponent:YP,InputComponentProps:{type:"number"}},{label:"!=",value:"!=",getApplyFilterFn:function(e){return null==e.value||Number.isNaN(e.value)?null:function(t){var n=t.value;return DB(n)!==e.value}},InputComponent:YP,InputComponentProps:{type:"number"}},{label:">",value:">",getApplyFilterFn:function(e){return null==e.value||Number.isNaN(e.value)?null:function(t){var n=t.value;return null!=n&&DB(n)>e.value}},InputComponent:YP,InputComponentProps:{type:"number"}},{label:">=",value:">=",getApplyFilterFn:function(e){return null==e.value||Number.isNaN(e.value)?null:function(t){var n=t.value;return null!=n&&DB(n)>=e.value}},InputComponent:YP,InputComponentProps:{type:"number"}},{label:"<",value:"<",getApplyFilterFn:function(e){return null==e.value||Number.isNaN(e.value)?null:function(t){var n=t.value;return null!=n&&DB(n)t}),e)},InputComponent:UB,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:function(t){return KB(t,(function(e,t){return e>=t}),e)},InputComponent:UB,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:function(t){return KB(t,(function(e,t){return e=0})).map((function(e){return O[e]})):n.value:[]}),[n.value,O,m]);t.useEffect((function(){Array.isArray(n.value)&&x.length===n.value.length||r(c({},n,{value:x.map(HP)}))}),[n,x,r]);var q=t.useCallback((function(e,t){r(c({},n,{value:Le(t.map(HP))}))}),[r,n]);return(0,Cn.jsx)(WC,c({multiple:!0,limitTags:1,options:O,isOptionEqualToValue:lX,filterOptions:pX,id:h,value:x,onChange:q,renderTags:function(e,t){return e.map((function(e,n){return(0,Cn.jsx)(dg,c({variant:"outlined",size:"small",label:y(e)},t({index:n})))}))},renderInput:function(e){var t;return(0,Cn.jsx)(M.components.BaseTextField,c({},e,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:c({},e.InputLabelProps,{shrink:!0}),inputRef:i,type:"singleSelect"},f,null==(t=M.componentsProps)?void 0:t.baseTextField))}},b))}var dX=function(e){return null==e||"object"!==typeof e?e:e.value},bX=c({},cB,{type:"singleSelect",renderEditCell:function(e){return(0,Cn.jsx)(oX,c({},e))},filterOperators:[{value:"is",getApplyFilterFn:function(e){return null==e.value||""===e.value?null:function(t){var n=t.value;return dX(n)===dX(e.value)}},InputComponent:sX},{value:"not",getApplyFilterFn:function(e){return null==e.value||""===e.value?null:function(t){var n=t.value;return dX(n)!==dX(e.value)}},InputComponent:sX},{value:"isAnyOf",getApplyFilterFn:function(e){if(!Array.isArray(e.value)||0===e.value.length)return null;var t=e.value.map(dX);return function(e){var n=e.value;return t.includes(dX(n))}},InputComponent:uX}],getApplyQuickFilterFn:function(e,t,n){if(!e)return null;var r=t.valueOptions,o=t.valueFormatter,i=t.field,a=[dX(e).toString()],s="function"===typeof r?r({field:i}):r||[];return s&&s.forEach((function(t){var r,s;"object"===typeof t?(r=t.value,s=t.label):(r=t,s=o?o({value:t,field:i,api:n.current}):t),s.slice(0,e.length).toLowerCase()===e.toLowerCase()&&(a.includes(r)||a.push(r.toString()))})),function(e){var t=e.value;return null!=t&&a.includes(dX(t).toString())}}}),fX="__default__",hX=function(){var e;return ne(e={string:cB,number:HB,date:tX,dateTime:nX,boolean:MB,singleSelect:bX},EB,TB),ne(e,fX,cB),e},MX=["maxWidth","minWidth","width","flex"],zX=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c({},hX());return Object.entries(e).forEach((function(e){var n=s(e,2),r=n[0],o=n[1];t[r]?t[r]=c({},t[r],o):t[r]=c({},t[o.extendType||fX],o)})),t};var OX,mX=function(e,t){var n={},r=0,o=0,i=[];e.all.forEach((function(t){var a,s=c({},e.lookup[t]);!1===e.columnVisibilityModel[t]?s.computedWidth=0:(s.flex&&s.flex>0?(r+=s.flex,a=0,i.push(s)):a=cN(s.width,s.minWidth,s.maxWidth),o+=a,s.computedWidth=a);n[t]=s}));var a=Math.max(t-o,0);if(r>0&&t>0){var s=function(e){var t=e.initialFreeSpace,n=e.totalFlexUnits,r=e.flexColumns,o={all:{},frozenFields:[],freeze:function(e){var t=o.all[e];t&&!0!==t.frozen&&(o.all[e].frozen=!0,o.frozenFields.push(e))}};return function e(){if(o.frozenFields.length!==r.length){var i={min:{},max:{}},a=t,s=n,c=0;o.frozenFields.forEach((function(e){a-=o.all[e].computedWidth,s-=o.all[e].flex}));for(var l=0;lp.maxWidth&&(c+=p.maxWidth-u,u=p.maxWidth,i.max[p.field]=!0),o.all[p.field]={frozen:!1,computedWidth:u,flex:p.flex}}}c<0?Object.keys(i.max).forEach((function(e){o.freeze(e)})):c>0?Object.keys(i.min).forEach((function(e){o.freeze(e)})):r.forEach((function(e){var t=e.field;o.freeze(t)})),e()}}(),o.all}({initialFreeSpace:a,totalFlexUnits:r,flexColumns:i});Object.keys(s).forEach((function(e){n[e].computedWidth=s[e].computedWidth}))}return c({},e,{lookup:n})},gX=function(e){var t,n,r,o,i,a=e.apiRef,l=e.columnsToUpsert,p=e.initialState,u=e.columnTypes,d=e.currentColumnVisibilityModel,b=void 0===d?KE(a):d,f=e.shouldRegenColumnVisibilityModelFromColumns,h=e.keepOnlyColumnsToUpsert,M=void 0!==h&&h,z=!a.current.state.columns;if(z)i={all:[],lookup:{}};else{var O=VE(a.current.state);i={all:M?[]:Le(O.all),lookup:c({},O.lookup)}}var m={};M&&!z&&(m=Object.keys(i.lookup).reduce((function(e,t){return c({},e,ne({},t,!1))}),{}));var g={};l.forEach((function(e){var t=e.field;g[t]=!0,m[t]=!0;var n=i.lookup[t];null==n?(n=c({},function(e,t){return t&&e[t]?e[t]:e.__default__}(u,e.type),{field:t,hasBeenResized:!1}),i.all.push(t)):M&&i.all.push(t);var r=n.hasBeenResized;MX.forEach((function(t){void 0!==e[t]&&(r=!0,-1===e[t]&&(e[t]=1/0))})),i.lookup[t]=c({},n,{hide:null!=e.hide&&e.hide},e,{hasBeenResized:r})})),M&&!z&&Object.keys(i.lookup).forEach((function(e){m[e]||delete i.lookup[e]}));var v=c({},i.lookup),A=a.current.unstable_applyPipeProcessors("hydrateColumns",i),y={};if(f){var x=!1,q=c({},b);z?A.all.forEach((function(e){q[e]=!i.lookup[e].hide})):M&&Object.keys(q).forEach((function(e){A.lookup[e]||(delete q[e],x=!0)})),A.all.forEach((function(e){if(g[e]||v[e]!==A.lookup[e]){var t=b[e];if(void 0===t)if(z)t=!0;else t=!!VE(a.current.state).lookup[e];var n=!A.lookup[e].hide;n!==t&&(x=!0,q[e]=n)}})),y=x||z?q:b}else y=b;var w=function(e,t){if(!t)return e;var n=t.orderedFields,r=void 0===n?[]:n,o=t.dimensions,i=void 0===o?{}:o,a=Object.keys(i);if(0===a.length&&0===r.length)return e;for(var l={},p=[],u=0;u2&&void 0!==arguments[2]?arguments[2]:"A row was provided without id in the rows prop:";if(null==e)throw new Error(["MUI: The data grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join("\n"))}(r,e,n),r},WX=function(e){for(var t=e.rows,n=e.getRowId,r={rowsBeforePartialUpdates:t,loadingPropBeforePartialUpdates:e.loading,idRowsLookup:{},idToIdLookup:{},ids:[]},o=0;o0?a.current=setTimeout(o,s):o()}else o()}),[n.throttleRowsMs,n.rowCount,n.loading,e]),d=t.useCallback((function(e){r.debug("Updating all rows, new length ".concat(e.length)),u(WX({rows:e,getRowId:n.getRowId,loading:n.loading}),!0)}),[r,n.getRowId,n.loading,u]),b=t.useCallback((function(t){if(n.signature===ON.DataGrid&&t.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));var r=new Map;t.forEach((function(e){var t=wX(e,n.getRowId,"A row was provided without id when calling updateRows():");r.has(t)?r.set(t,c({},r.get(t),e)):r.set(t,e)}));var o=[],i=e.current.unstable_caches.rows,a={rowsBeforePartialUpdates:i.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:i.loadingPropBeforePartialUpdates,idRowsLookup:c({},i.idRowsLookup),idToIdLookup:c({},i.idToIdLookup),ids:Le(i.ids)};r.forEach((function(t,n){return"delete"===t._action?(delete a.idRowsLookup[n],delete a.idToIdLookup[n],void o.push(n)):e.current.getRow(n)?void(a.idRowsLookup[n]=c({},e.current.getRow(n),t)):(a.idRowsLookup[n]=t,a.idToIdLookup[n]=n,void a.ids.push(n))})),o.length>0&&(a.ids=a.ids.filter((function(e){return!o.includes(e)}))),u(a,!0)}),[n.signature,n.getRowId,u,e]),f=t.useCallback((function(){var t=AT(e),n=zT(e);return new Map(t.map((function(e){return[e,n[e]]})))}),[e]),h=t.useCallback((function(){return fT(e)}),[e]),M=t.useCallback((function(){return AT(e)}),[e]),z=t.useCallback((function(e){return p[e]}),[p]),O=t.useCallback((function(t,n){var r=e.current.getRowNode(t);if(!r)throw new Error("MUI: No row with id #".concat(t," found"));var o=c({},r,{childrenExpanded:n});e.current.setState((function(e){return c({},e,{rows:c({},e.rows,{tree:c({},e.rows.tree,ne({},t,o))})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",o)}),[e]),m=t.useCallback((function(t){var n;return null!=(n=mT(e)[t])?n:null}),[e]),g=t.useCallback((function(t){var n,r=t.skipAutoGeneratedRows,o=void 0===r||r,i=t.groupId,a=t.applySorting,s=t.applyFiltering,c=mT(e);if(a){var l=c[i];if(!l)return[];var p=BT(e);n=[];for(var u=p.findIndex((function(e){return e===i}))+1,d=u;dl.depth;d+=1){var b=p[d],f=c[b];o&&f.isAutoGenerated||n.push(b)}}else n=CX(c,i,o);if(s){var h=VT(e);n=n.filter((function(e){return!1!==h[e]}))}return n}),[e]),v={getRow:l,getRowModels:f,getRowsCount:h,getAllRowIds:M,setRows:d,setRowIndex:t.useCallback((function(t,n){var o=AT(e),i=o.findIndex((function(e){return e===t}));if(-1!==i&&i!==n){r.debug("Moving row ".concat(t," to index ").concat(n));var a=Le(o);a.splice(n,0,a.splice(i,1)[0]),e.current.setState((function(e){return c({},e,{rows:c({},e.rows,{ids:a})})})),e.current.publishEvent("rowsSet")}}),[e,r]),updateRows:b,setRowChildrenExpansion:O,getRowNode:m,getRowIndexRelativeToVisibleRows:z,getRowGroupChildren:g,unstable_replaceRows:t.useCallback((function(t,r){if(n.signature===ON.DataGrid&&r.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0!==r.length){var o=Le(AT(e)),i=zT(e),a=OT(e),l=mT(e),p=c({},i),u=c({},a),d=c({},l),b=r.map((function(e){return{id:wX(e,n.getRowId,"A row was provided without id when calling replaceRows()."),model:e}}));b.forEach((function(e,n){var r=s(o.splice(t+n,1,e.id),1)[0];delete p[r],delete u[r],delete d[r]})),b.forEach((function(e){var t={id:e.id,parent:null,depth:0,groupingKey:null,groupingField:null};p[e.id]=e.model,u[e.id]=e.id,d[e.id]=t})),e.current.setState((function(e){return c({},e,{rows:c({},e.rows,{idRowsLookup:p,idToIdLookup:u,tree:d,ids:o})})})),e.current.publishEvent("rowsSet")}}),[e,n.signature,n.getRowId])},A=t.useCallback((function(){var t;r.info("Row grouping pre-processing have changed, regenerating the row tree"),t=e.current.unstable_caches.rows.rowsBeforePartialUpdates===n.rows?e.current.unstable_caches.rows:WX({rows:n.rows,getRowId:n.getRowId,loading:n.loading}),u(t,!1)}),[r,e,n.rows,n.getRowId,n.loading,u]),y=t.useCallback((function(e){"rowTreeCreation"===e&&A()}),[A]),x=t.useCallback((function(){e.current.unstable_getActiveStrategy("rowTree")!==gT(e)&&A()}),[e,A]);xN(e,"activeStrategyProcessorChange",y),xN(e,"strategyAvailabilityChange",x);var q=t.useCallback((function(){e.current.setState((function(t){return c({},t,{rows:c({},t.rows,e.current.unstable_applyPipeProcessors("hydrateRows",t.rows.groupingResponseBeforeRowHydration))})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()}),[e]);IB(e,"hydrateRows",q),zN(e,v),t.useEffect((function(){return function(){null!==a.current&&clearTimeout(a.current)}}),[]);var w=t.useRef(!0);t.useEffect((function(){if(w.current)w.current=!1;else{var t=e.current.unstable_caches.rows.rowsBeforePartialUpdates===n.rows,o=e.current.unstable_caches.rows.loadingPropBeforePartialUpdates===n.loading;t?o||(e.current.setState((function(e){return c({},e,{rows:c({},e.rows,{loading:n.loading})})})),e.current.unstable_caches.rows.loadingPropBeforePartialUpdates=n.loading,e.current.forceUpdate()):(r.debug("Updating all rows, new length ".concat(n.rows.length)),u(WX({rows:n.rows,getRowId:n.getRowId,loading:n.loading}),!1))}}),[n.rows,n.rowCount,n.getRowId,n.loading,r,u,e])},TX=function(e){return e.editRows};!function(e){e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown"}(SX||(SX={})),function(e){e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown"}(kX||(kX={}));var NX,PX,BX=["id","field"],XX=["id","field"],jX=IE(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#persistence."],"error");!function(e){e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown"}(NX||(NX={})),function(e){e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown"}(PX||(PX={}));var IX=["id"],DX=["id"],FX=IE(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#persistence."],"error"),HX=function(e){return c({},e,{editRows:{}})},VX=function(e,n){!function(e,n){var r=s(t.useState({}),2),o=r[0],i=r[1],a=t.useRef(o),l=t.useRef({}),p=n.processRowUpdate,u=n.onProcessRowUpdateError,d=n.cellModesModel,b=n.onCellModesModelChange,f=n.signature,h=function(e){return function(){n.editMode===xB.Cell&&e.apply(void 0,arguments)}},M=t.useCallback((function(t,n){var r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error("MUI: The cell with id=".concat(t," and field=").concat(n," is not editable."))}),[e]),z=t.useCallback((function(t,n,r){if(e.current.getCellMode(t,n)!==r)throw new Error("MUI: The cell with id=".concat(t," and field=").concat(n," is not in ").concat(r," mode."))}),[e]),O=t.useCallback((function(t,n){if(t.isEditable&&t.cellMode!==qB.Edit){var r=c({},t,{reason:SX.cellDoubleClick});e.current.publishEvent("cellEditStart",r,n)}}),[e]),m=t.useCallback((function(t,n){if(t.cellMode!==qB.View&&e.current.getCellMode(t.id,t.field)!==qB.View){var r=c({},t,{reason:kX.cellFocusOut});e.current.publishEvent("cellEditStop",r,n)}}),[e]),g=t.useCallback((function(t,n){if(t.cellMode===qB.Edit){if(229===n.which)return;var r;if("Escape"===n.key?r=kX.escapeKeyDown:"Enter"===n.key?r=kX.enterKeyDown:"Tab"===n.key&&(r=n.shiftKey?kX.shiftTabKeyDown:kX.tabKeyDown,n.preventDefault()),r){var o=c({},t,{reason:r});e.current.publishEvent("cellEditStop",o,n)}}else if(t.isEditable){var i;if(" "===n.key&&n.shiftKey)return;if(KN(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?i=SX.printableKeyDown:"Enter"===n.key?i=SX.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(i=SX.deleteKeyDown),i){var a=c({},t,{reason:i,key:n.key});e.current.publishEvent("cellEditStart",a,n)}}}),[e]),v=t.useCallback((function(n){var r=n.id,o=n.field,i=n.reason,a=n.key,s={id:r,field:o};i===SX.printableKeyDown?t.version.startsWith("18")?s.initialValue=a:s.deleteValue=!0:i===SX.deleteKeyDown&&(s.deleteValue=!0),e.current.startCellEditMode(s)}),[e]),A=t.useCallback((function(t){var r,o=t.id,i=t.field,a=t.reason;e.current.unstable_runPendingEditCellValueMutation(o,i),a===kX.enterKeyDown?r="below":a===kX.tabKeyDown?r="right":a===kX.shiftTabKeyDown&&(r="left");var s="escapeKeyDown"===a;TX(e.current.state)[o][i].isProcessingProps&&!n.disableIgnoreModificationsIfProcessingProps&&(s=!0),e.current.stopCellEditMode({id:o,field:i,ignoreModifications:s,cellToFocusAfter:r})}),[e,n.disableIgnoreModificationsIfProcessingProps]);xN(e,"cellDoubleClick",h(O)),xN(e,"cellFocusOut",h(m)),xN(e,"cellKeyDown",h(g)),xN(e,"cellEditStart",h(v)),xN(e,"cellEditStop",h(A)),wN(e,"cellEditStart",n.onCellEditStart),wN(e,"cellEditStop",n.onCellEditStop);var y=t.useCallback((function(t,n){var r=TX(e.current.state);return r[t]&&r[t][n]?qB.Edit:qB.View}),[e]),x=Hh((function(t){var r=t!==n.cellModesModel;if(b&&r){var o=f===ON.DataGridPro?{api:e.current}:{};b(t,o)}n.cellModesModel&&r||(i(t),a.current=t,e.current.publishEvent("cellModesModelChange",t))})),q=t.useCallback((function(e,t,n){var r=c({},a.current);if(null!==n)r[e]=c({},r[e],ne({},t,c({},n)));else{var o=Qe(r[e],[t].map(_N));r[e]=o,0===Object.keys(r[e]).length&&delete r[e]}x(r)}),[x]),w=t.useCallback((function(t,n,r){e.current.setState((function(e){var o=c({},e.editRows);return null!==r?o[t]=c({},o[t],ne({},n,c({},r))):(delete o[t][n],0===Object.keys(o[t]).length&&delete o[t]),c({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),W=t.useCallback((function(e){var t=e.id,n=e.field,r=Qe(e,BX);M(t,n),z(t,n,qB.View),q(t,n,c({mode:qB.Edit},r))}),[M,z,q]),R=Hh((function(t){var n=t.id,r=t.field,o=t.deleteValue,i=t.initialValue,a=e.current.getCellValue(n,r);(o||i)&&(a=o?"":i),w(n,r,{value:a,error:!1,isProcessingProps:!1}),e.current.setCellFocus(n,r)})),C=t.useCallback((function(e){var t=e.id,n=e.field,r=Qe(e,XX);z(t,n,qB.Edit),q(t,n,c({mode:qB.View},r))}),[z,q]),_=Hh(function(){var t=lb(sb().mark((function t(n){var r,o,i,a,s,c,d,b,f,h,M,O,m;return sb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.id,o=n.field,i=n.ignoreModifications,a=n.cellToFocusAfter,s=void 0===a?"none":a,z(r,o,qB.Edit),e.current.unstable_runPendingEditCellValueMutation(r,o),c=function(){w(r,o,null),q(r,o,null),"none"!==s&&e.current.unstable_moveFocusToRelativeCell(r,o,s)},!i){t.next=7;break}return c(),t.abrupt("return");case 7:if(d=TX(e.current.state),b=d[r][o],f=b.error,h=b.isProcessingProps,!f&&!h){t.next=13;break}return l.current[r][o].mode=qB.Edit,q(r,o,{mode:qB.Edit}),t.abrupt("return");case 13:if(M=e.current.unstable_getRowWithUpdatedValuesFromCellEditing(r,o),p){O=function(e){l.current[r][o].mode=qB.Edit,q(r,o,{mode:qB.Edit}),u?u(e):jX()};try{m=e.current.getRow(r),Promise.resolve(p(M,m)).then((function(t){e.current.updateRows([t]),c()})).catch(O)}catch(g){O(g)}}else e.current.updateRows([M]),c();case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),S=t.useCallback(function(){var t=lb(sb().mark((function t(n){var r,o,i,a,s,l,p,u,d,b,f,h,O;return sb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.id,a=n.field,s=n.value,l=n.debounceMs,p=n.unstable_skipValueParser,M(i,a),z(i,a,qB.Edit),u=e.current.getColumn(a),d=e.current.getRow(i),b=s,u.valueParser&&!p&&(b=u.valueParser(s,e.current.getCellParams(i,a))),f=TX(e.current.state),h=c({},f[i][a],{value:b,changeReason:l?"debouncedSetEditCellValue":"setEditCellValue"}),!u.preProcessEditCellProps){t.next=16;break}return O=s!==f[i][a].value,h=c({},h,{isProcessingProps:!0}),w(i,a,h),t.next=15,Promise.resolve(u.preProcessEditCellProps({id:i,row:d,props:h,hasChanged:O}));case 15:h=t.sent;case 16:if(e.current.getCellMode(i,a)!==qB.View){t.next=18;break}return t.abrupt("return",!1);case 18:return f=TX(e.current.state),(h=c({},h,{isProcessingProps:!1})).value=u.preProcessEditCellProps?f[i][a].value:b,w(i,a,h),f=TX(e.current.state),t.abrupt("return",!(null!=(r=f[i])&&null!=(o=r[a])&&o.error));case 24:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[e,M,z,w]),k=t.useCallback((function(t,n){var r=e.current.getColumn(n),o=TX(e.current.state)[t][n].value,i=e.current.getRow(t);return r.valueSetter?r.valueSetter({value:o,row:i}):c({},i,ne({},n,o))}),[e]);zN(e,{getCellMode:y,startCellEditMode:W,stopCellEditMode:C,unstable_setCellEditingEditCellValue:S,unstable_getRowWithUpdatedValuesFromCellEditing:k}),t.useEffect((function(){d&&x(d)}),[d,x]),t.useEffect((function(){var t=OT(e),n=l.current;l.current=uN(o),Object.entries(o).forEach((function(e){var r=s(e,2),o=r[0],i=r[1];Object.entries(i).forEach((function(e){var r,i,a,l=s(e,2),p=l[0],u=l[1],d=(null==(r=n[o])||null==(i=r[p])?void 0:i.mode)||qB.View,b=null!=(a=t[o])?a:o;u.mode===qB.Edit&&d===qB.View?R(c({id:b,field:p},u)):u.mode===qB.View&&d===qB.Edit&&_(c({id:b,field:p},u))}))}))}),[e,o,R,_])}(e,n),function(e,n){var r=s(t.useState({}),2),o=r[0],i=r[1],a=t.useRef(o),l=t.useRef({}),p=t.useRef(null),u=t.useRef(null),d=n.processRowUpdate,b=n.onProcessRowUpdateError,f=n.rowModesModel,h=n.onRowModesModelChange,M=n.signature,z=function(e){return function(){n.editMode===xB.Row&&e.apply(void 0,arguments)}},O=t.useCallback((function(t,n){var r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error("MUI: The cell with id=".concat(t," and field=").concat(n," is not editable."))}),[e]),m=t.useCallback((function(t,n){if(e.current.getRowMode(t)!==n)throw new Error("MUI: The row with id=".concat(t," is not in ").concat(n," mode."))}),[e]),g=t.useCallback((function(t,n){if(t.isEditable&&e.current.getRowMode(t.id)!==wB.Edit){var r=c({},e.current.getRowParams(t.id),{field:t.field,reason:NX.cellDoubleClick});e.current.publishEvent("rowEditStart",r,n)}}),[e]),v=t.useCallback((function(e){u.current=e}),[]),A=t.useCallback((function(t,n){t.isEditable&&e.current.getRowMode(t.id)!==wB.View&&(u.current=null,p.current=setTimeout((function(){var r;if(p.current=null,(null==(r=u.current)?void 0:r.id)!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===wB.View)return;var o=c({},e.current.getRowParams(t.id),{field:t.field,reason:PX.rowFocusOut});e.current.publishEvent("rowEditStop",o,n)}})))}),[e]);t.useEffect((function(){return function(){clearTimeout(p.current)}}),[]);var y=t.useCallback((function(t,n){if(t.cellMode===wB.Edit){if(229===n.which)return;var r;if("Escape"===n.key)r=PX.escapeKeyDown;else if("Enter"===n.key)r=PX.enterKeyDown;else if("Tab"===n.key){var o=UE(e).filter((function(n){return e.current.isCellEditable(e.current.getCellParams(t.id,n))}));n.shiftKey?t.field===o[0]&&(r=PX.shiftTabKeyDown):t.field===o[o.length-1]&&(r=PX.tabKeyDown),r&&n.preventDefault()}if(r){var i=c({},e.current.getRowParams(t.id),{reason:r,field:t.field});e.current.publishEvent("rowEditStop",i,n)}}else if(t.isEditable){var a;if(" "===n.key&&n.shiftKey)return;if(KN(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?a=NX.printableKeyDown:"Enter"===n.key?a=NX.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(a=NX.deleteKeyDown),a){var s=c({},e.current.getRowParams(t.id),{field:t.field,key:n.key,reason:a});e.current.publishEvent("rowEditStart",s,n)}}}),[e]),x=t.useCallback((function(n){var r=n.id,o=n.field,i=n.reason,a=n.key,s={id:r,fieldToFocus:o};i===NX.printableKeyDown?t.version.startsWith("18")?s.initialValue=a:s.deleteValue=!!o:i===NX.deleteKeyDown&&(s.deleteValue=!!o),e.current.startRowEditMode(s)}),[e]),q=t.useCallback((function(t){var r,o=t.id,i=t.reason,a=t.field;e.current.unstable_runPendingEditCellValueMutation(o),i===PX.enterKeyDown?r="below":i===PX.tabKeyDown?r="right":i===PX.shiftTabKeyDown&&(r="left");var s="escapeKeyDown"===i,c=TX(e.current.state);s||n.disableIgnoreModificationsIfProcessingProps||(s=Object.values(c[o]).some((function(e){return e.isProcessingProps}))),e.current.stopRowEditMode({id:o,ignoreModifications:s,field:a,cellToFocusAfter:r})}),[e,n.disableIgnoreModificationsIfProcessingProps]);xN(e,"cellDoubleClick",z(g)),xN(e,"cellFocusIn",z(v)),xN(e,"cellFocusOut",z(A)),xN(e,"cellKeyDown",z(y)),xN(e,"rowEditStart",z(x)),xN(e,"rowEditStop",z(q)),wN(e,"rowEditStart",n.onRowEditStart),wN(e,"rowEditStop",n.onRowEditStop);var w=t.useCallback((function(t){if(n.editMode===xB.Cell)return wB.View;var r=TX(e.current.state);return r[t]&&Object.keys(r[t]).length>0?wB.Edit:wB.View}),[e,n.editMode]),W=Hh((function(t){var r=t!==n.rowModesModel;if(h&&r){var o=M===ON.DataGridPro?{api:e.current}:{};h(t,o)}n.rowModesModel&&r||(i(t),a.current=t,e.current.publishEvent("rowModesModelChange",t))})),R=t.useCallback((function(e,t){var n=c({},a.current);null!==t?n[e]=c({},t):delete n[e],W(n)}),[W]),C=t.useCallback((function(t,n){e.current.setState((function(e){var r=c({},e.editRows);return null!==n?r[t]=n:delete r[t],c({},e,{editRows:r})})),e.current.forceUpdate()}),[e]),_=t.useCallback((function(t,n,r){e.current.setState((function(e){var o=c({},e.editRows);return null!==r?o[t]=c({},o[t],ne({},n,c({},r))):(delete o[t][n],0===Object.keys(o[t]).length&&delete o[t]),c({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),S=t.useCallback((function(e){var t=e.id,n=Qe(e,IX);m(t,wB.View),R(t,c({mode:wB.Edit},n))}),[m,R]),k=Hh((function(t){var n=t.id,r=t.fieldToFocus,o=t.deleteValue,i=t.initialValue,a=UE(e).reduce((function(t,a){if(!e.current.getCellParams(n,a).isEditable)return t;var s=e.current.getCellValue(n,a);return r===a&&(o||i)&&(s=o?"":i),t[a]={value:s,error:!1,isProcessingProps:!1},t}),{});C(n,a),r&&e.current.setCellFocus(n,r)})),L=t.useCallback((function(e){var t=e.id,n=Qe(e,DX);m(t,wB.Edit),R(t,c({mode:wB.View},n))}),[m,R]),E=Hh((function(t){var n=t.id,r=t.ignoreModifications,o=t.field,i=t.cellToFocusAfter,a=void 0===i?"none":i;e.current.unstable_runPendingEditCellValueMutation(n);var s=function(){"none"!==a&&o&&e.current.unstable_moveFocusToRelativeCell(n,o,a),C(n,null),R(n,null)};if(r)s();else{var c=TX(e.current.state),p=e.current.getRow(n);if(Object.values(c[n]).some((function(e){return e.isProcessingProps})))l.current[n].mode=wB.Edit;else{if(Object.values(c[n]).some((function(e){return e.error})))return l.current[n].mode=wB.Edit,void R(n,{mode:wB.Edit});var u=e.current.unstable_getRowWithUpdatedValuesFromRowEditing(n);if(d){var f=function(e){l.current[n].mode=wB.Edit,R(n,{mode:wB.Edit}),b?b(e):FX()};try{Promise.resolve(d(u,p)).then((function(t){e.current.updateRows([t]),s()})).catch(f)}catch(h){f(h)}}else e.current.updateRows([u]),s()}}})),T=t.useCallback((function(t){var n=t.id,r=t.field,o=t.value,i=t.debounceMs,a=t.unstable_skipValueParser;O(n,r);var l=e.current.getColumn(r),p=e.current.getRow(n),u=o;l.valueParser&&!a&&(u=l.valueParser(o,e.current.getCellParams(n,r)));var d=TX(e.current.state),b=c({},d[n][r],{value:u,changeReason:i?"debouncedSetEditCellValue":"setEditCellValue"});return l.preProcessEditCellProps||_(n,r,b),new Promise((function(t){var o=[];if(l.preProcessEditCellProps){var i=b.value!==d[n][r].value;b=c({},b,{isProcessingProps:!0}),_(n,r,b);var a=Qe(d[n],[r].map(_N)),f=Promise.resolve(l.preProcessEditCellProps({id:n,row:p,props:b,hasChanged:i,otherFieldsProps:a})).then((function(o){e.current.getRowMode(n)!==wB.View?(d=TX(e.current.state),(o=c({},o,{isProcessingProps:!1})).value=l.preProcessEditCellProps?d[n][r].value:u,_(n,r,o)):t(!1)}));o.push(f)}Object.entries(d[n]).forEach((function(i){var a=s(i,2),l=a[0],u=a[1];if(l!==r){var b=e.current.getColumn(l);if(b.preProcessEditCellProps){u=c({},u,{isProcessingProps:!0}),_(n,l,u);var f=Qe((d=TX(e.current.state))[n],[l].map(_N)),h=Promise.resolve(b.preProcessEditCellProps({id:n,row:p,props:u,hasChanged:!1,otherFieldsProps:f})).then((function(r){e.current.getRowMode(n)!==wB.View?(r=c({},r,{isProcessingProps:!1}),_(n,l,r)):t(!1)}));o.push(h)}}})),Promise.all(o).then((function(){e.current.getRowMode(n)===wB.Edit?(d=TX(e.current.state),t(!d[n][r].error)):t(!1)}))}))}),[e,O,_]),N=t.useCallback((function(t){var n=TX(e.current.state),r=c({},e.current.getRow(t));return Object.entries(n[t]).forEach((function(t){var n=s(t,2),o=n[0],i=n[1],a=e.current.getColumn(o);a.valueSetter?r=a.valueSetter({value:i.value,row:r}):r[o]=i.value})),r}),[e]);zN(e,{getRowMode:w,startRowEditMode:S,stopRowEditMode:L,unstable_setRowEditingEditCellValue:T,unstable_getRowWithUpdatedValuesFromRowEditing:N}),t.useEffect((function(){f&&W(f)}),[f,W]),t.useEffect((function(){var t=OT(e),n=l.current;l.current=uN(o),Object.entries(o).forEach((function(e){var r,o,i=s(e,2),a=i[0],l=i[1],p=(null==(r=n[a])?void 0:r.mode)||wB.View,u=null!=(o=t[a])?o:a;l.mode===wB.Edit&&p===wB.View?k(c({id:u},l)):l.mode===wB.View&&p===wB.Edit&&E(c({id:u},l))}))}),[e,o,k,E])}(e,n);var r=t.useRef({}),o=n.isCellEditable,i=t.useCallback((function(e){return!e.rowNode.isAutoGenerated&&(!!e.colDef.editable&&(!!e.colDef.renderEditCell&&(o?o(e):!e.rowNode.isPinned)))}),[o]);t.useEffect((function(){var e=r.current;return function(){Object.entries(e).forEach((function(t){var n=s(t,2),r=n[0],o=n[1];Object.keys(o).forEach((function(t){var n=s(e[r][t],1)[0];clearTimeout(n),delete e[r][t]}))}))}}),[]);var a=t.useCallback((function(e,t){if(r.current[e])if(t){if(r.current[e][t]){(0,s(r.current[e][t],2)[1])()}}else Object.keys(r.current[e]).forEach((function(t){(0,s(r.current[e][t],2)[1])()}))}),[]),l=t.useCallback((function(t){var o=t.id,i=t.field,a=t.debounceMs;return new Promise((function(c){!function(e,t,n,o){if(n){if(r.current[e]||(r.current[e]={}),r.current[e][t]){var i=s(r.current[e][t],1)[0];clearTimeout(i)}var a=setTimeout((function(){o(),delete r.current[e][t]}),n);r.current[e][t]=[a,function(){var n=s(r.current[e][t],1)[0];clearTimeout(n),o(),delete r.current[e][t]}]}else o()}(o,i,a,lb(sb().mark((function r(){var a,s;return sb().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=n.editMode===xB.Row?e.current.unstable_setRowEditingEditCellValue:e.current.unstable_setCellEditingEditCellValue,e.current.getCellMode(o,i)!==qB.Edit){r.next=6;break}return r.next=4,a(t);case 4:s=r.sent,c(s);case 6:case"end":return r.stop()}}),r)}))))}))}),[e,n.editMode]),p=t.useCallback((function(t,r){return n.editMode===xB.Cell?e.current.unstable_getRowWithUpdatedValuesFromCellEditing(t,r):e.current.unstable_getRowWithUpdatedValuesFromRowEditing(t)}),[e,n.editMode]),u=t.useCallback((function(t,n){return{changeReason:TX(e.current.state)[t][n].changeReason}}),[e]);zN(e,{isCellEditable:i,setEditCellValue:l,unstable_runPendingEditCellValueMutation:a,unstable_getRowWithUpdatedValues:p,unstable_getEditCellMeta:u})};function UX(e){return"function"===typeof e.then}var GX=function(e){return c({},e,{editRows:{}})};function YX(e,n){var r,o=RT(e,"useGridEditRows");!function(e,n){var r,o=RT(e,"useGridEditRows"),i=function(e){return function(){n.editMode===xB.Cell&&e.apply(void 0,arguments)}},a=t.useCallback((function(t,n,r){e.current.getCellMode(t,n)!==r&&(o.debug("Switching cell id: ".concat(t," field: ").concat(n," to mode: ").concat(r)),e.current.setState((function(o){var i=c({},o.editRows);return i[t]=c({},i[t]),r===qB.Edit?i[t][n]={value:e.current.getCellValue(t,n)}:(delete i[t][n],Object.keys(i[t]).length||delete i[t]),c({},o,{editRows:i})})),e.current.forceUpdate(),e.current.publishEvent("cellModeChange",e.current.getCellParams(t,n)))}),[e,o]),s=t.useCallback((function(t,n){var r=TX(e.current.state);return r[t]&&r[t][n]?qB.Edit:qB.View}),[e]),l=t.useCallback((function(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.id,a=t.field;e.current.unstable_runPendingEditCellValueMutation(i,a);var s=e.current.getEditRowsModel();if(!s[i]||!s[i][a])throw new Error("MUI: Cell at id: ".concat(i," and field: ").concat(a," is not in edit mode."));var l=s[i][a],p=e.current.getColumn(a),u=e.current.getRow(i);if(null!=(r=n.experimentalFeatures)&&r.preventCommitWhileValidating){var d=s[i][a];if(d.isValidating||d.error)return!1}var b=c({},t,{value:l.value}),f=!!l.error;if(!f&&"function"===typeof p.preProcessEditCellProps){var h=p.preProcessEditCellProps({id:i,row:u,props:l});if(UX(h))return h.then((function(t){return e.current.unstable_setEditCellProps({id:i,field:a,props:t}),!t.error&&(e.current.publishEvent("cellEditCommit",b,o),!0)}));e.current.unstable_setEditCellProps({id:i,field:a,props:h}),f=!!h.error}return!f&&(e.current.publishEvent("cellEditCommit",b,o),!0)}),[e,null==(r=n.experimentalFeatures)?void 0:r.preventCommitWhileValidating]),p=t.useCallback((function(t){var n=e.current.getColumn(t.field),r=e.current.getRow(t.id);return new Promise((function(o){var i={value:t.value},a=e.current.getEditRowsModel()[t.id][t.field];if("function"!==typeof n.preProcessEditCellProps)return e.current.unstable_setEditCellProps(c({},t,{props:i})),void o(!0);i=e.current.unstable_setEditCellProps(c({},t,{props:c({},a,{isValidating:!0})})),Promise.resolve(n.preProcessEditCellProps({id:t.id,row:r,props:c({},i,{value:e.current.unstable_parseValue(t.id,t.field,t.value)})})).then((function(n){e.current.unstable_setEditCellProps(c({},t,{props:c({},n,{isValidating:!1})})),o(!n.error)}))}))}),[e]);zN(e,{setCellMode:a,getCellMode:s,commitCellChange:l,unstable_setCellEditingEditCellValue:p});var u=t.useCallback(function(){var t=lb(sb().mark((function t(n,r){var o,i,a,s,c,l;return sb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(229!==r.which){t.next=2;break}return t.abrupt("return");case 2:if(o=n.id,i=n.field,a=n.cellMode,n.isEditable){t.next=5;break}return t.abrupt("return");case 5:if(s=a===qB.Edit,c=r.ctrlKey||r.metaKey||r.altKey,s||!JN(r)||c||" "===r.key&&r.shiftKey||e.current.publishEvent("cellEditStart",n,r),!s&&YN(r.key)&&(e.current.setEditCellValue({id:o,field:i,value:""}),e.current.commitCellChange({id:o,field:i},r),e.current.publishEvent("cellEditStop",n,r)),!s||!ZN(r.key)){t.next=16;break}return l={id:o,field:i},t.next=13,e.current.commitCellChange(l,r);case 13:if(t.sent){t.next=16;break}return t.abrupt("return");case 16:s&&(p=r.key,QN.indexOf(p)>-1)&&e.current.publishEvent("cellEditStop",n,r);case 17:case"end":return t.stop()}var p}),t)})));return function(e,n){return t.apply(this,arguments)}}(),[e]),d=t.useCallback((function(t,n){t.isEditable&&e.current.publishEvent("cellEditStart",t,n)}),[e]),b=function(){var t=lb(sb().mark((function t(n,r){return sb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.cellMode!==qB.View){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.current.commitCellChange(n,r);case 4:e.current.publishEvent("cellEditStop",n,r);case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),f=oO((function(e,t){b(e,t)})),h=oO((function(){var t=aP(e);if(t){var n=e.current.getCellParams(t.id,t.field);b(n,{})}})),M=t.useCallback((function(t,n){t.isEditable&&(e.current.setCellMode(t.id,t.field,qB.Edit),tP(n)&&KN(n)&&e.current.unstable_setEditCellProps({id:t.id,field:t.field,props:{value:""}}))}),[e]),z=t.useCallback((function(t,n){e.current.setCellMode(t.id,t.field,qB.View),tP(n)&&(ZN(n.key)?e.current.publishEvent("cellNavigationKeyDown",t,n):("Escape"===n.key||YN(n.key))&&e.current.setCellFocus(t.id,t.field))}),[e]),O=t.useCallback((function(t){var n=t.id,r=t.field,i=e.current.getEditRowsModel()[n][r].value;o.debug("Setting cell id: ".concat(n," field: ").concat(r," to value: ").concat(null==i?void 0:i.toString()));var a=e.current.getRow(n);if(a){var s=e.current.getColumn(t.field),l=c({},a,ne({},r,i));s.valueSetter&&(l=s.valueSetter({row:a,value:i})),e.current.updateRows([l])}}),[e,o]),m=t.useCallback((function(t){var n=e.current.getRow(t.id),r=e.current.getColumn(t.field),o=r.preProcessEditCellProps?r.preProcessEditCellProps({id:t.id,row:n,props:t.props}):t.props;UX(o)?o.then((function(n){e.current.unstable_setEditCellProps(c({},t,{props:n}))})):e.current.unstable_setEditCellProps(c({},t,{props:o}))}),[e]);xN(e,"cellKeyDown",i(u)),xN(e,"cellDoubleClick",i(d)),xN(e,"cellFocusOut",i(f)),xN(e,"columnHeaderDragStart",i(h)),xN(e,"cellEditStart",i(M)),xN(e,"cellEditStop",i(z)),xN(e,"cellEditCommit",i(O)),xN(e,"editCellPropsChange",i(m)),wN(e,"cellEditCommit",n.onCellEditCommit),wN(e,"cellEditStart",n.onCellEditStart),wN(e,"cellEditStop",n.onCellEditStop)}(e,n),function(e,n){var r,o,i=t.useRef(null),a=t.useRef(null),s=rT(e,YE),l=function(e){return function(){n.editMode===xB.Row&&e.apply(void 0,arguments)}},p=t.useCallback((function(t,n){n!==e.current.getRowMode(t)&&(e.current.setState((function(r){var o=c({},r.editRows);return n===wB.Edit?(o[t]={},s.forEach((function(n){var r=e.current.getCellParams(t,n.field);r.isEditable&&(o[t][n.field]={value:r.value})}))):delete o[t],c({},r,{editRows:o})})),e.current.forceUpdate())}),[e,s]),u=t.useCallback((function(t){return n.editMode===xB.Cell?wB.View:TX(e.current.state)[t]?wB.Edit:wB.View}),[e,n.editMode]),d=t.useCallback((function(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.editMode===xB.Cell)throw new Error("MUI: You can't commit changes when the edit mode is 'cell'.");e.current.unstable_runPendingEditCellValueMutation(t);var i=e.current.getEditRowsModel()[t];if(!i)throw new Error("MUI: Row at id: ".concat(t," is not being edited."));if(null!=(r=n.experimentalFeatures)&&r.preventCommitWhileValidating&&!Object.keys(i).reduce((function(e,t){return e&&!i[t].isValidating&&!i[t].error}),!0))return!1;if(Object.values(i).some((function(e){return!!e.error})))return!1;var a=Object.keys(i).filter((function(t){return"function"===typeof e.current.getColumn(t).preProcessEditCellProps}));if(a.length>0){var s=e.current.getRow(t),c=a.map(function(){var n=lb(sb().mark((function n(r){var o,a;return sb().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=e.current.getColumn(r),n.next=3,Promise.resolve(o.preProcessEditCellProps({id:t,row:s,props:i[r]}));case 3:return a=n.sent,e.current.unstable_setEditCellProps({id:t,field:r,props:a}),n.abrupt("return",a.error);case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}());return Promise.all(c).then((function(n){return!n.some((function(e){return!!e}))&&(e.current.publishEvent("rowEditCommit",t,o),!0)}))}return e.current.publishEvent("rowEditCommit",t,o),!0}),[e,n.editMode,null==(r=n.experimentalFeatures)?void 0:r.preventCommitWhileValidating]),b=t.useCallback((function(t){var n=e.current.getEditRowsModel()[t.id],r=e.current.getRow(t.id),o=!0;return new Promise((function(i){Object.keys(n).forEach(function(){var i=lb(sb().mark((function i(a){var s,l;return sb().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(s=e.current.getColumn(a),l=a===t.field?{value:t.value}:n[a],l=e.current.unstable_setEditCellProps({id:t.id,field:a,props:c({},l,{isValidating:!0})}),!s.preProcessEditCellProps){i.next=7;break}return i.next=6,Promise.resolve(s.preProcessEditCellProps({id:t.id,row:r,props:c({},l,{value:a===t.field?e.current.unstable_parseValue(t.id,a,t.value):l.value})}));case 6:l=i.sent;case 7:l.error&&(o=!1),e.current.unstable_setEditCellProps({id:t.id,field:a,props:c({},l,{isValidating:!1})});case 9:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()),i(o)}))}),[e]);zN(e,{setRowMode:p,getRowMode:u,commitRowChange:d,unstable_setRowEditingEditCellValue:b});var f=t.useCallback(function(){var t=lb(sb().mark((function t(r,o){var i,a,s,c;return sb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(229!==o.which){t.next=2;break}return t.abrupt("return");case 2:if(i=r.cellMode,r.isEditable){t.next=5;break}return t.abrupt("return");case 5:if(a=i===qB.Edit,s=e.current.getRowParams(r.id),!a){t.next=20;break}if("Enter"!==o.key){t.next=17;break}return t.next=11,e.current.commitRowChange(r.id);case 11:if(t.sent||null==(c=n.experimentalFeatures)||!c.preventCommitWhileValidating){t.next=14;break}return t.abrupt("return");case 14:e.current.publishEvent("rowEditStop",s,o),t.next=18;break;case 17:"Escape"===o.key&&e.current.publishEvent("rowEditStop",s,o);case 18:t.next=21;break;case 20:"Enter"===o.key&&e.current.publishEvent("rowEditStart",s,o);case 21:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),[e,null==(o=n.experimentalFeatures)?void 0:o.preventCommitWhileValidating]),h=t.useCallback((function(t,n){if(t.isEditable){var r=e.current.getRowParams(t.id);e.current.publishEvent("rowEditStart",r,n)}}),[e]),M=t.useCallback((function(t){var n=e.current.getRow(t.id),r=e.current.getEditRowsModel()[t.id];Object.keys(r).forEach(function(){var o=lb(sb().mark((function o(i){var a,s,c;return sb().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!(a=e.current.getColumn(i)).preProcessEditCellProps){o.next=9;break}return s=i===t.field?t.props:r[i],o.next=5,Promise.resolve(a.preProcessEditCellProps({id:t.id,row:n,props:s}));case 5:c=o.sent,e.current.unstable_setEditCellProps({id:t.id,field:i,props:c}),o.next=10;break;case 9:i===t.field&&e.current.unstable_setEditCellProps(t);case 10:case"end":return o.stop()}}),o)})));return function(e){return o.apply(this,arguments)}}())}),[e]),z=t.useCallback((function(t){e.current.setRowMode(t.id,wB.Edit)}),[e]),O=t.useCallback((function(t,n){e.current.setRowMode(t.id,wB.View),"Enter"===n.key&&e.current.publishEvent("cellNavigationKeyDown",t,n)}),[e]),m=t.useCallback((function(t){var n=e.current.getEditRowsModel()[t];if(!n)throw new Error("MUI: Row at id: ".concat(t," is not being edited."));var r=e.current.getRow(t);if(r){var o=c({},r);Object.keys(n).forEach((function(t){var r=e.current.getColumn(t),i=n[t].value;r.valueSetter?o=r.valueSetter({row:o,value:i}):o[t]=i})),e.current.updateRows([o])}}),[e]),g=t.useCallback((function(e){a.current=e}),[]),v=function(){var t=lb(sb().mark((function t(n,r){return sb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.cellMode!==qB.View){t.next=2;break}return t.abrupt("return");case 2:a.current=null,i.current=setTimeout(lb(sb().mark((function t(){var o,i;return sb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((null==(o=a.current)?void 0:o.id)===n.id){t.next=5;break}return t.next=3,e.current.commitRowChange(n.id,r);case 3:i=e.current.getRowParams(n.id),e.current.publishEvent("rowEditStop",i,r);case 5:case"end":return t.stop()}}),t)}))));case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),A=oO((function(e,t){v(e,t)})),y=oO((function(){var t=aP(e);if(t){var n=e.current.getCellParams(t.id,t.field);v(n,{})}}));xN(e,"cellKeyDown",l(f)),xN(e,"cellDoubleClick",l(h)),xN(e,"editCellPropsChange",l(M)),xN(e,"rowEditStart",l(z)),xN(e,"rowEditStop",l(O)),xN(e,"rowEditCommit",l(m)),xN(e,"cellFocusIn",l(g)),xN(e,"cellFocusOut",l(A)),xN(e,"columnHeaderDragStart",l(y)),wN(e,"rowEditCommit",n.onRowEditCommit),wN(e,"rowEditStart",n.onRowEditStart),wN(e,"rowEditStop",n.onRowEditStop)}(e,n);var i=t.useRef({});e.current.unstable_registerControlState({stateId:"editRows",propModel:n.editRowsModel,propOnChange:n.onEditRowsModelChange,stateSelector:TX,changeEvent:"editRowsModelChange"});var a=t.useCallback((function(e){return!e.rowNode.isAutoGenerated&&!e.rowNode.isPinned&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!n.isCellEditable||n.isCellEditable(e))}),[n.isCellEditable]),l=function(e,t,n,r){if(n){if(i.current[e]||(i.current[e]={}),i.current[e][t]){var o=s(i.current[e][t],1)[0];clearTimeout(o)}var a=setTimeout((function(){r(),delete i.current[e][t]}),n);i.current[e][t]=[a,function(){r();var n=s(i.current[e][t],1)[0];clearTimeout(n),delete i.current[e][t]}]}else r()},p=t.useCallback((function(e,t){if(i.current[e])if(t){if(i.current[e][t]){(0,s(i.current[e][t],2)[1])()}}else Object.keys(i.current[e]).forEach((function(t){(0,s(i.current[e][t],2)[1])()}))}),[]),u=t.useCallback((function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(t.id,t.field,t.debounceMs,(function(){var o;if(null!=(o=n.experimentalFeatures)&&o.preventCommitWhileValidating)return"row"===n.editMode?e.current.unstable_setRowEditingEditCellValue(t):e.current.unstable_setCellEditingEditCellValue(t);var i={id:t.id,field:t.field,props:{value:t.value}};return e.current.publishEvent("editCellPropsChange",i,r)}))}),[e,n.editMode,null==(r=n.experimentalFeatures)?void 0:r.preventCommitWhileValidating]),d=t.useCallback((function(t,n,r){var o=e.current.getColumn(n);return o.valueParser?o.valueParser(r,e.current.getCellParams(t,n)):r}),[e]),b=t.useCallback((function(t){var n=t.id,r=t.field,i=t.props;return o.debug("Setting cell props on id: ".concat(n," field: ").concat(r)),e.current.setState((function(e){var t=c({},e.editRows);return t[n]=c({},e.editRows[n]),t[n][r]=c({},i,{value:d(n,r,i.value)}),c({},e,{editRows:t})})),e.current.forceUpdate(),TX(e.current.state)[n][r]}),[e,o,d]),f=t.useCallback((function(t){TX(e.current.state)!==t&&(o.debug("Setting editRows model"),e.current.setState((function(e){return c({},e,{editRows:t})})),e.current.forceUpdate())}),[e,o]),h=t.useCallback((function(){return TX(e.current.state)}),[e]),M=t.useCallback((function(e,t){var n=t.detail>1;e.isEditable&&e.cellMode===qB.View&&n&&t.preventDefault()}),[]);xN(e,"cellMouseDown",M),wN(e,"editCellPropsChange",n.onEditCellPropsChange),zN(e,{isCellEditable:a,setEditRowsModel:f,getEditRowsModel:h,setEditCellValue:u,unstable_setEditCellProps:b,unstable_parseValue:d,unstable_runPendingEditCellValueMutation:p}),t.useEffect((function(){void 0!==n.editRowsModel&&e.current.setEditRowsModel(n.editRowsModel)}),[e,n.editRowsModel])}var KX,QX=function(e){return c({},e,{focus:{cell:null,columnHeader:null},tabIndex:{cell:null,columnHeader:null}})},$X="client",JX="server",ZX=function(e,t){var n,r,o,i,a=null!=(n=null!=(r=t.sortModel)?r:null==(o=t.initialState)||null==(i=o.sorting)?void 0:i.sortModel)?n:[];return c({},e,{sorting:{sortModel:ZP(a,t.disableMultipleColumnsSorting),sortedRows:[]}})},ej=function(e){return e.preferencePanel},tj=function(e,t){var n,r;return c({},e,{preferencePanel:null!=(n=null==(r=t.initialState)?void 0:r.preferencePanel)?n:{open:!1}})};!function(e){e.And="and",e.Or="or"}(KX||(KX={}));var nj,rj=function(){return{items:[],linkOperator:KX.And,quickFilterValues:[],quickFilterLogicOperator:KX.And}},oj=function(e,t){var n=c({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operatorValue){var r=GE(t)[n.columnField];n.operatorValue=r&&r.filterOperators[0].value}return n},ij=IE(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),aj=IE("MUI: The 'id' field is required on `filterModel.items` when you use multiple filters.","error"),sj=IE(["MUI: One of your filtering item have no `operatorValue` provided.","This property will become required on `@mui/x-data-grid@6.X`."]),cj=function(e,t,n){var r,o=e.items.length>1;o&&t?(ij(),r=[e.items[0]]):r=e.items;var i=o&&r.some((function(e){return null==e.id})),a=r.some((function(e){return null==e.operatorValue}));return i&&aj(),a&&sj(),a||i?c({},e,{items:r.map((function(e){return oj(e,n)}))}):e.items!==r?c({},e,{items:r}):e},lj=function(e,t,n){return function(r){return c({},r,{filterModel:cj(e,t,n)})}},pj=function(e,t){if(!e.columnField||!e.operatorValue)return null;var n,r=t.current.getColumn(e.columnField);if(!r)return null;if(r.valueParser){var o,i=r.valueParser;n=Array.isArray(e.value)?null==(o=e.value)?void 0:o.map((function(e){return i(e)})):i(e.value)}else n=e.value;var a=c({},e,{value:n}),s=r.filterOperators;if(null==s||!s.length)throw new Error("MUI: No filter operators found for column '".concat(r.field,"'."));var l=s.find((function(e){return e.value===a.operatorValue}));if(!l)throw new Error("MUI: No filter operator found for column '".concat(r.field,"' and operator value '").concat(a.operatorValue,"'."));var p=l.getApplyFilterFn(a,r);if("function"!==typeof p)return null;return{fn:function(e){var n=t.current.getCellParams(e,a.columnField);return p(n)},item:a}},uj=function(e,t){var n=function(e,t){var n=e.items.map((function(e){return pj(e,t)})).filter((function(e){return!!e}));return 0===n.length?null:function(e,t){var r={};return(t?n.filter((function(e){return t(e.item.columnField)})):n).forEach((function(t){r[t.item.id]=t.fn(e)})),r}}(e,t),r=function(e,t){var n=e.quickFilterValues,r=void 0===n?[]:n;if(0===r.length)return null;var o=UE(t),i={};o.forEach((function(e){var n=t.current.getColumn(e),o=null==n?void 0:n.getApplyQuickFilterFn;o&&(i[e]=r.map((function(e){return o(e,n,t)})))}));var a=r.filter((function(e,t){return Object.keys(i).some((function(e){return null!=i[e][t]}))}));return 0===a.length?null:function(e,n){var r={},o=[];Object.keys(i).forEach((function(i){n&&!n(i)||(r[i]=t.current.getCellParams(e,i),o.push(i))}));var s={};return a.forEach((function(e,t){var n=o.some((function(e){var n,o;return null!=i[e][t]&&(null==(n=(o=i[e])[t])?void 0:n.call(o,r[e]))}));s[e]=n})),s}}(e,t);return function(e,t){return{passingFilterItems:n&&n(e,t),passingQuickFilterValues:r&&r(e,t)}}},dj=function(e,t,n,r){var o,i,a=n.items.filter((function(e){return null!==pj(e,r)})),s=e.filter((function(e){return null!=e})),c=t.filter((function(e){return null!=e})),l=null!=(o=n.quickFilterLogicOperator)?o:rj().quickFilterLogicOperator,p=null!=(i=n.linkOperator)?i:rj().linkOperator;if(s.length>0){var u=function(e){return s.some((function(t){return t[e.id]}))};if(p===KX.And){if(!a.every(u))return!1}else if(!a.some(u))return!1}if(c.length>0&&null!=n.quickFilterValues){var d=function(e){return c.some((function(t){return t[e]}))};if(l===KX.And){if(!n.quickFilterValues.every(d))return!1}else if(!n.quickFilterValues.some(d))return!1}return!0},bj=function(e,t,n){var r,o,i,a,s=null!=(r=null!=(o=t.filterModel)?o:null==(i=t.initialState)||null==(a=i.filter)?void 0:a.filterModel)?r:rj();return c({},e,{filter:{filterModel:cj(s,t.disableMultipleColumnsFiltering,n),visibleRowsLookup:{},filteredDescendantCountLookup:{}}})};!function(e){e.Compact="compact",e.Standard="standard",e.Comfortable="comfortable"}(nj||(nj={}));var fj=function(e,t,n,r){switch(e){case nj.Compact:return{value:e,headerHeight:Math.floor(.7*t),rowHeight:Math.floor(.7*n),headerGroupingMaxDepth:r,factor:.7};case nj.Comfortable:return{value:e,headerHeight:Math.floor(1.3*t),rowHeight:Math.floor(1.3*n),headerGroupingMaxDepth:r,factor:1.3};default:return{value:e,headerHeight:t,rowHeight:n,headerGroupingMaxDepth:r,factor:1}}},hj=function(e,t){var n;if(null==t.columnGroupingModel||0===Object.keys(t.columnGroupingModel).length)n=0;else{var r=IN(t.columnGroupingModel),o=e.columns,i=o.all.filter((function(e){return!1!==o.columnVisibilityModel[e]}));n=0===i.length?0:Math.max.apply(Math,Le(i.map((function(e){var t,n;return null!=(t=null==(n=r[e])?void 0:n.length)?t:0}))))}return c({},e,{density:fj(t.density,t.headerHeight,t.rowHeight,n)})},Mj=function(e){return e?0:100},zj=function(e){return function(t){return c({},t,{pagination:c({},t.pagination,{pageSize:e})})}},Oj=function(e,t){return t>0&&e>0?Math.ceil(e/t):0},mj=function(e){return e.pageCount?c({},e,{page:Math.max(Math.min(e.page,e.pageCount-1),0)}):e},gj=function(e){return function(t){return c({},t,{pagination:mj(c({},t.pagination,{page:e}))})}},vj=(IE(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error"),function(e,t){var n,r,o,i,a,s,l,p,u;return c({},e,{pagination:{pageSize:u=null!=t.pageSize?t.pageSize:null!=(null==(n=t.initialState)||null==(r=n.pagination)?void 0:r.pageSize)?t.initialState.pagination.pageSize:Mj(t.autoPageSize),page:null!=(o=null!=(i=t.page)?i:null==(a=t.initialState)||null==(s=a.pagination)?void 0:s.page)?o:0,pageCount:Oj(null!=(l=t.rowCount)?l:0,u),rowCount:null!=(p=t.rowCount)?p:0}})}),Aj=function(e,n){!function(e,n){var r,o,i=RT(e,"useGridPageSize"),a=rT(e,cT);e.current.unstable_registerControlState({stateId:"pageSize",propModel:n.pageSize,propOnChange:n.onPageSizeChange,stateSelector:zP,changeEvent:"pageSizeChange"});var s=t.useCallback((function(t){t!==zP(e)&&(i.debug("Setting page size to ".concat(t)),e.current.setState(zj(t)),e.current.forceUpdate())}),[e,i]);zN(e,{setPageSize:s});var l=t.useCallback((function(t,r){var o,i,a=zP(e);return r.exportOnlyDirtyModels&&null==n.pageSize&&null==(null==(o=n.initialState)||null==(i=o.pagination)?void 0:i.pageSize)&&a===Mj(n.autoPageSize)?t:c({},t,{pagination:c({},t.pagination,{pageSize:a})})}),[e,n.pageSize,null==(r=n.initialState)||null==(o=r.pagination)?void 0:o.pageSize,n.autoPageSize]),p=t.useCallback((function(t,n){var r,o=null==(r=n.stateToRestore.pagination)?void 0:r.pageSize;return null!=o&&e.current.setState(zj(o)),t}),[e]);NN(e,"exportState",l),NN(e,"restoreState",p);var u=t.useCallback((function(){var t=e.current.getRootDimensions();if(n.autoPageSize&&t){var r=_X(e),o=Math.floor((t.viewportInnerSize.height-r.top-r.bottom)/a);e.current.setPageSize(o)}}),[e,n.autoPageSize,a]);xN(e,"viewportInnerSizeChange",u),t.useEffect((function(){null==n.pageSize||n.autoPageSize||e.current.setPageSize(n.pageSize)}),[e,n.autoPageSize,n.pageSize]),t.useEffect((function(){u()}),[u])}(e,n),function(e,n){var r,o,i=RT(e,"useGridPage"),a=rT(e,ZT);e.current.unstable_registerControlState({stateId:"page",propModel:n.page,propOnChange:n.onPageChange,stateSelector:MP,changeEvent:"pageChange"});var s=t.useCallback((function(t){i.debug("Setting page to ".concat(t)),e.current.setState(gj(t)),e.current.forceUpdate()}),[e,i]);zN(e,{setPage:s});var l=t.useCallback((function(t,r){var o,i,a=MP(e);return r.exportOnlyDirtyModels&&null==n.page&&null==(null==(o=n.initialState)||null==(i=o.pagination)?void 0:i.page)&&0===a?t:c({},t,{pagination:c({},t.pagination,{page:a})})}),[e,n.page,null==(r=n.initialState)||null==(o=r.pagination)?void 0:o.page]),p=t.useCallback((function(t,n){var r,o,i=null!=(r=null==(o=n.stateToRestore.pagination)?void 0:o.page)?r:MP(e);return e.current.setState(gj(i)),t}),[e]);NN(e,"exportState",l),NN(e,"restoreState",p),xN(e,"pageSizeChange",(function(t){e.current.setState((function(e){var n=Oj(e.pagination.rowCount,t);return c({},e,{pagination:mj(c({},e.pagination,{pageCount:n,page:e.pagination.page}))})})),e.current.forceUpdate()})),xN(e,"pageChange",(function(){return e.current.scrollToIndexes({rowIndex:MP(e)*zP(e)})})),t.useEffect((function(){}),[n.rowCount,n.paginationMode]),t.useEffect((function(){e.current.setState((function(e){var t=void 0!==n.rowCount?n.rowCount:a,r=Oj(t,e.pagination.pageSize),o=null==n.page?e.pagination.page:n.page;return c({},e,{pagination:mj(c({},e.pagination,{page:o,rowCount:t,pageCount:r}))})})),e.current.forceUpdate()}),[a,n.rowCount,n.page,n.paginationMode,e])}(e,n)},yj=function(e){return c({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})},xj=function(e){return e.columnMenu},qj=function(e){return c({},e,{columnMenu:{open:!1}})};var wj=function(e,n){var r=RT(e,"useGridKeyboardNavigation"),o=PB(e,n).rows,i=t.useMemo((function(){return function(e,t){var n=xT(e)||{};return[].concat(Le(n.top||[]),Le(t),Le(n.bottom||[]))}(e,o)}),[e,o]),a=t.useCallback((function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",i=GT(e),a=e.current.unstable_getCellColSpanInfo(n,t);a&&a.spannedByColSpan&&("left"===o?t=a.leftVisibleCellIndex:"right"===o&&(t=a.rightVisibleCellIndex));var s=i.findIndex((function(e){return e.id===n}));r.debug("Navigating to cell row ".concat(s,", col ").concat(t)),e.current.scrollToIndexes({colIndex:t,rowIndex:s});var c=e.current.getVisibleColumns()[t].field;e.current.setCellFocus(n,c)}),[e,r]),s=t.useCallback((function(t,n){r.debug("Navigating to header col ".concat(t)),e.current.scrollToIndexes({colIndex:t});var o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,n)}),[e,r]),c=t.useCallback((function(e){return i[e].id}),[i]),l=t.useCallback((function(t,n){var r=e.current.getRootDimensions();if(0!==i.length&&r){var o=e.current.unstable_getViewportPageSize(),l=t.field?e.current.getColumnIndex(t.field):0,p=i.findIndex((function(e){return e.id===t.id})),u=i.length-1,d=QE(e).length-1,b=!0;switch(n.key){case"ArrowDown":case"Enter":p0?a(l,c(p-1)):s(l,n);break;case"ArrowRight":l0&&a(l-1,c(p));break;case"Tab":n.shiftKey&&l>0?a(l-1,c(p),"left"):!n.shiftKey&&l=0?a(l,c(h)):s(l,n);break;case"Home":n.ctrlKey||n.metaKey||n.shiftKey?a(0,c(0)):a(0,c(p));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?a(d,c(u)):a(d,c(p));break;default:b=!1}b&&n.preventDefault()}}),[e,i,a,s,c]),p=t.useCallback((function(t,n){var r=n.currentTarget.querySelector(".".concat(LE.columnHeaderTitleContainerContent));if((!(!!r&&r.contains(n.target))||t.field===OB.field)&&e.current.getRootDimensions()){var o=e.current.unstable_getViewportPageSize(),l=t.field?e.current.getColumnIndex(t.field):0,p=i.length-1,u=QE(e).length-1,d=!0;switch(n.key){case"ArrowDown":a(l,c(0));break;case"ArrowRight":l0&&s(l-1,n);break;case"PageDown":null!==p&&a(l,c(Math.min(0+o,p)));break;case"Home":s(0,n);break;case"End":s(u,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:d=!1}d&&n.preventDefault()}}),[e,i,a,s,c]),u=t.useCallback((function(t,n){if(n.currentTarget.contains(n.target)){var r=e.current.getCellParams(t.id,t.field);r.cellMode!==qB.Edit&&eP(n.key)&&e.current.publishEvent("cellNavigationKeyDown",r,n)}}),[e]);xN(e,"cellNavigationKeyDown",l),xN(e,"columnHeaderKeyDown",p),xN(e,"cellKeyDown",u)};function Wj(e,t){return e.closest(".".concat(t))}function Rj(e){return e.replace(/["\\]/g,"\\$&")}function Cj(e,t){return e.querySelector(".".concat(LE.row,'[data-id="').concat(Rj(String(t)),'"]'))}IE(["MUI: You are calling getValue. This method is deprecated and will be removed in the next major version.","Instead, you can access the data from `params.row`."]);function _j(e){var n=t.useCallback((function(t){return{field:t,colDef:e.current.getColumn(t)}}),[e]),r=t.useCallback((function(){var t;return(t=e.current).getCellValue.apply(t,arguments)}),[e]),o=t.useCallback((function(t){var n=e.current.getRow(t);if(!n)throw new Error("No row with id #".concat(t," found"));return{id:t,columns:e.current.getAllColumns(),row:n,getValue:r}}),[e,r]),i=t.useCallback((function(t,n){var o=e.current.getRow(t),i=e.current.getRowNode(t);if(!o||!i)throw new Error("No row with id #".concat(t," found"));var a=aP(e),s=lP(e);return{id:t,field:n,row:o,rowNode:i,value:o[n],colDef:e.current.getColumn(n),cellMode:e.current.getCellMode(t,n),getValue:r,api:e.current,hasFocus:null!==a&&a.field===n&&a.id===t,tabIndex:s&&s.field===n&&s.id===t?0:-1}}),[e,r]),a=t.useCallback((function(t,n){var o=e.current.getColumn(n),i=e.current.getCellValue(t,n),a=e.current.getRow(t),s=e.current.getRowNode(t);if(!a||!s)throw new Error("No row with id #".concat(t," found"));var c=aP(e),l=lP(e),p={id:t,field:n,row:a,rowNode:s,colDef:o,cellMode:e.current.getCellMode(t,n),getValue:r,hasFocus:null!==c&&c.field===n&&c.id===t,tabIndex:l&&l.field===n&&l.id===t?0:-1,value:i,formattedValue:i};return o&&o.valueFormatter&&(p.formattedValue=o.valueFormatter({id:t,field:p.field,value:p.value,api:e.current})),p.isEditable=o&&e.current.isCellEditable(p),p}),[e,r]),s=t.useCallback((function(t,n){var r=e.current.getColumn(n);if(!r||!r.valueGetter){var o=e.current.getRow(t);if(!o)throw new Error("No row with id #".concat(t," found"));return o[n]}return r.valueGetter(i(t,n))}),[e,i]),c=t.useCallback((function(t){return e.current.rootElementRef.current?function(e,t){return e.querySelector('[role="columnheader"][data-field="'.concat(Rj(t),'"]'))}(e.current.rootElementRef.current,t):null}),[e]),l=t.useCallback((function(t){return e.current.rootElementRef.current?Cj(e.current.rootElementRef.current,t):null}),[e]),p=t.useCallback((function(t,n){return e.current.rootElementRef.current?function(e,t){var n=t.id,r=t.field,o=Cj(e,n);return o?o.querySelector(".".concat(LE.cell,'[data-field="').concat(Rj(r),'"]')):null}(e.current.rootElementRef.current,{id:t,field:n}):null}),[e]);zN(e,{getCellValue:s,getCellParams:a,getCellElement:p,getRowParams:o,getRowElement:l,getColumnHeaderParams:n,getColumnHeaderElement:c})}var Sj=function(e){return e.rowsMeta};function kj(e){var t=e.clientHeight,n=e.scrollTop,r=e.offsetHeight,o=e.offsetTop,i=o+r;return r>t?o:i-t>n?i-t:o0?s.filter((function(e){return a.has(e)})):s},Pj=["hideMenu","options"],Bj=["hideMenu","options"],Xj=function(e){var t=oT(),n=e.hideMenu,r=e.options,o=Qe(e,Pj);return(0,Cn.jsx)(nm,c({onClick:function(){t.current.exportDataAsCsv(r),null==n||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))},jj=function(e){var t=oT(),n=e.hideMenu,r=e.options,o=Qe(e,Bj);return(0,Cn.jsx)(nm,c({onClick:function(){t.current.exportDataAsPrint(r),null==n||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))},Ij=function(e){var n=RT(e,"useGridCsvExport"),r=t.useCallback((function(){var t,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.debug("Get data as CSV");var i=Tj({apiRef:e,options:o}),a=null!=(t=o.getRowsToExport)?t:Nj,s=a({apiRef:e});return Ej({columns:i,rowIds:s,getCellParams:e.current.getCellParams,delimiterCharacter:o.delimiter||",",includeHeaders:null==(r=o.includeHeaders)||r})}),[n,e]),o=t.useCallback((function(e){n.debug("Export data as CSV");var t=r(e);!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"csv",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document.title||"untitled",r="".concat(n,".").concat(t);if("download"in HTMLAnchorElement.prototype){var o=URL.createObjectURL(e),i=document.createElement("a");return i.href=o,i.download=r,i.click(),void setTimeout((function(){URL.revokeObjectURL(o)}))}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[n,r]);zN(e,{getDataAsCsv:r,exportDataAsCsv:o});var i=t.useCallback((function(e,t){var n;return null!=(n=t.csvOptions)&&n.disableToolbarButton?e:[].concat(Le(e),[{component:(0,Cn.jsx)(Xj,{options:t.csvOptions}),componentName:"csvExport"}])}),[]);NN(e,"exportMenu",i)},Dj=function(e,n,r,o,i){var a=RT(e,"useNativeEventListener"),c=s(t.useState(!1),2),l=c[0],p=c[1],u=t.useRef(o),d=t.useCallback((function(e){return u.current&&u.current(e)}),[]);t.useEffect((function(){u.current=o}),[o]),t.useEffect((function(){var t;if((t=aN(n)?n():n&&n.current?n.current:null)&&r&&!l){a.debug("Binding native ".concat(r," event")),t.addEventListener(r,d,i);var o=t;p(!0);e.current.subscribeEvent("unmount",(function(){a.debug("Clearing native ".concat(r," event")),o.removeEventListener(r,d,i)}))}}),[n,d,r,l,a,i,e])};function Fj(e){var t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);var n=document.createRange();n.selectNode(t);var r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}var Hj=HE((function(e){return e.columnReorder}),(function(e){return e.dragCol})),Vj="left",Uj="right",Gj=function(e){return c({},e,{columnReorder:{dragCol:""}})},Yj=function(e,n){var r=RT(e,"useGridColumnReorder"),o=t.useRef(null),i=t.useRef({x:0,y:0}),a=t.useRef(null),s=t.useRef({}),l=t.useRef(),p=function(e){return Cf({columnHeaderDragging:["columnHeader--dragging"]},kE,e.classes)}({classes:n.classes});t.useEffect((function(){return function(){clearTimeout(l.current)}}),[]);var u=t.useCallback((function(t,i){if(!n.disableColumnReorder&&!t.colDef.disableReorder){r.debug("Start dragging col ".concat(t.field)),i.stopPropagation(),o.current=i.currentTarget,o.current.classList.add(p.columnHeaderDragging),e.current.setState((function(e){return c({},e,{columnReorder:c({},e.columnReorder,{dragCol:t.field})})})),e.current.forceUpdate(),l.current=setTimeout((function(){o.current.classList.remove(p.columnHeaderDragging)})),a.current=e.current.getColumnIndex(t.field,!1);var u=e.current.unstable_getColumnGroupPath(t.field),d=a.current,b=e.current.getAllColumns(),f=e.current.unstable_getAllGroupDetails(),h=null;u.forEach((function(e){var t,n,r;null!=(t=f[e])&&t.freeReordering||(d>0&&null!=(n=b[d-1].groupPath)&&n.includes(e)||d+1=0&&null!=(O=b[t].groupPath)&&O.includes(h)||n=0&&n0&&!f[u-1].disableReorder:u0?f[u-1].field:null;v>0&&h[v].field!==g&&s.current[v];)v=p+(m-=1);else for(g=u+10&&(0,Cn.jsx)(Im,{size:"small",onClick:function(e){c.current.setRowChildrenExpansion(n,!i.childrenExpanded),c.current.setCellFocus(n,r),e.stopPropagation()},onKeyDown:function(t){" "===t.key&&t.stopPropagation(),eP(t.key)&&!t.shiftKey&&c.current.publishEvent("cellNavigationKeyDown",e,t)},tabIndex:-1,"aria-label":i.childrenExpanded?c.current.getLocaleText("treeDataCollapse"):c.current.getLocaleText("treeDataExpand"),children:(0,Cn.jsx)(u,{fontSize:"inherit"})})}),(0,Cn.jsxs)("span",{children:[void 0===o?i.groupingKey:o,!a&&p>0?" (".concat(p,")"):""]})]})},uI=function(e){var t=e.map((function(e){return"".concat(e.field,"/").concat(e.key)})).join("-");return"auto-generated-row-".concat(t)},dI=["hideDescendantCount"],bI=function(e,n){var r=t.useCallback((function(){e.current.unstable_setStrategyAvailability("rowTree",sI,n.treeData?function(){return!0}:function(){return!1})}),[e,n.treeData]),o=t.useCallback((function(){var t,r,o=n.groupingColDef;"function"===typeof o?r=o({groupingName:sI,fields:[]}):r=o;var i=null!=(t=r)?t:{},a=i.hideDescendantCount,s=Qe(i,dI),l=c({},iI,{renderCell:function(e){return(0,Cn.jsx)(pI,c({},e,{hideDescendantCount:a}))},headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return c({},l,s,aI)}),[e,n.groupingColDef]),i=t.useCallback((function(e){var t=aI.field,r=n.treeData,i=e.lookup[t];if(r){var a=o();if(i&&(a.width=i.width,a.flex=i.flex),e.lookup[t]=a,null==i){var s=e.all[0]===zB?1:0;e.all=[].concat(Le(e.all.slice(0,s)),[t],Le(e.all.slice(s)))}}else!r&&i&&(delete e.lookup[t],e.all=e.all.filter((function(e){return e!==t})));return e}),[n.treeData,o]),a=t.useCallback((function(e){if(!n.getTreeDataPath)throw new Error("MUI: No getTreeDataPath given.");var t=e.ids.map((function(t){return{id:t,path:n.getTreeDataPath(e.idRowsLookup[t]).map((function(e){return{key:e,field:null}}))}})).sort((function(e,t){return e.path.length-t.path.length}));return function(e){for(var t={},n=1,r=Le(e.ids),o=c({},e.idRowsLookup),i=c({},e.idToIdLookup),a={},s=function(t){var n,r,o=null==(n=e.previousTree)||null==(r=n[t.id])?void 0:r.childrenExpanded;return null!=o?o:t.children&&t.children.length?e.isGroupExpandedByDefault?e.isGroupExpandedByDefault(t):-1===e.defaultGroupingExpansionDepth||e.defaultGroupingExpansionDepth>t.depth:void 0},l=0;l0)d=null;else if(r&&"footer"!==c.position){var b=r(c.id),f=b.passingFilterItems,h=b.passingQuickFilterValues;d=dj([f],[h],e.filterModel,e.apiRef)}else d=!0;var M,z=0;switch(null==(u=c.children)||u.forEach((function(e){var n,r=t[e],o=s(r,null!=(n=d)?n:l,p&&!!c.childrenExpanded);z+=o})),d){case!0:M=!0;break;case!1:M=z>0;break;default:M=l}return o[c.id]=M&&p,i[c.id]=M,null!=c.footerId&&(o[c.footerId]=M&&p&&!!c.childrenExpanded),M?(a[c.id]=z,"footer"===c.position?z:z+1):0},c=Object.values(t),l=0;l0&&r||!o?e.body.map((function(e){return e.id})):o(e.body),null!=e.footer&&n.push(e.footer.id),p.set(t,n))})),function e(t,n){i=[].concat(Le(i.slice(0,t)),Le(n),Le(i.slice(t)));var r=0;return n.forEach((function(n){r+=1;var o=p.get(n);if(null!=o&&o.length){var i=e(t+r,o);r+=i}})),r}(0,p.get(null)),i}({rowTree:mT(e),rowIds:AT(e),sortRowList:t.sortRowList,disableChildrenSorting:n.disableChildrenSorting})}),[e,n.disableChildrenSorting]);NN(e,"hydrateColumns",i),gB(e,sI,"rowTreeCreation",a),gB(e,sI,"filtering",s),gB(e,sI,"sorting",l),TN((function(){r()}));var p=t.useRef(!0);t.useEffect((function(){p.current?p.current=!1:r()}),[r])};!function(e){e.left="left",e.right="right"}(rI||(rI={}));var fI=function(e){var n=e.column,r=e.onClick,o=lI(),i=function(e){return function(t){o.current.pinColumn(n.field,e),r&&r(t)}};if(!n)return null;var a=o.current.isColumnPinned(n.field);if(a){var s=a===rI.right?rI.left:rI.right,c=s===rI.right?"pinToRight":"pinToLeft";return(0,Cn.jsxs)(t.Fragment,{children:[(0,Cn.jsx)(nm,{onClick:i(s),children:o.current.getLocaleText(c)}),(0,Cn.jsx)(nm,{onClick:function(e){o.current.unpinColumn(n.field),r&&r(e)},children:o.current.getLocaleText("unpin")})]})}return(0,Cn.jsxs)(t.Fragment,{children:[(0,Cn.jsx)(nm,{onClick:i(rI.left),children:o.current.getLocaleText("pinToLeft")}),(0,Cn.jsx)(nm,{onClick:i(rI.right),children:o.current.getLocaleText("pinToRight")})]})},hI=function(e){return e.pinnedColumns},MI=["style"];function zI(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(t.length<=0)return-1;if(n>=r)return n;var o=n+Math.floor((r-n)/2),i=t[o];return e<=i?zI(e,t,n,o):zI(e,t,o+1,r)}var OI=function(e){var t=e.firstIndex,n=e.lastIndex,r=e.buffer,o=e.minFirstIndex,i=e.maxLastIndex;return[cN(t-r,o,i),cN(n+r,o,i)]},mI=function(e){var n,o,i=oT(),a=iT(),l=rT(i,QE),p=e.ref,u=e.disableVirtualization,d=e.onRenderZonePositioning,b=e.renderZoneMinColumnIndex,f=void 0===b?0:b,h=e.renderZoneMaxColumnIndex,M=void 0===h?l.length:h,z=e.getRowProps,O=rT(i,JE),m=rT(i,ZE),g=rT(i,cT),v=rT(i,aP),A=rT(i,lP),y=rT(i,Sj),x=rT(i,TX),q=rT(i,fP),w=PB(i,a),W=t.useRef(null),R=t.useRef(null),C=LM(p,R),_=s(t.useState(null),2),S=_[0],k=_[1],L=t.useRef(S),E=t.useRef({top:0,left:0}),T=s(t.useState(null),2),N=T[0],P=T[1],B=t.useRef(m),X=t.useCallback((function(e){var t,n,r=i.current.unstable_getLastMeasuredRowIndex(),o=r===1/0;null!=(t=w.range)&&t.lastRowIndex&&!o&&(o=r>=w.range.lastRowIndex);var a=cN(r-((null==(n=w.range)?void 0:n.firstRowIndex)||0),0,y.positions.length);return o||y.positions[a]>=e?zI(e,y.positions):function(e,t,n){for(var r=1;n=a.rowThreshold||l>=a.rowThreshold||p>=a.columnThreshold||d>=a.columnThreshold||B.current!==m;i.current.publishEvent("rowsScroll",{top:n,left:o,renderContext:b?s:L.current},e),b&&(r.flushSync((function(){F(s)})),B.current=m)}},V=function(e){i.current.publishEvent("virtualScrollerWheel",{},e)},U=function(e){i.current.publishEvent("virtualScrollerTouchMove",{},e)},G=N&&m>N,Y=t.useMemo((function(){var e=Math.max(y.currentPageTotalHeight,1),t=!1;null!=R&&R.current&&e<=(null==R?void 0:R.current.clientHeight)&&(t=!0);var n={width:G?m:"auto",height:e,minHeight:t?"100%":"auto"};return a.autoHeight&&0===w.rows.length&&(n.height=2*g),n}),[R,m,y.currentPageTotalHeight,w.rows.length,G,a.autoHeight,g]);t.useEffect((function(){i.current.publishEvent("virtualScrollerContentSizeChange")}),[i,Y]),a.autoHeight&&0===w.rows.length&&(Y.height=2*g);var K={};G||(K.overflowX="hidden"),a.autoHeight&&(K.overflowY="hidden");var Q=t.useCallback((function(){return L.current}),[]);return i.current.unstable_getRenderContext=Q,{renderContext:S,updateRenderZonePosition:D,getRows:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{renderContext:S},t=e.renderContext,n=e.minFirstColumn,r=void 0===n?f:n,o=e.maxLastColumn,p=void 0===o?M:o,d=e.availableSpace,b=void 0===d?N:d,h=e.rowIndexOffset,O=void 0===h?0:h,m=e.position,g=void 0===m?"center":m;if(!t||null==b)return null;var y=u?0:a.rowBuffer,W=u?0:a.columnBuffer,R=OI({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:y}),C=s(R,2),_=C[0],k=C[1],L=[];if(e.rows)e.rows.forEach((function(e){L.push(e),i.current.unstable_calculateColSpan({rowId:e.id,minFirstColumn:r,maxLastColumn:p,columns:l})}));else{if(!w.range)return null;for(var E=_;E0&&void 0!==arguments[0]?arguments[0]:{},t=e.style,n=void 0===t?{}:t,r=Qe(e,MI);return c({ref:C,onScroll:H,onWheel:V,onTouchMove:U,style:c({},n,K)},r)},getContentProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.style,n=void 0===t?{}:t;return{style:c({},n,Y)}},getRenderZoneProps:function(){return{ref:W}}}},gI=["className"],vI=$f("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:function(e,t){return t.virtualScroller}})({overflow:"auto",position:"relative","@media print":{overflow:"hidden"}}),AI=t.forwardRef((function(e,t){var n=e.className,r=Qe(e,gI),o=function(e){return Cf({root:["virtualScroller"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(vI,c({ref:t,className:ub(o.root,n)},r))})),yI=["className","style"],xI=$f("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:function(e,t){return t.virtualScrollerContent}})({}),qI=t.forwardRef((function(e,t){var n=e.className,r=e.style,o=Qe(e,yI),i=iT(),a=function(e){var t=e.classes;return Cf({root:["virtualScrollerContent",e.overflowedContent&&"virtualScrollerContent--overflowed"]},kE,t)}({classes:i.classes,overflowedContent:!i.autoHeight&&"auto"===(null==r?void 0:r.minHeight)});return(0,Cn.jsx)(xI,c({ref:t,className:ub(a.root,n),style:r},o))})),wI=["className"],WI=$f("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:function(e,t){return t.virtualScrollerRenderZone}})({position:"absolute",display:"flex",flexDirection:"column"}),RI=t.forwardRef((function(e,t){var n=e.className,r=Qe(e,wI),o=function(e){return Cf({root:["virtualScrollerRenderZone"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(WI,c({ref:t,className:ub(o.root,n)},r))})),CI=function(e){return e.detailPanel.expandedRowIds},_I=function(e){return e.detailPanel.contentCache},SI=function(e){return e.detailPanel.heightCache},kI=HE(SI,(function(e){return Object.entries(e).reduce((function(e,t){var n=s(t,2),r=n[0],o=n[1].height;return e[r]=o||0,e}),{})})),LI=["rowId","height","style"],EI=$f(Wf,{name:"MuiDataGrid",slot:"DetailPanel",overridesResolver:function(e,t){return t.detailPanel}})((function(e){return{zIndex:2,width:"100%",position:"absolute",backgroundColor:e.theme.palette.background.default,overflow:"auto"}})),TI=function(e){var n=e.rowId,r=e.height,o=e.style,i=void 0===o?{}:o,a=Qe(e,LI),l=lI(),p=t.useRef();t.useLayoutEffect((function(){"auto"===r&&p.current&&"undefined"===typeof ResizeObserver&&l.current.unstable_storeDetailPanelHeight(n,p.current.clientHeight)}),[l,r,n]),t.useLayoutEffect((function(){var e="auto"!==r;if(p.current&&!e&&"undefined"!==typeof ResizeObserver){var t=new ResizeObserver((function(e){var t=s(e,1)[0],r=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;l.current.unstable_storeDetailPanelHeight(n,r)}));return t.observe(p.current),function(){return t.disconnect()}}}),[l,r,n]);var u=c({},i,{height:r});return(0,Cn.jsx)(EI,c({ref:p,style:u},a))},NI=["className","disableVirtualization"],PI=function(e,t){var n,r;if(!Array.isArray(e.left)&&!Array.isArray(e.right))return[[],[]];if(0===(null==(n=e.left)?void 0:n.length)&&0===(null==(r=e.right)?void 0:r.length))return[[],[]];var o=function(e,t){return Array.isArray(e)?e.filter((function(e){return t.includes(e)})):[]},i=o(e.left,t),a=t.filter((function(e){return!i.includes(e)})),s=o(e.right,a);return[i,s]},BI=function(e){return(e<1?5.11916*Math.pow(e,2):4.5*Math.log(e+1)+2)/100},XI=function(e){return Vt(e.palette.common.black,.21)},jI=$f("div",{name:"MuiDataGrid",slot:"DetailPanels",overridesResolver:function(e,t){return t.detailPanels}})({position:"relative"}),II="linear-gradient(".concat(Vt("#fff",BI(2)),", ").concat(Vt("#fff",BI(2)),")"),DI=$f("div",{name:"MuiDataGrid",slot:"PinnedColumns",overridesResolver:function(e,t){return[ne({},"&.".concat(LE["pinnedColumns--left"]),t["pinnedColumns--left"]),ne({},"&.".concat(LE["pinnedColumns--right"]),t["pinnedColumns--right"]),t.pinnedColumns]}})((function(e){var t=e.theme,n=e.ownerState,r=XI(t);return c({position:"sticky",overflow:"hidden",zIndex:1,backgroundColor:t.palette.background.default},"dark"===t.palette.mode&&{backgroundImage:II},n.side===rI.left&&{left:0,float:"left",boxShadow:"2px 0px 4px -2px ".concat(r)},n.side===rI.right&&{right:0,float:"right",boxShadow:"-2px 0px 4px -2px ".concat(r)})})),FI=$f("div",{name:"MuiDataGrid",slot:"PinnedRows",overridesResolver:function(e,t){return[ne({},"&.".concat(LE["pinnedRows--top"]),t["pinnedRows--top"]),ne({},"&.".concat(LE["pinnedRows--bottom"]),t["pinnedRows--bottom"]),t.pinnedRows]}})((function(e){var t=e.theme,n=e.ownerState,r=XI(t);return c({position:"sticky",zIndex:3,backgroundColor:t.palette.background.default},"dark"===t.palette.mode&&{backgroundImage:II},"top"===n.position&&{top:0,boxShadow:"0px 3px 4px -2px ".concat(r)},"bottom"===n.position&&{boxShadow:"0px -3px 4px -2px ".concat(r),bottom:0})})),HI=$f("div")({position:"absolute"}),VI=t.forwardRef((function(e,n){var r=Qe(e,NI),o=lI(),i=cI(),a=rT(o,$E),l=rT(o,CI),p=rT(o,_I),u=rT(o,kI),d=t.useRef(null),b=t.useRef(null),f=t.useRef(null),h=t.useRef(null),M=t.useCallback((function(e){var t=e.top,n=e.left;d.current&&(d.current.style.transform="translate3d(0px, ".concat(t,"px, 0px)")),b.current&&(b.current.style.transform="translate3d(0px, ".concat(t,"px, 0px)")),f.current&&(f.current.style.transform="translate3d(".concat(n,"px, 0px, 0px)")),h.current&&(h.current.style.transform="translate3d(".concat(n,"px, 0px, 0px)"))}),[]),z=rT(o,hI),O=s(PI(z,a),2),m=O[0],g=O[1],v=rT(o,xT),A=t.useMemo((function(){return(null==v?void 0:v.top)||[]}),[null==v?void 0:v.top]),y=t.useMemo((function(){return(null==v?void 0:v.bottom)||[]}),[null==v?void 0:v.bottom]),x=function(e){return Cf({leftPinnedColumns:["pinnedColumns","pinnedColumns--left"],rightPinnedColumns:["pinnedColumns","pinnedColumns--right"],topPinnedRows:["pinnedRows","pinnedRows--top"],bottomPinnedRows:["pinnedRows","pinnedRows--bottom"],pinnedRowsRenderZone:["pinnedRowsRenderZone"],detailPanels:["detailPanels"],detailPanel:["detailPanel"]},kE,e.classes)}({classes:i.classes,leftPinnedColumns:m,rightPinnedColumns:g,topPinnedRowsCount:A.length,bottomPinnedRowsCount:y.length}),q=mI(c({ref:n,renderZoneMinColumnIndex:m.length,renderZoneMaxColumnIndex:a.length-g.length,onRenderZonePositioning:M,getRowProps:function(e){return l.includes(e)?{style:{marginBottom:u[e]}}:null}},e)),w=q.renderContext,W=q.getRows,R=q.getRootProps,C=q.getContentProps,_=q.getRenderZoneProps,S=q.updateRenderZonePosition,k=t.useCallback((function(){w&&S(w)}),[w,S]);xN(o,"columnWidthChange",k),xN(o,"columnOrderChange",k),xN(o,"rowOrderChange",k);var L=w&&m.length>0?c({},w,{firstColumnIndex:0,lastColumnIndex:m.length}):null,E=w&&g.length>0?c({},w,{firstColumnIndex:a.length-g.length,lastColumnIndex:a.length}):null,T=function(){var e=[];if(null==i.getDetailPanelContent)return e;for(var n=Sj(o.current.state),r=Array.from(new Set(Le(l)).values()),a=0;a0?(0,Cn.jsxs)(FI,{className:x.topPinnedRows,ownerState:{position:"top"},style:{width:j.style.width,height:P.top},role:"rowgroup",children:[L&&(0,Cn.jsx)(DI,{className:x.leftPinnedColumns,ownerState:{side:rI.left},children:W({renderContext:L,minFirstColumn:L.firstColumnIndex,maxLastColumn:L.lastColumnIndex,availableSpace:0,rows:A,position:"left"})}),(0,Cn.jsx)(HI,{className:x.pinnedRowsRenderZone,ref:f,role:"presentation",children:N}),E&&(0,Cn.jsx)(DI,{className:x.rightPinnedColumns,ownerState:{side:rI.right},children:W({renderContext:E,minFirstColumn:E.firstColumnIndex,maxLastColumn:E.lastColumnIndex,availableSpace:0,rows:A,position:"right"})})]}):null,(0,Cn.jsxs)(qI,c({},j,{children:[L&&(0,Cn.jsx)(DI,{ref:d,className:x.leftPinnedColumns,ownerState:{side:rI.left},style:I,children:W({renderContext:L,minFirstColumn:L.firstColumnIndex,maxLastColumn:L.lastColumnIndex,availableSpace:0,rowIndexOffset:A.length,position:"left"})}),(0,Cn.jsx)(RI,c({},_(),{children:B})),E&&(0,Cn.jsx)(DI,{ref:b,ownerState:{side:rI.right},className:x.rightPinnedColumns,style:I,children:W({renderContext:E,minFirstColumn:E.firstColumnIndex,maxLastColumn:E.lastColumnIndex,availableSpace:0,rowIndexOffset:A.length,position:"right"})}),T.length>0&&(0,Cn.jsx)(jI,{className:x.detailPanels,children:T})]})),y.length>0?(0,Cn.jsxs)(FI,{className:x.bottomPinnedRows,ownerState:{position:"bottom"},style:{width:j.style.width,height:P.bottom},role:"rowgroup",children:[L&&(0,Cn.jsx)(DI,{className:x.leftPinnedColumns,ownerState:{side:rI.left},children:W({renderContext:L,minFirstColumn:L.firstColumnIndex,maxLastColumn:L.lastColumnIndex,availableSpace:0,rows:y,rowIndexOffset:A.length+(B?B.length:0),position:"left"})}),(0,Cn.jsx)(HI,{className:x.pinnedRowsRenderZone,ref:h,role:"presentation",children:X}),E&&(0,Cn.jsx)(DI,{className:x.rightPinnedColumns,ownerState:{side:rI.right},children:W({renderContext:E,minFirstColumn:E.firstColumnIndex,maxLastColumn:E.lastColumnIndex,availableSpace:0,rows:y,rowIndexOffset:A.length+(B?B.length:0),position:"right"})})]}):null]}))})),UI=function(){return(0,Cn.jsx)(vm,{onClick:function(e){return e.stopPropagation()}})},GI=function(e,t,n){var r,o;if(n.current.unstable_caches.columnPinning={orderedFieldsBeforePinningColumns:null},t.disableColumnPinning)o={};else if(t.pinnedColumns)o=t.pinnedColumns;else if(null!=(r=t.initialState)&&r.pinnedColumns){var i;o=null==(i=t.initialState)?void 0:i.pinnedColumns}else o={};return c({},e,{pinnedColumns:o})},YI=function(e){return function(t){return c({},t,{pinnedColumns:e})}},KI=function(e){var n=e.id,r=e.value,o=cI(),i=lI(),a=function(e){var t=e.classes;return Cf({root:["detailPanelToggleCell",e.isExpanded&&"detailPanelToggleCell--expanded"]},kE,t)}({classes:o.classes,isExpanded:r}),s=rT(i,_I),c=t.isValidElement(s[n]),l=r?o.components.DetailPanelCollapseIcon:o.components.DetailPanelExpandIcon;return(0,Cn.jsx)(Im,{size:"small",tabIndex:-1,disabled:!c,className:a.root,"aria-label":r?i.current.getLocaleText("collapseDetailPanel"):i.current.getLocaleText("expandDetailPanel"),children:(0,Cn.jsx)(l,{fontSize:"inherit"})})},QI="__detail_panel_toggle__",$I=c({},cB,{field:QI,type:"detailPanelToggle",editable:!1,sortable:!1,filterable:!1,resizable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,align:"left",width:40,valueGetter:function(e){return CI(e.api.state).includes(e.id)},renderCell:function(e){return(0,Cn.jsx)(KI,c({},e))},renderHeader:function(){return null}}),JI=function(e,t){var n,r,o,i;return c({},e,{detailPanel:{heightCache:{},expandedRowIds:null!=(n=null!=(r=t.detailPanelExpandedRowIds)?r:null==(o=t.initialState)||null==(i=o.detailPanel)?void 0:i.expandedRowIds)?n:[]}})};function ZI(e,t,n,r){if("function"!==typeof t)return{};var o=AT(e),i=o.reduce((function(n,r){var o=e.current.getRowParams(r);return n[r]=t(o),n}),{}),a=o.reduce((function(t,o){var a;if(null==i[o])return t;var s=e.current.getRowParams(o),c=n(s),l="auto"===c;return t[o]={autoHeight:l,height:l?null==(a=r[o])?void 0:a.height:c},t}),{});return{contentCache:i,heightCache:a}}var eD=function(e,n){var r=RT(e,"useGridRowReorder"),o=rT(e,jT),i=rT(e,vT),a=t.useRef(null),c=t.useRef(null),l=t.useRef(),p=function(e){return Cf({rowDragging:["row--dragging"]},kE,e.classes)}({classes:n.classes}),u=s(t.useState(""),2),d=u[0],b=u[1];t.useEffect((function(){return function(){clearTimeout(l.current)}}),[]);var f=t.useMemo((function(){return!n.rowReordering||!!o.length||1!==i}),[n.rowReordering,o,i]),h=t.useCallback((function(t,n){var o=TX(e.current.state);f||0!==Object.keys(o).length||(r.debug("Start dragging row ".concat(t.id)),n.stopPropagation(),a.current=n.currentTarget,a.current.classList.add(p.rowDragging),b(t.id),l.current=setTimeout((function(){a.current.classList.remove(p.rowDragging)})),c.current=e.current.getRowIndex(t.id))}),[f,p.rowDragging,r,e]),M=t.useCallback((function(t,n){var o;if(""!==d&&(null==(o=e.current.getRowNode(t.id))||!o.isPinned)&&(r.debug("Dragging over row ".concat(t.id)),n.preventDefault(),n.stopPropagation(),t.id!==d)){var i=e.current.getRowIndex(t.id);e.current.setRowIndex(d,i)}}),[e,r,d]),z=t.useCallback((function(t,n){var o=TX(e.current.state);if(""!==d&&!f&&0===Object.keys(o).length){if(r.debug("End dragging row"),n.preventDefault(),n.stopPropagation(),clearTimeout(l.current),a.current=null,"none"===n.dataTransfer.dropEffect)e.current.setRowIndex(d,c.current),c.current=null;else{var i={row:e.current.getRow(d),targetIndex:e.current.getRowIndex(t.id),oldIndex:c.current};e.current.publishEvent("rowOrderChange",i)}b("")}}),[f,r,e,d]);xN(e,"rowDragStart",h),xN(e,"rowDragOver",M),xN(e,"rowDragEnd",z),xN(e,"cellDragOver",M),wN(e,"rowOrderChange",n.onRowOrderChange)},tD=function(e){var n,r=oT(),o=cI(),i=rT(r,jT),a=rT(r,vT),s=rT(r,TX),l=e.row.__reorder__||e.id,p=t.useMemo((function(){return!!o.rowReordering&&!i.length&&1===a&&0===Object.keys(s).length}),[o.rowReordering,i,a,s]),u=function(e){return Cf({root:["rowReorderCell",e.isDraggable&&"rowReorderCell--draggable"],placeholder:["rowReorderCellPlaceholder"]},kE,e.classes)}({isDraggable:p,classes:o.classes}),d=t.useCallback((function(t,n){return function(o){(1!==o.target.nodeType||o.currentTarget.contains(o.target))&&r.current.getRow(e.id)&&(r.current.publishEvent(t,r.current.getRowParams(e.id),o),n&&n(o))}}),[r,e.id]),b=p?{onDragStart:d("rowDragStart"),onDragOver:d("rowDragOver"),onDragEnd:d("rowDragEnd")}:null;return"body"!==(null!=(n=e.rowNode.position)?n:"body")?null:(0,Cn.jsxs)("div",c({className:u.root,draggable:p},b,{children:[(0,Cn.jsx)(o.components.RowReorderIcon,{}),(0,Cn.jsx)("div",{className:u.placeholder,children:l})]}))},nD=c({},cB,{field:"__reorder__",type:"reorder",sortable:!1,filterable:!1,width:50,align:"center",headerAlign:"center",disableColumnMenu:!0,disableExport:!0,disableReorder:!0,resizable:!1,aggregable:!1,renderHeader:function(){return" "},renderCell:function(e){return e.rowNode.isPinned?null:(0,Cn.jsx)(tD,c({},e))}}),rD=function(e,n){var r=function(e){var n=e.classes;return t.useMemo((function(){return Cf({rowReorderCellContainer:["rowReorderCellContainer"],columnHeaderReorder:["columnHeaderReorder"]},kE,n)}),[n])}({classes:n.classes}),o=t.useCallback((function(t){var o=c({},nD,{cellClassName:r.rowReorderCellContainer,headerClassName:r.columnHeaderReorder,headerName:e.current.getLocaleText("rowReorderingHeaderName")}),i=n.rowReordering,a=null!=t.lookup[o.field];return i&&a||(i&&!a?(t.lookup[o.field]=o,t.all=[o.field].concat(Le(t.all))):!i&&a&&(delete t.lookup[o.field],t.all=t.all.filter((function(e){return e!==o.field})))),t}),[e,r,n.rowReordering]);NN(e,"hydrateColumns",o)};function oD(e){var t=e.lazyLoadingFeatureFlag,n=e.rowsLoadingMode,r=e.gridDimensions;return!t||!r||n!==JX}function iD(e,t){var n,r,o={topIds:[],bottomIds:[],idLookup:{}};return null==e||null==(n=e.top)||n.forEach((function(e){var n=wX(e,t);o.topIds.push(n),o.idLookup[n]=e})),null==e||null==(r=e.bottom)||r.forEach((function(e){var n=wX(e,t);o.bottomIds.push(n),o.idLookup[n]=e})),o}var aD=function(e,t,n){var r,o;return null!=(r=t.experimentalFeatures)&&r.rowPinning?(n.current.unstable_caches.pinnedRows=iD(t.pinnedRows,t.getRowId),c({},e,{rows:c({},e.rows,{additionalRowGroups:c({},null==(o=e.rows)?void 0:o.additionalRowGroups,{pinnedRows:{top:[],bottom:[]}})})})):e};function sD(e){var t,n=e.groupingParams,r=e.rowModel,o=e.rowId,i=e.position,a=e.apiRef,s=c({},n.idRowsLookup),l=c({},n.tree);s[o]=r,l[o]={id:o,isAutoGenerated:!1,parent:null,depth:0,groupingKey:null,groupingField:null,isPinned:!0},a.current.unstable_caches.rows.idRowsLookup[o]=c({},r),a.current.unstable_caches.rows.idToIdLookup[o]=o;var p=(null==(t=n.additionalRowGroups)?void 0:t.pinnedRows)||{},u={id:o,model:r};return c({},n,{idRowsLookup:s,tree:l,additionalRowGroups:c({},n.additionalRowGroups,{pinnedRows:c({},p,ne({},i,[].concat(Le(p[i]||[]),[u])))})})}var cD=function(e,n){var r,o,i=EN(e,n);return function(e,n){var r,o=t.useCallback((function(e){var t;if(null==(t=n.experimentalFeatures)||!t.columnGrouping)return e;var r=IN(n.columnGroupingModel);return e.all.forEach((function(t){var n,o,i=null!=(n=r[t])?n:[],a=e.lookup[t];(function(e){return void 0!==e.groupPath})(a)&&lN(i,null==a?void 0:a.groupPath)||(e.lookup[t]=c({},e.lookup[t],{groupPath:null!=(o=r[t])?o:[]}))})),e}),[n.columnGroupingModel,null==(r=n.experimentalFeatures)?void 0:r.columnGrouping]);NN(e,"hydrateColumns",o)}(i,n),mB(i,n),rD(i,n),bI(i,n),function(e,n){var r,o=(null!=(r=n.experimentalFeatures)?r:{}).lazyLoading,i=t.useCallback((function(e){if(!o||n.rowsLoadingMode!==JX||!n.rowCount||e.ids.length>=n.rowCount)return e;for(var t,r=Le(e.ids),i=0;i=b.length)&&(r=t.all.indexOf(e)),null!==b[r])for(r=0;null!==b[r];)r+=1;n[r]=e,b[r]=e,f.splice(f.indexOf(e),1)}));var h=0;f.forEach((function(e){for(;null!==b[h];)h+=1;b[h]=e,n[h]=e})),e.current.unstable_caches.columnPinning.orderedFieldsBeforePinningColumns=b}else n=Le(t.all),e.current.unstable_caches.columnPinning.orderedFieldsBeforePinningColumns=Le(t.all);p.current=u;var M=n.filter((function(e){return!i.includes(e)&&!l.includes(e)}));return c({},t,{all:[].concat(Le(i),Le(M),Le(l))})}),[e,r,a]);NN(e,"hydrateColumns",u)}(i,n),function(e){gB(e,SN,"rowTreeCreation",vB)}(i),AB(jB,i,n),AB(JI,i,n),AB(GI,i,n),AB(xX,i,n),AB(aD,i,n),AB(LX,i,n),AB(null!=(r=n.experimentalFeatures)&&r.newEditingApi?HX:GX,i,n),AB(QX,i,n),AB(ZX,i,n),AB(tj,i,n),AB(bj,i,n),AB(hj,i,n),AB(Gj,i,n),AB(oI,i,n),AB(vj,i,n),AB(yj,i,n),AB(qj,i,n),AB(FN,i,n),function(e){var n=t.useCallback((function(t,n){if("treeDataGroup"===e.current.getCellParams(t.id,t.field).colDef.type&&" "===n.key&&!n.shiftKey){var r;if(0===(null!=(r=UT(e)[t.id])?r:0))return;e.current.setRowChildrenExpansion(t.id,!t.rowNode.childrenExpanded)}}),[e]);xN(e,"cellKeyDown",n)}(i),wj(i,n),function(e,n){var r=RT(e,"useGridSelection"),o=t.useMemo((function(){return XB(n.selectionModel,uP(e.current.state))}),[e,n.selectionModel]),i=t.useRef(null);e.current.unstable_registerControlState({stateId:"selection",propModel:o,propOnChange:n.onSelectionModelChange,stateSelector:uP,changeEvent:"selectionChange"});var a=n.checkboxSelection,l=n.disableMultipleSelection,p=n.disableSelectionOnClick,u=n.pagination,d=n.paginationMode,b=n.isRowSelectable,f=!l||a,h=PB(e,n),M=t.useCallback((function(t){var n,r=t,o=null!=(n=i.current)?n:t,a=e.current.isRowSelected(t);if(a){var s=YT(e),c=s.findIndex((function(e){return e===o})),l=s.findIndex((function(e){return e===r}));if(c===l)return;r=c>l?s[l+1]:s[l-1]}i.current=t,e.current.selectRowRange({startId:o,endId:r},!a)}),[e]),z=t.useCallback((function(t){uP(e.current.state)!==t&&(r.debug("Setting selection model"),e.current.setState((function(e){return c({},e,{selection:t})})),e.current.forceUpdate())}),[e,r]),O=t.useCallback((function(t){return uP(e.current.state).includes(t)}),[e]),m=t.useCallback((function(t){if(b&&!b(e.current.getRowParams(t)))return!1;var n=e.current.getRowNode(t);return!("footer"===(null==n?void 0:n.position)||null!=n&&n.isPinned)}),[e,b]),g=t.useCallback((function(){return bP(e)}),[e]),v=t.useCallback((function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.current.isRowSelectable(t))if(i.current=t,o)r.debug("Setting selection for row ".concat(t)),e.current.setSelectionModel(n?[t]:[]);else{r.debug("Toggling selection for row ".concat(t));var a=uP(e.current.state).filter((function(e){return e!==t}));n&&a.push(t),(a.length<2||f)&&e.current.setSelectionModel(a)}}),[e,r,f]),A=t.useCallback((function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r.debug("Setting selection for several rows");var i,a=t.filter((function(t){return e.current.isRowSelectable(t)}));if(o)i=n?a:[];else{var s=c({},fP(e));a.forEach((function(e){n?s[e]=e:delete s[e]})),i=Object.values(s)}(i.length<2||f)&&e.current.setSelectionModel(i)}),[e,r,f]),y=t.useCallback((function(t){var n=t.startId,o=t.endId,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0;if(e.current.getRow(n)&&e.current.getRow(o)){r.debug("Expanding selection from row ".concat(n," to row ").concat(o));var c=YT(e),l=c.indexOf(n),p=c.indexOf(o),u=s(l>p?[p,l]:[l,p],2),d=u[0],b=u[1],f=c.slice(d,b+1);e.current.selectRows(f,i,a)}}),[e,r]);zN(e,{selectRow:v,selectRows:A,selectRowRange:y,setSelectionModel:z,getSelectedRows:g,isRowSelected:O,isRowSelectable:m});var x=t.useCallback((function(){if(!n.keepNonExistentRowsSelected){var t=uP(e.current.state),r=zT(e),o=c({},fP(e)),i=!1;t.forEach((function(e){r[e]||(delete o[e],i=!0)})),i&&e.current.setSelectionModel(Object.values(o))}}),[e,n.keepNonExistentRowsSelected]),q=t.useCallback((function(t,n){var r=n.metaKey||n.ctrlKey,o=!a&&!r&&!tP(n),i=!f||o,s=e.current.isRowSelected(t);i?e.current.selectRow(t,!!o||!s,!0):e.current.selectRow(t,!s,!1)}),[e,f,a]),w=t.useCallback((function(t,n){if(!p&&t.field!==OB.field&&t.field!==BB){if(t.field&&e.current.getColumn(t.field).type===EB)return;t.rowNode.isPinned||(n.shiftKey&&(f||a)?M(t.id):q(t.id,n))}}),[p,f,a,e,M,q]),W=t.useCallback((function(e,t){var n;f&&t.shiftKey&&(null==(n=window.getSelection())||n.removeAllRanges())}),[f]),R=t.useCallback((function(t,n){n.nativeEvent.shiftKey?M(t.id):e.current.selectRow(t.id,t.value)}),[e,M]),C=t.useCallback((function(t){var r=n.checkboxSelectionVisibleOnly&&n.pagination?gP(e):YT(e);e.current.selectRows(r,t.value)}),[e,n.checkboxSelectionVisibleOnly,n.pagination]),_=t.useCallback((function(t,n){if(e.current.getCellMode(t.id,t.field)!==qB.Edit&&n.currentTarget.contains(n.target)){if(eP(n.key)&&n.shiftKey){var r=aP(e);if(r&&r.id!==t.id){n.preventDefault();var o=e.current.isRowSelected(r.id);if(!f)return void e.current.selectRow(r.id,!o,!0);var i,a,s=e.current.getRowIndexRelativeToVisibleRows(r.id),c=e.current.getRowIndexRelativeToVisibleRows(t.id);s>c?o?(i=c,a=s-1):(i=c,a=s):o?(i=s+1,a=c):(i=s,a=c);var l=h.rows.slice(i,a+1).map((function(e){return e.id}));return void e.current.selectRows(l,!o)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void q(t.id,n);"a"===n.key.toLowerCase()&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),A(e.current.getAllRowIds(),!0))}}),[e,q,A,h.rows,f]);xN(e,"sortedRowsSet",x),xN(e,"cellClick",w),xN(e,"rowSelectionCheckboxChange",R),xN(e,"headerSelectionCheckboxChange",C),xN(e,"cellMouseDown",W),xN(e,"cellKeyDown",_),t.useEffect((function(){void 0!==o&&e.current.setSelectionModel(o)}),[e,o]);var S=null!=o;t.useEffect((function(){if(!S){var t=uP(e.current.state);if(m){var n=t.filter((function(e){return m(e)}));n.length1){var n=NB(e,{pagination:u,paginationMode:d}).rows.reduce((function(e,t){return e[t.id]=!0,e}),{}),r=t.find((function(e){var t=!0;return m&&(t=m(e)),t&&n[e]}));e.current.setSelectionModel(void 0!==r?[r]:[])}}),[e,f,a,l,m,u,d])}(i,n),function(e,n){var r,o=rT(e,hI),i=t.useCallback((function(t){var r,i,a,s;if(!n.disableColumnPinning&&(Array.isArray(o.left)||Array.isArray(o.right))&&(null!=(r=null==(i=o.left)?void 0:i.length)?r:0)+(null!=(a=null==(s=o.right)?void 0:s.length)?a:0)!==0){var c=t.currentTarget.dataset.rowindex;e.current.windowRef.current.querySelectorAll(".".concat(LE.row,'[data-rowindex="').concat(c,'"]')).forEach((function(n){n.closest(".".concat(LE.virtualScroller))===e.current.windowRef.current&&("mouseenter"===t.type?n.classList.add("Mui-hovered"):n.classList.remove("Mui-hovered"))}))}}),[e,o.left,o.right,n.disableColumnPinning]),a=t.useCallback((function(e,t){i(t)}),[i]),l=t.useCallback((function(e,t){i(t)}),[i]);xN(e,"rowMouseEnter",a),xN(e,"rowMouseLeave",l);var p=t.useCallback((function(t,r){if(n.disableColumnPinning)return t;var i=$E(e),a=s(PI(o,i),2),l=a[0],p=a[1];if(!r.colIndex||0===l.length&&0===p.length)return t;var u=QE(e),d=ZE(e),b=JE(e),f=e.current.windowRef.current.clientWidth,h=e.current.windowRef.current.scrollLeft,M=u[r.colIndex].computedWidth,z=b[r.colIndex],O=b[l.length],m=d-b[b.length-p.length],g=z+M;return g-(f-m)>h?c({},t,{left:g-(f-m)}):z0&&r0?!(r>=QE(e).length-l.length)&&t:t)}),[e,o]),b=t.useCallback((function(t,r){var o,i,a,s=hI(e.current.state);return!r.exportOnlyDirtyModels||null!=n.pinnedColumns||null!=(null==(o=n.initialState)?void 0:o.pinnedColumns)||(null!=(i=s.left)?i:[]).length>0||(null!=(a=s.right)?a:[]).length>0?c({},t,{pinnedColumns:s}):t}),[e,n.pinnedColumns,null==(r=n.initialState)?void 0:r.pinnedColumns]),f=t.useCallback((function(t,n){var r=n.stateToRestore.pinnedColumns;return null!=r&&e.current.setState(YI(r)),t}),[e]);NN(e,"scrollToIndexes",p),NN(e,"columnMenu",u),NN(e,"canBeReordered",d),NN(e,"exportState",b),NN(e,"restoreState",f),e.current.unstable_registerControlState({stateId:"pinnedColumns",propModel:n.pinnedColumns,propOnChange:n.onPinnedColumnsChange,stateSelector:hI,changeEvent:"pinnedColumnsChange"});var h=t.useCallback((function(e){if(n.disableColumnPinning)throw new Error("MUI: You cannot call `apiRef.current.".concat(e,"` when `disableColumnPinning` is true."))}),[n.disableColumnPinning]),M=t.useCallback((function(t,n){var r;if(h("pinColumn"),e.current.isColumnPinned(t)!==n){var i=n===rI.right?rI.left:rI.right,a=(ne(r={},n,[].concat(Le(o[n]||[]),[t])),ne(r,i,(o[i]||[]).filter((function(e){return e!==t}))),r);e.current.setPinnedColumns(a)}}),[e,h,o]),z=t.useCallback((function(t){h("unpinColumn"),e.current.setPinnedColumns({left:(o.left||[]).filter((function(e){return e!==t})),right:(o.right||[]).filter((function(e){return e!==t}))})}),[e,h,o.left,o.right]),O=t.useCallback((function(){return h("getPinnedColumns"),hI(e.current.state)}),[e,h]),m=t.useCallback((function(t){h("setPinnedColumns"),e.current.setState(YI(t)),e.current.forceUpdate()}),[e,h]),g=t.useCallback((function(e){return h("isColumnPinned"),(o.left||[]).includes(e)?rI.left:!!(o.right||[]).includes(e)&&rI.right}),[o.left,o.right,h]);zN(e,{pinColumn:M,unpinColumn:z,getPinnedColumns:O,setPinnedColumns:m,isColumnPinned:g});var v=t.useCallback((function(t){if(e.current.unstable_caches.columnPinning.orderedFieldsBeforePinningColumns){for(var n=t.field,r=t.targetIndex,o=r>t.oldIndex?1:-1,i=UE(e)[r-o],a=Le(e.current.unstable_caches.columnPinning.orderedFieldsBeforePinningColumns),s=a.findIndex((function(e){return e===n})),c=s+o,l=a.findIndex((function(e){return e===i}));o>0?sl;){for(;e.current.isColumnPinned(a[c]);)c+=o;var p=a[s];a[s]=a[c],a[c]=p,c=(s=c)+o}e.current.unstable_caches.columnPinning.orderedFieldsBeforePinningColumns=a}}),[e]);xN(e,"columnOrderChange",v),t.useEffect((function(){n.pinnedColumns&&e.current.setPinnedColumns(n.pinnedColumns)}),[e,n.pinnedColumns])}(i,n),function(e,n){var r,o=t.useCallback((function(t){var r;null!=(r=n.experimentalFeatures)&&r.rowPinning&&(e.current.unstable_caches.pinnedRows=iD(t,n.getRowId),e.current.unstable_requestPipeProcessorsApplication("hydrateRows"))}),[e,null==(r=n.experimentalFeatures)?void 0:r.rowPinning,n.getRowId]);zN(e,{unstable_setPinnedRows:o});var i=t.useRef(!0);t.useEffect((function(){i.current?i.current=!1:e.current.unstable_setPinnedRows(n.pinnedRows)}),[e,n.pinnedRows])}(i,n),function(e,n){var r,o,i=RT(e,"useGridColumns"),a=t.useMemo((function(){return zX(n.columnTypes)}),[n.columnTypes]),s=t.useRef(n.columns),l=t.useRef(a);e.current.unstable_registerControlState({stateId:"visibleColumns",propModel:n.columnVisibilityModel,propOnChange:n.onColumnVisibilityModelChange,stateSelector:KE,changeEvent:"columnVisibilityModelChange"});var p=t.useCallback((function(t){i.debug("Updating columns state."),e.current.setState(vX(t)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",t.all)}),[i,e]),u=t.useCallback((function(t){return GE(e)[t]}),[e]),d=t.useCallback((function(){return YE(e)}),[e]),b=t.useCallback((function(){return QE(e)}),[e]),f=t.useCallback((function(){return nT(e)}),[e]),h=t.useCallback((function(t){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?QE(e):YE(e)).findIndex((function(e){return e.field===t}))}),[e]),M=t.useCallback((function(t){var n=h(t);return JE(e)[n]}),[e,h]),z=t.useCallback((function(t){KE(e)!==t&&(e.current.setState((function(n){return c({},n,{columns:gX({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!1,currentColumnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})})})),e.current.forceUpdate())}),[e,a]),O=t.useCallback((function(t){var n=gX({apiRef:e,columnTypes:a,columnsToUpsert:t,initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!0,keepOnlyColumnsToUpsert:!1});p(n)}),[e,p,a]),m=t.useCallback((function(t){return e.current.updateColumns([t])}),[e]),g=t.useCallback((function(t,n){if(e.current.unstable_caches.columns.isUsingColumnVisibilityModel){var r,o=KE(e);if(n!==(null==(r=o[t])||r)){var i=c({},o,ne({},t,n));e.current.setColumnVisibilityModel(i)}}else{var a=c({},e.current.getColumn(t),{hide:!n});e.current.updateColumns([a]);var s={field:t,colDef:a,isVisible:n};e.current.publishEvent("columnVisibilityChange",s)}}),[e]),v=t.useCallback((function(t,n){var r=UE(e),o=r.findIndex((function(e){return e===t}));if(o!==n){i.debug("Moving column ".concat(t," to index ").concat(n));var a=Le(r),s=a.splice(o,1)[0];a.splice(n,0,s),p(c({},VE(e.current.state),{all:a}));var l={field:t,element:e.current.getColumnHeaderElement(t),colDef:e.current.getColumn(t),targetIndex:n,oldIndex:o};e.current.publishEvent("columnOrderChange",l)}}),[e,i,p]),A=t.useCallback((function(t,n){i.debug("Updating column ".concat(t," width to ").concat(n));var r=c({},e.current.getColumn(t),{width:n});e.current.updateColumns([r]),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:r,width:n})}),[e,i]);zN(e,{getColumn:u,getAllColumns:d,getColumnIndex:h,getColumnPosition:M,getVisibleColumns:b,getColumnsMeta:f,updateColumn:m,updateColumns:O,setColumnVisibilityModel:z,setColumnVisibility:g,setColumnIndex:v,setColumnWidth:A});var y=t.useCallback((function(t,r){var o={};if(e.current.unstable_caches.columns.isUsingColumnVisibilityModel){var i,a,s,l=KE(e);(!r.exportOnlyDirtyModels||null!=n.columnVisibilityModel||Object.keys(null!=(i=null==(a=n.initialState)||null==(s=a.columns)?void 0:s.columnVisibilityModel)?i:{}).length>0||Object.keys(l).length>0)&&(o.columnVisibilityModel=l)}o.orderedFields=UE(e);var p=YE(e),u={};return p.forEach((function(e){if(e.hasBeenResized){var t={};MX.forEach((function(n){var r=e[n];r===1/0&&(r=-1),t[n]=r})),u[e.field]=t}})),Object.keys(u).length>0&&(o.dimensions=u),c({},t,{columns:o})}),[e,n.columnVisibilityModel,null==(r=n.initialState)?void 0:r.columns]),x=t.useCallback((function(t,n){var r,o=e.current.unstable_caches.columns.isUsingColumnVisibilityModel?null==(r=n.stateToRestore.columns)?void 0:r.columnVisibilityModel:void 0,i=n.stateToRestore.columns;if(null==o&&null==i)return t;var s=gX({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:i,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,currentColumnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(vX(s)),null!=i&&e.current.publishEvent("columnsChange",s.all),t}),[e,a]),q=t.useCallback((function(e,t){if(t===OX.columns){var r,o=n.components.ColumnsPanel;return(0,Cn.jsx)(o,c({},null==(r=n.componentsProps)?void 0:r.columnsPanel))}return e}),[n.components.ColumnsPanel,null==(o=n.componentsProps)?void 0:o.columnsPanel]);NN(e,"exportState",y),NN(e,"restoreState",x),NN(e,"preferencePanel",q);var w=t.useRef(null);xN(e,"viewportInnerSizeChange",(function(t){w.current!==t.width&&(w.current=t.width,p(mX(VE(e.current.state),t.width)))})),wN(e,"columnVisibilityChange",n.onColumnVisibilityChange);var W=t.useCallback((function(){i.info("Columns pipe processing have changed, regenerating the columns");var t=gX({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,keepOnlyColumnsToUpsert:!1});p(t)}),[e,i,p,a]);IB(e,"hydrateColumns",W);var R=t.useRef(!0);t.useEffect((function(){if(R.current)R.current=!1;else if(i.info("GridColumns have changed, new length ".concat(n.columns.length)),s.current!==n.columns||l.current!==a){var t=gX({apiRef:e,columnTypes:a,initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,columnsToUpsert:n.columns,keepOnlyColumnsToUpsert:!0});s.current=n.columns,l.current=a,p(t)}}),[i,e,p,n.columns,a]),t.useEffect((function(){void 0!==n.columnVisibilityModel&&e.current.setColumnVisibilityModel(n.columnVisibilityModel)}),[e,i,n.columnVisibilityModel])}(i,n),EX(i,n),_j(i),function(e,n){var r=rT(e,CI),o=rT(e,_I),i=t.useCallback((function(r,i){if(r.field===QI&&null!=n.getDetailPanelContent){var a=o[r.id];t.isValidElement(a)&&i.target!==i.currentTarget&&e.current.toggleDetailPanel(r.id)}}),[e,o,n.getDetailPanelContent]),a=t.useCallback((function(t,r){null!=n.getDetailPanelContent&&(!r.ctrlKey&&!r.metaKey||"Enter"!==r.key?t.field===QI&&" "===r.key&&e.current.toggleDetailPanel(t.id):e.current.toggleDetailPanel(t.id))}),[e,n.getDetailPanelContent]);xN(e,"cellClick",i),xN(e,"cellKeyDown",a),e.current.unstable_registerControlState({stateId:"detailPanels",propModel:n.detailPanelExpandedRowIds,propOnChange:n.onDetailPanelExpandedRowIdsChange,stateSelector:CI,changeEvent:"detailPanelsExpandedRowIdsChange"});var s=t.useCallback((function(r){if(null!=n.getDetailPanelContent){var i=o[r];if(t.isValidElement(i)){var a=e.current.getExpandedDetailPanels();e.current.setExpandedDetailPanels(a.includes(r)?a.filter((function(e){return e!==r})):[].concat(Le(a),[r]))}}}),[e,o,n.getDetailPanelContent]),l=t.useCallback((function(){return CI(e.current.state)}),[e]),p=t.useCallback((function(t){e.current.setState((function(e){return c({},e,{detailPanel:c({},e.detailPanel,{expandedRowIds:t})})})),e.current.forceUpdate()}),[e]),u=t.useCallback((function(t,n){var r=SI(e.current.state);r[t]&&r[t].height!==n&&(e.current.setState((function(e){return c({},e,{detailPanel:c({},e.detailPanel,{heightCache:c({},r,ne({},t,c({},r[t],{height:n})))})})})),e.current.unstable_requestPipeProcessorsApplication("rowHeight"))}),[e]),d=t.useCallback((function(t){var n=SI(e.current.state);return!!n[t]&&n[t].autoHeight}),[e]);zN(e,{toggleDetailPanel:s,getExpandedDetailPanels:l,setExpandedDetailPanels:p,unstable_storeDetailPanelHeight:u,unstable_detailPanelHasAutoHeight:d}),t.useEffect((function(){n.detailPanelExpandedRowIds&&CI(e.current.state)!==n.detailPanelExpandedRowIds&&e.current.setExpandedDetailPanels(n.detailPanelExpandedRowIds)}),[e,n.detailPanelExpandedRowIds]);var b=t.useCallback((function(){e.current.setState((function(t){return c({},t,{detailPanel:c({},t.detailPanel,ZI(e,n.getDetailPanelContent,n.getDetailPanelHeight,t.detailPanel.heightCache))})})),e.current.forceUpdate()}),[e,n.getDetailPanelContent,n.getDetailPanelHeight]);xN(e,"sortedRowsSet",b);var f=t.useRef(),h=t.useRef(),M=t.useCallback((function(){n.getDetailPanelContent===f.current&&n.getDetailPanelHeight===h.current||(e.current.setState((function(t){return c({},t,{detailPanel:c({},t.detailPanel,ZI(e,n.getDetailPanelContent,n.getDetailPanelHeight,t.detailPanel.heightCache))})})),f.current=n.getDetailPanelContent,h.current=n.getDetailPanelHeight)}),[e,n.getDetailPanelContent,n.getDetailPanelHeight]),z=t.useCallback((function(t,n){var o;return r&&0!==r.length&&r.includes(n.id)?(M(),c({},t,{detail:null!=(o=kI(e)[n.id])?o:0})):c({},t,{detail:0})}),[e,r,M]);NN(e,"rowHeight",z);var O=t.useRef(!0);O.current&&(O.current=!1,M())}(i,n),function(e){var n=t.useRef({}),r=t.useCallback((function(e,t,r){var o=n.current;o[e]||(o[e]={}),o[e][t]=r}),[]),o=t.useCallback((function(e,t){var r;return null==(r=n.current[e])?void 0:r[t]}),[]),i=t.useCallback((function(t){var n=t.columnIndex,o=t.rowId,i=t.minFirstColumnIndex,a=t.maxLastColumnIndex,s=t.columns,c=s.length,l=s[n],p="function"===typeof l.colSpan?l.colSpan(e.current.getCellParams(o,l.field)):l.colSpan;if(!p||1===p)return r(o,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:l.computedWidth}}),{colSpan:1};for(var u=l.computedWidth,d=1;d=i&&b1&&(a+=s.colSpan-1)}}),[i]);zN(e,{unstable_getCellColSpanInfo:o,unstable_calculateColSpan:a});var s=t.useCallback((function(){n.current={}}),[]);xN(e,"columnOrderChange",s)}(i),function(e,n){var r,o=t.useCallback((function(t){var n,r;return null!=(n=null==(r=GE(e)[t])?void 0:r.groupPath)?n:[]}),[e]),i=t.useCallback((function(){return BN(e)}),[e]);zN(e,{unstable_getColumnGroupPath:o,unstable_getAllGroupDetails:i});var a=t.useRef(!0);t.useEffect((function(){var t,r;if(a.current)a.current=!1;else if(null!=(t=n.experimentalFeatures)&&t.columnGrouping){var o=DN(null!=(r=n.columnGroupingModel)?r:[]);e.current.setState((function(e){return c({},e,{columnGrouping:c({},e.columnGrouping,{lookup:o})})}))}}),[e,n.columnGroupingModel,null==(r=n.experimentalFeatures)?void 0:r.columnGrouping])}(i,n),(null!=(o=n.experimentalFeatures)&&o.newEditingApi?VX:YX)(i,n),function(e,n){var r=RT(e,"useGridFocus"),o=t.useRef(null),i=t.useCallback((function(t,n){t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),n)}),[e]),a=t.useCallback((function(t,n){var o=aP(e);(null==o?void 0:o.id)===t&&(null==o?void 0:o.field)===n||(e.current.setState((function(e){return r.debug("Focusing on cell with id=".concat(t," and field=").concat(n)),c({},e,{tabIndex:{cell:{id:t,field:n},columnHeader:null},focus:{cell:{id:t,field:n},columnHeader:null}})})),e.current.forceUpdate(),e.current.getRow(t)&&(o&&i(o,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,n))))}),[e,r,i]),s=t.useCallback((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=aP(e);i(o,n),e.current.setState((function(e){return r.debug("Focusing on column header with colIndex=".concat(t)),c({},e,{tabIndex:{columnHeader:{field:t},cell:null},focus:{columnHeader:{field:t},cell:null}})})),e.current.forceUpdate()}),[e,r,i]),l=t.useCallback((function(t,r,o){var i=e.current.getColumnIndex(r),a=e.current.getRowIndexRelativeToVisibleRows(t),s=QE(e);"right"===o?i+=1:"left"===o?i-=1:a+=1;var c=NB(e,{pagination:n.pagination,paginationMode:n.paginationMode});i>=s.length?(a+=1)=0&&(i=s.length-1),a=cN(a,0,c.rows.length-1);var l=c.rows[a],p=e.current.unstable_getCellColSpanInfo(l.id,i);p&&p.spannedByColSpan&&("left"===o||"below"===o?i=p.leftVisibleCellIndex:"right"===o&&(i=p.rightVisibleCellIndex));var u=s[i=cN(i,0,s.length-1)];e.current.setCellFocus(l.id,u.field)}),[e,n.pagination,n.paginationMode]),p=t.useCallback((function(t){var n=t.id,r=t.field;e.current.setCellFocus(n,r)}),[e]),u=t.useCallback((function(t,n){"Enter"===n.key||"Tab"===n.key||eP(n.key)||e.current.setCellFocus(t.id,t.field)}),[e]),d=t.useCallback((function(t,n){var r=t.field;n.target===n.currentTarget&&e.current.setColumnHeaderFocus(r,n)}),[e]),b=t.useCallback((function(){r.debug("Clearing focus"),e.current.setState((function(e){return c({},e,{focus:{cell:null,columnHeader:null}})}))}),[r,e]),f=t.useCallback((function(e){o.current=e}),[]),h=t.useCallback((function(t){var n=o.current;o.current=null;var r=aP(e);if(r){if((null==n?void 0:n.id)!==r.id||(null==n?void 0:n.field)!==r.field){var a=e.current.getCellElement(r.id,r.field);null!=a&&a.contains(t.target)||(n?e.current.setCellFocus(n.id,n.field):(e.current.setState((function(e){return c({},e,{focus:{cell:null,columnHeader:null}})})),e.current.forceUpdate(),i(r,t)))}}else n&&e.current.setCellFocus(n.id,n.field)}),[e,i]),M=t.useCallback((function(t){if("view"!==t.cellMode){var n=aP(e);(null==n?void 0:n.id)===t.id&&(null==n?void 0:n.field)===t.field||e.current.setCellFocus(t.id,t.field)}}),[e]),z=t.useCallback((function(){var t=aP(e);t&&!e.current.getRow(t.id)&&e.current.setState((function(e){return c({},e,{focus:{cell:null,columnHeader:null}})}))}),[e]);zN(e,{setCellFocus:a,setColumnHeaderFocus:s,unstable_moveFocusToRelativeCell:l}),t.useEffect((function(){var t=Mz(e.current.rootElementRef.current);return t.addEventListener("click",h),function(){t.removeEventListener("click",h)}}),[e,h]),xN(e,"columnHeaderBlur",b),xN(e,"cellDoubleClick",p),xN(e,"cellMouseDown",f),xN(e,"cellKeyDown",u),xN(e,"cellModeChange",M),xN(e,"columnHeaderFocus",d),xN(e,"rowsSet",z)}(i,n),function(e,n){var r,o=RT(e,"useGridPreferencesPanel"),i=t.useRef(),a=t.useRef(),s=t.useCallback((function(){o.debug("Hiding Preferences Panel");var t=ej(e.current.state);t.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:t.openedPanelValue}),e.current.setState((function(e){return c({},e,{preferencePanel:{open:!1}})})),e.current.forceUpdate()}),[e,o]),l=t.useCallback((function(){a.current=setTimeout((function(){return clearTimeout(i.current)}),0)}),[]),p=t.useCallback((function(){i.current=setTimeout(s,100)}),[s]),u=t.useCallback((function(t){o.debug("Opening Preferences Panel"),l(),e.current.setState((function(e){return c({},e,{preferencePanel:c({},e.preferencePanel,{open:!0,openedPanelValue:t})})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t}),e.current.forceUpdate()}),[o,l,e]);zN(e,{showPreferences:u,hidePreferences:p});var d=t.useCallback((function(t,r){var o,i=ej(e.current.state);return!r.exportOnlyDirtyModels||null!=(null==(o=n.initialState)?void 0:o.preferencePanel)||i.open?c({},t,{preferencePanel:i}):t}),[e,null==(r=n.initialState)?void 0:r.preferencePanel]),b=t.useCallback((function(t,n){var r=n.stateToRestore.preferencePanel;return null!=r&&e.current.setState((function(e){return c({},e,{preferencePanel:r})})),t}),[e]);NN(e,"exportState",d),NN(e,"restoreState",b),t.useEffect((function(){return function(){clearTimeout(i.current),clearTimeout(a.current)}}),[])}(i,n),function(e,n){var r,o,i,a=RT(e,"useGridFilter");e.current.unstable_registerControlState({stateId:"filter",propModel:n.filterModel,propOnChange:n.onFilterModelChange,stateSelector:FT,changeEvent:"filterModelChange"});var s=t.useCallback((function(){e.current.setState((function(t){var r=FT(t,e.current.instanceId),o=n.filterMode===$X?uj(r,e):null,i=e.current.unstable_applyStrategyProcessor("filtering",{isRowMatchingFilters:o,filterModel:null!=r?r:rj()});return c({},t,{filter:c({},t.filter,i)})})),e.current.publishEvent("filteredRowsSet")}),[n.filterMode,e]),l=t.useCallback((function(){s(),e.current.forceUpdate()}),[e,s]),p=t.useCallback((function(t){var n=FT(e),r=Le(n.items),o=r.findIndex((function(e){return e.id===t.id}));-1===o?r.push(t):r[o]=t,e.current.setFilterModel(c({},n,{items:r}),"upsertFilterItem")}),[e]),u=t.useCallback((function(t){var n=FT(e),r=Le(n.items);t.forEach((function(e){var n=t.findIndex((function(t){return t.id===e.id}));-1===n?r.push(e):r[n]=e})),e.current.setFilterModel(c({},n,{items:t}),"upsertFilterItems")}),[e]),d=t.useCallback((function(t){var n=FT(e),r=n.items.filter((function(e){return e.id!==t.id}));r.length!==n.items.length&&e.current.setFilterModel(c({},n,{items:r}),"deleteFilterItem")}),[e]),b=t.useCallback((function(t){if(a.debug("Displaying filter panel"),t){var r,o=FT(e),i=o.items.filter((function(t){var n;if(void 0!==t.value)return!0;var r=null==(n=e.current.getColumn(t.columnField).filterOperators)?void 0:n.find((function(e){return e.value===t.operatorValue}));return!("undefined"===typeof(null==r?void 0:r.requiresFilterValue)||(null==r?void 0:r.requiresFilterValue))}));r=i.find((function(e){return e.columnField===t}))?i:n.disableMultipleColumnsFiltering?[oj({columnField:t},e)]:[].concat(Le(i),[oj({columnField:t},e)]),e.current.setFilterModel(c({},o,{items:r}))}e.current.showPreferences(OX.filters)}),[e,a,n.disableMultipleColumnsFiltering]),f=t.useCallback((function(){a.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,a]),h=t.useCallback((function(t){var n=FT(e);n.linkOperator!==t&&e.current.setFilterModel(c({},n,{linkOperator:t}),"changeLogicOperator")}),[e]),M=t.useCallback((function(t){var n=FT(e);lN(n.quickFilterValues,t)||e.current.setFilterModel(c({},n,{quickFilterValues:Le(t)}))}),[e]),z=t.useCallback((function(t,r){FT(e)!==t&&(a.debug("Setting filter model"),e.current.unstable_updateControlState("filter",lj(t,n.disableMultipleColumnsFiltering,e),r),e.current.unstable_applyFilters())}),[e,a,n.disableMultipleColumnsFiltering]),O=t.useCallback((function(){var t=GT(e);return new Map(t.map((function(e){return[e.id,e.model]})))}),[e]);zN(e,{setFilterLinkOperator:h,unstable_applyFilters:l,deleteFilterItem:d,upsertFilterItem:p,upsertFilterItems:u,setFilterModel:z,showFilterPanel:b,hideFilterPanel:f,getVisibleRowModels:O,setQuickFilterValues:M});var m=t.useCallback((function(t,r){var o,i,a=FT(e);return r.exportOnlyDirtyModels&&null==n.filterModel&&null==(null==(o=n.initialState)||null==(i=o.filter)?void 0:i.filterModel)&&lN(a,rj())?t:c({},t,{filter:{filterModel:a}})}),[e,n.filterModel,null==(r=n.initialState)||null==(o=r.filter)?void 0:o.filterModel]),g=t.useCallback((function(t,r){var o,i=null==(o=r.stateToRestore.filter)?void 0:o.filterModel;return null==i?t:(e.current.unstable_updateControlState("filter",lj(i,n.disableMultipleColumnsFiltering,e),"restoreState"),c({},t,{callbacks:[].concat(Le(t.callbacks),[e.current.unstable_applyFilters])}))}),[e,n.disableMultipleColumnsFiltering]),v=t.useCallback((function(e,t){if(t===OX.filters){var r,o=n.components.FilterPanel;return(0,Cn.jsx)(o,c({},null==(r=n.componentsProps)?void 0:r.filterPanel))}return e}),[n.components.FilterPanel,null==(i=n.componentsProps)?void 0:i.filterPanel]),A=t.useCallback((function(t){if(n.filterMode===$X&&t.isRowMatchingFilters){for(var r=AT(e),o={},i=0;i-1?n?i.splice(o,1,n):i.splice(o,1):i=[].concat(Le(r),[n]),i}),[e]),s=t.useCallback((function(t,r){var o,i=jT(e).find((function(e){return e.field===t.field}));if(i){var a,s=void 0===r?tB(null!=(a=t.sortingOrder)?a:n.sortingOrder,i.sort):r;return null==s?void 0:c({},i,{sort:s})}return{field:t.field,sort:void 0===r?tB(null!=(o=t.sortingOrder)?o:n.sortingOrder):r}}),[e,n.sortingOrder]),l=t.useCallback((function(){e.current.setState((function(t){if(n.sortingMode===JX)return i.debug("Skipping sorting rows as sortingMode = server"),c({},t,{sorting:c({},t.sorting,{sortedRows:AT(t,e.current.instanceId)})});var r=function(e,t){var n=e.map((function(e){return function(e,t){var n=t.current.getColumn(e.field);if(!n)return null;var r="desc"===e.sort?function(){return-1*n.sortComparator.apply(n,arguments)}:n.sortComparator;return{getSortCellParams:function(e){return{id:e,field:n.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,n.field),api:t.current}},comparator:r}}(e,t)})).filter((function(e){return!!e}));return 0===n.length?null:function(e){return e.map((function(e){return{node:e,params:n.map((function(t){return t.getSortCellParams(e.id)}))}})).sort((function(e,t){return r=e,o=t,n.reduce((function(e,t,n){if(0!==e)return e;var i=r.params[n],a=o.params[n];return t.comparator(i.value,a.value,i,a)}),0);var r,o})).map((function(e){return e.node.id}))}}(jT(t,e.current.instanceId),e),o=e.current.unstable_applyStrategyProcessor("sorting",{sortRowList:r});return c({},t,{sorting:c({},t.sorting,{sortedRows:o})})})),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()}),[e,i,n.sortingMode]),p=t.useCallback((function(t){jT(e)!==t&&(i.debug("Setting sort model"),e.current.setState(eB(t,n.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())}),[e,i,n.disableMultipleColumnsSorting]),u=t.useCallback((function(t,r,o){if(t.sortable){var i,c=s(t,r);i=!o||n.disableMultipleColumnsSorting?c?[c]:[]:a(t.field,c),e.current.setSortModel(i)}}),[e,a,s,n.disableMultipleColumnsSorting]),d=t.useCallback((function(){return jT(e)}),[e]),b=t.useCallback((function(){return XT(e).map((function(e){return e.model}))}),[e]),f=t.useCallback((function(){return BT(e)}),[e]),h=t.useCallback((function(t){return e.current.getSortedRowIds().indexOf(t)}),[e]),M=t.useCallback((function(t){return e.current.getSortedRowIds()[t]}),[e]);zN(e,{getSortModel:d,getSortedRows:b,getSortedRowIds:f,getRowIndex:h,getRowIdFromRowIndex:M,setSortModel:p,sortColumn:u,applySorting:l});var z=t.useCallback((function(t,r){var o,i,a=jT(e);return!r.exportOnlyDirtyModels||null!=n.sortModel||null!=(null==(o=n.initialState)||null==(i=o.sorting)?void 0:i.sortModel)||a.length>0?c({},t,{sorting:{sortModel:a}}):t}),[e,n.sortModel,null==(r=n.initialState)||null==(o=r.sorting)?void 0:o.sortModel]),O=t.useCallback((function(t,r){var o,i=null==(o=r.stateToRestore.sorting)?void 0:o.sortModel;return null==i?t:(e.current.setState(eB(i,n.disableMultipleColumnsSorting)),c({},t,{callbacks:[].concat(Le(t.callbacks),[e.current.applySorting])}))}),[e,n.disableMultipleColumnsSorting]),m=t.useCallback((function(t){var n=mT(e);if(!t.sortRowList){var r=[],o=[];return AT(e).forEach((function(e){n[e].isPinned||("footer"===n[e].position?o.push(e):r.push(e))})),[].concat(r,o)}var i=[],a=[];return Object.values(n).forEach((function(e){e.isPinned||("footer"===e.position?a.push(e.id):i.push(e))})),[].concat(Le(t.sortRowList(i)),a)}),[e]);NN(e,"exportState",z),NN(e,"restoreState",O),gB(e,SN,"sorting",m);var g=t.useCallback((function(e,t){var n=e.colDef,r=t.shiftKey||t.metaKey||t.ctrlKey;u(n,void 0,r)}),[u]),v=t.useCallback((function(e,t){var n=e.colDef;!VN(t.key)||t.ctrlKey||t.metaKey||u(n,void 0,t.shiftKey)}),[u]),A=t.useCallback((function(){var t=jT(e),n=GE(e);if(t.length>0){var r=t.filter((function(e){return n[e.field]}));r.length0?Math.max.apply(Math,Le(r.map((function(e){var t,n;return null!=(t=null==(n=e.groupPath)?void 0:n.length)?t:0})))):0,i=RT(e,"useDensity"),a=t.useCallback((function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.headerHeight,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.rowHeight,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;i.debug("Set grid density to ".concat(t)),e.current.setState((function(e){var n=aT(e),o=fj(t,r,a,s);return lN(n,o)?e:c({},e,{density:o})})),e.current.forceUpdate()}),[i,e,n.headerHeight,n.rowHeight,o]);t.useEffect((function(){e.current.setDensity(n.density,n.headerHeight,n.rowHeight,o)}),[e,n.density,n.rowHeight,n.headerHeight,o]),zN(e,{setDensity:a})}(i,n),Yj(i,n),function(e,n){var r=RT(e,"useGridColumnResize"),o=t.useRef(),i=t.useRef(),a=t.useRef(),s=t.useRef(),l=Wh(),p=t.useRef(),u=t.useRef(),d=t.useRef(),b=t.useRef(),f=function(e){r.debug("Updating width to ".concat(e," for col ").concat(o.current.field));var t=i.current.offsetWidth,n=e-t;o.current.computedWidth=e,o.current.width=e,o.current.flex=0,i.current.style.width="".concat(e,"px"),i.current.style.minWidth="".concat(e,"px"),i.current.style.maxWidth="".concat(e,"px"),[].concat(Le(s.current),Le(a.current)).forEach((function(t){var r,o=t;r="1"===o.getAttribute("aria-colspan")?"".concat(e,"px"):"".concat(o.offsetWidth+n,"px"),o.style.width=r,o.style.minWidth=r,o.style.maxWidth=r}))},h=oO((function(t){v(),e.current.updateColumn(o.current),clearTimeout(d.current),d.current=setTimeout((function(){var n;e.current.publishEvent("columnResizeStop",null,t),o.current&&e.current.publishEvent("columnWidthChange",{element:i.current,colDef:o.current,width:null==(n=o.current)?void 0:n.computedWidth},t)})),r.debug("Updating col ".concat(o.current.field," with new width: ").concat(o.current.width))})),M=oO((function(t){if(0!==t.buttons){var n=eI(p.current,t.clientX,i.current.getBoundingClientRect(),u.current);n=cN(n,o.current.minWidth,o.current.maxWidth),f(n);var r={element:i.current,colDef:o.current,width:n};e.current.publishEvent("columnResize",r,t)}else h(t)})),z=oO((function(t,n){var c,d,b=t.colDef;if(0===n.button&&n.currentTarget.classList.contains(LE["columnSeparator--resizable"])){n.preventDefault(),r.debug("Start Resize on col ".concat(b.field)),e.current.publishEvent("columnResizeStart",{field:b.field},n),o.current=b,i.current=null==(c=e.current.columnHeadersContainerElementRef)?void 0:c.current.querySelector('[data-field="'.concat(b.field,'"]')),a.current=Kj(null==(d=e.current.columnHeadersContainerElementRef)?void 0:d.current,b.field),s.current=Qj(i.current,e.current);var f=Mz(e.current.rootElementRef.current);f.body.style.cursor="col-resize",u.current=nI(n.currentTarget,l.direction),p.current=tI(n.clientX,i.current.getBoundingClientRect(),u.current),f.addEventListener("mousemove",M),f.addEventListener("mouseup",h)}})),O=oO((function(t){Zj(t,b.current)&&(v(),e.current.updateColumn(o.current),clearTimeout(d.current),d.current=setTimeout((function(){e.current.publishEvent("columnResizeStop",null,t)})),r.debug("Updating col ".concat(o.current.field," with new width: ").concat(o.current.width)))})),m=oO((function(t){var n=Zj(t,b.current);if(n)if("mousemove"!==t.type||0!==t.buttons){var r=eI(p.current,n.x,i.current.getBoundingClientRect(),u.current);r=cN(r,o.current.minWidth,o.current.maxWidth),f(r);var a={element:i.current,colDef:o.current,width:r};e.current.publishEvent("columnResize",a,t)}else O(t)})),g=oO((function(t){var n,c;if(Wj(t.target,LE["columnSeparator--resizable"])){Jj()||t.preventDefault();var d=t.changedTouches[0];null!=d&&(b.current=d.identifier),i.current=Wj(t.target,LE.columnHeader);var f=i.current.getAttribute("data-field"),h=e.current.getColumn(f);a.current=Kj(null==(n=e.current.columnHeadersContainerElementRef)?void 0:n.current,f),r.debug("Start Resize on col ".concat(h.field)),e.current.publishEvent("columnResizeStart",{field:f},t),o.current=h,i.current=function(e,t){return e.querySelector('[data-field="'.concat(t,'"]'))}(null==(c=e.current.columnHeadersElementRef)?void 0:c.current,h.field),s.current=Qj(i.current,e.current),u.current=nI(t.target,l.direction),p.current=tI(d.clientX,i.current.getBoundingClientRect(),u.current);var M=Mz(t.currentTarget);M.addEventListener("touchmove",m),M.addEventListener("touchend",O)}})),v=t.useCallback((function(){var t=Mz(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",M),t.removeEventListener("mouseup",h),t.removeEventListener("touchmove",m),t.removeEventListener("touchend",O)}),[e,M,h,m,O]),A=t.useCallback((function(t){var n=t.field;e.current.setState((function(e){return c({},e,{columnResize:c({},e.columnResize,{resizingColumnField:n})})})),e.current.forceUpdate()}),[e]),y=t.useCallback((function(){e.current.setState((function(e){return c({},e,{columnResize:c({},e.columnResize,{resizingColumnField:""})})})),e.current.forceUpdate()}),[e]);t.useEffect((function(){return function(){clearTimeout(d.current),v()}}),[e,g,v]),Dj(e,(function(){var t;return null==(t=e.current.columnHeadersElementRef)?void 0:t.current}),"touchstart",g,{passive:Jj()}),xN(e,"columnSeparatorMouseDown",z),xN(e,"columnResizeStart",A),xN(e,"columnResizeStop",y),wN(e,"columnResize",n.onColumnResize),wN(e,"columnWidthChange",n.onColumnWidthChange)}(i,n),Aj(i,n),function(e,n){var r=n.getRowHeight,o=n.getRowSpacing,i=n.getEstimatedRowHeight,a=t.useRef({}),l=t.useRef(-1),p=t.useRef(!1),u=rT(e,cT),d=rT(e,DT),b=rT(e,hP),f=rT(e,PT),h=PB(e,n),M=rT(e,xT),z=t.useCallback((function(){var t,n;p.current=!1;var d=uT(e.current.state,e.current.instanceId),b=function(t){a.current[t.id]||(a.current[t.id]={sizes:{baseCenter:u},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});var n=a.current[t.id],l=n.isResized,b=n.needsFirstMeasurement,f=n.sizes,M=u,z=f.baseCenter;if(l)M=z;else if(r){var O=r(c({},t,{densityFactor:d}));if("auto"===O){if(b){var m=i?i(c({},t,{densityFactor:d})):u;M=null!=m?m:u}else M=z;p.current=!0,a.current[t.id].autoHeight=!0}else M=null!=O?O:u,a.current[t.id].needsFirstMeasurement=!1,a.current[t.id].autoHeight=!1}else a.current[t.id].needsFirstMeasurement=!1;var g=c({},Object.entries(f).reduce((function(e,t){var n=s(t,2),r=n[0],o=n[1];return/^base[A-Z]/.test(r)&&(e[r]=o),e}),{}),{baseCenter:M});if(o){var v,A,y=e.current.getRowIndexRelativeToVisibleRows(t.id),x=o(c({},t,{isFirstVisible:0===y,isLastVisible:y===h.rows.length-1,indexRelativeToCurrentPage:y}));g.spacingTop=null!=(v=x.top)?v:0,g.spacingBottom=null!=(A=x.bottom)?A:0}var q=e.current.unstable_applyPipeProcessors("rowHeight",g,t);return a.current[t.id].sizes=q,q},f=[],z=h.rows.reduce((function(e,t){f.push(e);var n=0,r=0,o=b(t);return Object.entries(o).forEach((function(e){var t=s(e,2),o=t[0],i=t[1];/^base[A-Z]/.test(o)?n=i>n?i:n:r+=i})),e+n+r}),0);null==M||null==(t=M.top)||t.forEach((function(e){b(e)})),null==M||null==(n=M.bottom)||n.forEach((function(e){b(e)})),e.current.setState((function(e){return c({},e,{rowsMeta:{currentPageTotalHeight:z,positions:f}})})),p.current||(l.current=1/0),e.current.forceUpdate()}),[e,h.rows,u,r,o,i,M]),O=t.useCallback((function(e){var t=a.current[e];return t?t.sizes.baseCenter:u}),[u]),m=t.useCallback((function(e,t){a.current[e].sizes.baseCenter=t,a.current[e].isResized=!0,a.current[e].needsFirstMeasurement=!1,z()}),[z]),g=t.useMemo((function(){return KM(z)}),[z]),v=t.useCallback((function(e,t,n){if(a.current[e]&&a.current[e].autoHeight){var r=a.current[e].sizes["base".concat(Ef(n))]!==t;a.current[e].needsFirstMeasurement=!1,a.current[e].sizes["base".concat(Ef(n))]=t,r&&g()}}),[g]),A=t.useCallback((function(e){var t;return(null==(t=a.current[e])?void 0:t.autoHeight)||!1}),[]),y=t.useCallback((function(){return l.current}),[]),x=t.useCallback((function(e){p.current&&e>l.current&&(l.current=e)}),[]),q=t.useCallback((function(){a.current={},z()}),[z]);t.useEffect((function(){z()}),[u,d,b,f,z]),IB(e,"rowHeight",z),zN(e,{unstable_getLastMeasuredRowIndex:y,unstable_setLastMeasuredRowIndex:x,unstable_rowHasAutoHeight:A,unstable_getRowHeight:O,unstable_getRowInternalSizes:function(e){var t;return null==(t=a.current[e])?void 0:t.sizes},unstable_setRowHeight:m,unstable_storeRowHeightMeasurement:v,resetRowHeights:q})}(i,n),eD(i,n),function(e,n){var r=RT(e,"useGridScroll"),o=e.current.columnHeadersElementRef,i=e.current.windowRef,a=rT(e,GT),s=t.useCallback((function(t){var o=fT(e),s=QE(e);if(null!=t.rowIndex&&0===o||0===s.length)return!1;r.debug("Scrolling to cell at row ".concat(t.rowIndex,", col: ").concat(t.colIndex," "));var c={};if(null!=t.colIndex){var l,p=JE(e);if("undefined"!==typeof t.rowIndex){var u,d=null==(u=a[t.rowIndex])?void 0:u.id,b=e.current.unstable_getCellColSpanInfo(d,t.colIndex);b&&!b.spannedByColSpan&&(l=b.cellProps.width)}"undefined"===typeof l&&(l=s[t.colIndex].computedWidth),c.left=kj({clientHeight:i.current.clientWidth,scrollTop:i.current.scrollLeft,offsetHeight:l,offsetTop:p[t.colIndex]})}if(null!=t.rowIndex){var f,h,M=Sj(e.current.state),z=MP(e),O=zP(e),m=n.pagination?t.rowIndex-z*O:t.rowIndex,g=M.positions[m+1]?M.positions[m+1]-M.positions[m]:M.currentPageTotalHeight-M.positions[m],v=(null==(f=i.current.querySelector(".".concat(LE["pinnedRows--top"])))?void 0:f.clientHeight)||0,A=(null==(h=i.current.querySelector(".".concat(LE["pinnedRows--bottom"])))?void 0:h.clientHeight)||0;c.top=kj({clientHeight:i.current.clientHeight-v-A,scrollTop:i.current.scrollTop,offsetHeight:g,offsetTop:M.positions[m]})}return(void 0!==typeof(c=e.current.unstable_applyPipeProcessors("scrollToIndexes",c,t)).left||void 0!==typeof c.top)&&(e.current.scroll(c),!0)}),[r,e,i,n.pagination,a]),c=t.useCallback((function(e){i.current&&null!=e.left&&o.current&&(o.current.scrollLeft=e.left,i.current.scrollLeft=e.left,r.debug("Scrolling left: ".concat(e.left))),i.current&&null!=e.top&&(i.current.scrollTop=e.top,r.debug("Scrolling top: ".concat(e.top))),r.debug("Scrolling, updating container, and viewport")}),[i,o,r]),l=t.useCallback((function(){return null!=i&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0}}),[i]);zN(e,{scroll:c,scrollToIndexes:s,getScrollPosition:l})}(i,n),function(e,n){var r=rT(e,QE),o=PB(e,n),i=rT(e,Sj),a=Math.max(i.currentPageTotalHeight,1),s=t.useRef(!1),c=t.useCallback((function(t){var i=e.current.getRootDimensions();if(i&&n.rowsLoadingMode===$X){var c=t.top+i.viewportOuterSize.height,l=e.current.unstable_getViewportPageSize();if(c=a-n.scrollEndThreshold&&!s.current){var p={visibleColumns:r,viewportPageSize:l,virtualRowsCount:o.rows.length};e.current.publishEvent("rowsScrollEnd",p),s.current=!0}}}),[a,n.scrollEndThreshold,n.rowsLoadingMode,r,e,o.rows.length]),l=t.useCallback((function(e){var t=e.left,n=e.top;c({left:t,top:n})}),[c]);xN(e,"rowsScroll",l),wN(e,"rowsScrollEnd",n.onRowsScrollEnd)}(i,n),function(e,n){var r,o=PB(e,n),i=rT(e,jT),a=rT(e,FT),c=t.useRef({firstRowToRender:0,lastRowToRender:0}),l=(null!=(r=n.experimentalFeatures)?r:{}).lazyLoading,p=t.useCallback((function(){var t=e.current.unstable_getRenderContext(),r=s(OI({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:o.rows.length,buffer:n.rowBuffer}),2);return{firstRowToRender:r[0],lastRowToRender:r[1]}}),[e,n.rowBuffer,o.rows.length]),u=t.useCallback((function(t){var r=e.current.getRootDimensions();if(!oD({lazyLoadingFeatureFlag:l,rowsLoadingMode:n.rowsLoadingMode,gridDimensions:r})){var s={firstRowToRender:t.firstRowToRender,lastRowToRender:t.lastRowToRender,sortModel:i,filterModel:a};if(c.current.firstRowToRender!==t.firstRowToRender||c.current.lastRowToRender!==t.lastRowToRender){if(0===i.length&&0===a.items.length){var p=function(e,t){for(var n=t.firstRowIndex,r=t.lastRowIndex,o=e.slice(t.firstRowIndex,t.lastRowIndex),i=0,a=o.length-1,s=!1;!s&&n0&&void 0!==arguments[0]&&arguments[0];if(0!==e.current.getSelectedRows().size){var n=e.current.getDataAsCsv({includeHeaders:t,delimiter:"\t"});navigator.clipboard?navigator.clipboard.writeText(n).catch((function(){Fj(n)})):Fj(n)}}),[e]),r=t.useCallback((function(t){var n,r=t.ctrlKey||t.metaKey||t.altKey;"C"===String.fromCharCode(t.keyCode)&&r&&""===(null==(n=window.getSelection())?void 0:n.toString())&&e.current.unstable_copySelectedRowsToClipboard(t.altKey)}),[e]);Dj(e,e.current.rootElementRef,"keydown",r),zN(e,{unstable_copySelectedRowsToClipboard:n})}(i),function(e,n){var r=RT(e,"useResizeContainer"),o=t.useRef(!1),i=t.useRef(null),a=t.useRef(null),s=rT(e,Sj),c=rT(e,dT),l=t.useCallback((function(){var t,r=null==(t=e.current.rootElementRef)?void 0:t.current,o=ZE(e),l=_X(e);if(i.current){var p,u,d,b;if(null!=n.scrollbarSize)p=n.scrollbarSize;else if(o&&r){var f=Mz(r).createElement("div");f.style.width="99px",f.style.height="99px",f.style.position="absolute",f.style.overflow="scroll",f.className="scrollDiv",r.appendChild(f),p=f.offsetWidth-f.clientWidth,r.removeChild(f)}else p=0;if(n.autoHeight)b=!1,d=Math.round(o)>i.current.width,u={width:i.current.width,height:s.currentPageTotalHeight+(d?p:0)};else{u={width:i.current.width,height:i.current.height-c};var h=function(e){var t=e.content,n=e.container,r=e.scrollBarSize,o=t.width>n.width,i=t.height>n.height,a=!1,s=!1;return(o||i)&&(a=o,(s=t.height+(a?r:0)>n.height)&&(a=t.width+r>n.width)),{hasScrollX:a,hasScrollY:s}}({content:{width:Math.round(o),height:s.currentPageTotalHeight},container:{width:u.width,height:u.height-l.top-l.bottom},scrollBarSize:p});b=h.hasScrollY,d=h.hasScrollX}var M={viewportOuterSize:u,viewportInnerSize:{width:u.width-(b?p:0),height:u.height-(d?p:0)},hasScrollX:d,hasScrollY:b,scrollBarSize:p},z=a.current;a.current=M,M.viewportInnerSize.width===(null==z?void 0:z.viewportInnerSize.width)&&M.viewportInnerSize.height===(null==z?void 0:z.viewportInnerSize.height)||e.current.publishEvent("viewportInnerSizeChange",M.viewportInnerSize)}}),[e,n.scrollbarSize,n.autoHeight,c,s.currentPageTotalHeight]),p=t.useCallback((function(){l(),e.current.publishEvent("debouncedResize",i.current)}),[e,l]),u=t.useCallback((function(){return a.current}),[]),d=t.useCallback((function(){var t=e.current.getRootDimensions();if(!t)return 0;var r=NB(e,{pagination:n.pagination,paginationMode:n.paginationMode});if(n.getRowHeight){var o=e.current.unstable_getRenderContext(),i=o.lastRowIndex-o.firstRowIndex;return Math.min(i-1,r.rows.length)}var a=Math.floor(t.viewportInnerSize.height/cT(e));return Math.min(a,r.rows.length)}),[e,n.pagination,n.paginationMode,n.getRowHeight]);zN(e,{resize:p,getRootDimensions:u,unstable_getViewportPageSize:d,unstable_updateGridDimensionsRef:l});var b=t.useMemo((function(){return KM(p,60)}),[p]),f=t.useRef(!0),h=t.useCallback((function(e){i.current=e;var t=/jsdom/.test(window.navigator.userAgent);if(0!==e.height||o.current||n.autoHeight||t||(r.error(["The parent DOM element of the data grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),o.current=!0),0!==e.width||o.current||t||(r.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),o.current=!0),f.current)return p(),void(f.current=!1);b()}),[n.autoHeight,b,r,p]);uz((function(){return l()}),[l]),wN(e,"sortedRowsSet",l),wN(e,"pageChange",l),wN(e,"pageSizeChange",l),wN(e,"columnsChange",l),xN(e,"resize",h),wN(e,"debouncedResize",n.onResize)}(i,n),function(e,t){wN(e,"columnHeaderClick",t.onColumnHeaderClick),wN(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),wN(e,"columnHeaderOver",t.onColumnHeaderOver),wN(e,"columnHeaderOut",t.onColumnHeaderOut),wN(e,"columnHeaderEnter",t.onColumnHeaderEnter),wN(e,"columnHeaderLeave",t.onColumnHeaderLeave),wN(e,"columnOrderChange",t.onColumnOrderChange),wN(e,"cellClick",t.onCellClick),wN(e,"cellDoubleClick",t.onCellDoubleClick),wN(e,"cellKeyDown",t.onCellKeyDown),wN(e,"cellFocusOut",t.onCellFocusOut),wN(e,"preferencePanelClose",t.onPreferencePanelClose),wN(e,"preferencePanelOpen",t.onPreferencePanelOpen),wN(e,"menuOpen",t.onMenuOpen),wN(e,"menuClose",t.onMenuClose),wN(e,"rowDoubleClick",t.onRowDoubleClick),wN(e,"rowClick",t.onRowClick),wN(e,"componentError",t.onError),wN(e,"stateChange",t.onStateChange)}(i,n),function(e){var n=t.useCallback((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.current.unstable_applyPipeProcessors("exportState",{},t)}),[e]),r=t.useCallback((function(t){e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((function(e){e()})),e.current.forceUpdate()}),[e]);zN(e,{exportState:n,restoreState:r})}(i),i},lD={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,density:nj.Standard,disableExtendRowFullWidth:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableMultipleColumnsFiltering:!1,disableMultipleSelection:!1,disableMultipleColumnsSorting:!1,disableSelectionOnClick:!1,disableVirtualization:!1,disableIgnoreModificationsIfProcessingProps:!1,editMode:xB.Cell,filterMode:$X,headerHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:$X,rowHeight:52,rowsPerPageOptions:[25,50,100],rowSpacingType:"margin",showCellRightBorder:!1,showColumnRightBorder:!1,sortingOrder:["asc","desc",null],sortingMode:$X,throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1},pD={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",errorOverlayDefaultLabel:"An error occurred.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:function(e){return"".concat(e,1!==e?" active filters":" active filter")},toolbarQuickFilterPlaceholder:"Search\u2026",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelDeleteIconLabel:"Delete",filterPanelLinkOperator:"Logic operator",filterPanelOperators:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:function(e){return"".concat(e,1!==e?" active filters":" active filter")},columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:function(e){return"".concat(e.toLocaleString(),1!==e?" rows selected":" row selected")},footerTotalRows:"Total Rows:",footerTotalVisibleRows:function(e,t){return"".concat(e.toLocaleString()," of ").concat(t.toLocaleString())},checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:function(e){return"Group by ".concat(e)},unGroupColumn:function(e){return"Stop grouping by ".concat(e)},detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function uD(e){return Zf("MuiSwitch",e)}var dD=eh("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),bD=["className","color","edge","size","sx"],fD=$f("span",{name:"MuiSwitch",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.edge&&t["edge".concat(Ef(n.edge))],t["size".concat(Ef(n.size))]]}})((function(e){var t,n=e.ownerState;return c({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===n.edge&&{marginLeft:-8},"end"===n.edge&&{marginRight:-8},"small"===n.size&&(ne(t={width:40,height:24,padding:7},"& .".concat(dD.thumb),{width:16,height:16}),ne(t,"& .".concat(dD.switchBase),ne({padding:4},"&.".concat(dD.checked),{transform:"translateX(16px)"})),t))})),hD=$f(kx,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:function(e,t){var n=e.ownerState;return[t.switchBase,ne({},"& .".concat(dD.input),t.input),"default"!==n.color&&t["color".concat(Ef(n.color))]]}})((function(e){var t,n=e.theme;return ne(t={position:"absolute",top:0,left:0,zIndex:1,color:n.vars?n.vars.palette.Switch.defaultColor:"".concat("light"===n.palette.mode?n.palette.common.white:n.palette.grey[300]),transition:n.transitions.create(["left","transform"],{duration:n.transitions.duration.shortest})},"&.".concat(dD.checked),{transform:"translateX(20px)"}),ne(t,"&.".concat(dD.disabled),{color:n.vars?n.vars.palette.Switch.defaultDisabledColor:"".concat("light"===n.palette.mode?n.palette.grey[100]:n.palette.grey[600])}),ne(t,"&.".concat(dD.checked," + .").concat(dD.track),{opacity:.5}),ne(t,"&.".concat(dD.disabled," + .").concat(dD.track),{opacity:n.vars?n.vars.opacity.switchTrackDisabled:"".concat("light"===n.palette.mode?.12:.2)}),ne(t,"& .".concat(dD.input),{left:"-100%",width:"300%"}),t}),(function(e){var t,n=e.theme,r=e.ownerState;return c({"&:hover":{backgroundColor:n.vars?"rgba(".concat(n.vars.palette.action.activeChannel," / ").concat(n.vars.palette.action.hoverOpacity,")"):Vt(n.palette.action.active,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&(ne(t={},"&.".concat(dD.checked),ne({color:(n.vars||n).palette[r.color].main,"&:hover":{backgroundColor:n.vars?"rgba(".concat(n.vars.palette[r.color].mainChannel," / ").concat(n.vars.palette.action.hoverOpacity,")"):Vt(n.palette[r.color].main,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&.".concat(dD.disabled),{color:n.vars?n.vars.palette.Switch["".concat(r.color,"DisabledColor")]:"".concat("light"===n.palette.mode?Gt(n.palette[r.color].main,.62):Ut(n.palette[r.color].main,.55))})),ne(t,"&.".concat(dD.checked," + .").concat(dD.track),{backgroundColor:(n.vars||n).palette[r.color].main}),t))})),MD=$f("span",{name:"MuiSwitch",slot:"Track",overridesResolver:function(e,t){return t.track}})((function(e){var t=e.theme;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}})),zD=$f("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:function(e,t){return t.thumb}})((function(e){var t=e.theme;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}})),OD=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiSwitch"}),r=n.className,o=n.color,i=void 0===o?"primary":o,a=n.edge,s=void 0!==a&&a,l=n.size,p=void 0===l?"medium":l,u=n.sx,d=Qe(n,bD),b=c({},n,{color:i,edge:s,size:p}),f=function(e){var t=e.classes,n=e.edge,r=e.size,o=e.color,i=e.checked,a=e.disabled;return c({},t,Cf({root:["root",n&&"edge".concat(Ef(n)),"size".concat(Ef(r))],switchBase:["switchBase","color".concat(Ef(o)),i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},uD,t))}(b),h=(0,Cn.jsx)(zD,{className:f.thumb,ownerState:b});return(0,Cn.jsxs)(fD,{className:ub(f.root,r),sx:u,ownerState:b,children:[(0,Cn.jsx)(hD,c({type:"checkbox",icon:h,checkedIcon:h,ref:t,ownerState:b},d,{classes:c({},f,{root:f.switchBase})})),(0,Cn.jsx)(MD,{className:f.track,ownerState:b})]})})),mD=OD;function gD(e){return Zf("MuiTooltip",e)}var vD=eh("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),AD=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"];var yD=$f(lC,{name:"MuiTooltip",slot:"Popper",overridesResolver:function(e,t){var n=e.ownerState;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((function(e){var t,n=e.theme,r=e.ownerState,o=e.open;return c({zIndex:(n.vars||n).zIndex.tooltip,pointerEvents:"none"},!r.disableInteractive&&{pointerEvents:"auto"},!o&&{pointerEvents:"none"},r.arrow&&(ne(t={},'&[data-popper-placement*="bottom"] .'.concat(vD.arrow),{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}}),ne(t,'&[data-popper-placement*="top"] .'.concat(vD.arrow),{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}}),ne(t,'&[data-popper-placement*="right"] .'.concat(vD.arrow),c({},r.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}})),ne(t,'&[data-popper-placement*="left"] .'.concat(vD.arrow),c({},r.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})),t))})),xD=$f("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:function(e,t){var n=e.ownerState;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t["tooltipPlacement".concat(Ef(n.placement.split("-")[0]))]]}})((function(e){var t,n,r=e.theme,o=e.ownerState;return c({backgroundColor:r.vars?r.vars.palette.Tooltip.bg:Vt(r.palette.grey[700],.92),borderRadius:(r.vars||r).shape.borderRadius,color:(r.vars||r).palette.common.white,fontFamily:r.typography.fontFamily,padding:"4px 8px",fontSize:r.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:r.typography.fontWeightMedium},o.arrow&&{position:"relative",margin:0},o.touch&&{padding:"8px 16px",fontSize:r.typography.pxToRem(14),lineHeight:"".concat((n=16/14,Math.round(1e5*n)/1e5),"em"),fontWeight:r.typography.fontWeightRegular},(ne(t={},".".concat(vD.popper,'[data-popper-placement*="left"] &'),c({transformOrigin:"right center"},o.isRtl?c({marginLeft:"14px"},o.touch&&{marginLeft:"24px"}):c({marginRight:"14px"},o.touch&&{marginRight:"24px"}))),ne(t,".".concat(vD.popper,'[data-popper-placement*="right"] &'),c({transformOrigin:"left center"},o.isRtl?c({marginRight:"14px"},o.touch&&{marginRight:"24px"}):c({marginLeft:"14px"},o.touch&&{marginLeft:"24px"}))),ne(t,".".concat(vD.popper,'[data-popper-placement*="top"] &'),c({transformOrigin:"center bottom",marginBottom:"14px"},o.touch&&{marginBottom:"24px"})),ne(t,".".concat(vD.popper,'[data-popper-placement*="bottom"] &'),c({transformOrigin:"center top",marginTop:"14px"},o.touch&&{marginTop:"24px"})),t))})),qD=$f("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:function(e,t){return t.arrow}})((function(e){var t=e.theme;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:Vt(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}})),wD=!1,WD=null;function RD(e,t){return function(n){t&&t(n),e(n)}}var CD,_D=t.forwardRef((function(e,n){var r,o,i,a,l,p,u=wn({props:e,name:"MuiTooltip"}),d=u.arrow,b=void 0!==d&&d,f=u.children,h=u.components,M=void 0===h?{}:h,z=u.componentsProps,O=void 0===z?{}:z,m=u.describeChild,g=void 0!==m&&m,v=u.disableFocusListener,A=void 0!==v&&v,y=u.disableHoverListener,x=void 0!==y&&y,q=u.disableInteractive,w=void 0!==q&&q,W=u.disableTouchListener,R=void 0!==W&&W,C=u.enterDelay,_=void 0===C?100:C,S=u.enterNextDelay,k=void 0===S?0:S,L=u.enterTouchDelay,E=void 0===L?700:L,T=u.followCursor,N=void 0!==T&&T,P=u.id,B=u.leaveDelay,X=void 0===B?0:B,j=u.leaveTouchDelay,I=void 0===j?1500:j,D=u.onClose,F=u.onOpen,H=u.open,V=u.placement,U=void 0===V?"bottom":V,G=u.PopperComponent,Y=u.PopperProps,K=void 0===Y?{}:Y,Q=u.title,$=u.TransitionComponent,J=void 0===$?Tz:$,Z=u.TransitionProps,ee=Qe(u,AD),te=Wh(),ne="rtl"===te.direction,re=s(t.useState(),2),oe=re[0],ie=re[1],ae=s(t.useState(null),2),se=ae[0],ce=ae[1],le=t.useRef(!1),pe=w||N,ue=t.useRef(),de=t.useRef(),be=t.useRef(),fe=t.useRef(),he=s(Gy({controlled:H,default:!1,name:"Tooltip",state:"open"}),2),Me=he[0],ze=he[1],Oe=Me,me=cS(P),ge=t.useRef(),ve=t.useCallback((function(){void 0!==ge.current&&(document.body.style.WebkitUserSelect=ge.current,ge.current=void 0),clearTimeout(fe.current)}),[]);t.useEffect((function(){return function(){clearTimeout(ue.current),clearTimeout(de.current),clearTimeout(be.current),ve()}}),[ve]);var Ae=function(e){clearTimeout(WD),wD=!0,ze(!0),F&&!Oe&&F(e)},ye=oO((function(e){clearTimeout(WD),WD=setTimeout((function(){wD=!1}),800+X),ze(!1),D&&Oe&&D(e),clearTimeout(ue.current),ue.current=setTimeout((function(){le.current=!1}),te.transitions.duration.shortest)})),xe=function(e){le.current&&"touchstart"!==e.type||(oe&&oe.removeAttribute("title"),clearTimeout(de.current),clearTimeout(be.current),_||wD&&k?de.current=setTimeout((function(){Ae(e)}),wD?k:_):Ae(e))},qe=function(e){clearTimeout(de.current),clearTimeout(be.current),be.current=setTimeout((function(){ye(e)}),X)},we=dO(),We=we.isFocusVisibleRef,Re=we.onBlur,Ce=we.onFocus,_e=we.ref,Se=s(t.useState(!1),2)[1],ke=function(e){Re(e),!1===We.current&&(Se(!1),qe(e))},Le=function(e){oe||ie(e.currentTarget),Ce(e),!0===We.current&&(Se(!0),xe(e))},Ee=function(e){le.current=!0;var t=f.props;t.onTouchStart&&t.onTouchStart(e)},Te=xe,Ne=qe;t.useEffect((function(){if(Oe)return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||ye(e)}}),[ye,Oe]);var Pe=LM(ie,n),Be=LM(_e,Pe),Xe=LM(f.ref,Be);""===Q&&(Oe=!1);var je=t.useRef({x:0,y:0}),Ie=t.useRef(),De={},Fe="string"===typeof Q;g?(De.title=Oe||!Fe||x?null:Q,De["aria-describedby"]=Oe?me:null):(De["aria-label"]=Fe?Q:null,De["aria-labelledby"]=Oe&&!Fe?me:null);var He=c({},De,ee,f.props,{className:ub(ee.className,f.props.className),onTouchStart:Ee,ref:Xe},N?{onMouseMove:function(e){var t=f.props;t.onMouseMove&&t.onMouseMove(e),je.current={x:e.clientX,y:e.clientY},Ie.current&&Ie.current.update()}}:{});var Ve={};R||(He.onTouchStart=function(e){Ee(e),clearTimeout(be.current),clearTimeout(ue.current),ve(),ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",fe.current=setTimeout((function(){document.body.style.WebkitUserSelect=ge.current,xe(e)}),E)},He.onTouchEnd=function(e){f.props.onTouchEnd&&f.props.onTouchEnd(e),ve(),clearTimeout(be.current),be.current=setTimeout((function(){ye(e)}),I)}),x||(He.onMouseOver=RD(Te,He.onMouseOver),He.onMouseLeave=RD(Ne,He.onMouseLeave),pe||(Ve.onMouseOver=Te,Ve.onMouseLeave=Ne)),A||(He.onFocus=RD(Le,He.onFocus),He.onBlur=RD(ke,He.onBlur),pe||(Ve.onFocus=Le,Ve.onBlur=ke));var Ue=t.useMemo((function(){var e,t=[{name:"arrow",enabled:Boolean(se),options:{element:se,padding:4}}];return null!=(e=K.popperOptions)&&e.modifiers&&(t=t.concat(K.popperOptions.modifiers)),c({},K.popperOptions,{modifiers:t})}),[se,K]),Ge=c({},u,{isRtl:ne,arrow:b,disableInteractive:pe,placement:U,PopperComponentProp:G,touch:le.current}),Ye=function(e){var t=e.classes,n=e.disableInteractive,r=e.arrow,o=e.touch,i=e.placement;return Cf({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch","tooltipPlacement".concat(Ef(i.split("-")[0]))],arrow:["arrow"]},gD,t)}(Ge),Ke=null!=(r=M.Popper)?r:yD,$e=null!=(o=null!=(i=M.Transition)?i:J)?o:Tz,Je=null!=(a=M.Tooltip)?a:xD,Ze=null!=(l=M.Arrow)?l:qD,et=cM(Ke,c({},K,O.popper),Ge),tt=cM($e,c({},Z,O.transition),Ge),nt=cM(Je,c({},O.tooltip),Ge),rt=cM(Ze,c({},O.arrow),Ge);return(0,Cn.jsxs)(t.Fragment,{children:[t.cloneElement(f,He),(0,Cn.jsx)(Ke,c({as:null!=G?G:lC,placement:U,anchorEl:N?{getBoundingClientRect:function(){return{top:je.current.y,left:je.current.x,right:je.current.x,bottom:je.current.y,width:0,height:0}}}:oe,popperRef:Ie,open:!!oe&&Oe,id:me,transition:!0},Ve,et,{className:ub(Ye.popper,null==K?void 0:K.className,null==(p=O.popper)?void 0:p.className),popperOptions:Ue,children:function(e){var t,n,r=e.TransitionProps;return(0,Cn.jsx)($e,c({timeout:te.transitions.duration.shorter},r,tt,{children:(0,Cn.jsxs)(Je,c({},nt,{className:ub(Ye.tooltip,null==(t=O.tooltip)?void 0:t.className),children:[Q,b?(0,Cn.jsx)(Ze,c({},rt,{className:ub(Ye.arrow,null==(n=O.arrow)?void 0:n.className),ref:ce})):null]}))}))}}))]})})),SD=_D,kD=["align","children","colIndex","colDef","cellMode","field","formattedValue","hasFocus","height","isEditable","rowId","tabIndex","value","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","onClick","onDoubleClick","onMouseDown","onMouseUp","onKeyDown","onDragEnter","onDragOver"];function LD(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function ED(e){return parseFloat(e)}function TD(e){return Zf("MuiSkeleton",e)}eh("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var ND,PD,BD,XD,jD,ID,DD,FD,HD=["animation","className","component","height","style","variant","width"],VD=Lf(jD||(jD=ND||(ND=Rf(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"])))),UD=Lf(ID||(ID=PD||(PD=Rf(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"])))),GD=$f("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((function(e){var t=e.theme,n=e.ownerState,r=LD(t.shape.borderRadius)||"px",o=ED(t.shape.borderRadius);return c({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:Vt(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(o).concat(r,"/").concat(Math.round(o/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},"rounded"===n.variant&&{borderRadius:(t.vars||t).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})}),(function(e){return"pulse"===e.ownerState.animation&&kf(DD||(DD=BD||(BD=Rf(["\n animation: "," 1.5s ease-in-out 0.5s infinite;\n "]))),VD)}),(function(e){var t=e.ownerState,n=e.theme;return"wave"===t.animation&&kf(FD||(FD=XD||(XD=Rf(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 1.6s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]))),UD,(n.vars||n).palette.action.hover)})),YD=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiSkeleton"}),r=n.animation,o=void 0===r?"pulse":r,i=n.className,a=n.component,s=void 0===a?"span":a,l=n.height,p=n.style,u=n.variant,d=void 0===u?"text":u,b=n.width,f=Qe(n,HD),h=c({},n,{animation:o,component:s,variant:d,hasChildren:Boolean(f.children)}),M=function(e){var t=e.classes,n=e.variant,r=e.animation,o=e.hasChildren,i=e.width,a=e.height;return Cf({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},TD,t)}(h);return(0,Cn.jsx)(GD,c({as:s,ref:t,className:ub(M.root,i),ownerState:h},f,{style:c({width:b,height:l},p)}))})),KD=YD,QD=["field","align","width","contentWidth"];var $D=function(e){var n=t.useRef({});return t.useEffect((function(){n.current=e})),n.current};function JD(e){return Zf("BaseBadge",e)}eh("BaseBadge",["root","badge","invisible"]);var ZD=["badgeContent","component","children","components","componentsProps","invisible","max","showZero"],eF=t.forwardRef((function(e,t){var n=e.component,r=e.children,o=e.components,i=void 0===o?{}:o,a=e.componentsProps,s=void 0===a?{}:a,l=e.max,p=void 0===l?99:l,u=e.showZero,d=void 0!==u&&u,b=Qe(e,ZD),f=function(e){var t=e.badgeContent,n=e.invisible,r=void 0!==n&&n,o=e.max,i=void 0===o?99:o,a=e.showZero,s=void 0!==a&&a,c=$D({badgeContent:t,max:i}),l=r;!1!==r||0!==t||s||(l=!0);var p=l?c:e,u=p.badgeContent,d=p.max,b=void 0===d?i:d;return{badgeContent:u,invisible:l,max:b,displayValue:u&&Number(u)>b?"".concat(b,"+"):u}}(c({},e,{max:p})),h=f.badgeContent,M=f.max,z=f.displayValue,O=c({},e,{badgeContent:h,invisible:f.invisible,max:M,showZero:d}),m=function(e){return Cf({root:["root"],badge:["badge",e.invisible&&"invisible"]},JD,void 0)}(O),g=n||i.Root||"span",v=bM({elementType:g,externalSlotProps:s.root,externalForwardedProps:b,additionalProps:{ref:t},ownerState:O,className:m.root}),A=i.Badge||"span",y=bM({elementType:A,externalSlotProps:s.badge,ownerState:O,className:m.badge});return(0,Cn.jsxs)(g,c({},v,{children:[r,(0,Cn.jsx)(A,c({},y,{children:z}))]}))})),tF=eF,nF=function(e){return!e||!sM(e)};function rF(e){return Zf("MuiBadge",e)}var oF=eh("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),iF=["anchorOrigin","className","component","components","componentsProps","overlap","color","invisible","max","badgeContent","showZero","variant"],aF=$f("span",{name:"MuiBadge",slot:"Root",overridesResolver:function(e,t){return t.root}})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),sF=$f("span",{name:"MuiBadge",slot:"Badge",overridesResolver:function(e,t){var n=e.ownerState;return[t.badge,t[n.variant],t["anchorOrigin".concat(Ef(n.anchorOrigin.vertical)).concat(Ef(n.anchorOrigin.horizontal)).concat(Ef(n.overlap))],"default"!==n.color&&t["color".concat(Ef(n.color))],n.invisible&&t.invisible]}})((function(e){var t=e.theme,n=e.ownerState;return c({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen})},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},"dot"===n.variant&&{borderRadius:4,height:8,minWidth:8,padding:0},"top"===n.anchorOrigin.vertical&&"right"===n.anchorOrigin.horizontal&&"rectangular"===n.overlap&&ne({top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%"},"&.".concat(oF.invisible),{transform:"scale(0) translate(50%, -50%)"}),"bottom"===n.anchorOrigin.vertical&&"right"===n.anchorOrigin.horizontal&&"rectangular"===n.overlap&&ne({bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%"},"&.".concat(oF.invisible),{transform:"scale(0) translate(50%, 50%)"}),"top"===n.anchorOrigin.vertical&&"left"===n.anchorOrigin.horizontal&&"rectangular"===n.overlap&&ne({top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%"},"&.".concat(oF.invisible),{transform:"scale(0) translate(-50%, -50%)"}),"bottom"===n.anchorOrigin.vertical&&"left"===n.anchorOrigin.horizontal&&"rectangular"===n.overlap&&ne({bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%"},"&.".concat(oF.invisible),{transform:"scale(0) translate(-50%, 50%)"}),"top"===n.anchorOrigin.vertical&&"right"===n.anchorOrigin.horizontal&&"circular"===n.overlap&&ne({top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%"},"&.".concat(oF.invisible),{transform:"scale(0) translate(50%, -50%)"}),"bottom"===n.anchorOrigin.vertical&&"right"===n.anchorOrigin.horizontal&&"circular"===n.overlap&&ne({bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%"},"&.".concat(oF.invisible),{transform:"scale(0) translate(50%, 50%)"}),"top"===n.anchorOrigin.vertical&&"left"===n.anchorOrigin.horizontal&&"circular"===n.overlap&&ne({top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%"},"&.".concat(oF.invisible),{transform:"scale(0) translate(-50%, -50%)"}),"bottom"===n.anchorOrigin.vertical&&"left"===n.anchorOrigin.horizontal&&"circular"===n.overlap&&ne({bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%"},"&.".concat(oF.invisible),{transform:"scale(0) translate(-50%, 50%)"}),n.invisible&&{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})})})),cF=t.forwardRef((function(e,t){var n,r,o,i,a=wn({props:e,name:"MuiBadge"}),s=a.anchorOrigin,l=void 0===s?{vertical:"top",horizontal:"right"}:s,p=a.className,u=a.component,d=void 0===u?"span":u,b=a.components,f=void 0===b?{}:b,h=a.componentsProps,M=void 0===h?{}:h,z=a.overlap,O=void 0===z?"rectangular":z,m=a.color,g=void 0===m?"default":m,v=a.invisible,A=void 0!==v&&v,y=a.max,x=a.badgeContent,q=a.showZero,w=void 0!==q&&q,W=a.variant,R=void 0===W?"standard":W,C=Qe(a,iF),_=$D({anchorOrigin:l,color:g,overlap:O,variant:R}),S=A;!1===A&&(0===x&&!w||null==x&&"dot"!==R)&&(S=!0);var k,L=S?_:a,E=L.color,T=void 0===E?g:E,N=L.overlap,P=void 0===N?O:N,B=L.anchorOrigin,X=void 0===B?l:B,j=L.variant,I=void 0===j?R:j,D=function(e){var t=e.color,n=e.anchorOrigin,r=e.invisible,o=e.overlap,i=e.variant,a=e.classes,s=void 0===a?{}:a;return Cf({root:["root"],badge:["badge",i,r&&"invisible","anchorOrigin".concat(Ef(n.vertical)).concat(Ef(n.horizontal)),"anchorOrigin".concat(Ef(n.vertical)).concat(Ef(n.horizontal)).concat(Ef(o)),"overlap".concat(Ef(o)),"default"!==t&&"color".concat(Ef(t))]},rF,s)}(c({},a,{anchorOrigin:X,invisible:S,color:T,overlap:P,variant:I}));return"dot"!==I&&(k=x&&Number(x)>y?"".concat(y,"+"):x),(0,Cn.jsx)(tF,c({invisible:A,badgeContent:k,showZero:w,max:y},C,{components:c({Root:aF,Badge:sF},f),className:ub(null==(n=M.root)?void 0:n.className,D.root,p),componentsProps:{root:c({},M.root,nF(f.Root)&&{as:d,ownerState:c({},null==(r=M.root)?void 0:r.ownerState,{anchorOrigin:X,color:T,overlap:P,variant:I})}),badge:c({},M.badge,{className:ub(D.badge,null==(o=M.badge)?void 0:o.className)},nF(f.Badge)&&{ownerState:c({},null==(i=M.badge)?void 0:i.ownerState,{anchorOrigin:X,color:T,overlap:P,variant:I})})},ref:t}))})),lF=cF,pF=["className"],uF=$f("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:function(e,t){return t.iconButtonContainer}})((function(){return{display:"flex",visibility:"hidden",width:0}})),dF=t.forwardRef((function(e,t){var n=e.className,r=Qe(e,pF),o=function(e){return Cf({root:["iconButtonContainer"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(uF,c({ref:t,className:ub(o.root,n)},r))}));var bF=["hideMenu","currentColumn","open","id","labelledby","className","children"],fF=t.forwardRef((function(e,n){var r=e.hideMenu,o=e.open,i=e.id,a=e.labelledby,s=e.className,l=e.children,p=Qe(e,bF),u=t.useCallback((function(e){var t;UN(e.key)&&e.preventDefault(),t=e.key,(UN(t)||HN(t))&&r(e)}),[r]);return(0,Cn.jsx)(Cz,c({id:i,ref:n,className:ub(LE.menuList,s),"aria-labelledby":a,onKeyDown:u,autoFocus:o},p,{children:l}))})),hF=function(e){var n=e.onClick,r=oT(),o=iT(),i=t.useCallback((function(e){n(e),r.current.showPreferences(OX.columns)}),[r,n]);return o.disableColumnSelector?null:(0,Cn.jsx)(nm,{onClick:i,children:r.current.getLocaleText("columnMenuShowColumns")})},MF=function(e){var n=e.column,r=e.onClick,o=oT(),i=iT(),a=t.useCallback((function(e){r(e),o.current.showFilterPanel(null==n?void 0:n.field)}),[o,null==n?void 0:n.field,r]);return i.disableColumnFilter||null==n||!n.filterable?null:(0,Cn.jsx)(nm,{onClick:a,children:o.current.getLocaleText("columnMenuFilter")})},zF=function(e){var n=e.column,r=e.onClick,o=oT(),i=iT(),a=t.useRef(),s=1===QE(o).filter((function(e){return!0!==e.disableColumnMenu})).length,c=t.useCallback((function(e){s||(r(e),a.current=setTimeout((function(){o.current.setColumnVisibility(null==n?void 0:n.field,!1)}),100))}),[o,null==n?void 0:n.field,r,s]);return t.useEffect((function(){return function(){return clearTimeout(a.current)}}),[]),i.disableColumnSelector||!1===n.hideable?null:(0,Cn.jsx)(nm,{onClick:c,disabled:s,children:o.current.getLocaleText("columnMenuHideColumn")})},OF=function(e){var n=e.column,r=e.onClick,o=oT(),i=rT(o,jT),a=t.useMemo((function(){if(!n)return null;var e=i.find((function(e){return e.field===n.field}));return null==e?void 0:e.sort}),[n,i]),s=t.useCallback((function(e){r(e);var t=e.currentTarget.getAttribute("data-value")||null;o.current.sortColumn(n,t)}),[o,n,r]);return n&&n.sortable?(0,Cn.jsxs)(t.Fragment,{children:[(0,Cn.jsx)(nm,{onClick:s,disabled:null==a,children:o.current.getLocaleText("columnMenuUnsort")}),(0,Cn.jsx)(nm,{onClick:s,"data-value":"asc",disabled:"asc"===a,children:o.current.getLocaleText("columnMenuSortAsc")}),(0,Cn.jsx)(nm,{onClick:s,"data-value":"desc",disabled:"desc"===a,children:o.current.getLocaleText("columnMenuSortDesc")})]}):null},mF=t.forwardRef((function(e,n){var r=e.hideMenu,o=e.currentColumn,i=oT(),a=[(0,Cn.jsx)(OF,{onClick:r,column:o}),(0,Cn.jsx)(MF,{onClick:r,column:o}),(0,Cn.jsx)(zF,{onClick:r,column:o}),(0,Cn.jsx)(hF,{onClick:r,column:o})],s=i.current.unstable_applyPipeProcessors("columnMenu",a,o);return(0,Cn.jsx)(fF,c({ref:n},e,{children:s.map((function(e,n){return t.cloneElement(e,{key:n,onClick:r,column:o})}))}))})),gF=["className","rowCount","visibleRowCount"],vF=$f("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:function(e,t){return t.rowCount}})((function(e){return{alignItems:"center",display:"flex",margin:e.theme.spacing(0,2)}})),AF=t.forwardRef((function(e,t){var n=e.className,r=e.rowCount,o=e.visibleRowCount,i=Qe(e,gF),a=oT(),s=function(e){return Cf({root:["rowCount"]},kE,e.classes)}({classes:iT().classes});if(0===r)return null;var l=o0?(0,Cn.jsx)(qF,{selectedRowCount:a}):(0,Cn.jsx)("div",{}),p=o.hideFooterRowCount||o.pagination?null:(0,Cn.jsx)(AF,{rowCount:i,visibleRowCount:s}),u=o.pagination&&!o.hideFooterPagination&&o.components.Pagination&&(0,Cn.jsx)(o.components.Pagination,c({},null==(n=o.componentsProps)?void 0:n.pagination));return(0,Cn.jsxs)(RF,c({ref:t},e,{children:[l,p,u]}))})),_F=t.forwardRef((function(e,t){var n,r,o=iT();return(0,Cn.jsxs)("div",c({ref:t},e,{children:[(0,Cn.jsx)(o.components.PreferencesPanel,c({},null==(n=o.componentsProps)?void 0:n.preferencesPanel)),o.components.Toolbar&&(0,Cn.jsx)(o.components.Toolbar,c({},null==(r=o.componentsProps)?void 0:r.toolbar))]}))})),SF=t.forwardRef((function(e,t){var n,r,o,i=oT(),a=rT(i,YE),s=iT(),l=rT(i,ej),p=i.current.unstable_applyPipeProcessors("preferencePanel",null,null!=(n=l.openedPanelValue)?n:OX.filters);return(0,Cn.jsx)(s.components.Panel,c({ref:t,as:s.components.BasePopper,open:a.length>0&&l.open},null==(r=s.componentsProps)?void 0:r.panel,e,null==(o=s.componentsProps)?void 0:o.basePopper,{children:p}))})),kF=["className"],LF=$f("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:function(e,t){return t.overlay}})((function(e){var t=e.theme;return{position:"absolute",top:0,zIndex:4,width:"100%",height:"100%",pointerEvents:"none",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:Vt(t.palette.background.default,t.palette.action.disabledOpacity)}})),EF=t.forwardRef((function(e,t){var n=e.className,r=Qe(e,kF),o=function(e){return Cf({root:["overlay"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(LF,c({ref:t,className:ub(o.root,n)},r))})),TF=t.forwardRef((function(e,t){return(0,Cn.jsx)(EF,c({ref:t},e,{children:(0,Cn.jsx)(Oh,{})}))})),NF=t.forwardRef((function(e,t){var n=oT().current.getLocaleText("noRowsLabel");return(0,Cn.jsx)(EF,c({ref:t},e,{children:n}))}));var PF=t.createContext();var BF=t.createContext();function XF(e){return Zf("MuiTableCell",e)}var jF,IF,DF,FF,HF,VF,UF,GF,YF=eh("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),KF=["align","className","component","padding","scope","size","sortDirection","variant"],QF=$f("td",{name:"MuiTableCell",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],t["size".concat(Ef(n.size))],"normal"!==n.padding&&t["padding".concat(Ef(n.padding))],"inherit"!==n.align&&t["align".concat(Ef(n.align))],n.stickyHeader&&t.stickyHeader]}})((function(e){var t=e.theme,n=e.ownerState;return c({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?"1px solid ".concat(t.vars.palette.TableCell.border):"1px solid\n ".concat("light"===t.palette.mode?Gt(Vt(t.palette.divider,1),.88):Ut(Vt(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&ne({padding:"6px 16px"},"&.".concat(YF.paddingCheckbox),{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}),"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),$F=t.forwardRef((function(e,n){var r,o=wn({props:e,name:"MuiTableCell"}),i=o.align,a=void 0===i?"inherit":i,s=o.className,l=o.component,p=o.padding,u=o.scope,d=o.size,b=o.sortDirection,f=o.variant,h=Qe(o,KF),M=t.useContext(PF),z=t.useContext(BF),O=z&&"head"===z.variant;r=l||(O?"th":"td");var m=u;!m&&O&&(m="col");var g=f||z&&z.variant,v=c({},o,{align:a,component:r,padding:p||(M&&M.padding?M.padding:"normal"),size:d||(M&&M.size?M.size:"medium"),sortDirection:b,stickyHeader:"head"===g&&M&&M.stickyHeader,variant:g}),A=function(e){var t=e.classes,n=e.variant,r=e.align,o=e.padding,i=e.size;return Cf({root:["root",n,e.stickyHeader&&"stickyHeader","inherit"!==r&&"align".concat(Ef(r)),"normal"!==o&&"padding".concat(Ef(o)),"size".concat(Ef(i))]},XF,t)}(v),y=null;return b&&(y="asc"===b?"ascending":"descending"),(0,Cn.jsx)(QF,c({as:r,ref:n,className:ub(A.root,s),"aria-sort":y,scope:m,ownerState:v},h))})),JF=$F,ZF=cm((0,Cn.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),eH=cm((0,Cn.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),tH=["backIconButtonProps","count","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton"],nH=t.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,o=e.getItemAriaLabel,i=e.nextIconButtonProps,a=e.onPageChange,s=e.page,l=e.rowsPerPage,p=e.showFirstButton,u=e.showLastButton,d=Qe(e,tH),b=Wh();return(0,Cn.jsxs)("div",c({ref:t},d,{children:[p&&(0,Cn.jsx)(Im,{onClick:function(e){a(e,0)},disabled:0===s,"aria-label":o("first",s),title:o("first",s),children:"rtl"===b.direction?jF||(jF=(0,Cn.jsx)(ZF,{})):IF||(IF=(0,Cn.jsx)(eH,{}))}),(0,Cn.jsx)(Im,c({onClick:function(e){a(e,s-1)},disabled:0===s,color:"inherit","aria-label":o("previous",s),title:o("previous",s)},n,{children:"rtl"===b.direction?DF||(DF=(0,Cn.jsx)(GC,{})):FF||(FF=(0,Cn.jsx)(UC,{}))})),(0,Cn.jsx)(Im,c({onClick:function(e){a(e,s+1)},disabled:-1!==r&&s>=Math.ceil(r/l)-1,color:"inherit","aria-label":o("next",s),title:o("next",s)},i,{children:"rtl"===b.direction?HF||(HF=(0,Cn.jsx)(UC,{})):VF||(VF=(0,Cn.jsx)(GC,{}))})),u&&(0,Cn.jsx)(Im,{onClick:function(e){a(e,Math.max(0,Math.ceil(r/l)-1))},disabled:s>=Math.ceil(r/l)-1,"aria-label":o("last",s),title:o("last",s),children:"rtl"===b.direction?UF||(UF=(0,Cn.jsx)(eH,{})):GF||(GF=(0,Cn.jsx)(ZF,{}))})]}))}));function rH(e){return Zf("MuiTablePagination",e)}var oH,iH=eh("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),aH=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton"],sH=$f(JF,{name:"MuiTablePagination",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t=e.theme;return{overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),cH=$f(Tm,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:function(e,t){return c(ne({},"& .".concat(iH.actions),t.actions),t.toolbar)}})((function(e){var t,n=e.theme;return ne(t={minHeight:52,paddingRight:2},"".concat(n.breakpoints.up("xs")," and (orientation: landscape)"),{minHeight:52}),ne(t,n.breakpoints.up("sm"),{minHeight:52,paddingRight:2}),ne(t,"& .".concat(iH.actions),{flexShrink:0,marginLeft:20}),t})),lH=$f("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:function(e,t){return t.spacer}})({flex:"1 1 100%"}),pH=$f("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:function(e,t){return t.selectLabel}})((function(e){return c({},e.theme.typography.body2,{flexShrink:0})})),uH=$f(fx,{name:"MuiTablePagination",slot:"Select",overridesResolver:function(e,t){var n;return c((ne(n={},"& .".concat(iH.selectIcon),t.selectIcon),ne(n,"& .".concat(iH.select),t.select),n),t.input,t.selectRoot)}})(ne({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8},"& .".concat(iH.select),{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"})),dH=$f(nm,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:function(e,t){return t.menuItem}})({}),bH=$f("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:function(e,t){return t.displayedRows}})((function(e){return c({},e.theme.typography.body2,{flexShrink:0})}));function fH(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"\u2013").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))}function hH(e){return"Go to ".concat(e," page")}var MH=t.forwardRef((function(e,n){var r,o=wn({props:e,name:"MuiTablePagination"}),i=o.ActionsComponent,a=void 0===i?nH:i,s=o.backIconButtonProps,l=o.className,p=o.colSpan,u=o.component,d=void 0===u?JF:u,b=o.count,f=o.getItemAriaLabel,h=void 0===f?hH:f,M=o.labelDisplayedRows,z=void 0===M?fH:M,O=o.labelRowsPerPage,m=void 0===O?"Rows per page:":O,g=o.nextIconButtonProps,v=o.onPageChange,A=o.onRowsPerPageChange,y=o.page,x=o.rowsPerPage,q=o.rowsPerPageOptions,w=void 0===q?[10,25,50,100]:q,W=o.SelectProps,R=void 0===W?{}:W,C=o.showFirstButton,_=void 0!==C&&C,S=o.showLastButton,k=void 0!==S&&S,L=Qe(o,aH),E=o,T=function(e){return Cf({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},rH,e.classes)}(E),N=R.native?"option":dH;d!==JF&&"td"!==d||(r=p||1e3);var P=cS(R.id),B=cS(R.labelId);return(0,Cn.jsx)(sH,c({colSpan:r,ref:n,as:d,ownerState:E,className:ub(T.root,l)},L,{children:(0,Cn.jsxs)(cH,{className:T.toolbar,children:[(0,Cn.jsx)(lH,{className:T.spacer}),w.length>1&&(0,Cn.jsx)(pH,{className:T.selectLabel,id:B,children:m}),w.length>1&&(0,Cn.jsx)(uH,c({variant:"standard",input:oH||(oH=(0,Cn.jsx)(XA,{})),value:x,onChange:A,id:P,labelId:B},R,{classes:c({},R.classes,{root:ub(T.input,T.selectRoot,(R.classes||{}).root),select:ub(T.select,(R.classes||{}).select),icon:ub(T.selectIcon,(R.classes||{}).icon)}),children:w.map((function(e){return(0,t.createElement)(N,c({},!sM(N)&&{ownerState:E},{className:T.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)}))})),(0,Cn.jsx)(bH,{className:T.displayedRows,children:z({from:0===b?0:y*x+1,to:-1===b?(y+1)*x:-1===x?b:Math.min(b,(y+1)*x),count:-1===b?-1:b,page:y})}),(0,Cn.jsx)(a,{className:T.actions,backIconButtonProps:s,count:b,nextIconButtonProps:g,onPageChange:v,page:y,rowsPerPage:x,showFirstButton:_,showLastButton:k,getItemAriaLabel:h})]})}))})),zH=$f(MH)((function(e){var t,n=e.theme;return ne(t={},"& .".concat(iH.selectLabel),ne({display:"none"},n.breakpoints.up("sm"),{display:"block"})),ne(t,"& .".concat(iH.input),ne({display:"none"},n.breakpoints.up("sm"),{display:"inline-flex"})),t})),OH=t.forwardRef((function(e,n){var r,o=oT(),i=iT(),a=rT(o,hP),s=t.useMemo((function(){return Math.floor(a.rowCount/(a.pageSize||1))}),[a.rowCount,a.pageSize]),l=t.useCallback((function(e){var t=Number(e.target.value);o.current.setPageSize(t)}),[o]),p=t.useCallback((function(e,t){o.current.setPage(t)}),[o]);return(0,Cn.jsx)(zH,c({ref:n,component:"div",count:a.rowCount,page:a.page<=s?a.page:s,rowsPerPageOptions:null!=(r=i.rowsPerPageOptions)&&r.includes(a.pageSize)?i.rowsPerPageOptions:[],rowsPerPage:a.pageSize,onPageChange:p,onRowsPerPageChange:l},o.current.getLocaleText("MuiTablePagination"),e))})),mH=["className"],gH=$f("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:function(e,t){return t.panelContent}})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function vH(e){var t=e.className,n=Qe(e,mH),r=function(e){return Cf({root:["panelContent"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(gH,c({className:ub(t,r.root)},n))}var AH=["className"],yH=$f("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:function(e,t){return t.panelFooter}})((function(e){return{padding:e.theme.spacing(.5),display:"flex",justifyContent:"space-between"}}));function xH(e){var t=e.className,n=Qe(e,AH),r=function(e){return Cf({root:["panelFooter"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(yH,c({className:ub(t,r.root)},n))}var qH=["className"],wH=$f("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:function(e,t){return t.panelWrapper}})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),WH=function(){return!0},RH=t.forwardRef((function(e,t){var n=e.className,r=Qe(e,qH),o=function(e){return Cf({root:["panelWrapper"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(iM,{open:!0,disableEnforceFocus:!0,isEnabled:WH,children:(0,Cn.jsx)(wH,c({ref:t,tabIndex:-1,className:ub(n,o.root)},r))})})),CH=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","linkOperators","columnsSort","deleteIconProps","linkOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],_H=["InputComponentProps"],SH=$f("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:function(e,t){return t.filterForm}})((function(e){return{display:"flex",padding:e.theme.spacing(1)}})),kH=$f(Cy,{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:function(e,t){return t.filterFormDeleteIcon}})((function(e){var t=e.theme;return{flexShrink:0,justifyContent:"flex-end",marginRight:t.spacing(.5),marginBottom:t.spacing(.2)}})),LH=$f(Cy,{name:"MuiDataGrid",slot:"FilterFormLinkOperatorInput",overridesResolver:function(e,t){return t.filterFormLinkOperatorInput}})({minWidth:55,marginRight:5,justifyContent:"end"}),EH=$f(Cy,{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:function(e,t){return t.filterFormColumnInput}})({width:150}),TH=$f(Cy,{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:function(e,t){return t.filterFormOperatorInput}})({width:120}),NH=$f(Cy,{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:function(e,t){return t.filterFormValueInput}})({width:190}),PH=function(e){switch(e){case KX.And:return"filterPanelOperatorAnd";case KX.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `linkOperator` property in the `GridFilterPanel`.")}},BH=function(e){return e.headerName||e.field},XH=new Intl.Collator,jH=t.forwardRef((function(e,n){var r,o,i,a,s,l,p,u=e.item,d=e.hasMultipleFilters,b=e.deleteFilter,f=e.applyFilterChanges,h=e.multiFilterOperator,M=e.showMultiFilterOperators,z=e.disableMultiFilterOperator,O=e.applyMultiFilterOperatorChanges,m=e.focusElementRef,g=e.linkOperators,v=void 0===g?[KX.And,KX.Or]:g,A=e.columnsSort,y=e.deleteIconProps,x=void 0===y?{}:y,q=e.linkOperatorInputProps,w=void 0===q?{}:q,W=e.operatorInputProps,R=void 0===W?{}:W,C=e.columnInputProps,_=void 0===C?{}:C,S=e.valueInputProps,k=void 0===S?{}:S,L=Qe(e,CH),E=oT(),T=rT(E,eT),N=cS(),P=cS(),B=cS(),X=cS(),j=iT(),I=function(e){return Cf({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],linkOperatorInput:["filterFormLinkOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},kE,e.classes)}({classes:j.classes}),D=t.useRef(null),F=t.useRef(null),H=d&&v.length>0,V=(null==(r=j.componentsProps)?void 0:r.baseFormControl)||{},U=null==(i=((null==(o=j.componentsProps)?void 0:o.baseSelect)||{}).native)||i,G=U?"option":nm,Y=k.InputComponentProps,K=Qe(k,_H),Q=t.useMemo((function(){switch(A){case"asc":return T.sort((function(e,t){return XH.compare(BH(e),BH(t))}));case"desc":return T.sort((function(e,t){return-XH.compare(BH(e),BH(t))}));default:return T}}),[T,A]),$=u.columnField?E.current.getColumn(u.columnField):null,J=t.useMemo((function(){var e;return u.operatorValue&&$?null==(e=$.filterOperators)?void 0:e.find((function(e){return e.value===u.operatorValue})):null}),[u,$]),Z=t.useCallback((function(e){var t=e.target.value,n=E.current.getColumn(t);if(n.field!==$.field){var r=n.filterOperators.find((function(e){return e.value===u.operatorValue}))||n.filterOperators[0],o=!r.InputComponent||r.InputComponent!==(null==J?void 0:J.InputComponent);f(c({},u,{columnField:t,operatorValue:r.value,value:o?void 0:u.value}))}}),[E,f,u,$,J]),ee=t.useCallback((function(e){var t=e.target.value,n=null==$?void 0:$.filterOperators.find((function(e){return e.value===t})),r=!(null!=n&&n.InputComponent)||(null==n?void 0:n.InputComponent)!==(null==J?void 0:J.InputComponent);f(c({},u,{operatorValue:t,value:r?void 0:u.value}))}),[f,u,$,J]),te=t.useCallback((function(e){var t=e.target.value===KX.And.toString()?KX.And:KX.Or;O(t)}),[O]);return t.useImperativeHandle(m,(function(){return{focus:function(){var e;null!=J&&J.InputComponent?null==D||null==(e=D.current)||e.focus():F.current.focus()}}}),[J]),(0,Cn.jsxs)(SH,c({ref:n,className:I.root},L,{children:[(0,Cn.jsx)(kH,c({variant:"standard",as:j.components.BaseFormControl},V,x,{className:ub(I.deleteIcon,V.className,x.className),children:(0,Cn.jsx)(Im,{"aria-label":E.current.getLocaleText("filterPanelDeleteIconLabel"),title:E.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:function(){j.disableMultipleColumnsFiltering?void 0===u.value?b(u):f(c({},u,{value:void 0})):b(u)},size:"small",children:(0,Cn.jsx)(j.components.FilterPanelDeleteIcon,{fontSize:"small"})})})),(0,Cn.jsx)(LH,c({variant:"standard",as:j.components.BaseFormControl},V,w,{sx:c({display:H?"flex":"none",visibility:M?"visible":"hidden"},V.sx||{},w.sx||{}),className:ub(I.linkOperatorInput,V.className,w.className),children:(0,Cn.jsx)(j.components.BaseSelect,c({inputProps:{"aria-label":E.current.getLocaleText("filterPanelLinkOperator")},value:h,onChange:te,disabled:!!z||1===v.length,native:U},null==(a=j.componentsProps)?void 0:a.baseSelect,{children:v.map((function(e){return(0,Cn.jsx)(G,{value:e.toString(),children:E.current.getLocaleText(PH(e))},e.toString())}))}))})),(0,Cn.jsxs)(EH,c({variant:"standard",as:j.components.BaseFormControl},V,_,{className:ub(I.columnInput,V.className,_.className),children:[(0,Cn.jsx)(yy,{htmlFor:N,id:P,children:E.current.getLocaleText("filterPanelColumns")}),(0,Cn.jsx)(j.components.BaseSelect,c({labelId:P,id:N,label:E.current.getLocaleText("filterPanelColumns"),value:u.columnField||"",onChange:Z,native:U},null==(s=j.componentsProps)?void 0:s.baseSelect,{children:Q.map((function(e){return(0,Cn.jsx)(G,{value:e.field,children:BH(e)},e.field)}))}))]})),(0,Cn.jsxs)(TH,c({variant:"standard",as:j.components.BaseFormControl},V,R,{className:ub(I.operatorInput,V.className,R.className),children:[(0,Cn.jsx)(yy,{htmlFor:B,id:X,children:E.current.getLocaleText("filterPanelOperators")}),(0,Cn.jsx)(j.components.BaseSelect,c({labelId:X,label:E.current.getLocaleText("filterPanelOperators"),id:B,value:u.operatorValue,onChange:ee,native:U,inputRef:F},null==(l=j.componentsProps)?void 0:l.baseSelect,{children:null==$||null==(p=$.filterOperators)?void 0:p.map((function(e){return(0,Cn.jsx)(G,{value:e.value,children:e.label||E.current.getLocaleText("filterOperator".concat(Ef(e.value)))},e.value)}))}))]})),(0,Cn.jsx)(NH,c({variant:"standard",as:j.components.BaseFormControl},V,K,{className:ub(I.valueInput,V.className,K.className),children:null!=J&&J.InputComponent?(0,Cn.jsx)(J.InputComponent,c({apiRef:E,item:u,applyValue:f,focusElementRef:D},J.InputComponentProps,Y)):null}))]}))})),IH=["linkOperators","columnsSort","filterFormProps","children"],DH=t.forwardRef((function(e,n){var r,o=oT(),i=iT(),a=rT(o,FT),s=rT(o,eT),l=t.useRef(null),p=e.linkOperators,u=void 0===p?[KX.And,KX.Or]:p,d=e.columnsSort,b=e.filterFormProps,f=Qe(e,IH),h=t.useCallback((function(e){o.current.upsertFilterItem(e)}),[o]),M=t.useCallback((function(e){o.current.setFilterLinkOperator(e)}),[o]),z=t.useCallback((function(){var e=s.find((function(e){var t;return null==(t=e.filterOperators)?void 0:t.length}));return e?{columnField:e.field,operatorValue:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}:null}),[s]),O=t.useMemo((function(){if(a.items.length)return a.items;var e=z();return e?[e]:[]}),[a.items,z]),m=O.length>1,g=t.useCallback((function(e){var t=1===O.length;o.current.deleteFilterItem(e),t&&o.current.hideFilterPanel()}),[o,O.length]);return t.useEffect((function(){u.length>0&&a.linkOperator&&!u.includes(a.linkOperator)&&M(u[0])}),[u,M,a.linkOperator]),t.useEffect((function(){O.length>0&&l.current.focus()}),[O.length]),(0,Cn.jsxs)(RH,c({ref:n},f,{children:[(0,Cn.jsx)(vH,{children:O.map((function(e,t){return(0,Cn.jsx)(jH,c({item:e,applyFilterChanges:h,deleteFilter:g,hasMultipleFilters:m,showMultiFilterOperators:t>0,multiFilterOperator:a.linkOperator,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:M,focusElementRef:t===O.length-1?l:null,linkOperators:u,columnsSort:d},b),null==e.id?t:e.id)}))}),!i.disableMultipleColumnsFiltering&&(0,Cn.jsx)(xH,{children:(0,Cn.jsx)(i.components.BaseButton,c({onClick:function(){var e=z();e&&o.current.upsertFilterItems([].concat(Le(O),[e]))},startIcon:(0,Cn.jsx)(PP,{})},null==(r=i.componentsProps)?void 0:r.baseButton,{children:o.current.getLocaleText("filterPanelAddFilter")}))})]}))})),FH=["className"],HH=$f("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:function(e,t){return t.panelHeader}})((function(e){return{padding:e.theme.spacing(1)}}));function VH(e){var t=e.className,n=Qe(e,FH),r=function(e){return Cf({root:["panelHeader"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(HH,c({className:ub(t,r.root)},n))}var UH=["sort"],GH=$f("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:function(e,t){return t.columnsPanel}})((function(){return{padding:"8px 0px 8px 8px"}})),YH=$f("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:function(e,t){return t.columnsPanelRow}})((function(e){var t=e.theme;return ne({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px"},"& .".concat(dD.root),{marginRight:t.spacing(.5)})})),KH=($f(Im)({justifyContent:"flex-end"}),new Intl.Collator);var QH,$H=["children","className","classes"],JH=eh("MuiDataGrid",["panel","paper"]),ZH=$f(lC,{name:"MuiDataGrid",slot:"Panel",overridesResolver:function(e,t){return t.panel}})((function(e){return{zIndex:e.theme.zIndex.modal}})),eV=$f(Lh,{name:"MuiDataGrid",slot:"Paper",overridesResolver:function(e,t){return t.paper}})((function(e){return{backgroundColor:e.theme.palette.background.paper,minWidth:300,maxHeight:450,display:"flex"}})),tV=t.forwardRef((function(e,n){var r,o=e.children,i=e.className,a=Qe(e,$H),l=oT(),p=JH,u=s(t.useState(!1),2),d=u[0],b=u[1],f=t.useCallback((function(){l.current.hidePreferences()}),[l]),h=t.useCallback((function(e){HN(e.key)&&l.current.hidePreferences()}),[l]),M=t.useMemo((function(){return[{name:"flip",enabled:!1},{name:"isPlaced",enabled:!0,phase:"main",fn:function(){b(!0)},effect:function(){return function(){b(!1)}}}]}),[]),z=null==(r=l.current.columnHeadersContainerElementRef)?void 0:r.current;return z?(0,Cn.jsx)(ZH,c({ref:n,placement:"bottom-start",className:ub(i,p.panel),anchorEl:z,modifiers:M},a,{children:(0,Cn.jsx)(WB,{mouseEvent:"onMouseUp",onClickAway:f,children:(0,Cn.jsx)(eV,{className:p.paper,elevation:8,onKeyDown:h,children:d&&o})})})):null})),nV=["selected","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","cellFocus","cellTabIndex","editRowsState","isLastVisible","onClick","onDoubleClick","onMouseEnter","onMouseLeave"],rV=["changeReason"],oV=function(e){var t=e.width;if(!t)return null;var n={width:t};return(0,Cn.jsx)("div",{className:"MuiDataGrid-cell",style:n})},iV=t.forwardRef((function(e,n){var r,o=e.selected,i=e.rowId,a=e.row,l=e.index,p=e.style,u=e.position,d=e.rowHeight,b=e.className,f=e.visibleColumns,h=e.renderedColumns,M=e.containerWidth,z=e.firstColumnToRender,O=e.cellFocus,m=e.cellTabIndex,g=e.editRowsState,v=e.isLastVisible,A=void 0!==v&&v,y=e.onClick,x=e.onDoubleClick,q=e.onMouseEnter,w=e.onMouseLeave,W=Qe(e,nV),R=oT(),C=t.useRef(null),_=iT(),S=PB(R,_),k=rT(R,ZE),L=rT(R,jT),E=rT(R,vT),T=rT(R,pT),N=LM(C,n),P=l+T+2,B=null!=(r=R.current.getRootDimensions())?r:{hasScrollX:!1,hasScrollY:!1},X=B.hasScrollX,j=B.hasScrollY,I=function(e){var t=e.editable,n=e.editing;return Cf({root:["row",e.selected&&"selected",t&&"row--editable",n&&"row--editing",e.isLastVisible&&"row--lastVisible","auto"===e.rowHeight&&"row--dynamicHeight"]},kE,e.classes)}({selected:o,isLastVisible:A,classes:_.classes,editing:R.current.getRowMode(i)===wB.Edit,editable:_.editMode===xB.Row,rowHeight:d});t.useLayoutEffect((function(){"auto"===d&&C.current&&"undefined"===typeof ResizeObserver&&R.current.unstable_storeRowHeightMeasurement(i,C.current.clientHeight,u)}),[R,d,i,u]),t.useLayoutEffect((function(){if(S.range){var e=R.current.getRowIndexRelativeToVisibleRows(i);null!=e&&R.current.unstable_setLastMeasuredRowIndex(e)}var t=C.current;if(t&&!("auto"!==d)&&"undefined"!==typeof ResizeObserver){var n=new ResizeObserver((function(e){var t=s(e,1)[0],n=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;R.current.unstable_storeRowHeightMeasurement(i,n,u)}));return n.observe(t),function(){return n.disconnect()}}}),[R,S.range,l,d,i,u]);var D=t.useCallback((function(e,t){return function(n){(1!==n.target.nodeType||n.currentTarget.contains(n.target))&&R.current.getRow(i)&&(R.current.publishEvent(e,R.current.getRowParams(i),n),t&&t(n))}}),[R,i]),F=t.useCallback((function(e){var t=Wj(e.target,LE.cell),n=null==t?void 0:t.getAttribute("data-field");if(n){if(n===OB.field)return;if(n===BB)return;if("__reorder__"===n)return;if(R.current.getCellMode(i,n)===qB.Edit)return;if(R.current.getColumn(n).type===EB)return}D("rowClick",y)(e)}),[R,y,D,i]),H=t.useCallback((function(e,t){var n,r=R.current.getCellParams(i,e.field),o=[],s=_.disableColumnReorder&&e.disableReorder||!_.rowReordering&&!!L.length&&E>1&&Object.keys(g).length>0;e.cellClassName&&o.push(ub("function"===typeof e.cellClassName?e.cellClassName(r):e.cellClassName));var l,p=g[i]?g[i][e.field]:null,u=null;null==p&&e.renderCell&&(u=e.renderCell(c({},r,{api:R.current})),o.push(ub(LE["cell--withRenderer"],null==(l=_.classes)?void 0:l["cell--withRenderer"])));if(null!=p&&e.renderEditCell){var b,f=a;R.current.unstable_getRowWithUpdatedValues&&(f=R.current.unstable_getRowWithUpdatedValues(i,e.field));var h=c({},r,{row:f},Qe(p,rV),{api:R.current});u=e.renderEditCell(h),o.push(ub(LE["cell--editing"],null==(b=_.classes)?void 0:b["cell--editing"]))}_.getCellClassName&&o.push(_.getCellClassName(r));var M=null!==O&&O.id===i&&O.field===e.field,z=null!==m&&m.id===i&&m.field===e.field&&"view"===r.cellMode?0:-1;return(0,Cn.jsx)(_.components.Cell,c({value:r.value,field:e.field,width:t.width,rowId:i,height:d,showRightBorder:t.showRightBorder,formattedValue:r.formattedValue,align:e.align||"left",cellMode:r.cellMode,colIndex:t.indexRelativeToAllColumns,isEditable:r.isEditable,hasFocus:M,tabIndex:z,className:ub(o),colSpan:t.colSpan,disableDragEvents:s},null==(n=_.componentsProps)?void 0:n.cell,{children:u}),e.field)}),[R,m,g,O,_,a,d,i,E,L.length]),V=R.current.unstable_getRowInternalSizes(i),U=d;if("auto"===U&&V){var G=0,Y=Object.entries(V).reduce((function(e,t){var n=s(t,2),r=n[0],o=n[1];return/^base[A-Z]/.test(r)?(G+=1,o>e?o:e):e}),0);Y>0&&G>1&&(U=Y)}var K=c({},p,{maxHeight:"auto"===d?"none":d,minHeight:U});null!=V&&V.spacingTop&&(K["border"===_.rowSpacingType?"borderTopWidth":"marginTop"]=V.spacingTop);null!=V&&V.spacingBottom&&(K["border"===_.rowSpacingType?"borderBottomWidth":"marginBottom"]=V.spacingBottom);var Q=R.current.unstable_applyPipeProcessors("rowClassName",[],i);if("function"===typeof _.getRowClassName){var $,J=l-((null==($=S.range)?void 0:$.firstRowIndex)||0),Z=c({},R.current.getRowParams(i),{isFirstVisible:0===J,isLastVisible:J===S.rows.length-1,indexRelativeToCurrentPage:J});Q.push(_.getRowClassName(Z))}for(var ee=pN(1e4,20,80),te=[],ne=0;ne0&&(0,Cn.jsx)(oV,{width:be})]}))})),aV=["sortingOrder"],sV=t.memo((function(e){var t=e.sortingOrder,n=Qe(e,aV),r=iT(),o="asc"===s(t,1)[0]?r.components.ColumnSortedAscendingIcon:r.components.ColumnSortedDescendingIcon;return o?(0,Cn.jsx)(o,c({},n)):null})),cV=["message","hasError","errorInfo"],lV=t.forwardRef((function(e,t){var n=e.message,r=Qe(e,cV),o=oT(),i=o.current.getLocaleText("errorOverlayDefaultLabel"),a=rT(o,cT);return(0,Cn.jsx)(EF,c({ref:t,sx:{width:"100%",minHeight:2*a}},r,{children:n||i}))})),pV=t.forwardRef((function(e,t){var n=oT().current.getLocaleText("noResultsOverlayLabel");return(0,Cn.jsx)(EF,c({ref:t},e,{children:n}))})),uV=c({},{BooleanCellTrueIcon:DP,BooleanCellFalseIcon:NP,ColumnMenuIcon:TP,OpenFilterButtonIcon:WP,FilterPanelDeleteIcon:NP,ColumnFilteredIcon:RP,ColumnSelectorIcon:_P,ColumnUnsortedIcon:sV,ColumnSortedAscendingIcon:yP,ColumnSortedDescendingIcon:xP,ColumnResizeIcon:SP,DensityCompactIcon:kP,DensityStandardIcon:LP,DensityComfortableIcon:EP,ExportIcon:IP,MoreActionsIcon:FP,TreeDataCollapseIcon:wP,TreeDataExpandIcon:qP,GroupingCriteriaCollapseIcon:wP,GroupingCriteriaExpandIcon:qP,DetailPanelExpandIcon:PP,DetailPanelCollapseIcon:BP,RowReorderIcon:jP,QuickFilterIcon:CP,QuickFilterClearIcon:NP},{BaseCheckbox:Hx,BaseTextField:gx,BaseFormControl:Cy,BaseSelect:fx,BaseSwitch:mD,BaseButton:tq,BaseTooltip:SD,BasePopper:lC,Cell:function(e){var n=e.align,r=e.children,o=e.colIndex,i=e.cellMode,a=e.field,s=e.formattedValue,l=e.hasFocus,p=e.height,u=e.isEditable,d=e.rowId,b=e.tabIndex,f=e.value,h=e.width,M=e.className,z=e.showRightBorder,O=e.colSpan,m=e.disableDragEvents,g=e.onClick,v=e.onDoubleClick,A=e.onMouseDown,y=e.onMouseUp,x=e.onKeyDown,q=e.onDragEnter,w=e.onDragOver,W=Qe(e,kD),R=null==s?f:s,C=t.useRef(null),_=t.useRef(null),S=oT(),k=function(e){var t=e.align,n=e.showRightBorder,r=e.isEditable,o=e.classes;return Cf({root:["cell","cell--text".concat(Ef(t)),r&&"cell--editable",n&&"withBorder"],content:["cellContent"]},kE,o)}({align:n,showRightBorder:z,isEditable:u,classes:iT().classes}),L=t.useCallback((function(e){return function(t){var n=S.current.getCellParams(d,a||"");S.current.publishEvent(e,n,t),y&&y(t)}}),[S,a,y,d]),E=t.useCallback((function(e){return function(t){var n=S.current.getCellParams(d,a||"");S.current.publishEvent(e,n,t),A&&A(t)}}),[S,a,A,d]),T=t.useCallback((function(e,t){return function(n){if(n.currentTarget.contains(n.target)&&S.current.getRow(d)){var r=S.current.getCellParams(d,a||"");S.current.publishEvent(e,r,n),t&&t(n)}}}),[S,a,d]),N={minWidth:h,maxWidth:h,minHeight:p,maxHeight:"auto"===p?"none":p};t.useLayoutEffect((function(){if(l&&i!==qB.Edit){var e=Mz(S.current.rootElementRef.current);if(C.current&&!C.current.contains(e.activeElement)){var t=C.current.querySelector('[tabindex="0"]'),n=_.current||t||C.current;if(void 0===CD&&document.createElement("div").focus({get preventScroll(){return CD=!0,!1}}),CD)n.focus({preventScroll:!0});else{var r=S.current.getScrollPosition();n.focus(),S.current.scroll(r)}}}}),[l,i,S]);var P=W.onFocus,B="actions"===S.current.getColumn(a).type,X=m?null:{onDragEnter:T("cellDragEnter",q),onDragOver:T("cellDragOver",w)};return(0,Cn.jsx)("div",c({ref:C,className:ub(M,k.root),role:"cell","data-field":a,"data-colindex":o,"aria-colindex":o+1,"aria-colspan":O,style:N,tabIndex:"view"!==i&&u||B?-1:b,onClick:T("cellClick",g),onDoubleClick:T("cellDoubleClick",v),onMouseDown:E("cellMouseDown"),onMouseUp:L("cellMouseUp"),onKeyDown:T("cellKeyDown",x)},X,W,{onFocus:P,children:null==r?(0,Cn.jsx)("div",{className:k.content,children:null==R?void 0:R.toString()}):t.isValidElement(r)&&B?t.cloneElement(r,{focusElementRef:_}):r}))},SkeletonCell:function(e){var t=e.align,n=e.width,r=e.contentWidth,o=Qe(e,QD),i=function(e){var t=e.align,n=e.classes;return Cf({root:["cell","cellSkeleton","cell--text".concat(Ef(t))]},kE,n)}({classes:iT().classes,align:t});return(0,Cn.jsx)("div",c({className:i.root,style:{width:n}},o,{children:(0,Cn.jsx)(KD,{width:"".concat(r,"%")})}))},ColumnHeaderFilterIconButton:function(e){var n,r=e.counter,o=e.field,i=e.onClick,a=oT(),s=iT(),l=function(e){return Cf({icon:["filterIcon"]},kE,e.classes)}(c({},e,{classes:s.classes})),p=t.useCallback((function(e){e.preventDefault(),e.stopPropagation();var t=ej(a.current.state),n=t.open,r=t.openedPanelValue;n&&r===OX.filters?a.current.hideFilterPanel():a.current.showFilterPanel(),i&&i(a.current.getColumnHeaderParams(o),e)}),[a,o,i]);if(!r)return null;var u=(0,Cn.jsx)(Im,{onClick:p,color:"default","aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,children:(0,Cn.jsx)(s.components.ColumnFilteredIcon,{className:l.icon,fontSize:"small"})});return(0,Cn.jsx)(s.components.BaseTooltip,c({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(r),enterDelay:1e3},null==(n=s.componentsProps)?void 0:n.baseTooltip,{children:(0,Cn.jsxs)(dF,{children:[r>1&&(0,Cn.jsx)(lF,{badgeContent:r,color:"default",children:u}),1===r&&u]})}))},ColumnMenu:mF,ErrorOverlay:lV,Footer:CF,Header:_F,Toolbar:null,PreferencesPanel:SF,LoadingOverlay:TF,NoResultsOverlay:pV,NoRowsOverlay:NF,Pagination:OH,FilterPanel:DH,ColumnsPanel:function(e){var n,r,o,i=oT(),a=t.useRef(null),l=rT(i,YE),p=rT(i,KE),u=iT(),d=s(t.useState(""),2),b=d[0],f=d[1],h=function(e){return Cf({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},kE,e.classes)}({classes:u.classes}),M=e.sort,z=Qe(e,UH),O=t.useMemo((function(){switch(M){case"asc":return Le(l).sort((function(e,t){return KH.compare(e.headerName||e.field,t.headerName||t.field)}));case"desc":return Le(l).sort((function(e,t){return-KH.compare(e.headerName||e.field,t.headerName||t.field)}));default:return l}}),[l,M]),m=function(e){var t=e.target.name;i.current.setColumnVisibility(t,!1===p[t])},g=t.useCallback((function(e){return i.current.unstable_caches.columns.isUsingColumnVisibilityModel?e?i.current.setColumnVisibilityModel({}):i.current.setColumnVisibilityModel(Object.fromEntries(l.filter((function(e){return!1!==e.hideable})).map((function(e){return[e.field,!1]})))):i.current.updateColumns(l.map((function(t){return!1!==t.hideable?{field:t.field,hide:!e}:t})))}),[i,l]),v=t.useCallback((function(e){f(e.target.value)}),[]),A=t.useMemo((function(){if(!b)return O;var e=b.toLowerCase();return O.filter((function(t){return(t.headerName||t.field).toLowerCase().indexOf(e)>-1}))}),[O,b]);return t.useEffect((function(){a.current.focus()}),[]),(0,Cn.jsxs)(RH,c({},z,{children:[(0,Cn.jsx)(VH,{children:(0,Cn.jsx)(u.components.BaseTextField,c({label:i.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:i.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:a,value:b,onChange:v,variant:"standard",fullWidth:!0},null==(n=u.componentsProps)?void 0:n.baseTextField))}),(0,Cn.jsx)(vH,{children:(0,Cn.jsx)(GH,{className:h.root,children:A.map((function(e){var t;return(0,Cn.jsxs)(YH,{className:h.columnsPanelRow,children:[(0,Cn.jsx)(wx,{control:(0,Cn.jsx)(u.components.BaseSwitch,c({disabled:!1===e.hideable,checked:!1!==p[e.field],onClick:m,name:e.field,size:"small"},null==(t=u.componentsProps)?void 0:t.baseSwitch)),label:e.headerName||e.field}),!u.disableColumnReorder&&false]},e.field)}))})}),(0,Cn.jsxs)(xH,{children:[(0,Cn.jsx)(u.components.BaseButton,c({onClick:function(){return g(!1)}},null==(r=u.componentsProps)?void 0:r.baseButton,{children:i.current.getLocaleText("columnsPanelHideAllButton")})),(0,Cn.jsx)(u.components.BaseButton,c({onClick:function(){return g(!0)}},null==(o=u.componentsProps)?void 0:o.baseButton,{children:i.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))},Panel:tV,Row:iV}),dV=c({},lD,{scrollEndThreshold:80,treeData:!1,defaultGroupingExpansionDepth:0,disableColumnPinning:!1,disableChildrenFiltering:!1,disableChildrenSorting:!1,rowReordering:!1,rowsLoadingMode:$X,getDetailPanelHeight:function(){return 500}}),bV=["resizable","resizing","height","side"];!function(e){e.Left="left",e.Right="right"}(QH||(QH={}));function fV(e){var n=e.height,r=e.side,o=void 0===r?QH.Right:r,i=Qe(e,bV),a=iT(),s=function(e){var t=e.resizable,n=e.resizing,r=e.classes,o=e.side;return Cf({root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&"columnSeparator--side".concat(Ef(o))],icon:["iconSeparator"]},kE,r)}(c({},e,{side:o,classes:a.classes})),l=t.useCallback((function(e){e.preventDefault(),e.stopPropagation()}),[]);return(0,Cn.jsx)("div",c({className:s.root,style:{minHeight:n,opacity:a.showColumnRightBorder?0:1}},i,{onClick:l,children:(0,Cn.jsx)(a.components.ColumnResizeIcon,{className:s.icon})}))}var hV=t.memo(fV);function MV(e){var t=e.direction,n=e.index,r=e.sortingOrder,o=oT(),i=iT(),a=function(e){return Cf({icon:["sortIcon"]},kE,e.classes)}(c({},e,{classes:i.classes})),s=function(e,t,n,r){var o,i={};return"asc"===t?o=e.ColumnSortedAscendingIcon:"desc"===t?o=e.ColumnSortedDescendingIcon:(o=e.ColumnUnsortedIcon,i.sortingOrder=r),o?(0,Cn.jsx)(o,c({fontSize:"small",className:n},i)):null}(i.components,t,a.icon,r);if(!s)return null;var l=(0,Cn.jsx)(Im,{tabIndex:-1,"aria-label":o.current.getLocaleText("columnHeaderSortIconLabel"),title:o.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",children:s});return(0,Cn.jsxs)(dF,{children:[null!=n&&(0,Cn.jsx)(lF,{badgeContent:n,color:"default",children:l}),null==n&&l]})}var zV=t.memo(MV),OV=t.memo((function(e){var n=e.column,r=e.open,o=e.columnMenuId,i=e.columnMenuButtonId,a=e.iconButtonRef,s=oT(),l=iT(),p=function(e){var t=e.classes;return Cf({root:["menuIcon",e.open&&"menuOpen"],button:["menuIconButton"]},kE,t)}(c({},e,{classes:l.classes})),u=t.useCallback((function(e){e.preventDefault(),e.stopPropagation(),s.current.toggleColumnMenu(n.field)}),[s,n.field]);return(0,Cn.jsx)("div",{className:p.root,children:(0,Cn.jsx)(Im,{ref:a,tabIndex:-1,className:p.button,"aria-label":s.current.getLocaleText("columnMenuLabel"),title:s.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-expanded":r?"true":void 0,"aria-haspopup":"true","aria-controls":o,id:i,children:(0,Cn.jsx)(l.components.ColumnMenuIcon,{fontSize:"small"})})})}));function mV(e){var n=e.columnMenuId,r=e.columnMenuButtonId,o=e.ContentComponent,i=e.contentComponentProps,a=e.field,s=e.open,l=e.target,p=e.onExited,u=oT(),d=u.current.getColumn(a),b=t.useCallback((function(e){e.stopPropagation(),u.current.hideColumnMenu()}),[u]);return l?(0,Cn.jsx)(SB,{placement:"bottom-".concat("right"===d.align?"start":"end"),open:s,target:l,onClickAway:b,onExited:p,children:(0,Cn.jsx)(o,c({currentColumn:d,hideMenu:b,open:s,id:n,labelledby:r},i))}):null}var gV=["className"],vV=$f("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:function(e,t){return t.columnHeaderTitle}})((function(e){return{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:e.theme.typography.fontWeightMedium}})),AV=t.forwardRef((function(e,t){var n=e.className,r=Qe(e,gV),o=function(e){return Cf({root:["columnHeaderTitle"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(vV,c({ref:t,className:ub(o.root,n)},r))}));function yV(e){var n,r=e.label,o=e.description,i=e.columnWidth,a=iT(),l=t.useRef(null),p=s(t.useState(""),2),u=p[0],d=p[1];return t.useEffect((function(){if(!o&&l&&l.current){var e=(t=l.current).scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth;d(e?r:"")}var t}),[l,i,o,r]),(0,Cn.jsx)(a.components.BaseTooltip,c({title:o||u},null==(n=a.componentsProps)?void 0:n.baseTooltip,{children:(0,Cn.jsx)(AV,{ref:l,children:r})}))}var xV=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","disableHeaderSeparator"],qV=t.forwardRef((function(e,n){var r=e.classes,o=e.columnMenuOpen,i=e.colIndex,a=e.height,l=e.isResizing,p=e.sortDirection,u=e.hasFocus,d=e.tabIndex,b=e.separatorSide,f=e.isDraggable,h=e.headerComponent,M=e.description,z=e.width,O=e.columnMenuIconButton,m=void 0===O?null:O,g=e.columnMenu,v=void 0===g?null:g,A=e.columnTitleIconButtons,y=void 0===A?null:A,x=e.headerClassName,q=e.label,w=e.resizable,W=e.draggableContainerProps,R=e.columnHeaderSeparatorProps,C=e.disableHeaderSeparator,_=Qe(e,xV),S=oT(),k=iT(),L=t.useRef(null),E=s(t.useState(o),2),T=E[0],N=E[1],P=LM(L,n),B="none";return null!=p&&(B="asc"===p?"ascending":"descending"),t.useEffect((function(){T||N(o)}),[T,o]),t.useLayoutEffect((function(){var e=S.current.state.columnMenu;if(u&&!e.open){var t=L.current.querySelector('[tabindex="0"]')||L.current;null==t||t.focus(),S.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[S,u]),(0,Cn.jsxs)("div",c({ref:P,className:ub(r.root,x),style:{height:a,width:z,minWidth:z,maxWidth:z},role:"columnheader",tabIndex:d,"aria-colindex":i+1,"aria-sort":B,"aria-label":null==h?q:void 0},_,{children:[(0,Cn.jsxs)("div",c({className:r.draggableContainer,draggable:f},W,{children:[(0,Cn.jsxs)("div",{className:r.titleContainer,children:[(0,Cn.jsx)("div",{className:r.titleContainerContent,children:void 0!==h?h:(0,Cn.jsx)(yV,{label:q,description:M,columnWidth:z})}),y]}),m]})),!C&&(0,Cn.jsx)(hV,c({resizable:!k.disableColumnResize&&!!w,resizing:l,height:a,side:b},R)),v]}))}));function wV(e){var n,r,o,i,a,l,p=e.column,u=e.columnMenuOpen,d=e.colIndex,b=e.headerHeight,f=e.isResizing,h=e.isLastColumn,M=e.sortDirection,z=e.sortIndex,O=e.filterItemsCounter,m=e.hasFocus,g=e.tabIndex,v=e.extendRowFullWidth,A=e.disableReorder,y=e.separatorSide,x=oT(),q=iT(),w=t.useRef(null),W=cS(),R=cS(),C=t.useRef(null),_=s(t.useState(u),2),S=_[0],k=_[1],L=null!=(n=x.current.getRootDimensions())?n:{hasScrollX:!1,hasScrollY:!1},E=L.hasScrollX,T=L.hasScrollY,N=t.useMemo((function(){return!q.disableColumnReorder&&!A&&!p.disableReorder}),[q.disableColumnReorder,A,p.disableReorder]);p.renderHeader&&(l=p.renderHeader(x.current.getColumnHeaderParams(p.field)));var P=h?!(h&&E&&!T)&&!v:q.showColumnRightBorder,B=function(e){var t=e.column,n=e.classes,r=e.isDragging,o=e.sortDirection,i=e.showRightBorder,a=e.filterItemsCounter,s=null!=o,c=null!=a&&a>0,l="number"===t.type;return Cf({root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",s&&"columnHeader--sorted",c&&"columnHeader--filtered",l&&"columnHeader--numeric",i&&"withBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},kE,n)}(c({},e,{classes:q.classes,showRightBorder:P})),X=t.useCallback((function(e){return function(t){t.currentTarget.contains(t.target)&&x.current.publishEvent(e,x.current.getColumnHeaderParams(p.field),t)}}),[x,p.field]),j=t.useMemo((function(){return{onClick:X("columnHeaderClick"),onDoubleClick:X("columnHeaderDoubleClick"),onMouseOver:X("columnHeaderOver"),onMouseOut:X("columnHeaderOut"),onMouseEnter:X("columnHeaderEnter"),onMouseLeave:X("columnHeaderLeave"),onKeyDown:X("columnHeaderKeyDown"),onFocus:X("columnHeaderFocus"),onBlur:X("columnHeaderBlur")}}),[X]),I=t.useMemo((function(){return N?{onDragStart:X("columnHeaderDragStart"),onDragEnter:X("columnHeaderDragEnter"),onDragOver:X("columnHeaderDragOver"),onDragEnd:X("columnHeaderDragEnd")}:{}}),[N,X]),D=t.useMemo((function(){return{onMouseDown:X("columnSeparatorMouseDown")}}),[X]);t.useEffect((function(){S||k(u)}),[S,u]);var F=t.useCallback((function(){k(!1)}),[]),H=!q.disableColumnMenu&&!p.disableColumnMenu&&(0,Cn.jsx)(OV,{column:p,columnMenuId:W,columnMenuButtonId:R,open:S,iconButtonRef:C}),V=(0,Cn.jsx)(mV,{columnMenuId:W,columnMenuButtonId:R,field:p.field,open:u,target:C.current,ContentComponent:q.components.ColumnMenu,contentComponentProps:null==(r=q.componentsProps)?void 0:r.columnMenu,onExited:F}),U=null!=(o=p.sortingOrder)?o:q.sortingOrder,G=(0,Cn.jsxs)(t.Fragment,{children:[!q.disableColumnFilter&&(0,Cn.jsx)(q.components.ColumnHeaderFilterIconButton,c({field:p.field,counter:O},null==(i=q.componentsProps)?void 0:i.columnHeaderFilterIconButton)),p.sortable&&!p.hideSortIcons&&(0,Cn.jsx)(zV,{direction:M,index:z,sortingOrder:U})]});t.useLayoutEffect((function(){var e=x.current.state.columnMenu;if(m&&!e.open){var t=w.current.querySelector('[tabindex="0"]')||w.current;null==t||t.focus(),x.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[x,m]);var Y="function"===typeof p.headerClassName?p.headerClassName({field:p.field,colDef:p}):p.headerClassName,K=null!=(a=p.headerName)?a:p.field;return(0,Cn.jsx)(qV,c({ref:w,classes:B,columnMenuOpen:u,colIndex:d,height:b,isResizing:f,sortDirection:M,hasFocus:m,tabIndex:g,separatorSide:y,isDraggable:N,headerComponent:l,description:p.description,elementId:p.field,width:p.computedWidth,columnMenuIconButton:H,columnTitleIconButtons:G,headerClassName:Y,label:K,resizable:!q.disableColumnResize&&!!p.resizable,"data-field":p.field,columnMenu:V,draggableContainerProps:I,columnHeaderSeparatorProps:D},j))}function WV(e){var t,n,r,o=e.groupId,i=e.width,a=e.depth,s=e.maxDepth,l=e.fields,p=e.height,u=e.colIndex,d=e.isLastColumn,b=e.extendRowFullWidth,f=iT(),h=oT(),M=rT(h,BN),z=null!=(t=h.current.getRootDimensions())?t:{hasScrollX:!1,hasScrollY:!1},O=z.hasScrollX,m=z.hasScrollY,g=o?M[o]:{},v=g.headerName,A=void 0===v?null!=o?o:"":v,y=g.description,x=void 0===y?"":y,q=g.headerAlign,w=void 0===q?void 0:q,W=o&&(null==(n=M[o])?void 0:n.renderHeaderGroup),R={groupId:o,headerName:A,description:x,depth:a,maxDepth:s,fields:l,colIndex:u,isLastColumn:d};o&&W&&(r=W(R));var C=d?!(d&&O&&!m)&&!b:f.showColumnRightBorder,_=f.showColumnRightBorder,S=c({},e,{classes:f.classes,showRightBorder:C,showColumnBorder:_,headerAlign:w,depth:a,isDragging:!1}),k=null!=A?A:o,L=OA(),E=null===o?"empty-group-cell-".concat(L):o,T=function(e){var t=e.classes,n=e.headerAlign;return Cf({root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",e.isDragging&&"columnHeader--moving",e.showRightBorder&&"withBorder",e.showColumnBorder&&"columnHeader--showColumnBorder",null===e.groupId?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},kE,t)}(S),N="function"===typeof g.headerClassName?g.headerClassName(R):g.headerClassName;return(0,Cn.jsx)(qV,{classes:T,columnMenuOpen:!1,colIndex:u,height:p,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:-1,isDraggable:!1,headerComponent:r,headerClassName:N,description:x,elementId:E,width:i,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:k,"aria-colspan":l.length,"data-fields":"|-".concat(l.join("-|-"),"-|"),disableHeaderSeparator:!0})}var RV=$f("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:function(e,t){return t.columnHeaderRow}})((function(){return{display:"flex"}}));var CV=["className"],_V=$f("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:function(e,t){return t.columnHeaders}})((function(e){var t=e.theme,n="light"===t.palette.mode?Gt(Vt(t.palette.divider,1),.88):Ut(Vt(t.palette.divider,1),.68);return{position:"absolute",top:0,left:0,right:0,overflow:"hidden",display:"flex",alignItems:"center",borderBottom:"1px solid ".concat(n),borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius}})),SV=t.forwardRef((function(e,t){var n=e.className,r=Qe(e,CV),o=function(e){return Cf({root:["columnHeaders"]},kE,e.classes)}({classes:iT().classes});return(0,Cn.jsx)(_V,c({ref:t,className:ub(n,o.root)},r))})),kV=["isDragging","className"],LV=$f("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:function(e,t){return[ne({},"&.".concat(LE.columnHeaderDropZone),t.columnHeaderDropZone),t.columnHeadersInner]}})((function(){var e;return ne(e={display:"flex",alignItems:"flex-start",flexDirection:"column"},"&.".concat(LE.columnHeaderDropZone," .").concat(LE.columnHeaderDraggableContainer),{cursor:"move"}),ne(e,"&.".concat(LE["columnHeadersInner--scrollable"]," .").concat(LE.columnHeader,":last-child"),{borderRight:"none"}),e})),EV=t.forwardRef((function(e,t){var n,r,o=e.isDragging,i=e.className,a=Qe(e,kV),s=oT(),l=iT(),p=function(e){return Cf({root:["columnHeadersInner",e.isDragging&&"columnHeaderDropZone",e.hasScrollX&&"columnHeadersInner--scrollable"]},kE,e.classes)}({isDragging:o,hasScrollX:null!=(n=null==(r=s.current.getRootDimensions())?void 0:r.hasScrollX)&&n,classes:l.classes});return(0,Cn.jsx)(LV,c({ref:t,className:ub(i,p.root)},a))})),TV=["style","className","innerRef"],NV=function(e){return(e<1?5.11916*Math.pow(e,2):4.5*Math.log(e+1)+2)/100},PV=$f("div",{name:"MuiDataGrid",slot:"PinnedColumnHeaders",overridesResolver:function(e,t){return[ne({},"&.".concat(LE["pinnedColumnHeaders--left"]),t["pinnedColumnHeaders--left"]),ne({},"&.".concat(LE["pinnedColumnHeaders--right"]),t["pinnedColumnHeaders--right"]),t.pinnedColumnHeaders]}})((function(e){var t=e.theme,n=e.ownerState;return c({position:"absolute",overflow:"hidden",height:"100%",zIndex:1,display:"flex",flexDirection:"column",boxShadow:t.shadows[2],backgroundColor:t.palette.background.default},"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat(Vt("#fff",NV(2)),", ").concat(Vt("#fff",NV(2)),")")},n.side===rI.left&&{left:0},n.side===rI.right&&{right:0})})),BV=t.forwardRef((function(e,n){var o=e.className,i=e.innerRef,a=Qe(e,TV),l=cI(),p=lI(),u=rT(p,$E),d=s(t.useState(0),2),b=d[0],f=d[1],h=oO((function(){var e=p.current.getRootDimensions();if(e){var t=e.hasScrollY?e.scrollBarSize:0;b!==t&&f(t)}}));xN(p,"virtualScrollerContentSizeChange",h);var M=rT(p,hI),z=s(PI(M,u),2),O=z[0],m=z[1],g=function(e){var n=e.innerRef,o=e.minColumnIndex,i=void 0===o?0:o,a=s(t.useState(""),2),l=a[0],p=a[1],u=s(t.useState(""),2),d=u[0],b=u[1],f=oT(),h=rT(f,QE),M=rT(f,JE),z=rT(f,pP),O=rT(f,lP),m=rT(f,sP),g=rT(f,lT),v=rT(f,pT),A=rT(f,dT),y=rT(f,tN),x=rT(f,IT),q=rT(f,xj),w=iT(),W=t.useRef(null),R=LM(n,W),C=s(t.useState(null),2),_=C[0],S=C[1],k=t.useRef(_),L=t.useRef(0),E=PB(f,w);t.useEffect((function(){f.current.columnHeadersContainerElementRef.current.scrollLeft=0}),[f]);var T=t.useRef(PE(yX,{equalityCheck:function(e,t){return["firstColumnIndex","minColumnIndex","columnBuffer"].every((function(n){return e[n]===t[n]}))}})),N=t.useCallback((function(e){var t=s(OI({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:E.rows.length,buffer:w.rowBuffer}),2),n=t[0],r=t[1],o=T.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:i,columnBuffer:w.columnBuffer,firstRowToRender:n,lastRowToRender:r,apiRef:f,visibleRows:E.rows}),a=o>0?L.current-M[o]:L.current;W.current.style.transform="translate3d(".concat(-a,"px, 0px, 0px)")}),[M,i,w.columnBuffer,f,E.rows,w.rowBuffer]);t.useLayoutEffect((function(){_&&N(_)}),[_,N]);var P=t.useCallback((function(e,t){var n,o,i=e.left,a=e.renderContext,s=void 0===a?null:a;if(W.current&&(L.current!==i||(null==(n=k.current)?void 0:n.firstColumnIndex)!==(null==s?void 0:s.firstColumnIndex)||(null==(o=k.current)?void 0:o.lastColumnIndex)!==(null==s?void 0:s.lastColumnIndex))){L.current=i;var c=!1;s===k.current&&k.current?c=!0:(function(e){return!!e.target}(t)?(r.flushSync((function(){S(s)})),c=!0):S(s),k.current=s),s&&c&&N(s)}}),[N]),B=t.useCallback((function(e){return b(e.field)}),[]),X=t.useCallback((function(){return b("")}),[]),j=t.useCallback((function(e){return p(e.field)}),[]),I=t.useCallback((function(){return p("")}),[]);xN(f,"columnResizeStart",B),xN(f,"columnResizeStop",X),xN(f,"columnHeaderDragStart",j),xN(f,"columnHeaderDragEnd",I),xN(f,"rowsScroll",P);var D=function(e){var t=e||{},n=t.renderContext,r=void 0===n?_:n,o=t.minFirstColumn,a=void 0===o?i:o,c=t.maxLastColumn,l=void 0===c?h.length:c;if(!r)return null;var p=s(OI({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:E.rows.length,buffer:w.rowBuffer}),2),u=p[0],d=p[1],b=T.current({firstColumnIndex:r.firstColumnIndex,minColumnIndex:a,columnBuffer:w.columnBuffer,apiRef:f,firstRowToRender:u,lastRowToRender:d,visibleRows:E.rows}),M=Math.min(r.lastColumnIndex+w.columnBuffer,l);return{renderedColumns:h.slice(b,M),firstColumnToRender:b,lastColumnToRender:M,minFirstColumn:a,maxLastColumn:l}},F=function(){var e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).slice(0,e+1)},H={minHeight:A,maxHeight:A,lineHeight:"".concat(g,"px")};return{renderContext:_,getColumnHeaders:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=D(e);if(null==n)return null;for(var r=n.renderedColumns,o=n.firstColumnToRender,i=[],a=0;a=i&&null!=(M=h[p])&&M.groupPath&&lN(F(null==(z=h[p])?void 0:z.groupPath,e),g);){var v=h[p];s+=null!=(O=v.computedWidth)?O:0,0===t.length?t.push({width:null!=(m=v.computedWidth)?m:0,fields:[v.field],groupId:u,groupParents:g,colIndex:p}):(t[0].width+=null!=(A=v.computedWidth)?A:0,t[0].fields.push(v.field),t[0].colIndex=p),p-=1}var w=n.reduce((function(t,n,o){var i,a,s,l,p=t[t.length-1];return n.groupPath&&n.groupPath.length>e?p&&p.groupId===n.groupPath[e]?[].concat(Le(t.slice(0,t.length-1)),[c({},p,{width:p.width+(null!=(s=n.computedWidth)?s:0),fields:[].concat(Le(p.fields),[n.field])})]):[].concat(Le(t),[{groupId:n.groupPath[e],groupParents:F(n.groupPath,e),width:null!=(a=n.computedWidth)?a:0,fields:[n.field],colIndex:r+o}]):p&&null===p.groupId&&lN(F(n.groupPath,e),p.groupParents)?[].concat(Le(t.slice(0,t.length-1)),[c({},p,{width:p.width+(null!=(l=n.computedWidth)?l:0),fields:[].concat(Le(p.fields),[n.field])})]):[].concat(Le(t),[{groupId:null,groupParents:F(n.groupPath,e),width:null!=(i=n.computedWidth)?i:0,fields:[n.field],colIndex:r+o}])}),t);p=o;for(var R=w[w.length-1].groupId;null!==R&&p0&&void 0!==arguments[0]?arguments[0]:{})},getInnerProps:function(){return{ref:R,role:"rowgroup"}}}}({innerRef:i,minColumnIndex:O.length}),v=g.isDragging,A=g.renderContext,y=g.getRootProps,x=g.getInnerProps,q=g.getColumnHeaders,w=g.getColumnGroupHeaders,W=function(e){var t=e.leftPinnedColumns,n=e.rightPinnedColumns,r=e.classes;return Cf({leftPinnedColumns:["pinnedColumnHeaders",t&&t.length>0&&"pinnedColumnHeaders--left"],rightPinnedColumns:["pinnedColumnHeaders",n&&n.length>0&&"pinnedColumnHeaders--right"]},kE,r)}({leftPinnedColumns:O,rightPinnedColumns:m,classes:l.classes}),R=A&&O.length?c({},A,{firstColumnIndex:0,lastColumnIndex:O.length}):null,C=A&&m.length?c({},A,{firstColumnIndex:u.length-m.length,lastColumnIndex:u.length}):null,_=x(),S={role:_.role};return(0,Cn.jsxs)(SV,c({ref:n,className:o},y(a),{children:[R&&(0,Cn.jsxs)(PV,c({className:W.leftPinnedColumns,ownerState:{side:rI.left}},S,{children:[w({renderContext:R,minFirstColumn:R.firstColumnIndex,maxLastColumn:R.lastColumnIndex}),q({renderContext:R,minFirstColumn:R.firstColumnIndex,maxLastColumn:R.lastColumnIndex},{disableReorder:!0})]})),(0,Cn.jsxs)(EV,c({isDragging:v},_,{children:[w({renderContext:A,minFirstColumn:O.length,maxLastColumn:u.length-m.length}),q({renderContext:A,minFirstColumn:O.length,maxLastColumn:u.length-m.length})]})),C&&(0,Cn.jsxs)(PV,c({ownerState:{side:rI.right},className:W.rightPinnedColumns,style:{paddingRight:b}},S,{children:[w({renderContext:C,minFirstColumn:C.firstColumnIndex,maxLastColumn:C.lastColumnIndex}),q({renderContext:C,minFirstColumn:C.firstColumnIndex,maxLastColumn:C.lastColumnIndex},{disableReorder:!0,separatorSide:QH.Left})]}))]}))})),XV="MTY2NTYwMTIwMDAwMA==",jV=t.forwardRef((function(e,n){var r=function(e){var n=wn({props:e,name:"MuiDataGrid"}),r=t.useMemo((function(){return c({},pD,n.localeText)}),[n.localeText]),o=t.useMemo((function(){var e=n.components;if(!e)return c({},uV);var t={};return Object.entries(uV).forEach((function(n){var r=s(n,2),o=r[0],i=r[1];t[o]=void 0===e[o]?i:e[o]})),t}),[n.components]);return t.useMemo((function(){return c({},dV,n,{localeText:r,components:o,signature:"DataGridPro"})}),[n,r,o])}(e),o=cD(r.apiRef,r);return wE("x-data-grid-pro",XV),(0,Cn.jsx)(SE,{apiRef:o,props:r,children:(0,Cn.jsx)(WT,{className:r.className,style:r.style,sx:r.sx,ref:n,children:(0,Cn.jsxs)(kT,{children:[(0,Cn.jsx)(LT,{}),(0,Cn.jsx)(oN,{ColumnHeadersComponent:BV,VirtualScrollerComponent:VI,children:(0,Cn.jsx)(RE,{packageName:"x-data-grid-pro",releaseInfo:XV})}),(0,Cn.jsx)(iN,{})]})})})})),IV=t.memo(jV);jV.propTypes={apiRef:bE().shape({current:bE().object.isRequired}),"aria-label":bE().string,"aria-labelledby":bE().string,autoHeight:bE().bool,autoPageSize:bE().bool,cellModesModel:bE().object,checkboxSelection:bE().bool,checkboxSelectionVisibleOnly:(bE().bool,function(){return null}),classes:bE().object,columnBuffer:bE().number,columnGroupingModel:bE().arrayOf(bE().object),columns:bE().arrayOf(bE().object).isRequired,columnThreshold:bE().number,columnTypes:bE().object,columnVisibilityModel:bE().object,components:bE().object,componentsProps:bE().object,defaultGroupingExpansionDepth:bE().number,density:bE().oneOf(["comfortable","compact","standard"]),detailPanelExpandedRowIds:bE().arrayOf(bE().oneOfType([bE().number,bE().string]).isRequired),disableChildrenFiltering:bE().bool,disableChildrenSorting:bE().bool,disableColumnFilter:bE().bool,disableColumnMenu:bE().bool,disableColumnPinning:bE().bool,disableColumnReorder:bE().bool,disableColumnResize:bE().bool,disableColumnSelector:bE().bool,disableDensitySelector:bE().bool,disableExtendRowFullWidth:bE().bool,disableIgnoreModificationsIfProcessingProps:bE().bool,disableMultipleColumnsFiltering:bE().bool,disableMultipleColumnsSorting:bE().bool,disableMultipleSelection:bE().bool,disableSelectionOnClick:bE().bool,disableVirtualization:bE().bool,editMode:bE().oneOf(["cell","row"]),editRowsModel:bE().object,error:bE().any,experimentalFeatures:bE().shape({columnGrouping:bE().bool,lazyLoading:bE().bool,newEditingApi:bE().bool,preventCommitWhileValidating:bE().bool,rowPinning:bE().bool,warnIfFocusStateIsNotSynced:bE().bool}),filterMode:(bE().oneOf(["client","server"]),function(){return null}),filterModel:bE().shape({items:bE().arrayOf(bE().shape({columnField:bE().string.isRequired,id:bE().oneOfType([bE().number,bE().string]),operatorValue:bE().string,value:bE().any})).isRequired,linkOperator:bE().oneOf(["and","or"]),quickFilterLogicOperator:bE().oneOf(["and","or"]),quickFilterValues:bE().array}),getCellClassName:bE().func,getDetailPanelContent:bE().func,getDetailPanelHeight:bE().func,getEstimatedRowHeight:bE().func,getRowClassName:bE().func,getRowHeight:bE().func,getRowId:bE().func,getRowSpacing:bE().func,getTreeDataPath:bE().func,groupingColDef:bE().oneOfType([bE().func,bE().object]),headerHeight:bE().number,hideFooter:bE().bool,hideFooterPagination:bE().bool,hideFooterRowCount:(bE().bool,function(){return null}),hideFooterSelectedRowCount:bE().bool,initialState:bE().object,isCellEditable:bE().func,isGroupExpandedByDefault:bE().func,isRowSelectable:bE().func,keepNonExistentRowsSelected:bE().bool,loading:bE().bool,localeText:bE().object,logger:bE().shape({debug:bE().func.isRequired,error:bE().func.isRequired,info:bE().func.isRequired,warn:bE().func.isRequired}),logLevel:bE().oneOf(["debug","error","info","warn",!1]),nonce:bE().string,onCellClick:bE().func,onCellDoubleClick:bE().func,onCellEditCommit:bE().func,onCellEditStart:bE().func,onCellEditStop:bE().func,onCellFocusOut:bE().func,onCellKeyDown:bE().func,onCellModesModelChange:bE().func,onColumnHeaderClick:bE().func,onColumnHeaderDoubleClick:bE().func,onColumnHeaderEnter:bE().func,onColumnHeaderLeave:bE().func,onColumnHeaderOut:bE().func,onColumnHeaderOver:bE().func,onColumnOrderChange:bE().func,onColumnResize:bE().func,onColumnVisibilityChange:bE().func,onColumnVisibilityModelChange:bE().func,onColumnWidthChange:bE().func,onDetailPanelExpandedRowIdsChange:bE().func,onEditCellPropsChange:bE().func,onEditRowsModelChange:bE().func,onError:bE().func,onFetchRows:bE().func,onFilterModelChange:bE().func,onMenuClose:bE().func,onMenuOpen:bE().func,onPageChange:bE().func,onPageSizeChange:bE().func,onPinnedColumnsChange:bE().func,onPreferencePanelClose:bE().func,onPreferencePanelOpen:bE().func,onProcessRowUpdateError:bE().func,onResize:bE().func,onRowClick:bE().func,onRowDoubleClick:bE().func,onRowEditCommit:bE().func,onRowEditStart:bE().func,onRowEditStop:bE().func,onRowModesModelChange:bE().func,onRowOrderChange:bE().func,onRowsScrollEnd:bE().func,onSelectionModelChange:bE().func,onSortModelChange:bE().func,onStateChange:bE().func,page:bE().number,pageSize:bE().number,pagination:bE().bool,paginationMode:bE().oneOf(["client","server"]),pinnedColumns:bE().shape({left:bE().arrayOf(bE().string),right:bE().arrayOf(bE().string)}),pinnedRows:bE().shape({bottom:bE().array,top:bE().array}),processRowUpdate:bE().func,rowBuffer:bE().number,rowCount:bE().number,rowHeight:bE().number,rowModesModel:bE().object,rowReordering:bE().bool,rows:bE().array.isRequired,rowsLoadingMode:bE().oneOf(["client","server"]),rowSpacingType:bE().oneOf(["border","margin"]),rowsPerPageOptions:bE().arrayOf(bE().number),rowThreshold:bE().number,scrollbarSize:bE().number,scrollEndThreshold:bE().number,selectionModel:bE().oneOfType([bE().arrayOf(bE().oneOfType([bE().number,bE().string]).isRequired),bE().number,bE().string]),showCellRightBorder:bE().bool,showColumnRightBorder:bE().bool,sortingMode:bE().oneOf(["client","server"]),sortingOrder:bE().arrayOf(bE().oneOf(["asc","desc"])),sortModel:bE().arrayOf(bE().shape({field:bE().string.isRequired,sort:bE().oneOf(["asc","desc"])})),sx:bE().oneOfType([bE().arrayOf(bE().oneOfType([bE().func,bE().object,bE().bool])),bE().func,bE().object]),throttleRowsMs:bE().number,treeData:bE().bool};var DV=cm((0,Cn.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew"),FV=cm((0,Cn.jsx)("path",{d:"M17.5 9.5C17.5 6.46 15.04 4 12 4S6.5 6.46 6.5 9.5c0 2.7 1.94 4.93 4.5 5.4V17H9v2h2v2h2v-2h2v-2h-2v-2.1c2.56-.47 4.5-2.7 4.5-5.4zm-9 0C8.5 7.57 10.07 6 12 6s3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5z"}),"Female"),HV=cm((0,Cn.jsx)("path",{d:"M9.5 11c1.93 0 3.5 1.57 3.5 3.5S11.43 18 9.5 18 6 16.43 6 14.5 7.57 11 9.5 11zm0-2C6.46 9 4 11.46 4 14.5S6.46 20 9.5 20s5.5-2.46 5.5-5.5c0-1.16-.36-2.23-.97-3.12L18 7.42V10h2V4h-6v2h2.58l-3.97 3.97C11.73 9.36 10.66 9 9.5 9z"}),"Male");function VV(e){var t=e.nam,n=e.fontSize;n=n||"small";var r=e.sx||{};return t?parseInt(t.substring(6,8))>12?(0,Cn.jsx)(FV,{fontSize:n,sx:oe({color:"pink.main"},r)}):(0,Cn.jsx)(HV,{fontSize:n,sx:oe({color:"blue.main"},r)}):(0,Cn.jsx)(Cn.Fragment,{})}var UV=75,GV={headerAlign:"left",align:"left",width:80},YV={width:100,headerAlign:"center",align:"center",valueFormatter:function(e){var t=e.value;return t?ro()(t).format(oa):""}},KV={width:150,headerAlign:"center",align:"center",valueFormatter:function(e){var t=e.value;return t?ro()(t).format(ra):""}},QV={width:100,headerAlign:"center",align:"center"},$V={width:160,headerAlign:"center",align:"center"},JV={minWidth:200,flex:1},ZV={width:100},eU={headerAlign:"right",align:"right",width:120},tU={headerAlign:"center",align:"center",width:120},nU={headerAlign:"center",align:"center",width:100},rU={headerAlign:"center",align:"center",width:60},oU={headerAlign:"center",align:"center",width:100},iU={headerAlign:"left",align:"left",width:140},aU={headerAlign:"left",align:"left",width:140},sU=[5,10,15,20,25,50,75,100],cU=cm((0,Cn.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),lU=cm((0,Cn.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");function pU(e){var t=e.loadingText;return(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",pt:4,children:(0,Cn.jsxs)(Wf,{sx:{display:"flex",alignItems:"center"},children:[(0,Cn.jsx)(Oh,{size:20,sx:{mr:2}}),(0,Cn.jsx)(qh,{children:null!==t&&void 0!==t?t:"Chargement..."})]})})}function uU(e){var t=e.loadingText;return(0,Cn.jsxs)(dU,{children:[(0,Cn.jsx)("svg",{width:"120",height:"50",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false",children:(0,Cn.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,Cn.jsxs)("g",{transform:"translate(24 31.67)",children:[(0,Cn.jsx)("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),(0,Cn.jsx)("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),(0,Cn.jsx)("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),(0,Cn.jsx)("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),(0,Cn.jsx)("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),(0,Cn.jsxs)("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)",children:[(0,Cn.jsx)("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),(0,Cn.jsx)("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})}),(0,Cn.jsx)(Wf,{sx:{mt:1},children:null!==t&&void 0!==t?t:"Aucune donn\xe9e"})]})}var dU=$f("div")((function(e){var t=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===t.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===t.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===t.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===t.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===t.palette.mode?"0.8":"0.08",fill:"light"===t.palette.mode?"#f5f5f5":"#fff"}}}));function bU(e){var t=e.loadingText;return(0,Cn.jsxs)(fU,{children:[(0,Cn.jsx)("svg",{width:"120",height:"50",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false",children:(0,Cn.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,Cn.jsxs)("g",{transform:"translate(24 31.67)",children:[(0,Cn.jsx)("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),(0,Cn.jsx)("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),(0,Cn.jsx)("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),(0,Cn.jsx)("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),(0,Cn.jsx)("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),(0,Cn.jsxs)("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)",children:[(0,Cn.jsx)("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),(0,Cn.jsx)("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})}),(0,Cn.jsx)(Wf,{sx:{mt:1},children:null!==t&&void 0!==t?t:"Aucun r\xe9sultat"})]})}var fU=$f("div")((function(e){var t=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===t.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===t.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===t.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===t.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===t.palette.mode?"0.8":"0.08",fill:"light"===t.palette.mode?"#f5f5f5":"#fff"}}}));function hU(e){return Zf("MuiTableContainer",e)}eh("MuiTableContainer",["root"]);var MU=["className","component"],zU=$f("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:function(e,t){return t.root}})({width:"100%",overflowX:"auto"}),OU=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiTableContainer"}),r=n.className,o=n.component,i=void 0===o?"div":o,a=Qe(n,MU),s=c({},n,{component:i}),l=function(e){return Cf({root:["root"]},hU,e.classes)}(s);return(0,Cn.jsx)(zU,c({ref:t,as:i,className:ub(l.root,r),ownerState:s},a))})),mU=OU;function gU(e){return Zf("MuiTable",e)}eh("MuiTable",["root","stickyHeader"]);var vU=["className","component","padding","size","stickyHeader"],AU=$f("table",{name:"MuiTable",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.stickyHeader&&t.stickyHeader]}})((function(e){var t=e.theme,n=e.ownerState;return c({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":c({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})})),yU="table",xU=t.forwardRef((function(e,n){var r=wn({props:e,name:"MuiTable"}),o=r.className,i=r.component,a=void 0===i?yU:i,s=r.padding,l=void 0===s?"normal":s,p=r.size,u=void 0===p?"medium":p,d=r.stickyHeader,b=void 0!==d&&d,f=Qe(r,vU),h=c({},r,{component:a,padding:l,size:u,stickyHeader:b}),M=function(e){var t=e.classes;return Cf({root:["root",e.stickyHeader&&"stickyHeader"]},gU,t)}(h),z=t.useMemo((function(){return{padding:l,size:u,stickyHeader:b}}),[l,u,b]);return(0,Cn.jsx)(PF.Provider,{value:z,children:(0,Cn.jsx)(AU,c({as:a,role:a===yU?null:"table",ref:n,className:ub(M.root,o),ownerState:h},f))})})),qU=xU;function wU(e){return Zf("MuiTableHead",e)}eh("MuiTableHead",["root"]);var WU=["className","component"],RU=$f("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:function(e,t){return t.root}})({display:"table-header-group"}),CU={variant:"head"},_U="thead",SU=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiTableHead"}),r=n.className,o=n.component,i=void 0===o?_U:o,a=Qe(n,WU),s=c({},n,{component:i}),l=function(e){return Cf({root:["root"]},wU,e.classes)}(s);return(0,Cn.jsx)(BF.Provider,{value:CU,children:(0,Cn.jsx)(RU,c({as:i,className:ub(l.root,r),ref:t,role:i===_U?null:"rowgroup",ownerState:s},a))})})),kU=SU;function LU(e){return Zf("MuiTableRow",e)}var EU=eh("MuiTableRow",["root","selected","hover","head","footer"]),TU=["className","component","hover","selected"],NU=$f("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((function(e){var t,n=e.theme;return ne(t={color:"inherit",display:"table-row",verticalAlign:"middle",outline:0},"&.".concat(EU.hover,":hover"),{backgroundColor:(n.vars||n).palette.action.hover}),ne(t,"&.".concat(EU.selected),{backgroundColor:n.vars?"rgba(".concat(n.vars.palette.primary.mainChannel," / ").concat(n.vars.palette.action.selectedOpacity,")"):Vt(n.palette.primary.main,n.palette.action.selectedOpacity),"&:hover":{backgroundColor:n.vars?"rgba(".concat(n.vars.palette.primary.mainChannel," / calc(").concat(n.vars.palette.action.selectedOpacity," + ").concat(n.vars.palette.action.hoverOpacity,"))"):Vt(n.palette.primary.main,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity)}}),t})),PU=t.forwardRef((function(e,n){var r=wn({props:e,name:"MuiTableRow"}),o=r.className,i=r.component,a=void 0===i?"tr":i,s=r.hover,l=void 0!==s&&s,p=r.selected,u=void 0!==p&&p,d=Qe(r,TU),b=t.useContext(BF),f=c({},r,{component:a,hover:l,selected:u,head:b&&"head"===b.variant,footer:b&&"footer"===b.variant}),h=function(e){var t=e.classes;return Cf({root:["root",e.selected&&"selected",e.hover&&"hover",e.head&&"head",e.footer&&"footer"]},LU,t)}(f);return(0,Cn.jsx)(NU,c({as:a,ref:n,className:ub(h.root,o),role:"tr"===a?null:"row",ownerState:f},d))})),BU=PU;function XU(e){return Zf("MuiTableBody",e)}eh("MuiTableBody",["root"]);var jU,IU,DU,FU,HU,VU,UU,GU,YU,KU,QU,$U,JU,ZU,eG,tG,nG,rG,oG,iG,aG,sG,cG,lG,pG,uG,dG,bG,fG,hG,MG,zG,OG,mG,gG,vG=["className","component"],AG=$f("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:function(e,t){return t.root}})({display:"table-row-group"}),yG={variant:"body"},xG="tbody",qG=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiTableBody"}),r=n.className,o=n.component,i=void 0===o?xG:o,a=Qe(n,vG),s=c({},n,{component:i}),l=function(e){return Cf({root:["root"]},XU,e.classes)}(s);return(0,Cn.jsx)(BF.Provider,{value:yG,children:(0,Cn.jsx)(AG,c({className:ub(l.root,r),as:i,ref:t,role:i===xG?null:"rowgroup",ownerState:s},a))})})),wG=qG,WG=Bv(jU||(jU=Rf(["\n fragment FactLigneFields on FactLigne {\n ligneno\n nce\n revision\n rank\n mdgrppstno\n typelmfact\n codefact\n datefact\n coderole\n debutelmfact\n finelmfact\n coderef\n mntprelim\n mntfinal\n statrecv\n }\n"]))),RG=Bv(IU||(IU=Rf(["\n fragment CodeFactFields on CodeFact {\n codefactno\n entente\n code\n description\n typecode\n debut\n fin\n descriptionsa\n }\n"]))),CG=Bv(DU||(DU=Rf(["\n fragment FactLigneFdFields on FactLigneFd {\n ligneno\n typefd\n codetransport\n nbrkmaller\n nbrkmretour\n nbrhrsdeplacement\n nbrhrsattente\n\n TYPE_FD\n METHODE_TRANSPORT\n }\n"]))),_G=Bv(FU||(FU=Rf(["\n fragment FactLigneFdFraisFields on FactLigneFdFrais {\n ligneno\n rank\n typefrais\n frais\n }\n"]))),SG=Bv(HU||(HU=Rf(["\n fragment FactLigneVacFields on FactLigneVac {\n nce\n revision\n lineno\n linedt\n moderem\n nuit\n am\n pm\n soir\n }\n"]))),kG=Bv(VU||(VU=Rf(["\n fragment FactLigneVacDetailsFields on FactLigneVacDetails {\n nce\n revision\n lineno\n rank\n ref\n code\n sd\n hr\n min\n }\n"]))),LG=Bv(UU||(UU=Rf(["\n fragment FactLigneRmxFields on FactLigneRmx {\n nce\n revision\n lineno\n linedt\n am\n pm\n ref\n demiperdiem\n }\n"]))),EG=Bv(GU||(GU=Rf(["\n fragment FactLigneRmxDetailsFields on FactLigneRmxDetails {\n nce\n revision\n lineno\n rank\n ref\n code\n sd\n hr\n min\n }\n"]))),TG=Bv(YU||(YU=Rf(["\n fragment ElementContxFields on ElementContx {\n elementno\n entente\n codeelement\n texte\n textesa\n niveau\n debut\n fin\n }\n"]))),NG=Bv(KU||(KU=Rf(["\n fragment FactLigneElmContxFields on FactLigneElmContx {\n ligneno\n codeelmcontx\n }\n"]))),PG=Bv(QU||(QU=Rf(["\n fragment FactLigneElmMesureFields on FactLigneElmMesure {\n ligneno\n codeelmmesure\n valmesure\n }\n"]))),BG=Bv($U||($U=Rf(["\n fragment ElementMesureFields on ElementMesure {\n code\n nom\n typeunite\n }\n"]))),XG=Bv(JU||(JU=Rf(["\n fragment MdFields on Md {\n id\n created_at\n updated_at\n licence_sm\n email\n password\n first_name\n last_name\n first_name_smchar\n last_name_smchar\n sex\n retraite_on\n avatar_url\n is_still_client\n can_login\n address1\n address2\n city\n zip\n phone_mobile\n phone_home\n phone_work\n joined_on\n left_on\n balance\n qb_customer_id\n qb_customer_fully_qualified_name\n\n is_billable\n is_billable_until\n\n should_receive_reports\n should_receive_reports_until\n\n wants_invoice_emails\n wants_ec_emails\n wants_newsletter_emails\n }\n"]))),jG=Bv(ZU||(ZU=Rf(["\n fragment MdBillFields on MdBill {\n id\n created_at\n updated_at\n ec_id\n subtotal_amt\n tps_rate\n tvq_rate\n tps_amt\n tvq_amt\n total_amt\n md_id\n filename\n is_sipt\n qb_invoice_id\n bill_no\n status # 'draft' | 'approved' | 'billed' | 'canceled' | 'credited'\n email_sent\n last_email_sent_at\n billing_method\n }\n"]))),IG=Bv(eG||(eG=Rf(["\n fragment MdGrpFields on MdGrp {\n id\n created_at\n updated_at\n md_id\n grp\n sm\n rmx\n rpv\n rps\n is_active\n }\n"]))),DG=(Bv(tG||(tG=Rf(["\n fragment MdTransactionFields on MdTransaction {\n id\n created_at\n updated_at\n md_id\n type\n ref_id\n txn_recorded_at\n name\n amt\n new_balance\n }\n"]))),Bv(nG||(nG=Rf(["\n fragment MdHistoricalTransactionFields on MdHistoricalTransaction {\n txn_recorded_at\n type # 'payment | 'bill\n ref_id\n ref_no\n amt\n old_balance\n new_balance\n }\n"]))),Bv(rG||(rG=Rf(["\n fragment EcFields on Ec {\n id\n created_at\n updated_at\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n fmp_id\n }\n"])))),FG=(Bv(oG||(oG=Rf(["\n fragment MdBillLineFields on MdBillLine {\n id\n md_bill_id\n bill_line_tag_id\n position\n name\n desc\n pst\n grp\n unit_amt\n qty\n total_amt\n json_details\n md_billing_auto_line_id\n }\n"]))),Bv(iG||(iG=Rf(["\n fragment MdBillModLineFields on MdBillModLine {\n id\n md_bill_id\n bill_mod_line_tag_id\n name\n desc\n value_type\n value\n total_amt\n md_billing_auto_mod_line_id\n }\n"]))),Bv(aG||(aG=Rf(["\n fragment BillLineTagFields on BillLineTag {\n id\n created_at\n updated_at\n slug\n name\n desc\n }\n"]))),Bv(sG||(sG=Rf(["\n fragment BillModLineTagFields on BillModLineTag {\n id\n created_at\n updated_at\n slug\n name\n desc\n }\n"]))),Bv(cG||(cG=Rf(["\n fragment BillingSheetFields on BillingSheet {\n id\n created_at\n updated_at\n name\n desc\n first_bracket_fee\n second_bracket_fee\n y_increment\n }\n"]))),Bv(lG||(lG=Rf(["\n fragment PosteFields on Poste {\n numero\n modulateur\n description\n descriptionsa\n cab\n clsc\n cli\n urg\n usi\n adm\n ger\n psy\n pal\n rea\n heb\n udc\n umf\n actif\n }\n"]))),Bv(pG||(pG=Rf(["\n fragment MdWorkStoppageFields on MdWorkStoppage {\n id\n created_at\n updated_at\n md_id\n work_stoppage_cause_id\n note\n start_on\n end_on\n indeterminate\n cancel_automatic_billing\n }\n"]))),Bv(uG||(uG=Rf(["\n fragment MdBillingInfoFields on MdBillingInfo {\n id\n created_at\n updated_at\n md_id\n billing_method\n billing_sheet_id\n fact_fee\n fact_line_fee\n fact_fee_urg\n fact_line_fee_urg\n fact_fee_hospit\n fact_line_fee_hospit\n fact_fee_dme\n fact_line_fee_dme\n rmx_sheet_fee\n rpv_sheet_fee\n rps_sheet_fee\n hors_ramq_req_fee\n manual_fd_fee\n is_approved\n }\n"]))),Bv(dG||(dG=Rf(["\n fragment BankAccountFields on BankAccount {\n id\n created_at\n updated_at\n name\n qb_account_id\n }\n"]))),Bv(bG||(bG=Rf(["\n fragment Ec1717igFields on Ec1717ig {\n mdgrpid\n ec_id\n typereglement\n compteur\n valideur\n masterid\n nodemande\n debutperiode\n finperiode\n datereception\n nodemref1\n nodemref2\n codetrans\n libellecodetrans\n codemsgexpl1\n codemsgexpl2\n codemsgexpl3\n montantinteret\n noattestation\n }\n"])))),HG=Bv(fG||(fG=Rf(["\n fragment EcReportFields on EcReport {\n id\n filename\n licence\n grp\n ec_id\n }\n"]))),VG=Bv(hG||(hG=Rf(["\n fragment DfReportFields on DfReport {\n id\n filename\n licence\n grp\n ec_id\n }\n"]))),UG=Bv(MG||(MG=Rf(["\n fragment PstReportFields on PstReport {\n id\n created_at\n updated_at\n filename\n ec_md_grp_id\n pst_no\n pst_mod\n licence\n grp\n ec_id\n }\n"]))),GG=Bv(zG||(zG=Rf(["\n fragment FactVacViewFields on FactVacView {\n created_at\n nce\n revision\n reqt_id\n licence\n pst_no\n pst_mod\n pst_name\n statut_recv\n is_canceled\n lot_id\n fmp_ec_id\n ec_id\n\n debut_periode\n fin_periode\n hrs_activite\n mins_activite\n cs1\n cs2\n nom_mand\n date_mand\n nom_sign\n date_sign\n once\n attestation\n\n pst_depart\n pst_arrivee\n dh_arrivee\n hrs_depl\n mins_depl\n kms_depl\n montant_transport_reclame\n\n date_service_min\n date_service_max\n date_service_agg\n\n payment_status\n\n ec_1717ig_agg\n\n hrs_activite_payes\n total_remu_activite\n hrs_depl_payes\n total_remu_temps_depl\n kms_transport_payes\n total_remu_cout_transport\n total_remu\n\n line_count\n\n PAYMENT_STATUS_NAME\n }\n"]))),YG=Bv(OG||(OG=Rf(["\n ","\n ","\n ","\n ","\n ","\n ","\n\n query GetFacture($reqt_id: Int) {\n facture(reqt_id: $reqt_id) {\n nce\n revision\n\n FactLignes {\n ...FactLigneFields\n\n CodeFact {\n ...CodeFactFields\n }\n\n FactLigneElmContx {\n ...FactLigneElmContxFields\n\n ElementContx {\n ...ElementContxFields\n }\n }\n\n FactLigneElmMesure {\n ...FactLigneElmMesureFields\n\n ElementMesure {\n ...ElementMesureFields\n }\n }\n }\n }\n }\n"])),WG,RG,NG,TG,PG,BG),KG=Bv(mG||(mG=Rf(["\n ","\n ","\n ","\n ","\n ","\n ","\n\n query GetFactureDaily($reqt_id: Int, $date_service: Date) {\n factureDaily(reqt_id: $reqt_id, date_service: $date_service) {\n nce\n revision\n\n FactLignes {\n ...FactLigneFields\n\n CodeFact {\n ...CodeFactFields\n }\n\n FactLigneElmContx {\n ...FactLigneElmContxFields\n\n ElementContx {\n ...ElementContxFields\n }\n }\n\n FactLigneElmMesure {\n ...FactLigneElmMesureFields\n\n ElementMesure {\n ...ElementMesureFields\n }\n }\n }\n }\n }\n"])),WG,RG,NG,TG,PG,BG),QG=cm((0,Cn.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}),"Help");function $G(e){var t=e.daily,n=e.date_service,r=e.params.row,o=e.containerSx,i=void 0===o?{}:o,a=e.tableRowSx,s=void 0===a?{}:a,c=e.tableRowTextColor,l=r.reqt_id,p=Bg(t?KG:YG,{variables:KG?{reqt_id:l,date_service:n}:{reqt_id:l}}),u=p.loading,d=(p.error,p.data),b=t?null===d||void 0===d?void 0:d.factureDaily:null===d||void 0===d?void 0:d.facture;if(u||!b)return(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",pt:3,children:(0,Cn.jsx)(wh,{})});var f=b.nce,h=b.revision;return(0,Cn.jsx)(Wf,{sx:oe({p:2,pl:4,pr:3,height:"100%"},i),children:(0,Cn.jsx)(mU,{component:Lh,children:(0,Cn.jsxs)(qU,{size:"small",children:[(0,Cn.jsxs)(kU,{children:[(0,Cn.jsx)(BU,{sx:oe({},s),children:(0,Cn.jsx)(JF,{colSpan:9,children:(0,Cn.jsx)(qh,{variant:"body1",color:c||void 0,fontWeight:500,children:"#".concat(f,"__").concat(h)})})}),(0,Cn.jsxs)(BU,{children:[(0,Cn.jsx)(JF,{width:60,children:"Rank"}),(0,Cn.jsx)(JF,{width:100,children:"No. ligne"}),(0,Cn.jsx)(JF,{width:60,align:"center",children:"Acte"}),(0,Cn.jsx)(JF,{width:80,children:"D\xe9but"}),(0,Cn.jsx)(JF,{width:80,children:"Fin"}),(0,Cn.jsx)(JF,{width:280,children:"Contextes"}),(0,Cn.jsx)(JF,{width:280,children:(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["Mesures",(0,Cn.jsx)(SD,{title:"Mesure ou quantit\xe9 de l'\xe9l\xe9ment factur\xe9",placement:"top",children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{color:"info",sx:{fontSize:16}})})})]})}),(0,Cn.jsx)(JF,{width:120,align:"right",children:"Montant pr\xe9lim"}),(0,Cn.jsx)(JF,{width:120,align:"right",children:"Montant final"})]})]}),(0,Cn.jsx)(wG,{children:Le(b.FactLignes).sort((function(e,t){return e.rank-t.rank})).map((function(e,t){var n=e.ligneno,r=(e.nce,e.revision,e.rank),o=(e.mdgrppstno,e.typelmfact,e.codefact),i=(e.datefact,e.coderole,e.debutelmfact),a=e.finelmfact,s=(e.coderef,e.mntprelim),c=e.mntfinal,l=(e.statrecv,e.CodeFact),p=e.FactLigneElmContx,u=e.FactLigneElmMesure,d=l||{},b=(d.codefactno,d.entente,d.code,d.description);d.typecode,d.debut,d.fin,d.descriptionsa;return(0,Cn.jsxs)(BU,{sx:{"&:last-child td, &:last-child th":{border:0}},hover:!0,children:[(0,Cn.jsx)(JF,{children:r}),(0,Cn.jsx)(JF,{children:n}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(SD,{title:b,arrow:!0,placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(tq,{variant:"text",size:"small",color:"primary",children:o})})}),(0,Cn.jsx)(JF,{children:i?ro()(i).format(ia):""}),(0,Cn.jsx)(JF,{children:a?ro()(a).format(ia):""}),(0,Cn.jsx)(JF,{children:p.map((function(e,t){e.ligneno;var n=e.codeelmcontx,r=e.ElementContx||{},o=(r.elementno,r.entente,r.codeelement,r.texte);r.textesa,r.niveau,r.debut,r.fin;return(0,Cn.jsx)(SD,{title:o,arrow:!0,placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(tq,{variant:"text",size:"small",children:n})},t)}))}),(0,Cn.jsx)(JF,{children:u.map((function(e,t){e.ligneno;var n=e.codeelmmesure,r=e.valmesure,o=e.ElementMesure||{},i=(o.code,o.nom),a=o.typeunite;return(0,Cn.jsx)(SD,{title:"".concat(i,": ").concat(r," ").concat(a),arrow:!0,placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(tq,{variant:"text",size:"small",children:n})},t)}))}),(0,Cn.jsxs)(JF,{align:"right",children:[Ds(s)," $"]}),(0,Cn.jsxs)(JF,{align:"right",children:[Ds(c)," $"]})]},t)}))})]})})})}var JG,ZG=Bv(gG||(gG=Rf(["\n query GetFactSms(\n $created_at: Date\n $date_service: Date\n $patient_nam: String\n $ec_id: Int\n $pst_id: String\n $payment_status: String\n ) {\n factSms(\n created_at: $created_at\n date_service: $date_service\n patient_nam: $patient_nam\n ec_id: $ec_id\n pst_id: $pst_id\n payment_status: $payment_status\n ) {\n created_at\n nce\n nci\n revision\n reqt_id\n licence\n pst_no\n pst_mod\n pst_name\n jeton\n statut_recv\n is_canceled\n lot_id\n ec_id\n\n date_service_min\n date_service_max\n date_service_agg\n\n line_count\n total_prelim\n total_final\n total_diff\n\n date_dernier_paiement\n\n payment_status\n\n patient_nam\n\n PAYMENT_STATUS_NAME\n }\n }\n"])));function eY(e){var n=e.tabIndexAsString,r=e.filters,o=Wh(),i=hz(o.breakpoints.down("tablet")),a=hz(o.breakpoints.up("laptop")),c=Bg(ZG,{variables:r}),l=c.loading,p=(c.error,c.data),u=(null===p||void 0===p?void 0:p.factSms)||[],d=s((0,t.useState)(15),2),b=d[0],f=d[1],h=(0,t.useMemo)((function(){return function(e){return[oe(oe({},QV),{},{field:"nce",headerName:"NCE",valueGetter:function(e){var t=e.value,n=e.row;return"".concat(t,"__").concat(n.revision)}}),oe(oe({},YV),{},{field:"date_service_min",headerName:"Date service",valueGetter:function(e){var t=e.value;return t?ro()(t).format(oa):null}}),oe(oe({},$V),{},{field:"patient_nam",headerName:"NAM",renderCell:function(e){var t=e.value;return(0,Cn.jsxs)(Cn.Fragment,{children:[t,(0,Cn.jsx)(VV,{nam:t,sx:{ml:1}})]})}}),oe(oe({},JV),{},{field:"pst_name",headerName:"Poste",valueGetter:function(e){var t=e.value,n=e.row;return t&&"".concat(t," (").concat(n.pst_no,")")}}),oe(oe({},eU),{},{field:"total_prelim",headerName:"Montant pr\xe9lim.",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")}}),oe(oe({},eU),{},{field:"total_final",headerName:"Montant final",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")}}),oe(oe({},eU),{},{field:"total_diff",headerName:"Diff\xe9rence",renderCell:function(e){var t=e.value;if("paid"!==e.row.payment_status)return(0,Cn.jsx)(Cn.Fragment,{});var n="";n=t>0?"success.main":0===t?"warning.main":t<0?"error.main":"success.main";var r=t>0?"+ ":t<0?"- ":"";return r+=Ds(Math.abs(t)),(0,Cn.jsx)(qh,{variant:"body2",sx:{color:n},children:r})}}),oe(oe({},tU),{},{field:"PAYMENT_STATUS_NAME",headerName:"Statut paiement",renderCell:function(e){var t=e.value,n="success";switch(e.row.payment_status){case"canceled":n="error";break;case"payable":n="warning";break;case"paid":n="success"}var r=t;return(0,Cn.jsx)(tq,{variant:"text",color:n,children:r})}}),oe(oe({},nU),{},{field:"line_count",headerName:"Nb. d'actes"}),{field:"actions",headerName:"Actions",width:e?60:80,headerAlign:"center",align:"center",renderCell:function(e){var t=e.row;return t.nce,t.revision,(0,Cn.jsx)(Cn.Fragment,{children:(0,Cn.jsx)(SD,{title:"La page du d\xe9taill\xe9 complet d'une r\xe9clamation sera disponible au courant des prochaines semaines!",disableInteractive:!0,children:(0,Cn.jsx)(Im,{size:"small",color:"primary",onClick:function(){return null},children:(0,Cn.jsx)(DV,{fontSize:"small"})})})})}}]}(i)}),[i]),M=s((0,t.useState)([]),2),z=M[0],O=M[1],m=(0,t.useCallback)((function(e){O(e)}),[]);return(0,Cn.jsx)(uE,{value:n,children:(0,Cn.jsx)(IV,{getRowId:function(e){return e.reqt_id},rows:u,columns:h,pagination:!0,pageSize:b,onPageSizeChange:function(e){return f(e)},rowsPerPageOptions:sU,autoHeight:!0,disableSelectionOnClick:!0,pinnedColumns:oe({right:["actions"]},a?{left:["nce"]}:{}),initialState:{sorting:{sortModel:[{field:"date_service_min",sort:"desc"}]}},loading:l,rowThreshold:0,getDetailPanelContent:function(e){return(0,Cn.jsx)($G,{params:e,containerSx:{maxWidth:a?"100vw":"100%",pl:a?15:2,pr:a?15:2,bgcolor:"rgb(240,240,240)"}})},getDetailPanelHeight:t.useCallback((function(e){return 72.92+40.81*e.row.line_count+32+20}),[]),detailPanelExpandedRowIds:z,onDetailPanelExpandedRowIdsChange:m,components:{LoadingOverlay:pU,NoRowsOverlay:uU,NoResultsOverlay:bU,DetailPanelExpandIcon:t.useCallback((function(){return(0,Cn.jsx)(cU,{color:"info"})}),[]),DetailPanelCollapseIcon:t.useCallback((function(){return(0,Cn.jsx)(lU,{color:"info"})}),[])}})})}var tY=new Uint8Array(16);function nY(){if(!JG&&!(JG="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return JG(tY)}var rY=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var oY=function(e){return"string"===typeof e&&rY.test(e)},iY=[],aY=0;aY<256;++aY)iY.push((aY+256).toString(16).substr(1));var sY=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(iY[e[t+0]]+iY[e[t+1]]+iY[e[t+2]]+iY[e[t+3]]+"-"+iY[e[t+4]]+iY[e[t+5]]+"-"+iY[e[t+6]]+iY[e[t+7]]+"-"+iY[e[t+8]]+iY[e[t+9]]+"-"+iY[e[t+10]]+iY[e[t+11]]+iY[e[t+12]]+iY[e[t+13]]+iY[e[t+14]]+iY[e[t+15]]).toLowerCase();if(!oY(n))throw TypeError("Stringified UUID is invalid");return n};var cY=function(e,t,n){var r=(e=e||{}).random||(e.rng||nY)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return sY(r)};function lY(e){var t=e.value,n=e.cents,r=e.variant,o=e.sx||{};r||(r="body2");var i="";return i=t>0?"success.main":0==t?"warning.main":t<0?"error.main":"warning.main",(0,Cn.jsxs)(qh,{variant:r,sx:oe(oe({},o),{},{color:i}),children:[Ds(t,{cents:n})," $"]})}var pY,uY,dY=Bv(pY||(pY=Rf(["\n ","\n ","\n\n query GetFacture($reqt_id: Int) {\n facture(reqt_id: $reqt_id) {\n nce\n revision\n\n FactLignesVac {\n ...FactLigneVacFields\n\n FactLigneVacDetails {\n ...FactLigneVacDetailsFields\n }\n }\n }\n }\n"])),SG,kG),bY=Bv(uY||(uY=Rf(["\n ","\n ","\n\n query GetFacture($reqt_id: Int) {\n facture(reqt_id: $reqt_id) {\n nce\n revision\n\n FactLignesVac {\n ...FactLigneVacFields\n\n FactLigneVacDetails {\n ...FactLigneVacDetailsFields\n }\n }\n }\n }\n"])),SG,kG),fY=cm((0,Cn.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");function hY(e){var t=e.value,n=e.fontSize;n=n||"small";var r=e.sx||{};return void 0===t?(0,Cn.jsx)(Cn.Fragment,{}):t?(0,Cn.jsx)(fY,{fontSize:n,sx:oe({color:"success.main"},r)}):(0,Cn.jsx)(aE,{fontSize:n,sx:oe({color:"error.main"},r)})}function MY(e){var t=e.daily,n=e.date_service,r=e.params.row,o=e.containerSx,i=void 0===o?{}:o,a=e.tableRowSx,s=void 0===a?{}:a,c=e.tableRowTextColor,l=r.reqt_id,p=Bg(t?bY:dY,{variables:bY?{reqt_id:l,date_service:n}:{reqt_id:l}}),u=p.loading,d=(p.error,p.data),b=null===d||void 0===d?void 0:d.facture;if(u||!b)return(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",pt:3,children:(0,Cn.jsx)(wh,{})});var f=b.nce,h=b.revision;return(0,Cn.jsx)(Wf,{sx:oe({p:2,pl:4,pr:3,height:"100%"},i),children:(0,Cn.jsx)(mU,{component:Lh,children:(0,Cn.jsxs)(qU,{size:"small",children:[(0,Cn.jsxs)(kU,{children:[(0,Cn.jsx)(BU,{sx:oe({},s),children:(0,Cn.jsx)(JF,{colSpan:10,children:(0,Cn.jsx)(qh,{variant:"body1",color:c||void 0,fontWeight:500,children:"#".concat(f,"__").concat(h)})})}),(0,Cn.jsxs)(BU,{children:[(0,Cn.jsx)(JF,{width:40,children:"No. ligne"}),(0,Cn.jsx)(JF,{width:80,children:"Date"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"Mode"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"AM"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"PM"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"Soir"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"Nuit"}),(0,Cn.jsx)(JF,{width:80,children:"Contexte 1"}),(0,Cn.jsx)(JF,{width:80,children:"Contexte 2"}),(0,Cn.jsx)(JF,{width:80,children:"Contexte 3"})]})]}),(0,Cn.jsx)(wG,{children:Le(b.FactLignesVac).sort((function(e,t){return e.rank-t.rank})).map((function(e,t){var n=e.lineno,r=e.linedt,o=e.moderem,i=e.nuit,a=e.am,s=e.pm,c=e.soir,l=e.FactLigneVacDetails,p=l[0]||null,u=l[1]||null,d=l[2]||null;return(0,Cn.jsxs)(BU,{sx:{"&:last-child td, &:last-child th":{border:0}},hover:!0,children:[(0,Cn.jsx)(JF,{children:n}),(0,Cn.jsx)(JF,{children:r?ro()(r).format(oa):""}),(0,Cn.jsx)(JF,{align:"center",children:o}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:a})}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:s})}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:c})}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:i})}),(0,Cn.jsx)(JF,{children:p&&(0,Cn.jsx)(OY,{factLigneVacDetailsItem:p})}),(0,Cn.jsx)(JF,{children:u&&(0,Cn.jsx)(OY,{factLigneVacDetailsItem:u})}),(0,Cn.jsx)(JF,{children:d&&(0,Cn.jsx)(OY,{factLigneVacDetailsItem:d})})]},t)}))})]})})})}var zY,OY=function(e){var t=e.factLigneVacDetailsItem,n=(t.nce,t.revision,t.lineno,t.rank,t.ref),r=t.code,o=t.sd,i=t.hr,a=t.min;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{variant:"body2",children:["Ref: ",n]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Code: ",r]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Secteur dispensaire: ",o]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Heures: ",Vs(i,a)]})]}),arrow:!0,placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(tq,{variant:"text",size:"small",children:"Info"})})},mY=Bv(zY||(zY=Rf(["\n query GetFactVacs($created_at: Date, $date_service: Date, $ec_id: Int, $pst_id: String, $payment_status: String) {\n factVacs(\n created_at: $created_at\n date_service: $date_service\n ec_id: $ec_id\n pst_id: $pst_id\n payment_status: $payment_status\n ) {\n created_at\n nce\n revision\n reqt_id\n licence\n pst_no\n pst_mod\n pst_name\n statut_recv\n is_canceled\n lot_id\n fmp_ec_id\n ec_id\n\n debut_periode\n fin_periode\n hrs_activite\n mins_activite\n cs1\n cs2\n nom_mand\n date_mand\n nom_sign\n date_sign\n once\n attestation\n\n pst_depart\n pst_arrivee\n dh_arrivee\n hrs_depl\n mins_depl\n kms_depl\n montant_transport_reclame\n\n date_service_min\n date_service_max\n date_service_agg\n\n payment_status\n\n ec_1717ig_agg\n\n hrs_activite_payes\n total_remu_activite\n hrs_depl_payes\n total_remu_temps_depl\n kms_transport_payes\n total_remu_cout_transport\n total_remu\n\n line_count\n\n PAYMENT_STATUS_NAME\n }\n }\n"])));function gY(e){var n=e.tabIndexAsString,r=e.filters,o=s(ee(),2),i=(o[0],o[1],Wh()),a=hz(i.breakpoints.down("tablet")),c=hz(i.breakpoints.up("laptop")),l=Bg(mY,{variables:r}),p=l.loading,u=(l.error,l.data),d=(null===u||void 0===u?void 0:u.factVacs)||[],b=s(t.useState(15),2),f=b[0],h=b[1],M=(0,t.useMemo)((function(){return function(e){return[oe(oe({},QV),{},{field:"nce",headerName:"NCE",valueGetter:function(e){var t=e.value,n=e.row;return"".concat(t,"__").concat(n.revision)}}),oe(oe({},YV),{},{field:"debut_periode",headerName:"D\xe9but periode"}),oe(oe({},YV),{},{field:"fin_periode",headerName:"Fin periode"}),oe(oe({},JV),{},{field:"pst_name",headerName:"Poste",valueGetter:function(e){var t=e.value,n=e.row;return t&&"".concat(t," (").concat(n.pst_no,")")}}),{field:"hrs_mins_activite_reclame",headerName:"H activit\xe9 r\xe9clam\xe9es",valueGetter:function(e){var t=e.row;return"".concat(Vs(t.hrs_activite,t.mins_activite)," h")},width:130},{field:"hrs_activite_payes",headerName:"H activit\xe9 pay\xe9es",valueFormatter:function(e){var t=e.value;return"".concat((t||0).toFixed(2)," h")},width:130},oe(oe({},eU),{},{field:"total_remu_activite",headerName:"Activit\xe9 pay\xe9",renderCell:function(e){var t=e.value;return(0,Cn.jsx)(lY,{value:t})},width:130}),{field:"hrs_mins_depl_reclame",headerName:"H d\xe9pl. r\xe9clam\xe9es",valueGetter:function(e){var t=e.row;return"".concat(Vs(t.hrs_depl,t.mins_depl)," h")},width:130},{field:"hrs_depl_payes",headerName:"H d\xe9pl. pay\xe9es",valueFormatter:function(e){var t=e.value;return"".concat((t||0).toFixed(2)," h")},width:130},oe(oe({},eU),{},{field:"total_remu_temps_depl",headerName:"D\xe9placement pay\xe9",renderCell:function(e){var t=e.value;return(0,Cn.jsx)(lY,{value:t})},width:130}),{field:"kms_depl",headerName:"Kms r\xe9clam\xe9s",valueGetter:function(e){var t=e.value;return"".concat(t||0," km")},width:100},{field:"kms_transport_payes",headerName:"Kms pay\xe9s",valueFormatter:function(e){var t=e.value;return"".concat(t||0," km")},width:100},oe(oe({},eU),{},{field:"montant_transport_reclame",headerName:"Transport r\xe9clam\xe9",renderCell:function(e){var t=e.value;return(0,Cn.jsx)(lY,{value:t})},width:140}),oe(oe({},eU),{},{field:"total_remu_cout_transport",headerName:"Transport pay\xe9",renderCell:function(e){var t=e.value;return(0,Cn.jsx)(lY,{value:t})},width:140}),oe(oe({},eU),{},{field:"total_remu",headerName:"R\xe9mun\xe9ration totale",renderCell:function(e){var t=e.value;return(0,Cn.jsx)(lY,{value:t})},width:140}),{field:"cs1",headerName:"CS1"},{field:"cs2",headerName:"CS2"},oe(oe({},iU),{},{field:"nom_mand",headerName:"Nom mandataire"}),oe(oe({},YV),{},{field:"date_mand",headerName:"Date mand."}),oe(oe({},iU),{},{field:"nom_sign",headerName:"Nom signataire"}),oe(oe({},YV),{},{field:"date_sign",headerName:"Date sign."}),oe(oe({},rU),{},{field:"once",headerName:"Once"}),oe(oe({},oU),{},{field:"attestation",headerName:"# Attestation"}),oe(oe({},ZV),{},{field:"pst_depart",headerName:"Poste d\xe9part"}),oe(oe({},ZV),{},{field:"pst_arrivee",headerName:"Poste arriv\xe9e"}),oe(oe({},KV),{},{field:"dh_arrivee",headerName:"Arriv\xe9e \xe0"}),oe(oe({field:"PAYMENT_STATUS_NAME",headerName:"Statut paiement"},tU),{},{renderCell:function(e){var t=e.value,n="success";switch(e.row.payment_status){case"canceled":n="error";break;case"payable":n="warning";break;case"paid":n="success"}var r=t;return(0,Cn.jsx)(tq,{variant:"text",color:n,children:r})}}),oe({field:"line_count",headerName:"Nb. lignes"},nU),{field:"actions",headerName:"Actions",width:e?60:80,headerAlign:"center",align:"center",renderCell:function(e){var t=e.row;return t.nce,t.revision,(0,Cn.jsx)(Cn.Fragment,{children:(0,Cn.jsx)(SD,{title:"La page du d\xe9taill\xe9 complet d'une r\xe9clamation sera disponible au courant des prochaines semaines!",disableInteractive:!0,children:(0,Cn.jsx)(Im,{size:"small",color:"primary",onClick:function(){return null},children:(0,Cn.jsx)(DV,{fontSize:"small"})})})})}}]}(a)}),[a]),z=s(t.useState([]),2),O=z[0],m=z[1],g=t.useCallback((function(e){m(e)}),[]);return(0,Cn.jsx)(uE,{value:n,children:(0,Cn.jsx)(IV,{getRowId:function(e){return cY()},rows:d,columns:M,pagination:!0,pageSize:f,onPageSizeChange:function(e){return h(e)},rowsPerPageOptions:sU,autoHeight:!0,disableSelectionOnClick:!0,pinnedColumns:oe({right:["actions"]},c?{left:["nce"]}:{}),initialState:{sorting:{},columns:{columnVisibilityModel:{cs1:!1,cs2:!1,once:!1}}},loading:p,rowThreshold:0,getDetailPanelContent:function(e){return(0,Cn.jsx)(MY,{params:e,containerSx:{maxWidth:c?"1400px":"100%",pl:c?15:2,pr:c?15:2,bgcolor:"rgb(240,240,240)"}})},getDetailPanelHeight:t.useCallback((function(e){return 68.34+41.31*e.row.line_count+32+20}),[]),detailPanelExpandedRowIds:O,onDetailPanelExpandedRowIdsChange:g,components:{LoadingOverlay:pU,NoRowsOverlay:uU,NoResultsOverlay:bU,DetailPanelExpandIcon:t.useCallback((function(){return(0,Cn.jsx)(cU,{color:"info"})}),[]),DetailPanelCollapseIcon:t.useCallback((function(){return(0,Cn.jsx)(lU,{color:"info"})}),[])}})})}var vY,AY,yY=Bv(vY||(vY=Rf(["\n ","\n ","\n\n query GetFacture($reqt_id: Int) {\n facture(reqt_id: $reqt_id) {\n nce\n revision\n\n FactLignesRmx {\n ...FactLigneRmxFields\n\n FactLigneRmxDetails {\n ...FactLigneRmxDetailsFields\n }\n }\n }\n }\n"])),LG,EG),xY=Bv(AY||(AY=Rf(["\n ","\n ","\n\n query GetFacture($reqt_id: Int) {\n facture(reqt_id: $reqt_id) {\n nce\n revision\n\n FactLignesRmx {\n ...FactLigneRmxFields\n\n FactLigneRmxDetails {\n ...FactLigneRmxDetailsFields\n }\n }\n }\n }\n"])),LG,EG);function qY(e){var t=e.daily,n=e.date_service,r=e.params.row,o=e.containerSx,i=void 0===o?{}:o,a=e.tableRowSx,s=void 0===a?{}:a,c=e.tableRowTextColor,l=r.reqt_id,p=Bg(t?xY:yY,{variables:xY?{reqt_id:l,date_service:n}:{reqt_id:l}}),u=p.loading,d=(p.error,p.data),b=null===d||void 0===d?void 0:d.facture;if(u||!b)return(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",pt:3,children:(0,Cn.jsx)(wh,{})});var f=b.nce,h=b.revision;return(0,Cn.jsx)(Wf,{sx:oe({p:2,pl:4,pr:3,height:"100%"},i),children:(0,Cn.jsx)(mU,{component:Lh,children:(0,Cn.jsxs)(qU,{size:"small",children:[(0,Cn.jsxs)(kU,{children:[(0,Cn.jsx)(BU,{sx:oe({},s),children:(0,Cn.jsx)(JF,{colSpan:9,children:(0,Cn.jsx)(qh,{variant:"body1",color:c||void 0,fontWeight:500,children:"#".concat(f,"__").concat(h)})})}),(0,Cn.jsxs)(BU,{children:[(0,Cn.jsx)(JF,{width:40,children:"No. ligne"}),(0,Cn.jsx)(JF,{width:80,children:"Date"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"AM"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"PM"}),(0,Cn.jsx)(JF,{width:80,align:"center",children:"Ref"}),(0,Cn.jsx)(JF,{width:80,align:"center",children:"Demiperdiem"}),(0,Cn.jsx)(JF,{width:80,children:"Contexte 1"}),(0,Cn.jsx)(JF,{width:80,children:"Contexte 2"}),(0,Cn.jsx)(JF,{width:80,children:"Contexte 3"})]})]}),(0,Cn.jsx)(wG,{children:Le(b.FactLignesRmx).sort((function(e,t){return e.rank-t.rank})).map((function(e,t){var n=e.lineno,r=e.linedt,o=(e.moderem,e.am),i=e.pm,a=e.ref,s=e.demiperdiem,c=e.FactLigneRmxDetails,l=c[0]||null,p=c[1]||null,u=c[2]||null;return(0,Cn.jsxs)(BU,{sx:{"&:last-child td, &:last-child th":{border:0}},hover:!0,children:[(0,Cn.jsx)(JF,{children:n}),(0,Cn.jsx)(JF,{children:r?ro()(r).format(oa):""}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:o})}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:i})}),(0,Cn.jsx)(JF,{align:"center",children:a}),(0,Cn.jsx)(JF,{align:"center",children:s}),(0,Cn.jsx)(JF,{children:l&&(0,Cn.jsx)(WY,{factLigneRmxDetailsItem:l})}),(0,Cn.jsx)(JF,{children:p&&(0,Cn.jsx)(WY,{factLigneRmxDetailsItem:p})}),(0,Cn.jsx)(JF,{children:u&&(0,Cn.jsx)(WY,{factLigneRmxDetailsItem:u})})]},t)}))})]})})})}var wY,WY=function(e){var t=e.factLigneRmxDetailsItem,n=(t.nce,t.revision,t.lineno,t.rank,t.ref),r=t.code,o=t.sd,i=t.hr,a=t.min;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{variant:"body2",children:["Ref: ",n]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Code: ",r]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Secteur dispensaire: ",o]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Heures: ",Vs(i,a)]})]}),arrow:!0,placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(tq,{variant:"text",size:"small",children:"Info"})})},RY=Bv(wY||(wY=Rf(["\n query GetFactRmxs($created_at: Date, $date_service: Date, $ec_id: Int, $pst_id: String, $payment_status: String) {\n factRmxs(\n created_at: $created_at\n date_service: $date_service\n ec_id: $ec_id\n pst_id: $pst_id\n payment_status: $payment_status\n ) {\n created_at\n nce\n revision\n reqt_id\n licence\n pst_no\n pst_mod\n pst_name\n statut_recv\n is_canceled\n lot_id\n fmp_ec_id\n ec_id\n\n dept\n debut_periode\n fin_periode\n hrs_activite\n mins_activite\n nb_perdiems\n cs1\n cs2\n nom_mand\n date_mand\n nom_sign\n date_sign\n once\n attestation\n\n date_service_min\n date_service_max\n date_service_agg\n\n payment_status\n\n ec_1717ig_agg\n\n hrs_activite_payes\n total_remu_activite\n perdiems_payes\n total_remu_perdiem\n total_remu\n\n line_count\n\n PAYMENT_STATUS_NAME\n }\n }\n"])));function CY(e){var n=e.tabIndexAsString,r=e.filters,o=s(ee(),2),i=(o[0],o[1],Wh()),a=hz(i.breakpoints.down("tablet")),c=hz(i.breakpoints.up("laptop")),l=Bg(RY,{variables:r}),p=l.loading,u=(l.error,l.data),d=(null===u||void 0===u?void 0:u.factRmxs)||[],b=s(t.useState(15),2),f=b[0],h=b[1],M=(0,t.useMemo)((function(){return function(e){return[oe(oe({},QV),{},{field:"nce",headerName:"NCE",valueGetter:function(e){var t=e.value,n=e.row;return"".concat(t,"__").concat(n.revision)}}),oe(oe({},YV),{},{field:"debut_periode",headerName:"D\xe9but periode"}),oe(oe({},YV),{},{field:"fin_periode",headerName:"Fin periode"}),oe(oe({},JV),{},{field:"pst_name",headerName:"Poste",valueGetter:function(e){var t=e.value,n=e.row;return t&&"".concat(t," (").concat(n.pst_no,")")}}),oe(oe({},aU),{},{field:"dept",headerName:"D\xe9partement"}),{field:"hrs_mins_activite_reclame",headerName:"H activit\xe9 r\xe9clam\xe9es",valueGetter:function(e){var t=e.row;return"".concat(Vs(t.hrs_activite,t.mins_activite)," h")},width:130},{field:"hrs_activite_payes",headerName:"H activit\xe9 pay\xe9es",valueFormatter:function(e){var t=e.value;return"".concat((t||0).toFixed(2)," h")},width:130},{field:"nb_perdiems",headerName:"Perdiems r\xe9clam\xe9es",width:130},{field:"perdiems_payes",headerName:"Perdiems pay\xe9es",width:130},oe(oe({},eU),{},{field:"total_remu_perdiem",headerName:"R\xe9mu. perdiems pay\xe9",renderCell:function(e){var t=e.value;return(0,Cn.jsx)(lY,{value:t})},width:130}),oe(oe({},eU),{},{field:"total_remu",headerName:"R\xe9mun\xe9ration totale",renderCell:function(e){var t=e.value;return(0,Cn.jsx)(lY,{value:t})},width:140}),{field:"cs1",headerName:"CS1"},{field:"cs2",headerName:"CS2"},oe(oe({},iU),{},{field:"nom_mand",headerName:"Nom mandataire"}),oe(oe({},YV),{},{field:"date_mand",headerName:"Date mand."}),oe(oe({},iU),{},{field:"nom_sign",headerName:"Nom signataire"}),oe(oe({},YV),{},{field:"date_sign",headerName:"Date sign."}),oe(oe({},rU),{},{field:"once",headerName:"Once"}),oe(oe({},oU),{},{field:"attestation",headerName:"# Attestation"}),oe(oe({field:"PAYMENT_STATUS_NAME",headerName:"Statut paiement"},tU),{},{renderCell:function(e){var t=e.value,n=e.row;if(["RMX","SAL"].includes(n.type_service_abbrev))return(0,Cn.jsx)(Cn.Fragment,{});var r="success";switch(n.payment_status){case"canceled":r="error";break;case"payable":r="warning";break;case"paid":r="success"}var o=t;return(0,Cn.jsx)(tq,{variant:"text",color:r,children:o})}}),oe({field:"line_count",headerName:"Nb. lignes"},nU),{field:"actions",headerName:"Actions",width:e?60:80,headerAlign:"center",align:"center",renderCell:function(e){var t=e.row;return t.nce,t.revision,(0,Cn.jsx)(Cn.Fragment,{children:(0,Cn.jsx)(SD,{title:"La page du d\xe9taill\xe9 complet d'une r\xe9clamation sera disponible au courant des prochaines semaines!",disableInteractive:!0,children:(0,Cn.jsx)(Im,{size:"small",color:"primary",onClick:function(){return null},children:(0,Cn.jsx)(DV,{fontSize:"small"})})})})}}]}(a)}),[a]),z=s(t.useState([]),2),O=z[0],m=z[1],g=t.useCallback((function(e){m(e)}),[]);return(0,Cn.jsx)(uE,{value:n,children:(0,Cn.jsx)(IV,{getRowId:function(e){return cY()},rows:d,columns:M,pagination:!0,pageSize:f,onPageSizeChange:function(e){return h(e)},rowsPerPageOptions:sU,autoHeight:!0,disableSelectionOnClick:!0,pinnedColumns:oe({right:["actions"]},c?{left:["nce"]}:{}),initialState:{sorting:{},columns:{columnVisibilityModel:{cs1:!1,cs2:!1,once:!1}}},loading:p,rowThreshold:0,getDetailPanelContent:function(e){return(0,Cn.jsx)(qY,{params:e,containerSx:{maxWidth:c?"1400px":"100%",pl:c?15:2,pr:c?15:2,bgcolor:"rgb(240,240,240)"}})},getDetailPanelHeight:t.useCallback((function(e){return 68.34+41.31*e.row.line_count+32+20}),[]),detailPanelExpandedRowIds:O,onDetailPanelExpandedRowIdsChange:g,components:{LoadingOverlay:pU,NoRowsOverlay:uU,NoResultsOverlay:bU,DetailPanelExpandIcon:t.useCallback((function(){return(0,Cn.jsx)(cU,{color:"info"})}),[]),DetailPanelCollapseIcon:t.useCallback((function(){return(0,Cn.jsx)(lU,{color:"info"})}),[])}})})}var _Y,SY,kY,LY=Bv(_Y||(_Y=Rf(["\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n\n query GetFacture($reqt_id: Int) {\n facture(reqt_id: $reqt_id) {\n nce\n revision\n\n FactLignes {\n ...FactLigneFields\n\n CodeFact {\n ...CodeFactFields\n }\n\n FactLigneElmContx {\n ...FactLigneElmContxFields\n\n ElementContx {\n ...ElementContxFields\n }\n }\n\n FactLigneElmMesure {\n ...FactLigneElmMesureFields\n\n ElementMesure {\n ...ElementMesureFields\n }\n }\n\n FactLigneFd {\n ...FactLigneFdFields\n }\n\n FactLigneFdFrais {\n ...FactLigneFdFraisFields\n }\n }\n }\n }\n"])),WG,RG,NG,TG,PG,BG,CG,_G),EY=Bv(SY||(SY=Rf(["\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n\n query GetFacture($reqt_id: Int) {\n facture(reqt_id: $reqt_id) {\n nce\n revision\n\n FactLignes {\n ...FactLigneFields\n\n CodeFact {\n ...CodeFactFields\n }\n\n FactLigneElmContx {\n ...FactLigneElmContxFields\n\n ElementContx {\n ...ElementContxFields\n }\n }\n\n FactLigneElmMesure {\n ...FactLigneElmMesureFields\n\n ElementMesure {\n ...ElementMesureFields\n }\n }\n\n FactLigneFd {\n ...FactLigneFdFields\n }\n\n FactLigneFdFrais {\n ...FactLigneFdFraisFields\n }\n }\n }\n }\n"])),WG,RG,NG,TG,PG,BG,CG,_G);function TY(e){var t=e.daily,n=e.date_service,r=e.params.row,o=e.containerSx,i=void 0===o?{}:o,a=e.tableRowSx,s=void 0===a?{}:a,c=e.tableRowTextColor,l=r.reqt_id,p=Bg(t?EY:LY,{variables:EY?{reqt_id:l,date_service:n}:{reqt_id:l}}),u=p.loading,d=(p.error,p.data),b=null===d||void 0===d?void 0:d.facture;if(u||!b)return(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",pt:3,children:(0,Cn.jsx)(wh,{})});var f=b.nce,h=b.revision;return(0,Cn.jsx)(Wf,{sx:oe({p:2,pl:4,pr:3,height:"100%"},i),children:(0,Cn.jsx)(mU,{component:Lh,children:(0,Cn.jsxs)(qU,{size:"small",children:[(0,Cn.jsxs)(kU,{children:[(0,Cn.jsx)(BU,{sx:oe({},s),children:(0,Cn.jsx)(JF,{colSpan:15,children:(0,Cn.jsx)(qh,{variant:"body1",color:c||void 0,fontWeight:500,children:"#".concat(f,"__").concat(h)})})}),(0,Cn.jsxs)(BU,{children:[(0,Cn.jsx)(JF,{width:60,children:"Rank"}),(0,Cn.jsx)(JF,{width:100,children:"No. ligne"}),(0,Cn.jsx)(JF,{width:60,align:"center",children:"Acte"}),(0,Cn.jsx)(JF,{width:300,children:"Type"}),(0,Cn.jsx)(JF,{width:300,children:"M\xe9thode transport"}),(0,Cn.jsx)(JF,{width:100,children:"KMs aller"}),(0,Cn.jsx)(JF,{width:100,children:"KMs retour"}),(0,Cn.jsx)(JF,{width:100,children:"Hres d\xe9place."}),(0,Cn.jsx)(JF,{width:100,children:"Hres attente"}),(0,Cn.jsx)(JF,{width:280,children:"Contextes"}),(0,Cn.jsx)(JF,{width:280,children:(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["Mesures",(0,Cn.jsx)(SD,{title:"Mesure ou quantit\xe9 de l'\xe9l\xe9ment factur\xe9",placement:"top",children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{color:"info",sx:{fontSize:16}})})})]})}),(0,Cn.jsx)(JF,{width:120,align:"right",children:"Montant pr\xe9lim"}),(0,Cn.jsx)(JF,{width:120,align:"right",children:"Montant final"})]})]}),(0,Cn.jsx)(wG,{children:Le(b.FactLignes).sort((function(e,t){return e.rank-t.rank})).map((function(e,t){var n=e.ligneno,r=(e.nce,e.revision,e.rank),o=(e.mdgrppstno,e.typelmfact,e.codefact),i=(e.datefact,e.coderole,e.debutelmfact,e.finelmfact,e.coderef,e.mntprelim),a=e.mntfinal,s=(e.statrecv,e.CodeFact),c=e.FactLigneElmContx,l=e.FactLigneElmMesure,p=e.FactLigneFd,u=e.FactLigneFdFrais,d=s||{},b=(d.codefactno,d.entente,d.code,d.description),f=(d.typecode,d.debut,d.fin,d.descriptionsa,p||{}),h=(f.typefd,f.codetransport,f.nbrkmaller),M=f.nbrkmretour,z=f.nbrhrsdeplacement,O=f.nbrhrsattente,m=f.TYPE_FD,g=f.METHODE_TRANSPORT,v=u||{};v.typefrais,v.frais;return(0,Cn.jsxs)(BU,{sx:{"&:last-child td, &:last-child th":{border:0}},hover:!0,children:[(0,Cn.jsx)(JF,{children:r}),(0,Cn.jsx)(JF,{children:n}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(SD,{title:b,arrow:!0,placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(tq,{variant:"text",size:"small",color:"primary",children:o})})}),(0,Cn.jsx)(JF,{children:m}),(0,Cn.jsx)(JF,{children:g}),(0,Cn.jsx)(JF,{children:h}),(0,Cn.jsx)(JF,{children:M}),(0,Cn.jsx)(JF,{children:(z/100).toFixed(2)}),(0,Cn.jsx)(JF,{children:(O/100).toFixed(2)}),(0,Cn.jsx)(JF,{children:c.map((function(e,t){e.ligneno;var n=e.codeelmcontx,r=e.ElementContx||{},o=(r.elementno,r.entente,r.codeelement,r.texte);r.textesa,r.niveau,r.debut,r.fin;return(0,Cn.jsx)(SD,{title:o,arrow:!0,placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(tq,{variant:"text",size:"small",children:n})},t)}))}),(0,Cn.jsx)(JF,{children:l.map((function(e,t){e.ligneno;var n=e.codeelmmesure,r=e.valmesure,o=e.ElementMesure||{},i=(o.code,o.nom),a=o.typeunite;return(0,Cn.jsx)(SD,{title:"".concat(i,": ").concat(r," ").concat(a),arrow:!0,placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(tq,{variant:"text",size:"small",children:n})},t)}))}),(0,Cn.jsxs)(JF,{align:"right",children:[Ds(i)," $"]}),(0,Cn.jsxs)(JF,{align:"right",children:[Ds(a)," $"]})]},t)}))})]})})})}var NY,PY,BY,XY=Bv(kY||(kY=Rf(["\n query GetFactFds($created_at: Date, $date_service: Date, $ec_id: Int, $pst_id: String, $payment_status: String) {\n factFds(\n created_at: $created_at\n date_service: $date_service\n ec_id: $ec_id\n pst_id: $pst_id\n payment_status: $payment_status\n ) {\n created_at\n nce\n nci\n revision\n reqt_id\n licence\n statut_recv\n is_canceled\n lot_id\n fmp_ec_id\n ec_id\n\n dh_depart\n pst_depart_type_id\n pst_depart_id\n dh_arrivee\n pst_arrivee_type_id\n pst_arrivee_id\n\n date_service_min\n date_service_max\n date_service_agg\n\n line_count\n total_prelim\n total_final\n total_diff\n\n date_dernier_paiement\n\n payment_status\n\n PAYMENT_STATUS_NAME\n }\n }\n"])));function jY(e){var n=e.tabIndexAsString,r=e.filters,o=Wh(),i=hz(o.breakpoints.down("tablet")),a=hz(o.breakpoints.up("laptop")),c=Bg(XY,{variables:r}),l=c.loading,p=(c.error,c.data),u=(null===p||void 0===p?void 0:p.factFds)||[],d=s((0,t.useState)(15),2),b=d[0],f=d[1],h=(0,t.useMemo)((function(){return function(e){return[oe(oe({},QV),{},{field:"nce",headerName:"NCE",valueGetter:function(e){var t=e.value,n=e.row;return"".concat(t,"__").concat(n.revision)}}),oe(oe({},YV),{},{field:"date_service_min",headerName:"Date service",valueGetter:function(e){var t=e.value;return t?ro()(t).format(oa):null}}),oe(oe({},ZV),{},{field:"pst_depart_id",headerName:"Poste d\xe9part"}),oe(oe({},KV),{},{field:"dh_depart",headerName:"D\xe9part \xe0"}),oe(oe({},ZV),{},{field:"pst_arrivee_id",headerName:"Poste arriv\xe9e"}),oe(oe({},KV),{},{field:"dh_arrivee",headerName:"Arriv\xe9e \xe0"}),oe(oe({},eU),{},{field:"total_prelim",headerName:"Montant pr\xe9lim.",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")}}),oe(oe({},eU),{},{field:"total_final",headerName:"Montant final",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")}}),oe(oe({},eU),{},{field:"total_diff",headerName:"Diff\xe9rence",renderCell:function(e){var t=e.value,n=(e.row,"");n=t>0?"success.main":0===t?"warning.main":t<0?"error.main":"success.main";var r=t>0?"+ ":t<0?"- ":"";return r+=Ds(Math.abs(t)),(0,Cn.jsx)(qh,{variant:"body2",sx:{color:n},children:r})}}),oe(oe({},tU),{},{field:"PAYMENT_STATUS_NAME",headerName:"Statut paiement",renderCell:function(e){var t=e.value,n="success";switch(e.row.payment_status){case"canceled":n="error";break;case"payable":n="warning";break;case"paid":n="success"}var r=t;return(0,Cn.jsx)(tq,{variant:"text",color:n,children:r})}}),oe(oe({},nU),{},{field:"line_count",headerName:"Nb. d'actes"}),{field:"actions",headerName:"Actions",width:e?60:80,headerAlign:"center",align:"center",renderCell:function(e){var t=e.row;return t.nce,t.revision,(0,Cn.jsx)(Cn.Fragment,{children:(0,Cn.jsx)(SD,{title:"La page du d\xe9taill\xe9 complet d'une r\xe9clamation sera disponible au courant des prochaines semaines!",disableInteractive:!0,children:(0,Cn.jsx)(Im,{size:"small",color:"primary",onClick:function(){return null},children:(0,Cn.jsx)(DV,{fontSize:"small"})})})})}}]}(i)}),[i]),M=s((0,t.useState)([]),2),z=M[0],O=M[1],m=(0,t.useCallback)((function(e){O(e)}),[]);return(0,Cn.jsx)(uE,{value:n,children:(0,Cn.jsx)(IV,{getRowId:function(e){return cY()},rows:u,columns:h,pagination:!0,pageSize:b,onPageSizeChange:function(e){return f(e)},rowsPerPageOptions:sU,autoHeight:!0,disableSelectionOnClick:!0,pinnedColumns:oe({right:["actions"]},a?{left:["nce"]}:{}),initialState:{sorting:{sortModel:[{field:"date_service_min",sort:"desc"}]}},loading:l,rowThreshold:0,getDetailPanelContent:function(e){return(0,Cn.jsx)(TY,{params:e,containerSx:{pl:a?15:2,pr:a?15:2,bgcolor:"rgb(240,240,240)"}})},getDetailPanelHeight:t.useCallback((function(e){return 89.76+48.75*e.row.line_count+32+20}),[]),detailPanelExpandedRowIds:z,onDetailPanelExpandedRowIdsChange:m,components:{LoadingOverlay:pU,NoRowsOverlay:uU,NoResultsOverlay:bU,DetailPanelExpandIcon:t.useCallback((function(){return(0,Cn.jsx)(cU,{color:"info"})}),[]),DetailPanelCollapseIcon:t.useCallback((function(){return(0,Cn.jsx)(lU,{color:"info"})}),[])}})})}var IY=Bv(NY||(NY=Rf(["\n query GetEcs {\n ecs {\n id\n created_at\n updated_at\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n fmp_id\n }\n }\n"]))),DY=Bv(PY||(PY=Rf(["\n query GetPostes {\n postes(only_own: true) {\n numero\n description\n modulateur\n }\n }\n"]))),FY=Bv(BY||(BY=Rf(["\n query GetTypesService {\n typesService {\n id\n nom\n nom_abbrev\n }\n }\n"]))),HY=[(0,Cn.jsx)(qh,{fontSize:15,children:"R\xe9clamations"},"1")],VY=[{value:"canceled",nom:"Annul\xe9"},{value:"payable",nom:"Payable"},{value:"paid",nom:"Pay\xe9"}],UY=2.4,GY=2.4;function YY(){var e=s(ee(),2),n=e[0],r=e[1],o=Wh(),i=(hz(o.breakpoints.down("tablet")),hz(o.breakpoints.up("laptop")),function(e,t){t?n.set(e,t.toString()):n.delete(e),r(n)}),a=Nw({defaultValues:{patient_nam:""}}),c=(a.control,a.register,a.handleSubmit,a.formState.errors,a.formState,a.watch,a.reset,n.get("created_at")),l=s((0,t.useState)(c?ro()(c):null),2),p=l[0],u=(l[1],n.get("date_service")),d=s((0,t.useState)(u?ro()(u):null),2),b=d[0],f=d[1],h=n.get("patient_nam"),M=s((0,t.useState)(h||""),2),z=M[0],O=M[1],m=function(e,n,r){var o,i,a=r&&r.equalityFn||gW,s=(o=(0,t.useState)(vW(e)),i=o[1],[o[0],(0,t.useCallback)((function(e){return i(vW(e))}),[])]),c=s[0],l=s[1],p=mW((0,t.useCallback)((function(e){return l(e)}),[l]),n,r),u=(0,t.useRef)(e);return a(u.current,e)||(p(e),u.current=e),[c,p]}(z,750),g=s(m,1)[0],v=n.get("ec_id"),A=s((0,t.useState)(v?parseInt(v):null),2),y=A[0],x=A[1],q=n.get("poste_id"),w=s((0,t.useState)(q||null),2),W=w[0],R=w[1],C=n.get("payment_status"),_=s((0,t.useState)(C||null),2),S=_[0],k=_[1],L=Bg(IY),E=L.loading,T=(L.error,L.data),N=Bg(DY),P=N.loading,B=(N.error,N.data),X=Bg(FY),j=(X.loading,X.error,X.data,s(t.useState("fact-sm"),2)),I=j[0],D=j[1],F=(0,t.useCallback)((function(e,t){D(t.toString())}),[]),H=(0,t.useMemo)((function(){return{created_at:p,date_service:b,patient_nam:g,ec_id:y,pst_id:W,payment_status:S}}),[p,b,g,y,W,S]),V=(0,t.useMemo)((function(){return{created_at:p,date_service:b,ec_id:y,pst_id:W,payment_status:S}}),[p,b,y,W,S]),U=(0,t.useMemo)((function(){return{created_at:p,date_service:b,ec_id:y,pst_id:W,payment_status:S}}),[p,b,y,W,S]),G=(0,t.useMemo)((function(){return{created_at:p,date_service:b,ec_id:y,pst_id:W,payment_status:S}}),[p,b,y,W,S]);return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"600",children:"Recherche de r\xe9clamations"}),(0,Cn.jsx)(EW,{separator:(0,Cn.jsx)(iE,{fontSize:"small"}),sx:{mt:0,mb:{mobile:2,tablet:3,desktop:4}},children:HY}),(0,Cn.jsxs)(hA,{container:!0,spacing:3,mb:1.5,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:GY,xl:UY,children:(0,Cn.jsx)(oE,{label:"Date de service",value:b,onChange:function(e){f(e),i("date_service",e)},renderInput:function(e){return(0,Cn.jsx)(gx,oe(oe({},e),{},{size:"small",fullWidth:!0}))},inputFormat:oa,mask:"____-__-__",InputProps:{endAdornment:b&&(0,Cn.jsx)(Im,{onClick:function(){f(null),i("date_service",null)},size:"small",sx:{mr:-1},children:(0,Cn.jsx)(aE,{})})},InputAdornmentProps:{position:"start"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:GY,xl:UY,children:(0,Cn.jsx)(gx,{label:"NAM patient",value:z,onChange:function(e){var t=e.target.value;O(t)},size:"small",fullWidth:!0})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:GY,xl:UY,children:(0,Cn.jsx)(WC,{options:(null===B||void 0===B?void 0:B.postes)||[],loading:P,getOptionLabel:function(e){var t=e.numero,n=e.modulateur,r=!0,o=t,i=e.description;if(e===W){var a=((null===B||void 0===B?void 0:B.postes)||[]).find((function(t){return QY(t)===e}));a?(o=a.numero,i=a.description):r=!1}return r?"".concat(i," (").concat(o,"-").concat(n,")"):""},value:W,onChange:function(e,t){var n=QY(t);R(n||null),i("poste_id",n)},isOptionEqualToValue:function(e,t){return QY(e)===t},renderInput:function(e){return(0,Cn.jsx)(gx,oe(oe({},e),{},{size:"small",fullWidth:!0,label:"Poste"}))}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:GY,xl:UY,children:(0,Cn.jsxs)(gx,{select:!0,label:"Statut de paiement",value:S,onChange:function(e){var t=e.target.value;k(t),i("payment_status",t)},size:"small",fullWidth:!0,children:[(0,Cn.jsx)(nm,{value:null,children:"Tous"}),VY.map((function(e,t){return(0,Cn.jsx)(nm,{value:e.value,children:e.nom},t)}))]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:GY,xl:UY,children:(0,Cn.jsx)(WC,{options:(null===T||void 0===T?void 0:T.ecs)||[],loading:E,getOptionLabel:function(e){e.id;var t=e.no_paiement,n=e.date_ec;e.date_coupure;if(e===y){var r=((null===T||void 0===T?void 0:T.ecs)||[]).find((function(t){return t.id===e}));return r?"".concat(ro()(r.date_ec).format(oa)," (OR-").concat(r.no_paiement,")"):""}return"".concat(ro()(n).format(oa)," (OR-").concat(t,")")},value:y,onChange:function(e,t){var n=null===t||void 0===t?void 0:t.id;x(n||null),i("ec_id",n)},isOptionEqualToValue:function(e,t){return(null===e||void 0===e?void 0:e.id)===t},renderInput:function(e){return(0,Cn.jsx)(gx,oe(oe({},e),{},{size:"small",fullWidth:!0,label:"\xc9tat de compte",helperText:"Date du dernier EC dans lequel la facture est apparue"}))},groupBy:function(e){return"Ann\xe9e ".concat(ro()(e.date_ec).format("YYYY"))}})})]}),(0,Cn.jsx)(hA,{container:!0,spacing:3,mb:1.5,children:(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(qh,{variant:"subtitle2",sx:function(e){return{color:e.palette.info.main}},children:"** Pour afficher le d\xe9tail d'une facture, veuillez cliquer sur la fl\xe8che \xe0 la droite du NCE."})})}),(0,Cn.jsx)(KY,{tabIndex:I,onTabChange:F,factSmFilters:H,factFdFilters:V,factVacFilters:U,factRmxFilters:G})]})}var KY=t.memo((function(e){var t=e.tabIndex,n=e.onTabChange,r=e.factSmFilters,o=e.factFdFilters,i=e.factVacFilters,a=e.factRmxFilters;return(0,Cn.jsxs)(NC,{value:t,children:[(0,Cn.jsx)(Wf,{sx:{borderBottom:1,borderColor:"divider",mt:0},children:(0,Cn.jsxs)(z_,{onChange:n,variant:"scrollable",allowScrollButtonsMobile:!0,children:[(0,Cn.jsx)(EC,{label:"Services M\xe9dicaux",value:"fact-sm"}),(0,Cn.jsx)(EC,{label:"Frais de d\xe9placement",value:"fact-fd"}),(0,Cn.jsx)(EC,{label:"Vacation / Tarif horaire",value:"fact-vac"}),(0,Cn.jsx)(EC,{label:"R\xe9mun\xe9ration mixte",value:"fact-rmx"})]})}),(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(eY,{tabIndexAsString:"fact-sm",filters:r}),(0,Cn.jsx)(jY,{tabIndexAsString:"fact-fd",filters:o}),(0,Cn.jsx)(gY,{tabIndexAsString:"fact-vac",filters:i}),(0,Cn.jsx)(CY,{tabIndexAsString:"fact-rmx",filters:a})]})]})})),QY=function(e){return e?"".concat(e.numero,"-").concat(e.modulateur):null};function $Y(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}function JY(e){return Zf("MuiToggleButtonGroup",e)}var ZY=eh("MuiToggleButtonGroup",["root","selected","vertical","disabled","grouped","groupedHorizontal","groupedVertical"]),eK=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],tK=$f("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[ne({},"& .".concat(ZY.grouped),t.grouped),ne({},"& .".concat(ZY.grouped),t["grouped".concat(Ef(n.orientation))]),t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((function(e){var t=e.ownerState,n=e.theme;return c({display:"inline-flex",borderRadius:(n.vars||n).shape.borderRadius},"vertical"===t.orientation&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},ne({},"& .".concat(ZY.grouped),c({},"horizontal"===t.orientation?ne({"&:not(:first-of-type)":{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}},"&.".concat(ZY.selected," + .").concat(ZY.grouped,".").concat(ZY.selected),{borderLeft:0,marginLeft:0}):ne({"&:not(:first-of-type)":{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},"&:not(:last-of-type)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}},"&.".concat(ZY.selected," + .").concat(ZY.grouped,".").concat(ZY.selected),{borderTop:0,marginTop:0}))))})),nK=t.forwardRef((function(e,n){var r=wn({props:e,name:"MuiToggleButtonGroup"}),o=r.children,i=r.className,a=r.color,s=void 0===a?"standard":a,l=r.disabled,p=void 0!==l&&l,u=r.exclusive,d=void 0!==u&&u,b=r.fullWidth,f=void 0!==b&&b,h=r.onChange,M=r.orientation,z=void 0===M?"horizontal":M,O=r.size,m=void 0===O?"medium":O,g=r.value,v=Qe(r,eK),A=c({},r,{disabled:p,fullWidth:f,orientation:z,size:m}),y=function(e){var t=e.classes,n=e.orientation,r=e.fullWidth,o=e.disabled;return Cf({root:["root","vertical"===n&&"vertical",r&&"fullWidth"],grouped:["grouped","grouped".concat(Ef(n)),o&&"disabled"]},JY,t)}(A),x=function(e,t){if(h){var n,r=g&&g.indexOf(t);g&&r>=0?(n=g.slice()).splice(r,1):n=g?g.concat(t):[t],h(e,n)}},q=function(e,t){h&&h(e,g===t?null:t)};return(0,Cn.jsx)(tK,c({role:"group",className:ub(y.root,i),ref:n,ownerState:A},v,{children:t.Children.map(o,(function(e){return t.isValidElement(e)?t.cloneElement(e,{className:ub(y.grouped,e.props.className),onChange:d?q:x,selected:void 0===e.props.selected?$Y(e.props.value,g):e.props.selected,size:e.props.size||m,fullWidth:f,color:e.props.color||s,disabled:e.props.disabled||p}):null}))}))})),rK=nK;function oK(e){return Zf("MuiToggleButton",e)}var iK,aK,sK,cK=eh("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),lK=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],pK=$f(HO,{name:"MuiToggleButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["size".concat(Ef(n.size))]]}})((function(e){var t,n,r=e.theme,o=e.ownerState,i="standard"===o.color?r.palette.text.primary:r.palette[o.color].main;return r.vars&&(i="standard"===o.color?r.vars.palette.text.primary:r.vars.palette[o.color].main,n="standard"===o.color?r.vars.palette.text.primaryChannel:r.vars.palette[o.color].mainChannel),c({},r.typography.button,{borderRadius:(r.vars||r).shape.borderRadius,padding:11,border:"1px solid ".concat((r.vars||r).palette.divider),color:(r.vars||r).palette.action.active},o.fullWidth&&{width:"100%"},(ne(t={},"&.".concat(cK.disabled),{color:(r.vars||r).palette.action.disabled,border:"1px solid ".concat((r.vars||r).palette.action.disabledBackground)}),ne(t,"&:hover",{textDecoration:"none",backgroundColor:r.vars?"rgba(".concat(r.vars.palette.text.primaryChannel," / ").concat(r.vars.palette.action.hoverOpacity,")"):Vt(r.palette.text.primary,r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}),ne(t,"&.".concat(cK.selected),{color:i,backgroundColor:r.vars?"rgba(".concat(n," / ").concat(r.vars.palette.action.selectedOpacity,")"):Vt(i,r.palette.action.selectedOpacity),"&:hover":{backgroundColor:r.vars?"rgba(".concat(n," / calc(").concat(r.vars.palette.action.selectedOpacity," + ").concat(r.vars.palette.action.hoverOpacity,"))"):Vt(i,r.palette.action.selectedOpacity+r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:r.vars?"rgba(".concat(n," / ").concat(r.vars.palette.action.selectedOpacity,")"):Vt(i,r.palette.action.selectedOpacity)}}}),t),"small"===o.size&&{padding:7,fontSize:r.typography.pxToRem(13)},"large"===o.size&&{padding:15,fontSize:r.typography.pxToRem(15)})})),uK=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiToggleButton"}),r=n.children,o=n.className,i=n.color,a=void 0===i?"standard":i,s=n.disabled,l=void 0!==s&&s,p=n.disableFocusRipple,u=void 0!==p&&p,d=n.fullWidth,b=void 0!==d&&d,f=n.onChange,h=n.onClick,M=n.selected,z=n.size,O=void 0===z?"medium":z,m=n.value,g=Qe(n,lK),v=c({},n,{color:a,disabled:l,disableFocusRipple:u,fullWidth:b,size:O}),A=function(e){var t=e.classes,n=e.fullWidth,r=e.selected,o=e.disabled,i=e.size,a=e.color;return Cf({root:["root",r&&"selected",o&&"disabled",n&&"fullWidth","size".concat(Ef(i)),a]},oK,t)}(v);return(0,Cn.jsx)(pK,c({className:ub(A.root,o),disabled:l,focusRipple:!u,ref:t,onClick:function(e){h&&(h(e,m),e.defaultPrevented)||f&&f(e,m)},onChange:f,value:m,ownerState:v,"aria-pressed":M},g,{children:r}))})),dK=uK,bK=["className","id"],fK=$f(qh,{name:"MuiDialogTitle",slot:"Root",overridesResolver:function(e,t){return t.root}})({padding:"16px 24px",flex:"0 0 auto"}),hK=t.forwardRef((function(e,n){var r=wn({props:e,name:"MuiDialogTitle"}),o=r.className,i=r.id,a=Qe(r,bK),s=r,l=function(e){return Cf({root:["root"]},kL,e.classes)}(s),p=t.useContext(IL).titleId,u=void 0===p?i:p;return(0,Cn.jsx)(fK,c({component:"h2",className:ub(l.root,o),ownerState:s,ref:n,variant:"h6",id:u},a))})),MK=hK,zK=cm((0,Cn.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility"),OK=Bv(iK||(iK=Rf(["\n query GetFactureInit($nce: Int, $nci: BigInt) {\n facture(nce: $nce, nci: $nci) {\n nce\n nci\n }\n }\n"]))),mK=Bv(aK||(aK=Rf(["\n query GetFacture($nce: Int, $nci: BigInt, $revision: Int!) {\n facture(nce: $nce, nci: $nci, revision: $revision) {\n reqt_id\n nce\n nci\n type_service_id\n revision\n licence\n poste_id\n poste_mod\n jeton\n statut_recv\n is_canceled\n lot_id\n created_at\n ec_id\n\n # TOTAL\n type_service_nom\n\n Lot {\n lotid\n agence\n ouverture\n fermeture\n utilisateur\n nbredp\n lasttransmission\n enattente\n annule\n utilisateuredit\n actif\n refact\n\n Utilisateur {\n idname\n }\n UtilisateurEdit {\n idname\n }\n }\n\n Medecin {\n licence\n prenom\n nom\n prenomsa\n nomsa\n male\n specialiste\n lieutra\n retraite\n }\n Poste {\n numero\n modulateur\n description\n descriptionsa\n cab\n clsc\n cli\n urg\n usi\n adm\n ger\n psy\n pal\n rea\n heb\n udc\n umf\n actif\n\n PosteAdresse {\n no\n alias\n nom\n adresse\n ville\n zip\n }\n }\n\n FactDebutPeriode {\n nce\n revision\n debutperiode\n }\n FactElmContx {\n nce\n revision\n codeelmcontx\n codefactlink\n\n ElementContx {\n elementno\n entente\n codeelement\n texte\n textesa\n niveau\n debut\n fin\n }\n }\n\n FactLieuGeo {\n nce\n revision\n typeid\n idlieu\n typelieu\n codeprecilieu\n nobureau\n\n Localite {\n localiteno\n code\n nom\n debut\n fin\n }\n\n LieuCodePrecision {\n entente\n code\n description\n geo\n phys\n }\n }\n FactLieuPhys {\n nce\n revision\n typeid\n idlieu\n nosectact\n codeprecisectact\n codeprecilieu\n\n Poste {\n description\n }\n\n SecteurActivite {\n numero\n description\n }\n\n LieuCodePrecision {\n entente\n code\n description\n geo\n phys\n }\n }\n\n FactLignes {\n ligneno\n nce\n revision\n rank\n mdgrppstno\n typelmfact\n codefact\n datefact\n coderole\n debutelmfact\n finelmfact\n coderef\n mntprelim\n mntfinal\n statrecv\n\n # Child\n FactLigneElmContx {\n ligneno\n codeelmcontx\n\n ElementContx {\n elementno\n entente\n codeelement\n texte\n textesa\n niveau\n debut\n fin\n }\n }\n FactLigneElmMesure {\n ligneno\n codeelmmesure\n valmesure\n\n ElementMesure {\n code\n nom\n typeunite\n }\n }\n FactLigneFd {\n ligneno\n typefd\n codetransport\n nbrkmaller\n nbrkmretour\n nbrhrsdeplacement\n nbrhrsattente\n\n TYPE_FD\n METHODE_TRANSPORT\n }\n FactLigneFdFrais {\n ligneno\n rank\n typefrais\n frais\n }\n FactLigneFormExpl {\n ligneno\n formuexpl\n }\n FactLigneInfoRemb {\n ligneno\n mntpercu\n }\n FactLigneLieuGeo {\n ligneno\n typelieu\n codeprecilieu\n no_bur\n }\n FactLigneLieuPhys {\n ligneno\n nosectact\n codeprecisectact\n codeprecilieu\n }\n FactLigneLieuRef {\n ligneno\n typereflieu\n typeidlieu\n idlieu\n }\n FactLigneProfRef {\n ligneno\n typerefprof\n typeidprof\n identifiant\n dh_demconsult\n }\n FactLigneProfRefNc {\n ligneno\n typerefprof\n codeterritoire\n nom\n prenom\n typeprof\n dh_demconsult\n }\n FactLigneRankDm {\n ligneno\n rank\n nce\n revision\n }\n CodeFact {\n codefactno\n entente\n code\n description\n typecode\n debut\n fin\n descriptionsa\n }\n MessageExplRecev {\n section\n codemsgexpl\n texte\n id\n }\n }\n\n FactPersObj {\n personneobjetno\n nce\n revision\n }\n\n FactRmx {\n nce\n revision\n dept\n debutperiode\n finperiode\n hrstotal\n minstotal\n demiperdiem\n csi\n cs2\n nommand\n datemand\n nomsign\n datesign\n once\n attestation\n }\n FactLignesRmx {\n nce\n revision\n lineno\n linedt\n am\n pm\n ref\n demiperdiem\n\n FactLigneRmxDetails {\n nce\n revision\n lineno\n rank\n ref\n code\n sd\n hr\n min\n }\n }\n\n FactVac {\n nce\n revision\n debutperiode\n finperiode\n hrstotal\n minstotal\n csi\n cs2\n nommand\n datemand\n nomsign\n datesign\n once\n attestation\n }\n FactVacDepl {\n nce\n revision\n postea\n posteb\n dtarrivee\n hrsdepl\n minsdepl\n km\n montant\n\n PosteDepart {\n description\n }\n PosteArrivee {\n description\n }\n }\n FactLignesVac {\n nce\n revision\n lineno\n linedt\n moderem\n nuit\n am\n pm\n soir\n\n FactLigneVacDetails {\n nce\n revision\n lineno\n rank\n ref\n code\n sd\n hr\n min\n }\n }\n\n FactureFd {\n nce\n revision\n dthrdepart\n typeidlieudepart\n idlieudepart\n dthrarrivee\n typeidlieuarrivee\n idlieuarrivee\n\n PosteDepart {\n description\n }\n LocaliteDepart {\n localiteno\n code\n nom\n debut\n fin\n }\n PosteArrivee {\n description\n }\n LocaliteArrivee {\n localiteno\n code\n nom\n debut\n fin\n }\n }\n\n EcMdGrps {\n id\n licence\n grp\n ec_id\n\n Ec {\n created_at\n updated_at\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n fmp_id\n }\n\n Ec1721(nci: $nci, revision: $revision) {\n mdgrpid\n nci\n noligne\n nam\n dateoccurrence\n codetran\n typeident\n valeurident\n montantprel\n montantpaye\n codemsgrfp\n codemsgrfp1\n codemsgrfp2\n codemsgrfp3\n codemsgrfp4\n codemsgrfp5\n id\n rev\n dateec\n\n MessageExpl {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl1 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl2 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl3 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl4 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl5 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n }\n Ec1722(nci: $nci, revision: $revision) {\n mdgrpid\n nci\n noligne\n nam\n dateoccurrence\n codetran\n typeident\n valeurident\n montantant\n montantnouv\n montantpaye\n codemsgrfp1\n codemsgrfp2\n codemsgrfp3\n codemsgrfp4\n codemsgrfp5\n id\n rev\n dateec\n\n MessageExpl1 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl2 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl3 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl4 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl5 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n }\n Ec1725(nci: $nci, revision: $revision) {\n mdgrpid\n nci\n noligne\n nam\n dateoccurrence\n codetran\n montantremb\n typeident\n valeurident\n montantant\n montantnouv\n montantpaye\n codemsgrfp1\n codemsgrfp2\n codemsgrfp3\n codemsgrfp4\n codemsgrfp5\n id\n rev\n dateec\n\n MessageExpl1 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl2 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl3 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl4 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl5 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n }\n }\n }\n }\n"]))),gK=Bv(sK||(sK=Rf(["\n query GetFactureVersions($nce: Int, $nci: BigInt) {\n factures(nce: $nce, nci: $nci) {\n reqt_id\n nce\n nci\n type_service_id\n revision\n licence\n poste_id\n poste_mod\n jeton\n statut_recv\n is_canceled\n lot_id\n created_at\n ec_id\n\n Lot {\n lotid\n agence\n ouverture\n fermeture\n utilisateur\n nbredp\n lasttransmission\n enattente\n annule\n utilisateuredit\n actif\n refact\n }\n }\n }\n"])));function vK(){var e,n,r=P(),o=s(ee(),2),i=o[0],a=(o[1],i.get("nce")),c=i.get("nci"),l=i.get("revision"),p=Bg(OK,{variables:{nce:a?parseInt(a):null,nci:c?parseInt(c):null}}),u=p.loading,d=(p.error,p.data),b=Bg(mK,{variables:{nce:null===d||void 0===d?void 0:d.facture.nce,nci:null===d||void 0===d?void 0:d.facture.nci,revision:l?parseInt(l):null},skip:!(null!==d&&void 0!==d&&d.facture)}),f=b.loading,h=b.error,M=b.data,z=Bg(gK,{variables:{nce:a?parseInt(a):null,nci:c?parseInt(c):null}}),O=(z.loading,z.error,z.data),m=s((0,t.useState)(!1),2),g=m[0],v=m[1],A=s((0,t.useState)(!1),2),y=A[0],x=A[1],q=s((0,t.useState)(!1),2),w=q[0],W=q[1],R=s((0,t.useState)(null),2),C=R[0],_=R[1],S=s((0,t.useState)(!1),2),k=S[0],L=S[1],E=s((0,t.useState)(null),2),T=E[0],N=E[1],B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;N(e),L(!0)},X=[(0,Cn.jsx)(qh,{fontSize:15,children:"Demandes"},"1"),(0,Cn.jsx)(qh,{fontSize:15,children:a||c},"1"),(0,Cn.jsxs)(qh,{fontSize:15,children:["V-",l]},"1")];if(h)return(0,Cn.jsxs)(qh,{children:["Error! ",h.message]});var j=null===M||void 0===M||null===(e=M.facture)||void 0===e?void 0:e.Poste;return(0,Cn.jsx)(Cn.Fragment,{children:(0,Cn.jsxs)(hA,{container:!0,alignItems:"flex-start",children:[(0,Cn.jsxs)(hA,{item:!0,xs:7,children:[(0,Cn.jsxs)(qh,{variant:"h5",fontWeight:"600",children:["DP #",a||c," (V-",l,")"]}),(0,Cn.jsx)(EW,{separator:(0,Cn.jsx)(iE,{fontSize:"small"}),sx:{mt:0,mb:5},children:X}),(0,Cn.jsx)(hA,{item:!0,xs:10,mt:6,children:(0,Cn.jsx)(RK,{factureData:M})})]}),(0,Cn.jsx)(hA,{item:!0,xs:5,children:(0,Cn.jsx)(qK,{factureData:M,factureVersionsData:O,handleChangeRevision:function(e,t){a?r("/facture?nce=".concat(a,"&revision=").concat(t)):c&&r("/facture?nci=".concat(c,"&revision=").concat(t))},handleClickMetaButton:function(){v(!0)},handleClickLotButton:function(){x(!0)},handleOpenFactLigneHistoryDialog:B})}),(0,Cn.jsx)(hA,{item:!0,xs:12,mt:1,children:u||f?(0,Cn.jsx)(wh,{}):(0,Cn.jsxs)(hA,{container:!0,children:[(0,Cn.jsxs)(hA,{item:!0,xs:12,children:[(0,Cn.jsxs)(qh,{variant:"body1",fontSize:17,fontWeight:"500",children:["Type de demande: ",null===M||void 0===M||null===(n=M.facture)||void 0===n?void 0:n.type_service_nom]}),j&&(0,Cn.jsxs)(qh,{variant:"body1",fontSize:15,mt:1.5,children:["Poste: ",j.description," (#",j.numero,")"]})]}),(0,Cn.jsx)(wK,{factureData:M}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,justifyContent:"space-between",mt:7,mb:5,children:[(0,Cn.jsxs)(hA,{item:!0,xs:5,children:[(0,Cn.jsx)(CK,{factureData:M}),(0,Cn.jsx)(TK,{factureData:M}),(0,Cn.jsx)(LK,{factureData:M}),(0,Cn.jsx)(EK,{factureData:M})]}),(0,Cn.jsxs)(hA,{item:!0,xs:5,children:[(0,Cn.jsx)(_K,{factureData:M}),(0,Cn.jsx)(SK,{factureData:M}),(0,Cn.jsx)(NK,{factureData:M})]})]}),(0,Cn.jsx)(xK,{factureData:M,handleOpenCodeFactDialog:function(e){_(e),W(!0)},handleOpenFactLigneHistoryDialog:B})]})}),(0,Cn.jsx)(BK,{factureData:M,isMetaDialogOpen:g,handleCloseMetaDialog:function(){v(!1)}}),(0,Cn.jsx)(XK,{factureData:M,isLotDialogOpen:y,handleCloseLotDialog:function(){x(!1)}}),(0,Cn.jsx)(jK,{codeFact:C,isCodeFactDialogOpen:w,handleCloseCodeFactDialog:function(){W(!1)}}),(0,Cn.jsx)(IK,{factLigne:T,factureData:M,isFactLigneHistoryDialogOpen:k,handleCloseFactLigneHistoryDialog:function(){L(!1)}})]})})}var AK=function(e){var t=e.text;return(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",fontSize:17,children:t})},yK=function(e){var t=e.text;return(0,Cn.jsx)(qh,{variant:"subtitle1",fontSize:15,children:t})},xK=function(e){var t=e.factureData,n=e.handleOpenCodeFactDialog,r=e.handleOpenFactLigneHistoryDialog,o=null===t||void 0===t?void 0:t.facture;if(!o)return null;var i=null,a=null,s="";switch(o.type_service_id){case 0:case 1:i=FK(n,r,o.Ec1721),a=o.FactLignes,s="ligneno";break;case 7:i=VK(n),a=o.FactLignesRmx,s="lineno";break;case 8:i=UK(n),a=o.FactLignesVac,s="lineno"}return i&&a&&s?(0,Cn.jsx)(IV,{getRowId:function(e){return e[s]},rows:a,columns:i,pagination:!0,pageSize:100,rowsPerPageOptions:[25,50,75,100],autoHeight:!0,disableSelectionOnClick:!0,hideFooter:!0}):(0,Cn.jsx)(Cn.Fragment,{})},qK=function(e){var t=e.factureData,n=e.factureVersionsData,r=e.handleChangeRevision,o=e.handleClickMetaButton,i=e.handleClickLotButton,a=e.handleOpenFactLigneHistoryDialog,s=null===t||void 0===t?void 0:t.facture,c=null===n||void 0===n?void 0:n.factures;if(s&&c){var l,p,u,d=s.revision;return(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:3,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,container:!0,justifyContent:"flex-end",children:(0,Cn.jsx)(rK,{color:"primary",value:d.toString(),exclusive:!0,onChange:r,children:null===(l=Le(c))||void 0===l?void 0:l.sort((function(e,t){return e.revision-t.revision})).map((function(e,t){var n=e.revision,r=e.is_canceled,o=(e.lot_id,e.ec_id);return(0,Cn.jsxs)(dK,{value:n.toString(),disabled:n.toString()===d.toString(),children:[(0,Cn.jsx)(hY,{value:!r,sx:{mr:1}}),"V-",n,(0,Cn.jsx)("br",{}),"EC-",o]},t)}))})}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,justifyContent:"flex-end",children:[(0,Cn.jsx)(tq,{variant:"contained",size:"small",sx:{mr:2},onClick:o,endIcon:(0,Cn.jsx)(zK,{}),children:"META"}),(0,Cn.jsxs)(tq,{variant:"contained",size:"small",color:"info",sx:{mr:2},children:["EC #",null===t||void 0===t||null===(p=t.facture)||void 0===p?void 0:p.ec_id]}),(0,Cn.jsxs)(tq,{variant:"contained",size:"small",color:"info",onClick:i,children:["Lot #",null===t||void 0===t||null===(u=t.facture)||void 0===u?void 0:u.lot_id]})]}),(0,Cn.jsx)(hA,{item:!0,xs:12,container:!0,justifyContent:"flex-end",children:(0,Cn.jsx)(tq,{onClick:function(){a()},variant:"contained",size:"small",color:"warning",children:"Reconstitution EC"})})]})}return null},wK=function(e){var t,n,r=e.factureData;return null!==r&&void 0!==r&&null!==(t=r.facture)&&void 0!==t&&t.FactElmContx&&(null===r||void 0===r||null===(n=r.facture)||void 0===n?void 0:n.FactElmContx.length)>0?(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",mt:1,children:[(0,Cn.jsx)(qh,{variant:"body1",textTransform:"uppercase",fontSize:14,sx:{mr:1},children:"Contextes:"}),(0,Cn.jsx)(WK,{factureData:r})]}):null},WK=function(e){var t,n=e.factureData;return((null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.FactElmContx)||[]).map((function(e,t){var n=e.codeelmcontx,r=e.codefactlink,o=e.ElementContx;if(o){o.elementno;var i=o.entente,a=o.codeelement,s=o.texte,c=(o.textesa,o.niveau,o.debut),l=o.fin;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Info sur l'\xe9l\xe9ment contexte"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsxs)(qh,{variant:"body2",children:["\xc9l\xe9ment contexte: ",s," (#",a,")"]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Entente: ",i]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Date de d\xe9but d'effectivit\xe9: ",c]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Date de fin d'effectivit\xe9: ",l]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["codefactlink: ",r]})]}),placement:"top",arrow:!0,sx:{mr:1},children:(0,Cn.jsx)(dg,{size:"small",label:"#".concat(n),clickable:!0})},t)}return(0,Cn.jsx)(dg,{size:"small",label:"#".concat(n)})}))},RK=function(e){var t,n=e.factureData,r=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.Medecin;P();if(r){var o=r.licence,i=r.prenom,a=r.nom,s=(r.specialiste,r.male);return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:[s?(0,Cn.jsx)(HV,{sx:{color:"blue1Dark.main",fontSize:25,ml:"-7px",mr:1}}):(0,Cn.jsx)(FV,{sx:{color:"pink1Dark.main",fontSize:25,ml:"-7px",mr:1}}),(0,Cn.jsxs)(qh,{variant:"h5",children:[s?"Dr.":"Dre."," ",a,", ",i," (#",o,")"]}),(0,Cn.jsx)(Im,{size:"medium",color:"primary",href:"/mds/".concat(o),target:"_blank",children:(0,Cn.jsx)(DV,{fontSize:"inherit"})})]}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}})]})}return null},CK=function(e){var t,n=e.factureData,r=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.FactPersObj;if(r){var o=r.personneobjetno;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(AK,{text:"Patient:"}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}}),(0,Cn.jsx)(yK,{text:o})]})}return null},_K=function(e){var t,n=e.factureData,r=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.FactLieuPhys;if(r){var o=r.codeprecilieu,i=(r.codeprecisectact,r.idlieu),a=r.nosectact,s=(r.typeid,r.SecteurActivite),c=r.Poste,l=r.LieuCodePrecision,p=(s||{}).description,u=(c||{}).description;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(AK,{text:"Lieu physique:"}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}}),(0,Cn.jsx)(yK,{text:"Poste: ".concat(u||"Non sp\xe9cifi\xe9"," ").concat(i&&"(#".concat(i,")"))}),(0,Cn.jsx)(yK,{text:"Secteur d'activit\xe9: ".concat(p||"Aucun secteur d'activit\xe9 sp\xe9cifi\xe9"," ").concat(a&&"(#".concat(a,")"))}),l&&(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:[(0,Cn.jsx)(yK,{text:"Code pr\xe9cis\xe9 lieu: ".concat(o)}),(0,Cn.jsx)(kK,{lieuCodePrecision:l})]})]})}return null},SK=function(e){var t,n=e.factureData,r=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.FactLieuGeo;if(r){r.nce,r.revision,r.typeid;var o=r.idlieu,i=(r.typelieu,r.codeprecilieu),a=(r.nobureau,r.Localite),s=r.LieuCodePrecision,c=a||{},l=(c.localiteno,c.code,c.nom);c.debut,c.fin;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(AK,{text:"Lieu g\xe9ographique:"}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}}),(0,Cn.jsx)(yK,{text:"Localit\xe9: ".concat(l||"Localit\xe9 introuvable"," ").concat(o&&"(#".concat(o,")"))}),s&&(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:[(0,Cn.jsx)(yK,{text:"Code pr\xe9cis\xe9 lieu: ".concat(i)}),(0,Cn.jsx)(kK,{lieuCodePrecision:s})]})]})}return null},kK=function(e){var t=e.lieuCodePrecision||{},n=t.entente,r=t.code,o=t.description;t.geo,t.phys;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Code pr\xe9cis\xe9 lieu"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Entente: ",n]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Code: ",r]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Description: ",o]})]}),placement:"right",arrow:!0,children:(0,Cn.jsx)(Im,{children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})},LK=function(e){var t,n=e.factureData,r=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.FactRmx;if(r){var o=r.dept,i=r.debutperiode,a=r.finperiode,s=r.hrstotal,c=r.minstotal,l=r.demiperdiem,p=(r.csi,r.cs2,r.nommand),u=r.datemand,d=r.nomsign,b=r.datesign,f=r.once,h=r.attestation;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(AK,{text:"Information RMX:"}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}}),(0,Cn.jsxs)(hA,{container:!0,children:[(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(yK,{text:"D\xe9partement: ".concat(o)}),(0,Cn.jsx)(yK,{text:"P\xe9riode: ".concat(i," au ").concat(a)}),(0,Cn.jsx)(yK,{text:"Total: ".concat(s,"h").concat(c<10?"0".concat(c):c)}),(0,Cn.jsx)(yK,{text:"Demi Per Diem: ".concat(l)})]}),(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(yK,{text:"Mand: ".concat(p," le ").concat(u)}),(0,Cn.jsx)(yK,{text:"Sign: ".concat(d," le ").concat(b)}),(0,Cn.jsx)(yK,{text:"Once: ".concat(f)}),(0,Cn.jsx)(yK,{text:"Attestation: ".concat(h)})]})]})]})}return null},EK=function(e){var t,n=e.factureData,r=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.FactVacDepl;if(r){var o=r.postea,i=r.posteb,a=r.dtarrivee,s=r.hrsdepl,c=r.minsdepl,l=r.km,p=r.montant,u=r.PosteDepart,d=r.PosteArrivee,b=(u||{}).description,f=(d||{}).description;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(AK,{text:"Information d\xe9placement VAC:"}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}}),(0,Cn.jsxs)(hA,{container:!0,children:[(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(yK,{text:"Lieu d\xe9part: ".concat(b||o)}),(0,Cn.jsx)(yK,{text:"Lieu d'arriv\xe9: ".concat(f||i)}),(0,Cn.jsx)(yK,{text:"Date d'arriv\xe9e: ".concat(ro()(a).format(ra))})]}),(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(yK,{text:"Hrs d\xe9placement: ".concat(s,"h")}),(0,Cn.jsx)(yK,{text:"Mins d\xe9placement: ".concat(c<10?"0".concat(c):c)}),(0,Cn.jsx)(yK,{text:"Km: ".concat(l)}),(0,Cn.jsx)(yK,{text:"Montant: ".concat(p)})]})]})]})}return null},TK=function(e){var t,n=e.factureData,r=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.FactureFd;if(r){var o=r.dthrdepart;r.typeidlieudepart,r.idlieudepart;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(AK,{text:"D\xe9part:"}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}}),(0,Cn.jsx)(yK,{text:"Date/heure d\xe9part: ".concat(ro()(o).format(ra))}),(0,Cn.jsx)(PK,{factureFd:r,type:"depart"})]})}return null},NK=function(e){var t,n=e.factureData,r=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.FactureFd;if(r){var o=r.dthrarrivee;r.typeidlieuarrivee,r.idlieuarrivee;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(AK,{text:"Arriv\xe9e:"}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}}),(0,Cn.jsx)(yK,{text:"Date/heure arriv\xe9e: ".concat(ro()(o).format(ra))}),(0,Cn.jsx)(PK,{factureFd:r,type:"arrivee"})]})}return null},PK=function(e){var t=e.factureFd,n=e.type,r=t["idlieu".concat(n)];switch(t["typeidlieu".concat(n)]){case"1":var o=t["Poste".concat(Is(n))];if(o){var i=o.description;return(0,Cn.jsx)(yK,{text:"Lieu: ".concat(i," (Poste #").concat(r,")")})}return(0,Cn.jsx)(yK,{text:"Poste introuvable"});case"2":var a=r;return(0,Cn.jsx)(yK,{text:"Lieu: ".concat(a," (Code postal)")});case"3":var s=t["Localite".concat(Is(n))];if(s){s.localiteno,s.code;var c=s.nom;s.debut,s.fin;return(0,Cn.jsx)(yK,{text:"Lieu: ".concat(c," (Localit\xe9 #").concat(r,")")})}return(0,Cn.jsx)(yK,{text:"Localit\xe9 introuvable"});default:return(0,Cn.jsx)(yK,{text:"Type de lieu non r\xe9pertori\xe9"})}},BK=function(e){var t=e.factureData,n=e.isMetaDialogOpen,r=e.handleCloseMetaDialog,o=null===t||void 0===t?void 0:t.facture;if(o){var i=o.reqt_id,a=o.nce,s=o.nci,c=o.type_service_id,l=o.revision,p=(o.licence,o.poste_id,o.poste_mod,o.jeton),u=o.statut_recv,d=o.is_canceled,b=(o.lot_id,o.created_at),f=(o.ec_id,o.type_service_nom);return(0,Cn.jsx)(YL,{fullWidth:!0,maxWidth:"sm",open:n,onClose:r,children:o&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(MK,{children:"Information meta sur cette DP"}),(0,Cn.jsx)(dg,{label:d?"DP Annul\xe9e":"DP Active",sx:{position:"absolute",top:20,right:20,borderRadius:2,fontWeight:"bold",px:0,py:0,bgcolor:d?"red1Dark.main":"green1Dark.main",color:d?"red1Light.main":"green1Light.main"}}),(0,Cn.jsx)(PL,{children:(0,Cn.jsxs)(hA,{container:!0,spacing:2,children:[(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:3,mb:2,children:[(0,Cn.jsxs)(qh,{variant:"h6",fontWeight:"500",children:["Cr\xe9\xe9e le: ",ro()(b).format(ra)]}),(0,Cn.jsx)(vm,{sx:{mt:1.5}})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,children:[(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"NCE:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:a})]}),(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Version:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:l})]})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,mt:3,children:[(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Type de service"}),(0,Cn.jsxs)(qh,{variant:"body1",fontWeight:"500",children:[f," (#",c,")"]})]}),(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Statut de recevabilit\xe9"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:u})]})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,mt:3,children:[(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"RAMQ - NCI:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:s})]}),(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"RAMQ - No. Requ\xeate:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:i})]}),(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"RAMQ - Jeton"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:p})]})]})]})}),(0,Cn.jsx)($_,{children:(0,Cn.jsx)(tq,{onClick:r,children:"Fermer"})})]})})}return null},XK=function(e){var t,n=e.factureData,r=e.isLotDialogOpen,o=e.handleCloseLotDialog,i=null===n||void 0===n||null===(t=n.facture)||void 0===t?void 0:t.Lot;if(i){var a=i.lotid,s=(i.agence,i.ouverture),c=i.fermeture,l=(i.utilisateur,i.nbredp),p=i.lasttransmission,u=i.enattente,d=(i.annule,i.utilisateuredit,i.actif),b=i.refact,f=i.Utilisateur;i.UtilisateurEdit;return(0,Cn.jsx)(YL,{fullWidth:!0,maxWidth:"sm",open:r,onClose:o,children:i&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(MK,{children:["Lot #",a]}),(0,Cn.jsx)(dg,{label:d?"Ouvert":"Ferm\xe9",sx:{position:"absolute",top:20,right:20,borderRadius:2,fontWeight:"bold",px:0,py:0,bgcolor:d?"red1Dark.main":"green1Dark.main",color:d?"red1Light.main":"green1Light.main"}}),(0,Cn.jsx)(PL,{children:(0,Cn.jsxs)(hA,{container:!0,spacing:2,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsxs)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",children:[(0,Cn.jsx)(qh,{variant:"h6",children:"Factur\xe9 par: "}),(0,Cn.jsx)(dg,{avatar:(0,Cn.jsx)(Mm,{src:"https://storage.cloud.google.com/fmparadis-public-bucket-staging/admin-avatars/grogu.jpeg?authuser=2"}),label:Is(f.idname),variant:"outlined",sx:{ml:1.5}})]})}),(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:3,mb:2,children:[(0,Cn.jsxs)(qh,{variant:"h6",fontWeight:"500",children:["Nombre de DPs: ",l]}),(0,Cn.jsx)(vm,{sx:{mt:1.5}})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,children:[(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Ouverture:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:ro()(s).format(ra)})]}),(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Fermeture:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:ro()(c).format(ra)})]}),(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Derni\xe8re transmission:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:ro()(p).format(ra)})]})]}),(0,Cn.jsx)(hA,{item:!0,xs:12,mt:3,children:(0,Cn.jsxs)(hA,{container:!0,spacing:2,children:[(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"En attente:"}),(0,Cn.jsx)(hY,{value:u,fontSize:"medium"})]}),(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Actif:"}),(0,Cn.jsx)(hY,{value:d,fontSize:"medium"})]}),(0,Cn.jsxs)(hA,{item:!0,xs:4,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Refact:"}),(0,Cn.jsx)(hY,{value:b,fontSize:"medium"})]})]})})]})}),(0,Cn.jsx)($_,{children:(0,Cn.jsx)(tq,{onClick:o,children:"Fermer"})})]})})}return null},jK=function(e){var t=e.codeFact,n=e.isCodeFactDialogOpen,r=e.handleCloseCodeFactDialog;if(t){var o=t.codefactno,i=t.entente,a=t.code,s=t.description,c=t.typecode,l=t.debut,p=t.fin;t.descriptionsa;return(0,Cn.jsx)(YL,{fullWidth:!0,maxWidth:"sm",open:n,onClose:r,children:t&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(MK,{children:["Information sur le code de facturation #",a]}),(0,Cn.jsx)(PL,{children:(0,Cn.jsxs)(hA,{container:!0,spacing:2,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,container:!0,spacing:2,mt:3,children:(0,Cn.jsxs)(hA,{item:!0,xs:12,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Description du code:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:s})]})}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,mt:3,children:[(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Code:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:a})]}),(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Code FMP:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:o})]})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,mt:3,children:[(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Type de code:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:c})]}),(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Entente:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:i})]})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,mt:3,children:[(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Date de d\xe9but d'effectivit\xe9 du code de facturation:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:l})]}),(0,Cn.jsxs)(hA,{item:!0,xs:6,children:[(0,Cn.jsx)(qh,{variant:"body2",mb:2,children:"Date de fin d'effectivit\xe9 du code de facturation:"}),(0,Cn.jsx)(qh,{variant:"body1",fontWeight:"500",children:p})]})]})]})}),(0,Cn.jsx)($_,{children:(0,Cn.jsx)(tq,{onClick:r,children:"Fermer"})})]})})}return null},IK=function(e){var n=e.factLigne,r=e.factureData,o=e.isFactLigneHistoryDialogOpen,i=e.handleCloseFactLigneHistoryDialog,a=(0,t.useMemo)((function(){return DK()}),[]);if(null!==r&&void 0!==r&&r.facture){var s=r.facture.EcMdGrps;return(0,Cn.jsx)(YL,{fullWidth:!0,maxWidth:"lg",open:o,onClose:i,children:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(MK,{children:n?"Information sur la ligne #".concat(n.rank):"Reconstitution de l'historique d'EC"}),(0,Cn.jsx)(PL,{sx:{mt:3},children:Le(s).sort((function(e,t){return e.ec_id-t.ec_id})).map((function(e,t){var n=e.id,o=(e.licence,e.grp),i=e.ec_id,s=e.Ec1721,c=e.Ec1722,l=e.Ec1725,p=[];return s.length>0&&p.push({rows:s,ec17type:"1721"}),c.length>0&&p.push({rows:c,ec17type:"1722"}),l.length>0&&p.push({rows:l,ec17type:"1725"}),(0,Cn.jsxs)(Wf,{sx:{borderLeftWidth:"2px",borderLeftStyle:"solid",borderColor:r.facture.ec_id===i?"primary.main":"warning.main",pl:2},children:[(0,Cn.jsx)(qh,{variant:"h6"}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}}),(0,Cn.jsxs)(hA,{container:!0,mb:3,children:[(0,Cn.jsx)(hA,{item:!0,xs:4,children:(0,Cn.jsxs)(qh,{variant:"body1",fontWeight:"500",textAlign:"center",children:["Mdgrp ID: ",n]})}),(0,Cn.jsx)(hA,{item:!0,xs:4,children:(0,Cn.jsxs)(qh,{variant:"body1",fontWeight:"500",textAlign:"center",children:["EC ID: ",i]})}),(0,Cn.jsx)(hA,{item:!0,xs:4,children:(0,Cn.jsxs)(qh,{variant:"body1",fontWeight:"500",textAlign:"center",children:["Groupe: ",o]})})]}),p.map((function(e,t){var n=e.rows,r=e.ec17type,o="";switch(r){case"1721":o="Factures dont le montant final diff\xe8re du montant pr\xe9liminaire";break;case"1722":o="Factures dont une ou plusieurs lignes ont \xe9t\xe9 modifi\xe9es";break;case"1725":o="Factures dont..."}return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{variant:"h6",fontSize:18,mb:1,children:[o," (",r,")"]}),(0,Cn.jsx)(IV,{getRowId:function(e){return e.id},rows:n,columns:a,pagination:!0,pageSize:100,rowsPerPageOptions:[25,50,75,100],autoHeight:!0,disableSelectionOnClick:!0,hideFooter:!0,initialState:{sorting:{sortModel:[{field:"noligne",sort:"asc"}]}},sx:{mb:4}})]})}))]})}))}),(0,Cn.jsx)($_,{children:(0,Cn.jsx)(tq,{onClick:i,children:"Fermer"})})]})})}return null},DK=function(){return[{field:"noligne",headerName:"Rank",width:100},{field:"mntprelim",headerName:"$ Pr\xe9liminaire",width:140,align:"right",valueGetter:function(e){return void 0!==e.row.montantant?e.row.montantant:e.row.montantprel},valueFormatter:function(e){return"".concat(Ds(e.value)," $")}},{field:"mntfinal",headerName:"$ Terminal",width:140,align:"right",valueGetter:function(e){return void 0!==e.row.montantnouv?e.row.montantnouv:e.row.montantpaye},valueFormatter:function(e){return"".concat(Ds(e.value)," $")}},{field:"diff",headerName:"$ Diff\xe9rence",width:170,align:"right",valueGetter:function(e){return"Ec1721"===e.row.__typename?e.row.montantpaye-e.row.montantprel:e.row.montantnouv-e.row.montantant},renderCell:function(e){var t=e.value/(void 0!==e.row.montantant?e.row.montantant:e.row.montantprel)*100;return isNaN(t)&&(t=0),(0,Cn.jsxs)(qh,{variant:"body2",sx:{color:e.value>0?"success.main":0==e.value?"warning.main":"error.main"},children:[e.value>0?"+ ":e.value<0?"- ":"",Ds(Math.abs(e.value))," $ ","(".concat(Ds(t),"%)")]})}},{field:"messageExpl",headerName:"Refus RAMQ",minWidth:300,align:"right",renderCell:function(e){return(0,Cn.jsx)(HK,{ec1721LinkedToLigne:e.row})}}]},FK=function(e,t,n){return[{field:"rank",headerName:"Rank",width:60},{field:"ligneno",headerName:"# Ligne fact.",width:120},{field:"mdgrppstno",headerName:"mdgrppstno",width:100},{field:"codefact",headerName:"Code fact.",width:120,valueGetter:function(e){return e.row.CodeFact},renderCell:function(t){var n=t.value,r=t.row.FactLigneFd,o=null;if(r){var i=r.nbrkmaller,a=r.nbrkmretour,s=r.nbrhrsdeplacement,c=r.nbrhrsattente,l=r.TYPE_FD,p=r.METHODE_TRANSPORT;o=(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Info sur les frais de d\xe9placement"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Type frais: ",l]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["M\xe9thode transport: ",p]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Nbr. km aller: ",i]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Nbr. km retour: ",a]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Nbr. hrs d\xe9placement: ",s]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Nbr. hrs attente: ",c]})]}),placement:"right",arrow:!0,children:(0,Cn.jsx)(Im,{children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})}if(n)return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(tq,{onClick:function(){e(n)},variant:"contained",size:"small",children:n.code}),o||null]})}},{field:"factLigneElmCtx",headerName:"\xc9l\xe9ments de contexte",minWidth:180,flex:1,valueGetter:function(e){return e.row.FactLigneElmContx},renderCell:function(e){var t=e.value;if(t)return t.map((function(e,t){var n=e.codeelmcontx,r=(e.ligneno,e.ElementContx||{}),o=(r.elementno,r.entente),i=r.codeelement,a=r.texte,s=(r.textesa,r.niveau,r.debut),c=r.fin;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Info sur l'\xe9l\xe9ment contexte"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsxs)(qh,{variant:"body2",children:["\xc9l\xe9ment contexte: ",a," (#",i,")"]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Entente: ",o]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Date de d\xe9but d'effectivit\xe9: ",s]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Date de fin d'effectivit\xe9: ",c]})]}),placement:"top",arrow:!0,sx:{mr:1},children:(0,Cn.jsx)(dg,{size:"small",label:"#".concat(n),clickable:!0})},t)}))}},{field:"factLigneElmMesure",headerName:"\xc9l\xe9ments de mesure",width:180,valueGetter:function(e){return e.row.FactLigneElmMesure},renderCell:function(e){var t=e.value;if(t)return t.map((function(e,t){var n=e.codeelmmesure,r=e.valmesure,o=null===e||void 0===e?void 0:e.ElementMesure,i=parseInt(r,10)/100;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Info sur l'\xe9l\xe9ment mesur\xe9"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsxs)(qh,{variant:"body2",children:["\xc9l\xe9ment mesur\xe9: ",null===o||void 0===o?void 0:o.nom," (#",n,")"]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Valeur mesur\xe9e: ",i,null===o||void 0===o?void 0:o.typeunite]})]}),placement:"right",arrow:!0,children:(0,Cn.jsx)(dg,{size:"small",label:"#".concat(n),clickable:!0})},t)}))}},{field:"coderole",headerName:"Code r\xf4le",width:100},{field:"coderef",headerName:"Code ref.",width:100},{field:"mntprelim",headerName:"$ Pr\xe9liminaire",width:140,align:"right",valueFormatter:function(e){var t;return"".concat(null===(t=e.value)||void 0===t?void 0:t.toFixed(2)," $")}},{field:"mntfinal",headerName:"$ Terminal",width:140,align:"right",renderCell:function(e){var t,n,r="".concat(null===(t=e.value)||void 0===t?void 0:t.toFixed(2)," $"),o=null===(n=e.row.FactLigneFormExpl)||void 0===n?void 0:n.formuexpl;e.row.rank;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",children:r}),o&&(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Info sur le calcul de la RAMQ"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsx)(qh,{variant:"body2",whiteSpace:"pre-line",children:o})]}),placement:"right",arrow:!0,children:(0,Cn.jsx)(Im,{children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]})}},{field:"diff",headerName:"$ Diff\xe9rence",width:160,align:"right",valueGetter:function(e){return e.row.mntfinal-e.row.mntprelim},renderCell:function(e){return(0,Cn.jsxs)(qh,{variant:"body2",sx:{color:e.value>0?"success.main":0==e.value?"warning.main":"error.main"},children:[e.value>0?"+ ":e.value<0?"- ":"",Math.abs(e.value).toFixed(2)," $"," ","(".concat(((e.row.mntfinal-e.row.mntprelim)/e.row.mntprelim*100).toFixed(2),"%)")]})}},{field:"datefact",headerName:"Date facturation",width:180},{field:"debutelmfact",headerName:"D\xe9but elm. fact.",width:180,valueFormatter:function(e){return e.value?ro()(e.value).format(ra):null}},{field:"finelmfact",headerName:"Fin elm. fact.",width:180,valueFormatter:function(e){return e.value?ro()(e.value).format(ra):null}},{field:"statrecv",headerName:"Statut recv. (1|2|3)",width:150}]},HK=function(e){var t=e.ec1721LinkedToLigne,n=[];console.log(t),Object.keys(t).forEach((function(e){["MessageExpl","MessageExpl1","MessageExpl2","MessageExpl3","MessageExpl4","MessageExpl5"].includes(e)&&null!==t[e]&&n.push(t[e])}));var r=n.map((function(e,t){e.entente;var n=e.codemsgexpl,r=e.texte;e.categorie,e.typefact,e.debut,e.fin;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Info sur un refus de la RAMQ"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Code du message: ",n]}),(0,Cn.jsx)("br",{}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Message explicatif: ",r]})]}),placement:"top",arrow:!0,children:(0,Cn.jsx)(dg,{size:"small",label:"#".concat(n),clickable:!0,color:"error",sx:{ml:1}})})}));return(0,Cn.jsx)(Cn.Fragment,{children:r})},VK=function(e){return[{field:"lineno",headerName:"Rank",width:60},{field:"linedt",headerName:"Date",width:120},{field:"am",headerName:"AM",width:UV,renderCell:function(e){return(0,Cn.jsx)(hY,{value:e.value})}},{field:"pm",headerName:"PM",width:UV,renderCell:function(e){return(0,Cn.jsx)(hY,{value:e.value})}},{field:"demiperdiem",headerName:"Demi Per Diem",width:150},{field:"ref",headerName:"ref",width:100},{field:"factLigneRmxDetails",headerName:"D\xe9tails RMX",minWidth:180,flex:1,valueGetter:function(e){return e.row.FactLigneRmxDetails},renderCell:function(e){var t=e.value;if(t)return t.map((function(e,t){e.nce,e.revision,e.lineno,e.rank;var n=e.ref,r=e.code,o=e.sd,i=e.hr,a=e.min;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Info sur RMX"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Code: #",r]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["SD: ",o]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Ref: ",n]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["HR: ",i]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["MIN: ",a]})]}),placement:"left",arrow:!0,sx:{mr:1},children:(0,Cn.jsx)(dg,{size:"small",label:"".concat(i,"h").concat(a<10?"0".concat(a):a),clickable:!0})},t)}))}}]},UK=function(e){return[{field:"lineno",headerName:"Rank",width:60},{field:"linedt",headerName:"Date",width:120},{field:"am",headerName:"AM",width:UV,renderCell:function(e){return(0,Cn.jsx)(hY,{value:e.value})}},{field:"pm",headerName:"PM",width:UV,renderCell:function(e){return(0,Cn.jsx)(hY,{value:e.value})}},{field:"soir",headerName:"Soir",width:UV,renderCell:function(e){return(0,Cn.jsx)(hY,{value:e.value})}},{field:"nuit",headerName:"Nuit",width:UV,renderCell:function(e){return(0,Cn.jsx)(hY,{value:e.value})}},{field:"moderem",headerName:"Moderem",width:100},{field:"factLigneVacDetails",headerName:"D\xe9tails VAC",minWidth:180,flex:1,valueGetter:function(e){return e.row.FactLigneVacDetails},renderCell:function(e){var t=e.value;if(t)return t.map((function(e,t){e.nce,e.revision,e.lineno,e.rank;var n=e.ref,r=e.code,o=e.sd,i=e.hr,a=e.min;return(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"body2",fontWeight:"500",children:"Info sur VAC"}),(0,Cn.jsx)(vm,{sx:{bgcolor:"primary.main",mb:2,mt:.5}}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Code: #",r]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["SD: ",o]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["Ref: ",n]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["HR: ",i]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["MIN: ",a]})]}),placement:"left",arrow:!0,sx:{mr:1},children:(0,Cn.jsx)(dg,{size:"small",label:"".concat(i,"h").concat(a<10?"0".concat(a):a),clickable:!0})},t)}))}}]},GK=__webpack_require__(4802),YK=__webpack_require__.n(GK),KK=cm((0,Cn.jsx)("path",{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"}),"Download"),QK=cm((0,Cn.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),$K=["component","direction","spacing","divider","children"];function JK(e,n){var r=t.Children.toArray(e).filter(Boolean);return r.reduce((function(e,o,i){return e.push(o),i0?a[n[t-1]]:"column";a[e]=r}}));r=Je(r,ot({theme:n},s,(function(e,n){return{"& > :not(style) + :not(style)":ne({margin:0},"margin".concat((r=n?a[n]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[r])),yt(o,e))};var r})))}return r=function(e){for(var t=it(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:"D\xe9ductions"}),(0,Cn.jsx)(cQ,{children:Le(f||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.mdgrpid,e.compteur,e.valideur;var n=e.codededuction,r=e.montantdeduction,o=e.libellededuction,i=(e.dateenrgded,e.nocompteded,"".concat(o," (codededuction: ").concat(n,")")),a=r;return(0,Cn.jsx)(lQ,{title:i,value:a},t)}))})]}),M&&M.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:"Transferts de solde"}),(0,Cn.jsx)(cQ,{children:Le(M||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.mdgrpid,e.compteur,e.valideur;var n=e.codetransfert,r=e.classegrptransfert,o=e.nogrptransfert,i=e.montanttransfert,a=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["".concat("A"===n?"Transfert au groupe":"Transfert du groupe"," ").concat(o),(0,Cn.jsx)(SD,{title:(0,Cn.jsx)(Cn.Fragment,{children:(0,Cn.jsxs)(qh,{variant:"body2",children:["Classe du groupe de transfert: ",r]})}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),s=i;return(0,Cn.jsx)(lQ,{title:a,value:s},t)}))})]}),(0,Cn.jsx)(sQ,{children:"Int\xe9r\xeats et avances"}),(0,Cn.jsxs)(cQ,{children:[(0,Cn.jsx)(lQ,{title:"Int\xe9r\xeats sur recouv",value:D}),(0,Cn.jsx)(lQ,{title:"Int\xe9r\xeats sur avance",value:F}),(0,Cn.jsx)(lQ,{title:"Avances remises",value:H}),(0,Cn.jsx)(lQ,{title:"Avances recouv",value:V}),(0,Cn.jsx)(lQ,{title:"Int\xe9r\xeats sur solde neg",value:U})]}),h&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:"Cotisation de f\xe9d\xe9ration"}),(0,Cn.jsx)(cQ,{children:(0,Cn.jsx)(lQ,{title:"Cotisation \xe0 la ".concat(X),value:j})})]}),m&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:"Montant net vers\xe9"}),(0,Cn.jsx)(cQ,{children:(0,Cn.jsx)(lQ,{title:"Paiement via ".concat(ae," (No. ").concat(re,")"),value:ne})})]})]})]}),q.length>0&&(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:5,children:[(0,Cn.jsx)(aQ,{children:"Demandes VAC/SAL/RMX"}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(iQ,{Ec1717ig:q})})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:5,children:[(0,Cn.jsx)(aQ,{children:(0,Cn.jsxs)(tQ,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,Cn.jsx)(qh,{variant:"h6",color:"primary",children:"Factures r\xe9gl\xe9es avec montant final \xe9gal au montant pr\xe9liminaire"}),(0,Cn.jsx)(lY,{value:v.reduce((function(e,t){return e+t.montantpaye}),0),variant:"h6"})]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(IV,{getRowId:function(e){return cY()},rows:v||[],columns:r,pagination:!0,pageSize:10,rowsPerPageOptions:[10,25,50,75,100],autoHeight:!0,disableSelectionOnClick:!0})})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:5,children:[(0,Cn.jsx)(aQ,{children:(0,Cn.jsxs)(tQ,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,Cn.jsx)(qh,{variant:"h6",color:"primary",children:"Factures dont le montant final diff\xe8re du montant pr\xe9liminaire"}),(0,Cn.jsx)(lY,{value:A.reduce((function(e,t){return e+t.montantpaye}),0),variant:"h6"})]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(IV,{getRowId:function(e){return cY()},rows:A||[],columns:o,pagination:!0,pageSize:10,rowsPerPageOptions:[10,25,50,75,100],autoHeight:!0,disableSelectionOnClick:!0})})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:5,children:[(0,Cn.jsx)(aQ,{children:(0,Cn.jsxs)(tQ,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,Cn.jsx)(qh,{variant:"h6",color:"primary",children:"Factures dont une ou plusieurs lignes ont \xe9t\xe9 modifi\xe9es"}),(0,Cn.jsx)(lY,{value:y.reduce((function(e,t){return e+t.montantpaye}),0),variant:"h6"})]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(IV,{getRowId:function(e){return cY()},rows:y||[],columns:i,pagination:!0,pageSize:10,rowsPerPageOptions:[10,25,50,75,100],autoHeight:!0,disableSelectionOnClick:!0})})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:5,children:[(0,Cn.jsx)(aQ,{children:(0,Cn.jsxs)(tQ,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,Cn.jsx)(qh,{variant:"h6",color:"primary",children:"Montants rembours\xe9s \xe0 une personne assur\xe9e"}),(0,Cn.jsx)(lY,{value:x.reduce((function(e,t){return e+t.montantpaye}),0),variant:"h6"})]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(IV,{getRowId:function(e){return cY()},rows:x||[],columns:a,pagination:!0,pageSize:10,rowsPerPageOptions:[10,25,50,75,100],autoHeight:!0,disableSelectionOnClick:!0})})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:5,children:[(0,Cn.jsx)(aQ,{children:"Cumulatifs"}),(0,Cn.jsxs)(cQ,{children:[(0,Cn.jsx)(sQ,{children:"Cumulatifs de f\xe9d\xe9ration"}),(0,Cn.jsx)(cQ,{children:Le(g||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){var n=e.nomfederation,r=e.montantcumulatif,o="Montant cumulatif de la ".concat(n),i=r;return(0,Cn.jsx)(lQ,{title:o,value:i},t)}))})]})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,mt:5,children:[(0,Cn.jsx)(aQ,{children:"Messages de la RAMQ"}),N&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{children:N}),(0,Cn.jsx)("br",{})]}),P&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{children:P}),(0,Cn.jsx)("br",{})]})]})]})},iQ=function(e){var t=e.Ec1717ig;return(0,Cn.jsx)(cQ,{children:Le(t||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){var n=e.mdgrpid,r=e.ec_id,o=e.typereglement,i=e.compteur,a=e.valideur,s=e.masterid,c=e.nodemande,l=e.debutperiode,p=e.finperiode,u=e.datereception,d=e.nodemref1,b=e.nodemref2,f=e.codetrans,h=e.libellecodetrans,M=e.codemsgexpl1,z=e.codemsgexpl2,O=e.codemsgexpl3,m=e.montantinteret,g=e.noattestation,v=e||{},A=v.Ec1717e2,y=v.Ec1717f2,x=v.Ec1717m2,q=v.Ec1717r2,w=v.Ec1717r3,W=v.Ec1717v2,R=v.Ec1717v3,C=v.Ec1717v4,_=v.Ec1717x2,S=v.Ec1717x3,k="Du ".concat(ro()(l).format("LL")," au ").concat(ro()(p).format("LL"));return(0,Cn.jsxs)(Wf,{children:[(0,Cn.jsx)(sQ,{children:(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:[k,(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{variant:"body2",children:["mdgrpid: ",n]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["ec_id: ",r]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["typereglement: ",o]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["compteur: ",i]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["valideur: ",a]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["masterid: ",s]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["nodemande: ",c]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["debutperiode: ",l]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["finperiode: ",p]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["datereception: ",u]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["nodemref1: ",d]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["nodemref2: ",b]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["codetrans: ",f]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["libellecodetrans: ",h]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["codemsgexpl1: ",M]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["codemsgexpl2: ",z]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["codemsgexpl3: ",O]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["montantinteret: ",m]}),(0,Cn.jsxs)(qh,{variant:"body2",children:["noattestation: ",g]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"primary"})})})]})}),(0,Cn.jsx)(Wf,{sx:{my:2}}),(0,Cn.jsx)(cQ,{children:(0,Cn.jsxs)(cQ,{children:[A&&A.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:(0,Cn.jsx)(pQ,{title:"Assurance responsabilit\xe9",type:"EC1717 - E2"})}),(0,Cn.jsx)(cQ,{children:Le(A||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.debutperiode,o=e.finperiode,i=e.noentente,a=e.typeassresp,s=e.libelletypeassresp,c=e.montantpaye,l=e.codemsgexpl1,p=e.codemsgexpl2,u=e.codemsgexpl3,d=e.montantcumule,b=e.montantcumuleant,f=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["".concat(s),(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["debutperiode: ",r]}),(0,Cn.jsxs)(qh,{children:["finperiode: ",o]}),(0,Cn.jsxs)(qh,{children:["noentente: ",i]}),(0,Cn.jsxs)(qh,{children:["typeassresp: ",a]}),(0,Cn.jsxs)(qh,{children:["libelletypeassresp: ",s]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",c]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl1: ",l]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl2: ",p]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl3: ",u]}),(0,Cn.jsxs)(qh,{children:["montantcumule: ",d]}),(0,Cn.jsxs)(qh,{children:["montantcumuleant: ",b]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),h=c;return(0,Cn.jsx)(lQ,{title:f,value:h},t)}))})]}),y&&y.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:(0,Cn.jsx)(pQ,{title:"Forfaitaire",type:"EC1717 - F2"})}),(0,Cn.jsx)(cQ,{children:Le(y||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.libelleforfaitaire,r=e.taux,o=e.montantpaye,i="".concat(n," (Taux: ").concat(r,")"),a=o;return(0,Cn.jsx)(lQ,{title:i,value:a},t)}))})]}),x&&x.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:(0,Cn.jsx)(pQ,{title:"Mesures incitatives",type:"EC1717 - M2"})}),(0,Cn.jsx)(cQ,{children:Le(x||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.typemesinc,o=e.libelleelmmesinc,i=e.elmmesinc,a=e.libelleelmmesinc2,s=e.codemsgexpl1,c=e.codemsgexpl2,l=e.montantpaye,p=e.nombrejours,u=e.montantconsidere,d=e.nombrejourscons,b=e.montantconsant,f=e.nombrejoursconsant,h=e.reference,M=e.debutmesureinc,z=e.finmesureinc,O=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["".concat(o),(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["typemesinc: ",r]}),(0,Cn.jsxs)(qh,{children:["libelleelmmesinc: ",o]}),(0,Cn.jsxs)(qh,{children:["elmmesinc: ",i]}),(0,Cn.jsxs)(qh,{children:["libelleelmmesinc2: ",a]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl1: ",s]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl2: ",c]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",l]}),(0,Cn.jsxs)(qh,{children:["nombrejours: ",p]}),(0,Cn.jsxs)(qh,{children:["montantconsidere: ",u]}),(0,Cn.jsxs)(qh,{children:["nombrejourscons: ",d]}),(0,Cn.jsxs)(qh,{children:["montantconsant: ",b]}),(0,Cn.jsxs)(qh,{children:["nombrejoursconsant: ",f]}),(0,Cn.jsxs)(qh,{children:["reference: ",h]}),(0,Cn.jsxs)(qh,{children:["debutmesureinc: ",M]}),(0,Cn.jsxs)(qh,{children:["finmesureinc: ",z]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),m=l;return(0,Cn.jsx)(lQ,{title:O,value:m},t)}))})]}),q&&q.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:(0,Cn.jsx)(pQ,{title:"Mesures particuli\xe8res",type:"EC1717 - R2"})}),(0,Cn.jsx)(cQ,{children:Le(q||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.typemesurepart,o=e.libelletypemesurepart,i=e.typeappl,a=e.montantpaye,s=e.montantcons,c=e.montantconsant,l=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:[o,(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["typemesurepart: ",r]}),(0,Cn.jsxs)(qh,{children:["libelletypemesurepart:"," ",o]}),(0,Cn.jsxs)(qh,{children:["typeappl: ",i]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",a]}),(0,Cn.jsxs)(qh,{children:["montantcons: ",s]}),(0,Cn.jsxs)(qh,{children:["montantconsant: ",c]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),p=a;return(0,Cn.jsx)(lQ,{title:l,value:p},t)}))})]}),w&&w.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{children:(0,Cn.jsx)(pQ,{title:"Mesures particuli\xe8res : D\xe9tails",type:"EC1717 - R3"})}),(0,Cn.jsx)(cQ,{children:Le(w||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.codemsgexpl1,o=e.codemsgexpl2,i=e.dateoccurrence,a=e.montantpaye,s=e.montantcons,c=e.montantconsant,l=e.reference,p=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:[i,(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl1: ",r]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl2: ",o]}),(0,Cn.jsxs)(qh,{children:["dateoccurrence: ",i]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",a]}),(0,Cn.jsxs)(qh,{children:["montantcons: ",s]}),(0,Cn.jsxs)(qh,{children:["montantconsant: ",c]}),(0,Cn.jsxs)(qh,{children:["reference: ",l]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),u=a;return(0,Cn.jsx)(lQ,{title:p,value:u},t)}))})]}),W&&W.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{value:Le(W||[]).reduce((function(e,t){return e+t.montantpaye}),0),children:(0,Cn.jsx)(pQ,{title:"Vacation : Activit\xe9",type:"EC1717 - V2"})}),(0,Cn.jsx)(cQ,{children:Le(W||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.codenatserv,o=e.libellecodenatserv,i=e.codeemploitemps,a=e.libellecodeemploitemps,s=e.codemsgexpl1,c=e.codemsgexpl2,l=e.codemsgexpl3,p=e.montantpaye,u=e.nombreheurespayees,d=e.montantcons,b=e.nombreheurescons,f=e.montantconsant,h=e.nombreheuresconsant,M=e.reference,z=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["".concat(a," (").concat(u," H)"),(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["codenatserv: ",r]}),(0,Cn.jsxs)(qh,{children:["libellecodenatserv: ",o]}),(0,Cn.jsxs)(qh,{children:["codeemploitemps: ",i]}),(0,Cn.jsxs)(qh,{children:["libellecodeemploitemps:"," ",a]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl1: ",s]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl2: ",c]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl3: ",l]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",p]}),(0,Cn.jsxs)(qh,{children:["nombreheurespayees: ",u]}),(0,Cn.jsxs)(qh,{children:["montantcons: ",d]}),(0,Cn.jsxs)(qh,{children:["nombreheurescons: ",b]}),(0,Cn.jsxs)(qh,{children:["montantconsant: ",f]}),(0,Cn.jsxs)(qh,{children:["nombreheuresconsant:"," ",h]}),(0,Cn.jsxs)(qh,{children:["reference: ",M]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),O=p;return(0,Cn.jsx)(lQ,{title:z,value:O},t)}))})]}),R&&R.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{value:Le(R||[]).reduce((function(e,t){return e+t.montantpaye}),0),children:(0,Cn.jsx)(pQ,{title:"Vacation : Temps de d\xe9placement",type:"EC1717 - V3"})}),(0,Cn.jsx)(cQ,{children:Le(R||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.codemsgexpl1,o=e.codemsgexpl2,i=e.codemsgexpl3,a=e.montantpaye,s=e.nombreheurespayees,c=e.montantcons,l=e.nombreheurescons,p=e.montantconsant,u=e.nombreheuresconsant,d=e.reference,b=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["".concat(s," H"),(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl1: ",r]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl2: ",o]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl3: ",i]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",a]}),(0,Cn.jsxs)(qh,{children:["nombreheurespayees: ",s]}),(0,Cn.jsxs)(qh,{children:["montantcons: ",c]}),(0,Cn.jsxs)(qh,{children:["nombreheurescons: ",l]}),(0,Cn.jsxs)(qh,{children:["montantconsant: ",p]}),(0,Cn.jsxs)(qh,{children:["nombreheuresconsant:"," ",u]}),(0,Cn.jsxs)(qh,{children:["reference: ",d]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),f=a;return(0,Cn.jsx)(lQ,{title:b,value:f},t)}))})]}),C&&C.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{value:Le(C||[]).reduce((function(e,t){return e+t.montantpaye}),0),children:(0,Cn.jsx)(pQ,{title:"Vacation : Co\xfbts de transport",type:"EC1717 - V4"})}),(0,Cn.jsx)(cQ,{children:Le(C||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.codemsgexpl1,o=e.codemsgexpl2,i=e.codemsgexpl3,a=e.montantpaye,s=e.nombrekmspayes,c=e.montantcons,l=e.nombrekmscons,p=e.montantconsant,u=e.nombrekmsconsant,d=e.reference,b=e.refocctempsdepl,f=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["".concat(s," KM"),(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl1: ",r]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl2: ",o]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl3: ",i]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",a]}),(0,Cn.jsxs)(qh,{children:["nombrekmspayes: ",s]}),(0,Cn.jsxs)(qh,{children:["montantcons: ",c]}),(0,Cn.jsxs)(qh,{children:["nombrekmscons: ",l]}),(0,Cn.jsxs)(qh,{children:["montantconsant: ",p]}),(0,Cn.jsxs)(qh,{children:["nombrekmsconsant: ",u]}),(0,Cn.jsxs)(qh,{children:["reference: ",d]}),(0,Cn.jsxs)(qh,{children:["refocctempsdepl: ",b]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),h=a;return(0,Cn.jsx)(lQ,{title:f,value:h},t)}))})]}),_&&_.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{value:Le(_||[]).reduce((function(e,t){return e+t.montantpaye}),0),children:(0,Cn.jsx)(pQ,{title:"R\xe9mun\xe9ration g\xe9n\xe9rale : Activit\xe9",type:"EC1717 - X2"})}),(0,Cn.jsx)(cQ,{children:Le(_||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.codenatserv,o=e.libellecodenatserv,i=e.codeemploitemps,a=e.libellecodeemploitemps,s=e.codemsgexpl1,c=e.codemsgexpl2,l=e.codemsgexpl3,p=e.montantpaye,u=e.typeunitpayees,d=e.nombreunitpayees,b=e.nombreunitcons,f=e.nombreunitconsant,h=e.reference,M=e.sansobjet,z=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["".concat(a," (").concat(d," ").concat(u,")"),(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["codenatserv: ",r]}),(0,Cn.jsxs)(qh,{children:["libellecodenatserv: ",o]}),(0,Cn.jsxs)(qh,{children:["codeemploitemps: ",i]}),(0,Cn.jsxs)(qh,{children:["libellecodeemploitemps:"," ",a]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl1: ",s]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl2: ",c]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl3: ",l]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",p]}),(0,Cn.jsxs)(qh,{children:["typeunitpayees: ",u]}),(0,Cn.jsxs)(qh,{children:["nombreunitpayees: ",d]}),(0,Cn.jsxs)(qh,{children:["nombreunitcons: ",b]}),(0,Cn.jsxs)(qh,{children:["nombreunitconsant: ",f]}),(0,Cn.jsxs)(qh,{children:["reference: ",h]}),(0,Cn.jsxs)(qh,{children:["sansobjet: ",M]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),O=p;return(0,Cn.jsx)(lQ,{title:z,value:O},t)}))})]}),S&&S.length>0&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(sQ,{value:Le(S||[]).reduce((function(e,t){return e+t.montantpaye}),0),children:(0,Cn.jsx)(pQ,{title:"R\xe9mun\xe9ration g\xe9n\xe9rale : Per diem",type:"EC1717 - X3"})}),(0,Cn.jsx)(cQ,{children:Le(S||[]).sort((function(e,t){return e.compteur-t.compteur})).map((function(e,t){e.masterid,e.compteur,e.valideur,e.mdgrpid;var n=e.nodemande,r=e.codemsgexpl1,o=e.codemsgexpl2,i=e.codemsgexpl3,a=e.montantpaye,s=e.typeunitpayees,c=e.nombreunitpayees,l=e.nombreunitcons,p=e.nombreunitconsant,u=e.reference,d=(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:["".concat(c," ").concat(s),(0,Cn.jsx)(SD,{title:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(qh,{children:["No demande: ",n]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl1: ",r]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl2: ",o]}),(0,Cn.jsxs)(qh,{children:["codemsgexpl3: ",i]}),(0,Cn.jsxs)(qh,{children:["montantpaye: ",a]}),(0,Cn.jsxs)(qh,{children:["typeunitpayees: ",s]}),(0,Cn.jsxs)(qh,{children:["nombreunitpayees: ",c]}),(0,Cn.jsxs)(qh,{children:["nombreunitcons: ",l]}),(0,Cn.jsxs)(qh,{children:["nombreunitconsant: ",p]}),(0,Cn.jsxs)(qh,{children:["reference: ",u]})]}),placement:"right",arrow:!0,sx:{ml:.8},children:(0,Cn.jsx)(Im,{size:"small",children:(0,Cn.jsx)(QG,{fontSize:"small",color:"info"})})})]}),b=a;return(0,Cn.jsx)(lQ,{title:d,value:b},t)}))})]})]})})]},t)}))})},aQ=function(e){var t=e.children;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"h6",color:"primary",children:t}),(0,Cn.jsx)(vm,{sx:{mt:1,mb:2}})]})},sQ=function(e){var t=e.children,n=e.value,r=void 0===n?null:n,o="";return o=r||0===r?Ds(r):"",(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,justifyContent:"space-between",alignItems:"center",mb:1,children:[(0,Cn.jsx)(qh,{variant:"subtitle1",fontWeight:"bold",children:t}),o&&(0,Cn.jsxs)(qh,{variant:"subtitle1",fontWeight:"bold",children:[o,"$"]})]})},cQ=function(e){var t=e.children;return(0,Cn.jsx)(hA,{item:!0,xs:12,pl:3,mb:3,children:t})},lQ=function(e){var t=e.title,n=e.value;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,justifyContent:"space-between",children:[(0,Cn.jsx)(qh,{variant:"body1",children:t}),(0,Cn.jsx)(lY,{value:n,variant:"body1",sx:{fontWeight:"bold"}})]}),(0,Cn.jsx)(vm,{sx:{mt:.5,mb:1}})]})},pQ=function(e){var t=e.title;e.type;return(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:[(0,Cn.jsx)(qh,{variant:"subtitle1",sx:function(e){return{color:e.palette.warning.main}},children:t}),false]})},uQ=Bv(rQ||(rQ=Rf(["\n ","\n ","\n ","\n ","\n ","\n\n query GetEcMdGrp($id: Int!) {\n ecMdGrp(id: $id) {\n id\n licence\n grp\n ec_id\n fmp_id\n\n Md {\n ...MdFields\n }\n Groupe {\n numero\n licence\n denomination\n incorp\n debut\n fin\n }\n Ec {\n ...EcFields\n }\n\n Ec1703 {\n mdgrpid\n compteur\n valideur\n msg\n msg_permanent\n }\n Ec1704 {\n mdgrpid\n compteur\n valideur\n codetrans\n montantbrut\n libellecodetrans\n }\n Ec1707 {\n mdgrpid\n compteur\n valideur\n codededuction\n montantdeduction\n libellededuction\n dateenrgded\n nocompteded\n }\n Ec1708 {\n mdgrpid\n compteur\n valideur\n nomfed\n montantcotisation\n }\n Ec1709 {\n mdgrpid\n compteur\n valideur\n codetransfert\n classegrptransfert\n nogrptransfert\n montanttransfert\n }\n Ec1710 {\n mdgrpid\n compteur\n valideur\n interetsurrecouv\n interetsuravance\n avancesemises\n avancesrecouv\n interetsursoldeneg\n }\n Ec1711 {\n mdgrpid\n compteur\n valideur\n soldereporte\n soldeareporte\n modifdesolde\n paiementrecu\n debutinteretsursoldeneg\n codemsg\n montantmsg1\n }\n Ec1712 {\n mdgrpid\n compteur\n valideur\n montantnetverse\n nochequeouvirement\n modepaiement\n }\n Ec1716 {\n mdgrpid\n compteur\n valideur\n nomfederation\n montantcumulatif\n }\n\n Ec1717ig {\n ...Ec1717igFields\n\n Ec1717e2 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n debutperiode\n finperiode\n noentente\n typeassresp\n libelletypeassresp\n montantpaye\n codemsgexpl1\n codemsgexpl2\n codemsgexpl3\n montantcumule\n montantcumuleant\n }\n Ec1717f2 {\n masterid\n compteur\n valideur\n mdgrpid\n libelleforfaitaire\n taux\n montantpaye\n }\n Ec1717m2 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n typemesinc\n libelleelmmesinc\n elmmesinc\n libelleelmmesinc2\n codemsgexpl1\n codemsgexpl2\n montantpaye\n nombrejours\n montantconsidere\n nombrejourscons\n montantconsant\n nombrejoursconsant\n reference\n debutmesureinc\n finmesureinc\n }\n Ec1717r2 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n typemesurepart\n libelletypemesurepart\n typeappl\n montantpaye\n montantcons\n montantconsant\n }\n Ec1717r3 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n codemsgexpl1\n codemsgexpl2\n dateoccurrence\n montantpaye\n montantcons\n montantconsant\n reference\n }\n Ec1717v2 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n codenatserv\n libellecodenatserv\n codeemploitemps\n libellecodeemploitemps\n codemsgexpl1\n codemsgexpl2\n codemsgexpl3\n montantpaye\n nombreheurespayees\n montantcons\n nombreheurescons\n montantconsant\n nombreheuresconsant\n reference\n }\n Ec1717v3 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n codemsgexpl1\n codemsgexpl2\n codemsgexpl3\n montantpaye\n nombreheurespayees\n montantcons\n nombreheurescons\n montantconsant\n nombreheuresconsant\n reference\n }\n Ec1717v4 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n codemsgexpl1\n codemsgexpl2\n codemsgexpl3\n montantpaye\n nombrekmspayes\n montantcons\n nombrekmscons\n montantconsant\n nombrekmsconsant\n reference\n refocctempsdepl\n }\n Ec1717x2 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n codenatserv\n libellecodenatserv\n codeemploitemps\n libellecodeemploitemps\n codemsgexpl1\n codemsgexpl2\n codemsgexpl3\n montantpaye\n typeunitpayees\n nombreunitpayees\n nombreunitcons\n nombreunitconsant\n reference\n sansobjet\n }\n Ec1717x3 {\n masterid\n compteur\n valideur\n mdgrpid\n nodemande\n codemsgexpl1\n codemsgexpl2\n codemsgexpl3\n montantpaye\n typeunitpayees\n nombreunitpayees\n nombreunitcons\n nombreunitconsant\n reference\n }\n }\n\n Ec1720 {\n nci\n nam\n dateoccurrence\n montantpaye\n dateec\n rev\n\n Facture {\n poste_id\n poste_mod\n FactLignes {\n ...FactLigneFields\n # AMT_AT_EC(ec_id: $ec_id)\n }\n }\n }\n Ec1721 {\n mdgrpid\n nci\n noligne\n nam\n dateoccurrence\n codetran\n typeident\n valeurident\n montantprel\n montantpaye\n codemsgrfp\n codemsgrfp1\n codemsgrfp2\n codemsgrfp3\n codemsgrfp4\n codemsgrfp5\n id\n rev\n dateec\n\n Facture {\n poste_id\n poste_mod\n FactLignes {\n ...FactLigneFields\n }\n }\n\n MessageExpl {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl1 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl2 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl3 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl4 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl5 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n\n CodeFact {\n ...CodeFactFields\n }\n }\n Ec1722 {\n mdgrpid\n nci\n noligne\n nam\n dateoccurrence\n codetran\n typeident\n valeurident\n montantant\n montantnouv\n montantpaye\n codemsgrfp1\n codemsgrfp2\n codemsgrfp3\n codemsgrfp4\n codemsgrfp5\n id\n rev\n dateec\n\n Facture {\n poste_id\n poste_mod\n FactLignes {\n ...FactLigneFields\n }\n }\n\n MessageExpl1 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl2 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl3 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl4 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl5 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n\n CodeFact {\n ...CodeFactFields\n }\n }\n Ec1725 {\n mdgrpid\n nci\n noligne\n nam\n dateoccurrence\n codetran\n montantremb\n typeident\n valeurident\n montantant\n montantnouv\n montantpaye\n codemsgrfp1\n codemsgrfp2\n codemsgrfp3\n codemsgrfp4\n codemsgrfp5\n id\n rev\n dateec\n\n Facture {\n poste_id\n poste_mod\n FactLignes {\n ...FactLigneFields\n }\n }\n\n MessageExpl1 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl2 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl3 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl4 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n MessageExpl5 {\n entente\n codemsgexpl\n texte\n categorie\n typefact\n debut\n fin\n }\n\n CodeFact {\n ...CodeFactFields\n }\n }\n }\n }\n"])),XG,DG,FG,WG,RG);function dQ(e){var t=e.tabIndexAsString,n=e.ecMdGrpId,r=Bg(uQ,{variables:{id:n},skip:!n}),o=r.loading,i=(r.error,r.data),a=null===i||void 0===i?void 0:i.ecMdGrp;return(0,Cn.jsx)(uE,{value:t,children:(0,Cn.jsx)(hA,{container:!0,spacing:4,alignItems:"flex-start",children:o?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px",width:"100%"},children:(0,Cn.jsx)(wh,{})}):(0,Cn.jsx)(oQ,{ecMdGrp:a})})})}var bQ=__webpack_require__(8363),fQ=["onKeyDown","onKeyPress","onKeyUp"],hQ=["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],MQ=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],zQ=[].concat(["onCopy","onCut","onPaste"],["onCompositionEnd","onCompositionStart","onCompositionUpdate"],fQ,["onFocus","onBlur"],["onChange","onInput","onInvalid","onReset","onSubmit"],["onError","onLoad"],hQ,["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],["onSelect"],MQ,["onScroll"],["onWheel"],["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],["onLoad","onError"],["onAnimationStart","onAnimationEnd","onAnimationIteration"],["onTransitionEnd"],["onToggle"]),OQ=function(e,t){var n={};return zQ.forEach((function(r){r in e&&(n[r]=t?function(n){return e[r](n,t(r))}:e[r])})),n};function mQ(e){var t=!1,n=new Promise((function(n,r){e.then((function(){return!t&&n.apply(void 0,arguments)})).catch((function(e){return!t&&r(e)}))}));return{promise:n,cancel:function(){t=!0}}}function gQ(){return Array.prototype.slice.call(arguments).reduce((function(e,t){return e.concat(t)}),[]).filter((function(e){return"string"===typeof e})).join(" ")}var vQ="Invariant failed";function AQ(e,t){if(!e)throw new Error(vQ)}var yQ=function(e,t){},xQ=(0,t.createContext)(null);function qQ(e){var n=e.children,r=e.type;return t.createElement("div",{className:"react-pdf__message react-pdf__message--".concat(r)},n)}qQ.propTypes={children:bE().node,type:bE().oneOf(["error","loading","no-data"]).isRequired};var wQ=function(){function e(){Ce(this,e),this.externalLinkTarget=null,this.externalLinkRel=null}return Se(e,[{key:"setDocument",value:function(e){this.pdfDocument=e}},{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setExternalLinkRel",value:function(e){this.externalLinkRel=e}},{key:"setExternalLinkTarget",value:function(e){this.externalLinkTarget=e}},{key:"setHistory",value:function(){}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(e){this.pdfViewer.currentPageNumber=e}},{key:"rotation",get:function(){return 0},set:function(e){}},{key:"goToDestination",value:function(e){var t=this;new Promise((function(n){"string"===typeof e?t.pdfDocument.getDestination(e).then(n):Array.isArray(e)?n(e):e.then(n)})).then((function(n){AQ(Array.isArray(n),'"'.concat(n,'" is not a valid destination array.'));var r=n[0];new Promise((function(e){r instanceof Object?t.pdfDocument.getPageIndex(r).then((function(t){e(t)})).catch((function(){AQ(!1,'"'.concat(r,'" is not a valid page reference.'))})):"number"===typeof r?e(r):AQ(!1,'"'.concat(r,'" is not a valid destination reference.'))})).then((function(n){var r=n+1;AQ(r>=1&&r<=t.pagesCount,'"'.concat(r,'" is not a valid page number.')),t.pdfViewer.scrollPageIntoView({dest:e,pageIndex:n,pageNumber:r})}))}))}},{key:"navigateTo",value:function(e){this.goToDestination(e)}},{key:"goToPage",value:function(){}},{key:"addLinkAttributes",value:function(e,t,n){e.href=t,e.rel=this.externalLinkRel||"noopener noreferrer nofollow",e.target=n?"_blank":this.externalLinkTarget||""}},{key:"getDestinationHash",value:function(){return"#"}},{key:"getAnchorUrl",value:function(){return"#"}},{key:"setHash",value:function(){}},{key:"executeNamedAction",value:function(){}},{key:"cachePageRef",value:function(){}},{key:"isPageVisible",value:function(){return!0}},{key:"isPageCached",value:function(){return!0}}]),e}(),WQ={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},RQ="undefined"!==typeof window,CQ=RQ&&"file:"===window.location.protocol;function _Q(e){return"undefined"!==typeof e}function SQ(e){return _Q(e)&&null!==e}function kQ(e){return e instanceof ArrayBuffer}function LQ(e){return AQ(RQ),e instanceof Blob}function EQ(e){return AQ(RQ),e instanceof File}function TQ(e){return"string"===typeof e&&/^data:/.test(e)}function NQ(e){AQ(TQ(e));var t=s(e.split(","),2),n=t[0],r=t[1];return-1!==n.split(";").indexOf("base64")?atob(r):unescape(r)}var PQ="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function BQ(){yQ(!CQ,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ".concat(PQ))}function XQ(e){e&&e.cancel&&e.cancel()}function jQ(e,t){return Object.defineProperty(e,"width",{get:function(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get:function(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get:function(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get:function(){return this.view[3]},configurable:!0}),e}function IQ(e){return"RenderingCancelledException"===e.name}function DQ(e){return new Promise((function(t,n){var r=new FileReader;return r.onload=function(){return t(new Uint8Array(r.result))},r.onerror=function(e){switch(e.target.error.code){case e.target.error.NOT_FOUND_ERR:return n(new Error("Error while reading a file: File not found."));case e.target.error.NOT_READABLE_ERR:return n(new Error("Error while reading a file: File not readable."));case e.target.error.SECURITY_ERR:return n(new Error("Error while reading a file: Security error."));case e.target.error.ABORT_ERR:return n(new Error("Error while reading a file: Aborted."));default:return n(new Error("Error while reading a file."))}},r.readAsArrayBuffer(e),null}))}var FQ=function(){var e={};return[].concat(Le(hQ),Le(MQ),Le(fQ)).forEach((function(t){e[t]=bE().func})),e}(),HQ=[bE().string,bE().instanceOf(ArrayBuffer),bE().shape({data:bE().oneOfType([bE().object,bE().string]),httpHeaders:bE().object,range:bE().object,url:bE().string,withCredentials:bE().bool})];"undefined"!==typeof File&&HQ.push(bE().instanceOf(File)),"undefined"!==typeof Blob&&HQ.push(bE().instanceOf(Blob));var VQ=bE().oneOfType([bE().string,bE().arrayOf(bE().string)]),UQ=bE().oneOfType(HQ),GQ=bE().instanceOf(wQ),YQ=(bE().oneOf(["_self","_blank","_parent","_top"]),bE().shape({_transport:bE().shape({fontLoader:bE().object.isRequired}).isRequired,commonObjs:bE().shape({_objs:bE().object.isRequired}).isRequired,getAnnotations:bE().func.isRequired,getTextContent:bE().func.isRequired,getViewport:bE().func.isRequired,render:bE().func.isRequired})),KQ=bE().oneOfType([bE().shape({getDestination:bE().func.isRequired,getOutline:bE().func.isRequired,getPage:bE().func.isRequired,numPages:bE().number.isRequired}),bE().bool]),QQ=bE().oneOfType([bE().func,bE().shape({current:bE().any})]),$Q=bE().oneOf(["canvas","none","svg"]),JQ=bE().oneOf([0,90,180,270]),ZQ=["url"];function e$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t$(e){for(var t=1;t was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to and handle navigating by yourself or ensure that all pages are rendered within ."))}}}),ne(bO(e),"linkService",new wQ),ne(bO(e),"loadDocument",(function(){XQ(e.runningTask),e.loadingTask&&e.loadingTask.destroy();var t=mQ(e.findDocumentSource());e.runningTask=t,t.promise.then((function(t){if(e.onSourceSuccess(),t){e.setState((function(e){return e.pdf?{pdf:null}:null}));var n=e.props,r=n.options,o=n.onLoadProgress,i=n.onPassword;e.loadingTask=bQ.getDocument(t$(t$({},t),r)),e.loadingTask.onPassword=i,o&&(e.loadingTask.onProgress=o);var a=mQ(e.loadingTask.promise);e.runningTask=a,a.promise.then((function(t){e.setState((function(e){return e.pdf&&e.pdf.fingerprint===t.fingerprint?null:{pdf:t}}),e.onLoadSuccess)})).catch((function(t){e.onLoadError(t)}))}})).catch((function(t){e.onSourceError(t)}))})),ne(bO(e),"setupLinkService",(function(){var t=e.props,n=t.externalLinkRel,r=t.externalLinkTarget;e.linkService.setViewer(e.viewer),e.linkService.setExternalLinkRel(n),e.linkService.setExternalLinkTarget(r)})),ne(bO(e),"onSourceSuccess",(function(){var t=e.props.onSourceSuccess;t&&t()})),ne(bO(e),"onSourceError",(function(t){yQ(t);var n=e.props.onSourceError;n&&n(t)})),ne(bO(e),"onLoadSuccess",(function(){var t=e.props.onLoadSuccess,n=e.state.pdf;t&&t(n),e.pages=new Array(n.numPages),e.linkService.setDocument(n)})),ne(bO(e),"onLoadError",(function(t){e.setState({pdf:!1}),yQ(t);var n=e.props.onLoadError;n&&n(t)})),ne(bO(e),"findDocumentSource",(function(){return new Promise((function(t){var n=e.props.file;if(n||t(null),"string"===typeof n){if(TQ(n)){var r=NQ(n);t({data:r})}BQ(),t({url:n})}if(n instanceof r$&&t({range:n}),kQ(n)&&t({data:n}),RQ&&(LQ(n)||EQ(n)))DQ(n).then((function(e){t({data:e})}));else{if(AQ("object"===ab(n)),AQ(n.url||n.data||n.range),"string"===typeof n.url){if(TQ(n.url)){var o=n.url,i=nq(n,ZQ),a=NQ(o);t(t$({data:a},i))}BQ()}t(n)}}))})),ne(bO(e),"registerPage",(function(t,n){e.pages[t]=n})),ne(bO(e),"unregisterPage",(function(t){delete e.pages[t]})),e}return Se(r,[{key:"componentDidMount",value:function(){this.loadDocument(),this.setupLinkService()}},{key:"componentDidUpdate",value:function(e){this.props.file!==e.file&&this.loadDocument()}},{key:"componentWillUnmount",value:function(){XQ(this.runningTask),this.loadingTask&&this.loadingTask.destroy()}},{key:"childContext",get:function(){var e=this.linkService,t=this.registerPage,n=this.unregisterPage,r=this.props,o=r.imageResourcesPath,i=r.renderMode,a=r.rotate;return{imageResourcesPath:o,linkService:e,pdf:this.state.pdf,registerPage:t,renderMode:i,rotate:a,unregisterPage:n}}},{key:"eventProps",get:function(){var e=this;return OQ(this.props,(function(){return e.state.pdf}))}},{key:"renderChildren",value:function(){var e=this.props.children;return t.createElement(xQ.Provider,{value:this.childContext},e)}},{key:"renderContent",value:function(){var e=this.props.file,n=this.state.pdf;if(!e){var r=this.props.noData;return t.createElement(qQ,{type:"no-data"},"function"===typeof r?r():r)}if(null===n){var o=this.props.loading;return t.createElement(qQ,{type:"loading"},"function"===typeof o?o():o)}if(!1===n){var i=this.props.error;return t.createElement(qQ,{type:"error"},"function"===typeof i?i():i)}return this.renderChildren()}},{key:"render",value:function(){var e=this.props,n=e.className,r=e.inputRef;return t.createElement("div",c({className:gQ("react-pdf__Document",n),ref:r},this.eventProps),this.renderContent())}}]),r}(t.PureComponent);o$.defaultProps={error:"Failed to load PDF file.",loading:"Loading PDF\u2026",noData:"No PDF file specified.",onPassword:function(e,t){switch(t){case WQ.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case WQ.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}}};var i$=bE().oneOfType([bE().func,bE().node]);o$.propTypes=t$(t$({},FQ),{},{children:bE().node,className:VQ,error:i$,externalLinkRel:bE().string,externalLinkTarget:bE().string,file:UQ,imageResourcesPath:bE().string,inputRef:QQ,loading:i$,noData:i$,onItemClick:bE().func,onLoadError:bE().func,onLoadProgress:bE().func,onLoadSuccess:bE().func,onPassword:bE().func,onSourceError:bE().func,onSourceSuccess:bE().func,rotate:bE().number});var a$=(0,t.createContext)(null),s$=function(){function e(t){var n=t.num,r=t.gen;Ce(this,e),this.num=n,this.gen=r}return Se(e,[{key:"toString",value:function(){var e="".concat(this.num,"R");return 0!==this.gen&&(e+=this.gen),e}}]),e}(),c$=["item"];function l$(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hg(e);if(t){var o=Hg(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ug(this,n)}}var p$=function(e){Fg(r,e);var n=l$(r);function r(){var e;Ce(this,r);for(var t=arguments.length,o=new Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:this.props;return SQ(e.pageNumber)?e.pageNumber-1:SQ(e.pageIndex)?e.pageIndex:null}},{key:"getPageNumber",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return SQ(e.pageNumber)?e.pageNumber:SQ(e.pageIndex)?e.pageIndex+1:null}},{key:"pageIndex",get:function(){return this.getPageIndex()}},{key:"pageNumber",get:function(){return this.getPageNumber()}},{key:"rotate",get:function(){var e=this.props.rotate;if(SQ(e))return e;var t=this.state.page;return t?t.rotate:null}},{key:"scale",get:function(){var e=this.state.page;if(!e)return null;var t=this.props,n=t.scale,r=t.width,o=t.height,i=this.rotate,a=1,s=null===n?1:n;if(r||o){var c=e.getViewport({scale:1,rotation:i});a=r?r/c.width:o/c.height}return s*a}},{key:"eventProps",get:function(){var e=this;return OQ(this.props,(function(){var t=e.state.page;return t?jQ(t,e.scale):t}))}},{key:"pageKey",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"@").concat(this.scale,"/").concat(this.rotate)}},{key:"pageKeyNoScale",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"/").concat(this.rotate)}},{key:"renderMainLayer",value:function(){var e=this.props,n=e.canvasRef;switch(e.renderMode){case"none":return null;case"svg":return t.createElement(x$,{key:"".concat(this.pageKeyNoScale,"_svg")});default:return t.createElement(v$,{key:"".concat(this.pageKey,"_canvas"),canvasRef:n})}}},{key:"renderTextLayer",value:function(){var e=this.props.renderTextLayer;return e?t.createElement(_$,{key:"".concat(this.pageKey,"_text")}):null}},{key:"renderAnnotationLayer",value:function(){var e=this.props.renderAnnotationLayer;return e?t.createElement(L$,{key:"".concat(this.pageKey,"_annotations")}):null}},{key:"renderChildren",value:function(){var e=this.props.children;return t.createElement(z$.Provider,{value:this.childContext},this.renderMainLayer(),this.renderTextLayer(),this.renderAnnotationLayer(),e)}},{key:"renderContent",value:function(){var e=this.pageNumber,n=this.props.pdf,r=this.state.page;if(!e){var o=this.props.noData;return t.createElement(qQ,{type:"no-data"},"function"===typeof o?o():o)}if(null===n||null===r){var i=this.props.loading;return t.createElement(qQ,{type:"loading"},"function"===typeof i?i():i)}if(!1===n||!1===r){var a=this.props.error;return t.createElement(qQ,{type:"error"},"function"===typeof a?a():a)}return this.renderChildren()}},{key:"render",value:function(){var e=this.pageNumber,n=this.props,r=n.className,o=n.inputRef;return t.createElement("div",c({className:gQ("react-pdf__Page",r),"data-page-number":e,ref:M$(o,this.pageElement),style:{position:"relative"}},this.eventProps),this.renderContent())}}]),r}(t.PureComponent);P$.defaultProps={error:"Failed to load the page.",loading:"Loading page\u2026",noData:"No page specified.",renderAnnotationLayer:!0,renderForms:!1,renderMode:"canvas",renderTextLayer:!0,scale:1};var B$=bE().oneOfType([bE().func,bE().node]);function X$(e,n){return t.createElement(xQ.Consumer,null,(function(r){return t.createElement(P$,c({ref:n},r,e))}))}P$.propTypes=T$(T$({},FQ),{},{canvasBackground:bE().string,children:bE().node,className:VQ,customTextRenderer:bE().func,error:B$,height:bE().number,imageResourcesPath:bE().string,inputRef:QQ,loading:B$,noData:B$,onGetTextError:bE().func,onGetTextSuccess:bE().func,onLoadError:bE().func,onLoadSuccess:bE().func,onRenderError:bE().func,onRenderSuccess:bE().func,pageIndex:function(e,t,n){var r=e[t],o=e.pageNumber,i=e.pdf;if(!_Q(i))return null;if(_Q(r)){if("number"!==typeof r)return new Error("`".concat(t,"` of type `").concat(ab(r),"` supplied to `").concat(n,"`, expected `number`."));if(r<0)return new Error("Expected `".concat(t,"` to be greater or equal to 0."));var a=i.numPages;if(r+1>a)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(a-1,"."))}else if(!_Q(o))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(n,"`."));return null},pageNumber:function(e,t,n){var r=e[t],o=e.pageIndex,i=e.pdf;if(!_Q(i))return null;if(_Q(r)){if("number"!==typeof r)return new Error("`".concat(t,"` of type `").concat(ab(r),"` supplied to `").concat(n,"`, expected `number`."));if(r<1)return new Error("Expected `".concat(t,"` to be greater or equal to 1."));var a=i.numPages;if(r>a)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(a,"."))}else if(!_Q(o))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(n,"`."));return null},pdf:KQ,registerPage:bE().func,renderAnnotationLayer:bE().bool,renderForms:bE().bool,renderInteractiveForms:bE().bool,renderMode:$Q,renderTextLayer:bE().bool,rotate:JQ,scale:bE().number,unregisterPage:bE().func,width:bE().number});var j$=t.forwardRef(X$);yQ(!CQ,"Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ".concat(PQ)),bQ.GlobalWorkerOptions.workerSrc="pdf.worker.js";var I$="undefined"!==typeof window?t.useLayoutEffect:t.useEffect;var D$=function(e,n,r,o){var i=(0,t.useRef)(n);I$((function(){i.current=n}),[n]),(0,t.useEffect)((function(){var t=(null===r||void 0===r?void 0:r.current)||window;if(t&&t.addEventListener){var n=function(e){return i.current(e)};return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}}),[e,r,o])};var F$=function(){var e=s((0,t.useState)(null),2),n=e[0],r=e[1],o=s((0,t.useState)({width:0,height:0}),2),i=o[0],a=o[1],c=(0,t.useCallback)((function(){a({width:(null===n||void 0===n?void 0:n.offsetWidth)||0,height:(null===n||void 0===n?void 0:n.offsetHeight)||0})}),[null===n||void 0===n?void 0:n.offsetHeight,null===n||void 0===n?void 0:n.offsetWidth]);return D$("resize",c),I$((function(){c()}),[null===n||void 0===n?void 0:n.offsetHeight,null===n||void 0===n?void 0:n.offsetWidth]),[r,i]};function H$(e){return Zf("MuiLoadingButton",e)}var V$,U$,G$=eh("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),Y$=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],K$=$f(tq,{shouldForwardProp:function(e){return function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e}(e)||"classes"===e},name:"MuiLoadingButton",slot:"Root",overridesResolver:function(e,t){return[t.root,t.startIconLoadingStart&&ne({},"& .".concat(G$.startIconLoadingStart),t.startIconLoadingStart),t.endIconLoadingEnd&&ne({},"& .".concat(G$.endIconLoadingEnd),t.endIconLoadingEnd)]}})((function(e){var t=e.ownerState,n=e.theme;return c(ne({},"& .".concat(G$.startIconLoadingStart,", & .").concat(G$.endIconLoadingEnd),{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}),"center"===t.loadingPosition&&ne({transition:n.transitions.create(["background-color","box-shadow","border-color"],{duration:n.transitions.duration.short})},"&.".concat(G$.loading),{color:"transparent"}),"start"===t.loadingPosition&&t.fullWidth&&ne({},"& .".concat(G$.startIconLoadingStart,", & .").concat(G$.endIconLoadingEnd),{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginRight:-8}),"end"===t.loadingPosition&&t.fullWidth&&ne({},"& .".concat(G$.startIconLoadingStart,", & .").concat(G$.endIconLoadingEnd),{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginLeft:-8}))})),Q$=$f("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:function(e,t){var n=e.ownerState;return[t.loadingIndicator,t["loadingIndicator".concat(Ef(n.loadingPosition))]]}})((function(e){var t=e.theme,n=e.ownerState;return c({position:"absolute",visibility:"visible",display:"flex"},"start"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{left:"small"===n.size?10:14},"start"===n.loadingPosition&&"text"===n.variant&&{left:6},"center"===n.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled},"end"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{right:"small"===n.size?10:14},"end"===n.loadingPosition&&"text"===n.variant&&{right:6},"start"===n.loadingPosition&&n.fullWidth&&{position:"relative",left:-10},"end"===n.loadingPosition&&n.fullWidth&&{position:"relative",right:-10})})),$$=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiLoadingButton"}),r=n.children,o=n.disabled,i=void 0!==o&&o,a=n.id,s=n.loading,l=void 0!==s&&s,p=n.loadingIndicator,u=n.loadingPosition,d=void 0===u?"center":u,b=n.variant,f=void 0===b?"text":b,h=Qe(n,Y$),M=cS(a),z=null!=p?p:(0,Cn.jsx)(Oh,{"aria-labelledby":M,color:"inherit",size:16}),O=c({},n,{disabled:i,loading:l,loadingIndicator:z,loadingPosition:d,variant:f}),m=function(e){var t=e.loading,n=e.loadingPosition,r=e.classes;return c({},r,Cf({root:["root",t&&"loading"],startIcon:[t&&"startIconLoading".concat(Ef(n))],endIcon:[t&&"endIconLoading".concat(Ef(n))],loadingIndicator:["loadingIndicator",t&&"loadingIndicator".concat(Ef(n))]},H$,r))}(O),g=l?(0,Cn.jsx)(Q$,{className:m.loadingIndicator,ownerState:O,children:z}):null;return(0,Cn.jsxs)(K$,c({disabled:i||l,id:M,ref:t},h,{variant:f,classes:m,ownerState:O,children:["end"===O.loadingPosition?r:g,"end"===O.loadingPosition?g:r]}))})),J$=$$,Z$=Bv(V$||(V$=Rf(["\n ","\n\n query GetEcReport($ec_md_grp_id: Int!) {\n ecReport(ec_md_grp_id: $ec_md_grp_id) {\n ...EcReportFields\n\n FILE_URL\n }\n }\n"])),HG);function eJ(e){var n=e.tabIndexAsString,r=e.ecMdGrpId,o=Wh(),i=(hz(o.breakpoints.down("tablet")),hz(o.breakpoints.up("laptop"))),a=Bg(Z$,{variables:{ec_md_grp_id:r},skip:!r}),c=a.loading,l=(a.error,a.data),p=null===l||void 0===l?void 0:l.ecReport,u=s((0,t.useState)(null),2),d=u[0],b=u[1],f=s(F$(),2),h=f[0],M=f[1],z=M.width,O=(M.height,(0,t.useMemo)((function(){return i?1e3:z}),[z,i])),m=s((0,t.useState)(!1),2),g=m[0],v=m[1],A=(0,t.useCallback)(lb(sb().mark((function e(){return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(!0);try{"Rapport EC.pdf",YK().saveAs(p.FILE_URL,"Rapport EC.pdf")}catch(t){}finally{v(!1)}case 2:case"end":return e.stop()}}),e)}))),[v,p]);return(0,Cn.jsxs)(uE,{value:n,children:[(0,Cn.jsx)(hA,{container:!0,spacing:4,alignItems:"flex-start",children:c?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px",width:"100%"},children:(0,Cn.jsx)(wh,{})}):p?(0,Cn.jsx)(Wf,{ref:h,sx:{width:"100%",height:"100%",overflow:"auto",display:"flex",justifyContent:"center"},children:(0,Cn.jsx)(o$,{file:p.FILE_URL,onLoadSuccess:function(e){var t=e.numPages;return b(t)},loading:(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px",width:"100%"},children:(0,Cn.jsx)(wh,{})}),children:Array.from(new Array(d),(function(e,t){return(0,Cn.jsx)(j$,{pageNumber:t+1,width:O,className:"pdf-viewer-page"},"page_".concat(t+1))}))})}):(0,Cn.jsx)(bW,{severity:"warning",children:"Le fichier EC n'est malheureusement pas disponible. Veuillez contacter notre \xe9quipe \xe0 l'adresse courriel it@fmparadis.com au besoin."})}),p&&(0,Cn.jsx)(Wf,{position:"fixed",bottom:50,right:50,children:(0,Cn.jsx)(SD,{title:"T\xe9l\xe9charger le rapport EC sous format PDF.",placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(J$,{variant:"contained",endIcon:(0,Cn.jsx)(KK,{fontSize:"small"}),color:"info",onClick:A,loading:g,children:"T\xe9l\xe9charger le rapport"})})})]})}var tJ,nJ=Bv(U$||(U$=Rf(["\n ","\n\n query GetDfReport($ec_md_grp_id: Int!) {\n dfReport(ec_md_grp_id: $ec_md_grp_id) {\n ...DfReportFields\n\n FILE_URL\n }\n }\n"])),VG);function rJ(e){var n=e.tabIndexAsString,r=e.ecMdGrpId,o=Wh(),i=(hz(o.breakpoints.down("tablet")),hz(o.breakpoints.up("laptop"))),a=Bg(nJ,{variables:{ec_md_grp_id:r},skip:!r}),c=a.loading,l=(a.error,a.data),p=null===l||void 0===l?void 0:l.dfReport,u=s((0,t.useState)(null),2),d=u[0],b=u[1],f=s(F$(),2),h=f[0],M=f[1],z=M.width,O=(M.height,(0,t.useMemo)((function(){return i?1e3:z}),[z,i])),m=s((0,t.useState)(!1),2),g=m[0],v=m[1],A=(0,t.useCallback)(lb(sb().mark((function e(){return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(!0);try{"Rapport DF.pdf",YK().saveAs(p.FILE_URL,"Rapport DF.pdf")}catch(t){}finally{v(!1)}case 2:case"end":return e.stop()}}),e)}))),[v,p]);return(0,Cn.jsxs)(uE,{value:n,children:[(0,Cn.jsx)(hA,{container:!0,spacing:4,alignItems:"flex-start",children:c?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px",width:"100%"},children:(0,Cn.jsx)(wh,{})}):p?(0,Cn.jsx)(Wf,{ref:h,sx:{width:"100%",height:"100%",overflow:"auto",display:"flex",justifyContent:"center"},children:(0,Cn.jsx)(o$,{file:p.FILE_URL,onLoadSuccess:function(e){var t=e.numPages;return b(t)},loading:(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px",width:"100%"},children:(0,Cn.jsx)(wh,{})}),children:Array.from(new Array(d),(function(e,t){return(0,Cn.jsx)(j$,{pageNumber:t+1,width:O,className:"pdf-viewer-page"},"page_".concat(t+1))}))})}):(0,Cn.jsx)(bW,{severity:"warning",children:"Le fichier DF n'est malheureusement pas disponible. Veuillez contacter notre \xe9quipe \xe0 l'adresse courriel it@fmparadis.com au besoin."})}),p&&(0,Cn.jsx)(Wf,{position:"fixed",bottom:50,right:50,children:(0,Cn.jsx)(SD,{title:"T\xe9l\xe9charger le rapport DF sous format PDF.",placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(J$,{variant:"contained",endIcon:(0,Cn.jsx)(KK,{fontSize:"small"}),color:"info",onClick:A,loading:g,children:"T\xe9l\xe9charger le rapport"})})})]})}var oJ,iJ,aJ=Bv(tJ||(tJ=Rf(["\n ","\n\n query GetPstReport($ec_md_grp_id: Int!, $pst_no: String!, $pst_mod: Int) {\n pstReport(ec_md_grp_id: $ec_md_grp_id, pst_no: $pst_no, pst_mod: $pst_mod) {\n ...PstReportFields\n\n FILE_URL\n }\n }\n"])),UG);function sJ(e){var n=e.tabIndexAsString,r=e.ecMdGrpId,o=e.pstNo,i=e.pstMod,a=Wh(),c=(hz(a.breakpoints.down("tablet")),hz(a.breakpoints.up("laptop"))),l=Bg(aJ,{variables:{ec_md_grp_id:r,pst_no:o,pst_mod:i},skip:!r||!o}),p=l.loading,u=(l.error,l.data),d=null===u||void 0===u?void 0:u.pstReport,b=s((0,t.useState)(null),2),f=b[0],h=b[1],M=s(F$(),2),z=M[0],O=M[1],m=O.width,g=(O.height,(0,t.useMemo)((function(){return c?1e3:m}),[m,c])),v=s((0,t.useState)(!1),2),A=v[0],y=v[1],x=(0,t.useCallback)(lb(sb().mark((function e(){var t;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(!0);try{t="Rapport sommaire - ".concat(d.pst,".pdf"),YK().saveAs(d.FILE_URL,t)}catch(n){}finally{y(!1)}case 2:case"end":return e.stop()}}),e)}))),[y,d]);return(0,Cn.jsxs)(uE,{value:n,children:[(0,Cn.jsx)(hA,{container:!0,spacing:4,alignItems:"flex-start",children:p?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px",width:"100%"},children:(0,Cn.jsx)(wh,{})}):(0,Cn.jsx)(Wf,{ref:z,sx:{width:"100%",height:"100%",overflow:"auto",display:"flex",justifyContent:"center"},children:(0,Cn.jsx)(o$,{file:d.FILE_URL,onLoadSuccess:function(e){var t=e.numPages;return h(t)},loading:(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px",width:"100%"},children:(0,Cn.jsx)(wh,{})}),children:Array.from(new Array(f),(function(e,t){return(0,Cn.jsx)(j$,{pageNumber:t+1,width:g,className:"pdf-viewer-page"},"page_".concat(t+1))}))})})}),(0,Cn.jsx)(Wf,{position:"fixed",bottom:50,right:50,children:(0,Cn.jsx)(SD,{title:"T\xe9l\xe9charger le rapport sommaire sous format PDF.",placement:"top",disableInteractive:!0,children:(0,Cn.jsx)(J$,{variant:"contained",endIcon:(0,Cn.jsx)(KK,{fontSize:"small"}),color:"info",onClick:x,loading:A,children:"T\xe9l\xe9charger le rapport"})})})]})}var cJ=Bv(oJ||(oJ=Rf(["\n query GetEcOverview($id: Int) {\n ecOverview(id: $id) {\n id\n licence\n grp\n ec_id\n fmp_id\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n grp_nom\n is_grp_inc\n total_brut\n total_deduction\n total_cotisation\n total_cotisation_cum\n total_transfert_grp\n interet_sur_recouvrement\n interet_sur_avance\n avances_remises\n avances_recouvrement\n interet_sur_solde_neg\n solde_reporte\n solde_a_reporte\n modif_de_solde\n paiement_recu_solde\n debut_interet_sur_solde_neg\n montant_net\n no_cheque_ou_virement\n mode_paiement\n }\n }\n"]))),lJ=Bv(iJ||(iJ=Rf(["\n ","\n\n query GetPstReports($ec_md_grp_id: Int!) {\n pstReports(ec_md_grp_id: $ec_md_grp_id) {\n ...PstReportFields\n\n FILE_URL\n }\n }\n"])),UG);function pJ(e){var t=e.ecMdGrpId,n=e.handleCloseEcDialog,r=Bg(cJ,{variables:{id:t},skip:!t}),o=r.loading,i=(r.error,r.data),a=null===i||void 0===i?void 0:i.ecOverview,s=Bg(lJ,{variables:{ec_md_grp_id:t},skip:!t}),c=s.loading,l=(s.error,s.data),p=null===l||void 0===l?void 0:l.pstReports,u=!!t,d=o||c;return(0,Cn.jsx)(YL,{fullScreen:!0,open:u,onClose:n,TransitionComponent:bJ,children:d?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px"},children:(0,Cn.jsx)(wh,{})}):(0,Cn.jsx)(dJ,{ecOverview:a,pstReports:p,handleCloseEcDialog:n})})}var uJ,dJ=function(e){var n=e.ecOverview,r=e.pstReports,o=e.handleCloseEcDialog,i=s(t.useState("ec-interactif"),2),a=i[0],c=i[1];if(!n)return(0,Cn.jsx)(Cn.Fragment,{});var l=n.id,p=(n.licence,n.grp),u=(n.ec_id,n.fmp_id,n.date_ec),d=(n.date_coupure,n.dd_periode_fact,n.df_periode_fact,n.no_paiement);n.grp_nom,n.is_grp_inc;return(0,Cn.jsxs)(NC,{value:a,children:[(0,Cn.jsx)(Xh,{sx:{position:"relative"},children:(0,Cn.jsxs)(Tm,{children:[(0,Cn.jsx)(Im,{edge:"start",color:"inherit",onClick:o,children:(0,Cn.jsx)(QK,{})}),(0,Cn.jsxs)(qh,{sx:{ml:2,flex:1},variant:"h6",component:"div",children:["\xc9tat de compte du ",ro()(u).format("LL")," (OR-",d,") - Groupe ",p]}),(0,Cn.jsx)(tq,{autoFocus:!0,color:"inherit",onClick:o,children:"Fermer"})]})}),(0,Cn.jsx)(Wf,{sx:{borderBottom:1,borderColor:"divider",mt:0},children:(0,Cn.jsxs)(z_,{onChange:function(e,t){c(t.toString())},variant:"scrollable",allowScrollButtonsMobile:!0,children:[(0,Cn.jsx)(EC,{label:"\xc9tat de compte interactif",value:"ec-interactif"}),(0,Cn.jsx)(EC,{label:"Rapport EC",value:"rapport-ec"}),(0,Cn.jsx)(EC,{label:"Rapport DF",value:"rapport-df"}),r.map((function(e,t){return(0,Cn.jsx)(EC,{label:"Rapport sommaire : poste ".concat(e.pst_no).concat(e.pst_mod?"-".concat(e.pst_mod):""),value:"rapport-sommaire-".concat(e.pst_no,"-").concat(e.pst_mod)},t)}))]})}),(0,Cn.jsx)(PL,{children:(0,Cn.jsx)(hA,{container:!0,children:(0,Cn.jsxs)(hA,{item:!0,xs:12,pt:1,px:4,children:[(0,Cn.jsx)(dQ,{tabIndexAsString:"ec-interactif",ecMdGrpId:l}),(0,Cn.jsx)(eJ,{tabIndexAsString:"rapport-ec",ecMdGrpId:l}),(0,Cn.jsx)(rJ,{tabIndexAsString:"rapport-df",ecMdGrpId:l}),r.map((function(e,t){return(0,Cn.jsx)(sJ,{tabIndexAsString:"rapport-sommaire-".concat(e.pst_no,"-").concat(e.pst_mod),ecMdGrpId:l,pstNo:e.pst_no,pstMod:e.pst_mod},t)}))]})})})]})},bJ=t.forwardRef((function(e,t){return(0,Cn.jsx)(ez,oe({direction:"up",ref:t},e))})),fJ=Bv(uJ||(uJ=Rf(["\n query GetEcOverviews {\n ecOverviews {\n id\n licence\n grp\n ec_id\n fmp_id\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n grp_nom\n is_grp_inc\n total_brut\n total_deduction\n total_cotisation\n total_cotisation_cum\n total_transfert_grp\n interet_sur_recouvrement\n interet_sur_avance\n avances_remises\n avances_recouvrement\n interet_sur_solde_neg\n solde_reporte\n solde_a_reporte\n modif_de_solde\n paiement_recu_solde\n debut_interet_sur_solde_neg\n montant_net\n no_cheque_ou_virement\n mode_paiement\n }\n }\n"]))),hJ=[(0,Cn.jsx)(qh,{fontSize:15,children:"EC"},"1")];function MJ(){P();var e=Wh(),n=hz(e.breakpoints.down("tablet")),r=hz(e.breakpoints.up("laptop")),o=Bg(fJ,{}),i=o.loading,a=(o.error,o.data),c=s((0,t.useState)(null),2),l=c[0],p=c[1],u=(0,t.useCallback)((function(e){p(e)}),[]),d=(0,t.useCallback)((function(){p(null)}),[]),b=s((0,t.useState)([]),2),f=b[0],h=b[1],M=(0,t.useCallback)(function(){var e=lb(sb().mark((function e(t,n,r,o){var i,a;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h([].concat(Le(f),[t])),e.prev=1,e.next=4,gc.get("storage/ec-files",{responseType:"blob",timeout:2e4,params:{ec_md_grp_id:t}});case 4:i=e.sent,a="".concat(ro()(n).year(),"-").concat(r,"__").concat(o,".zip"),YK().saveAs(i.data,a),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:return e.prev=11,h(f.filter((function(e){return e===t}))),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,9,11,14]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),[h,f]),z=(0,t.useMemo)((function(){return function(e,t,n,r){return[{field:"no_paiement",headerName:"No. OR",valueGetter:function(e){var t=e.value;return"OR-".concat(t)},width:70,headerAlign:"center",align:"center"},oe({field:"date_ec",headerName:"Date EC",valueGetter:function(e){var t=e.value;return ro()(t).format(oa)}},YV),oe({field:"date_coupure",headerName:"Date coupure",valueGetter:function(e){var t=e.value;return ro()(t).format(oa)}},YV),{field:"grp",headerName:"Groupe",width:100,headerAlign:"center",align:"center"},{field:"grp_nom",headerName:"Nom Groupe",minWidth:200,flex:1},{field:"montant_net",headerName:"Montant net vers\xe9",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")},headerAlign:"center",align:"right",width:125},{field:"total_brut",headerName:"Montant brut",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")},headerAlign:"center",align:"right",width:125},{field:"total_deduction",headerName:"D\xe9ductions",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")},headerAlign:"center",align:"right",width:125},{field:"total_cotisation",headerName:"Cotisations",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")},headerAlign:"center",align:"right",width:125},{field:"total_transfert_grp",headerName:"Transferts groupe",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")},headerAlign:"center",align:"right",width:125},{field:"no_cheque_ou_virement",headerName:"No. paiement",width:100,align:"center"},{field:"mode_paiement",headerName:"Mode paiement",valueGetter:function(e){var t=e.value;return"V"===t?"Virement":"C"===t?"Ch\xe8que":"N/A"},width:130,align:"center"},{field:"actions",headerName:"Actions",width:r?60:80,headerAlign:"center",align:"center",renderCell:function(e){var o=e.row,i=o.id,a=(o.ec_id,o.date_ec),s=o.no_paiement,c=o.grp,l=n.includes(i);return(0,Cn.jsxs)(Wf,{display:"flex",alignItems:"center",children:[l?(0,Cn.jsx)(Im,{size:"medium",color:"primary",disabled:!0,children:(0,Cn.jsx)(Oh,{size:14})}):(0,Cn.jsx)(SD,{title:"T\xe9l\xe9charger les documents de l'\xe9tat de compte.",placement:"left",disableInteractive:!0,children:(0,Cn.jsx)(Im,{size:"medium",color:"primary",onClick:function(){t(i,a,s,c)},children:(0,Cn.jsx)(KK,{fontSize:"small"})})}),!r&&(0,Cn.jsx)(SD,{title:"L'\xe9tat de compte int\xe9ractif sera disponible au courant des prochaines semaines!",disableInteractive:!0,children:(0,Cn.jsx)(Im,{size:"medium",color:"info",onClick:function(){},children:(0,Cn.jsx)(zK,{sx:{fontSize:15,mt:-.3}})})})]})}}]}(0,M,f,n)}),[u,M,f,n]),O=s(t.useState(15),2),m=O[0],g=O[1];return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"600",children:"\xc9tats de comptes"}),(0,Cn.jsx)(EW,{separator:(0,Cn.jsx)(iE,{fontSize:"small"}),sx:{mt:.5,mb:{mobile:2,tablet:3,desktop:4}},children:hJ}),(0,Cn.jsx)(IV,{getRowId:function(e){return cY()},rows:(null===a||void 0===a?void 0:a.ecOverviews)||[],columns:z,pagination:!0,pageSize:m,onPageSizeChange:function(e){return g(e)},rowsPerPageOptions:sU,autoHeight:!0,disableSelectionOnClick:!0,pinnedColumns:oe({right:["actions"]},r?{left:["no_paiement"]}:{}),initialState:{sorting:{sortModel:[{field:"date_ec",sort:"desc"},{field:"grp",sort:"desc"}]}},loading:i,components:{LoadingOverlay:pU}}),(0,Cn.jsx)(pJ,{ecMdGrpId:l,handleCloseEcDialog:d})]})}function zJ(e){return Zf("MuiPickerStaticWrapper",e)}eh("MuiPickerStaticWrapper",["root","content"]);var OJ=["displayStaticWrapperAs","onAccept","onClear","onCancel","onDismiss","onSetToday","open","children","components","componentsProps"],mJ=$f("div",{name:"MuiPickerStaticWrapper",slot:"Root",overridesResolver:function(e,t){return t.root}})({display:"flex",flexDirection:"column"}),gJ=$f("div",{name:"MuiPickerStaticWrapper",slot:"Content",overridesResolver:function(e,t){return t.content}})((function(e){return{overflow:"hidden",minWidth:320,display:"flex",flexDirection:"column",backgroundColor:e.theme.palette.background.paper}}));function vJ(e){var n,r=wn({props:e,name:"MuiPickerStaticWrapper"}),o=r.displayStaticWrapperAs,i=r.onAccept,a=r.onClear,s=r.onCancel,l=r.onSetToday,p=r.children,u=r.components,d=r.componentsProps,b=Qe(r,OJ),f=Cf({root:["root"],content:["content"]},zJ,r.classes),h=null!=(n=null==u?void 0:u.ActionBar)?n:Z_,M=(null==u?void 0:u.PaperContent)||t.Fragment;return(0,Cn.jsx)(U_.Provider,{value:o,children:(0,Cn.jsxs)(mJ,c({className:f.root},b,{children:[(0,Cn.jsx)(gJ,{className:f.content,children:(0,Cn.jsx)(M,c({},null==d?void 0:d.paperContent,{children:p}))}),(0,Cn.jsx)(h,c({onAccept:i,onClear:a,onCancel:s,onSetToday:l,actions:"desktop"===o?[]:["cancel","accept"]},null==d?void 0:d.actionBar))]}))})}var AJ,yJ,xJ=["ToolbarComponent","value","onChange","displayStaticWrapperAs","components","componentsProps"],qJ=t.forwardRef((function(e,t){var n=W_(e,"MuiStaticDatePicker"),r=n.ToolbarComponent,o=void 0===r?V_:r,i=n.displayStaticWrapperAs,a=void 0===i?"mobile":i,s=n.components,l=n.componentsProps,p=Qe(n,xJ),u=RL(n,R_),d=u.pickerProps,b=u.inputProps,f=u.wrapperProps,h=c({},b,p,{ref:t,validationError:null!==ik(n),components:s});return(0,Cn.jsx)(vJ,c({displayStaticWrapperAs:a,components:s,componentsProps:l},f,{children:(0,Cn.jsx)(WL,c({},d,{toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:o,DateInputProps:h,components:s,componentsProps:l},p))}))})),wJ=cm((0,Cn.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos"),WJ=cm((0,Cn.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos"),RJ=Bv(AJ||(AJ=Rf(["\n fragment FactLigneFields on FactLigne {\n ligneno\n nce\n revision\n rank\n mdgrppstno\n typelmfact\n codefact\n datefact\n coderole\n debutelmfact\n finelmfact\n coderef\n mntprelim\n mntfinal\n statrecv\n }\n"]))),CJ=Bv(yJ||(yJ=Rf(["\n ","\n\n query GetFacturesDaily($date_service: Date, $poste_id: String) {\n facturesDaily(date_service: $date_service, poste_id: $poste_id) {\n created_at\n nce\n nci\n revision\n reqt_id\n licence\n poste_id\n poste_nom\n poste_mod\n jeton\n statut_recv\n is_canceled\n lot_id\n ec_id\n date_service\n date_dernier_paiement\n payment_status\n\n type_service_id\n type_service_nom\n type_service_abbrev\n\n total_prelim\n total_final\n total_diff\n\n line_count\n\n patient_nam\n\n PAYMENT_STATUS_NAME\n\n FactLignes {\n ...FactLigneFields\n }\n }\n }\n"])),RJ);function _J(e){var t=e.tabIndexAsString,n=e.factures,r=[].concat(SJ);r.forEach((function(e){e.tableRows.forEach((function(e){e.name,e.desc;var t=e.codes,r=0,o=0;n.forEach((function(e){e.FactLignes.map((function(e){var n=e.codefact,i=e.mntprelim,a=e.mntfinal;t.map((function(e){return parseInt(e)})).includes(n)&&(r+=i,o+=a)}))}),0),e.totalPrelim=r,e.totalFinal=o}))}));return(0,Cn.jsx)(uE,{value:t,children:(0,Cn.jsx)(hA,{container:!0,spacing:4,alignItems:"flex-start",children:[1,2].map((function(e,t){return(0,Cn.jsx)(hA,{item:!0,xs:6,container:!0,spacing:4,children:r.filter((function(e){return e.column===t})).map((function(e,t){var n=e.tableName,r=e.tableRows;return(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(mU,{component:Lh,sx:{borderBottom:0,borderColor:"primary.main"},elevation:3,children:(0,Cn.jsxs)(qU,{size:"small",children:[(0,Cn.jsxs)(kU,{children:[(0,Cn.jsx)(BU,{sx:function(e){return{bgcolor:Gt(e.palette.primary.main,.2)}},children:(0,Cn.jsx)(JF,{colSpan:4,sx:{},children:(0,Cn.jsx)(qh,{variant:"h6",color:"white",fontWeight:500,children:n})})}),(0,Cn.jsxs)(BU,{children:[(0,Cn.jsx)(JF,{children:"Codes"}),(0,Cn.jsx)(JF,{align:"right",children:"Description"}),(0,Cn.jsx)(JF,{align:"right",children:"Montant pr\xe9lim"}),(0,Cn.jsx)(JF,{align:"right",children:"Montant final"})]})]}),(0,Cn.jsx)(wG,{children:r.map((function(e,t){var n=e.name,r=(e.desc,e.codes),o=e.totalPrelim,i=e.totalFinal;return(0,Cn.jsxs)(BU,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Cn.jsx)(JF,{component:"th",scope:"row",children:r.join(", ")}),(0,Cn.jsx)(JF,{align:"right",children:n}),(0,Cn.jsxs)(JF,{align:"right",sx:{color:0==o?"warning.main":o>0?"secondary.main":"error.main",fontWeight:o>0?"900":"normal"},width:135,children:[Ds(o)," $"]}),(0,Cn.jsxs)(JF,{align:"right",sx:{color:0==i?"warning.main":i>0?"secondary.main":"error.main",fontWeight:i>0?"900":"normal"},width:135,children:[Ds(i)," $"]})]},t)}))})]})})},t)}))},t)}))})})}var SJ=[{tableName:"Frais de Cabinet",column:0,tableRows:[{name:"Entre 6 et 11 patients inscrits",desc:"",codes:["19928"],totalPrelim:0,totalFinal:0},{name:"12 patients et plus inscrits",desc:"",codes:["19929"],totalPrelim:0,totalFinal:0}]},{tableName:"Forfaits Trimestriels DM\xc9",column:1,tableRows:[{name:"\xc9quipement et frais accessoires",desc:"",codes:["19976"],totalPrelim:0,totalFinal:0},{name:"Lien Internet et commutateur",desc:"",codes:["19977"],totalPrelim:0,totalFinal:0},{name:"DME GMF ou Hors GMF",desc:"",codes:["19978"],totalPrelim:0,totalFinal:0},{name:"DME GMF-R",desc:"",codes:["19979"],totalPrelim:0,totalFinal:0}]},{tableName:"Forfaits Trimestriels",column:1,tableRows:[{name:"Forfait trimestriel obst\xe9trique",desc:"",codes:["09776"],totalPrelim:0,totalFinal:0},{name:"Forfait trimestriel CHSLD (patients)",desc:"",codes:["42138"],totalPrelim:0,totalFinal:0},{name:"Forfait trimestriel CHSLD (md responsable)",desc:"",codes:["42139"],totalPrelim:0,totalFinal:0}]},{tableName:"Forfait HUB & Acc\xe8s \xe0 service de premi\xe8re ligne",column:0,tableRows:[{name:"Familiarisation",desc:"",codes:["19966"],totalPrelim:0,totalFinal:0},{name:"Forfait GAP",desc:"",codes:["42251"],totalPrelim:0,totalFinal:0},{name:"Forfait acc\xe8s en temps opportun",desc:"",codes:["42252"],totalPrelim:0,totalFinal:0}]},{tableName:"Forfaits Mensuels IPS - Facturation en cabinet",column:0,tableRows:[{name:"IPS",desc:"",codes:["19948"],totalPrelim:0,totalFinal:0},{name:"IPS",desc:"",codes:["19949"],totalPrelim:0,totalFinal:0},{name:"IPS",desc:"",codes:["19950"],totalPrelim:0,totalFinal:0}]},{tableName:"Forfaits Administratifs",column:0,tableRows:[{name:"Forfait chef urgence",desc:"",codes:["19040"],totalPrelim:0,totalFinal:0},{name:"Forfait chef d\xe9partement",desc:"",codes:["19064","09752","13043"],totalPrelim:0,totalFinal:0},{name:"Forfait coordonnateur",desc:"",codes:["19103"],totalPrelim:0,totalFinal:0},{name:"Forfait responsable GMF",desc:"",codes:["19017","09750"],totalPrelim:0,totalFinal:0},{name:"Activit\xe9s de fonctionnement en GMF",desc:"",codes:["72101"],totalPrelim:0,totalFinal:0},{name:"Forfait m\xe9decin responsable GMF",desc:"",codes:["19895","09751"],totalPrelim:0,totalFinal:0},{name:"Forfait m\xe9decin responsable GMF-U",desc:"",codes:["19909"],totalPrelim:0,totalFinal:0}]},{tableName:"Forfaits de Supervision",column:1,tableRows:[{name:"R\xe9sident",desc:"",codes:["19910"],totalPrelim:0,totalFinal:0},{name:"R\xe9sident",desc:"",codes:["19911"],totalPrelim:0,totalFinal:0},{name:"R\xe9sident",desc:"",codes:["19912"],totalPrelim:0,totalFinal:0},{name:"Externe",desc:"",codes:["19913"],totalPrelim:0,totalFinal:0},{name:"Externe",desc:"",codes:["19914"],totalPrelim:0,totalFinal:0},{name:"Externe",desc:"",codes:["19915"],totalPrelim:0,totalFinal:0},{name:"R\xe9sident",desc:"",codes:["19918"],totalPrelim:0,totalFinal:0},{name:"Externe",desc:"",codes:["19921"],totalPrelim:0,totalFinal:0},{name:"IPS",desc:"",codes:["19922"],totalPrelim:0,totalFinal:0},{name:"IPS",desc:"",codes:["19923"],totalPrelim:0,totalFinal:0},{name:"IPS",desc:"",codes:["19924"],totalPrelim:0,totalFinal:0},{name:"IPS",desc:"",codes:["19925"],totalPrelim:0,totalFinal:0},{name:"IPS",desc:"",codes:["19926"],totalPrelim:0,totalFinal:0},{name:"IPS",desc:"",codes:["19927"],totalPrelim:0,totalFinal:0}]}];function kJ(e){return Zf("MuiFormGroup",e)}eh("MuiFormGroup",["root","row","error"]);var LJ=["className","row"],EJ=$f("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.row&&t.row]}})((function(e){return c({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.ownerState.row&&{flexDirection:"row"})})),TJ=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiFormGroup"}),r=n.className,o=n.row,i=void 0!==o&&o,a=Qe(n,LJ),s=c({},n,{row:i,error:qA({props:n,muiFormControl:WA(),states:["error"]}).error}),l=function(e){var t=e.classes;return Cf({root:["root",e.row&&"row",e.error&&"error"]},kJ,t)}(s);return(0,Cn.jsx)(EJ,c({className:ub(l.root,r),ownerState:s,ref:t},a))})),NJ=TJ;function PJ(e){var n=e.tabIndexAsString,r=e.factures,o=e.patients_count,i=e.total_prelim,a=e.total_final,c=e.date_service,l=Wh(),p=s(t.useState([]),2),u=p[0],d=p[1],b=t.useCallback((function(e){d(e)}),[]),f=s(t.useState(!1),2),h=f[0],M=f[1],z=(0,t.useMemo)((function(){return[oe({field:"nce",headerName:"NCE",valueGetter:function(e){var t=e.value,n=e.row;return"".concat(t,"__").concat(n.revision)}},QV),oe({field:"date_service",headerName:"Date service",valueGetter:function(e){var t=e.value;return t?ro()(t).format(oa):null}},YV),oe(oe({field:"patient_nam",headerName:"NAM"},$V),{},{renderCell:function(e){var t=e.value;return(0,Cn.jsxs)(Cn.Fragment,{children:[t,(0,Cn.jsx)(VV,{nam:t,sx:{ml:1}})]})}}),oe({field:"poste_nom",headerName:"Poste",valueGetter:function(e){var t=e.value,n=e.row;return t&&"".concat(t," (").concat(n.poste_id,")")}},JV),oe({field:"total_prelim",headerName:"Montant pr\xe9lim.",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")}},eU),oe({field:"total_final",headerName:"Montant final",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t)," $")}},eU),oe(oe({},eU),{},{field:"total_diff",headerName:"Diff\xe9rence",renderCell:function(e){var t=e.value;if("paid"!==e.row.payment_status)return(0,Cn.jsx)(Cn.Fragment,{});var n="";n=t>0?"success.main":0===t?"warning.main":t<0?"error.main":"success.main";var r=t>0?"+ ":t<0?"- ":"";return r+=Ds(Math.abs(t)),(0,Cn.jsx)(qh,{variant:"body2",sx:{color:n},children:r})}}),oe(oe({field:"PAYMENT_STATUS_NAME",headerName:"Statut paiement"},tU),{},{renderCell:function(e){var t=e.value,n="success";switch(e.row.payment_status){case"canceled":n="error";break;case"payable":n="warning";break;case"paid":n="success"}var r=t;return(0,Cn.jsx)(tq,{variant:"text",color:n,children:r})}}),oe({field:"line_count",headerName:"Nb. d'actes"},nU),{field:"actions",headerName:"Actions",width:100,headerAlign:"center",align:"center",renderCell:function(e){var t=e.row;return t.nce,t.revision,(0,Cn.jsx)(Cn.Fragment,{children:(0,Cn.jsx)(SD,{title:"La page du d\xe9taill\xe9 complet d'une r\xe9clamation sera disponible au courant des prochaines semaines!",disableInteractive:!0,children:(0,Cn.jsx)(Im,{size:"small",color:"primary",onClick:function(){return null},children:(0,Cn.jsx)(DV,{fontSize:"small"})})})})}}]}),[]);return(0,Cn.jsx)(uE,{value:n,children:(0,Cn.jsxs)(hA,{container:!0,spacing:3,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,sm:4,lg:3,children:(0,Cn.jsxs)(qh,{variant:"h6",fontWeight:500,children:["Nombre de patients vus: ",o]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:4,lg:3,children:(0,Cn.jsxs)(qh,{variant:"h6",fontWeight:500,children:["Montant pr\xe9liminaire: ",Ds(i)," $"]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:4,lg:3,children:(0,Cn.jsxs)(qh,{variant:"h6",fontWeight:500,children:["Montant final: ",Ds(a)," $"]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:3,display:"flex",sx:function(e){return ne({},e.breakpoints.up("lg"),{justifyContent:"flex-end"})},children:(0,Cn.jsx)(NJ,{children:(0,Cn.jsx)(wx,{control:(0,Cn.jsx)(mD,{checked:h,onChange:function(e){var t=e.target.checked;M(t),d(t?r.map((function(e){return e.reqt_id})):[])}}),label:"D\xe9velopper toutes les factures"})})}),(0,Cn.jsx)(hA,{item:!0,xs:12,mb:-1,children:(0,Cn.jsx)(qh,{sx:{color:"info.main"},children:"** Pour afficher le d\xe9tail d'une facture, veuillez cliquer sur la fl\xe8che \xe0 la gauche de la date de service."})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(IV,{getRowId:function(e){return e.reqt_id},rows:r,columns:z,autoHeight:!0,disableSelectionOnClick:!0,rowThreshold:0,getDetailPanelContent:function(e){return(0,Cn.jsx)($G,{daily:!0,date_service:c,params:e,containerSx:{bgcolor:"rgb(230,230,230)"},tableRowSx:{bgcolor:Gt(l.palette.primary.main,.2)},tableRowTextColor:"white"})},getDetailPanelHeight:t.useCallback((function(e){return 72.92+40.81*e.row.FactLignes.length+32+20}),[]),detailPanelExpandedRowIds:u,onDetailPanelExpandedRowIdsChange:b,components:{LoadingOverlay:pU,DetailPanelExpandIcon:t.useCallback((function(){return(0,Cn.jsx)(cU,{color:"info"})}),[]),DetailPanelCollapseIcon:t.useCallback((function(){return(0,Cn.jsx)(lU,{color:"info"})}),[])}})})]})})}function BJ(e){var t=e.date_service,n=e.poste_id,r=e.patients_count,o=e.total_prelim,i=e.total_final,a=e.handleCloseDialog,s=Bg(CJ,{variables:{date_service:t,poste_id:n},skip:!t||!n}),c=s.loading,l=(s.error,s.data),p=null===l||void 0===l?void 0:l.facturesDaily,u=!(!t||!n);return(0,Cn.jsx)(YL,{fullWidth:!0,maxWidth:"xl",open:u,onClose:a,children:c||!t?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px"},children:(0,Cn.jsx)(wh,{})}):(0,Cn.jsx)(FJ,{factures:p,date_service:t,poste_id:n,patients_count:r,total_prelim:o,total_final:i,handleCloseDialog:a})})}var XJ,jJ,IJ,DJ,FJ=function(e){var n=e.factures,r=e.date_service,o=e.poste_id,i=e.patients_count,a=e.total_prelim,c=e.total_final,l=e.handleCloseDialog,p=s(t.useState("facturation"),2),u=p[0],d=p[1];return n?(0,Cn.jsxs)(NC,{value:u,children:[(0,Cn.jsxs)(MK,{children:["D\xe9tails de facturation du ",ro()(r).format("LL")," (Poste #",o,")",(0,Cn.jsx)(Wf,{sx:{borderBottom:1,borderColor:"divider",mt:4},children:(0,Cn.jsxs)(z_,{onChange:function(e,t){d(t.toString())},variant:"scrollable",allowScrollButtonsMobile:!0,children:[(0,Cn.jsx)(EC,{label:"R\xe9clamations",value:"facturation"}),(0,Cn.jsx)(EC,{label:"D\xe9tails forfaits",value:"forfait"})]})})]}),(0,Cn.jsx)(PL,{children:(0,Cn.jsx)(hA,{container:!0,children:(0,Cn.jsxs)(hA,{item:!0,xs:12,sx:{},children:[(0,Cn.jsx)(PJ,{tabIndexAsString:"facturation",factures:n,patients_count:i,total_prelim:a,total_final:c,date_service:r}),(0,Cn.jsx)(_J,{tabIndexAsString:"forfait",factures:n}),(0,Cn.jsx)(uE,{value:"horaire",children:"TODO HORAIRE"}),(0,Cn.jsx)(uE,{value:"patient",children:"TODO PATIENT"})]})})}),(0,Cn.jsx)($_,{children:(0,Cn.jsx)(tq,{onClick:l,children:"Fermer"})})]}):(0,Cn.jsx)(Cn.Fragment,{})},HJ=Bv(XJ||(XJ=Rf(["\n ","\n ","\n ","\n\n query GetFactVac($reqt_id: Int) {\n factVac(reqt_id: $reqt_id) {\n ...FactVacViewFields\n\n FactLignesVac {\n ...FactLigneVacFields\n\n FactLigneVacDetails {\n ...FactLigneVacDetailsFields\n }\n }\n }\n }\n"])),GG,SG,kG),VJ=function(e){var t=e.reqt_id,n=e.handleCloseDialog,r=Bg(HJ,{variables:{reqt_id:t},skip:!t}),o=r.loading,i=(r.error,r.data),a=null===i||void 0===i?void 0:i.factVac,s=!!t;return(0,Cn.jsx)(YL,{fullWidth:!0,maxWidth:"xl",open:s,onClose:n,children:o||!t?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px"},children:(0,Cn.jsx)(wh,{})}):(0,Cn.jsx)(UJ,{factVac:a,handleCloseDialog:n})})},UJ=function(e){var n=e.factVac,r=e.handleCloseDialog,o=s(t.useState("facturation"),2),i=o[0];o[1];if(!n)return(0,Cn.jsx)(Cn.Fragment,{});n.created_at,n.nce,n.revision,n.reqt_id,n.licence;var a=n.pst_no,c=(n.pst_mod,n.pst_name),l=(n.statut_recv,n.is_canceled,n.lot_id,n.fmp_ec_id,n.ec_id,n.debut_periode),p=n.fin_periode,u=n.hrs_activite,d=n.mins_activite,b=(n.cs1,n.cs2,n.nom_mand),f=n.date_mand,h=n.nom_sign,M=n.date_sign,z=n.once,O=n.attestation,m=(n.pst_depart,n.pst_arrivee,n.dh_arrivee,n.hrs_depl,n.mins_depl,n.kms_depl,n.montant_transport_reclame,n.date_service_min,n.date_service_max,n.date_service_agg,n.payment_status,n.ec_1717ig_agg,n.hrs_activite_payes),g=n.total_remu_activite,v=(n.hrs_depl_payes,n.total_remu_temps_depl,n.kms_transport_payes,n.total_remu_cout_transport,n.total_remu,n.line_count,n.PAYMENT_STATUS_NAME,n.FactLignesVac);return(0,Cn.jsxs)(NC,{value:i,children:[(0,Cn.jsxs)(MK,{children:["Demande #",z," (No. Attestation : ",O,")"]}),(0,Cn.jsxs)(PL,{children:[(0,Cn.jsx)(hA,{container:!0,rowSpacing:4,mt:0,children:(0,Cn.jsxs)(hA,{item:!0,xs:12,children:[(0,Cn.jsxs)(qh,{variant:"h5",fontWeight:600,textAlign:"center",children:["Semaine du ",ro()(l).format(oa)," au"," ",ro()(p).format(oa)]}),(0,Cn.jsxs)(qh,{variant:"body2",textAlign:"center",mt:1,children:[c," (",a,")"]})]})}),(0,Cn.jsx)(hA,{container:!0,mt:5,children:(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(mU,{component:Lh,sx:{borderBottom:0,borderColor:"primary.main"},elevation:3,children:(0,Cn.jsxs)(qU,{size:"small",children:[(0,Cn.jsxs)(kU,{children:[(0,Cn.jsx)(BU,{sx:function(e){return{bgcolor:Gt(e.palette.primary.main,.2)}},children:(0,Cn.jsx)(JF,{colSpan:16,align:"center",children:(0,Cn.jsx)(qh,{variant:"body1",fontWeight:500,color:"primary.contrastText",children:"Activit\xe9s r\xe9clam\xe9es"})})}),(0,Cn.jsxs)(BU,{children:[(0,Cn.jsx)(JF,{align:"center",colSpan:2}),(0,Cn.jsx)(JF,{align:"center",colSpan:4,sx:oe({},GJ),children:"P\xe9riode"}),(0,Cn.jsx)(JF,{align:"center",colSpan:3,sx:oe({},GJ),children:"Activit\xe9 1"}),(0,Cn.jsx)(JF,{align:"center",colSpan:3,sx:oe({},GJ),children:"Activit\xe9 2"}),(0,Cn.jsx)(JF,{align:"center",colSpan:3,sx:oe({},GJ),children:"Activit\xe9 3"})]}),(0,Cn.jsxs)(BU,{children:[(0,Cn.jsx)(JF,{width:80,children:"Date"}),(0,Cn.jsx)(JF,{width:40,align:"center",sx:oe({},GJ),children:"Mode r\xe9mu."}),(0,Cn.jsx)(JF,{width:40,align:"center",sx:oe({},GJ),children:"AM"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"PM"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"Soir"}),(0,Cn.jsx)(JF,{width:40,align:"center",children:"Nuit"}),(0,Cn.jsx)(JF,{width:80,sx:oe({},GJ),children:"Code"}),(0,Cn.jsx)(JF,{width:80,align:"center",children:"Secteur"}),(0,Cn.jsx)(JF,{width:80,align:"right",children:"Heures"}),(0,Cn.jsx)(JF,{width:80,sx:oe({},GJ),children:"Code"}),(0,Cn.jsx)(JF,{width:80,align:"center",children:"Secteur"}),(0,Cn.jsx)(JF,{width:80,align:"right",children:"Heures"}),(0,Cn.jsx)(JF,{width:80,sx:oe({},GJ),children:"Code"}),(0,Cn.jsx)(JF,{width:80,align:"center",children:"Secteur"}),(0,Cn.jsx)(JF,{width:80,align:"right",children:"Heures"})]})]}),(0,Cn.jsxs)(wG,{children:[Le(v).sort((function(e,t){return e.rank-t.rank})).map((function(e,t){e.lineno;var n=e.linedt,r=e.moderem,o=e.nuit,i=e.am,a=e.pm,s=e.soir,c=e.FactLigneVacDetails,l=c[0]||null,p=c[1]||null,u=c[2]||null;return(0,Cn.jsxs)(BU,{hover:!0,children:[(0,Cn.jsx)(JF,{children:n?ro()(n).format(oa):""}),(0,Cn.jsx)(JF,{align:"center",sx:oe({},GJ),children:r}),(0,Cn.jsx)(JF,{align:"center",sx:oe({},GJ),children:(0,Cn.jsx)(hY,{value:i})}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:a})}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:s})}),(0,Cn.jsx)(JF,{align:"center",children:(0,Cn.jsx)(hY,{value:o})}),(0,Cn.jsx)(JF,{align:"left",sx:oe({},GJ),children:l&&l.code}),(0,Cn.jsx)(JF,{align:"center",children:l&&l.sd}),(0,Cn.jsx)(JF,{align:"right",children:l&&Vs(l.hr,l.min)}),(0,Cn.jsx)(JF,{align:"left",sx:oe({},GJ),children:p&&p.code}),(0,Cn.jsx)(JF,{align:"center",children:p&&p.sd}),(0,Cn.jsx)(JF,{align:"right",children:p&&Vs(p.hr,p.min)}),(0,Cn.jsx)(JF,{align:"left",sx:oe({},GJ),children:u&&u.code}),(0,Cn.jsx)(JF,{align:"center",children:u&&u.sd}),(0,Cn.jsx)(JF,{align:"right",children:u&&Vs(u.hr,u.min)})]},t)})),(0,Cn.jsxs)(BU,{children:[(0,Cn.jsx)(JF,{colSpan:10,rowSpan:5}),(0,Cn.jsxs)(JF,{colSpan:3,sx:{pt:3,pb:1},children:[(0,Cn.jsx)(qh,{variant:"body1",color:"primary",children:"Heures r\xe9clam\xe9es:"}),(0,Cn.jsx)(qh,{variant:"body1",color:"primary",children:"Heures pay\xe9es:"})]}),(0,Cn.jsxs)(JF,{colSpan:2,align:"right",sx:{pt:3,pb:1},children:[(0,Cn.jsxs)(qh,{variant:"body1",color:"primary",children:[Vs(u,d)," h"]}),(0,Cn.jsxs)(qh,{variant:"body1",color:"primary",children:[Ds(m)," h"]})]})]}),(0,Cn.jsx)(BU,{sx:{borderTopStyle:"hidden"},children:(0,Cn.jsx)(JF,{colSpan:5,sx:{pt:1,pb:1},children:(0,Cn.jsxs)(tQ,{direction:"row",justifyContent:"space-between",sx:function(e){return{borderTop:"1px solid",borderTopColor:e.palette.divider}},pt:2,children:[(0,Cn.jsx)(Wf,{children:(0,Cn.jsx)(qh,{variant:"body1",fontWeight:500,sx:function(e){return{color:e.palette.pink1Dark.main}},children:"Montant pay\xe9:"})}),(0,Cn.jsx)(Wf,{children:(0,Cn.jsxs)(qh,{variant:"body1",fontWeight:500,sx:function(e){return{color:e.palette.pink1Dark.main}},children:[Ds(g)," $"]})})]})})})]})]})})})}),(0,Cn.jsxs)(hA,{container:!0,rowSpacing:4,columnSpacing:4,mt:1.5,justifyContent:"space-between",children:[(0,Cn.jsx)(hA,{item:!0,xs:4,children:(0,Cn.jsx)(mU,{component:Lh,sx:{borderBottom:0,borderColor:"primary.main"},elevation:3,children:(0,Cn.jsxs)(qU,{size:"small",children:[(0,Cn.jsx)(kU,{children:(0,Cn.jsx)(BU,{sx:function(e){return{bgcolor:Gt(e.palette.primary.main,.2)}},children:(0,Cn.jsx)(JF,{colSpan:16,align:"left",children:(0,Cn.jsx)(qh,{variant:"body1",fontWeight:500,color:"primary.contrastText",children:"Mandataire"})})})}),(0,Cn.jsx)(wG,{children:(0,Cn.jsxs)(Wf,{sx:{p:2},children:[(0,Cn.jsx)(qh,{variant:"body1",fontWeight:500,children:b}),(0,Cn.jsxs)(qh,{variant:"body2",mt:.5,children:["Sign\xe9 le: ",ro()(f).format(oa)]})]})})]})})}),(0,Cn.jsx)(hA,{item:!0,xs:4,children:(0,Cn.jsx)(mU,{component:Lh,sx:{borderBottom:0,borderColor:"primary.main"},elevation:3,children:(0,Cn.jsxs)(qU,{size:"small",children:[(0,Cn.jsx)(kU,{children:(0,Cn.jsx)(BU,{sx:function(e){return{bgcolor:Gt(e.palette.primary.main,.2)}},children:(0,Cn.jsx)(JF,{colSpan:16,align:"left",children:(0,Cn.jsx)(qh,{variant:"body1",fontWeight:500,color:"primary.contrastText",children:"Signataire"})})})}),(0,Cn.jsx)(wG,{children:(0,Cn.jsxs)(Wf,{sx:{p:2},children:[(0,Cn.jsx)(qh,{variant:"body1",fontWeight:500,children:h}),(0,Cn.jsxs)(qh,{variant:"body2",mt:.5,children:["Sign\xe9 le: ",ro()(M).format(oa)]})]})})]})})})]})]}),(0,Cn.jsx)($_,{children:(0,Cn.jsx)(tq,{onClick:r,children:"Fermer"})})]})},GJ={borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"rgb(224,224,224)"},YJ=Bv(jJ||(jJ=Rf(["\n query getClaimCalendarEvents($date_service_start: Date, $date_service_end: Date) {\n claimCalendarEvents(date_service_start: $date_service_start, date_service_end: $date_service_end) {\n date_service\n poste_id\n poste_nom\n patients_count\n total_prelim\n total_final\n }\n }\n"]))),KJ=Bv(IJ||(IJ=Rf(["\n query getCalendarVacEvents($date_service_start: Date, $date_service_end: Date) {\n calendarVacEvents(date_service_start: $date_service_start, date_service_end: $date_service_end) {\n reqt_id\n once\n date_service\n pst_no\n pst_mod\n pst_name\n hours\n }\n }\n"]))),QJ=Bv(DJ||(DJ=Rf(["\n query GetEcs($date_ec_less_or_equals_to: Date) {\n ecs(date_ec_less_or_equals_to: $date_ec_less_or_equals_to) {\n id\n created_at\n updated_at\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n fmp_id\n }\n }\n"]))),$J={border:"1px ".concat("rgb(224, 224, 224)"," solid"),borderCollapse:"collapse"},JJ=function(e){return e.clone().startOf("month").day(0)},ZJ=function(e){return JJ(e).add(7*eZ,"days")},eZ=5;function tZ(e){for(var t=e.calendarDate,n=e.setCalendarDate,r=e.smEvents,o=e.vacEvents,i=e.ecs,a=e.loading,s=e.minDate,c=e.maxDate,l=e.onChangeDate,p=e.onClickEvent,u=JJ(t.date),d=[],b=0;b0?1:0,borderRadius:1},children:(0,Cn.jsxs)(Lh,{sx:{width:"100%",backgroundColor:t.palette.primary.main,padding:1,"&:hover":{backgroundColor:t.palette.primary.dark},color:t.palette.primary.contrastText},elevation:1,children:[(0,Cn.jsxs)(qh,{variant:"body2",textAlign:"center",fontWeight:"bold",mb:1,children:[n.poste_nom," (",n.poste_id,")"]}),(0,Cn.jsxs)(qh,{variant:"body1",textAlign:"center",sx:{mb:1.5},children:[n.patients_count," patient",n.patients_count>1?"s":""]}),(0,Cn.jsxs)(qh,{variant:"body2",textAlign:"left",children:["Montant demand\xe9: ",Ds(n.total_prelim)," $"]}),(0,Cn.jsxs)(qh,{variant:"body2",textAlign:"left",children:["Montant re\xe7u: ",Ds(n.total_final)," $"]})]})})},aZ=function(e){var t=Wh(),n=e.event,r=e.eventIdx,o=e.onClickEvent;return(0,Cn.jsx)(HO,{onClick:function(){return o(n,"vac")},sx:{width:"100%",marginTop:r>0?1:0,borderRadius:1},children:(0,Cn.jsxs)(Lh,{sx:{width:"100%",backgroundColor:t.palette.pink1Dark.main,padding:1,"&:hover":{backgroundColor:t.palette.pink1Dark.dark},color:t.palette.pink1Dark.contrastText},elevation:1,children:[(0,Cn.jsxs)(qh,{variant:"body2",textAlign:"center",fontWeight:"bold",mb:1,children:[n.pst_name," (",n.pst_no,")"]}),(0,Cn.jsxs)(qh,{variant:"body1",textAlign:"center",sx:{mb:1.5},children:[n.hours," heure",n.hours>1?"s":""]}),(0,Cn.jsxs)(qh,{variant:"body2",textAlign:"center",children:["Demande #",n.once]})]})})};function sZ(){var e=Wh(),n=hz(e.breakpoints.down("tablet")),r=(hz(e.breakpoints.up("laptop")),s((0,t.useState)(null),2)),o=r[0],i=r[1],a=s((0,t.useState)(null),2),c=a[0],l=a[1],p=ro()(),u=s((0,t.useState)({date:p,firstCalendarDayDate:JJ(p),lastCalendarDayDate:ZJ(p)}),2),d=u[0],b=u[1],f=Bg(YJ,{variables:{date_service_start:d.firstCalendarDayDate,date_service_end:d.lastCalendarDayDate}}),h=f.loading,M=(f.error,f.data),z=Bg(KJ,{variables:{date_service_start:d.firstCalendarDayDate,date_service_end:d.lastCalendarDayDate}}),O=(z.loading,z.error,z.data),m=Bg(QJ,{variables:{date_ec_less_or_equals_to:ro()().add(2,"months").format(oa)}}),g=(m.loading,m.error,m.data);return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(BJ,{date_service:(null===o||void 0===o?void 0:o.date_service)||null,poste_id:(null===o||void 0===o?void 0:o.poste_id)||null,patients_count:(null===o||void 0===o?void 0:o.patients_count)||0,total_prelim:(null===o||void 0===o?void 0:o.total_prelim)||0,total_final:(null===o||void 0===o?void 0:o.total_final)||0,handleCloseDialog:function(){i(null)}}),(0,Cn.jsx)(VJ,{reqt_id:(null===c||void 0===c?void 0:c.reqt_id)||null,handleCloseDialog:function(){l(null)}}),(0,Cn.jsx)(hA,{container:!0,spacing:3,children:(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(Lh,{children:n?(0,Cn.jsxs)(Wf,{padding:3,children:[(0,Cn.jsx)(qh,{variant:"h5",fontWeight:500,children:"Oups!"}),(0,Cn.jsx)(qh,{mt:3,children:"Le calendrier des r\xe9clamations n'est malheureusement pas adapt\xe9 pour mobile."}),(0,Cn.jsx)(qh,{mt:2,children:"Nous travaillons actuellement sur la version mobile (app IOS et Android) qui vous permettra d'avoir acc\xe8s \xe0 cette page et bien plus directement sur votre appareil mobile!"}),(0,Cn.jsx)(qh,{mt:2,children:"Vous pouvez entre-temps utiliser une tablette ou un PC pour acc\xe9der \xe0 cette page."})]}):(0,Cn.jsx)(tZ,{loading:h,smEvents:(null===M||void 0===M?void 0:M.claimCalendarEvents)||[],vacEvents:(null===O||void 0===O?void 0:O.calendarVacEvents)||[],ecs:(null===g||void 0===g?void 0:g.ecs)||[],minDate:ro()("2016-10-01"),maxDate:ro()(),onChangeDate:function(e,t,n){},onClickEvent:function(e,t){switch(t){case"sm":i(e);break;case"vac":l(e)}},calendarDate:d,setCalendarDate:b})})})})]})}function cZ(e){return Zf("MuiLinearProgress",e)}eh("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var lZ,pZ,uZ,dZ,bZ,fZ,hZ,MZ,zZ,OZ,mZ,gZ,vZ=["className","color","value","valueBuffer","variant"],AZ=Lf(hZ||(hZ=lZ||(lZ=Rf(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])))),yZ=Lf(MZ||(MZ=pZ||(pZ=Rf(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])))),xZ=Lf(zZ||(zZ=uZ||(uZ=Rf(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])))),qZ=function(e,t){return"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?Gt(e.palette[t].main,.62):Ut(e.palette[t].main,.5)},wZ=$f("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["color".concat(Ef(n.color))],t[n.variant]]}})((function(e){var t=e.ownerState,n=e.theme;return c({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:qZ(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),WZ=$f("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:function(e,t){var n=e.ownerState;return[t.dashed,t["dashedColor".concat(Ef(n.color))]]}})((function(e){var t=e.ownerState,n=e.theme,r=qZ(n,t.color);return c({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),kf(OZ||(OZ=dZ||(dZ=Rf(["\n animation: "," 3s infinite linear;\n "]))),xZ)),RZ=$f("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:function(e,t){var n=e.ownerState;return[t.bar,t["barColor".concat(Ef(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((function(e){var t=e.ownerState,n=e.theme;return c({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})}),(function(e){var t=e.ownerState;return("indeterminate"===t.variant||"query"===t.variant)&&kf(mZ||(mZ=bZ||(bZ=Rf(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "]))),AZ)})),CZ=$f("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:function(e,t){var n=e.ownerState;return[t.bar,t["barColor".concat(Ef(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((function(e){var t=e.ownerState,n=e.theme;return c({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:qZ(n,t.color),transition:"transform .".concat(4,"s linear")})}),(function(e){var t=e.ownerState;return("indeterminate"===t.variant||"query"===t.variant)&&kf(gZ||(gZ=fZ||(fZ=Rf(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "]))),yZ)})),_Z=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiLinearProgress"}),r=n.className,o=n.color,i=void 0===o?"primary":o,a=n.value,s=n.valueBuffer,l=n.variant,p=void 0===l?"indeterminate":l,u=Qe(n,vZ),d=c({},n,{color:i,variant:p}),b=function(e){var t=e.classes,n=e.variant,r=e.color;return Cf({root:["root","color".concat(Ef(r)),n],dashed:["dashed","dashedColor".concat(Ef(r))],bar1:["bar","barColor".concat(Ef(r)),("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&"barColor".concat(Ef(r)),"buffer"===n&&"color".concat(Ef(r)),("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]},cZ,t)}(d),f=Wh(),h={},M={bar1:{},bar2:{}};if("determinate"===p||"buffer"===p)if(void 0!==a){h["aria-valuenow"]=Math.round(a),h["aria-valuemin"]=0,h["aria-valuemax"]=100;var z=a-100;"rtl"===f.direction&&(z=-z),M.bar1.transform="translateX(".concat(z,"%)")}else 0;if("buffer"===p)if(void 0!==s){var O=(s||0)-100;"rtl"===f.direction&&(O=-O),M.bar2.transform="translateX(".concat(O,"%)")}else 0;return(0,Cn.jsxs)(wZ,c({className:ub(b.root,r),ownerState:d,role:"progressbar"},h,{ref:t},u,{children:["buffer"===p?(0,Cn.jsx)(WZ,{className:b.dashed,ownerState:d}):null,(0,Cn.jsx)(RZ,{className:b.bar1,ownerState:d,style:M.bar1}),"determinate"===p?null:(0,Cn.jsx)(CZ,{className:b.bar2,ownerState:d,style:M.bar2})]}))})),SZ=_Z;function kZ(){return(0,Cn.jsx)(Gw,{children:(0,Cn.jsxs)(hA,{container:!0,spacing:2,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,sx:{mb:2},children:(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",children:(0,Cn.jsx)("img",{src:"/logo-blanc.jpg",alt:"",style:{display:"block",height:"70px"}})})}),(0,Cn.jsxs)(hA,{item:!0,xs:12,mb:4,children:[(0,Cn.jsxs)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",children:[(0,Cn.jsx)(qh,{variant:"h4",align:"center",mr:2,children:"Mise \xe0 jour quotidienne en cours..."}),(0,Cn.jsx)(Oh,{size:26,color:"primary"})]}),(0,Cn.jsx)(qh,{variant:"subtitle1",mt:1.5,align:"center",children:"Nous serons de retour bient\xf4t!"})]}),(0,Cn.jsx)(hA,{item:!0,xs:12,sx:{mt:1},children:(0,Cn.jsx)(SZ,{color:"primary"})})]})})}var LZ=__webpack_require__(3496);function EZ(e){return Zf("MuiListItemAvatar",e)}eh("MuiListItemAvatar",["root","alignItemsFlexStart"]);var TZ,NZ,PZ,BZ=["className"],XZ=$f("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((function(e){return c({minWidth:56,flexShrink:0},"flex-start"===e.ownerState.alignItems&&{marginTop:8})})),jZ=t.forwardRef((function(e,n){var r=wn({props:e,name:"MuiListItemAvatar"}),o=r.className,i=Qe(r,BZ),a=c({},r,{alignItems:t.useContext(zz).alignItems}),s=function(e){return Cf({root:["root","flex-start"===e.alignItems&&"alignItemsFlexStart"]},EZ,e.classes)}(a);return(0,Cn.jsx)(XZ,c({className:ub(s.root,o),ownerState:a,ref:n},i))})),IZ=jZ,DZ=cm((0,Cn.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done"),FZ=Bv(TZ||(TZ=Rf(["\n query getMdEarningsGraphData($start_date: Date, $end_date: Date) {\n mdEarningsGraphData(start_date: $start_date, end_date: $end_date) {\n label\n date_ec\n value\n }\n }\n"]))),HZ=Bv(NZ||(NZ=Rf(["\n query getMdPayments {\n mdPayments {\n id\n created_at\n updated_at\n md_id\n txn_recorded_at\n method\n ref_no\n amt\n\n METHOD_NAME\n }\n }\n"]))),VZ=Bv(PZ||(PZ=Rf(["\n query getMdEcStats($which: String) {\n mdEcStats(which: $which) {\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n date_paiement\n total_prelim\n total_final\n facture_count\n patient_count\n days_billed\n }\n }\n"])));function UZ(e){var t=e.children;return(0,Cn.jsx)(qh,{variant:"h6",mt:2,mb:1,children:t})}function GZ(e){var t=e.children;return(0,Cn.jsx)(qh,{mb:2,children:t})}function YZ(e){var t=e.children;return(0,Cn.jsx)(qh,{variant:"h6",mt:3,mb:1,children:t})}function KZ(e){var t=e.children;return(0,Cn.jsx)(qh,{mb:2,children:t})}function QZ(e){var t=e.children;return(0,Cn.jsx)(qh,{mb:2,children:t})}ro()("2022-06-13 21:28:00"),ro()("2022-06-10 12:35:00"),ro()("2022-06-14 10:25:00");function $Z(){for(var e=Wh(),n=Kv(),r=[],o=0;o<12;o++)r.push(o+1);var i=s((0,t.useState)(!1),2),a=i[0],c=i[1],l=s((0,t.useState)({start_date:ro()().subtract(1,"year").startOf("year"),end_date:ro()().subtract(1,"year").endOf("year")}),2),p=l[0],u=(l[1],s((0,t.useState)({start_date:ro()().startOf("year"),end_date:ro()().endOf("year")}),2)),d=u[0],b=(u[1],Bg(FZ,{variables:p})),f=(b.loading,b.error,b.data),h=Bg(FZ,{variables:d}),M=(h.loading,h.error,h.data),z=Bg(VZ,{variables:{which:"current"}}),O=z.loading,m=(z.error,z.data),g=Bg(VZ,{variables:{which:"previous"}}),v=g.loading,A=(g.error,g.data),y=Bg(HZ,{}),x=(y.loading,y.error,y.data,(null===m||void 0===m?void 0:m.mdEcStats)||{}),q=(null===A||void 0===A?void 0:A.mdEcStats)||{};return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(hA,{container:!0,spacing:2,alignItems:"flex-start",children:[(0,Cn.jsxs)(hA,{item:!0,lg:9,xl:9.5,container:!0,spacing:2,children:[(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,mt:1,children:(0,Cn.jsxs)(qh,{variant:"h6",fontWeight:600,children:["Statistiques de l'\xe9tat de compte en cours",O?"":" (".concat(ro()(x.dd_periode_fact).format("Do MMMM")," au ").concat(ro()(x.date_coupure).format("Do MMMM"),")"),":"]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,lg:3,children:(0,Cn.jsx)(JZ,{title:"Montant pr\xe9liminaire",value:"".concat(Ds(x.total_prelim)," $"),chipLabel:"EC-".concat(O?"__":x.no_paiement),which:"current",loading:O})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,lg:3,children:(0,Cn.jsx)(JZ,{title:"R\xe9clamations envoy\xe9es",value:x.facture_count,chipLabel:"EC-".concat(O?"__":x.no_paiement),which:"current",loading:O})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,lg:3,children:(0,Cn.jsx)(JZ,{title:"Patients factur\xe9s",value:x.patient_count,chipLabel:"EC-".concat(O?"__":x.no_paiement),which:"current",loading:O})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,lg:3,children:(0,Cn.jsx)(JZ,{title:"Jours factur\xe9s",value:x.days_billed,chipLabel:"EC-".concat(O?"__":x.no_paiement),which:"current",loading:O})})]}),(0,Cn.jsxs)(hA,{item:!0,xs:12,container:!0,spacing:2,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,mt:1,children:(0,Cn.jsxs)(qh,{variant:"h6",fontWeight:600,children:["Statistiques du dernier \xe9tat de compte",v?"":" (".concat(ro()(q.dd_periode_fact).format("Do MMMM")," au ").concat(ro()(q.date_coupure).format("Do MMMM"),")"),":"]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,lg:3,children:(0,Cn.jsx)(JZ,{title:"Montant pr\xe9liminaire",value:"".concat(Ds(q.total_prelim||0)," $"),chipLabel:"EC-".concat(v?"__":q.no_paiement),which:"previous",loading:v})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,lg:3,children:(0,Cn.jsx)(JZ,{title:"R\xe9clamations envoy\xe9es",value:q.facture_count||0,chipLabel:"EC-".concat(v?"__":q.no_paiement),which:"previous",loading:v})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,lg:3,children:(0,Cn.jsx)(JZ,{title:"Patients factur\xe9s",value:q.patient_count||0,chipLabel:"EC-".concat(v?"__":q.no_paiement),which:"previous",loading:v})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,lg:3,children:(0,Cn.jsx)(JZ,{title:"Jours factur\xe9s",value:q.days_billed||0,chipLabel:"EC-".concat(v?"__":q.no_paiement),which:"previous",loading:v})})]}),(0,Cn.jsx)(hA,{item:!0,xs:12}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:12,children:(0,Cn.jsxs)(Lh,{sx:{px:2,py:2},elevation:1,children:[(0,Cn.jsxs)(qh,{variant:"h6",mb:1,children:["Comparaison des revenus par EC entre ",p.start_date.year()," et"," ",d.start_date.year()]}),(0,Cn.jsx)(e0,{mdEarningsGraphData:[f,M]})]})})]}),(0,Cn.jsxs)(hA,{item:!0,lg:3,xl:2.5,container:!0,spacing:2,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,sx:function(e){return ne({},e.breakpoints.down(1700),{display:"none"})},children:(0,Cn.jsx)(Lh,{sx:{px:0,py:0,minWidth:320},elevation:1,children:(0,Cn.jsx)(n0,{})})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsxs)(Lh,{sx:{px:2,py:2},elevation:1,children:[(0,Cn.jsx)(qh,{variant:"h6",mb:2,children:"Solde \xe0 payer"}),(0,Cn.jsxs)(qh,{variant:"h4",align:"center",fontWeight:600,mt:2,sx:{color:e.palette.primary.main},children:[Ds(n.md.balance/100)," $"]}),(0,Cn.jsx)(tq,{variant:"text",sx:{display:"block",mx:"auto",mt:1},onClick:function(){c(!0)},color:"secondary",children:"Afficher infos paiement"})]})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsxs)(Lh,{elevation:1,children:[(0,Cn.jsx)(Wf,{sx:{px:2,py:2,pb:0},children:(0,Cn.jsx)(qh,{variant:"h6",mb:2,children:"Derniers paiements"})}),(0,Cn.jsx)(t0,{})]})})]})]}),(0,Cn.jsx)(r0,{isPaymentInfoDialogOpen:a,handleClosePaymentInfoDialog:function(){c(!1)}})]})}function JZ(e){var t=e.title,n=e.value,r=e.chipLabel,o=e.main,i=e.which,a=e.loading;return(0,Cn.jsxs)(Lh,{sx:{px:2,py:2,backgroundColor:o?"primary.main":"",color:o?"primary.contrastText":""},elevation:1,children:[(0,Cn.jsxs)(hA,{container:!0,justifyContent:"space-between",pb:1,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,xl:9,children:(0,Cn.jsx)(qh,{variant:"h6",children:t})}),r&&(0,Cn.jsx)(hA,{item:!0,xs:12,xl:3,container:!0,sx:function(e){var t;return ne(t={},e.breakpoints.up("xl"),{mt:-1,mr:-1,justifyContent:"flex-end"}),ne(t,e.breakpoints.down("xl"),{mt:.7,mb:1,justifyContent:"flex-start"}),t},children:(0,Cn.jsx)(dg,{label:r,color:"current"===i?"primary":"secondary",size:"small",sx:{fontSize:12,height:"22px",borderRadius:1}})})]}),a?(0,Cn.jsx)(SZ,{sx:{mt:2.5}}):(0,Cn.jsx)(qh,{variant:"h5",children:n})]})}var ZZ={chart:{toolbar:{show:!1},events:{mounted:function(e){e.windowResizeHandler()}}},stroke:{curve:"smooth",width:3},xaxis:{categories:[]},legend:{formatter:function(e,t){switch(t.seriesIndex){case 0:return"".concat(ro()().subtract(1,"year").year());case 1:return"Cumulatif ".concat(ro()().subtract(1,"year").year());case 2:return"".concat(ro()().year());case 3:return"Cumulatif ".concat(ro()().year());default:return""}}},yaxis:[{seriesName:"normal-serie",labels:{formatter:function(e){var t=Intl.NumberFormat("en",{notation:"compact"});return t.format(e)}}},{seriesName:"cum-serie",opposite:!0,labels:{formatter:function(e){var t=Intl.NumberFormat("en",{notation:"compact"});return t.format(e)}}},{seriesName:"normal-serie",show:!1,labels:{formatter:function(e){var t=Intl.NumberFormat("en",{notation:"compact"});return t.format(e)}}},{seriesName:"cum-serie",show:!1,labels:{formatter:function(e){var t=Intl.NumberFormat("en",{notation:"compact"});return t.format(e)}}}],tooltip:{x:{formatter:function(e,t){return"EC-".concat(2*e)}},y:{title:{formatter:function(e){return": "}}}},fill:{}};function e0(e){var t=Wh(),n=e.mdEarningsGraphData;if(n.every((function(e){return!!e&&!!e.mdEarningsGraphData}))){var r=n[0].mdEarningsGraphData.map((function(e){return"".concat(e.label)}));ZZ.xaxis.categories=r;var o=[];return n.map((function(e,n){for(var r=e.mdEarningsGraphData,i=[],a=r.map((function(e,t){e.label;var n=e.date_ec,o=e.value;if(0===t||t===r.length-1){var a=ro()(n).year();i.includes(a)||i.push(a)}return o||0}));a.length<26;)a.push(null);var s=[];a.forEach((function(e){var t=s.length>0?s[s.length-1]:0;null===t||null===e?s.push(null):s.push(e+t)}));i.sort((function(e,t){return e-t})).join("-");o.push({name:"normal-serie",type:"bar",data:a,color:n?t.palette.primary.main:t.palette.secondary.main}),o.push({name:"cum-serie",type:"line",data:s,color:Ut(n?t.palette.primary.main:t.palette.secondary.main,.2)})})),(0,Cn.jsx)(LZ.Z,{options:ZZ,series:o,height:425})}return(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",pt:4,pb:2,children:(0,Cn.jsx)(wh,{})})}function t0(){var e=s(t.useState(5),2),n=(e[0],e[1],s((0,t.useState)(5),2)),r=n[0],o=n[1],i=Bg(HZ,{}),a=(i.loading,i.error,i.data),c=((0,t.useMemo)((function(){return[{field:"id",headerName:"ID",width:70,headerAlign:"center",align:"center"},oe({field:"txn_recorded_at",headerName:"Re\xe7u le",valueGetter:function(e){var t=e.value;return ro()(t).format(oa)}},YV),{field:"METHOD_NAME",headerName:"M\xe9thode",headerAlign:"center",align:"center",width:80},{field:"amt",headerName:"Montant",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t/100)," $")},headerAlign:"right",align:"right",minWidth:80,flex:1}]}),[]),(null===a||void 0===a?void 0:a.mdPayments)||[]);return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(Az,{dense:!0,disablePadding:!0,children:c.slice(0,r).map((function(e){var t=e.id,n=e.txn_recorded_at,r=(e.METHOD_NAME,e.amt),o="Paiement #".concat(t),i="".concat(ro()(n).format("LL"));return(0,Cn.jsxs)(Jm,{children:[(0,Cn.jsx)(IZ,{children:(0,Cn.jsx)(Mm,{sx:function(e){return{bgcolor:Gt(e.palette.primary.main,.8),width:35,height:35}},children:(0,Cn.jsx)(DZ,{color:"primary"})})}),(0,Cn.jsx)(ng,{primary:o,secondary:i,secondaryTypographyProps:{fontSize:12,mt:1}}),(0,Cn.jsxs)(qh,{variant:"body2",fontWeight:700,children:[Ds(r/100)," $"]})]},t)}))}),c.length>r&&(0,Cn.jsx)(Wf,{sx:{px:2,py:2,pt:0},children:(0,Cn.jsx)(tq,{variant:"text",fullWidth:!0,onClick:function(){return o(r+5)},children:"Voir plus"})})]})}function n0(){var e=s(t.useState(ro()()),2),n=e[0],r=e[1];return(0,Cn.jsx)(Sn,{dateAdapter:io,children:(0,Cn.jsx)(rL,{date:n,onChange:function(e){return r(e)},minDate:ro()().year(2016),maxDate:ro()().year(ro()().year()+2),views:["day"]})})}function r0(e){var t=e.isPaymentInfoDialogOpen,n=e.handleClosePaymentInfoDialog;return(0,Cn.jsxs)(YL,{fullWidth:!0,maxWidth:"sm",open:t,onClose:n,children:[(0,Cn.jsx)(MK,{variant:"h5",children:"Comment nous faire parvenir un paiement"}),(0,Cn.jsxs)(PL,{dividers:!0,children:[(0,Cn.jsx)(qh,{variant:"h6",mb:1,children:"Par transfert Interac:"}),(0,Cn.jsxs)(Wf,{pl:2,children:[(0,Cn.jsx)(qh,{variant:"body1",mt:1,children:"- Destinataire: paiement@fmparadis.com"}),(0,Cn.jsx)(qh,{variant:"body1",mt:1,children:"- Question secr\xe8te: Nom entreprise"}),(0,Cn.jsx)(qh,{variant:"body1",mt:1,children:"- Mot de passe: fmparadis"})]}),(0,Cn.jsx)(qh,{variant:"h6",mb:1,mt:4,children:"Par transfert bancaire:"}),(0,Cn.jsxs)(Wf,{pl:2,children:[(0,Cn.jsx)(qh,{variant:"body1",mt:1,children:"- Num\xe9ro de transit: 30435"}),(0,Cn.jsx)(qh,{variant:"body1",mt:1,children:"- Num\xe9ro d'institution: 815"}),(0,Cn.jsx)(qh,{variant:"body1",mt:1,children:"- Num\xe9ro de compte: 2030161"}),(0,Cn.jsx)(qh,{variant:"body1",mt:1,children:"- Courriel de confirmation de paiement: paiement@fmparadis.com"})]})]}),(0,Cn.jsx)($_,{children:(0,Cn.jsx)(tq,{onClick:n,children:"Fermer"})})]})}var o0,i0=Bv(o0||(o0=Rf(["\n ","\n\n query GetMdBills {\n mdBills {\n ...MdBillFields\n\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n }\n }\n"])),jG),a0=[(0,Cn.jsx)(qh,{fontSize:15,children:"Compte"},"1"),(0,Cn.jsx)(qh,{fontSize:15,children:"Factures"},"1")];function s0(){var e=function(){var e=(0,t.useContext)(m).matches,n=e[e.length-1];return n?n.params:{}}(),n=(e.id,P(),s(ee(),2)),r=(n[0],n[1],Bg(i0,{variables:{}})),o=r.loading,i=(r.error,r.data),a=s((0,t.useState)([]),2),c=a[0],l=a[1],p=(0,t.useCallback)(function(){var e=lb(sb().mark((function e(t,n){var r,o;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l([].concat(Le(c),[t])),e.prev=1,e.next=4,gc.get("storage/bill",{responseType:"blob",timeout:2e4,params:{md_bill_id:t}});case 4:r=e.sent,o="".concat(n,".pdf"),YK().saveAs(r.data,o),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:return e.prev=11,l(c.filter((function(e){return e===t}))),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,9,11,14]])})));return function(t,n){return e.apply(this,arguments)}}(),[l,c]),u=(0,t.useMemo)((function(){return function(e,t){return[{field:"no_paiement",headerName:"No. OR",headerAlign:"center",align:"center",width:80,valueGetter:function(e){var t=e.value;return"OR-".concat(t)}},oe(oe({},YV),{},{field:"date_ec",headerName:"Date EC",width:120}),oe(oe({},YV),{},{field:"date_coupure",headerName:"Date coupure",width:120}),oe(oe({},GV),{},{field:"bill_no",headerName:"No. Facture",minWidth:100,flex:1}),oe(oe({},eU),{},{field:"subtotal_amt",headerName:"Sous-total",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t,{cents:!0})," $")}}),oe(oe({},eU),{},{field:"tps_amt",headerName:"TPS",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t,{cents:!0})," $")}}),oe(oe({},eU),{},{field:"tvq_amt",headerName:"TVQ",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t,{cents:!0})," $")}}),oe(oe({},eU),{},{field:"total_amt",headerName:"Total",valueFormatter:function(e){var t=e.value;return"".concat(Ds(t,{cents:!0})," $")}}),{field:"actions",headerName:"Actions",width:80,headerAlign:"center",align:"center",renderCell:function(n){var r=n.row,o=r.id,i=r.filename,a=r.date_ec,s=r.no_paiement,c=t.includes(o),l="Facture-OR-".concat(ro()(a).year(),"-").concat(s);return(0,Cn.jsx)(Wf,{display:"flex",alignItems:"center",children:c?(0,Cn.jsx)(Im,{size:"medium",color:"primary",disabled:!0,children:(0,Cn.jsx)(Oh,{size:14})}):i&&(0,Cn.jsx)(SD,{title:"T\xe9l\xe9charger la facture.",placement:"left",disableInteractive:!0,children:(0,Cn.jsx)(Im,{size:"medium",color:"primary",onClick:function(){e(o,l)},children:(0,Cn.jsx)(KK,{fontSize:"small"})})})})}}]}(p,c)}),[p,c]),d=s(t.useState(15),2),b=d[0],f=d[1];return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"600",children:"Factures"}),(0,Cn.jsx)(EW,{separator:(0,Cn.jsx)(iE,{fontSize:"small"}),sx:{mt:.5,mb:{mobile:2,tablet:3,desktop:4}},children:a0}),(0,Cn.jsx)(IV,{getRowId:function(e){return e.id},rows:(null===i||void 0===i?void 0:i.mdBills)||[],columns:u,pagination:!0,pageSize:b,onPageSizeChange:function(e){return f(e)},rowsPerPageOptions:sU,autoHeight:!0,disableSelectionOnClick:!0,initialState:{pinnedColumns:{left:["no_paiement"],right:["actions"]},sorting:{sortModel:[{field:"date_ec",sort:"desc"}]}},loading:o,components:{LoadingOverlay:pU}})]})}var c0=cm((0,Cn.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"FileDownload");function l0(e){var n=e.name,r=e.control,o=e.rules,i=e.autocompleteOptions,a=i.options,s=void 0===a?[]:a,c=i.valuePropertyName,l=i.valueGetter,p=i.loading,u=(i.renderOption,i.getOptionLabel),d=i.isOptionEqualToValue,b=i.disabled,f=i.groupBy,h=e.textFieldOptions,M=Fq({name:n,control:r,rules:o}),z=M.field,O=z.onChange,m=z.value,g=M.fieldState,v=g.invalid,A=g.error,y=(0,t.useCallback)((function(e,t){O(l?l(t):(null===t||void 0===t?void 0:t[c])||null)}),[O,l,c]);return(0,Cn.jsx)(WC,{options:s,loading:p,getOptionLabel:u,value:m,onChange:y,isOptionEqualToValue:d,disabled:b,groupBy:f,renderInput:function(e){return(0,Cn.jsx)(gx,oe(oe(oe({},e),{},{size:"small",fullWidth:!0},h),{},{error:v,helperText:k0(A)}))}})}function p0(e){var t=e.name,n=e.control,r=e.options,o=(void 0===r?{}:r).label,i=Fq({name:t,control:n}).field,a=i.onChange,s=i.value;return(0,Cn.jsx)(wx,{control:(0,Cn.jsx)(Hx,{checked:void 0===s?null:s,onChange:function(e){return a(e.target.checked)},size:"small"}),label:o||""})}function u0(e){var n=e.name,r=e.control,o=e.rules,i=e.options,a=void 0===i?{}:i,c=(a.label,a.suffix,Fq({name:n,control:r,rules:o})),l=c.field,p=l.onChange,u=l.value,d=c.fieldState,b=d.invalid,f=d.error,h=s((0,t.useState)(ro()(u,oa).toISOString()),2),M=h[0],z=h[1];return(0,t.useEffect)((function(){z(ro()(u,oa).toISOString())}),[u]),(0,Cn.jsx)(oE,{views:["year","month","day"],renderInput:function(e){return(0,Cn.jsx)(gx,oe(oe(oe({},e),{},{size:"small",fullWidth:!0},a),{},{error:b,helperText:k0(f)}))},value:M,onChange:function(e){var t;p((null===(t=ro()(e))||void 0===t?void 0:t.format(oa))||null),z(e)}})}function d0(){}function b0(e){return!!(e||"").match(/\d/)}function f0(e){return null===e||void 0===e}function h0(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function M0(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNagation:n,addNegation:r}}function z0(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function O0(e,t){return Array(t+1).join(e)}function m0(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function g0(e,t,n){return Math.min(Math.max(e,t),n)}function v0(e){return Math.max(e.selectionStart,e.selectionEnd)}var A0={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:d0,onChange:d0,onKeyDown:d0,onMouseUp:d0,onFocus:d0,onBlur:d0,isAllowed:function(){return!0}},y0=function(e){function n(t){e.call(this,t);var n=t.defaultValue;this.validateProps();var r=this.formatValueProp(n);this.state={value:r,numAsString:this.removeFormatting(r),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.componentDidMount=function(){this.setState({mounted:!0})},n.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},n.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},n.prototype.updateValueIfRequired=function(e){var t=this,n=t.props,r=t.state,o=t.focusedElm,i=r.value,a=r.numAsString;if(void 0===a&&(a=""),e!==n){this.validateProps();var s=this.formatNumString(a),c=f0(n.value)?s:this.formatValueProp(),l=this.removeFormatting(c),p=parseFloat(l),u=parseFloat(a);(isNaN(p)&&isNaN(u)||p===u)&&s===i&&(null!==o||c===i)||this.updateValue({formattedValue:c,numAsString:l,input:o,source:"prop",event:null})}},n.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,n=this.getSeparators().decimalSeparator,r=this.getNumberRegex(!0),o="-"===e[0];o&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var i=(e=(e.match(r)||[]).join("").replace(n,".")).indexOf(".");return-1!==i&&(e=e.substring(0,i)+"."+e.substring(i+1,e.length).replace(new RegExp(h0(n),"g"),"")),o&&(e="-"+e),e},n.prototype.getNumberRegex=function(e,t){var n=this.props,r=n.format,o=n.decimalScale,i=n.customNumerals,a=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(i?i.join(""):"")+"]"+(!a||0===o||t||r?"":"|"+h0(a)),e?"g":void 0)},n.prototype.getSeparators=function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}},n.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"===typeof t?t:t[e]||" "},n.prototype.getValueObject=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},n.prototype.validateProps=function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+n+" (default value for decimalSeparator is .)\n ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask "+e+" should not contain numeric character;\n ")},n.prototype.setPatchedCaretPosition=function(e,t,n){m0(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===n&&m0(e,t)}),0)},n.prototype.correctCaretPosition=function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,a=r.format;if(""===e)return 0;if(t=g0(t,0,e.length),!a){var s="-"===e[0];return g0(t,o.length+(s?1:0),e.length-i.length)}if("function"===typeof a)return t;if("#"===a[t]&&b0(e[t]))return t;if("#"===a[t-1]&&b0(e[t-1]))return t;var c=a.indexOf("#");t=g0(t,c,a.lastIndexOf("#")+1);for(var l=a.substring(t,a.length).indexOf("#"),p=t,u=t+(-1===l?0:l);p>c&&("#"!==a[p]||!b0(e[p]));)p-=1;return!b0(e[u])||"left"===n&&t!==c||t-p=a?r+=O0("0",i-a):r=(r.substring(0,i)||"0")+"."+r.substring(i),t+r}(s),c=!0),"Infinity"===s&&c&&(s=""),c&&!n&&"number"===typeof r&&(s=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=M0(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNagation,c=parseFloat("0."+(a||"0")),l=(a.length<=t?"0."+a:c.toFixed(t)).split(".");return(s?"-":"")+i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),l[0])+(r?".":"")+z0(l[1]||"",Math.min(t,a.length),n)}(s,r,o)),c?this.formatNumString(s):this.formatInput(s))},n.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e},n.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},n.prototype.isCharacterAFormat=function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,a=n.decimalScale,s=n.fixedDecimalScale,c=this.getSeparators().decimalSeparator;return"string"===typeof r&&"#"!==r[e]||!(r||!(e=t.length-i.length||a&&s&&t[e]===c))},n.prototype.correctInputValue=function(e,t,n){var r=this,o=this.props,i=o.format,a=o.allowNegative,s=o.prefix,c=o.suffix,l=o.decimalScale,p=this.getSeparators(),u=p.allowedDecimalSeparators,d=p.decimalSeparator,b=this.state.numAsString||"",f=this.selectionBeforeInput,h=f.selectionStart,M=f.selectionEnd,z=function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&nn&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),O=z.start,m=z.end;if(!i&&O===m&&-1!==u.indexOf(n[h])){var g=0===l?"":d;return n.substr(0,h)+g+n.substr(h+1,n.length)}var v=i?0:s.length,A=t.length-(i?0:c.length);if(n.length>t.length||!n.length||O===m||0===h&&M===t.length||0===O&&m===t.length||h===v&&M===A)return n;var y=t.substr(O,m-O);if(!![].concat(y).find((function(e,n){return r.isCharacterAFormat(n+O,t)}))){var x=t.substr(O),q={},w=[];[].concat(x).forEach((function(e,n){r.isCharacterAFormat(n+O,t)?q[n]=e:n>y.length-1&&w.push(e)})),Object.keys(q).forEach((function(e){w.length>e?w.splice(e,0,q[e]):w.push(q[e])})),n=t.substr(0,O)+w.join("")}if(!i){var W=this.removeFormatting(n),R=M0(W,a),C=R.beforeDecimal,_=R.afterDecimal,S=R.addNegation,k=em;)O--;O=this.correctCaretPosition(a,O,"left")}}else for(;!h.test(a[O])&&Og)&&(e.preventDefault(),this.setPatchedCaretPosition(n,O,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,O,a),b(e)}else b(e)},n.prototype.onMouseUp=function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),n===r){var i=this.correctCaretPosition(o,n);i!==n&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)},n.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,i=n.value;void 0===i&&(i="");var a=t.correctCaretPosition(i,r);a===r||0===r&&o===i.length||t.setPatchedCaretPosition(n,a,i),t.props.onFocus(e)}),0)},n.prototype.render=function(){var e=this.props,n=e.type,r=e.displayType,o=e.customInput,i=e.renderText,a=e.getInputRef,s=e.format,c=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),l=c,p=this.state,u=p.value,d=p.mounted&&function(e){return e||"undefined"!==typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(s)?"numeric":void 0,b=Object.assign({inputMode:d},l,{type:n,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===r)return i?i(u,l)||null:t.createElement("span",Object.assign({},l,{ref:a}),u);if(o){var f=o;return t.createElement(f,Object.assign({},b,{ref:a}))}return t.createElement("input",Object.assign({},b,{ref:a}))},n}(t.Component);y0.defaultProps=A0;var x0=y0;function q0(e){var n=e.name,r=e.control,o=(e.errors,e.options),i=void 0===o?{}:o,a=e.money,c=void 0!==a&&a,l=e.percentage,p=void 0!==l&&l,u=e.phone,d=void 0!==u&&u,b=e.decimals,f=void 0===b?void 0:b,h=e.disabled,M=e.nullable,z=void 0!==M&&M,O=(i.label,i.suffix),m=i.thousandSeparator,g=i.format,v=i.mask;c&&(f=void 0===f?2:f,m=void 0===m?" ":m,O=void 0===O?"$":O),p&&(f=void 0===f?2:f,m=void 0===m?"":m,O=void 0===O?"%":O),d&&(g=void 0===g?"+1 (###) ###-####":g,v=void 0===v?"_":v);var A=Fq({name:n,control:r}).field,y=A.onChange,x=A.value,q=s((0,t.useState)(w0(x,f,z)),2),w=q[0],W=q[1];(0,t.useEffect)((function(){W(w0(x,f,z))}),[x,f,z]);var R=(0,t.useCallback)((function(e){var t=e.value,n=(e.floatValue,e.formattedValue);y(void 0!==f?new js(t||0).mul(Math.pow(10,f)).toNumber():new js(t||0).toNumber()),W(n)}),[y,f]);return(0,Cn.jsx)(Cn.Fragment,{children:(0,Cn.jsx)(x0,oe({customInput:gx,value:w,onValueChange:R,size:"small",fullWidth:!0,thousandSeparator:m,suffix:O,decimalScale:f,format:g,mask:v,fixedDecimalScale:!0,disabled:h},i))})}var w0=function(e,t,n){return void 0===t?null===e||void 0===e?n?null:0:e:null===e||void 0===e?n?null:0:e/Math.pow(10,t)};function W0(e){var t=e.name,n=e.control,r=(e.errors,e.options),o=void 0===r?{}:r,i=e.dropdownOptions,a=o.label,s=Fq({name:t,control:n}).field,c=s.value,l=s.onChange;return(0,Cn.jsx)(gx,oe(oe({label:a||"",size:"small",fullWidth:!0,select:!0,onChange:function(e){var t=e.target.value||null;l(t)},value:c||""},o),{},{children:i}))}function R0(e){var t=e.name,n=e.control,r=(e.errors,e.options),o=void 0===r?{}:r,i=o.label,a=o.multiline,s=o.rows;(s||0===s)&&(a=!0);var c=Fq({name:t,control:n}).field,l=c.value,p=c.onChange;return(0,Cn.jsx)(gx,oe(oe({label:i||"",size:"small",fullWidth:!0,onChange:function(e){var t=e.target.value||null;p(t)},value:l||""},o),{},{multiline:a}))}var C0,_0,S0,k0=function(e){if(e){if(e.message)return e.message;if("required"===e.type)return"Champ requis"}},L0=Bv(C0||(C0=Rf(["\n query GetPostes {\n postes(only_own: true) {\n numero\n modulateur\n description\n }\n }\n"]))),E0=Bv(_0||(_0=Rf(["\n ","\n\n query GetMdGrps {\n md {\n MdGrps {\n ...MdGrpFields\n }\n }\n }\n"])),IG),T0=Bv(S0||(S0=Rf(["\n query GetEcs($date_ec_less_or_equals_to: Date) {\n ecs(date_ec_less_or_equals_to: $date_ec_less_or_equals_to) {\n id\n created_at\n updated_at\n date_ec\n date_coupure\n dd_periode_fact\n df_periode_fact\n no_paiement\n fmp_id\n }\n }\n"])));function N0(){var e=Bg(L0),n=e.loading,r=(e.error,e.data),o=Bg(T0,{variables:{date_ec_less_or_equals_to:ro()().format(oa)}}),i=o.loading,a=(o.error,o.data),c=Nw({defaultValues:{pst_id:null,start_date:null,end_date:null,ec_id:null,exclude_forfait_cab:!1,exclude_forfait_gap:!1,exclude_forfait_acces_temps_opportun:!1}}),l=c.control,p=(c.register,c.handleSubmit),u=(c.formState.errors,c.formState,c.watch,c.reset,c.getValues),d=s((0,t.useState)(!1),2),b=d[0],f=d[1],h=function(){var e=lb(sb().mark((function e(t){var n,r,o,i,s,c,l,p,u;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),n=t.pst_id,r=t.start_date,o=t.end_date,i=t.ec_id,s=i?a.ecs.find((function(e){return e.id===i})):null,c=s?s.dd_periode_fact:r,l=s?s.df_periode_fact:o,e.prev=5,e.next=8,gc.get("storage/generate-dynamic-report",{responseType:"blob",timeout:2e4,params:{pst_id:n,start_date:c,end_date:l,exclude_forfait_cab:t.exclude_forfait_cab,exclude_forfait_gap:t.exclude_forfait_gap,exclude_forfait_acces_temps_opportun:t.exclude_forfait_acces_temps_opportun}});case 8:p=e.sent,u=s?"".concat(n,"-").concat(ro()(c).format(oa),"-au-").concat(ro()(l).format(oa),"-ec-").concat(ro()(s).format("YYYY"),"-").concat(s.no_paiement,".pdf"):"".concat(n,"-").concat(c,"-au-").concat(l,".pdf"),YK().saveAs(p.data,u),e.next=15;break;case 13:e.prev=13,e.t0=e.catch(5);case 15:return e.prev=15,f(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[5,13,15,18]])})));return function(t){return e.apply(this,arguments)}}(),M=12;return(0,Cn.jsxs)("form",{onSubmit:p(h),encType:"multipart/form-data",children:[(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"bold",children:"Rapport de calcul de loyer"}),(0,Cn.jsx)(vm,{sx:{mt:1.25,mb:2}}),(0,Cn.jsxs)(hA,{container:!0,spacing:3,pt:1,children:[(0,Cn.jsxs)(hA,{item:!0,xs:12,mb:2,children:[(0,Cn.jsxs)(qh,{variant:"body1",children:["Pour g\xe9n\xe9rer le rapport, veuillez s\xe9lectionner le poste,"," ",(0,Cn.jsx)("b",{children:"(la date de d\xe9but et la date de fin)"})," OU ",(0,Cn.jsx)("b",{children:"(l'\xe9tat de compte)"})," puis cliquer sur le bouton vert. Pour exclure certains forfaits, veuillez cocher les cases \xe0 cocher en question."]}),(0,Cn.jsx)(qh,{variant:"subtitle2",sx:function(e){return{color:e.palette.warning.main,mt:1}},children:"** Les montants DM\xc9, HUB, forfaits IPS, supervision r\xe9sident/externe/IPS, heures GMF, formations continues et frais de d\xe9placement sont exclus du rapport par d\xe9faut."})]}),(0,Cn.jsx)(hA,{item:!0,xs:M,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(l0,{name:"pst_id",control:l,rules:{required:!0},autocompleteOptions:{options:(null===r||void 0===r?void 0:r.postes)||[],valuePropertyName:"numero",valueGetter:P0,loading:n,getOptionLabel:function(e){var t=e.numero,n=e.modulateur,o=e.description;if(e===u("pst_id")){var i=((null===r||void 0===r?void 0:r.postes)||[]).find((function(t){return P0(t)===e}));return i?"".concat(i.description," (").concat(i.numero,"-").concat(i.modulateur,")"):""}return"".concat(o," (").concat(t,"-").concat(n,")")},isOptionEqualToValue:function(e,t){return P0(e)===t}},textFieldOptions:{label:"Poste"}})}),(0,Cn.jsx)(hA,{item:!0,xs:M,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(u0,{name:"start_date",control:l,rules:{required:!1},options:{label:"Date de d\xe9but"}})}),(0,Cn.jsx)(hA,{item:!0,xs:M,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(u0,{name:"end_date",control:l,rules:{required:!1},options:{label:"Date de fin"}})}),(0,Cn.jsx)(hA,{item:!0,xs:M,sm:6,md:4,lg:4,xl:3,children:(0,Cn.jsx)(l0,{name:"ec_id",control:l,rules:{required:!1},autocompleteOptions:{options:(null===a||void 0===a?void 0:a.ecs)||[],valuePropertyName:"id",loading:i,getOptionLabel:function(e){var t=e.dd_periode_fact,n=e.df_periode_fact,r=e.no_paiement;if(e===u("ec_id")){var o=((null===a||void 0===a?void 0:a.ecs)||[]).find((function(t){return t.id===e}));return o?"".concat(ro()(o.dd_periode_fact).format(oa)," au ").concat(ro()(o.df_periode_fact).format(oa)," (OR-").concat(o.no_paiement,")"):""}return"".concat(ro()(t).format(oa)," au ").concat(ro()(n).format(oa)," (OR-").concat(r,")")},isOptionEqualToValue:function(e,t){return e.id===t},groupBy:function(e){return"Ann\xe9e ".concat(ro()(e.date_ec).format("YYYY"))}},textFieldOptions:{label:"\xc9tat de compte"}})}),(0,Cn.jsx)(hA,{item:!0,xs:M,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(p0,{name:"exclude_forfait_cab",control:l,options:{label:"Exclure forfaits cabinet"}})}),(0,Cn.jsx)(hA,{item:!0,xs:M,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(p0,{name:"exclude_forfait_gap",control:l,options:{label:"Exclure forfaits GAP"}})}),(0,Cn.jsx)(hA,{item:!0,xs:M,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(p0,{name:"exclude_forfait_acces_temps_opportun",control:l,options:{label:"Exclure forfaits d'acc\xe8s en temps opportun"}})})]}),(0,Cn.jsx)(hA,{item:!0,xs:12,container:!0,mt:5,children:(0,Cn.jsx)(hA,{item:!0,xs:12,display:"flex",justifyContent:"flex-end",children:(0,Cn.jsx)(J$,{type:"submit",variant:"contained",color:"primary",onClick:p(h),endIcon:(0,Cn.jsx)(c0,{}),loading:b,loadingPosition:"end",children:"G\xe9n\xe9rer le rapport"})})})]})}var P0=function(e){return e?"".concat(e.numero,"-").concat(e.modulateur):null};function B0(){var e=Nw({defaultValues:{start_date:null,end_date:null}}),n=e.control,r=(e.register,e.handleSubmit),o=(e.formState.errors,e.formState,e.watch,e.reset,e.getValues,s((0,t.useState)(!1),2)),i=o[0],a=o[1],c=function(){var e=lb(sb().mark((function e(t){var n,r,o,i;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),n=t.start_date,r=t.end_date,e.prev=2,e.next=5,gc.get("storage/generate-frais-facturation-report",{responseType:"blob",timeout:2e4,params:t});case 5:o=e.sent,i="frais-facturation-".concat(n,"-au-").concat(r,".pdf"),YK().saveAs(o.data,i),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(2);case 12:return e.prev=12,a(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[2,10,12,15]])})));return function(t){return e.apply(this,arguments)}}();return(0,Cn.jsxs)("form",{onSubmit:r(c),encType:"multipart/form-data",children:[(0,Cn.jsxs)(hA,{container:!0,columnSpacing:2,rowSpacing:1,children:[(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"bold",children:"Rapport de frais de facturation"})}),(0,Cn.jsx)(hA,{item:!0,xs:!0,container:!0,spacing:1,flexWrap:"nowrap",children:(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(dg,{label:"Imp\xf4ts",size:"small",variant:"filled",sx:function(e){return{backgroundColor:e.palette.pink1.main}}})})})]}),(0,Cn.jsx)(vm,{sx:{mt:1.25,mb:2}}),(0,Cn.jsxs)(hA,{container:!0,spacing:3,pt:1,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,mb:2,children:(0,Cn.jsx)(qh,{variant:"body1",children:"Pour g\xe9n\xe9rer le rapport, veuillez s\xe9lectionner la date de d\xe9but et la date de fin puis cliquer sur le bouton vert."})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(u0,{name:"start_date",control:n,rules:{required:!0},options:{label:"Date de d\xe9but"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(u0,{name:"end_date",control:n,rules:{required:!0},options:{label:"Date de fin"}})}),(0,Cn.jsx)(hA,{item:!0,sx:{display:"flex",justifyContent:{xs:"flex-end",md:"flex-start"},flex:{xs:1}},children:(0,Cn.jsx)(J$,{type:"submit",variant:"contained",color:"primary",onClick:r(c),endIcon:(0,Cn.jsx)(c0,{}),loading:i,loadingPosition:"end",children:"G\xe9n\xe9rer le rapport"})})]})]})}function X0(){var e,n=Bg(E0),r=n.loading,o=(n.error,n.data),i=(null===o||void 0===o||null===(e=o.md)||void 0===e?void 0:e.MdGrps)||[],a=Nw({defaultValues:{md_grp_id:null,start_date:null,end_date:null}}),c=a.control,l=(a.register,a.handleSubmit),p=(a.formState.errors,a.formState,a.watch,a.reset,a.getValues),u=s((0,t.useState)(!1),2),d=u[0],b=u[1],f=function(){var e=lb(sb().mark((function e(t){var n,r,o,a,s,c;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),n=t.md_grp_id,r=t.start_date,o=t.end_date,a=i.find((function(e){return e.id==n})),e.prev=3,e.next=6,gc.get("storage/generate-revenus-report",{responseType:"blob",timeout:2e4,params:t});case 6:s=e.sent,c="revenus-groupe-".concat(a.grp,"-").concat(r,"-au-").concat(o,".pdf"),YK().saveAs(s.data,c),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(3);case 13:return e.prev=13,b(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[3,11,13,16]])})));return function(t){return e.apply(this,arguments)}}();return(0,Cn.jsxs)("form",{onSubmit:l(f),encType:"multipart/form-data",children:[(0,Cn.jsxs)(hA,{container:!0,columnSpacing:2,rowSpacing:1,children:[(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"bold",children:"Rapport de revenus"})}),(0,Cn.jsx)(hA,{item:!0,xs:!0,container:!0,spacing:1,flexWrap:"nowrap",children:(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(dg,{label:"Imp\xf4ts",size:"small",variant:"filled",sx:function(e){return{backgroundColor:e.palette.pink1.main}}})})})]}),(0,Cn.jsx)(vm,{sx:{mt:1.25,mb:2}}),(0,Cn.jsxs)(hA,{container:!0,spacing:3,pt:1,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,mb:2,children:(0,Cn.jsx)(qh,{variant:"body1",children:"Pour g\xe9n\xe9rer le rapport, veuillez s\xe9lectionner le groupe, la date de d\xe9but et la date de fin puis cliquer sur le bouton vert."})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(l0,{name:"md_grp_id",control:c,rules:{required:!0},autocompleteOptions:{options:i,valuePropertyName:"id",loading:r,getOptionLabel:function(e){var t=e.grp;e.inc_legal_name;if(e===p("md_grp_id")){var n=i.find((function(t){return t.id===e}));return n?"".concat(n.grp):""}return"".concat(t)},isOptionEqualToValue:function(e,t){return e.id===t}},textFieldOptions:{label:"Groupe"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(u0,{name:"start_date",control:c,rules:{required:!0},options:{label:"Date de d\xe9but"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(u0,{name:"end_date",control:c,rules:{required:!0},options:{label:"Date de fin"}})}),(0,Cn.jsx)(hA,{item:!0,sx:{display:"flex",justifyContent:{xs:"flex-end",md:"flex-start"},flex:{xs:1}},children:(0,Cn.jsx)(J$,{type:"submit",variant:"contained",color:"primary",onClick:l(f),endIcon:(0,Cn.jsx)(c0,{}),loading:d,loadingPosition:"end",children:"G\xe9n\xe9rer le rapport"})})]})]})}function j0(){var e=Nw({defaultValues:{order_by:"name"}}),n=e.control,r=(e.register,e.handleSubmit),o=(e.formState.errors,e.formState,e.watch,e.reset,e.getValues,s((0,t.useState)(!1),2)),i=o[0],a=o[1],c=function(){var e=lb(sb().mark((function e(t){var n;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),t.order_by,e.prev=2,e.next=5,gc.get("storage/generate-visites-periodiques-report",{responseType:"blob",timeout:2e4,params:t});case 5:n=e.sent,"visites-periodiques.pdf",YK().saveAs(n.data,"visites-periodiques.pdf"),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(2);case 12:return e.prev=12,a(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[2,10,12,15]])})));return function(t){return e.apply(this,arguments)}}();return(0,Cn.jsxs)("form",{onSubmit:r(c),encType:"multipart/form-data",children:[(0,Cn.jsxs)(hA,{container:!0,columnSpacing:2,rowSpacing:1,children:[(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"bold",children:"Rapport des visites p\xe9riodiques non-r\xe9clam\xe9es de l'ann\xe9e en cours"})}),(0,Cn.jsx)(hA,{item:!0,xs:!0,container:!0,spacing:1,flexWrap:"nowrap",children:(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(dg,{label:"Nouveau",size:"small",variant:"filled",sx:function(e){return{backgroundColor:e.palette.blue1.main}}})})})]}),(0,Cn.jsx)(vm,{sx:{mt:1.25,mb:2}}),(0,Cn.jsxs)(hA,{container:!0,spacing:3,pt:1,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,sm:6,md:4,lg:4,xl:2,children:(0,Cn.jsx)(W0,{name:"order_by",control:n,options:{label:"Ordonnance"},dropdownOptions:[{value:"name",label:"Nom du patient"},{value:"date",label:"Date de la derni\xe8re visite"}].map((function(e,t){return(0,Cn.jsx)(nm,{value:e.value,children:e.label},t)}))})}),(0,Cn.jsx)(hA,{item:!0,sx:{display:"flex",justifyContent:{xs:"flex-end",md:"flex-start"},flex:{xs:1}},children:(0,Cn.jsx)(J$,{type:"submit",variant:"contained",color:"primary",onClick:r(c),endIcon:(0,Cn.jsx)(c0,{}),loading:i,loadingPosition:"end",children:"G\xe9n\xe9rer le rapport"})})]})]})}function I0(){var e=Nw({defaultValues:{}}),n=(e.control,e.register,e.handleSubmit),r=(e.formState.errors,e.formState,e.watch,e.reset,e.getValues,s((0,t.useState)(!1),2)),o=r[0],i=r[1],a=function(){var e=lb(sb().mark((function e(t){var n;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.prev=1,e.next=4,gc.get("storage/generate-diabete-trimestriel-report",{responseType:"blob",timeout:2e4,params:t});case 4:n=e.sent,"diabete-trimestriel.pdf",YK().saveAs(n.data,"diabete-trimestriel.pdf"),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:return e.prev=11,i(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,9,11,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,Cn.jsxs)("form",{onSubmit:n(a),encType:"multipart/form-data",children:[(0,Cn.jsxs)(hA,{container:!0,columnSpacing:2,rowSpacing:1,children:[(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"bold",children:"Rapport de diab\xe8te (trimestriel)"})}),(0,Cn.jsx)(hA,{item:!0,xs:!0,container:!0,spacing:1,flexWrap:"nowrap",children:(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(dg,{label:"Nouveau",size:"small",variant:"filled",sx:function(e){return{backgroundColor:e.palette.blue1.main}}})})})]}),(0,Cn.jsx)(vm,{sx:{mt:1.25,mb:2}}),(0,Cn.jsx)(hA,{container:!0,spacing:3,pt:1,children:(0,Cn.jsx)(hA,{item:!0,sx:{display:"flex",justifyContent:{xs:"flex-end",md:"flex-start"},flex:{xs:1}},children:(0,Cn.jsx)(J$,{type:"submit",variant:"contained",color:"primary",onClick:n(a),endIcon:(0,Cn.jsx)(c0,{}),loading:o,loadingPosition:"end",children:"G\xe9n\xe9rer le rapport"})})})]})}function D0(){var e=Nw({defaultValues:{}}),n=(e.control,e.register,e.handleSubmit),r=(e.formState.errors,e.formState,e.watch,e.reset,e.getValues,s((0,t.useState)(!1),2)),o=r[0],i=r[1],a=function(){var e=lb(sb().mark((function e(t){var n;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.prev=1,e.next=4,gc.get("storage/generate-diabete-annuel-report",{responseType:"blob",timeout:2e4,params:t});case 4:n=e.sent,"diabete-annuel.pdf",YK().saveAs(n.data,"diabete-annuel.pdf"),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:return e.prev=11,i(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,9,11,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,Cn.jsxs)("form",{onSubmit:n(a),encType:"multipart/form-data",children:[(0,Cn.jsxs)(hA,{container:!0,columnSpacing:2,rowSpacing:1,children:[(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"bold",children:"Rapport de diab\xe8te (annuel)"})}),(0,Cn.jsx)(hA,{item:!0,xs:!0,container:!0,spacing:1,flexWrap:"nowrap",children:(0,Cn.jsx)(hA,{item:!0,children:(0,Cn.jsx)(dg,{label:"Nouveau",size:"small",variant:"filled",sx:function(e){return{backgroundColor:e.palette.blue1.main}}})})})]}),(0,Cn.jsx)(vm,{sx:{mt:1.25,mb:2}}),(0,Cn.jsx)(hA,{container:!0,spacing:3,pt:1,children:(0,Cn.jsx)(hA,{item:!0,sx:{display:"flex",justifyContent:{xs:"flex-end",md:"flex-start"},flex:{xs:1}},children:(0,Cn.jsx)(J$,{type:"submit",variant:"contained",color:"primary",onClick:n(a),endIcon:(0,Cn.jsx)(c0,{}),loading:o,loadingPosition:"end",children:"G\xe9n\xe9rer le rapport"})})})]})}var F0=[(0,Cn.jsx)(qh,{fontSize:15,children:"Autre"},"1"),(0,Cn.jsx)(qh,{fontSize:15,children:"Rapports"},"1")];function H0(){return(0,Cn.jsxs)(hA,{container:!0,children:[(0,Cn.jsxs)(hA,{item:!0,xs:12,children:[(0,Cn.jsx)(qh,{variant:"h5",fontWeight:"600",children:"Rapports"}),(0,Cn.jsx)(EW,{separator:(0,Cn.jsx)(iE,{fontSize:"small"}),sx:{mt:.5,mb:{mobile:2,tablet:3,desktop:4}},children:F0})]}),(0,Cn.jsxs)(hA,{container:!0,rowSpacing:8,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(N0,{})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(j0,{})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(B0,{})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(X0,{})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(I0,{})}),(0,Cn.jsx)(hA,{item:!0,xs:12,children:(0,Cn.jsx)(D0,{})})]})]})}var V0=cm((0,Cn.jsx)("path",{d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"PersonOutlined"),U0=cm((0,Cn.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}),"PaymentOutlined"),G0=cm((0,Cn.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"}),"LockOutlined"),Y0=cm((0,Cn.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined"),K0=__webpack_require__(763);function Q0(e){return Zf("MuiSnackbarContent",e)}eh("MuiSnackbarContent",["root","message","action"]);var $0=["action","className","message","role"],J0=$f(Lh,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t=e.theme,n="light"===t.palette.mode?.8:.98,r=Yt(t.palette.background.default,n);return c({},t.typography.body2,ne({color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(r),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1},t.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}))})),Z0=$f("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:function(e,t){return t.message}})({padding:"8px 0"}),e1=$f("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:function(e,t){return t.action}})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),t1=t.forwardRef((function(e,t){var n=wn({props:e,name:"MuiSnackbarContent"}),r=n.action,o=n.className,i=n.message,a=n.role,s=void 0===a?"alert":a,l=Qe(n,$0),p=n,u=function(e){return Cf({root:["root"],action:["action"],message:["message"]},Q0,e.classes)}(p);return(0,Cn.jsxs)(J0,c({role:s,square:!0,elevation:6,className:ub(u.root,o),ownerState:p,ref:t},l,{children:[(0,Cn.jsx)(Z0,{className:u.message,ownerState:p,children:i}),r?(0,Cn.jsx)(e1,{className:u.action,ownerState:p,children:r}):null]}))})),n1=t1;function r1(e){return Zf("MuiSnackbar",e)}eh("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);var o1,i1,a1=["onEnter","onExited"],s1=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],c1=$f("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["anchorOrigin".concat(Ef(n.anchorOrigin.vertical)).concat(Ef(n.anchorOrigin.horizontal))]]}})((function(e){var t=e.theme,n=e.ownerState;return c({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},ne({},t.breakpoints.up("sm"),c({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===n.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===n.anchorOrigin.horizontal&&{right:24,left:"auto"})))})),l1=t.forwardRef((function(e,n){var r=wn({props:e,name:"MuiSnackbar"}),o=Wh(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},a=r.action,l=r.anchorOrigin,p=(l=void 0===l?{vertical:"bottom",horizontal:"left"}:l).vertical,u=l.horizontal,d=r.autoHideDuration,b=void 0===d?null:d,f=r.children,h=r.className,M=r.ClickAwayListenerProps,z=r.ContentProps,O=r.disableWindowBlurListener,m=void 0!==O&&O,g=r.message,v=r.onBlur,A=r.onClose,y=r.onFocus,x=r.onMouseEnter,q=r.onMouseLeave,w=r.open,W=r.resumeHideDuration,R=r.TransitionComponent,C=void 0===R?Tz:R,_=r.transitionDuration,S=void 0===_?i:_,k=r.TransitionProps,L=(k=void 0===k?{}:k).onEnter,E=k.onExited,T=Qe(r.TransitionProps,a1),N=Qe(r,s1),P=c({},r,{anchorOrigin:{vertical:p,horizontal:u}}),B=function(e){var t=e.classes,n=e.anchorOrigin;return Cf({root:["root","anchorOrigin".concat(Ef(n.vertical)).concat(Ef(n.horizontal))]},r1,t)}(P),X=t.useRef(),j=s(t.useState(!0),2),I=j[0],D=j[1],F=oO((function(){A&&A.apply(void 0,arguments)})),H=oO((function(e){A&&null!=e&&(clearTimeout(X.current),X.current=setTimeout((function(){F(null,"timeout")}),e))}));t.useEffect((function(){return w&&H(b),function(){clearTimeout(X.current)}}),[w,b,H]);var V=function(){clearTimeout(X.current)},U=t.useCallback((function(){null!=b&&H(null!=W?W:.5*b)}),[b,W,H]);return t.useEffect((function(){if(!m&&w)return window.addEventListener("focus",U),window.addEventListener("blur",V),function(){window.removeEventListener("focus",U),window.removeEventListener("blur",V)}}),[m,U,w]),t.useEffect((function(){if(w)return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||A&&A(e,"escapeKeyDown")}}),[I,w,A]),!w&&I?null:(0,Cn.jsx)(WB,c({onClickAway:function(e){A&&A(e,"clickaway")}},M,{children:(0,Cn.jsx)(c1,c({className:ub(B.root,h),onBlur:function(e){v&&v(e),U()},onFocus:function(e){y&&y(e),V()},onMouseEnter:function(e){x&&x(e),V()},onMouseLeave:function(e){q&&q(e),U()},ownerState:P,ref:n,role:"presentation"},N,{children:(0,Cn.jsx)(C,c({appear:!0,in:w,timeout:S,direction:"top"===p?"down":"up",onEnter:function(e,t){D(!1),L&&L(e,t)},onExited:function(e){D(!0),E&&E(e)}},T,{children:f||(0,Cn.jsx)(n1,c({message:g,action:a},z))}))}))}))})),p1=l1,u1=Bv(o1||(o1=Rf(["\n ","\n\n query getMd {\n md {\n ...MdFields\n }\n }\n"])),XG),d1=Bv(i1||(i1=Rf(["\n mutation UpdateMd(\n $id: Int\n $is_still_client: Boolean\n $left_on: Date\n $can_login: Boolean\n $qb_customer_id: Int\n $qb_customer_fully_qualified_name: String\n $is_billable: Boolean\n $is_billable_until: Date\n $should_receive_reports: Boolean\n $should_receive_reports_until: Date\n $wants_invoice_emails: Boolean\n $wants_ec_emails: Boolean\n $wants_newsletter_emails: Boolean\n ) {\n updateMd(\n id: $id\n is_still_client: $is_still_client\n left_on: $left_on\n can_login: $can_login\n qb_customer_id: $qb_customer_id\n qb_customer_fully_qualified_name: $qb_customer_fully_qualified_name\n is_billable: $is_billable\n is_billable_until: $is_billable_until\n should_receive_reports: $should_receive_reports\n should_receive_reports_until: $should_receive_reports_until\n wants_invoice_emails: $wants_invoice_emails\n wants_ec_emails: $wants_ec_emails\n wants_newsletter_emails: $wants_newsletter_emails\n ) {\n id\n }\n }\n"])));function b1(){Wh();var e=Bg(u1,{}),n=e.loading,r=(e.error,e.data),o=e.refetch,i=(e.networkStatus,(null===r||void 0===r?void 0:r.md)||{}),a=Nw({defaultValues:{id:i.id,is_still_client:i.is_still_client,left_on:i.left_on,can_login:i.can_login,qb_customer_id:i.qb_customer_id,qb_customer_fully_qualified_name:i.qb_customer_fully_qualified_name||"",is_billable:i.is_billable,is_billable_until:i.is_billable_until,should_receive_reports:i.should_receive_reports,should_receive_reports_until:i.should_receive_reports_until,wants_invoice_emails:i.wants_invoice_emails,wants_ec_emails:i.wants_ec_emails,wants_newsletter_emails:i.wants_newsletter_emails}}),c=a.control,l=(a.register,a.handleSubmit),p=(a.formState.errors,a.formState,a.watch,a.reset);(0,t.useEffect)((function(){var e=(null===r||void 0===r?void 0:r.md)||{};(0,K0.isEmpty)(e)||p({id:e.id,is_still_client:e.is_still_client,left_on:e.left_on,can_login:e.can_login,qb_customer_id:e.qb_customer_id,qb_customer_fully_qualified_name:e.qb_customer_fully_qualified_name,is_billable:e.is_billable,is_billable_until:e.is_billable_until,should_receive_reports:e.should_receive_reports,should_receive_reports_until:e.should_receive_reports_until,wants_invoice_emails:e.wants_invoice_emails,wants_ec_emails:e.wants_ec_emails,wants_newsletter_emails:e.wants_newsletter_emails})}),[p,r]);var u=s(Pw(d1,{}),2),d=u[0],b=u[1],f=b.loading,h=b.error,M=(b.data,function(){var e=lb(sb().mark((function e(t){return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),e.next=3,d({variables:{id:t.id,is_still_client:t.is_still_client,left_on:t.left_on,can_login:t.can_login,qb_customer_id:t.qb_customer_id,qb_customer_fully_qualified_name:t.qb_customer_fully_qualified_name,is_billable:t.is_billable,is_billable_until:t.is_billable_until,should_receive_reports:t.should_receive_reports,should_receive_reports_until:t.should_receive_reports_until,wants_invoice_emails:t.wants_invoice_emails,wants_ec_emails:t.wants_ec_emails,wants_newsletter_emails:t.wants_newsletter_emails}});case 3:o();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),z=s((0,t.useState)(!1),2),O=z[0],m=z[1],g=function(e,t){"clickaway"!==t&&m(!1)};(0,t.useEffect)((function(){return m(!!h)}),[h]);return n?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",sx:{minHeight:"300px"},children:(0,Cn.jsx)(wh,{})}):(0,Cn.jsxs)(Lh,{sx:{p:2},children:[(0,Cn.jsx)("form",{onSubmit:l(M),encType:"multipart/form-data",children:(0,Cn.jsxs)(hA,{container:!0,spacing:3,children:[(0,Cn.jsxs)(hA,{item:!0,container:!0,mt:2,children:[(0,Cn.jsxs)(hA,{item:!0,xs:12,mb:3,children:[(0,Cn.jsx)(qh,{variant:"subtitle1",fontWeight:"500",children:"Informations personnelles"}),(0,Cn.jsx)(vm,{sx:{mt:2}})]}),(0,Cn.jsxs)(hA,{container:!0,item:!0,xs:12,spacing:2,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(R0,{name:"first_name",control:c,options:{label:"Pr\xe9nom"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(R0,{name:"last_name",control:c,options:{label:"Nom"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(u0,{name:"dob",control:c,options:{label:"Date de naissance"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(q0,{name:"phone_mobile",control:c,options:{label:"Num\xe9ro de t\xe9l\xe9phone mobile"},phone:!0,nullable:!0})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(q0,{name:"phone_home",control:c,options:{label:"Num\xe9ro de t\xe9l\xe9phone maison"},phone:!0,nullable:!0})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(q0,{name:"phone_work",control:c,options:{label:"Num\xe9ro de t\xe9l\xe9phone travail"},phone:!0,nullable:!0})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:6,children:(0,Cn.jsx)(R0,{name:"email",control:c,options:{label:"Adresse courriel"}})})]})]}),(0,Cn.jsxs)(hA,{item:!0,container:!0,mt:2,children:[(0,Cn.jsxs)(hA,{item:!0,xs:12,mb:3,children:[(0,Cn.jsx)(qh,{variant:"subtitle1",fontWeight:"500",children:"Adresse"}),(0,Cn.jsx)(vm,{sx:{mt:2}})]}),(0,Cn.jsxs)(hA,{container:!0,item:!0,xs:12,spacing:2,children:[(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(R0,{name:"address1",control:c,options:{label:"Adresse 1"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(R0,{name:"address2",control:c,options:{label:"Adresse 2"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:4,children:(0,Cn.jsx)(u0,{name:"city",control:c,options:{label:"Ville"}})}),(0,Cn.jsx)(hA,{item:!0,xs:12,lg:6,children:(0,Cn.jsx)(R0,{name:"zip",control:c,options:{label:"Code postal"}})})]})]}),(0,Cn.jsx)(hA,{item:!0,xs:12,container:!0,justifyContent:"flex-end",mt:0,children:(0,Cn.jsx)(tq,{type:"submit",variant:"contained",disabled:f,children:"Sauvegarder"})})]})}),(0,Cn.jsx)(p1,{open:O,autoHideDuration:6e3,onClose:g,anchorOrigin:{vertical:"top",horizontal:"center"},children:(0,Cn.jsx)(bW,{onClose:g,severity:"error",sx:{width:"100%"},children:Hs(h)})})]})}var f1=[{title:"Informations personnelles",icon:(0,Cn.jsx)(V0,{fontSize:"small"}),content:(0,Cn.jsx)(b1,{}),navigateTo:"/profil/informations-personnelles"},{title:"Pr\xe9f\xe9rences paiements",icon:(0,Cn.jsx)(U0,{fontSize:"small"}),content:(0,Cn.jsx)(b1,{}),navigateTo:"/profil/preferences-paiements"},{title:"Mot de passe",icon:(0,Cn.jsx)(G0,{fontSize:"small"}),content:(0,Cn.jsx)(b1,{}),navigateTo:"/profil/mot-de-passe"},{title:"Param\xe8tres",icon:(0,Cn.jsx)(Y0,{fontSize:"small"}),content:(0,Cn.jsx)(b1,{}),navigateTo:"/profil/parametres"}];function h1(){var e=Kv(),t=(Wh(),N());P();return(0,Cn.jsxs)(hA,{container:!0,spacing:3,children:[(0,Cn.jsx)(hA,{item:!0,xs:2.7,children:(0,Cn.jsxs)(Lh,{sx:{p:2},children:[(0,Cn.jsxs)(Wf,{display:"flex",flexDirection:"column",alignItems:"center",mt:2,mb:4,children:[(0,Cn.jsx)(Mm,{src:"",sx:{width:70,height:70}}),(0,Cn.jsxs)(qh,{variant:"h5",fontWeight:"500",sx:{mt:2},children:[e.drPrefix," ",e.md.first_name," ",e.md.last_name]}),(0,Cn.jsx)(qh,{variant:"h6",fontWeight:"500",sx:{mt:.5},children:"Omnipraticien"})]}),(0,Cn.jsx)(Az,{children:f1.map((function(e,n){var r=e.title,o=e.icon,i=e.navigateTo,a=t.pathname===i;return(0,Cn.jsxs)(Jm,{component:J,to:i,selected:a,children:[(0,Cn.jsx)(qm,{children:o}),(0,Cn.jsx)(ng,{children:r})]},n)}))})]})}),(0,Cn.jsx)(hA,{item:!0,xs:9.3,children:(0,Cn.jsx)(D,{})})]})}var M1="/login",z1="/forgot-password",O1="/maintenance",m1="/tableau-de-bord";function g1(e){var t=e.children,n=Kv(),r=N();return n.isLoading?(0,Cn.jsx)(Wf,{display:"flex",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh",children:(0,Cn.jsx)(wh,{})}):n.md?t:(0,Cn.jsx)(I,{to:M1,state:{from:r},replace:!0})}function v1(e){var t=e.children,n=Kv(),r=N();return n.md?(0,Cn.jsx)(I,{to:m1,state:{from:r},replace:!0}):t}function A1(e){var n=e.children,r=Kv(),o=N(),i=s((0,t.useState)(!1),2),a=i[0],c=i[1],l=function(){var e=lb(sb().mark((function e(){var t;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gc.get("api-status");case 2:t=e.sent,c(t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,t.useEffect)((function(){l()}),[]),a?r.isLoading?n:r.md?(0,Cn.jsx)(I,{to:m1,state:{from:o},replace:!0}):(0,Cn.jsx)(I,{to:M1,state:{from:o},replace:!0}):n}var y1,x1=function(){return(0,Cn.jsxs)(V,{children:[(0,Cn.jsx)(F,{path:M1,element:(0,Cn.jsx)(v1,{children:(0,Cn.jsx)(Kw,{})})}),(0,Cn.jsx)(F,{path:z1,element:(0,Cn.jsx)(hW,{})}),(0,Cn.jsx)(F,{path:"/reset-password",element:(0,Cn.jsx)(zW,{})}),(0,Cn.jsx)(F,{path:O1,element:(0,Cn.jsx)(A1,{children:(0,Cn.jsx)(kZ,{})})}),(0,Cn.jsxs)(F,{path:"",element:(0,Cn.jsx)(g1,{children:(0,Cn.jsx)(rA,{})}),children:[(0,Cn.jsx)(F,{path:"/tableau-de-bord",element:(0,Cn.jsx)($Z,{})}),(0,Cn.jsx)(F,{path:"/etats-de-compte",element:(0,Cn.jsx)(MJ,{})}),(0,Cn.jsx)(F,{path:"/calendrier-reclamations",element:(0,Cn.jsx)(sZ,{})}),(0,Cn.jsx)(F,{path:"/demandes",element:(0,Cn.jsx)(YY,{})}),(0,Cn.jsx)(F,{path:"/rapports",element:(0,Cn.jsx)(H0,{})}),(0,Cn.jsx)(F,{path:"/facture-ramq",element:(0,Cn.jsx)(vK,{})}),(0,Cn.jsx)(F,{path:"/factures",element:(0,Cn.jsx)(s0,{})}),(0,Cn.jsxs)(F,{path:"profil",element:(0,Cn.jsx)(h1,{}),children:[(0,Cn.jsx)(F,{path:"informations-personnelles",element:(0,Cn.jsx)(b1,{})}),(0,Cn.jsx)(F,{path:"preferences-paiements",element:(0,Cn.jsx)(b1,{})}),(0,Cn.jsx)(F,{path:"mot-de-passe",element:(0,Cn.jsx)(b1,{})}),(0,Cn.jsx)(F,{path:"parametres",element:(0,Cn.jsx)(b1,{})})]}),(0,Cn.jsx)(F,{path:"",element:(0,Cn.jsx)($Z,{})})]}),(0,Cn.jsx)(F,{path:"*",element:(0,Cn.jsx)(OW,{})})]})},q1=Ol.from,w1=new ep({uri:"".concat("https://api.fmparadis.com","/graphql")}),W1=new Ol((function(e,t){return e.setContext((function(e){return{headers:oe(oe({},e.headers),{},{authorization:"Bearer ".concat(zc.getAuthToken())})}})),t(e)})),R1=function(e,t){return ib((function(n){var r=n.graphQLErrors,o=n.networkError;n.operation,n.forward;return o?function(e,t,n){var r=e.cause,o=e.name,i=e.message,a=e.stack,s=e.statusCode;console.warn("[GraphQL network error]: ".concat(e)),console.warn("[Cause]: ",r),console.warn("[Name]: ",o),console.warn("[Message]: ",i),console.warn("[Stack]: ",a),console.warn("[StatusCode]: ",s),503===s&&(console.log("Service Unavailable, redirecting..."),console.log(n.pathname),n.pathname!==O1&&t(O1))}(o,e,t):r?function(e,t,n){console.warn("[GraphQL errors]: ".concat(e)),e.map((function(e){var n=e.extensions;console.log("[extensions] :",n),n&&"UNAUTHENTICATED"===n.code&&(console.log("[extensions.code] :",n.code),zc.removeAuthToken(),t(M1))}))}(r,e):void(r&&console.log("[graphQLErrors]",r))}))},C1=function(){function e(){Ce(this,e)}return Se(e,null,[{key:"initialize",value:function(e,t){var n={link:q1([W1,R1(e,t),w1]),cache:new Sd};return new ob(n)}}]),e}(),_1=Uv(y1||(y1=Rf(["\n query GetMd {\n md {\n id\n created_at\n updated_at\n licence_sm\n email\n password\n first_name\n last_name\n first_name_smchar\n last_name_smchar\n sex\n retraite_on\n avatar_url\n is_still_client\n can_login\n address1\n address2\n city\n zip\n phone_mobile\n phone_home\n phone_work\n joined_on\n left_on\n balance\n }\n }\n"])));function S1(e){var n=e.children,r=s((0,t.useState)(null),2),o=r[0],i=r[1],a=s((0,t.useState)(!0),2),c=a[0],l=a[1];(0,t.useEffect)((function(){d()}),[]);var p=Dg(_1,{onCompleted:function(e){var t=e.md;i(t),l(!1)},onError:function(){i(null),l(!1)}}),u=s(p,2),d=u[0],b=u[1],f=(b.loading,b.error),h=(b.data,b.called,b.previousData,b.refetch),M=function(){var e=lb(sb().mark((function e(t){var n;return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return zc.login(t),l(!0),e.next=4,h();case 4:return n=e.sent,i(n.data.md),l(!1),e.abrupt("return",!0);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),z=function(){var e=lb(sb().mark((function e(){return sb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return zc.logout(),i(null),e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O={md:o,error:f,isLoading:c,drPrefix:o?1===o.sex?"Dr":"Dre":"",login:M,logout:z};return(0,Cn.jsx)(Yv.Provider,{value:O,children:n})}var k1={typography:{fontSize:12.5,h4:{fontSize:"1.35rem"},h5:{fontSize:"1.05rem"},h6:{fontSize:"0.95rem"}},palette:{primary:{main:"#84bc00",contrastText:"#ffffff"},secondary:{light:"#0066ff",main:"rgb(30,30,30)",contrastText:"#ffffff"},warning:{main:"#bf9a4c"},error:{main:"#dc3545"},success:{main:"#28a745"},info:{main:"#17a2b8"},badge:{main:"rgb(45,45,45)"},blue:{main:"#4caabf",contrastText:"white"},pink:{main:"#bf4c6d",contrastText:"white"},blue1:{main:"#c4f1fc"},blue1Dark:{main:"#4caabf",contrastText:"white"},blue1Light:{main:"#def4f9"},pink1:{main:"#f9c2d2"},pink1Dark:{main:"#bf4c6d",dark:"#85354c",light:"#cb6f8a",contrastText:"white"},pink1Light:{main:"#fce0e8"},beige1:{main:"#f7d6c0"},beige1Dark:{main:"#bf7a4c"},beige1Light:{main:"#f9e9de"},green1:{main:"#daf7c0"},green1Dark:{main:"#83bf4c"},green1Light:{main:"#ebf9de"},yellow1:{main:"#f7e6c0"},yellow1Dark:{main:"#bf9a4c"},yellow1Light:{main:"#f9f1de"},red1:{main:"#f7c0c0"},red1Dark:{main:"#c44e4e"},red1Light:{main:"#f9dede"},gray1:{main:"#e2e2e2"},gray1Dark:{main:"#8c8c8c"},gray1Light:{main:"#eaeaea"},background:{default:"rgb(240,240,245)",paper:"rgb(245,245,250)"},text:{primary:"rgb(70,70,80, 0.87)",secondary:"rgb(70,70,80, 0.6)",disabled:"rgb(70,70,80, 0.38)"},contrastThreshold:3,tonalOffset:.2},breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536,mobile:0,tablet:640,laptop:1024,desktop:1200}}};function L1(){var e=Mc((function(e){return e.general})),n=t.useMemo((function(){return xn(oe(oe({},k1),{},{palette:oe(oe({},k1.palette),{},{mode:e.isThemeDark?"dark":"light"}),components:{MuiGrid:{styleOverrides:{root:{".MuiDataGrid-overlay":{height:"auto !important"}}}}}}))}),[e]);return(0,Cn.jsx)(Zr,{theme:n,children:(0,Cn.jsx)(x1,{})})}var E1=function(){var e=function(e,t){gc.initialize();var n=C1.initialize(e,t);return to().locale("fr"),to().tz.setDefault("America/Montreal"),so.setLicenseKey("3ca61947a13d977357b9bc0b87bcaabbTz00NTIwOCxFPTE2ODYxNTkwMDQyODQsUz1wcm8sTE09c3Vic2NyaXB0aW9uLEtWPTI="),{graphqlClient:n}}(P(),N()),t=e.graphqlClient;return(0,Cn.jsx)(ho,{store:hc,children:(0,Cn.jsx)(Sn,{dateAdapter:io,children:(0,Cn.jsx)(Ge,{client:t,children:(0,Cn.jsx)(S1,{children:(0,Cn.jsx)(L1,{})})})})})},T1=function(e){e&&e instanceof Function&&__webpack_require__.e(787).then(__webpack_require__.bind(__webpack_require__,787)).then((function(t){var n=t.getCLS,r=t.getFID,o=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),r(e),o(e),i(e),a(e)}))};r.render((0,Cn.jsx)(t.StrictMode,{children:(0,Cn.jsx)($,{children:(0,Cn.jsx)(E1,{})})}),document.getElementById("root")),T1()}()})(); //# sourceMappingURL=main.6541e9e9.js.map