dash_mantine_components 2.6.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dash_mantine_components/async-AreaChart.js +1 -1
- package/dash_mantine_components/async-BarChart.js +1 -1
- package/dash_mantine_components/async-BubbleChart.js +1 -1
- package/dash_mantine_components/async-CodeHighlight.js +1 -1
- package/dash_mantine_components/async-CodeHighlightTabs.js +1 -1
- package/dash_mantine_components/async-CompositeChart.js +1 -1
- package/dash_mantine_components/async-DonutChart.js +1 -1
- package/dash_mantine_components/async-FunnelChart.js +1 -0
- package/dash_mantine_components/async-Heatmap.js +1 -0
- package/dash_mantine_components/async-InlineCodeHighlight.js +1 -1
- package/dash_mantine_components/async-LineChart.js +1 -1
- package/dash_mantine_components/async-PieChart.js +1 -1
- package/dash_mantine_components/async-RadarChart.js +1 -1
- package/dash_mantine_components/async-RichTextEditor.js +1 -1
- package/dash_mantine_components/async-ScatterChart.js +1 -1
- package/dash_mantine_components/async-Sparkline.js +1 -1
- package/dash_mantine_components/dash_mantine_components-charts-shared.js +1 -1
- package/dash_mantine_components/dash_mantine_components.js +1 -1
- package/dash_mantine_components/proptypes.js +480 -106
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[857],{
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[857],{58061(e,t,i){i.r(t),i.d(t,{default:()=>F});var r=i(31635),o=i(74848),a=i(40295),s=i.n(a),n=i(86279),l=i(84124),c=i(91222),d=i(5614),p=i(57158),u=i(44653),h=i(28327),m=i(34296),y=i(77984),x=i(23495),f=i(51658),v=i(15894),k=(0,h.gu)({chartName:"ComposedChart",GraphicalChild:[n.N,l.G,c.y,m.X],axisComponents:[{axisType:"xAxis",AxisComp:y.W},{axisType:"yAxis",AxisComp:x.h},{axisType:"zAxis",AxisComp:f.K}],formatAxisMap:v.pr}),A=i(97018),C=i(91706),P=i(69107),b=i(78687),g=i(59396),D=i(86344),N=i(2412),S=i(46100),L=i(602),j=i(99274),w=i(36904),O=i(58424),z=i(6585),I=i(45849),W=i(89133),K=i(88498);const T={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone"},M=(0,g.V)((e,{textColor:t,gridColor:i})=>({root:{"--chart-text-color":t?(0,D.r)(t,e):void 0,"--chart-grid-color":i?(0,D.r)(i,e):void 0}})),$=(0,N.P9)((e,t)=>{const i=(0,S.Y)("CompositeChart",T,e),{classNames:r,className:s,style:h,styles:m,unstyled:f,vars:v,data:g,withLegend:N,legendProps:$,series:_,onMouseLeave:Y,dataKey:B,withTooltip:F,withXAxis:Q,withYAxis:E,gridAxis:X,tickLine:G,xAxisProps:R,yAxisProps:H,unit:J,tooltipAnimationDuration:V,strokeDasharray:Z,gridProps:q,tooltipProps:U,referenceLines:ee,withDots:te,dotProps:ie,activeDotProps:re,strokeWidth:oe,connectNulls:ae,curveType:se,dir:ne,valueFormatter:le,children:ce,lineProps:de,xAxisLabel:pe,yAxisLabel:ue,withRightYAxis:he,rightYAxisLabel:me,rightYAxisProps:ye,withPointLabels:xe,areaProps:fe,barProps:ve,withBarValueLabel:ke,minBarSize:Ae,maxBarWidth:Ce,composedChartProps:Pe,attributes:be,...ge}=i,De=(0,L.xd)(),Ne="none"!==X&&("x"===G||"xy"===G),Se="none"!==X&&("y"===G||"xy"===G),[Le,je]=(0,a.useState)(null),we=null!==Le,{resolvedClassNames:Oe,resolvedStyles:ze}=(0,j.Y)({classNames:r,styles:m,props:i}),Ie=(0,w.I)({name:"CompositeChart",classes:W.A,props:i,className:s,style:h,classNames:r,styles:m,unstyled:f,attributes:be,vars:v,varsResolver:M}),We=_.map(e=>{const t=(0,D.r)(e.color,De),i=we&&Le!==e.name;return"line"===e.type?(0,a.createElement)(n.N,{...Ie("line"),key:e.name,name:e.name,dataKey:e.name,dot:!!te&&{fillOpacity:i?0:1,strokeOpacity:i?0:1,strokeWidth:1,fill:t,stroke:t,...ie},activeDot:!!te&&{fill:"var(--mantine-color-white)",stroke:t,...re},fill:t,stroke:t,strokeWidth:oe,isAnimationActive:!1,fillOpacity:i?0:1,strokeOpacity:i?.5:1,connectNulls:ae,type:se,strokeDasharray:e.strokeDasharray,yAxisId:e.yAxisId||"left",label:xe?(0,o.jsx)(K.x,{valueFormatter:le}):void 0,..."function"==typeof de?de(e):de}):"area"===e.type?(0,a.createElement)(l.G,{...Ie("area"),key:e.name,name:e.name,type:se,dataKey:e.name,fill:t,strokeWidth:oe,stroke:t,isAnimationActive:!1,connectNulls:ae,dot:!!te&&{fillOpacity:i?0:1,strokeOpacity:i?0:1,strokeWidth:1,fill:t,stroke:t,...ie},activeDot:!!te&&{fill:De.white,stroke:t,strokeWidth:2,r:4,...re},fillOpacity:i?0:.2,strokeOpacity:i?.5:1,strokeDasharray:e.strokeDasharray,yAxisId:e.yAxisId||"left",label:xe?(0,o.jsx)(K.x,{valueFormatter:le}):void 0,..."function"==typeof fe?fe(e):fe}):"bar"===e.type?(0,a.createElement)(c.y,{...Ie("bar"),key:e.name,name:e.name,dataKey:e.name,fill:t,stroke:t,isAnimationActive:!1,fillOpacity:i?.1:1,strokeOpacity:i?.2:0,yAxisId:e.yAxisId||"left",minPointSize:Ae,..."function"==typeof ve?ve(e):ve},ke&&(0,o.jsx)(d.Z,{position:"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:e=>le?.(e)})):null}),Ke=ee?.map((e,t)=>{const i=(0,D.r)(e.color,De);return(0,o.jsx)(p.e,{stroke:e.color?i:"var(--chart-grid-color)",strokeWidth:1,yAxisId:e.yAxisId||"left",...e,label:{value:e.label,fill:e.color?i:"currentColor",fontSize:12,position:e.labelPosition??"insideBottomLeft"},...Ie("referenceLine")},t)}),Te={axisLine:!1,type:"number",tickLine:!!Se&&{stroke:"currentColor"},allowDecimals:!0,unit:J,tickFormatter:le,...Ie("axis")};return(0,o.jsx)(O.a,{ref:t,...Ie("root"),onMouseLeave:e=>{je(null),Y?.(e)},dir:ne||"ltr",...ge,children:(0,o.jsx)(u.u,{...Ie("container"),children:(0,o.jsxs)(k,{data:g,maxBarSize:Ce,margin:{bottom:pe?30:void 0,left:ue?10:void 0,right:ue?5:void 0},...Pe,children:[N&&(0,o.jsx)(A.s,{verticalAlign:"top",content:e=>(0,o.jsx)(z._,{payload:e.payload,onHighlight:je,legendPosition:$?.verticalAlign||"top",classNames:Oe,styles:ze,series:_,attributes:be}),...$}),(0,o.jsxs)(y.W,{hide:!Q,dataKey:B,tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:!!Ne&&{stroke:"currentColor"},minTickGap:5,...Ie("axis"),...R,children:[pe&&(0,o.jsx)(C.J,{position:"insideBottom",offset:-20,fontSize:12,...Ie("axisLabel"),children:pe}),R?.children]}),(0,o.jsxs)(x.h,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!E,...Te,...H,children:[ue&&(0,o.jsx)(C.J,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Ie("axisLabel"),children:ue}),H?.children]}),(0,o.jsxs)(x.h,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!he,...Te,...ye,children:[me&&(0,o.jsx)(C.J,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Ie("axisLabel"),children:me}),H?.children]}),(0,o.jsx)(P.d,{strokeDasharray:Z,vertical:"y"===X||"xy"===X,horizontal:"x"===X||"xy"===X,...Ie("grid"),...q}),F&&(0,o.jsx)(b.m,{animationDuration:V,isAnimationActive:0!==V,position:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:Z},content:({label:e,payload:t,labelFormatter:i})=>(0,o.jsx)(I.I,{label:i&&t?i(e,t):e,payload:t,unit:J,classNames:Oe,styles:ze,series:_,valueFormatter:le,attributes:be}),...U}),We,Ke,ce]})})})});$.displayName="@mantine/charts/CompositeChart",$.classes=W.A,i(19319);var _=i(83837),Y=i(57479),B=i(68734);const F=function(e){var t=e.setProps,i=e.loading_state,o=(e.clickData,e.hoverData,e.highlightHover),n=void 0!==o&&o,l=(e.hoverSeriesName,e.clickSeriesName,e.composedChartProps),c=e.barProps,d=e.lineProps,p=e.areaProps,u=e.activeDotProps,h=e.series,m=e.data,y=e.dataKey,x=(0,r.Tt)(e,["setProps","loading_state","clickData","hoverData","highlightHover","hoverSeriesName","clickSeriesName","composedChartProps","barProps","lineProps","areaProps","activeDotProps","series","data","dataKey"]),f=(0,a.useState)(null),v=f[0],k=f[1],A=n&&null!==v,C=(0,a.useRef)(null),P=function(e){var t,i,r;(0,_.$Q)(e)&&(C.current=null!==(r=null===(i=null===(t=e.tooltipPayload)||void 0===t?void 0:t[0])||void 0===i?void 0:i.name)&&void 0!==r?r:e.name)},b=function(e){var t,i,r;if((0,_.$Q)(e)){var o=null!==(r=null===(i=null===(t=e.tooltipPayload)||void 0===t?void 0:t[0])||void 0===i?void 0:i.name)&&void 0!==r?r:e.name;C.current=o,k(o)}},g=function(){k(null)},D=function(e,t){var i=null,o=A&&v!==e.name;return"bar"===t?i=null!=c?c:{}:"area"===t?i=null!=p?p:{}:"line"===t&&(i=null!=d?d:{}),o&&(i.fillOpacity=.1,i.strokeOpacity=.2),(0,r.Cl)((0,r.Cl)({},i),{onClick:P,onMouseOver:b,onMouseOut:g})},N=(0,r.Cl)((0,r.Cl)({},l),{onClick:function(e){(0,_.$Q)(e)&&t({clickSeriesName:C.current,clickData:(0,_.X$)(e)}),C.current=null},onMouseOver:function(e){(0,_.$Q)(e)&&t({hoverSeriesName:C.current,hoverData:(0,_.X$)(e)}),C.current=null}});return s().createElement($,(0,r.Cl)({"data-dash-is-loading":(0,Y.A_)(i)||void 0},(0,B.s)("CompositeChart",x),{data:m,dataKey:y,series:h,composedChartProps:N,barProps:function(e){return D(e,"bar")},lineProps:function(e){return D(e,"line")},areaProps:function(e){return D(e,"area")},activeDotProps:(0,r.Cl)((0,r.Cl)({},u),{onClick:function(e,t){(0,_.$Q)(e)&&(C.current=t.dataKey)},onMouseOver:function(e,t){if((0,_.$Q)(e)){var i=t.dataKey;C.current=i,k(i)}},onMouseOut:g})}))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[990],{
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[990],{39043(e,a,t){t.r(a),t.d(a,{default:()=>w});var s=t(31635),l=t(74848),o=t(72050),r=t(44653),i=t(62209),n=t(63161),c=t(78687),d=t(59396),m=t(86344),h=t(88149),p=t(2412),v=t(46100),u=t(602),y=t(36904),b=t(99274),k=t(58424),x=t(45849),f={root:"m_a410e613",label:"m_ddb0bfe3"};const g={withTooltip:!0,withLabelsLine:!0,paddingAngle:0,thickness:20,size:160,strokeWidth:1,startAngle:0,endAngle:360,labelsType:"value",tooltipDataSource:"all"},A=(0,d.V)((e,{strokeColor:a,labelColor:t,withLabels:s,size:l})=>({root:{"--chart-stroke-color":a?(0,m.r)(a,e):void 0,"--chart-labels-color":t?(0,m.r)(t,e):void 0,"--chart-size":s?(0,h.D)(l+80):(0,h.D)(l)}})),D=(e,a,t,s)=>"percent"===e?`${(100*(t||0)).toFixed(0)}%`:"function"==typeof s?s(a||0):a,C=(e,a)=>({x:t,y:s,cx:o,cy:r,percent:i,value:n})=>(0,l.jsx)("text",{x:t,y:s,cx:o,cy:r,textAnchor:t>o?"start":"end",fill:"var(--chart-labels-color, var(--mantine-color-dimmed))",fontFamily:"var(--mantine-font-family)",fontSize:12,children:(0,l.jsx)("tspan",{x:t,children:D(e,n,i,a)})}),N=(0,p.P9)((e,a)=>{const t=(0,v.Y)("DonutChart",g,e),{classNames:s,className:d,style:h,styles:p,unstyled:D,vars:N,data:j,withTooltip:P,tooltipAnimationDuration:S,tooltipProps:_,pieProps:w,paddingAngle:z,withLabels:L,withLabelsLine:F,size:T,thickness:W,strokeWidth:I,startAngle:R,endAngle:$,tooltipDataSource:Q,chartLabel:Y,children:B,pieChartProps:E,valueFormatter:K,strokeColor:M,labelsType:O,attributes:V,cellProps:q,...G}=t,H=(0,u.xd)(),J=(0,y.I)({name:"DonutChart",classes:f,props:t,className:d,style:h,classNames:s,styles:p,unstyled:D,attributes:V,vars:N,varsResolver:A}),{resolvedClassNames:U,resolvedStyles:X}=(0,b.Y)({classNames:s,styles:p,props:t}),Z=j.map((e,a)=>(0,l.jsx)(o.f,{fill:(0,m.r)(e.color,H),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth:I,..."function"==typeof q?q(e):q},a));return(0,l.jsx)(k.a,{ref:a,size:T,...J("root"),...G,children:(0,l.jsx)(r.u,{children:(0,l.jsxs)(i.r,{...E,children:[(0,l.jsx)(n.F,{data:j,innerRadius:T/2-W,outerRadius:T/2,dataKey:"value",isAnimationActive:!1,paddingAngle:z,startAngle:R,endAngle:$,label:!!L&&C(O||"value",K),labelLine:!!F&&{stroke:"var(--chart-label-color, var(--mantine-color-dimmed))",strokeWidth:1},...w,children:Z}),Y&&(0,l.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",...J("label"),children:Y}),P&&(0,l.jsx)(c.m,{animationDuration:S,isAnimationActive:!1,content:({payload:e})=>(0,l.jsx)(x.I,{payload:j,classNames:U,styles:X,type:"radial",segmentId:"segment"===Q?e?.[0]?.name:void 0,valueFormatter:K,attributes:V}),..._}),B]})})})});N.displayName="@mantine/charts/DonutChart",N.classes=f,t(19319);var j=t(40295),P=t.n(j),S=t(83837),_=t(57479);const w=function(e){var a=e.setProps,t=e.loading_state,l=(e.clickData,e.hoverData,e.clickSeriesName,e.hoverSeriesName,e.pieProps),o=(0,s.Tt)(e,["setProps","loading_state","clickData","hoverData","clickSeriesName","hoverSeriesName","pieProps"]),r=(0,s.Cl)((0,s.Cl)({},l),{onClick:function(e){if((0,S.$Q)(e)){var t=(0,S.jz)(e);a({clickData:t,clickSeriesName:t.name})}},onMouseOver:function(e){if((0,S.$Q)(e)){var t=(0,S.jz)(e);a({hoverData:t,hoverSeriesName:t.name})}}});return P().createElement(N,(0,s.Cl)({"data-dash-is-loading":(0,_.A_)(t)||void 0,pieProps:r},o))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[142],{83729(t){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},16547(t,e,r){var n=r(43360),o=r(75288),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var i=t[e];a.call(t,e)&&o(i,r)&&(void 0!==r||e in t)||n(t,e,r)}},74733(t,e,r){var n=r(21791),o=r(95950);t.exports=function(t,e){return t&&n(e,o(e),t)}},43838(t,e,r){var n=r(21791),o=r(37241);t.exports=function(t,e){return t&&n(e,o(e),t)}},9999(t,e,r){var n=r(37217),o=r(83729),a=r(16547),i=r(74733),c=r(43838),s=r(93290),u=r(23007),l=r(92271),p=r(48948),f=r(50002),y=r(83349),v=r(5861),d=r(76189),h=r(77199),b=r(35529),m=r(56449),j=r(3656),g=r(87730),w=r(23805),O=r(38440),x=r(95950),A=r(37241),S="[object Arguments]",P="[object Function]",k="[object Object]",D={};D[S]=D["[object Array]"]=D["[object ArrayBuffer]"]=D["[object DataView]"]=D["[object Boolean]"]=D["[object Date]"]=D["[object Float32Array]"]=D["[object Float64Array]"]=D["[object Int8Array]"]=D["[object Int16Array]"]=D["[object Int32Array]"]=D["[object Map]"]=D["[object Number]"]=D[k]=D["[object RegExp]"]=D["[object Set]"]=D["[object String]"]=D["[object Symbol]"]=D["[object Uint8Array]"]=D["[object Uint8ClampedArray]"]=D["[object Uint16Array]"]=D["[object Uint32Array]"]=!0,D["[object Error]"]=D[P]=D["[object WeakMap]"]=!1,t.exports=function t(e,r,T,W,z,E){var I,C=1&r,_=2&r,F=4&r;if(T&&(I=z?T(e,W,z,E):T(e)),void 0!==I)return I;if(!w(e))return e;var N=m(e);if(N){if(I=d(e),!C)return u(e,I)}else{var B=v(e),M=B==P||"[object GeneratorFunction]"==B;if(j(e))return s(e,C);if(B==k||B==S||M&&!z){if(I=_||M?{}:b(e),!C)return _?p(e,c(I,e)):l(e,i(I,e))}else{if(!D[B])return z?e:{};I=h(e,B,C)}}E||(E=new n);var R=E.get(e);if(R)return R;E.set(e,I),O(e)?e.forEach(function(n){I.add(t(n,r,T,n,e,E))}):g(e)&&e.forEach(function(n,o){I.set(o,t(n,r,T,o,e,E))});var U=N?void 0:(F?_?y:f:_?A:x)(e);return o(U||e,function(n,o){U&&(n=e[o=n]),a(I,o,t(n,r,T,o,e,E))}),I}},39344(t,e,r){var n=r(23805),o=Object.create,a=function(){function t(){}return function(e){if(!n(e))return{};if(o)return o(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=a},29172(t,e,r){var n=r(5861),o=r(40346);t.exports=function(t){return o(t)&&"[object Map]"==n(t)}},16038(t,e,r){var n=r(5861),o=r(40346);t.exports=function(t){return o(t)&&"[object Set]"==n(t)}},72903(t,e,r){var n=r(23805),o=r(55527),a=r(90181),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return a(t);var e=o(t),r=[];for(var c in t)("constructor"!=c||!e&&i.call(t,c))&&r.push(c);return r}},19931(t,e,r){var n=r(31769),o=r(68090),a=r(68969),i=r(77797),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=-1,s=(e=n(e,t)).length;if(!s)return!0;for(;++r<s;){var u=i(e[r]);if("__proto__"===u&&!c.call(t,"__proto__"))return!1;if(("constructor"===u||"prototype"===u)&&r<s-1)return!1}var l=a(t,e);return null==l||delete l[i(o(e))]}},49653(t,e,r){var n=r(37828);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},93290(t,e,r){t=r.nmd(t);var n=r(9325),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,i=a&&a.exports===o?n.Buffer:void 0,c=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=c?c(r):new t.constructor(r);return t.copy(n),n}},76169(t,e,r){var n=r(49653);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},73201(t){var e=/\w*$/;t.exports=function(t){var r=new t.constructor(t.source,e.exec(t));return r.lastIndex=t.lastIndex,r}},93736(t,e,r){var n=r(51873),o=n?n.prototype:void 0,a=o?o.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},71961(t,e,r){var n=r(49653);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},23007(t){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},21791(t,e,r){var n=r(16547),o=r(43360);t.exports=function(t,e,r,a){var i=!r;r||(r={});for(var c=-1,s=e.length;++c<s;){var u=e[c],l=a?a(r[u],t[u],u,r,t):void 0;void 0===l&&(l=t[u]),i?o(r,u,l):n(r,u,l)}return r}},92271(t,e,r){var n=r(21791),o=r(4664);t.exports=function(t,e){return n(t,o(t),e)}},48948(t,e,r){var n=r(21791),o=r(86375);t.exports=function(t,e){return n(t,o(t),e)}},53138(t,e,r){var n=r(11331);t.exports=function(t){return n(t)?void 0:t}},38816(t,e,r){var n=r(35970),o=r(56757),a=r(32865);t.exports=function(t){return a(o(t,void 0,n),t+"")}},83349(t,e,r){var n=r(82199),o=r(86375),a=r(37241);t.exports=function(t){return n(t,a,o)}},86375(t,e,r){var n=r(14528),o=r(28879),a=r(4664),i=r(63345),c=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,a(t)),t=o(t);return e}:i;t.exports=c},76189(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t){var r=t.length,n=new t.constructor(r);return r&&"string"==typeof t[0]&&e.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},77199(t,e,r){var n=r(49653),o=r(76169),a=r(73201),i=r(93736),c=r(71961);t.exports=function(t,e,r){var s=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return o(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return c(t,r);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return a(t);case"[object Symbol]":return i(t)}}},35529(t,e,r){var n=r(39344),o=r(28879),a=r(55527);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:n(o(t))}},90181(t){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},68969(t,e,r){var n=r(47422),o=r(25160);t.exports=function(t,e){return e.length<2?t:n(t,o(e,0,-1))}},35970(t,e,r){var n=r(83120);t.exports=function(t){return null!=t&&t.length?n(t,1):[]}},87730(t,e,r){var n=r(29172),o=r(27301),a=r(86009),i=a&&a.isMap,c=i?o(i):n;t.exports=c},38440(t,e,r){var n=r(16038),o=r(27301),a=r(86009),i=a&&a.isSet,c=i?o(i):n;t.exports=c},37241(t,e,r){var n=r(70695),o=r(72903),a=r(64894);t.exports=function(t){return a(t)?n(t,!0):o(t)}},90179(t,e,r){var n=r(34932),o=r(9999),a=r(19931),i=r(31769),c=r(21791),s=r(53138),u=r(38816),l=r(83349),p=u(function(t,e){var r={};if(null==t)return r;var u=!1;e=n(e,function(e){return e=i(e,t),u||(u=e.length>1),e}),c(t,l(t),r),u&&(r=o(r,7,s));for(var p=e.length;p--;)a(r,e[p]);return r});t.exports=p},1123(t,e,r){"use strict";r.r(e),r.d(e,{default:()=>ht});var n,o=r(31635),a=r(74848),i=r(44653),c=r(28327),s=r(40295),u=r.n(s),l=r(87011),p=r(1882),f=r.n(p),y=r(98023),v=r.n(y),d=r(85015),h=r.n(d),b=r(90179),m=r.n(b),j=r(2404),g=r.n(j),w=r(34164),O=r(86069),x=r(5614),A=r(72050),S=r(94501),P=r(59938),k=r(59744),D=r(63036),T=r(98940),W=r(15079);function z(t){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z(t)}function E(){return E=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},E.apply(this,arguments)}function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function C(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?I(Object(r),!0).forEach(function(e){var n,o,a,i;n=t,o=e,a=r[e],i=function(t){if("object"!=z(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o),(o="symbol"==z(i)?i:i+"")in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _(t,e){var r="".concat(e.x||t.x),n=parseInt(r,10),o="".concat(e.y||t.y),a=parseInt(o,10),i="".concat((null==e?void 0:e.height)||(null==t?void 0:t.height)),c=parseInt(i,10);return C(C(C({},e),(0,W.RO)(t)),{},{height:c,x:n,y:a})}function F(t){return u().createElement(W.yp,E({shapeType:"trapezoid",propTransformer:_},t))}function N(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function M(t){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(t)}function R(){return R=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},R.apply(this,arguments)}function U(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function V(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?U(Object(r),!0).forEach(function(e){X(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function K(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,G(n.key),n)}}function L(t,e,r){return e=Y(e),function(t,e){if(e&&("object"===M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,H()?Reflect.construct(e,r||[],Y(t).constructor):e.apply(t,r))}function H(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(H=function(){return!!t})()}function Y(t){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Y(t)}function $(t,e){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$(t,e)}function X(t,e,r){return(e=G(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G(t){var e=function(t){if("object"!=M(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==M(e)?e:e+""}var Q=function(t){function e(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return X(t=L(this,e,[].concat(n)),"state",{isAnimationFinished:!1}),X(t,"handleAnimationEnd",function(){var e=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),f()(e)&&e()}),X(t,"handleAnimationStart",function(){var e=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),f()(e)&&e()}),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}(e,t),r=e,o=[{key:"getDerivedStateFromProps",value:function(t,e){return t.animationId!==e.prevAnimationId?{prevAnimationId:t.animationId,curTrapezoids:t.trapezoids,prevTrapezoids:e.curTrapezoids}:t.trapezoids!==e.curTrapezoids?{curTrapezoids:t.trapezoids}:null}}],(n=[{key:"isActiveIndex",value:function(t){var e=this.props.activeIndex;return Array.isArray(e)?-1!==e.indexOf(t):t===e}},{key:"renderTrapezoidsStatically",value:function(t){var e=this,r=this.props,n=r.shape,o=r.activeShape;return t.map(function(t,r){var a=e.isActiveIndex(r)?o:n,i=V(V({},t),{},{isActive:e.isActiveIndex(r),stroke:t.stroke});return u().createElement(O.W,R({className:"recharts-funnel-trapezoid"},(0,T.XC)(e.props,t,r),{key:"trapezoid-".concat(null==t?void 0:t.x,"-").concat(null==t?void 0:t.y,"-").concat(null==t?void 0:t.name,"-").concat(null==t?void 0:t.value),role:"img"}),u().createElement(F,R({option:a},i)))})}},{key:"renderTrapezoidsWithAnimation",value:function(){var t=this,e=this.props,r=e.trapezoids,n=e.isAnimationActive,o=e.animationBegin,a=e.animationDuration,i=e.animationEasing,c=e.animationId,s=this.state.prevTrapezoids;return u().createElement(l.Ay,{begin:o,duration:a,isActive:n,easing:i,from:{t:0},to:{t:1},key:"funnel-".concat(c),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(e){var n=e.t,o=r.map(function(t,e){var r=s&&s[e];if(r){var o=(0,k.Dj)(r.x,t.x),a=(0,k.Dj)(r.y,t.y),i=(0,k.Dj)(r.upperWidth,t.upperWidth),c=(0,k.Dj)(r.lowerWidth,t.lowerWidth),u=(0,k.Dj)(r.height,t.height);return V(V({},t),{},{x:o(n),y:a(n),upperWidth:i(n),lowerWidth:c(n),height:u(n)})}var l=(0,k.Dj)(t.x+t.upperWidth/2,t.x),p=(0,k.Dj)(t.y+t.height/2,t.y),f=(0,k.Dj)(0,t.upperWidth),y=(0,k.Dj)(0,t.lowerWidth),v=(0,k.Dj)(0,t.height);return V(V({},t),{},{x:l(n),y:p(n),upperWidth:f(n),lowerWidth:y(n),height:v(n)})});return u().createElement(O.W,null,t.renderTrapezoidsStatically(o))})}},{key:"renderTrapezoids",value:function(){var t=this.props,e=t.trapezoids,r=t.isAnimationActive,n=this.state.prevTrapezoids;return!(r&&e&&e.length)||n&&g()(n,e)?this.renderTrapezoidsStatically(e):this.renderTrapezoidsWithAnimation()}},{key:"render",value:function(){var t=this.props,e=t.hide,r=t.trapezoids,n=t.className,o=t.isAnimationActive,a=this.state.isAnimationFinished;if(e||!r||!r.length)return null;var i=(0,w.A)("recharts-trapezoids",n);return u().createElement(O.W,{className:i},this.renderTrapezoids(),(!o||a)&&x.Z.renderCallByParent(this.props,r))}}])&&K(r.prototype,n),o&&K(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(s.PureComponent);n=Q,X(Q,"displayName","Funnel"),X(Q,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",labelLine:!0,hide:!1,isAnimationActive:!P.m.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",lastShapeType:"triangle"}),X(Q,"getRealFunnelData",function(t){var e=t.props,r=e.data,n=e.children,o=(0,S.J9)(t.props,!1),a=(0,S.aS)(n,A.f);return r&&r.length?r.map(function(t,e){return V(V(V({payload:t},o),t),a&&a[e]&&a[e].props)}):a&&a.length?a.map(function(t){return V(V({},o),t.props)}):[]}),X(Q,"getRealWidthHeight",function(t,e){var r=t.props.width,n=e.width,o=e.height,a=e.left,i=e.right,c=e.top,s=e.bottom,u=o,l=n;return v()(r)?l=r:h()(r)&&(l=l*parseFloat(r)/100),{realWidth:l-a-i-50,realHeight:u-s-c,offsetX:(n-l)/2,offsetY:(o-u)/2}}),X(Q,"getComposedData",function(t){var e=t.item,r=t.offset,o=n.getRealFunnelData(e),a=e.props,i=a.dataKey,c=a.nameKey,s=a.tooltipType,u=a.lastShapeType,l=a.reversed,p=r.left,f=r.top,y=n.getRealWidthHeight(e,r),v=y.realHeight,d=y.realWidth,h=y.offsetX,b=y.offsetY,j=Math.max.apply(null,o.map(function(t){return(0,D.kr)(t,i,0)})),g=o.length,w=v/g,O={x:r.left,y:r.top,width:r.width,height:r.height},x=o.map(function(t,e){var r,n=(0,D.kr)(t,i,0),a=(0,D.kr)(t,c,e),l=n;if(e!==g-1)(r=(0,D.kr)(o[e+1],i,0))instanceof Array&&(r=N(r,1)[0]);else if(n instanceof Array&&2===n.length){var y=N(n,2);l=y[0],r=y[1]}else r="rectangle"===u?l:0;var v=(j-l)*d/(2*j)+f+25+h,x=w*e+p+b,A=l/j*d,S=r/j*d,P=[{name:a,value:l,payload:t,dataKey:i,type:s}],k={x:v+A/2,y:x+w/2};return V(V({x:v,y:x,width:Math.max(A,S),upperWidth:A,lowerWidth:S,height:w,name:a,val:l,tooltipPayload:P,tooltipPosition:k},m()(t,"width")),{},{payload:t,parentViewBox:O,labelViewBox:{x:v+(A-S)/4,y:x,width:Math.abs(A-S)/2+Math.min(A,S),height:w}})});return l&&(x=x.map(function(t,e){var r=t.y-e*w+(g-1-e)*w;return V(V({},t),{},{upperWidth:t.lowerWidth,lowerWidth:t.upperWidth,x:t.x-(t.lowerWidth-t.upperWidth)/2,y:t.y-e*w+(g-1-e)*w,tooltipPosition:V(V({},t.tooltipPosition),{},{y:r+w/2}),labelViewBox:V(V({},t.labelViewBox),{},{y:r})})})),{trapezoids:x,data:o}});var Z=(0,c.gu)({chartName:"FunnelChart",GraphicalChild:Q,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",axisComponents:[],defaultProps:{layout:"centric"}}),J=r(78687),q=r(59396),tt=r(86344),et=r(88149),rt=r(2412),nt=r(46100),ot=r(602),at=r(36904),it=r(99274),ct=r(58424),st=r(45849),ut={root:"m_80d531e7"};const lt={withTooltip:!0,size:300,strokeWidth:1,withLabels:!1,labelsPosition:"right",tooltipDataSource:"all"},pt=(0,q.V)((t,{strokeColor:e,labelColor:r,size:n})=>({root:{"--chart-stroke-color":e?(0,tt.r)(e,t):void 0,"--chart-labels-color":r?(0,tt.r)(r,t):void 0,"--chart-size":(0,et.D)(n)}})),ft=(0,rt.P9)((t,e)=>{const r=(0,nt.Y)("FunnelChart",lt,t),{classNames:n,className:o,style:c,styles:s,unstyled:u,vars:l,data:p,withTooltip:f,tooltipAnimationDuration:y,tooltipProps:v,strokeWidth:d,withLabels:h,size:b,valueFormatter:m,children:j,funnelChartProps:g,funnelProps:w,labelsPosition:O,tooltipDataSource:S,attributes:P,...k}=r,D=(0,ot.xd)(),T=(0,at.I)({name:"FunnelChart",classes:ut,props:r,className:o,style:c,classNames:n,styles:s,unstyled:u,attributes:P,vars:l,varsResolver:pt}),{resolvedClassNames:W,resolvedStyles:z}=(0,it.Y)({classNames:n,styles:s,props:r});return(0,a.jsx)(ct.a,{ref:e,size:b,...T("root"),...k,children:(0,a.jsx)(i.u,{children:(0,a.jsxs)(Z,{...g,children:[(0,a.jsxs)(Q,{data:p,dataKey:"value",isAnimationActive:!1,stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth:d,...w,children:[h&&(0,a.jsx)(x.Z,{position:O,fill:"inside"===O?"var(--chart-labels-color, var(--mantine-color-white))":"var(--chart-labels-color, var(--mantine-color-dimmed))",stroke:"none",fontFamily:"var(--mantine-font-family)",fontSize:14,dataKey:t=>"function"==typeof m?m(t.value):t.value}),p.map((t,e)=>(0,a.jsx)(A.f,{fill:(0,tt.r)(t.color,D),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth:d},e))]}),f&&(0,a.jsx)(J.m,{animationDuration:y,isAnimationActive:!1,content:({payload:t})=>(0,a.jsx)(st.I,{payload:p,classNames:W,styles:z,type:"radial",segmentId:"segment"===S?t?.[0]?.name:void 0,valueFormatter:m,attributes:P}),...v}),j]})})})});ft.displayName="@mantine/charts/FunnelChart",ft.classes=ut,r(19319);var yt=r(83837),vt=r(57479),dt=r(68734);const ht=function(t){var e=t.setProps,r=t.loading_state,n=(t.clickData,t.hoverData,t.clickSeriesName,t.hoverSeriesName,t.funnelProps),a=t.data,i=(0,o.Tt)(t,["setProps","loading_state","clickData","hoverData","clickSeriesName","hoverSeriesName","funnelProps","data"]),c=(0,o.Cl)((0,o.Cl)({},n),{onClick:function(t){if((0,yt.$Q)(t)){var r=(0,yt.Vc)(t);e({clickData:r,clickSeriesName:r.name})}},onMouseOver:function(t){if((0,yt.$Q)(t)){var r=(0,yt.Vc)(t);e({hoverData:r,hoverSeriesName:r.name})}}});return u().createElement(ft,(0,o.Cl)({"data-dash-is-loading":(0,vt.A_)(r)||void 0},(0,dt.s)("FunnelChart",i),{data:a,funnelProps:c}))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[146],{41245(e,t,n){n.r(t),n.d(t,{default:()=>b});var a=n(31635),r=n(74848),s=n(40295),l=n.n(s),o=n(2412),i=n(46100),u=n(36904),c=n(58424),h=n(57238);function d(e,t){if(!t)return e.map((e,t)=>{const n=e.find(e=>null!==e);return{type:"column",month:new Date(n).getUTCMonth(),weekIndex:t}});const n=[];e.forEach((e,t)=>{const a=e.map(e=>e?new Date(e).getUTCMonth():null);let r=null,s=null;for(let e=0;e<a.length;e+=1)if(null!==a[e])if(null===r)r=a[e];else if(a[e]!==r){s=e;break}if(null!==r)if(null===s)n.push({type:"column",month:r,weekIndex:t});else{let e=null;for(let t=s;t<a.length;t+=1)if(null!==a[t]){e=a[t];break}null===e?n.push({type:"column",month:r,weekIndex:t}):(n.push({type:"column",month:r,weekIndex:t}),n.push({type:"column",month:e,weekIndex:t}))}});const a=[];for(let e=0;e<n.length;e+=1)e>0&&n[e].month!==n[e-1].month&&a.push({type:"spacer"}),a.push(n[e]);return a}function m(e,t){return new Date(e.getTime()+864e5*t)}function p(e){if("string"==typeof e){const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const e=Number(t[1]),n=Number(t[2])-1,a=Number(t[3]);return new Date(Date.UTC(e,n,a))}const n=new Date(e);return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))}return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))}var f={root:"m_2ef228c3",rect:"m_2ef201c5",monthLabel:"m_7e977775",weekdayLabel:"m_c4b68f8d"};function g({value:e,min:t,max:n,colors:a}){const r=(e-t)/(n-t);return a[Math.round((a.length-1)*r)]}function w({data:e,datesRange:t,rectSize:n,gap:a,rectRadius:s,min:l,max:o,colors:i,withTooltip:u,setHoveredRect:c,getRectProps:h,getStyles:m}){const p=n+a,f=d(t,!0);return(0,r.jsx)(r.Fragment,{children:f.map((d,f)=>{if("spacer"===d.type)return(0,r.jsx)("g",{transform:`translate(${f*p}, 0)`},`spacer-${f}`);const w=t[d.weekIndex].map((t,f)=>{if(!t)return null;if(new Date(t).getUTCMonth()!==d.month)return null;const w=t in e&&null!==e[t],v=w?e[t]:null;return(0,r.jsx)("rect",{width:n,height:n,x:a,y:f*p+a,rx:s,"data-empty":!w||void 0,fill:w?g({value:e[t],min:l,max:o,colors:i}):void 0,onPointerEnter:u?()=>c({date:t,value:v}):void 0,...h?.({date:t,value:v}),...m("rect")},`${t}-${d.month}`)});return(0,r.jsx)("g",{transform:`translate(${f*p}, 0)`,"data-id":"week",children:w},`col-${d.weekIndex}-${d.month}-${f}`)})})}function v({data:e,datesRange:t,rectSize:n,gap:a,rectRadius:s,min:l,max:o,colors:i,withTooltip:u,setHoveredRect:c,getRectProps:h,getStyles:d}){const m=n+a;return(0,r.jsx)(r.Fragment,{children:t.map((t,p)=>{const f=t.map((t,p)=>{if(!t)return null;const f=t in e&&null!==e[t],w=f?e[t]:null;return(0,r.jsx)("rect",{width:n,height:n,x:a,y:p*m+a,rx:s,"data-empty":!f||void 0,fill:f?g({value:e[t],min:l,max:o,colors:i}):void 0,onPointerEnter:u?()=>c({date:t,value:w}):void 0,...h?.({date:t,value:w}),...d("rect")},t)});return(0,r.jsx)("g",{transform:`translate(${p*m}, 0)`,"data-id":"week",children:f},p)})})}const D={monthLabels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdayLabels:["Sun","Mon","","Wed","","Fri",""],withOutsideDates:!0,firstDayOfWeek:1,rectSize:10,weekdaysLabelsWidth:30,monthsLabelsHeight:14,gap:1,rectRadius:2,fontSize:12,colors:["var(--heatmap-level-1)","var(--heatmap-level-2)","var(--heatmap-level-3)","var(--heatmap-level-4)"]},y=(0,o.P9)((e,t)=>{const n=(0,i.Y)("Heatmap",D,e),{classNames:a,className:l,style:o,styles:g,unstyled:y,vars:x,data:k,startDate:b,endDate:T,withMonthLabels:C,withWeekdayLabels:M,weekdayLabels:S,withOutsideDates:j,monthLabels:L,firstDayOfWeek:R,rectSize:U=10,gap:$=1,rectRadius:z,domain:P,colors:_,weekdaysLabelsWidth:O,monthsLabelsHeight:F,fontSize:H,getTooltipLabel:N,withTooltip:I,tooltipProps:W,getRectProps:A,splitMonths:E,attributes:Y,...J}=n,q=(0,u.I)({name:"Heatmap",classes:f,props:n,className:l,style:o,classNames:a,styles:g,unstyled:y,attributes:Y,vars:x}),[B,G]=(0,s.useState)(null),K=U+$,Q=M?O:0,V=C?F:0,[X,Z]=function({data:e,domain:t}){if(Array.isArray(t))return t;const n=Object.values(e);return[Math.min(...n),Math.max(...n)]}({data:k,domain:P}),ee=(0,s.useMemo)(()=>function(e,t){const n=[...e];for(let e=0;e<t;e+=1)n.push(n.shift());return n}(S,R),[S,R]),te=function({startDate:e,endDate:t,withOutsideDates:n=!0,firstDayOfWeek:a=1}={}){const r=new Date,s=new Date(r.getFullYear()-1,r.getMonth(),r.getDate()),l=r,o=p(e||s),i=p(t||l),u=function(e,t){let n=new Date(e);for(;n.getUTCDay()!==t;)n=m(n,-1);return n}(o,a),c=function(e,t){const n=e.getUTCDay();return m(e,6-((n<t?7:0)+n-t))}(i,a),h=[];let d=u;for(;d<=c;){const e=Array.from({length:7},(e,t)=>{const a=m(d,t);return n||a>=o&&a<=i?`${(r=a).getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`:null;var r});h.push(e),d=m(d,7)}return h}({startDate:b,endDate:T,withOutsideDates:j,firstDayOfWeek:R}),ne=C||E?function(e){let t=0,n=null;const a=[];return e.forEach(e=>{const r=null===e[0]?e[e.length-1]:e[0],s=new Date(r).getUTCMonth();n!==s&&(n=s,a.push({month:n,position:t,size:0})),a[a.length-1].size+=1,t+=1}),a}(te):[],ae={data:k,datesRange:te,rectSize:U,gap:$,rectRadius:z,min:X,max:Z,colors:_,withTooltip:I,setHoveredRect:G,getRectProps:A,getStyles:q},re=E?(0,r.jsx)(w,{...ae}):(0,r.jsx)(v,{...ae}),se=E?d(te,E).length:te.length,le=(e,t)=>{if(!E)return e*K+$+Q;const n=ne[t],a=function(e,t){for(let n=0;n<e.length;n+=1){const a=e[n];if("column"===a.type&&a.month===t)return n}return-1}(d(te,E),n.month);return((a>=0?a:e)+1)*K+$+Q},oe=C&&L?ne.map((e,t)=>{const n=E?2:3;if(e.size<n)return null;const a=L[e.month];return(0,r.jsx)("text",{x:le(e.position,t),y:F-4,width:e.size*K,fontSize:H,...q("monthLabel"),children:a},t)}):null,ie=M&&S?ee.map((e,t)=>(0,r.jsx)("text",{x:0,y:(t+1)*K-$+V,width:O,fontSize:H,...q("weekdayLabel"),children:e},t)):null,ue=N&&B&&I?N(B):null;return(0,r.jsxs)(c.a,{component:"svg",ref:t,width:K*se+$+Q,height:7*K+$+V,...q("root"),...J,children:[(0,r.jsx)(h.m.Floating,{label:ue,disabled:!I||!ue,position:"top",...W,children:(0,r.jsxs)("g",{transform:`translate(${Q}, ${V})`,"data-id":"all-weeks",children:[I&&(0,r.jsx)("rect",{fill:"transparent",width:K*se+$,height:7*K+$}),re]})}),ie,oe]})});y.displayName="@mantine/charts/Heatmap",y.classes=f,n(19319);var x=n(57479),k=n(68734);const b=function(e){var t=e.setProps,n=e.loading_state,r=e.data,s=(e.clickData,e.hoverData,(0,a.Tt)(e,["setProps","loading_state","data","clickData","hoverData"]));return l().createElement(y,(0,a.Cl)({"data-dash-is-loading":(0,x.A_)(n)||void 0},(0,k.s)("Heatmap",s),{data:r,getRectProps:function(e){var n=e.date,a=e.value;return{onClick:function(){var e;t({clickData:(e={},e[n]=a,e)})},onMouseEnter:function(){var e;t({hoverData:(e={},e[n]=a,e)})},onMouseLeave:function(){null==t||t({hoverData:null})}}}}))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[298],{
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[298],{31355(e,s,a){a.r(s),a.d(s,{default:()=>y});var t=a(31635),n=a(166),i=a(74848),l=a(59396),o=a(86344),d=a(56324),r=a(2412),c=a(46100),h=a(36904),g=a(8596),m=a(32238);const u=(0,l.V)((e,{background:s,radius:a})=>({inlineCodeHighlight:{"--ch-background":s?(0,o.r)(s,e):void 0,"--ch-radius":void 0!==a?(0,d.nJ)(a):void 0}})),p=(0,r.P9)((e,s)=>{const a=(0,c.Y)("InlineCodeHighlight",null,e),{classNames:t,className:n,style:l,styles:o,unstyled:d,vars:r,attributes:p,...v}=a,C=(0,h.I)({name:"InlineCodeHighlight",classes:g.A,props:a,className:n,style:l,classNames:t,styles:o,unstyled:d,attributes:p,vars:r,varsResolver:u,rootSelector:"inlineCodeHighlight"});return(0,i.jsx)(m.q,{...v,ref:s,...C("inlineCodeHighlight"),__inline:!0})});p.displayName="@mantine/code-highlight/InlineCodeHighlight",p.classes=g.A,a(41994),a(32480);var v=a(40295),C=a.n(v),_=a(57479),N=a(78948);const y=function(e){e.setProps;var s=e.loading_state,a=(e.className,(0,t.Tt)(e,["setProps","loading_state","className"]));return C().createElement(n.M4,{adapter:N.R},C().createElement(p,(0,t.Cl)({"data-dash-is-loading":(0,_.A_)(s)||void 0,className:"dmc-code"},a)))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[436],{
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[436],{79970(e,t,i){i.r(t),i.d(t,{default:()=>W});var r=i(31635),o=i(74848),a=i(40295),s=i.n(a),n=i(86279),l=i(57158),c=i(44653),d=i(28327),h=i(77984),u=i(23495),p=i(15894),y=(0,d.gu)({chartName:"LineChart",GraphicalChild:n.N,axisComponents:[{axisType:"xAxis",AxisComp:h.W},{axisType:"yAxis",AxisComp:u.h}],formatAxisMap:p.pr}),x=i(97018),m=i(91706),f=i(69107),v=i(78687),g=i(59396),k=i(86344),C=i(2412),A=i(46100),P=i(602),b=i(99274),L=i(36904),D=i(58424),N=i(66284),j=i(6585),S=i(45849),w=i(89133),O=i(88498);const $={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},K=(0,g.V)((e,{textColor:t,gridColor:i})=>({root:{"--chart-text-color":t?(0,k.r)(t,e):void 0,"--chart-grid-color":i?(0,k.r)(i,e):void 0}})),T=(0,C.P9)((e,t)=>{const i=(0,A.Y)("LineChart",$,e),{classNames:r,className:s,style:d,styles:p,unstyled:g,vars:C,data:T,withLegend:z,legendProps:I,series:M,onMouseLeave:W,dataKey:_,withTooltip:Y,withXAxis:F,withYAxis:Q,gridAxis:R,tickLine:X,xAxisProps:B,yAxisProps:E,unit:G,tooltipAnimationDuration:H,strokeDasharray:J,gridProps:V,tooltipProps:q,referenceLines:U,withDots:Z,dotProps:ee,activeDotProps:te,strokeWidth:ie,lineChartProps:re,connectNulls:oe,fillOpacity:ae,curveType:se,orientation:ne,dir:le,valueFormatter:ce,children:de,lineProps:he,xAxisLabel:ue,yAxisLabel:pe,type:ye,gradientStops:xe,withRightYAxis:me,rightYAxisLabel:fe,rightYAxisProps:ve,withPointLabels:ge,attributes:ke,gridColor:Ce,...Ae}=i,Pe=(0,P.xd)(),be="none"!==R&&("x"===X||"xy"===X),Le="none"!==R&&("y"===X||"xy"===X),[De,Ne]=(0,a.useState)(null),je=null!==De,{resolvedClassNames:Se,resolvedStyles:we}=(0,b.Y)({classNames:r,styles:p,props:i}),Oe=(0,L.I)({name:"LineChart",classes:w.A,props:i,className:s,style:d,classNames:r,styles:p,unstyled:g,attributes:ke,vars:C,varsResolver:K}),$e=`line-chart-gradient-${(0,N.B)()}`,Ke=xe?.map(e=>(0,o.jsx)("stop",{offset:`${e.offset}%`,stopColor:(0,k.r)(e.color,Pe)},e.color)),Te=M.map(e=>{const t=(0,k.r)(e.color,Pe),i=je&&De!==e.name;return(0,a.createElement)(n.N,{...Oe("line"),key:e.name,name:e.name,dataKey:e.name,dot:!!Z&&{fillOpacity:i?0:1,strokeOpacity:i?0:1,strokeWidth:1,fill:"gradient"===ye?"var(--mantine-color-gray-7)":t,stroke:"gradient"===ye?"white":t,...ee},activeDot:!!Z&&{fill:"gradient"===ye?"var(--mantine-color-gray-7)":t,stroke:"gradient"===ye?"white":t,...te},fill:t,stroke:"gradient"===ye?`url(#${$e})`:t,strokeWidth:ie,isAnimationActive:!1,fillOpacity:i?0:ae,strokeOpacity:i?.5:ae,connectNulls:oe,type:e.curveType??se,strokeDasharray:e.strokeDasharray,yAxisId:e.yAxisId||"left",label:ge?(0,o.jsx)(O.x,{valueFormatter:ce}):void 0,..."function"==typeof he?he(e):he})}),ze=U?.map((e,t)=>{const i=(0,k.r)(e.color,Pe);return(0,o.jsx)(l.e,{stroke:e.color?i:"var(--chart-grid-color)",strokeWidth:1,yAxisId:e.yAxisId||"left",...e,label:{value:e.label,fill:e.color?i:"currentColor",fontSize:12,position:e.labelPosition??"insideBottomLeft"},...Oe("referenceLine")},t)}),Ie={axisLine:!1,..."vertical"===ne?{dataKey:_,type:"category"}:{type:"number"},tickLine:!!Le&&{stroke:"currentColor"},allowDecimals:!0,unit:G,tickFormatter:"vertical"===ne?void 0:ce,...Oe("axis")};return(0,o.jsx)(D.a,{ref:t,...Oe("root"),onMouseLeave:e=>{Ne(null),W?.(e)},dir:le||"ltr",...Ae,children:(0,o.jsx)(c.u,{...Oe("container"),children:(0,o.jsxs)(y,{data:T,layout:ne,margin:{bottom:ue?30:void 0,left:pe?10:void 0,right:pe?5:void 0},...re,children:["gradient"===ye&&(0,o.jsx)("defs",{children:(0,o.jsx)("linearGradient",{id:$e,x1:"0",y1:"0",x2:"0",y2:"1",children:Ke})}),z&&(0,o.jsx)(x.s,{verticalAlign:"top",content:e=>(0,o.jsx)(j._,{payload:e.payload,onHighlight:Ne,legendPosition:I?.verticalAlign||"top",classNames:Se,styles:we,series:M,showColor:"gradient"!==ye,attributes:ke}),...I}),(0,o.jsxs)(h.W,{hide:!F,..."vertical"===ne?{type:"number"}:{dataKey:_},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:!!be&&{stroke:"currentColor"},minTickGap:5,tickFormatter:"vertical"===ne?ce:void 0,...Oe("axis"),...B,children:[ue&&(0,o.jsx)(m.J,{position:"insideBottom",offset:-20,fontSize:12,...Oe("axisLabel"),children:ue}),B?.children]}),(0,o.jsxs)(u.h,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!Q,...Ie,...E,children:[pe&&(0,o.jsx)(m.J,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Oe("axisLabel"),children:pe}),E?.children]}),(0,o.jsxs)(u.h,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!me,...Ie,...ve,children:[fe&&(0,o.jsx)(m.J,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Oe("axisLabel"),children:fe}),E?.children]}),(0,o.jsx)(f.d,{strokeDasharray:J,vertical:"y"===R||"xy"===R,horizontal:"x"===R||"xy"===R,...Oe("grid"),...V}),Y&&(0,o.jsx)(v.m,{animationDuration:H,isAnimationActive:0!==H,position:"vertical"===ne?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:J},content:({label:e,payload:t,labelFormatter:i})=>(0,o.jsx)(S.I,{label:i&&t?i(e,t):e,payload:t,unit:G,classNames:Se,styles:we,series:M,valueFormatter:ce,showColor:"gradient"!==ye,attributes:ke}),...q}),Te,ze,de]})})})});T.displayName="@mantine/charts/LineChart",T.classes=w.A,i(19319);var z=i(83837),I=i(57479),M=i(68734);const W=function(e){var t=e.setProps,i=e.loading_state,o=(e.clickData,e.hoverData,e.clickSeriesName,e.hoverSeriesName,e.series),n=e.data,l=e.dataKey,c=e.highlightHover,d=void 0!==c&&c,h=e.lineChartProps,u=e.activeDotProps,p=e.lineProps,y=(0,r.Tt)(e,["setProps","loading_state","clickData","hoverData","clickSeriesName","hoverSeriesName","series","data","dataKey","highlightHover","lineChartProps","activeDotProps","lineProps"]),x=(0,a.useState)(null),m=x[0],f=x[1],v=d&&null!==m,g=(0,a.useRef)(null),k=function(e){(0,z.$Q)(e)&&(g.current=e.name)},C=function(e){if((0,z.$Q)(e)){var t=e.name;g.current=t,f(t)}},A=function(){f(null)},P=(0,r.Cl)((0,r.Cl)({},h),{onClick:function(e){(0,z.$Q)(e)&&t({clickSeriesName:g.current,clickData:(0,z.X$)(e)}),g.current=null},onMouseOver:function(e){(0,z.$Q)(e)&&t({hoverSeriesName:g.current,hoverData:(0,z.X$)(e)}),g.current=null}});return s().createElement(T,(0,r.Cl)({"data-dash-is-loading":(0,I.A_)(i)||void 0},(0,M.s)("LineChart",y),{data:n,dataKey:l,lineChartProps:P,series:o,activeDotProps:(0,r.Cl)((0,r.Cl)({},u),{onClick:function(e,t){(0,z.$Q)(e)&&(g.current=t.dataKey)},onMouseOver:function(e,t){if((0,z.$Q)(e)){var i=t.dataKey;g.current=i,f(i)}},onMouseOut:A}),lineProps:function(e){var t=v&&m!==e.name,i=(0,r.Cl)((0,r.Cl)({},p),{onClick:k,onMouseOver:C,onMouseOut:A});return t&&(i.fillOpacity=.1,i.strokeOpacity=.2),i}}))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[684],{
|
|
1
|
+
"use strict";(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[684],{95962(e,t,a){a.r(t),a.d(t,{default:()=>_});var s=a(31635),o=a(74848),r=a(72050),i=a(44653),l=a(62209),n=a(63161),c=a(78687),d=a(59396),m=a(86344),p=a(88149),h=a(2412),u=a(46100),v=a(602),y=a(36904),b=a(99274),f=a(58424),x=a(45849),k={root:"m_cd8943fd"};const g={withTooltip:!1,withLabelsLine:!0,paddingAngle:0,size:160,strokeWidth:1,startAngle:0,endAngle:360,tooltipDataSource:"all",labelsPosition:"outside",labelsType:"value"},A=(0,d.V)((e,{strokeColor:t,labelColor:a,withLabels:s,size:o,labelsPosition:r})=>({root:{"--chart-stroke-color":t?(0,m.r)(t,e):void 0,"--chart-labels-color":a?(0,m.r)(a,e):void 0,"--chart-size":s&&"outside"===r?(0,p.D)(o+80):(0,p.D)(o)}})),P=(e,t,a,s)=>"percent"===e&&"number"==typeof a?`${(100*a).toFixed(0)}%`:"function"==typeof s&&"number"==typeof t?s(t):t,N=(e,t)=>({cx:a,cy:s,midAngle:r,innerRadius:i,outerRadius:l,value:n,percent:c})=>{const d=Math.PI/180,m=i+.5*(l-i),p=a+m*Math.cos(-(r||0)*d),h=s+m*Math.sin(-(r||0)*d);return(0,o.jsx)("text",{x:p,y:h,textAnchor:p>a?"start":"end",dominantBaseline:"central",className:k.label,children:P(e,n,c,t)})},C=(e,t)=>({x:a,y:s,cx:r,cy:i,percent:l,value:n})=>(0,o.jsx)("text",{x:a,y:s,cx:r,cy:i,textAnchor:a>r?"start":"end",fill:"var(--chart-labels-color, var(--mantine-color-dimmed))",fontFamily:"var(--mantine-font-family)",fontSize:12,children:(0,o.jsx)("tspan",{x:a,children:P(e,n,l,t)})}),j=(0,h.P9)((e,t)=>{const a=(0,u.Y)("PieChart",g,e),{classNames:s,className:d,style:p,styles:h,unstyled:P,vars:j,data:D,withTooltip:S,tooltipAnimationDuration:w,tooltipProps:z,pieProps:_,paddingAngle:L,withLabels:F,withLabelsLine:R,size:T,strokeWidth:I,startAngle:M,endAngle:W,tooltipDataSource:$,children:Q,pieChartProps:Y,labelsPosition:B,valueFormatter:E,labelsType:K,strokeColor:O,attributes:V,cellProps:q,...G}=a,H=(0,v.xd)(),J=(0,y.I)({name:"PieChart",classes:k,props:a,className:d,style:p,classNames:s,styles:h,unstyled:P,attributes:V,vars:j,varsResolver:A}),{resolvedClassNames:U,resolvedStyles:X}=(0,b.Y)({classNames:s,styles:h,props:a}),Z=D.map((e,t)=>(0,o.jsx)(r.f,{fill:(0,m.r)(e.color,H),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth:I,..."function"==typeof q?q(e):q},t));return(0,o.jsx)(f.a,{ref:t,size:T,...J("root"),...G,children:(0,o.jsx)(i.u,{children:(0,o.jsxs)(l.r,{...Y,children:[(0,o.jsx)(n.F,{data:D,innerRadius:0,outerRadius:T/2,dataKey:"value",isAnimationActive:!1,paddingAngle:L,startAngle:M,endAngle:W,label:!!F&&("inside"===B?N(K||"value",E):C(K||"value",E)),labelLine:!(!R||"outside"!==B)&&{stroke:"var(--chart-label-color, var(--mantine-color-dimmed))",strokeWidth:1},..._,children:Z}),S&&(0,o.jsx)(c.m,{animationDuration:w,isAnimationActive:!1,content:({payload:e})=>(0,o.jsx)(x.I,{payload:D,classNames:U,styles:X,type:"radial",segmentId:"segment"===$?e?.[0]?.name:void 0,valueFormatter:E,attributes:V}),...z}),Q]})})})});j.displayName="@mantine/charts/PieChart",j.classes=k,a(19319);var D=a(40295),S=a.n(D),w=a(83837),z=a(57479);const _=function(e){var t=e.setProps,a=e.loading_state,o=(e.clickData,e.hoverData,e.clickSeriesName,e.hoverSeriesName,e.pieProps),r=(0,s.Tt)(e,["setProps","loading_state","clickData","hoverData","clickSeriesName","hoverSeriesName","pieProps"]),i=(0,s.Cl)((0,s.Cl)({},o),{onClick:function(e){if((0,w.$Q)(e)){var a=(0,w.jz)(e);t({clickData:a,clickSeriesName:a.name})}},onMouseOver:function(e){if((0,w.$Q)(e)){var a=(0,w.jz)(e);t({hoverData:a,hoverSeriesName:a.name})}}});return S().createElement(j,(0,s.Cl)({"data-dash-is-loading":(0,z.A_)(a)||void 0,pieProps:i},r))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[926],{6170(e,t,r){e.exports=r(912)},912(e){e.exports=function(e){return e&&e.length?e[0]:void 0}},5579(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>Oe});var n=r(1635),o=r(4848),a=r(295),i=r.n(a),s=r(7011),c=r(9843),l=r.n(c),u=r(8090),p=r.n(u),y=r(6170),d=r.n(y),f=r(2404),m=r.n(f),v=r(1882),h=r.n(v),b=r(4164),g=r(9744),P=r(9938),O=r(4040),x=r(3036),j=r(852),A=r(6613),w=r(6069),E=r(5614),k=r(4501),S=["key"];function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(this,arguments)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach(function(t){K(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,W(n.key),n)}}function _(e,t,r){return t=L(t),function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,T()?Reflect.construct(t,r||[],L(e).constructor):t.apply(e,r))}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}function K(e,t,r){return(t=W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(e){var t=function(e){if("object"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}var Z=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return K(e=_(this,t,[].concat(n)),"state",{isAnimationFinished:!1}),K(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),h()(t)&&t()}),K(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),h()(t)&&t()}),K(e,"handleMouseEnter",function(t){var r=e.props.onMouseEnter;r&&r(e.props,t)}),K(e,"handleMouseLeave",function(t){var r=e.props.onMouseLeave;r&&r(e.props,t)}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(t,e),r=t,o=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"renderDotItem",value:function(e,t){var r;if(i().isValidElement(e))r=i().cloneElement(e,t);else if(h()(e))r=e(t);else{var n=t.key,o=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,S);r=i().createElement(A.c,C({},o,{key:n,className:(0,b.A)("recharts-radar-dot","boolean"!=typeof e?e.className:"")}))}return r}}],(n=[{key:"renderDots",value:function(e){var r=this.props,n=r.dot,o=r.dataKey,a=(0,k.J9)(this.props,!1),s=(0,k.J9)(n,!0),c=e.map(function(e,r){var i=N(N(N({key:"dot-".concat(r),r:3},a),s),{},{dataKey:o,cx:e.x,cy:e.y,index:r,payload:e});return t.renderDotItem(n,i)});return i().createElement(w.W,{className:"recharts-radar-dots"},c)}},{key:"renderPolygonStatically",value:function(e){var t,r=this.props,n=r.shape,o=r.dot,a=r.isRange,s=r.baseLinePoints,c=r.connectNulls;return t=i().isValidElement(n)?i().cloneElement(n,N(N({},this.props),{},{points:e})):h()(n)?n(N(N({},this.props),{},{points:e})):i().createElement(j.t,C({},(0,k.J9)(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:e,baseLinePoints:a?s:null,connectNulls:c})),i().createElement(w.W,{className:"recharts-radar-polygon"},t,o?this.renderDots(e):null)}},{key:"renderPolygonWithAnimation",value:function(){var e=this,t=this.props,r=t.points,n=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,c=t.animationEasing,l=t.animationId,u=this.state.prevPoints;return i().createElement(s.Ay,{begin:o,duration:a,isActive:n,easing:c,from:{t:0},to:{t:1},key:"radar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var n=t.t,o=u&&u.length/r.length,a=r.map(function(e,t){var r=u&&u[Math.floor(t*o)];if(r){var a=(0,g.Dj)(r.x,e.x),i=(0,g.Dj)(r.y,e.y);return N(N({},e),{},{x:a(n),y:i(n)})}var s=(0,g.Dj)(e.cx,e.x),c=(0,g.Dj)(e.cy,e.y);return N(N({},e),{},{x:s(n),y:c(n)})});return e.renderPolygonStatically(a)})}},{key:"renderPolygon",value:function(){var e=this.props,t=e.points,r=e.isAnimationActive,n=e.isRange,o=this.state.prevPoints;return!(r&&t&&t.length)||n||o&&m()(o,t)?this.renderPolygonStatically(t):this.renderPolygonWithAnimation()}},{key:"render",value:function(){var e=this.props,t=e.hide,r=e.className,n=e.points,o=e.isAnimationActive;if(t||!n||!n.length)return null;var a=this.state.isAnimationFinished,s=(0,b.A)("recharts-radar",r);return i().createElement(w.W,{className:s},this.renderPolygon(),(!o||a)&&E.Z.renderCallByParent(this.props,n))}}])&&I(r.prototype,n),o&&I(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(a.PureComponent);K(Z,"displayName","Radar"),K(Z,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!P.m.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),K(Z,"getComposedData",function(e){var t=e.radiusAxis,r=e.angleAxis,n=e.displayedData,o=e.dataKey,a=e.bandSize,i=r.cx,s=r.cy,c=!1,u=[],y="number"!==r.type&&null!=a?a:0;n.forEach(function(e,n){var a=(0,x.kr)(e,r.dataKey,n),d=(0,x.kr)(e,o),f=r.scale(a)+y,m=Array.isArray(d)?p()(d):d,v=l()(m)?void 0:t.scale(m);Array.isArray(d)&&d.length>=2&&(c=!0),u.push(N(N({},(0,O.IZ)(i,s,v,f)),{},{name:a,value:d,cx:i,cy:s,radius:v,angle:f,payload:e}))});var f=[];return c&&u.forEach(function(e){if(Array.isArray(e.value)){var r=d()(e.value),n=l()(r)?void 0:t.scale(r);f.push(N(N({},e),{},{radius:n},(0,O.IZ)(i,s,n,e.angle)))}else f.push(e)}),{points:u,isRange:c,baseLinePoints:f}});var F=r(4653),J=r(8327),B=r(433),G=r(2864),V=(0,J.gu)({chartName:"RadarChart",GraphicalChild:Z,axisComponents:[{axisType:"angleAxis",AxisComp:B.r},{axisType:"radiusAxis",AxisComp:G.E}],formatAxisMap:O.pr,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),Y=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z.apply(this,arguments)}function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){var n,o,a,i;n=e,o=t,a=r[t],i=function(e){if("object"!=$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o),(o="symbol"==$(i)?i:i+"")in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var X=function(e,t,r,n){var o="";return n.forEach(function(n,a){var i=(0,O.IZ)(t,r,e,n);o+=a?"L ".concat(i.x,",").concat(i.y):"M ".concat(i.x,",").concat(i.y)}),o+="Z"},q=function(e){var t=e.cx,r=e.cy,n=e.innerRadius,o=e.outerRadius,a=e.polarAngles,s=e.radialLines;if(!a||!a.length||!s)return null;var c=Q({stroke:"#ccc"},(0,k.J9)(e,!1));return i().createElement("g",{className:"recharts-polar-grid-angle"},a.map(function(e){var a=(0,O.IZ)(t,r,n,e),s=(0,O.IZ)(t,r,o,e);return i().createElement("line",z({},c,{key:"line-".concat(e),x1:a.x,y1:a.y,x2:s.x,y2:s.y}))}))},U=function(e){var t=e.cx,r=e.cy,n=e.radius,o=e.index,a=Q(Q({stroke:"#ccc"},(0,k.J9)(e,!1)),{},{fill:"none"});return i().createElement("circle",z({},a,{className:(0,b.A)("recharts-polar-grid-concentric-circle",e.className),key:"circle-".concat(o),cx:t,cy:r,r:n}))},ee=function(e){var t=e.radius,r=e.index,n=Q(Q({stroke:"#ccc"},(0,k.J9)(e,!1)),{},{fill:"none"});return i().createElement("path",z({},n,{className:(0,b.A)("recharts-polar-grid-concentric-polygon",e.className),key:"path-".concat(r),d:X(t,e.cx,e.cy,e.polarAngles)}))},te=function(e){var t=e.polarRadius,r=e.gridType;return t&&t.length?i().createElement("g",{className:"recharts-polar-grid-concentric"},t.map(function(t,n){var o=n;return"circle"===r?i().createElement(U,z({key:o},e,{radius:t,index:n})):i().createElement(ee,z({key:o},e,{radius:t,index:n}))})):null},re=function(e){var t=e.cx,r=void 0===t?0:t,n=e.cy,o=void 0===n?0:n,a=e.innerRadius,s=void 0===a?0:a,c=e.outerRadius,l=void 0===c?0:c,u=e.gridType,p=void 0===u?"polygon":u,y=e.radialLines,d=void 0===y||y,f=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Y);return l<=0?null:i().createElement("g",{className:"recharts-polar-grid"},i().createElement(q,z({cx:r,cy:o,innerRadius:s,outerRadius:l,gridType:p,radialLines:d},f)),i().createElement(te,z({cx:r,cy:o,innerRadius:s,outerRadius:l,gridType:p,radialLines:d},f)))};re.displayName="PolarGrid";var ne=r(8687),oe=r(7018),ae=r(9396),ie=r(6344),se=r(2412),ce=r(6100),le=r(602),ue=r(6904),pe=r(9274),ye=r(8424),de=r(6585),fe=r(5849),me={root:"m_1f271cf7",container:"m_cf06f58c"};const ve={withPolarGrid:!0,withPolarAngleAxis:!0,withPolarRadiusAxis:!1,withTooltip:!1,withDots:!1,tooltipAnimationDuration:0},he=(0,ae.V)((e,{gridColor:t,textColor:r})=>({root:{"--chart-grid-color":t?(0,ie.r)(t,e):void 0,"--chart-text-color":r?(0,ie.r)(r,e):void 0}})),be=(0,se.P9)((e,t)=>{const r=(0,ce.Y)("RadarChart",ve,e),{classNames:n,className:i,style:s,styles:c,unstyled:l,vars:u,data:p,series:y,dataKey:d,gridColor:f,textColor:m,radarProps:v,radarChartProps:h,polarGridProps:b,polarAngleAxisProps:g,polarRadiusAxisProps:P,tooltipProps:O,withPolarGrid:x,withPolarAngleAxis:j,withPolarRadiusAxis:A,withTooltip:w,tooltipAnimationDuration:E,children:k,withLegend:S,withDots:D,dotProps:C,activeDotProps:R,legendProps:N,attributes:I,..._}=r,T=(0,le.xd)(),L=(0,ue.I)({name:"RadarChart",classes:me,props:r,className:i,style:s,classNames:n,styles:c,unstyled:l,attributes:I,vars:u,varsResolver:he}),[M,K]=(0,a.useState)(null),{resolvedClassNames:W,resolvedStyles:J}=(0,pe.Y)({classNames:n,styles:c,props:r}),Y=y.map((e,t)=>(0,o.jsx)(Z,{name:e.name,dataKey:e.name,stroke:(0,ie.r)(e.strokeColor||e.color,T),fill:(0,ie.r)(e.color,T),fillOpacity:M?M===e.name?e.opacity||.4:.05:e.opacity||.4,dot:!!D&&{fillOpacity:1,strokeOpacity:0,strokeWidth:1,fill:(0,ie.r)(e.color,T),stroke:(0,ie.r)(e.color,T),...C},activeDot:!!D&&{fill:(0,ie.r)(e.color,T),stroke:(0,ie.r)(e.color,T),...R},strokeOpacity:M?M===e.name?1:.1:1,isAnimationActive:!1,..."function"==typeof v?v(e):v},t));return(0,o.jsx)(ye.a,{ref:t,...L("root"),..._,children:(0,o.jsx)(F.u,{...L("container"),children:(0,o.jsxs)(V,{data:p,...h,children:[x&&(0,o.jsx)(re,{stroke:"var(--chart-grid-color)",...b}),j&&(0,o.jsx)(B.r,{dataKey:d,...g}),A&&(0,o.jsx)(G.E,{stroke:"var(--chart-grid-color)",...P}),w&&(0,o.jsx)(ne.m,{animationDuration:E,isAnimationActive:0!==E,cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1},content:({label:e,payload:t,labelFormatter:r})=>(0,o.jsx)(fe.I,{label:r&&t?r(e,t):e,payload:t,classNames:W,styles:J,series:y,attributes:I}),...O}),Y,S&&(0,o.jsx)(oe.s,{verticalAlign:"bottom",content:e=>(0,o.jsx)(de._,{payload:e.payload,onHighlight:K,legendPosition:N?.verticalAlign||"bottom",classNames:W,styles:J,series:y,centered:!0,attributes:I}),...N}),k]})})})});be.displayName="@mantine/charts/RadarChart",be.classes=me,r(9319);var ge=r(3837),Pe=r(7479);const Oe=function(e){var t=e.setProps,r=e.loading_state,o=(e.clickData,e.radarChartProps),a=(0,n.Tt)(e,["setProps","loading_state","clickData","radarChartProps"]),s=(0,n.Cl)((0,n.Cl)({},o),{onClick:function(e){(0,ge.$Q)(e)&&t({clickData:(0,ge.X$)(e)})}});return i().createElement(be,(0,n.Cl)({"data-dash-is-loading":(0,Pe.A_)(r)||void 0,radarChartProps:s},a))}}}]);
|
|
1
|
+
(self.webpackChunkdash_mantine_components=self.webpackChunkdash_mantine_components||[]).push([[926],{56170(e,t,r){e.exports=r(912)},912(e){e.exports=function(e){return e&&e.length?e[0]:void 0}},45579(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>xe});var n=r(31635),o=r(74848),a=r(40295),i=r.n(a),s=r(87011),c=r(69843),l=r.n(c),u=r(68090),p=r.n(u),d=r(56170),y=r.n(d),f=r(2404),m=r.n(f),v=r(1882),h=r.n(v),b=r(34164),g=r(59744),P=r(59938),O=r(14040),x=r(63036),j=r(20852),A=r(66613),w=r(86069),E=r(5614),k=r(94501),S=["key"];function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(this,arguments)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach(function(t){K(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,W(n.key),n)}}function _(e,t,r){return t=L(t),function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,T()?Reflect.construct(t,r||[],L(e).constructor):t.apply(e,r))}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}function K(e,t,r){return(t=W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(e){var t=function(e){if("object"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}var Z=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return K(e=_(this,t,[].concat(n)),"state",{isAnimationFinished:!1}),K(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),h()(t)&&t()}),K(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),h()(t)&&t()}),K(e,"handleMouseEnter",function(t){var r=e.props.onMouseEnter;r&&r(e.props,t)}),K(e,"handleMouseLeave",function(t){var r=e.props.onMouseLeave;r&&r(e.props,t)}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(t,e),r=t,o=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"renderDotItem",value:function(e,t){var r;if(i().isValidElement(e))r=i().cloneElement(e,t);else if(h()(e))r=e(t);else{var n=t.key,o=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,S);r=i().createElement(A.c,C({},o,{key:n,className:(0,b.A)("recharts-radar-dot","boolean"!=typeof e?e.className:"")}))}return r}}],(n=[{key:"renderDots",value:function(e){var r=this.props,n=r.dot,o=r.dataKey,a=(0,k.J9)(this.props,!1),s=(0,k.J9)(n,!0),c=e.map(function(e,r){var i=N(N(N({key:"dot-".concat(r),r:3},a),s),{},{dataKey:o,cx:e.x,cy:e.y,index:r,payload:e});return t.renderDotItem(n,i)});return i().createElement(w.W,{className:"recharts-radar-dots"},c)}},{key:"renderPolygonStatically",value:function(e){var t,r=this.props,n=r.shape,o=r.dot,a=r.isRange,s=r.baseLinePoints,c=r.connectNulls;return t=i().isValidElement(n)?i().cloneElement(n,N(N({},this.props),{},{points:e})):h()(n)?n(N(N({},this.props),{},{points:e})):i().createElement(j.t,C({},(0,k.J9)(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:e,baseLinePoints:a?s:null,connectNulls:c})),i().createElement(w.W,{className:"recharts-radar-polygon"},t,o?this.renderDots(e):null)}},{key:"renderPolygonWithAnimation",value:function(){var e=this,t=this.props,r=t.points,n=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,c=t.animationEasing,l=t.animationId,u=this.state.prevPoints;return i().createElement(s.Ay,{begin:o,duration:a,isActive:n,easing:c,from:{t:0},to:{t:1},key:"radar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var n=t.t,o=u&&u.length/r.length,a=r.map(function(e,t){var r=u&&u[Math.floor(t*o)];if(r){var a=(0,g.Dj)(r.x,e.x),i=(0,g.Dj)(r.y,e.y);return N(N({},e),{},{x:a(n),y:i(n)})}var s=(0,g.Dj)(e.cx,e.x),c=(0,g.Dj)(e.cy,e.y);return N(N({},e),{},{x:s(n),y:c(n)})});return e.renderPolygonStatically(a)})}},{key:"renderPolygon",value:function(){var e=this.props,t=e.points,r=e.isAnimationActive,n=e.isRange,o=this.state.prevPoints;return!(r&&t&&t.length)||n||o&&m()(o,t)?this.renderPolygonStatically(t):this.renderPolygonWithAnimation()}},{key:"render",value:function(){var e=this.props,t=e.hide,r=e.className,n=e.points,o=e.isAnimationActive;if(t||!n||!n.length)return null;var a=this.state.isAnimationFinished,s=(0,b.A)("recharts-radar",r);return i().createElement(w.W,{className:s},this.renderPolygon(),(!o||a)&&E.Z.renderCallByParent(this.props,n))}}])&&I(r.prototype,n),o&&I(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(a.PureComponent);K(Z,"displayName","Radar"),K(Z,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!P.m.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),K(Z,"getComposedData",function(e){var t=e.radiusAxis,r=e.angleAxis,n=e.displayedData,o=e.dataKey,a=e.bandSize,i=r.cx,s=r.cy,c=!1,u=[],d="number"!==r.type&&null!=a?a:0;n.forEach(function(e,n){var a=(0,x.kr)(e,r.dataKey,n),y=(0,x.kr)(e,o),f=r.scale(a)+d,m=Array.isArray(y)?p()(y):y,v=l()(m)?void 0:t.scale(m);Array.isArray(y)&&y.length>=2&&(c=!0),u.push(N(N({},(0,O.IZ)(i,s,v,f)),{},{name:a,value:y,cx:i,cy:s,radius:v,angle:f,payload:e}))});var f=[];return c&&u.forEach(function(e){if(Array.isArray(e.value)){var r=y()(e.value),n=l()(r)?void 0:t.scale(r);f.push(N(N({},e),{},{radius:n},(0,O.IZ)(i,s,n,e.angle)))}else f.push(e)}),{points:u,isRange:c,baseLinePoints:f}});var F=r(44653),J=r(28327),B=r(10433),G=r(62864),V=(0,J.gu)({chartName:"RadarChart",GraphicalChild:Z,axisComponents:[{axisType:"angleAxis",AxisComp:B.r},{axisType:"radiusAxis",AxisComp:G.E}],formatAxisMap:O.pr,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),Y=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z.apply(this,arguments)}function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){var n,o,a,i;n=e,o=t,a=r[t],i=function(e){if("object"!=$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o),(o="symbol"==$(i)?i:i+"")in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var X=function(e,t,r,n){var o="";return n.forEach(function(n,a){var i=(0,O.IZ)(t,r,e,n);o+=a?"L ".concat(i.x,",").concat(i.y):"M ".concat(i.x,",").concat(i.y)}),o+="Z"},q=function(e){var t=e.cx,r=e.cy,n=e.innerRadius,o=e.outerRadius,a=e.polarAngles,s=e.radialLines;if(!a||!a.length||!s)return null;var c=Q({stroke:"#ccc"},(0,k.J9)(e,!1));return i().createElement("g",{className:"recharts-polar-grid-angle"},a.map(function(e){var a=(0,O.IZ)(t,r,n,e),s=(0,O.IZ)(t,r,o,e);return i().createElement("line",z({},c,{key:"line-".concat(e),x1:a.x,y1:a.y,x2:s.x,y2:s.y}))}))},U=function(e){var t=e.cx,r=e.cy,n=e.radius,o=e.index,a=Q(Q({stroke:"#ccc"},(0,k.J9)(e,!1)),{},{fill:"none"});return i().createElement("circle",z({},a,{className:(0,b.A)("recharts-polar-grid-concentric-circle",e.className),key:"circle-".concat(o),cx:t,cy:r,r:n}))},ee=function(e){var t=e.radius,r=e.index,n=Q(Q({stroke:"#ccc"},(0,k.J9)(e,!1)),{},{fill:"none"});return i().createElement("path",z({},n,{className:(0,b.A)("recharts-polar-grid-concentric-polygon",e.className),key:"path-".concat(r),d:X(t,e.cx,e.cy,e.polarAngles)}))},te=function(e){var t=e.polarRadius,r=e.gridType;return t&&t.length?i().createElement("g",{className:"recharts-polar-grid-concentric"},t.map(function(t,n){var o=n;return"circle"===r?i().createElement(U,z({key:o},e,{radius:t,index:n})):i().createElement(ee,z({key:o},e,{radius:t,index:n}))})):null},re=function(e){var t=e.cx,r=void 0===t?0:t,n=e.cy,o=void 0===n?0:n,a=e.innerRadius,s=void 0===a?0:a,c=e.outerRadius,l=void 0===c?0:c,u=e.gridType,p=void 0===u?"polygon":u,d=e.radialLines,y=void 0===d||d,f=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Y);return l<=0?null:i().createElement("g",{className:"recharts-polar-grid"},i().createElement(q,z({cx:r,cy:o,innerRadius:s,outerRadius:l,gridType:p,radialLines:y},f)),i().createElement(te,z({cx:r,cy:o,innerRadius:s,outerRadius:l,gridType:p,radialLines:y},f)))};re.displayName="PolarGrid";var ne=r(78687),oe=r(97018),ae=r(59396),ie=r(86344),se=r(2412),ce=r(46100),le=r(602),ue=r(36904),pe=r(99274),de=r(58424),ye=r(6585),fe=r(45849),me={root:"m_1f271cf7",container:"m_cf06f58c"};const ve={withPolarGrid:!0,withPolarAngleAxis:!0,withPolarRadiusAxis:!1,withTooltip:!1,withDots:!1,tooltipAnimationDuration:0},he=(0,ae.V)((e,{gridColor:t,textColor:r})=>({root:{"--chart-grid-color":t?(0,ie.r)(t,e):void 0,"--chart-text-color":r?(0,ie.r)(r,e):void 0}})),be=(0,se.P9)((e,t)=>{const r=(0,ce.Y)("RadarChart",ve,e),{classNames:n,className:i,style:s,styles:c,unstyled:l,vars:u,data:p,series:d,dataKey:y,gridColor:f,textColor:m,radarProps:v,radarChartProps:h,polarGridProps:b,polarAngleAxisProps:g,polarRadiusAxisProps:P,tooltipProps:O,withPolarGrid:x,withPolarAngleAxis:j,withPolarRadiusAxis:A,withTooltip:w,tooltipAnimationDuration:E,children:k,withLegend:S,withDots:D,dotProps:C,activeDotProps:R,legendProps:N,attributes:I,..._}=r,T=(0,le.xd)(),L=(0,ue.I)({name:"RadarChart",classes:me,props:r,className:i,style:s,classNames:n,styles:c,unstyled:l,attributes:I,vars:u,varsResolver:he}),[M,K]=(0,a.useState)(null),{resolvedClassNames:W,resolvedStyles:J}=(0,pe.Y)({classNames:n,styles:c,props:r}),Y=d.map((e,t)=>(0,o.jsx)(Z,{name:e.name,dataKey:e.name,stroke:(0,ie.r)(e.strokeColor||e.color,T),fill:(0,ie.r)(e.color,T),fillOpacity:M?M===e.name?e.opacity||.4:.05:e.opacity||.4,dot:!!D&&{fillOpacity:1,strokeOpacity:0,strokeWidth:1,fill:(0,ie.r)(e.color,T),stroke:(0,ie.r)(e.color,T),...C},activeDot:!!D&&{fill:(0,ie.r)(e.color,T),stroke:(0,ie.r)(e.color,T),...R},strokeOpacity:M?M===e.name?1:.1:1,isAnimationActive:!1,..."function"==typeof v?v(e):v},t));return(0,o.jsx)(de.a,{ref:t,...L("root"),..._,children:(0,o.jsx)(F.u,{...L("container"),children:(0,o.jsxs)(V,{data:p,...h,children:[x&&(0,o.jsx)(re,{stroke:"var(--chart-grid-color)",...b}),j&&(0,o.jsx)(B.r,{dataKey:y,...g}),A&&(0,o.jsx)(G.E,{stroke:"var(--chart-grid-color)",...P}),w&&(0,o.jsx)(ne.m,{animationDuration:E,isAnimationActive:0!==E,cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1},content:({label:e,payload:t,labelFormatter:r})=>(0,o.jsx)(fe.I,{label:r&&t?r(e,t):e,payload:t,classNames:W,styles:J,series:d,attributes:I}),...O}),Y,S&&(0,o.jsx)(oe.s,{verticalAlign:"bottom",content:e=>(0,o.jsx)(ye._,{payload:e.payload,onHighlight:K,legendPosition:N?.verticalAlign||"bottom",classNames:W,styles:J,series:d,centered:!0,attributes:I}),...N}),k]})})})});be.displayName="@mantine/charts/RadarChart",be.classes=me,r(19319);var ge=r(83837),Pe=r(57479),Oe=r(68734);const xe=function(e){var t=e.setProps,r=e.loading_state,o=(e.clickData,e.radarChartProps),a=e.data,s=e.series,c=e.dataKey,l=(0,n.Tt)(e,["setProps","loading_state","clickData","radarChartProps","data","series","dataKey"]),u=(0,n.Cl)((0,n.Cl)({},o),{onClick:function(e){(0,ge.$Q)(e)&&t({clickData:(0,ge.X$)(e)})}});return i().createElement(be,(0,n.Cl)({"data-dash-is-loading":(0,Pe.A_)(r)||void 0,radarChartProps:u,data:a,series:s,dataKey:c},(0,Oe.s)("RadarChart",l)))}}}]);
|