@rustic-ai/ui-components 0.0.8 → 0.0.10

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.
Files changed (40) hide show
  1. package/dist/components/chart/rechartsTimeSeries.d.ts.map +1 -1
  2. package/dist/components/filePreview/filePreview.d.ts +8 -0
  3. package/dist/components/filePreview/filePreview.d.ts.map +1 -0
  4. package/dist/components/helper.d.ts +1 -0
  5. package/dist/components/helper.d.ts.map +1 -1
  6. package/dist/components/icon.d.ts +7 -0
  7. package/dist/components/icon.d.ts.map +1 -0
  8. package/dist/components/index.d.ts +6 -2
  9. package/dist/components/index.d.ts.map +1 -1
  10. package/dist/components/input/baseInput/baseInput.d.ts +8 -0
  11. package/dist/components/input/baseInput/baseInput.d.ts.map +1 -0
  12. package/dist/components/input/multimodal/multimodalInput/multimodalInput.d.ts +15 -0
  13. package/dist/components/input/multimodal/multimodalInput/multimodalInput.d.ts.map +1 -0
  14. package/dist/components/input/multimodal/uploader/uploader.d.ts +7 -0
  15. package/dist/components/input/multimodal/uploader/uploader.d.ts.map +1 -0
  16. package/dist/components/input/textInput/textInput.d.ts +3 -0
  17. package/dist/components/input/textInput/textInput.d.ts.map +1 -0
  18. package/dist/components/map/openLayersMap.d.ts.map +1 -1
  19. package/dist/components/media/controls/commonControls.d.ts.map +1 -1
  20. package/dist/components/media/controls/mediaIconButton.d.ts.map +1 -1
  21. package/dist/components/menu/popoverMenu.d.ts.map +1 -1
  22. package/dist/components/messageCanvas/actions/copy/copyText.d.ts +6 -0
  23. package/dist/components/messageCanvas/actions/copy/copyText.d.ts.map +1 -0
  24. package/dist/components/messageCanvas/actions/index.d.ts +12 -0
  25. package/dist/components/messageCanvas/actions/index.d.ts.map +1 -0
  26. package/dist/components/messageCanvas/messageCanvas.d.ts +16 -4
  27. package/dist/components/messageCanvas/messageCanvas.d.ts.map +1 -1
  28. package/dist/components/messageSpace/messageSpace.d.ts +8 -7
  29. package/dist/components/messageSpace/messageSpace.d.ts.map +1 -1
  30. package/dist/components/multipart/multipart.d.ts +5 -0
  31. package/dist/components/multipart/multipart.d.ts.map +1 -0
  32. package/dist/components/participantsContainer/participantsContainer.d.ts.map +1 -1
  33. package/dist/components/types.d.ts +57 -0
  34. package/dist/components/types.d.ts.map +1 -1
  35. package/dist/index.css +138 -30
  36. package/dist/index.js +1 -1
  37. package/dist/rusticTheme.d.ts.map +1 -1
  38. package/package.json +4 -2
  39. package/dist/components/textInput/textInput.d.ts +0 -32
  40. package/dist/components/textInput/textInput.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{var e={450:function(e){e.exports=function(){var e=[],t=[],r={},n={},i={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function a(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function c(e,t){return e.replace(t[0],(function(r,n){var i,o,c=(i=t[1],o=arguments,i.replace(/\$(\d{1,2})/g,(function(e,t){return o[t]||""})));return a(""===r?e[n-1]:r,c)}))}function l(e,t,n){if(!e.length||r.hasOwnProperty(e))return t;for(var i=n.length;i--;){var o=n[i];if(o[0].test(t))return c(t,o)}return t}function s(e,t,r){return function(n){var i=n.toLowerCase();return t.hasOwnProperty(i)?a(n,i):e.hasOwnProperty(i)?a(n,e[i]):l(i,n,r)}}function u(e,t,r,n){return function(n){var i=n.toLowerCase();return!!t.hasOwnProperty(i)||!e.hasOwnProperty(i)&&l(i,i,r)===i}}function p(e,t,r){return(r?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=s(i,n,e),p.isPlural=u(i,n,e),p.singular=s(n,i,t),p.isSingular=u(n,i,t),p.addPluralRule=function(t,r){e.push([o(t),r])},p.addSingularRule=function(e,r){t.push([o(e),r])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):r[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),i[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return p.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return p.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return p.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(p.addUncountableRule),p}()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{CodeSnippet:()=>Jl,ElementRenderer:()=>ts,FCCalendar:()=>m,Image:()=>os,MarkedMarkdown:()=>Hu,MarkedStreamingMarkdown:()=>Xu,MessageCanvas:()=>Np,MessageSpace:()=>Rp,NavBar:()=>$p,OpenLayersMap:()=>ws,ParticipantRole:()=>ef,ParticipantType:()=>tf,ParticipantsContainer:()=>of,PopoverMenu:()=>Cp,RechartsTimeSeries:()=>Xl,Sound:()=>wp,StreamingText:()=>bf,Table:()=>gf,Text:()=>xf,TextInput:()=>Mf,Timestamp:()=>Mp,Video:()=>Sp,YoutubeVideo:()=>Rf,rusticDarkTheme:()=>Zf,rusticLightTheme:()=>Vf});const e=require("react/jsx-runtime"),t=require("@fullcalendar/daygrid");var i=r.n(t);const o=require("@fullcalendar/react");var a=r.n(o);const c=require("@mui/material/Box");var l=r.n(c);const s=require("@mui/material/styles"),u=require("@mui/material/useMediaQuery");var p=r.n(u);const f=require("react");var d=r.n(f);function h(e){return{title:e.title?e.title:"",start:e.start,end:e.end,allDay:e.isAllDay}}function m(t){var r=(0,s.useTheme)(),n=p()(r.breakpoints.up("md"));return(0,e.jsx)(l(),{className:"rustic-fc-calendar",children:(0,e.jsx)(a(),{plugins:[i()],initialView:n?"dayGridMonth":"dayGridDay",headerToolbar:{left:"prev,next",center:"title",right:"dayGridMonth,dayGridWeek,dayGridDay"},eventTimeFormat:{hour:"2-digit",minute:"2-digit"},initialDate:t.events[0].start,events:t.events.map(h),views:{dayGridMonth:{titleFormat:{year:"numeric",month:"short"}},dayGridWeek:{},dayGridDay:{titleFormat:{year:"numeric",month:"short",day:"numeric"}}}})})}const y=require("@mui/icons-material/Crop169");var v=r.n(y);const g=require("@mui/icons-material/MoreVert");var b=r.n(g);const x=require("@mui/material/FormControl");var w=r.n(x);const O=require("@mui/material/IconButton");var k=r.n(O);const S=require("@mui/material/Menu");var j=r.n(S);const A=require("@mui/material/MenuItem");var E=r.n(A);const P=require("@mui/material/Typography");var T=r.n(P);const C=require("@mui/system/Box");var I=r.n(C);const D=require("@mui/system/useTheme");var M=r.n(D);const N=require("lodash/isNil");var R=r.n(N);const B=require("lodash/isFunction");var L=r.n(B);const _=require("lodash/range");var z=r.n(_);const $=require("lodash/get");var F=r.n($);const q=require("lodash/sortBy");var W=r.n(q);const U=require("lodash/throttle");var G=r.n(U);const H=require("lodash/find");var X=r.n(H);const V=require("lodash/every");var K=r.n(V);const Y=require("clsx");var Z=r.n(Y);const Q=require("tiny-invariant");var J=r.n(Q);function ee(e){return ee="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},ee(e)}function te(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 re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ee(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ee(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=Math.PI/180,ie=function(e){return 180*e/Math.PI},oe=function(e,t,r,n){return{x:e+Math.cos(-ne*n)*r,y:t+Math.sin(-ne*n)*r}},ae=function(e,t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360);return e+360*Math.min(i,o)},ce=function(e,t){var r=function(e,t){var r,n,i,o,a,c,l=e.x,s=e.y,u=t.cx,p=t.cy,f=(i=(r={x:l,y:s}).x,o=r.y,a=(n={x:u,y:p}).x,c=n.y,Math.sqrt(Math.pow(i-a,2)+Math.pow(o-c,2)));if(f<=0)return{radius:f};var d=(l-u)/f,h=Math.acos(d);return s>p&&(h=2*Math.PI-h),{radius:f,angle:ie(h),angleInRadian:h}}({x:e.x,y:e.y},t),n=r.radius,i=r.angle,o=t.innerRadius,a=t.outerRadius;if(n<o||n>a)return!1;if(0===n)return!0;var c,l=function(e){var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-360*o,endAngle:r-360*o}}(t),s=l.startAngle,u=l.endAngle,p=i;if(s<=u){for(;p>u;)p-=360;for(;p<s;)p+=360;c=p>=s&&p<=u}else{for(;p>s;)p-=360;for(;p<u;)p+=360;c=p>=u&&p<=s}return c?re(re({},t),{},{radius:n,angle:ae(p,t)}):null};function le(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle;return{points:[oe(t,r,n,i),oe(t,r,n,o)],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}const se=require("lodash/isString");var ue=r.n(se);const pe=require("lodash/isNaN");var fe=r.n(pe);const de=require("lodash/isNumber");var he=r.n(de),me=function(e){return 0===e?0:e>0?1:-1},ye=function(e){return ue()(e)&&e.indexOf("%")===e.length-1},ve=function(e){return he()(e)&&!fe()(e)},ge=function(e){return ve(e)||ue()(e)},be=0,xe=function(e){var t=++be;return"".concat(e||"").concat(t)},we=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!ve(e)&&!ue()(e))return n;if(ye(e)){var o=e.indexOf("%");r=t*parseFloat(e.slice(0,o))/100}else r=+e;return fe()(r)&&(r=n),i&&r>t&&(r=t),r},Oe=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},ke=function(e,t){return ve(e)&&ve(t)?function(r){return e+r*(t-e)}:function(){return t}};function Se(e,t,r){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):F()(e,t))===r})):null}var je={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return je[e]},set:function(e,t){if("string"==typeof e)je[e]=t;else{var r=Object.keys(e);r&&r.length&&r.forEach((function(t){je[t]=e[t]}))}}};function Ae(e){return Ae="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},Ae(e)}function Ee(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 Pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ae(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ae(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Te={widthCache:{},cacheCount:0},Ce={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Ie="recharts_measurement_span",De=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||je.isSsr)return{width:0,height:0};var r,n=(r=Pe({},t),Object.keys(r).forEach((function(e){r[e]||delete r[e]})),r),i=JSON.stringify({text:e,copyStyle:n});if(Te.widthCache[i])return Te.widthCache[i];try{var o=document.getElementById(Ie);o||((o=document.createElement("span")).setAttribute("id",Ie),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=Pe(Pe({},Ce),n);Object.assign(o.style,a),o.textContent="".concat(e);var c=o.getBoundingClientRect(),l={width:c.width,height:c.height};return Te.widthCache[i]=l,++Te.cacheCount>2e3&&(Te.cacheCount=0,Te.widthCache={}),l}catch(e){return{width:0,height:0}}};const Me=require("lodash/mapValues");var Ne=r.n(Me);const Re=require("victory-vendor/d3-scale"),Be=require("victory-vendor/d3-shape"),Le=require("lodash/max");var _e=r.n(Le);const ze=require("lodash/min");var $e=r.n(ze);const Fe=require("lodash/flatMap");var qe=r.n(Fe);const We=require("lodash/upperFirst");var Ue=r.n(We);const Ge=require("lodash/isEqual");var He=r.n(Ge);const Xe=require("recharts-scale"),Ve=require("lodash/isObject");var Ke=r.n(Ve);const Ye=require("react-is");function Ze(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Qe(e){return Qe="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},Qe(e)}var Je=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],et=["points","pathLength"],tt={svg:["viewBox","children"],polygon:et,polyline:et},rt=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],nt=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,f.isValidElement)(e)&&(r=e.props),!Ke()(r))return null;var n={};return Object.keys(r).forEach((function(e){rt.includes(e)&&(n[e]=t||function(t){return r[e](r,t)})})),n},it=function(e,t,r){if(!Ke()(e)||"object"!==Qe(e))return null;var n=null;return Object.keys(e).forEach((function(i){var o=e[i];rt.includes(i)&&"function"==typeof o&&(n||(n={}),n[i]=function(e,t,r){return function(n){return e(t,r,n),null}}(o,t,r))})),n},ot=["children"],at=["children"];function ct(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lt(e){return lt="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},lt(e)}var st={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},ut=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},pt=null,ft=null,dt=function e(t){if(t===pt&&Array.isArray(ft))return ft;var r=[];return f.Children.forEach(t,(function(t){R()(t)||((0,Ye.isFragment)(t)?r=r.concat(e(t.props.children)):r.push(t))})),ft=r,pt=t,r};function ht(e,t){var r=[],n=[];return n=Array.isArray(t)?t.map((function(e){return ut(e)})):[ut(t)],dt(e).forEach((function(e){var t=F()(e,"type.displayName")||F()(e,"type.name");-1!==n.indexOf(t)&&r.push(e)})),r}function mt(e,t){var r=ht(e,t);return r&&r[0]}var yt=function(e){if(!e||!e.props)return!1;var t=e.props,r=t.width,n=t.height;return!(!ve(r)||r<=0||!ve(n)||n<=0)},vt=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],gt=function(e){return e&&"object"===lt(e)&&"cx"in e&&"cy"in e&&"r"in e},bt=function(e,t,r){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,f.isValidElement)(e)&&(n=e.props),!Ke()(n))return null;var i={};return Object.keys(n).forEach((function(e){var o;(function(e,t,r,n){var i,o=null!==(i=null==tt?void 0:tt[n])&&void 0!==i?i:[];return!L()(e)&&(n&&o.includes(t)||Je.includes(t))||r&&rt.includes(t)})(null===(o=n)||void 0===o?void 0:o[e],e,t,r)&&(i[e]=n[e])})),i},xt=function e(t,r){if(t===r)return!0;var n=f.Children.count(t);if(n!==f.Children.count(r))return!1;if(0===n)return!0;if(1===n)return wt(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var o=t[i],a=r[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!wt(o,a))return!1}return!0},wt=function(e,t){if(R()(e)&&R()(t))return!0;if(!R()(e)&&!R()(t)){var r=e.props||{},n=r.children,i=ct(r,ot),o=t.props||{},a=o.children,c=ct(o,at);return n&&a?Ze(i,c)&&xt(n,a):!n&&!a&&Ze(i,c)}return!1},Ot=function(e,t){var r=[],n={};return dt(e).forEach((function(e,i){if(function(e){return e&&e.type&&ue()(e.type)&&vt.indexOf(e.type)>=0}(e))r.push(e);else if(e){var o=ut(e.type),a=t[o]||{},c=a.handler,l=a.once;if(c&&(!l||!n[o])){var s=c(e,o,i);r.push(s),n[o]=!0}}})),r},kt=["children","className"];function St(){return St=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},St.apply(this,arguments)}var jt=d().forwardRef((function(e,t){var r=e.children,n=e.className,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,kt),o=Z()("recharts-layer",n);return d().createElement("g",St({className:o},bt(i,!0),{ref:t}),r)})),At=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Et(){return Et=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},Et.apply(this,arguments)}function Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Tt(e){var t=e.offset,r=e.layout,n=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,c=e.xAxis,l=e.yAxis,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,At),u=bt(s),p=o.map((function(e){var o=a(e,i),s=o.x,p=o.y,f=o.value,h=o.errorVal;if(!h)return null;var m,y,v,g,b=[];if(Array.isArray(h)){var x=(g=2,function(e){if(Array.isArray(e))return e}(v=h)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(v,g)||function(e,t){if(e){if("string"==typeof e)return Pt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pt(e,t):void 0}}(v,g)||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.")}());m=x[0],y=x[1]}else m=y=h;if("vertical"===r){var w=c.scale,O=p+t,k=O+n,S=O-n,j=w(f-m),A=w(f+y);b.push({x1:A,y1:k,x2:A,y2:S}),b.push({x1:j,y1:O,x2:A,y2:O}),b.push({x1:j,y1:k,x2:j,y2:S})}else if("horizontal"===r){var E=l.scale,P=s+t,T=P-n,C=P+n,I=E(f-m),D=E(f+y);b.push({x1:T,y1:D,x2:C,y2:D}),b.push({x1:P,y1:I,x2:P,y2:D}),b.push({x1:T,y1:I,x2:C,y2:I})}return d().createElement(jt,Et({className:"recharts-errorBar",key:"bar-".concat(b.map((function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)})))},u),b.map((function(e){return d().createElement("line",Et({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))})))}));return d().createElement(jt,{className:"recharts-errorBars"},p)}Tt.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},Tt.displayName="ErrorBar";var Ct=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]},It=["children","width","height","viewBox","className","style","title","desc"];function Dt(){return Dt=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},Dt.apply(this,arguments)}function Mt(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,a=e.style,c=e.title,l=e.desc,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,It),u=i||{width:r,height:n,x:0,y:0},p=Z()("recharts-surface",o);return d().createElement("svg",Dt({},bt(s,!0,"svg"),{className:p,width:r,height:n,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),d().createElement("title",null,c),d().createElement("desc",null,l),t)}function Nt(e){return Nt="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},Nt(e)}var Rt=["type","size","sizeType"];function Bt(){return Bt=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},Bt.apply(this,arguments)}function Lt(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 _t(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Nt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Nt(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var zt={symbolCircle:Be.symbolCircle,symbolCross:Be.symbolCross,symbolDiamond:Be.symbolDiamond,symbolSquare:Be.symbolSquare,symbolStar:Be.symbolStar,symbolTriangle:Be.symbolTriangle,symbolWye:Be.symbolWye},$t=Math.PI/180,Ft=function(e){var t,r,n=e.type,i=void 0===n?"circle":n,o=e.size,a=void 0===o?64:o,c=e.sizeType,l=void 0===c?"area":c,s=_t(_t({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Rt)),{},{type:i,size:a,sizeType:l}),u=s.className,p=s.cx,f=s.cy,h=bt(s,!0);return p===+p&&f===+f&&a===+a?d().createElement("path",Bt({},h,{className:Z()("recharts-symbols",u),transform:"translate(".concat(p,", ").concat(f,")"),d:(t=function(e){var t="symbol".concat(Ue()(e));return zt[t]||Be.symbolCircle}(i),r=(0,Be.symbol)().type(t).size(function(e,t,r){if("area"===t)return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var n=18*$t;return 1.25*e*e*(Math.tan(n)-Math.tan(2*n)*Math.pow(Math.tan(n),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(a,l,i)),r())})):null};function qt(e){return qt="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},qt(e)}function Wt(){return Wt=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},Wt.apply(this,arguments)}function Ut(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 Gt(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,Kt(n.key),n)}}function Ht(e,t){return Ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ht(e,t)}function Xt(e){return Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xt(e)}function Vt(e,t,r){return(t=Kt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kt(e){var t=function(e,t){if("object"!==qt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===qt(t)?t:String(t)}Ft.registerSymbol=function(e,t){zt["symbol".concat(Ue()(e))]=t};var Yt=32,Zt=function(e){!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&&Ht(e,t)}(a,e);var t,r,n,i,o=(n=a,i=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}}(),function(){var e,t=Xt(n);if(i){var r=Xt(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===qt(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)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,r=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,r=16,n=Yt/6,i=Yt/3,o=e.inactive?t:e.color;if("plainline"===e.type)return d().createElement("line",{strokeWidth:4,fill:"none",stroke:o,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:r,x2:Yt,y2:r,className:"recharts-legend-icon"});if("line"===e.type)return d().createElement("path",{strokeWidth:4,fill:"none",stroke:o,d:"M0,".concat(r,"h").concat(i,"\n A").concat(n,",").concat(n,",0,1,1,").concat(2*i,",").concat(r,"\n H").concat(Yt,"M").concat(2*i,",").concat(r,"\n A").concat(n,",").concat(n,",0,1,1,").concat(i,",").concat(r),className:"recharts-legend-icon"});if("rect"===e.type)return d().createElement("path",{stroke:"none",fill:o,d:"M0,".concat(4,"h").concat(Yt,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(d().isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(r),!0).forEach((function(t){Vt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);return delete a.legendIcon,d().cloneElement(e.legendIcon,a)}return d().createElement(Ft,{fill:o,cx:r,cy:r,size:Yt,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,r=t.payload,n=t.iconSize,i=t.layout,o=t.formatter,a=t.inactiveColor,c={x:0,y:0,width:Yt,height:Yt},l={display:"horizontal"===i?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map((function(t,r){var i,u=t.formatter||o,p=Z()((Vt(i={"recharts-legend-item":!0},"legend-item-".concat(r),!0),Vt(i,"inactive",t.inactive),i));if("none"===t.type)return null;var f=L()(t.value)?null:t.value;Ct(!L()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var h=t.inactive?a:t.color;return d().createElement("li",Wt({className:p,style:l,key:"legend-item-".concat(r)},it(e.props,t,r)),d().createElement(Mt,{width:n,height:n,viewBox:c,style:s},e.renderIcon(t)),d().createElement("span",{className:"recharts-legend-item-text",style:{color:h}},u?u(f,t,r):f))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,r=e.layout,n=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===r?n:"left"};return d().createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}],r&&Gt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(f.PureComponent);Vt(Zt,"displayName","Legend"),Vt(Zt,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});const Qt=require("lodash/uniqBy");var Jt=r.n(Qt);function er(e,t,r){return!0===t?Jt()(e,r):L()(t)?Jt()(e,t):e}function tr(e){return tr="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},tr(e)}var rr=["ref"];function nr(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 ir(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nr(Object(r),!0).forEach((function(t){sr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function or(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,ur(n.key),n)}}function ar(e,t){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ar(e,t)}function cr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lr(e){return lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lr(e)}function sr(e,t,r){return(t=ur(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ur(e){var t=function(e,t){if("object"!==tr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==tr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===tr(t)?t:String(t)}function pr(e){return e.value}var fr=function(e){!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&&ar(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=lr(i);if(o){var r=lr(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cr(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sr(cr(e=a.call.apply(a,[this].concat(r))),"lastBoundingBox",{width:-1,height:-1}),e}return t=c,n=[{key:"getWithHeight",value:function(e,t){var r=e.props.layout;return"vertical"===r&&ve(e.props.height)?{height:e.props.height}:"horizontal"===r?{width:e.props.width||t}:null}}],(r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){return this.wrapperNode&&this.wrapperNode.getBoundingClientRect?this.wrapperNode.getBoundingClientRect():null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var t=this.wrapperNode.getBoundingClientRect();(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t))}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ir({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,r,n=this.props,i=n.layout,o=n.align,a=n.verticalAlign,c=n.margin,l=n.chartWidth,s=n.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===o&&"vertical"===i?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===o?{right:c&&c.right||0}:{left:c&&c.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(r="middle"===a?{top:((s||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:c&&c.bottom||0}:{top:c&&c.top||0}),ir(ir({},t),r)}},{key:"render",value:function(){var e=this,t=this.props,r=t.content,n=t.width,i=t.height,o=t.wrapperStyle,a=t.payloadUniqBy,c=t.payload,l=ir(ir({position:"absolute",width:n||"auto",height:i||"auto"},this.getDefaultPosition(o)),o);return d().createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(d().isValidElement(e))return d().cloneElement(e,t);if("function"==typeof e)return d().createElement(e,t);t.ref;var r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,rr);return d().createElement(Zt,r)}(r,ir(ir({},this.props),{},{payload:er(c,a,pr)})))}}])&&or(t.prototype,r),n&&or(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);function dr(e){return dr="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},dr(e)}function hr(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 mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==dr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===dr(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}sr(fr,"displayName","Legend"),sr(fr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var yr=function(e){var t,r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,o=e.legendContent,a=mt(r,fr);return a?(t=a.props&&a.props.payload?a.props&&a.props.payload:"children"===o?(n||[]).reduce((function(e,t){var r=t.item,n=t.props,i=n.sectors||n.data||[];return e.concat(i.map((function(e){return{type:a.props.iconType||r.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(n||[]).map((function(e){var t=e.item,r=t.props,n=r.dataKey,i=r.name,o=r.legendType;return{inactive:r.hide,dataKey:n,type:a.props.iconType||o||"square",color:jr(t),value:i||n,payload:t.props}})),mr(mr(mr({},a.props),fr.getWithHeight(a,i)),{},{payload:t,item:a})):null};function vr(e){return vr="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},vr(e)}function gr(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 br(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(r),!0).forEach((function(t){xr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function xr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==vr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==vr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===vr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wr(e){return function(e){if(Array.isArray(e))return Or(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Or(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kr(e,t,r){return R()(e)||R()(t)?r:ge(t)?F()(e,t,r):L()(t)?t(e):r}function Sr(e,t,r,n){var i=qe()(e,(function(e){return kr(e,t)}));if("number"===r){var o=i.filter((function(e){return ve(e)||parseFloat(e)}));return o.length?[$e()(o),_e()(o)]:[1/0,-1/0]}return(n?i.filter((function(e){return!R()(e)})):i).map((function(e){return ge(e)||e instanceof Date?e:""}))}var jr=function(e){var t,r=e.type.displayName,n=e.props,i=n.stroke,o=n.fill;switch(r){case"Line":t=i;break;case"Area":case"Radar":t=i&&"none"!==i?i:o;break;default:t=o}return t},Ar=function(e,t,r,n,i){var o=ht(t.props.children,Tt).filter((function(e){return function(e,t,r){return!!R()(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===r?"xAxis"===t:"y"!==r||"yAxis"===t)}(n,i,e.props.direction)}));if(o&&o.length){var a=o.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var n=kr(t,r,0),i=Array.isArray(n)?[$e()(n),_e()(n)]:[n,n],o=a.reduce((function(e,r){var n=kr(t,r,0),o=i[0]-Math.abs(Array.isArray(n)?n[0]:n),a=i[1]+Math.abs(Array.isArray(n)?n[1]:n);return[Math.min(o,e[0]),Math.max(a,e[1])]}),[1/0,-1/0]);return[Math.min(o[0],e[0]),Math.max(o[1],e[1])]}),[1/0,-1/0])}return null},Er=function(e,t,r,n,i){var o=t.map((function(t){var o=t.props.dataKey;return"number"===r&&o&&Ar(e,t,o,n)||Sr(e,o,r,i)}));if("number"===r)return o.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var a={};return o.reduce((function(e,t){for(var r=0,n=t.length;r<n;r++)a[t[r]]||(a[t[r]]=!0,e.push(t[r]));return e}),[])},Pr=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},Tr=function(e,t,r,n){if(n)return e.map((function(e){return e.coordinate}));var i,o,a=e.map((function(e){return e.coordinate===t&&(i=!0),e.coordinate===r&&(o=!0),e.coordinate}));return i||a.push(t),o||a.push(r),a},Cr=function(e,t,r){if(!e)return null;var n=e.scale,i=e.duplicateDomain,o=e.type,a=e.range,c="scaleBand"===e.realScaleType?n.bandwidth()/2:2,l=(t||r)&&"category"===o&&n.bandwidth?n.bandwidth()/c:0;return l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*me(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map((function(e){var t=i?i.indexOf(e):e;return{coordinate:n(t)+l,value:e,offset:l}})).filter((function(e){return!fe()(e.coordinate)})):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:n(e)+l,value:e,index:t,offset:l}})):n.ticks&&!r?n.ticks(e.tickCount).map((function(e){return{coordinate:n(e)+l,value:e,offset:l}})):n.domain().map((function(e,t){return{coordinate:n(e)+l,value:i?i[e]:e,index:t,offset:l}}))},Ir=new WeakMap,Dr=function(e,t){if("function"!=typeof t)return e;Ir.has(e)||Ir.set(e,new WeakMap);var r=Ir.get(e);if(r.has(t))return r.get(t);var n=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return r.set(t,n),n},Mr=1e-4,Nr={sign:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0,a=0;a<t;++a){var c=fe()(e[a][r][1])?e[a][r][0]:e[a][r][1];c>=0?(e[a][r][0]=i,e[a][r][1]=i+c,i=e[a][r][1]):(e[a][r][0]=o,e[a][r][1]=o+c,o=e[a][r][1])}},expand:Be.stackOffsetExpand,none:Be.stackOffsetNone,silhouette:Be.stackOffsetSilhouette,wiggle:Be.stackOffsetWiggle,positive:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0;o<t;++o){var a=fe()(e[o][r][1])?e[o][r][0]:e[o][r][1];a>=0?(e[o][r][0]=i,e[o][r][1]=i+a,i=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}}},Rr=function(e,t,r){var n=t.map((function(e){return e.props.dataKey})),i=Nr[r];return(0,Be.stack)().keys(n).value((function(e,t){return+kr(e,t,0)})).order(Be.stackOrderNone).offset(i)(e)},Br=function(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!R()(i[t.dataKey])){var c=Se(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var l=kr(i,R()(a)?t.dataKey:a);return R()(l)?null:t.scale(l)},Lr=function(e){var t=e.axis,r=e.ticks,n=e.offset,i=e.bandSize,o=e.entry,a=e.index;if("category"===t.type)return r[a]?r[a].coordinate+n:null;var c=kr(o,t.dataKey,t.domain[a]);return R()(c)?null:t.scale(c)-i/2+n},_r=function(e,t,r){return Object.keys(e).reduce((function(n,i){var o=e[i].stackedData.reduce((function(e,n){var i=n.slice(t,r+1).reduce((function(e,t){return[$e()(t.concat([e[0]]).filter(ve)),_e()(t.concat([e[1]]).filter(ve))]}),[1/0,-1/0]);return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]}),[1/0,-1/0]);return[Math.min(o[0],n[0]),Math.max(o[1],n[1])]}),[1/0,-1/0]).map((function(e){return e===1/0||e===-1/0?0:e}))},zr=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,$r=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Fr=function(e,t,r){if(L()(e))return e(t,r);if(!Array.isArray(e))return t;var n=[];if(ve(e[0]))n[0]=r?e[0]:Math.min(e[0],t[0]);else if(zr.test(e[0])){var i=+zr.exec(e[0])[1];n[0]=t[0]-i}else L()(e[0])?n[0]=e[0](t[0]):n[0]=t[0];if(ve(e[1]))n[1]=r?e[1]:Math.max(e[1],t[1]);else if($r.test(e[1])){var o=+$r.exec(e[1])[1];n[1]=t[1]+o}else L()(e[1])?n[1]=e[1](t[1]):n[1]=t[1];return n},qr=function(e,t,r){if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=W()(t,(function(e){return e.coordinate})),o=1/0,a=1,c=i.length;a<c;a++){var l=i[a],s=i[a-1];o=Math.min((l.coordinate||0)-(s.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},Wr=function(e,t,r){return e&&e.length?He()(e,F()(r,"type.defaultProps.domain"))?t:e:t},Ur=function(e,t){var r=e.props,n=r.dataKey,i=r.name,o=r.unit,a=r.formatter,c=r.tooltipType,l=r.chartType;return br(br({},bt(e)),{},{dataKey:n,unit:o,formatter:a,name:i||n,color:jr(e),value:kr(t,n),type:c,payload:t,chartType:l})};const Gr=require("react-smooth");var Hr=r.n(Gr),Xr=function(e){return null};Xr.displayName="Cell";const Vr=require("lodash/last");var Kr=r.n(Vr);function Yr(e){return Yr="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},Yr(e)}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Qr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qr(e,t):void 0}}(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.")}()}function Qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jr(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,(void 0,i=function(e,t){if("object"!==Yr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Yr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===Yr(i)?i:String(i)),n)}var i}var en=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,tn=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,rn=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,nn=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,on={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},an=Object.keys(on),cn="NaN",ln=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),""===r||rn.test(r)||(this.num=NaN,this.unit=""),an.includes(r)&&(this.num=function(e,t){return e*on[t]}(t,r),this.unit="px")}var t,r,n;return t=e,n=[{key:"parse",value:function(t){var r,n=Zr(null!==(r=nn.exec(t))&&void 0!==r?r:[],3),i=n[1],o=n[2];return new e(parseFloat(i),null!=o?o:"")}}],(r=[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&Jr(t.prototype,r),n&&Jr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function sn(e){if(e.includes(cn))return cn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=Zr(null!==(r=en.exec(t))&&void 0!==r?r:[],4),i=n[1],o=n[2],a=n[3],c=ln.parse(null!=i?i:""),l=ln.parse(null!=a?a:""),s="*"===o?c.multiply(l):c.divide(l);if(s.isNaN())return cn;t=t.replace(en,s.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,p=Zr(null!==(u=tn.exec(t))&&void 0!==u?u:[],4),f=p[1],d=p[2],h=p[3],m=ln.parse(null!=f?f:""),y=ln.parse(null!=h?h:""),v="+"===d?m.add(y):m.subtract(y);if(v.isNaN())return cn;t=t.replace(tn,v.toString())}return t}var un=/\(([^()]*)\)/;function pn(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var r=Zr(un.exec(t),2)[1];t=t.replace(un,sn(r))}return t}(t),sn(t)}(e)}catch(e){return cn}}(e.slice(5,-1));return t===cn?"":t}var fn=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],dn=["dx","dy","angle","className","breakAll"];function hn(){return hn=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},hn.apply(this,arguments)}function mn(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function yn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vn(e,t):void 0}}(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.")}()}function vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var gn=/[ \f\n\r\t\v\u2028\u2029]+/,bn=function(e){var t=e.children,r=e.breakAll,n=e.style;try{var i=[];return R()(t)||(i=r?t.toString().split(""):t.toString().split(gn)),{wordsWithComputedWidth:i.map((function(e){return{word:e,width:De(e,n).width}})),spaceWidth:r?0:De(" ",n).width}}catch(e){return null}},xn=function(e){return[{words:R()(e)?[]:e.toString().split(gn)}]},wn="#808080",On=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.lineHeight,a=void 0===o?"1em":o,c=e.capHeight,l=void 0===c?"0.71em":c,s=e.scaleToFit,u=void 0!==s&&s,p=e.textAnchor,h=void 0===p?"start":p,m=e.verticalAnchor,y=void 0===m?"end":m,v=e.fill,g=void 0===v?wn:v,b=mn(e,fn),x=(0,f.useMemo)((function(){return function(e){var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||r)&&!je.isSsr){var c=bn({breakAll:o,children:n,style:i});return c?function(e,t,r,n,i){var o=e.maxLines,a=e.children,c=e.style,l=e.breakAll,s=ve(o),u=a,p=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t){var o=t.word,a=t.width,c=e[e.length-1];if(c&&(null==n||i||c.width+a+r<Number(n)))c.words.push(o),c.width+=a+r;else{var l={words:[o],width:a};e.push(l)}return e}),[])},f=p(t);if(!s)return f;for(var d,h=function(e){var t=u.slice(0,e),r=bn({breakAll:l,style:c,children:t+"…"}).wordsWithComputedWidth,i=p(r),a=i.length>o||function(e){return e.reduce((function(e,t){return e.width>t.width?e:t}))}(i).width>Number(n);return[a,i]},m=0,y=u.length-1,v=0;m<=y&&v<=u.length-1;){var g=Math.floor((m+y)/2),b=yn(h(g-1),2),x=b[0],w=b[1],O=yn(h(g),1)[0];if(x||O||(m=g+1),x&&O&&(y=g-1),!x&&O){d=w;break}v++}return d||f}({breakAll:o,children:n,maxLines:a,style:i},c.wordsWithComputedWidth,c.spaceWidth,t,r):xn(n)}return xn(n)}({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:u,style:b.style,width:b.width})}),[b.breakAll,b.children,b.maxLines,u,b.style,b.width]),w=b.dx,O=b.dy,k=b.angle,S=b.className,j=b.breakAll,A=mn(b,dn);if(!ge(r)||!ge(i))return null;var E,P=r+(ve(w)?w:0),T=i+(ve(O)?O:0);switch(y){case"start":E=pn("calc(".concat(l,")"));break;case"middle":E=pn("calc(".concat((x.length-1)/2," * -").concat(a," + (").concat(l," / 2))"));break;default:E=pn("calc(".concat(x.length-1," * -").concat(a,")"))}var C=[];if(u){var I=x[0].width,D=b.width;C.push("scale(".concat((ve(D)?D/I:1)/I,")"))}return k&&C.push("rotate(".concat(k,", ").concat(P,", ").concat(T,")")),C.length&&(A.transform=C.join(" ")),d().createElement("text",hn({},bt(A,!0),{x:P,y:T,className:Z()("recharts-text",S),textAnchor:h,fill:g.includes("url")?wn:g}),x.map((function(e,t){var r=e.words.join(j?"":" ");return d().createElement("tspan",{x:P,dy:0===t?E:a,key:r},r)})))};function kn(e){return kn="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},kn(e)}var Sn=["offset"];function jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function An(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 En(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?An(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==kn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===kn(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):An(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Pn(){return Pn=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},Pn.apply(this,arguments)}var Tn=function(e){var t=e.value,r=e.formatter,n=R()(e.children)?t:e.children;return L()(r)?r(n):n},Cn=function(e,t,r){var n,i,o=e.position,a=e.viewBox,c=e.offset,l=e.className,s=a,u=s.cx,p=s.cy,f=s.innerRadius,h=s.outerRadius,m=s.startAngle,y=s.endAngle,v=s.clockWise,g=(f+h)/2,b=function(e,t){return me(t-e)*Math.min(Math.abs(t-e),360)}(m,y),x=b>=0?1:-1;"insideStart"===o?(n=m+x*c,i=v):"insideEnd"===o?(n=y-x*c,i=!v):"end"===o&&(n=y+x*c,i=v),i=b<=0?i:!i;var w=oe(u,p,g,n),O=oe(u,p,g,n+359*(i?1:-1)),k="M".concat(w.x,",").concat(w.y,"\n A").concat(g,",").concat(g,",0,1,").concat(i?0:1,",\n ").concat(O.x,",").concat(O.y),S=R()(e.id)?xe("recharts-radial-line-"):e.id;return d().createElement("text",Pn({},r,{dominantBaseline:"central",className:Z()("recharts-radial-bar-label",l)}),d().createElement("defs",null,d().createElement("path",{id:S,d:k})),d().createElement("textPath",{xlinkHref:"#".concat(S)},t))},In=function(e){var t=e.viewBox,r=e.offset,n=e.position,i=t,o=i.cx,a=i.cy,c=i.innerRadius,l=i.outerRadius,s=(i.startAngle+i.endAngle)/2;if("outside"===n){var u=oe(o,a,l+r,s),p=u.x;return{x:p,y:u.y,textAnchor:p>=o?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var f=oe(o,a,(c+l)/2,s);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}},Dn=function(e){var t=e.viewBox,r=e.parentViewBox,n=e.offset,i=e.position,o=t,a=o.x,c=o.y,l=o.width,s=o.height,u=s>=0?1:-1,p=u*n,f=u>0?"end":"start",d=u>0?"start":"end",h=l>=0?1:-1,m=h*n,y=h>0?"end":"start",v=h>0?"start":"end";if("top"===i)return En(En({},{x:a+l/2,y:c-u*n,textAnchor:"middle",verticalAnchor:f}),r?{height:Math.max(c-r.y,0),width:l}:{});if("bottom"===i)return En(En({},{x:a+l/2,y:c+s+p,textAnchor:"middle",verticalAnchor:d}),r?{height:Math.max(r.y+r.height-(c+s),0),width:l}:{});if("left"===i){var g={x:a-m,y:c+s/2,textAnchor:y,verticalAnchor:"middle"};return En(En({},g),r?{width:Math.max(g.x-r.x,0),height:s}:{})}if("right"===i){var b={x:a+l+m,y:c+s/2,textAnchor:v,verticalAnchor:"middle"};return En(En({},b),r?{width:Math.max(r.x+r.width-b.x,0),height:s}:{})}var x=r?{width:l,height:s}:{};return"insideLeft"===i?En({x:a+m,y:c+s/2,textAnchor:v,verticalAnchor:"middle"},x):"insideRight"===i?En({x:a+l-m,y:c+s/2,textAnchor:y,verticalAnchor:"middle"},x):"insideTop"===i?En({x:a+l/2,y:c+p,textAnchor:"middle",verticalAnchor:d},x):"insideBottom"===i?En({x:a+l/2,y:c+s-p,textAnchor:"middle",verticalAnchor:f},x):"insideTopLeft"===i?En({x:a+m,y:c+p,textAnchor:v,verticalAnchor:d},x):"insideTopRight"===i?En({x:a+l-m,y:c+p,textAnchor:y,verticalAnchor:d},x):"insideBottomLeft"===i?En({x:a+m,y:c+s-p,textAnchor:v,verticalAnchor:f},x):"insideBottomRight"===i?En({x:a+l-m,y:c+s-p,textAnchor:y,verticalAnchor:f},x):Ke()(i)&&(ve(i.x)||ye(i.x))&&(ve(i.y)||ye(i.y))?En({x:a+we(i.x,l),y:c+we(i.y,s),textAnchor:"end",verticalAnchor:"end"},x):En({x:a+l/2,y:c+s/2,textAnchor:"middle",verticalAnchor:"middle"},x)},Mn=function(e){return"cx"in e&&ve(e.cx)};function Nn(e){var t,r=e.offset,n=En({offset:void 0===r?5:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Sn)),i=n.viewBox,o=n.position,a=n.value,c=n.children,l=n.content,s=n.className,u=void 0===s?"":s,p=n.textBreakAll;if(!i||R()(a)&&R()(c)&&!(0,f.isValidElement)(l)&&!L()(l))return null;if((0,f.isValidElement)(l))return(0,f.cloneElement)(l,n);if(L()(l)){if(t=(0,f.createElement)(l,n),(0,f.isValidElement)(t))return t}else t=Tn(n);var h=Mn(i),m=bt(n,!0);if(h&&("insideStart"===o||"insideEnd"===o||"end"===o))return Cn(n,t,m);var y=h?In(n):Dn(n);return d().createElement(On,Pn({className:Z()("recharts-label",u)},m,y,{breakAll:p}),t)}Nn.displayName="Label";var Rn=function(e){var t=e.cx,r=e.cy,n=e.angle,i=e.startAngle,o=e.endAngle,a=e.r,c=e.radius,l=e.innerRadius,s=e.outerRadius,u=e.x,p=e.y,f=e.top,d=e.left,h=e.width,m=e.height,y=e.clockWise,v=e.labelViewBox;if(v)return v;if(ve(h)&&ve(m)){if(ve(u)&&ve(p))return{x:u,y:p,width:h,height:m};if(ve(f)&&ve(d))return{x:f,y:d,width:h,height:m}}return ve(u)&&ve(p)?{x:u,y:p,width:0,height:0}:ve(t)&&ve(r)?{cx:t,cy:r,startAngle:i||n||0,endAngle:o||n||0,innerRadius:l||0,outerRadius:s||c||a||0,clockWise:y}:e.viewBox?e.viewBox:{}};function Bn(e){return Bn="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},Bn(e)}Nn.parseViewBox=Rn,Nn.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Rn(e),o=ht(n,Nn).map((function(e,r){return(0,f.cloneElement)(e,{viewBox:t||i,key:"label-".concat(r)})}));if(!r)return o;var a,c=function(e,t){return e?!0===e?d().createElement(Nn,{key:"label-implicit",viewBox:t}):ge(e)?d().createElement(Nn,{key:"label-implicit",viewBox:t,value:e}):(0,f.isValidElement)(e)?e.type===Nn?(0,f.cloneElement)(e,{key:"label-implicit",viewBox:t}):d().createElement(Nn,{key:"label-implicit",content:e,viewBox:t}):L()(e)?d().createElement(Nn,{key:"label-implicit",content:e,viewBox:t}):Ke()(e)?d().createElement(Nn,Pn({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||i);return[c].concat(function(e){if(Array.isArray(e))return jn(e)}(a=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return jn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jn(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())};var Ln=["valueAccessor"],_n=["data","dataKey","clockWise","id","textBreakAll"];function zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $n(){return $n=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},$n.apply(this,arguments)}function Fn(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 qn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fn(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Bn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Bn(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Wn(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Un=function(e){return Array.isArray(e.value)?Kr()(e.value):e.value};function Gn(e){var t=e.valueAccessor,r=void 0===t?Un:t,n=Wn(e,Ln),i=n.data,o=n.dataKey,a=n.clockWise,c=n.id,l=n.textBreakAll,s=Wn(n,_n);return i&&i.length?d().createElement(jt,{className:"recharts-label-list"},i.map((function(e,t){var n=R()(o)?r(e,t):kr(e&&e.payload,o),i=R()(c)?{}:{id:"".concat(c,"-").concat(t)};return d().createElement(Nn,$n({},bt(e,!0),s,i,{parentViewBox:e.parentViewBox,value:n,textBreakAll:l,viewBox:Nn.parseViewBox(R()(a)?e:qn(qn({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))}))):null}Gn.displayName="LabelList",Gn.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var n,i=ht(e.children,Gn).map((function(e,r){return(0,f.cloneElement)(e,{data:t,key:"labelList-".concat(r)})}));return r?[function(e,t){return e?!0===e?d().createElement(Gn,{key:"labelList-implicit",data:t}):d().isValidElement(e)||L()(e)?d().createElement(Gn,{key:"labelList-implicit",data:t,content:e}):Ke()(e)?d().createElement(Gn,$n({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t)].concat(function(e){if(Array.isArray(e))return zn(e)}(n=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return zn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zn(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):i};const Hn=require("lodash/isPlainObject");var Xn=r.n(Hn);const Vn=require("lodash/isBoolean");var Kn=r.n(Vn);function Yn(e){return Yn="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},Yn(e)}function Zn(){return Zn=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},Zn.apply(this,arguments)}function Qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jn(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 ei(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Yn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Yn(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ti=function(e,t,r,n,i){var o,a=Math.min(Math.abs(r)/2,Math.abs(n)/2),c=n>=0?1:-1,l=r>=0?1:-1,s=n>=0&&r>=0||n<0&&r<0?1:0;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],p=0;p<4;p++)u[p]=i[p]>a?a:i[p];o="M".concat(e,",").concat(t+c*u[0]),u[0]>0&&(o+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(s,",").concat(e+l*u[0],",").concat(t)),o+="L ".concat(e+r-l*u[1],",").concat(t),u[1]>0&&(o+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(s,",\n ").concat(e+r,",").concat(t+c*u[1])),o+="L ".concat(e+r,",").concat(t+n-c*u[2]),u[2]>0&&(o+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(s,",\n ").concat(e+r-l*u[2],",").concat(t+n)),o+="L ".concat(e+l*u[3],",").concat(t+n),u[3]>0&&(o+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(s,",\n ").concat(e,",").concat(t+n-c*u[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var f=Math.min(a,i);o="M ".concat(e,",").concat(t+c*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+r-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+r,",").concat(t+c*f,"\n L ").concat(e+r,",").concat(t+n-c*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+r-l*f,",").concat(t+n,"\n L ").concat(e+l*f,",").concat(t+n,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e,",").concat(t+n-c*f," Z")}else o="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return o},ri=function(e,t){if(!e||!t)return!1;var r=e.x,n=e.y,i=t.x,o=t.y,a=t.width,c=t.height;if(Math.abs(a)>0&&Math.abs(c)>0){var l=Math.min(i,i+a),s=Math.max(i,i+a),u=Math.min(o,o+c),p=Math.max(o,o+c);return r>=l&&r<=s&&n>=u&&n<=p}return!1},ni={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ii=function(e){var t,r,n=ei(ei({},ni),e),i=(0,f.useRef)(),o=(t=(0,f.useState)(-1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Qn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qn(e,t):void 0}}(t,r)||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.")}()),a=o[0],c=o[1];(0,f.useEffect)((function(){if(i.current&&i.current.getTotalLength)try{var e=i.current.getTotalLength();e&&c(e)}catch(e){}}),[]);var l=n.x,s=n.y,u=n.width,p=n.height,h=n.radius,m=n.className,y=n.animationEasing,v=n.animationDuration,g=n.animationBegin,b=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||s!==+s||u!==+u||p!==+p||0===u||0===p)return null;var w=Z()("recharts-rectangle",m);return x?d().createElement(Hr(),{canBegin:a>0,from:{width:u,height:p,x:l,y:s},to:{width:u,height:p,x:l,y:s},duration:v,animationEasing:y,isActive:x},(function(e){var t=e.width,r=e.height,o=e.x,c=e.y;return d().createElement(Hr(),{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:v,isActive:b,easing:y},d().createElement("path",Zn({},bt(n,!0),{className:w,d:ti(o,c,t,r,h),ref:i})))})):d().createElement("path",Zn({},bt(n,!0),{className:w,d:ti(l,s,u,p,h)}))};function oi(e){return oi="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},oi(e)}function ai(){return ai=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},ai.apply(this,arguments)}function ci(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function li(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 si(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?li(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==oi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===oi(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):li(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ui=function(e,t,r,n,i){var o,a=r-n;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+r,",").concat(t),o+="L ".concat(e+r-a/2,",").concat(t+i),(o+="L ".concat(e+r-a/2-n,",").concat(t+i))+"L ".concat(e,",").concat(t," Z")},pi={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fi=function(e){var t,r,n=si(si({},pi),e),i=(0,f.useRef)(),o=(t=(0,f.useState)(-1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return ci(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ci(e,t):void 0}}(t,r)||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.")}()),a=o[0],c=o[1];(0,f.useEffect)((function(){if(i.current&&i.current.getTotalLength)try{var e=i.current.getTotalLength();e&&c(e)}catch(e){}}),[]);var l=n.x,s=n.y,u=n.upperWidth,p=n.lowerWidth,h=n.height,m=n.className,y=n.animationEasing,v=n.animationDuration,g=n.animationBegin,b=n.isUpdateAnimationActive;if(l!==+l||s!==+s||u!==+u||p!==+p||h!==+h||0===u&&0===p||0===h)return null;var x=Z()("recharts-trapezoid",m);return b?d().createElement(Hr(),{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:s},to:{upperWidth:u,lowerWidth:p,height:h,x:l,y:s},duration:v,animationEasing:y,isActive:b},(function(e){var t=e.upperWidth,r=e.lowerWidth,o=e.height,c=e.x,l=e.y;return d().createElement(Hr(),{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:v,easing:y},d().createElement("path",ai({},bt(n,!0),{className:x,d:ui(c,l,t,r,o),ref:i})))})):d().createElement("g",null,d().createElement("path",ai({},bt(n,!0),{className:x,d:ui(l,s,u,p,h)})))};function di(e){return di="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},di(e)}function hi(){return hi=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},hi.apply(this,arguments)}function mi(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 yi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mi(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==di(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==di(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===di(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var vi=function(e){var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,a=e.isExternal,c=e.cornerRadius,l=e.cornerIsExternal,s=c*(a?1:-1)+n,u=Math.asin(c/s)/ne,p=l?i:i+o*u,f=l?i-o*u:i;return{center:oe(t,r,s,p),circleTangency:oe(t,r,n,p),lineTangency:oe(t,r,s*Math.cos(u*ne),f),theta:u}},gi=function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,a=function(e,t){return me(t-e)*Math.min(Math.abs(t-e),359.999)}(o,e.endAngle),c=o+a,l=oe(t,r,i,o),s=oe(t,r,i,c),u="M ".concat(l.x,",").concat(l.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(o>c),",\n ").concat(s.x,",").concat(s.y,"\n ");if(n>0){var p=oe(t,r,n,o),f=oe(t,r,n,c);u+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(n,",").concat(n,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(o<=c),",\n ").concat(p.x,",").concat(p.y," Z")}else u+="L ".concat(t,",").concat(r," Z");return u},bi={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xi=function(e){var t=yi(yi({},bi),e),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,c=t.forceCornerRadius,l=t.cornerIsExternal,s=t.startAngle,u=t.endAngle,p=t.className;if(o<i||s===u)return null;var f,h=Z()("recharts-sector",p),m=o-i,y=we(a,m,0,!0);return f=y>0&&Math.abs(s-u)<360?function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,c=e.cornerIsExternal,l=e.startAngle,s=e.endAngle,u=me(s-l),p=vi({cx:t,cy:r,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:c}),f=p.circleTangency,d=p.lineTangency,h=p.theta,m=vi({cx:t,cy:r,radius:i,angle:s,sign:-u,cornerRadius:o,cornerIsExternal:c}),y=m.circleTangency,v=m.lineTangency,g=m.theta,b=c?Math.abs(l-s):Math.abs(l-s)-h-g;if(b<0)return a?"M ".concat(d.x,",").concat(d.y,"\n a").concat(o,",").concat(o,",0,0,1,").concat(2*o,",0\n a").concat(o,",").concat(o,",0,0,1,").concat(2*-o,",0\n "):gi({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:s});var x="M ".concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n A").concat(i,",").concat(i,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(y.x,",").concat(y.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(v.x,",").concat(v.y,"\n ");if(n>0){var w=vi({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=w.circleTangency,k=w.lineTangency,S=w.theta,j=vi({cx:t,cy:r,radius:n,angle:s,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),A=j.circleTangency,E=j.lineTangency,P=j.theta,T=c?Math.abs(l-s):Math.abs(l-s)-S-P;if(T<0&&0===o)return"".concat(x,"L").concat(t,",").concat(r,"Z");x+="L".concat(E.x,",").concat(E.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(A.x,",").concat(A.y,"\n A").concat(n,",").concat(n,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(O.x,",").concat(O.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(k.x,",").concat(k.y,"Z")}else x+="L".concat(t,",").concat(r,"Z");return x}({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,m/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:s,endAngle:u}):gi({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:s,endAngle:u}),d().createElement("path",hi({},bt(t,!0),{className:h,d:f,role:"img"}))},wi=["option","shapeType","propTransformer","activeClassName","isActive"];function Oi(e){return Oi="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},Oi(e)}function ki(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 Si(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ki(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Oi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Oi(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ki(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ji(e,t){return Si(Si({},t),e)}function Ai(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return d().createElement(ii,r);case"trapezoid":return d().createElement(fi,r);case"sector":return d().createElement(xi,r);case"symbols":if(function(e,t){return"symbols"===e}(t))return d().createElement(Ft,r);break;default:return null}}function Ei(e){var t,r=e.option,n=e.shapeType,i=e.propTransformer,o=void 0===i?ji:i,a=e.activeClassName,c=void 0===a?"recharts-active-shape":a,l=e.isActive,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,wi);if((0,f.isValidElement)(r))t=(0,f.cloneElement)(r,Si(Si({},s),function(e){return(0,f.isValidElement)(e)?e.props:e}(r)));else if(L()(r))t=r(s);else if(Xn()(r)&&!Kn()(r)){var u=o(r,s);t=d().createElement(Ai,{shapeType:n,elementProps:u})}else{var p=s;t=d().createElement(Ai,{shapeType:n,elementProps:p})}return l?d().createElement(jt,{className:c},t):t}function Pi(e,t){return null!=t&&"trapezoids"in e.props}function Ti(e,t){return null!=t&&"sectors"in e.props}function Ci(e,t){return null!=t&&"points"in e.props}function Ii(e,t){var r,n,i=e.x===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.x)||e.x===t.x,o=e.y===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.y)||e.y===t.y;return i&&o}function Di(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Mi(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Ni(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=function(e,t){var r;return Pi(e,t)?r="trapezoids":Ti(e,t)?r="sectors":Ci(e,t)&&(r="points"),r}(r,t),o=function(e,t){var r,n;return Pi(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:Ti(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:Ci(e,t)?t.payload:{}}(r,t),a=n.filter((function(e,n){var a=He()(o,e),c=r.props[i].filter((function(e){var n=function(e,t){var r;return Pi(e,t)?r=Ii:Ti(e,t)?r=Di:Ci(e,t)&&(r=Mi),r}(r,t);return n(e,t)})),l=r.props[i].indexOf(c[c.length-1]);return a&&n===l}));return n.indexOf(a[a.length-1])}function Ri(e){return Ri="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},Ri(e)}var Bi=["x","y"];function Li(){return Li=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},Li.apply(this,arguments)}function _i(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 zi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_i(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ri(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ri(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $i(e,t){var r=e.x,n=e.y,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Bi),o="".concat(r),a=parseInt(o,10),c="".concat(n),l=parseInt(c,10),s="".concat(t.height||i.height),u=parseInt(s,10),p="".concat(t.width||i.width),f=parseInt(p,10);return zi(zi(zi(zi(zi({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function Fi(e){return d().createElement(Ei,Li({shapeType:"rectangle",propTransformer:$i,activeClassName:"recharts-active-bar"},e))}var qi=["value","background"];function Wi(e){return Wi="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},Wi(e)}function Ui(){return Ui=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},Ui.apply(this,arguments)}function Gi(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 Hi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gi(Object(r),!0).forEach((function(t){Zi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xi(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,Qi(n.key),n)}}function Vi(e,t){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vi(e,t)}function Ki(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yi(e){return Yi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yi(e)}function Zi(e,t,r){return(t=Qi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qi(e){var t=function(e,t){if("object"!==Wi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Wi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Wi(t)?t:String(t)}var Ji=function(e){!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&&Vi(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=Yi(i);if(o){var r=Yi(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Wi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ki(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zi(Ki(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!1}),Zi(Ki(e),"id",xe("recharts-bar-")),Zi(Ki(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()})),Zi(Ki(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],(r=[{key:"renderRectanglesStatically",value:function(e){var t=this,r=this.props,n=r.shape,i=r.dataKey,o=r.activeIndex,a=r.activeBar,c=bt(this.props);return e&&e.map((function(e,r){var l=r===o,s=l?a:n,u=Hi(Hi(Hi({},c),e),{},{isActive:l,option:s,index:r,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return d().createElement(jt,Ui({className:"recharts-bar-rectangle"},it(t.props,e,r),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value)}),d().createElement(Fi,u))}))}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,r=t.data,n=t.layout,i=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,c=t.animationEasing,l=t.animationId,s=this.state.prevData;return d().createElement(Hr(),{begin:o,duration:a,isActive:i,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(t){var i=t.t,o=r.map((function(e,t){var r=s&&s[t];if(r){var o=ke(r.x,e.x),a=ke(r.y,e.y),c=ke(r.width,e.width),l=ke(r.height,e.height);return Hi(Hi({},e),{},{x:o(i),y:a(i),width:c(i),height:l(i)})}if("horizontal"===n){var u=ke(0,e.height)(i);return Hi(Hi({},e),{},{y:e.y+e.height-u,height:u})}var p=ke(0,e.width)(i);return Hi(Hi({},e),{},{width:p})}));return d().createElement(jt,null,e.renderRectanglesStatically(o))}))}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,r=e.isAnimationActive,n=this.state.prevData;return!(r&&t&&t.length)||n&&He()(n,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,r=t.data,n=t.dataKey,i=t.activeIndex,o=bt(this.props.background);return r.map((function(t,r){t.value;var a=t.background,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,qi);if(!a)return null;var l=Hi(Hi(Hi(Hi(Hi({},c),{},{fill:"#eee"},a),o),it(e.props,t,r)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:n,index:r,key:"background-bar-".concat(r),className:"recharts-bar-background-rectangle"});return d().createElement(Fi,Ui({option:e.props.background,isActive:r===i},l))}))}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.data,i=r.xAxis,o=r.yAxis,a=r.layout,c=ht(r.children,Tt);if(!c)return null;var l="vertical"===a?n[0].height/2:n[0].width/2,s=function(e,t){var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:kr(e,t)}},u={clipPath:e?"url(#clipPath-".concat(t,")"):null};return d().createElement(jt,u,c.map((function(e){return d().cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,offset:l,dataPointFormatter:s})})))}},{key:"render",value:function(){var e=this.props,t=e.hide,r=e.data,n=e.className,i=e.xAxis,o=e.yAxis,a=e.left,c=e.top,l=e.width,s=e.height,u=e.isAnimationActive,p=e.background,f=e.id;if(t||!r||!r.length)return null;var h=this.state.isAnimationFinished,m=Z()("recharts-bar",n),y=i&&i.allowDataOverflow,v=o&&o.allowDataOverflow,g=y||v,b=R()(f)?this.id:f;return d().createElement(jt,{className:m},y||v?d().createElement("defs",null,d().createElement("clipPath",{id:"clipPath-".concat(b)},d().createElement("rect",{x:y?a:a-l/2,y:v?c:c-s/2,width:y?l:2*l,height:v?s:2*s}))):null,d().createElement(jt,{className:"recharts-bar-rectangles",clipPath:g?"url(#clipPath-".concat(b,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(g,b),(!u||h)&&Gn.renderCallByParent(this.props,r))}}])&&Xi(t.prototype,r),n&&Xi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);function eo(e){return eo="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},eo(e)}function to(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,oo(n.key),n)}}function ro(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 no(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ro(Object(r),!0).forEach((function(t){io(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ro(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function io(e,t,r){return(t=oo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oo(e){var t=function(e,t){if("object"!==eo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===eo(t)?t:String(t)}Zi(Ji,"displayName","Bar"),Zi(Ji,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!0,isAnimationActive:!je.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Zi(Ji,"getComposedData",(function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,c=e.xAxisTicks,l=e.yAxisTicks,s=e.stackedData,u=e.dataStartIndex,p=e.displayedData,f=e.offset,d=function(e,t){if(!e)return null;for(var r=0,n=e.length;r<n;r++)if(e[r].item===t)return e[r].position;return null}(n,r);if(!d)return null;var h=t.layout,m=r.props,y=m.dataKey,v=m.children,g=m.minPointSize,b="horizontal"===h?a:o,x=s?b.scale.domain():null,w=function(e){var t=e.numericAxis,r=t.scale.domain();if("number"===t.type){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]}({numericAxis:b}),O=ht(v,Xr),k=p.map((function(e,t){var n,p,f,m,v,b;if(s?n=function(e,t){if(!t||2!==t.length||!ve(t[0])||!ve(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!ve(e[0])||e[0]<r)&&(i[0]=r),(!ve(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i}(s[u+t],x):(n=kr(e,y),Array.isArray(n)||(n=[w,n])),"horizontal"===h){var k,S=[a.scale(n[0]),a.scale(n[1])],j=S[0],A=S[1];p=Lr({axis:o,ticks:c,bandSize:i,offset:d.offset,entry:e,index:t}),f=null!==(k=null!=A?A:j)&&void 0!==k?k:void 0,m=d.size;var E=j-A;if(v=Number.isNaN(E)?0:E,b={x:p,y:a.y,width:m,height:a.height},Math.abs(g)>0&&Math.abs(v)<Math.abs(g)){var P=me(v||g)*(Math.abs(g)-Math.abs(v));f-=P,v+=P}}else{var T=[o.scale(n[0]),o.scale(n[1])],C=T[0],I=T[1];p=C,f=Lr({axis:a,ticks:l,bandSize:i,offset:d.offset,entry:e,index:t}),m=I-C,v=d.size,b={x:o.x,y:f,width:o.width,height:v},Math.abs(g)>0&&Math.abs(m)<Math.abs(g)&&(m+=me(m||g)*(Math.abs(g)-Math.abs(m)))}return Hi(Hi(Hi({},e),{},{x:p,y:f,width:m,height:v,value:s?n:n[1],payload:e,background:b},O&&O[t]&&O[t].props),{},{tooltipPayload:[Ur(r,e)],tooltipPosition:{x:p+m/2,y:f+v/2}})}));return Hi({data:k,layout:h},f)}));var ao=function(e,t,r,n,i){var o=e.width,a=e.height,c=e.layout,l=e.children,s=Object.keys(t),u={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},p=!!mt(l,Ji);return s.reduce((function(o,a){var l,s,f,d,h,m=t[a],y=m.orientation,v=m.domain,g=m.padding,b=void 0===g?{}:g,x=m.mirror,w=m.reversed,O="".concat(y).concat(x?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var k=v[1]-v[0],S=1/0,j=m.categoricalDomain.sort();j.forEach((function(e,t){t>0&&(S=Math.min((e||0)-(j[t-1]||0),S))}));var A=S/k,E="vertical"===m.layout?r.height:r.width;if("gap"===m.padding&&(l=A*E/2),"no-gap"===m.padding){var P=we(e.barCategoryGap,A*E),T=A*E/2;l=T-P-(T-P)/E*P}}s="xAxis"===n?[r.left+(b.left||0)+(l||0),r.left+r.width-(b.right||0)-(l||0)]:"yAxis"===n?"horizontal"===c?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(l||0),r.top+r.height-(b.bottom||0)-(l||0)]:m.range,w&&(s=[s[1],s[0]]);var C=function(e,t,r){var n=e.scale,i=e.type,o=e.layout,a=e.axisType;if("auto"===n)return"radial"===o&&"radiusAxis"===a?{scale:Re.scaleBand(),realScaleType:"band"}:"radial"===o&&"angleAxis"===a?{scale:Re.scaleLinear(),realScaleType:"linear"}:"category"===i&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!r)?{scale:Re.scalePoint(),realScaleType:"point"}:"category"===i?{scale:Re.scaleBand(),realScaleType:"band"}:{scale:Re.scaleLinear(),realScaleType:"linear"};if(ue()(n)){var c="scale".concat(Ue()(n));return{scale:(Re[c]||Re.scalePoint)(),realScaleType:Re[c]?c:"point"}}return L()(n)?{scale:n}:{scale:Re.scalePoint(),realScaleType:"point"}}(m,i,p),I=C.scale,D=C.realScaleType;I.domain(v).range(s),function(e){var t=e.domain();if(t&&!(t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-Mr,o=Math.max(n[0],n[1])+Mr,a=e(t[0]),c=e(t[r-1]);(a<i||a>o||c<i||c>o)&&e.domain([t[0],t[r-1]])}}(I);var M=function(e,t){var r=t.realScaleType,n=t.type,i=t.tickCount,o=t.originalDomain,a=t.allowDecimals,c=r||t.scale;if("auto"!==c&&"linear"!==c)return null;if(i&&"number"===n&&o&&("auto"===o[0]||"auto"===o[1])){var l=e.domain();if(!l.length)return null;var s=(0,Xe.getNiceTickValues)(l,i,a);return e.domain([$e()(s),_e()(s)]),{niceTicks:s}}if(i&&"number"===n){var u=e.domain();return{niceTicks:(0,Xe.getTickValuesFixedDomain)(u,i,a)}}return null}(I,no(no({},m),{},{realScaleType:D}));"xAxis"===n?(h="top"===y&&!x||"bottom"===y&&x,f=r.left,d=u[O]-h*m.height):"yAxis"===n&&(h="left"===y&&!x||"right"===y&&x,f=u[O]-h*m.width,d=r.top);var N=no(no(no({},m),M),{},{realScaleType:D,x:f,y:d,scale:I,width:"xAxis"===n?r.width:m.width,height:"yAxis"===n?r.height:m.height});return N.bandSize=qr(N,M),m.hide||"xAxis"!==n?m.hide||(u[O]+=(h?-1:1)*N.width):u[O]+=(h?-1:1)*N.height,no(no({},o),{},io({},a,N))}),{})},co=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y;return{x:Math.min(r,i),y:Math.min(n,o),width:Math.abs(i-r),height:Math.abs(o-n)}},lo=function(e){var t=e.x1,r=e.y1,n=e.x2,i=e.y2;return co({x:t,y:r},{x:n,y:i})},so=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}var t,r,n;return t=e,r=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.bandAware,n=t.position;if(void 0!==e){if(n)switch(n){case"start":default:return this.scale(e);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case"end":var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}if(r){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),r=t[0],n=t[t.length-1];return r<=n?e>=r&&e<=n:e>=n&&e<=r}}],n=[{key:"create",value:function(t){return new e(t)}}],r&&to(t.prototype,r),n&&to(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();io(so,"EPS",1e-4);var uo=function(e){var t=Object.keys(e).reduce((function(t,r){return no(no({},t),{},io({},r,so.create(e[r])))}),{});return no(no({},t),{},{apply:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.bandAware,i=r.position;return Ne()(e,(function(e,r){return t[r].apply(e,{bandAware:n,position:i})}))},isInRange:function(e){return K()(e,(function(e,r){return t[r].isInRange(e)}))}})};function po(e,t,r){if(t<1)return[];if(1===t&&void 0===r)return e;for(var n=[],i=0;i<e.length;i+=t){if(void 0!==r&&!0!==r(e[i]))return;n.push(e[i])}return n}function fo(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function ho(e){return ho="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},ho(e)}function mo(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 yo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ho(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ho(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ho(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vo(e,t,r){var n=e.tick,i=e.ticks,o=e.viewBox,a=e.minTickGap,c=e.orientation,l=e.interval,s=e.tickFormatter,u=e.unit,p=e.angle;if(!i||!i.length||!n)return[];if(ve(l)||je.isSsr)return function(e,t){return po(e,t+1)}(i,"number"==typeof l&&ve(l)?l:0);var f=[],d="top"===c||"bottom"===c?"width":"height",h=u&&"width"===d?De(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(e,n){var i=L()(s)?s(e.value,n):e.value;return"width"===d?function(e,t,r){return function(e){var t=e.width,r=e.height,n=((arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)%180+180)%180*Math.PI/180,i=Math.atan(r/t),o=n>i&&n<Math.PI-i?r/Math.sin(n):t/Math.cos(n);return Math.abs(o)}({width:e.width+t.width,height:e.height+t.height},r)}(De(i,{fontSize:t,letterSpacing:r}),h,p):De(i,{fontSize:t,letterSpacing:r})[d]},y=i.length>=2?me(i[1].coordinate-i[0].coordinate):1,v=function(e,t,r){var n="width"===r,i=e.x,o=e.y,a=e.width,c=e.height;return 1===t?{start:n?i:o,end:n?i+a:o+c}:{start:n?i+a:o+c,end:n?i:o}}(o,y,d);return"equidistantPreserveStart"===l?function(e,t,r,n,i){for(var o,a=(n||[]).slice(),c=t.start,l=t.end,s=0,u=1,p=c,f=function(){var t=null==n?void 0:n[s];if(void 0===t)return{v:po(n,u)};var o,a=s,f=function(){return void 0===o&&(o=r(t,a)),o},d=t.coordinate,h=0===s||fo(e,d,f,p,l);h||(s=0,p=c,u+=1),h&&(p=d+e*(f()/2+i),s+=u)};u<=a.length;)if(o=f())return o.v;return[]}(y,v,m,i,a):(f="preserveStart"===l||"preserveStartEnd"===l?function(e,t,r,n,i,o){var a=(n||[]).slice(),c=a.length,l=t.start,s=t.end;if(o){var u=n[c-1],p=r(u,c-1),f=e*(u.coordinate+e*p/2-s);a[c-1]=u=yo(yo({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),fo(e,u.tickCoord,(function(){return p}),l,s)&&(s=u.tickCoord-e*(p/2+i),a[c-1]=yo(yo({},u),{},{isShow:!0}))}for(var d=o?c-1:c,h=function(t){var n,o=a[t],c=function(){return void 0===n&&(n=r(o,t)),n};if(0===t){var u=e*(o.coordinate-e*c()/2-l);a[t]=o=yo(yo({},o),{},{tickCoord:u<0?o.coordinate-u*e:o.coordinate})}else a[t]=o=yo(yo({},o),{},{tickCoord:o.coordinate});fo(e,o.tickCoord,c,l,s)&&(l=o.tickCoord+e*(c()/2+i),a[t]=yo(yo({},o),{},{isShow:!0}))},m=0;m<d;m++)h(m);return a}(y,v,m,i,a,"preserveStartEnd"===l):function(e,t,r,n,i){for(var o=(n||[]).slice(),a=o.length,c=t.start,l=t.end,s=function(t){var n,s=o[t],u=function(){return void 0===n&&(n=r(s,t)),n};if(t===a-1){var p=e*(s.coordinate+e*u()/2-l);o[t]=s=yo(yo({},s),{},{tickCoord:p>0?s.coordinate-p*e:s.coordinate})}else o[t]=s=yo(yo({},s),{},{tickCoord:s.coordinate});fo(e,s.tickCoord,u,c,l)&&(l=s.tickCoord-e*(u()/2+i),o[t]=yo(yo({},s),{},{isShow:!0}))},u=a-1;u>=0;u--)s(u);return o}(y,v,m,i,a),f.filter((function(e){return e.isShow})))}function go(e){return go="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},go(e)}function bo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xo(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 wo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==go(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==go(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===go(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oo(e){return Array.isArray(e)&&ge(e[0])&&ge(e[1])?e.join(" ~ "):e}var ko=function(e){var t=e.separator,r=void 0===t?" : ":t,n=e.contentStyle,i=void 0===n?{}:n,o=e.itemStyle,a=void 0===o?{}:o,c=e.labelStyle,l=void 0===c?{}:c,s=e.payload,u=e.formatter,p=e.itemSorter,f=e.wrapperClassName,h=e.labelClassName,m=e.label,y=e.labelFormatter,v=wo({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),g=wo({margin:0},l),b=!R()(m),x=b?m:"",w=Z()("recharts-default-tooltip",f),O=Z()("recharts-tooltip-label",h);return b&&y&&null!=s&&(x=y(m,s)),d().createElement("div",{className:w,style:v},d().createElement("p",{className:O,style:g},d().isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(p?W()(s,p):s).map((function(e,t){if("none"===e.type)return null;var n=wo({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),i=e.formatter||u||Oo,o=e.value,c=e.name,l=o,p=c;if(i&&null!=l&&null!=p){var f=i(o,c,e,t,s);if(Array.isArray(f)){var h=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return bo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bo(e,t):void 0}}(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.")}()}(f,2);l=h[0],p=h[1]}else l=f}return d().createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:n},ge(p)?d().createElement("span",{className:"recharts-tooltip-item-name"},p):null,ge(p)?d().createElement("span",{className:"recharts-tooltip-item-separator"},r):null,d().createElement("span",{className:"recharts-tooltip-item-value"},l),d().createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return d().createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function So(e){return So="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},So(e)}function jo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==So(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==So(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===So(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ao="recharts-tooltip-wrapper",Eo={visibility:"hidden"};function Po(e){var t,r=e.coordinate,n=e.translateX,i=e.translateY;return Z()(Ao,(jo(t={},"".concat(Ao,"-right"),ve(n)&&r&&ve(r.x)&&n>=r.x),jo(t,"".concat(Ao,"-left"),ve(n)&&r&&ve(r.x)&&n<r.x),jo(t,"".concat(Ao,"-bottom"),ve(i)&&r&&ve(r.y)&&i>=r.y),jo(t,"".concat(Ao,"-top"),ve(i)&&r&&ve(r.y)&&i<r.y),t))}function To(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,c=e.tooltipDimension,l=e.viewBox,s=e.viewBoxDimension;if(o&&ve(o[n]))return o[n];var u=r[n]-c-i,p=r[n]+i;return t[n]?a[n]?u:p:a[n]?u<l[n]?Math.max(p,l[n]):Math.max(u,l[n]):p+c>l[n]+s?Math.max(u,l[n]):Math.max(p,l[n])}function Co(e){return Co="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},Co(e)}function Io(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 Do(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Io(Object(r),!0).forEach((function(t){Lo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Io(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Mo(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,_o(n.key),n)}}function No(e,t){return No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},No(e,t)}function Ro(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bo(e){return Bo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bo(e)}function Lo(e,t,r){return(t=_o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _o(e){var t=function(e,t){if("object"!==Co(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Co(t)?t:String(t)}var zo=function(e){!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&&No(e,t)}(a,e);var t,r,n,i,o=(n=a,i=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}}(),function(){var e,t=Bo(n);if(i){var r=Bo(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Co(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ro(e)}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lo(Ro(e=o.call.apply(o,[this].concat(r))),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Lo(Ro(e),"lastBoundingBox",{width:-1,height:-1}),Lo(Ro(e),"handleKeyDown",(function(t){var r,n,i,o;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(r=null===(n=e.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==r?r:0,y:null!==(i=null===(o=e.props.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})})),e}return t=a,(r=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.lastBoundingBox.width)>1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height)}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var e=this,t=this.props,r=t.active,n=t.allowEscapeViewBox,i=t.animationDuration,o=t.animationEasing,a=t.children,c=t.coordinate,l=t.hasPayload,s=t.isAnimationActive,u=t.offset,p=t.position,f=t.reverseDirection,h=t.useTranslate3d,m=t.viewBox,y=t.wrapperStyle,v=function(e){var t,r,n,i=e.allowEscapeViewBox,o=e.coordinate,a=e.offsetTopLeft,c=e.position,l=e.reverseDirection,s=e.tooltipBox,u=e.useTranslate3d,p=e.viewBox;return t=s.height>0&&s.width>0&&o?function(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return(0,Gr.translateStyle)({transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")})}({translateX:r=To({allowEscapeViewBox:i,coordinate:o,key:"x",offsetTopLeft:a,position:c,reverseDirection:l,tooltipDimension:s.width,viewBox:p,viewBoxDimension:p.width}),translateY:n=To({allowEscapeViewBox:i,coordinate:o,key:"y",offsetTopLeft:a,position:c,reverseDirection:l,tooltipDimension:s.height,viewBox:p,viewBoxDimension:p.height}),useTranslate3d:u}):Eo,{cssProperties:t,cssClasses:Po({translateX:r,translateY:n,coordinate:o})}}({allowEscapeViewBox:n,coordinate:c,offsetTopLeft:u,position:p,reverseDirection:f,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:h,viewBox:m}),g=v.cssClasses,b=v.cssProperties,x=Do(Do(Do({},s&&r&&(0,Gr.translateStyle)({transition:"transform ".concat(i,"ms ").concat(o)})),b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&r&&l?"visible":"hidden",position:"absolute",top:0,left:0},y);return d().createElement("div",{tabIndex:-1,role:"dialog",className:g,style:x,ref:function(t){e.wrapperNode=t}},a)}}])&&Mo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(f.PureComponent);function $o(e){return $o="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},$o(e)}function Fo(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 qo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fo(Object(r),!0).forEach((function(t){Ho(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Wo(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,Xo(n.key),n)}}function Uo(e,t){return Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uo(e,t)}function Go(e){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Go(e)}function Ho(e,t,r){return(t=Xo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xo(e){var t=function(e,t){if("object"!==$o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==$o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===$o(t)?t:String(t)}function Vo(e){return e.dataKey}var Ko=function(e){!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&&Uo(e,t)}(a,e);var t,r,n,i,o=(n=a,i=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}}(),function(){var e,t=Go(n);if(i){var r=Go(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===$o(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)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){var e=this.props,t=e.active,r=e.allowEscapeViewBox,n=e.animationDuration,i=e.animationEasing,o=e.content,a=e.coordinate,c=e.filterNull,l=e.isAnimationActive,s=e.offset,u=e.payload,p=e.payloadUniqBy,f=e.position,h=e.reverseDirection,m=e.useTranslate3d,y=e.viewBox,v=e.wrapperStyle,g=null!=u?u:[];c&&g.length&&(g=er(u.filter((function(e){return null!=e.value})),p,Vo));var b=g.length>0;return d().createElement(zo,{allowEscapeViewBox:r,animationDuration:n,animationEasing:i,isAnimationActive:l,active:t,coordinate:a,hasPayload:b,offset:s,position:f,reverseDirection:h,useTranslate3d:m,viewBox:y,wrapperStyle:v},function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):"function"==typeof e?d().createElement(e,t):d().createElement(ko,t)}(o,qo(qo({},this.props),{},{payload:g})))}}])&&Wo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(f.PureComponent);function Yo(e){return Yo="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},Yo(e)}function Zo(){return Zo=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},Zo.apply(this,arguments)}function Qo(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 Jo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Yo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Yo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Yo(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ho(Ko,"displayName","Tooltip"),Ho(Ko,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!je.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ea={curveBasisClosed:Be.curveBasisClosed,curveBasisOpen:Be.curveBasisOpen,curveBasis:Be.curveBasis,curveBumpX:Be.curveBumpX,curveBumpY:Be.curveBumpY,curveLinearClosed:Be.curveLinearClosed,curveLinear:Be.curveLinear,curveMonotoneX:Be.curveMonotoneX,curveMonotoneY:Be.curveMonotoneY,curveNatural:Be.curveNatural,curveStep:Be.curveStep,curveStepAfter:Be.curveStepAfter,curveStepBefore:Be.curveStepBefore},ta=function(e){return e.x===+e.x&&e.y===+e.y},ra=function(e){return e.x},na=function(e){return e.y},ia=function(e){var t=e.className,r=e.points,n=e.path,i=e.pathRef;if(!(r&&r.length||n))return null;var o=r&&r.length?function(e){var t,r=e.type,n=void 0===r?"linear":r,i=e.points,o=void 0===i?[]:i,a=e.baseLine,c=e.layout,l=e.connectNulls,s=void 0!==l&&l,u=function(e,t){if(L()(e))return e;var r="curve".concat(Ue()(e));return"curveMonotone"!==r&&"curveBump"!==r||!t?ea[r]||Be.curveLinear:ea["".concat(r).concat("vertical"===t?"Y":"X")]}(n,c),p=s?o.filter((function(e){return ta(e)})):o;if(Array.isArray(a)){var f=s?a.filter((function(e){return ta(e)})):a,d=p.map((function(e,t){return Jo(Jo({},e),{},{base:f[t]})}));return(t="vertical"===c?(0,Be.area)().y(na).x1(ra).x0((function(e){return e.base.x})):(0,Be.area)().x(ra).y1(na).y0((function(e){return e.base.y}))).defined(ta).curve(u),t(d)}return(t="vertical"===c&&ve(a)?(0,Be.area)().y(na).x1(ra).x0(a):ve(a)?(0,Be.area)().x(ra).y1(na).y0(a):(0,Be.line)().x(ra).y(na)).defined(ta).curve(u),t(p)}(e):n;return d().createElement("path",Zo({},bt(e),nt(e),{className:Z()("recharts-curve",t),d:o,ref:i}))};function oa(e){return oa="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},oa(e)}var aa=["x","y","top","left","width","height","className"];function ca(){return ca=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},ca.apply(this,arguments)}function la(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}var sa=function(e,t,r,n,i,o){return"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r)},ua=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.top,a=void 0===o?0:o,c=e.left,l=void 0===c?0:c,s=e.width,u=void 0===s?0:s,p=e.height,f=void 0===p?0:p,h=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?la(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==oa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==oa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===oa(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):la(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({x:r,y:i,top:a,left:l,width:u,height:f},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,aa));return ve(r)&&ve(i)&&ve(u)&&ve(f)&&ve(a)&&ve(l)?d().createElement("path",ca({},bt(m,!0),{className:Z()("recharts-cross",h),d:sa(r,i,u,f,a,l)})):null};function pa(){return pa=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},pa.apply(this,arguments)}var fa=function(e){var t=e.cx,r=e.cy,n=e.r,i=e.className,o=Z()("recharts-dot",i);return t===+t&&r===+r&&n===+n?d().createElement("circle",pa({},bt(e),nt(e),{className:o,cx:t,cy:r,r:n})):null},da=["viewBox"],ha=["viewBox"],ma=["ticks"];function ya(e){return ya="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},ya(e)}function va(){return va=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},va.apply(this,arguments)}function ga(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 ba(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ga(Object(r),!0).forEach((function(t){Sa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ga(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function xa(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wa(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,ja(n.key),n)}}function Oa(e,t){return Oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oa(e,t)}function ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ka(e)}function Sa(e,t,r){return(t=ja(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ja(e){var t=function(e,t){if("object"!==ya(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ya(t)?t:String(t)}var Aa=function(e){!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&&Oa(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=ka(i);if(o){var r=ka(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ya(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)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e)).state={fontSize:"",letterSpacing:""},t}return t=c,n=[{key:"renderTickItem",value:function(e,t,r){return d().isValidElement(e)?d().cloneElement(e,t):L()(e)?e(t):d().createElement(On,va({},t,{className:"recharts-cartesian-axis-tick-value"}),r)}}],(r=[{key:"shouldComponentUpdate",value:function(e,t){var r=e.viewBox,n=xa(e,da),i=this.props,o=i.viewBox,a=xa(i,ha);return!Ze(r,o)||!Ze(n,a)||!Ze(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,r,n,i,o,a,c=this.props,l=c.x,s=c.y,u=c.width,p=c.height,f=c.orientation,d=c.tickSize,h=c.mirror,m=c.tickMargin,y=h?-1:1,v=e.tickSize||d,g=ve(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=r=e.coordinate,a=(n=(i=s+ +!h*p)-y*v)-y*m,o=g;break;case"left":n=i=e.coordinate,o=(t=(r=l+ +!h*u)-y*v)-y*m,a=g;break;case"right":n=i=e.coordinate,o=(t=(r=l+ +h*u)+y*v)+y*m,a=g;break;default:t=r=e.coordinate,a=(n=(i=s+ +h*p)+y*v)+y*m,o=g}return{line:{x1:t,y1:n,x2:r,y2:i},tick:{x:o,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,r=t.orientation,n=t.mirror;switch(r){case"left":e=n?"start":"end";break;case"right":e=n?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,r=e.mirror,n="end";switch(t){case"left":case"right":n="middle";break;case"top":n=r?"start":"end";break;default:n=r?"end":"start"}return n}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.orientation,a=e.mirror,c=e.axisLine,l=ba(ba(ba({},bt(this.props)),bt(c)),{},{fill:"none"});if("top"===o||"bottom"===o){var s=+("top"===o&&!a||"bottom"===o&&a);l=ba(ba({},l),{},{x1:t,y1:r+s*i,x2:t+n,y2:r+s*i})}else{var u=+("left"===o&&!a||"right"===o&&a);l=ba(ba({},l),{},{x1:t+u*n,y1:r,x2:t+u*n,y2:r+i})}return d().createElement("line",va({},l,{className:Z()("recharts-cartesian-axis-line",F()(c,"className"))}))}},{key:"renderTicks",value:function(e,t,r){var n=this,i=this.props,o=i.tickLine,a=i.stroke,l=i.tick,s=i.tickFormatter,u=i.unit,p=vo(ba(ba({},this.props),{},{ticks:e}),t,r),f=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=bt(this.props),y=bt(l),v=ba(ba({},m),{},{fill:"none"},bt(o)),g=p.map((function(e,t){var r=n.getTickLineCoord(e),i=r.line,g=r.tick,b=ba(ba(ba(ba({textAnchor:f,verticalAnchor:h},m),{},{stroke:"none",fill:a},y),g),{},{index:t,payload:e,visibleTicksCount:p.length,tickFormatter:s});return d().createElement(jt,va({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},it(n.props,e,t)),o&&d().createElement("line",va({},v,i,{className:Z()("recharts-cartesian-axis-tick-line",F()(o,"className"))})),l&&c.renderTickItem(l,b,"".concat(L()(s)?s(e.value,t):e.value).concat(u||"")))}));return d().createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var e=this,t=this.props,r=t.axisLine,n=t.width,i=t.height,o=t.ticksGenerator,a=t.className;if(t.hide)return null;var c=this.props,l=c.ticks,s=xa(c,ma),u=l;return L()(o)&&(u=l&&l.length>0?o(this.props):o(s)),n<=0||i<=0||!u||!u.length?null:d().createElement(jt,{className:Z()("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},r&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),Nn.renderCallByParent(this.props))}}])&&wa(t.prototype,r),n&&wa(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.Component);function Ea(e){return Ea="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},Ea(e)}function Pa(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 Ta(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pa(Object(r),!0).forEach((function(t){Ca(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ca(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Ea(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ea(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ea(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Sa(Aa,"displayName","CartesianAxis"),Sa(Aa,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Ia=["Webkit","Moz","O","ms"];function Da(e){return Da="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},Da(e)}function Ma(){return Ma=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},Ma.apply(this,arguments)}function Na(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 Ra(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Na(Object(r),!0).forEach((function(t){$a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Na(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ba(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,Fa(n.key),n)}}function La(e,t){return La=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},La(e,t)}function _a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function za(e){return za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},za(e)}function $a(e,t,r){return(t=Fa(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fa(e){var t=function(e,t){if("object"!==Da(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Da(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Da(t)?t:String(t)}var qa=function(e){return e.changedTouches&&!!e.changedTouches.length},Wa=function(e){!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&&La(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=za(i);if(o){var r=za(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Da(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _a(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),$a(_a(t=a.call(this,e)),"handleDrag",(function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)})),$a(_a(t),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])})),$a(_a(t),"handleDragEnd",(function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},(function(){var e=t.props,r=e.endIndex,n=e.onDragEnd,i=e.startIndex;null==n||n({endIndex:r,startIndex:i})})),t.detachDragEndListener()})),$a(_a(t),"handleLeaveWrapper",(function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))})),$a(_a(t),"handleEnterSlideOrTraveller",(function(){t.setState({isTextActive:!0})})),$a(_a(t),"handleLeaveSlideOrTraveller",(function(){t.setState({isTextActive:!1})})),$a(_a(t),"handleSlideDragStart",(function(e){var r=qa(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:r.pageX}),t.attachDragEndListener()})),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(_a(t),"startX"),endX:t.handleTravellerDragStart.bind(_a(t),"endX")},t.state={},t}return t=c,n=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=e.stroke,a=Math.floor(r+i/2)-1;return d().createElement(d().Fragment,null,d().createElement("rect",{x:t,y:r,width:n,height:i,fill:o,stroke:"none"}),d().createElement("line",{x1:t+1,y1:a,x2:t+n-1,y2:a,fill:"none",stroke:"#fff"}),d().createElement("line",{x1:t+1,y1:a+2,x2:t+n-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):L()(e)?e(t):c.renderDefaultTraveller(t)}},{key:"getDerivedStateFromProps",value:function(e,t){var r=e.data,n=e.width,i=e.x,o=e.travellerWidth,a=e.updateId,c=e.startIndex,l=e.endIndex;if(r!==t.prevData||a!==t.prevUpdateId)return Ra({prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n},r&&r.length?function(e){var t=e.data,r=e.startIndex,n=e.endIndex,i=e.x,o=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var c=t.length,l=(0,Re.scalePoint)().domain(z()(0,c)).range([i,i+o-a]),s=l.domain().map((function(e){return l(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(r),endX:l(n),scale:l,scaleValues:s}}({data:r,width:n,x:i,travellerWidth:o,startIndex:c,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(n!==t.prevWidth||i!==t.prevX||o!==t.prevTravellerWidth)){t.scale.range([i,i+n-o]);var s=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:s}}return null}},{key:"getIndexInRange",value:function(e,t){for(var r=0,n=e.length-1;n-r>1;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i}return t>=e[n]?n:r}}],(r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,r=e.endX,n=this.state.scaleValues,i=this.props,o=i.gap,a=i.data.length-1,l=Math.min(t,r),s=Math.max(t,r),u=c.getIndexInRange(n,l),p=c.getIndexInRange(n,s);return{startIndex:u-u%o,endIndex:p===a?a:p-p%o}}},{key:"getTextOfTick",value:function(e){var t=this.props,r=t.data,n=t.tickFormatter,i=t.dataKey,o=kr(r[e],i,e);return L()(n)?n(o,e):o}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,r=t.slideMoveStartX,n=t.startX,i=t.endX,o=this.props,a=o.x,c=o.width,l=o.travellerWidth,s=o.startIndex,u=o.endIndex,p=o.onChange,f=e.pageX-r;f>0?f=Math.min(f,a+c-l-i,a+c-l-n):f<0&&(f=Math.max(f,a-n,a-i));var d=this.getIndex({startX:n+f,endX:i+f});d.startIndex===s&&d.endIndex===u||!p||p(d),this.setState({startX:n+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var r=qa(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:r.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,r=this.state,n=r.brushMoveStartX,i=r.movingTravellerId,o=r.endX,a=r.startX,c=this.state[i],l=this.props,s=l.x,u=l.width,p=l.travellerWidth,f=l.onChange,d=l.gap,h=l.data,m={startX:this.state.startX,endX:this.state.endX},y=e.pageX-n;y>0?y=Math.min(y,s+u-p-c):y<0&&(y=Math.max(y,s-c)),m[i]=c+y;var v=this.getIndex(m),g=v.startIndex,b=v.endIndex;this.setState(($a(t={},i,c+y),$a(t,"brushMoveStartX",e.pageX),t),(function(){var e;f&&(e=h.length-1,("startX"===i&&(o>a?g%d==0:b%d==0)||o<a&&b===e||"endX"===i&&(o>a?b%d==0:g%d==0)||o>a&&b===e)&&f(v))}))}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var r=this,n=this.state,i=n.scaleValues,o=n.startX,a=n.endX,c=this.state[t],l=i.indexOf(c);if(-1!==l){var s=l+e;if(!(-1===s||s>=i.length)){var u=i[s];"startX"===t&&u>=a||"endX"===t&&u<=o||this.setState($a({},t,u),(function(){r.props.onChange(r.getIndex({startX:r.state.startX,endX:r.state.endX}))}))}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.fill,a=e.stroke;return d().createElement("rect",{stroke:a,fill:o,x:t,y:r,width:n,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.data,a=e.children,c=e.padding,l=f.Children.only(a);return l?d().cloneElement(l,{x:t,y:r,width:n,height:i,margin:c,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,t){var r=this,n=this.props,i=n.y,o=n.travellerWidth,a=n.height,l=n.traveller,s=n.ariaLabel,u=n.data,p=n.startIndex,f=n.endIndex,h=Math.max(e,this.props.x),m=Ra(Ra({},bt(this.props)),{},{x:h,y:i,width:o,height:a}),y=s||"Min value: ".concat(u[p].name,", Max value: ").concat(u[f].name);return d().createElement(jt,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,t))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},c.renderTraveller(l,m))}},{key:"renderSlide",value:function(e,t){var r=this.props,n=r.y,i=r.height,o=r.stroke,a=r.travellerWidth,c=Math.min(e,t)+a,l=Math.max(Math.abs(t-e)-a,0);return d().createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:o,fillOpacity:.2,x:c,y:n,width:l,height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,r=e.endIndex,n=e.y,i=e.height,o=e.travellerWidth,a=e.stroke,c=this.state,l=c.startX,s=c.endX,u={pointerEvents:"none",fill:a};return d().createElement(jt,{className:"recharts-brush-texts"},d().createElement(On,Ma({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,s)-5,y:n+i/2},u),this.getTextOfTick(t)),d().createElement(On,Ma({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,s)+o+5,y:n+i/2},u),this.getTextOfTick(r)))}},{key:"render",value:function(){var e=this.props,t=e.data,r=e.className,n=e.children,i=e.x,o=e.y,a=e.width,c=e.height,l=e.alwaysShowText,s=this.state,u=s.startX,p=s.endX,f=s.isTextActive,h=s.isSlideMoving,m=s.isTravellerMoving,y=s.isTravellerFocused;if(!t||!t.length||!ve(i)||!ve(o)||!ve(a)||!ve(c)||a<=0||c<=0)return null;var v,g,b,x,w=Z()("recharts-brush",r),O=1===d().Children.count(n),k=(g="none",b=(v="userSelect").replace(/(\w)/,(function(e){return e.toUpperCase()})),(x=Ia.reduce((function(e,t){return Ta(Ta({},e),{},Ca({},t+b,g))}),{}))[v]=g,x);return d().createElement(jt,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(u,p),this.renderTravellerLayer(u,"startX"),this.renderTravellerLayer(p,"endX"),(f||h||m||y||l)&&this.renderText())}}])&&Ba(t.prototype,r),n&&Ba(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);$a(Wa,"displayName","Brush"),$a(Wa,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Ua=function(e,t){var r=e.alwaysShow,n=e.ifOverflow;return r&&(n="extendDomain"),n===t};function Ga(e){return Ga="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},Ga(e)}function Ha(){return Ha=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},Ha.apply(this,arguments)}function Xa(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 Va(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xa(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ga(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ga(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ka(e){var t=e.x,r=e.y,n=e.r,i=e.alwaysShow,o=e.clipPathId,a=ge(t),c=ge(r);if(Ct(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!a||!c)return null;var l=function(e){var t=e.x,r=e.y,n=e.xAxis,i=e.yAxis,o=uo({x:n.scale,y:i.scale}),a=o.apply({x:t,y:r},{bandAware:!0});return Ua(e,"discard")&&!o.isInRange(a)?null:a}(e);if(!l)return null;var s=l.x,u=l.y,p=e.shape,f=e.className,h=Va(Va({clipPath:Ua(e,"hidden")?"url(#".concat(o,")"):void 0},bt(e,!0)),{},{cx:s,cy:u});return d().createElement(jt,{className:Z()("recharts-reference-dot",f)},Ka.renderDot(p,h),Nn.renderCallByParent(e,{x:s-n,y:u-n,width:2*n,height:2*n}))}Ka.displayName="ReferenceDot",Ka.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},Ka.renderDot=function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):L()(e)?e(t):d().createElement(fa,Ha({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))};const Ya=require("lodash/some");var Za=r.n(Ya);function Qa(e){return Qa="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},Qa(e)}function Ja(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 ec(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ja(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Qa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Qa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Qa(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ja(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rc(){return rc=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},rc.apply(this,arguments)}var nc=function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):L()(e)?e(t):d().createElement("line",rc({},t,{className:"recharts-reference-line-line"}))},ic=function(e,t,r,n,i){var o=i.viewBox,a=o.x,c=o.y,l=o.width,s=o.height,u=i.position;if(r){var p=i.y,f=i.yAxis.orientation,d=e.y.apply(p,{position:u});if(Ua(i,"discard")&&!e.y.isInRange(d))return null;var h=[{x:a+l,y:d},{x:a,y:d}];return"left"===f?h.reverse():h}if(t){var m=i.x,y=i.xAxis.orientation,v=e.x.apply(m,{position:u});if(Ua(i,"discard")&&!e.x.isInRange(v))return null;var g=[{x:v,y:c+s},{x:v,y:c}];return"top"===y?g.reverse():g}if(n){var b=i.segment.map((function(t){return e.apply(t,{position:u})}));return Ua(i,"discard")&&Za()(b,(function(t){return!e.isInRange(t)}))?null:b}return null};function oc(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxis,o=e.yAxis,a=e.shape,c=e.className,l=e.alwaysShow,s=e.clipPathId;Ct(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=uo({x:i.scale,y:o.scale}),p=ge(t),f=ge(r),h=n&&2===n.length,m=ic(u,p,f,h,e);if(!m)return null;var y,v,g=(v=2,function(e){if(Array.isArray(e))return e}(y=m)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(y,v)||function(e,t){if(e){if("string"==typeof e)return tc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tc(e,t):void 0}}(y,v)||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.")}()),b=g[0],x=b.x,w=b.y,O=g[1],k=O.x,S=O.y,j=ec(ec({clipPath:Ua(e,"hidden")?"url(#".concat(s,")"):void 0},bt(e,!0)),{},{x1:x,y1:w,x2:k,y2:S});return d().createElement(jt,{className:Z()("recharts-reference-line",c)},nc(a,j),Nn.renderCallByParent(e,lo({x1:x,y1:w,x2:k,y2:S})))}function ac(e){return ac="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},ac(e)}function cc(){return cc=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},cc.apply(this,arguments)}function lc(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 sc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lc(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ac(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ac(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ac(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function uc(e){var t=e.x1,r=e.x2,n=e.y1,i=e.y2,o=e.className,a=e.alwaysShow,c=e.clipPathId;Ct(void 0===a,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=ge(t),s=ge(r),u=ge(n),p=ge(i),f=e.shape;if(!(l||s||u||p||f))return null;var h=function(e,t,r,n,i){var o=i.x1,a=i.x2,c=i.y1,l=i.y2,s=i.xAxis,u=i.yAxis;if(!s||!u)return null;var p=uo({x:s.scale,y:u.scale}),f={x:e?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(c,{position:"start"}):p.y.rangeMin},d={x:t?p.x.apply(a,{position:"end"}):p.x.rangeMax,y:n?p.y.apply(l,{position:"end"}):p.y.rangeMax};return!Ua(i,"discard")||p.isInRange(f)&&p.isInRange(d)?co(f,d):null}(l,s,u,p,e);if(!h&&!f)return null;var m=Ua(e,"hidden")?"url(#".concat(c,")"):void 0;return d().createElement(jt,{className:Z()("recharts-reference-area",o)},uc.renderRect(f,sc(sc({clipPath:m},bt(e,!0)),h)),Nn.renderCallByParent(e,h))}function pc(e){return function(e){if(Array.isArray(e))return fc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return fc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}oc.displayName="ReferenceLine",oc.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"},uc.displayName="ReferenceArea",uc.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},uc.renderRect=function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):L()(e)?e(t):d().createElement(ii,cc({},t,{className:"recharts-reference-area-rect"}))};var dc=function(e,t,r,n,i){var o=ht(e,oc),a=ht(e,Ka),c=[].concat(pc(o),pc(a)),l=ht(e,uc),s="".concat(n,"Id"),u=n[0],p=t;if(c.length&&(p=c.reduce((function(e,t){if(t.props[s]===r&&Ua(t.props,"extendDomain")&&ve(t.props[u])){var n=t.props[u];return[Math.min(e[0],n),Math.max(e[1],n)]}return e}),p)),l.length){var f="".concat(u,"1"),d="".concat(u,"2");p=l.reduce((function(e,t){if(t.props[s]===r&&Ua(t.props,"extendDomain")&&ve(t.props[f])&&ve(t.props[d])){var n=t.props[f],i=t.props[d];return[Math.min(e[0],n,i),Math.max(e[1],n,i)]}return e}),p)}return i&&i.length&&(p=i.reduce((function(e,t){return ve(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),p)),p};const hc=require("eventemitter3");var mc=new(r.n(hc)()),yc="recharts.syncMouseEvents";function vc(e){return vc="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},vc(e)}function gc(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,xc(n.key),n)}}function bc(e,t,r){return(t=xc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xc(e){var t=function(e,t){if("object"!==vc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===vc(t)?t:String(t)}var wc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),bc(this,"activeIndex",0),bc(this,"coordinateList",[]),bc(this,"layout","horizontal")}var t,r;return t=e,(r=[{key:"setDetails",value:function(e){var t=e.coordinateList,r=void 0===t?[]:t,n=e.container,i=void 0===n?null:n,o=e.layout,a=void 0===o?null:o,c=e.offset,l=void 0===c?null:c,s=e.mouseHandlerCallback,u=void 0===s?null:s;this.coordinateList=null!=r?r:this.coordinateList,this.container=null!=i?i:this.container,this.layout=null!=a?a:this.layout,this.offset=null!=l?l:this.offset,this.mouseHandlerCallback=null!=u?u:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var r=this.container.getBoundingClientRect(),n=r.x,i=r.y,o=r.height,a=this.coordinateList[this.activeIndex].coordinate,c=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,s=n+a+c,u=i+this.offset.top+o/2+l;this.mouseHandlerCallback({pageX:s,pageY:u})}}}])&&gc(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Oc(e,t,r){var n,i,o,a;if("horizontal"===e)o=n=t.x,i=r.top,a=r.top+r.height;else if("vertical"===e)a=i=t.y,n=r.left,o=r.left+r.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return le(t);var c=t.cx,l=t.cy,s=t.innerRadius,u=t.outerRadius,p=t.angle,f=oe(c,l,s,p),d=oe(c,l,u,p);n=f.x,i=f.y,o=d.x,a=d.y}return[{x:n,y:i},{x:o,y:a}]}var kc=["item"],Sc=["children","className","width","height","style","compact","title","desc"];function jc(e){return jc="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},jc(e)}function Ac(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||Nc(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.")}()}function Ec(){return Ec=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},Ec.apply(this,arguments)}function Pc(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Tc(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,zc(n.key),n)}}function Cc(e,t){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cc(e,t)}function Ic(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dc(e){return Dc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Dc(e)}function Mc(e){return function(e){if(Array.isArray(e))return Rc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Nc(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nc(e,t){if(e){if("string"==typeof e)return Rc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rc(e,t):void 0}}function Rc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bc(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 Lc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bc(Object(r),!0).forEach((function(t){_c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _c(e,t,r){return(t=zc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zc(e){var t=function(e,t){if("object"!==jc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==jc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===jc(t)?t:String(t)}var $c={xAxis:["bottom","top"],yAxis:["left","right"]},Fc={width:"100%",height:"100%"},qc={x:0,y:0},Wc=function(e,t){var r=t.graphicalItems,n=t.dataStartIndex,i=t.dataEndIndex,o=(null!=r?r:[]).reduce((function(e,t){var r=t.props.data;return r&&r.length?[].concat(Mc(e),Mc(r)):e}),[]);return o.length>0?o:e&&e.length&&ve(n)&&ve(i)?e.slice(n,i+1):[]};function Uc(e){return"number"===e?[0,"auto"]:void 0}var Gc=function(e,t,r,n){var i=e.graphicalItems,o=e.tooltipAxis,a=Wc(t,e);return r<0||!i||!i.length||r>=a.length?null:i.reduce((function(i,c){var l;if(c.props.hide)return i;var s,u=null!==(l=c.props.data)&&void 0!==l?l:t;return u&&e.dataStartIndex+e.dataEndIndex!==0&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),(s=o.dataKey&&!o.allowDuplicatedCategory?Se(void 0===u?a:u,o.dataKey,n):u&&u[r]||a[r])?[].concat(Mc(i),[Ur(c,s)]):i}),[])},Hc=function(e,t,r,n){var i=n||{x:e.chartX,y:e.chartY},o=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(i,r),a=e.orderedTooltipTicks,c=e.tooltipAxis,l=e.tooltipTicks,s=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,a=null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0;if(a<=1)return 0;if(i&&"angleAxis"===i.axisType&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,l=0;l<a;l++){var s=l>0?n[l-1].coordinate:n[a-1].coordinate,u=n[l].coordinate,p=l>=a-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(me(u-s)!==me(p-u)){var d=[];if(me(p-u)===me(c[1]-c[0])){f=p;var h=u+c[1]-c[0];d[0]=Math.min(h,(h+s)/2),d[1]=Math.max(h,(h+s)/2)}else{f=s;var m=p+c[1]-c[0];d[0]=Math.min(u,(m+u)/2),d[1]=Math.max(u,(m+u)/2)}var y=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>y[0]&&e<=y[1]||e>=d[0]&&e<=d[1]){o=n[l].index;break}}else{var v=Math.min(s,p),g=Math.max(s,p);if(e>(v+u)/2&&e<=(g+u)/2){o=n[l].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b>0&&b<a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b===a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2){o=r[b].index;break}return o}(o,a,l,c);if(s>=0&&l){var u=l[s]&&l[s].value,p=Gc(e,t,s,u),f=function(e,t,r,n){var i=t.find((function(e){return e&&e.index===r}));if(i){if("horizontal"===e)return{x:i.coordinate,y:n.y};if("vertical"===e)return{x:n.x,y:i.coordinate};if("centric"===e){var o=i.coordinate,a=n.radius;return Lc(Lc(Lc({},n),oe(n.cx,n.cy,a,o)),{},{angle:o,radius:a})}var c=i.coordinate,l=n.angle;return Lc(Lc(Lc({},n),oe(n.cx,n.cy,c,l)),{},{angle:l,radius:c})}return qc}(r,a,s,i);return{activeTooltipIndex:s,activeLabel:u,activePayload:p,activeCoordinate:f}}return null},Xc=function(e,t){var r=t.axisType,n=void 0===r?"xAxis":r,i=t.AxisComp,o=t.graphicalItems,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.children,u="".concat(n,"Id"),p=ht(s,i),f={};return p&&p.length?f=function(e,t){var r=t.axes,n=t.graphicalItems,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,u=e.children,p=e.stackOffset,f=Pr(s,i);return r.reduce((function(t,r){var d,h=r.props,m=h.type,y=h.dataKey,v=h.allowDataOverflow,g=h.allowDuplicatedCategory,b=h.scale,x=h.ticks,w=h.includeHidden,O=r.props[o];if(t[O])return t;var k,S,j,A=Wc(e.data,{graphicalItems:n.filter((function(e){return e.props[o]===O})),dataStartIndex:c,dataEndIndex:l}),E=A.length;(function(e,t,r){if("number"===r&&!0===t&&Array.isArray(e)){var n=null==e?void 0:e[0],i=null==e?void 0:e[1];if(n&&i&&ve(n)&&ve(i))return!0}return!1})(r.props.domain,v,m)&&(k=Fr(r.props.domain,null,v),!f||"number"!==m&&"auto"===b||(j=Sr(A,y,"category")));var P=Uc(m);if(!k||0===k.length){var T,C=null!==(T=r.props.domain)&&void 0!==T?T:P;if(y){if(k=Sr(A,y,m),"category"===m&&f){var I=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++){if(r[e[n]])return!0;r[e[n]]=!0}return!1}(k);g&&I?(S=k,k=z()(0,E)):g||(k=Wr(C,k,r).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(Mc(e),[t])}),[]))}else if("category"===m)k=g?k.filter((function(e){return""!==e&&!R()(e)})):Wr(C,k,r).reduce((function(e,t){return e.indexOf(t)>=0||""===t||R()(t)?e:[].concat(Mc(e),[t])}),[]);else if("number"===m){var D=function(e,t,r,n,i){var o=t.map((function(t){return Ar(e,t,r,i,n)})).filter((function(e){return!R()(e)}));return o&&o.length?o.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(A,n.filter((function(e){return e.props[o]===O&&(w||!e.props.hide)})),y,i,s);D&&(k=D)}!f||"number"!==m&&"auto"===b||(j=Sr(A,y,"category"))}else k=f?z()(0,E):a&&a[O]&&a[O].hasStack&&"number"===m?"expand"===p?[0,1]:_r(a[O].stackGroups,c,l):Er(A,n.filter((function(e){return e.props[o]===O&&(w||!e.props.hide)})),m,s,!0);if("number"===m)k=dc(u,k,O,i,x),C&&(k=Fr(C,k,v));else if("category"===m&&C){var M=C;k.every((function(e){return M.indexOf(e)>=0}))&&(k=M)}}return Lc(Lc({},t),{},_c({},O,Lc(Lc({},r.props),{},{axisType:i,domain:k,categoricalDomain:j,duplicateDomain:S,originalDomain:null!==(d=r.props.domain)&&void 0!==d?d:P,isCategorical:f,layout:s})))}),{})}(e,{axes:p,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:l}):o&&o.length&&(f=function(e,t){var r=t.graphicalItems,n=t.Axis,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,u=e.children,p=Wc(e.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:l}),f=p.length,d=Pr(s,i),h=-1;return r.reduce((function(e,t){var m,y=t.props[o],v=Uc("number");return e[y]?e:(h++,d?m=z()(0,f):a&&a[y]&&a[y].hasStack?(m=_r(a[y].stackGroups,c,l),m=dc(u,m,y,i)):(m=Fr(v,Er(p,r.filter((function(e){return e.props[o]===y&&!e.props.hide})),"number",s),n.defaultProps.allowDataOverflow),m=dc(u,m,y,i)),Lc(Lc({},e),{},_c({},y,Lc(Lc({axisType:i},n.defaultProps),{},{hide:!0,orientation:F()($c,"".concat(i,".").concat(h%2),null),domain:m,originalDomain:v,isCategorical:d,layout:s}))))}),{})}(e,{Axis:i,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:l})),f},Vc=function(e){var t=e.children,r=e.defaultShowTooltip,n=mt(t,Wa),i=0,o=0;return e.data&&0!==e.data.length&&(o=e.data.length-1),n&&n.props&&(n.props.startIndex>=0&&(i=n.props.startIndex),n.props.endIndex>=0&&(o=n.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:Boolean(r)}},Kc=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Yc=function(e){var t,r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,o=void 0===i?"axis":i,a=e.validateTooltipEventTypes,c=void 0===a?["axis"]:a,l=e.axisComponents,s=e.legendContent,u=e.formatAxisMap,p=e.defaultProps,h=function(e,t){var i=e.props,o=e.dataStartIndex,a=e.dataEndIndex,c=e.updateId;if(!yt({props:i}))return null;var s=i.children,p=i.layout,f=i.stackOffset,d=i.data,h=i.reverseStackOrder,m=Kc(p),y=m.numericAxisName,v=m.cateAxisName,g=ht(s,n),b=function(e,t,r,n,i,o){if(!e)return null;var a=(o?t.reverse():t).reduce((function(e,t){var i=t.props,o=i.stackId;if(i.hide)return e;var a=t.props[r],c=e[a]||{hasStack:!1,stackGroups:{}};if(ge(o)){var l=c.stackGroups[o]||{numericAxisId:r,cateAxisId:n,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[xe("_stackId_")]={numericAxisId:r,cateAxisId:n,items:[t]};return br(br({},e),{},xr({},a,c))}),{});return Object.keys(a).reduce((function(t,o){var c=a[o];return c.hasStack&&(c.stackGroups=Object.keys(c.stackGroups).reduce((function(t,o){var a=c.stackGroups[o];return br(br({},t),{},xr({},o,{numericAxisId:r,cateAxisId:n,items:a.items,stackedData:Rr(e,a.items,i)}))}),{})),br(br({},t),{},xr({},o,c))}),{})}(d,g,"".concat(y,"Id"),"".concat(v,"Id"),f,h),x=l.reduce((function(e,t){var r="".concat(t.axisType,"Map");return Lc(Lc({},e),{},_c({},r,Xc(i,Lc(Lc({},t),{},{graphicalItems:g,stackGroups:t.axisType===y&&b,dataStartIndex:o,dataEndIndex:a}))))}),{}),w=function(e,t){var r=e.props,n=(e.graphicalItems,e.xAxisMap),i=void 0===n?{}:n,o=e.yAxisMap,a=void 0===o?{}:o,c=r.width,l=r.height,s=r.children,u=r.margin||{},p=mt(s,Wa),f=mt(s,fr),d=Object.keys(a).reduce((function(e,t){var r=a[t],n=r.orientation;return r.mirror||r.hide?e:Lc(Lc({},e),{},_c({},n,e[n]+r.width))}),{left:u.left||0,right:u.right||0}),h=Object.keys(i).reduce((function(e,t){var r=i[t],n=r.orientation;return r.mirror||r.hide?e:Lc(Lc({},e),{},_c({},n,F()(e,"".concat(n))+r.height))}),{top:u.top||0,bottom:u.bottom||0}),m=Lc(Lc({},h),d),y=m.bottom;p&&(m.bottom+=p.props.height||Wa.defaultProps.height),f&&t&&(m=function(e,t,r,n){var i=r.children,o=r.width,a=r.margin,c=o-(a.left||0)-(a.right||0),l=yr({children:i,legendWidth:c});if(l){var s=n||{},u=s.width,p=s.height,f=l.align,d=l.verticalAlign,h=l.layout;if(("vertical"===h||"horizontal"===h&&"middle"===d)&&"center"!==f&&ve(e[f]))return br(br({},e),{},xr({},f,e[f]+(u||0)));if(("horizontal"===h||"vertical"===h&&"center"===f)&&"middle"!==d&&ve(e[d]))return br(br({},e),{},xr({},d,e[d]+(p||0)))}return e}(m,0,r,t));var v=c-m.left-m.right,g=l-m.top-m.bottom;return Lc(Lc({brushBottom:y},m),{},{width:Math.max(v,0),height:Math.max(g,0)})}(Lc(Lc({},x),{},{props:i,graphicalItems:g}),null==t?void 0:t.legendBBox);Object.keys(x).forEach((function(e){x[e]=u(i,x[e],w,e.replace("Map",""),r)}));var O,k,S=x["".concat(v,"Map")],j=(O=Oe(S),{tooltipTicks:k=Cr(O,!1,!0),orderedTooltipTicks:W()(k,(function(e){return e.coordinate})),tooltipAxis:O,tooltipAxisBandSize:qr(O,k)}),A=function(e,t){var r=t.graphicalItems,n=t.stackGroups,i=t.offset,o=t.updateId,a=t.dataStartIndex,c=t.dataEndIndex,s=e.barSize,u=e.layout,p=e.barGap,f=e.barCategoryGap,d=e.maxBarSize,h=Kc(u),m=h.numericAxisName,y=h.cateAxisName,v=function(e){return!(!e||!e.length)&&e.some((function(e){var t=ut(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(r),g=v&&function(e){var t=e.barSize,r=e.stackGroups,n=void 0===r?{}:r;if(!n)return{};for(var i={},o=Object.keys(n),a=0,c=o.length;a<c;a++)for(var l=n[o[a]].stackGroups,s=Object.keys(l),u=0,p=s.length;u<p;u++){var f=l[s[u]],d=f.items,h=f.cateAxisId,m=d.filter((function(e){return ut(e.type).indexOf("Bar")>=0}));if(m&&m.length){var y=m[0].props.barSize,v=m[0].props[h];i[v]||(i[v]=[]),i[v].push({item:m[0],stackList:m.slice(1),barSize:R()(y)?t:y})}}return i}({barSize:s,stackGroups:n}),b=[];return r.forEach((function(r,s){var h=Wc(e.data,{graphicalItems:[r],dataStartIndex:a,dataEndIndex:c}),v=r.props,x=v.dataKey,w=v.maxBarSize,O=r.props["".concat(m,"Id")],k=r.props["".concat(y,"Id")],S=l.reduce((function(e,n){var i,o=t["".concat(n.axisType,"Map")],a=r.props["".concat(n.axisType,"Id")];o&&o[a]||"zAxis"===n.axisType||J()(!1);var c=o[a];return Lc(Lc({},e),{},(_c(i={},n.axisType,c),_c(i,"".concat(n.axisType,"Ticks"),Cr(c)),i))}),{}),j=S[y],A=S["".concat(y,"Ticks")],E=n&&n[O]&&n[O].hasStack&&function(e,t){var r=e.props.stackId;if(ge(r)){var n=t[r];if(n){var i=n.items.indexOf(e);return i>=0?n.stackedData[i]:null}}return null}(r,n[O].stackGroups),P=ut(r.type).indexOf("Bar")>=0,T=qr(j,A),C=[];if(P){var I,D,M=R()(w)?d:w,N=null!==(I=null!==(D=qr(j,A,!0))&&void 0!==D?D:M)&&void 0!==I?I:0;C=function(e){var t=e.barGap,r=e.barCategoryGap,n=e.bandSize,i=e.sizeList,o=void 0===i?[]:i,a=e.maxBarSize,c=o.length;if(c<1)return null;var l,s=we(t,n,0,!0),u=[];if(o[0].barSize===+o[0].barSize){var p=!1,f=n/c,d=o.reduce((function(e,t){return e+t.barSize||0}),0);(d+=(c-1)*s)>=n&&(d-=(c-1)*s,s=0),d>=n&&f>0&&(p=!0,d=c*(f*=.9));var h={offset:((n-d)/2|0)-s,size:0};l=o.reduce((function(e,t){var r={item:t.item,position:{offset:h.offset+h.size+s,size:p?f:t.barSize}},n=[].concat(wr(e),[r]);return h=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:h})})),n}),u)}else{var m=we(r,n,0,!0);n-2*m-(c-1)*s<=0&&(s=0);var y=(n-2*m-(c-1)*s)/c;y>1&&(y>>=0);var v=a===+a?Math.min(y,a):y;l=o.reduce((function(e,t,r){var n=[].concat(wr(e),[{item:t.item,position:{offset:m+(y+s)*r+(y-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:n[n.length-1].position})})),n}),u)}return l}({barGap:p,barCategoryGap:f,bandSize:N!==T?N:T,sizeList:g[k],maxBarSize:M}),N!==T&&(C=C.map((function(e){return Lc(Lc({},e),{},{position:Lc(Lc({},e.position),{},{offset:e.position.offset-N/2})})})))}var B,L,_,z=r&&r.type&&r.type.getComposedData;z&&b.push({props:Lc(Lc({},z(Lc(Lc({},S),{},{displayedData:h,props:e,dataKey:x,item:r,bandSize:T,barPosition:C,offset:i,stackedData:E,layout:u,dataStartIndex:a,dataEndIndex:c}))),{},(B={key:r.key||"item-".concat(s)},_c(B,m,S[m]),_c(B,y,S[y]),_c(B,"animationId",o),B)),childIndex:(L=r,_=e.children,dt(_).indexOf(L)),item:r})})),b}(i,Lc(Lc({},x),{},{dataStartIndex:o,dataEndIndex:a,updateId:c,graphicalItems:g,stackGroups:b,offset:w}));return Lc(Lc({formattedGraphicalItems:A,graphicalItems:g,offset:w,stackGroups:b},j),x)};return t=function(e){!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&&Cc(e,t)}(u,e);var t,n,i,a,l=(i=u,a=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}}(),function(){var e,t=Dc(i);if(a){var r=Dc(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===jc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ic(e)}(this,e)});function u(e){var t,n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),_c(Ic(i=l.call(this,e)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_c(Ic(i),"accessibilityManager",new wc),_c(Ic(i),"handleLegendBBoxUpdate",(function(e){if(e){var t=i.state,r=t.dataStartIndex,n=t.dataEndIndex,o=t.updateId;i.setState(Lc({legendBBox:e},h({props:i.props,dataStartIndex:r,dataEndIndex:n,updateId:o},Lc(Lc({},i.state),{},{legendBBox:e}))))}})),_c(Ic(i),"handleReceiveSyncEvent",(function(e,t,r){if(i.props.syncId===e){if(r===i.eventEmitterSymbol&&"function"!=typeof i.props.syncMethod)return;i.applySyncEvent(t)}})),_c(Ic(i),"handleBrushChange",(function(e){var t=e.startIndex,r=e.endIndex;if(t!==i.state.dataStartIndex||r!==i.state.dataEndIndex){var n=i.state.updateId;i.setState((function(){return Lc({dataStartIndex:t,dataEndIndex:r},h({props:i.props,dataStartIndex:t,dataEndIndex:r,updateId:n},i.state))})),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:r})}})),_c(Ic(i),"handleMouseEnter",(function(e){var t=i.getMouseInfo(e);if(t){var r=Lc(Lc({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseEnter;L()(n)&&n(r,e)}})),_c(Ic(i),"triggeredAfterMouseMove",(function(e){var t=i.getMouseInfo(e),r=t?Lc(Lc({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseMove;L()(n)&&n(r,e)})),_c(Ic(i),"handleItemMouseEnter",(function(e){i.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))})),_c(Ic(i),"handleItemMouseLeave",(function(){i.setState((function(){return{isTooltipActive:!1}}))})),_c(Ic(i),"handleMouseMove",(function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)})),_c(Ic(i),"handleMouseLeave",(function(e){var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var r=i.props.onMouseLeave;L()(r)&&r(t,e)})),_c(Ic(i),"handleOuterEvent",(function(e){var t,r=function(e){var t=e&&e.type;return t&&st[t]?st[t]:null}(e),n=F()(i.props,"".concat(r));r&&L()(n)&&n(null!==(t=/.*touch.*/i.test(r)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)})),_c(Ic(i),"handleClick",(function(e){var t=i.getMouseInfo(e);if(t){var r=Lc(Lc({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onClick;L()(n)&&n(r,e)}})),_c(Ic(i),"handleMouseDown",(function(e){var t=i.props.onMouseDown;L()(t)&&t(i.getMouseInfo(e),e)})),_c(Ic(i),"handleMouseUp",(function(e){var t=i.props.onMouseUp;L()(t)&&t(i.getMouseInfo(e),e)})),_c(Ic(i),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])})),_c(Ic(i),"handleTouchStart",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])})),_c(Ic(i),"handleTouchEnd",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])})),_c(Ic(i),"triggerSyncEvent",(function(e){void 0!==i.props.syncId&&mc.emit(yc,i.props.syncId,e,i.eventEmitterSymbol)})),_c(Ic(i),"applySyncEvent",(function(e){var t=i.props,r=t.layout,n=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,c=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(Lc({dataStartIndex:a,dataEndIndex:c},h({props:i.props,dataStartIndex:a,dataEndIndex:c,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,s=e.chartY,u=e.activeTooltipIndex,p=i.state,f=p.offset,d=p.tooltipTicks;if(!f)return;if("function"==typeof n)u=n(d,e);else if("value"===n){u=-1;for(var m=0;m<d.length;m++)if(d[m].value===e.activeLabel){u=m;break}}var y=Lc(Lc({},f),{},{x:f.left,y:f.top}),v=Math.min(l,y.x+y.width),g=Math.min(s,y.y+y.height),b=d[u]&&d[u].value,x=Gc(i.state,i.props.data,u),w=d[u]?{x:"horizontal"===r?d[u].coordinate:v,y:"horizontal"===r?g:d[u].coordinate}:qc;i.setState(Lc(Lc({},e),{},{activeLabel:b,activeCoordinate:w,activePayload:x,activeTooltipIndex:u}))}else i.setState(e)})),_c(Ic(i),"verticalCoordinatesGenerator",(function(e,t){var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return Tr(vo(Lc(Lc(Lc({},Aa.defaultProps),r),{},{ticks:Cr(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)})),_c(Ic(i),"horizontalCoordinatesGenerator",(function(e,t){var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return Tr(vo(Lc(Lc(Lc({},Aa.defaultProps),r),{},{ticks:Cr(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)})),_c(Ic(i),"axesTicksGenerator",(function(e){return Cr(e,!0)})),_c(Ic(i),"renderCursor",(function(e){var t,n=i.state,o=n.isTooltipActive,a=n.activeCoordinate,c=n.activePayload,l=n.offset,s=n.activeTooltipIndex,u=n.tooltipAxisBandSize,p=i.getTooltipEventType(),d=null!==(t=e.props.active)&&void 0!==t?t:o;if(!e||!e.props.cursor||!d||!a||"ScatterChart"!==r&&"axis"!==p)return null;var h,m=i.props.layout,y=ia;if("ScatterChart"===r)h=a,y=ua;else if("BarChart"===r)h=function(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:t.y-i,width:"horizontal"===e?n:r.width-1,height:"horizontal"===e?r.height-1:n}}(m,a,l,u),y=ii;else if("radial"===m){var v=le(a),g=v.cx,b=v.cy,x=v.radius;h={cx:g,cy:b,startAngle:v.startAngle,endAngle:v.endAngle,innerRadius:x,outerRadius:x},y=xi}else h={points:Oc(m,a,l)},y=ia;var w=e.key||"_recharts-cursor",O=Lc(Lc(Lc(Lc({stroke:"#ccc",pointerEvents:"none"},l),h),bt(e.props.cursor)),{},{payload:c,payloadIndex:s,key:w,className:"recharts-tooltip-cursor"});return(0,f.isValidElement)(e.props.cursor)?(0,f.cloneElement)(e.props.cursor,O):(0,f.createElement)(y,O)})),_c(Ic(i),"renderPolarAxis",(function(e,t,r){var n=F()(e,"type.axisType"),o=F()(i.state,"".concat(n,"Map")),a=o&&o[e.props["".concat(n,"Id")]];return(0,f.cloneElement)(e,Lc(Lc({},a),{},{className:n,key:e.key||"".concat(t,"-").concat(r),ticks:Cr(a,!0)}))})),_c(Ic(i),"renderXAxis",(function(e,t,r){var n=i.state.xAxisMap[e.props.xAxisId];return i.renderAxis(n,e,t,r)})),_c(Ic(i),"renderYAxis",(function(e,t,r){var n=i.state.yAxisMap[e.props.yAxisId];return i.renderAxis(n,e,t,r)})),_c(Ic(i),"renderGrid",(function(e){var t=i.state,r=t.xAxisMap,n=t.yAxisMap,o=t.offset,a=i.props,c=a.width,l=a.height,s=Oe(r),u=X()(n,(function(e){return K()(e.domain,Number.isFinite)}))||Oe(n),p=e.props||{};return(0,f.cloneElement)(e,{key:e.key||"grid",x:ve(p.x)?p.x:o.left,y:ve(p.y)?p.y:o.top,width:ve(p.width)?p.width:o.width,height:ve(p.height)?p.height:o.height,xAxis:s,yAxis:u,offset:o,chartWidth:c,chartHeight:l,verticalCoordinatesGenerator:p.verticalCoordinatesGenerator||i.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:p.horizontalCoordinatesGenerator||i.horizontalCoordinatesGenerator})})),_c(Ic(i),"renderPolarGrid",(function(e){var t=e.props,r=t.radialLines,n=t.polarAngles,o=t.polarRadius,a=i.state,c=a.radiusAxisMap,l=a.angleAxisMap,s=Oe(c),u=Oe(l),p=u.cx,d=u.cy,h=u.innerRadius,m=u.outerRadius;return(0,f.cloneElement)(e,{polarAngles:Array.isArray(n)?n:Cr(u,!0).map((function(e){return e.coordinate})),polarRadius:Array.isArray(o)?o:Cr(s,!0).map((function(e){return e.coordinate})),cx:p,cy:d,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:r})})),_c(Ic(i),"renderLegend",(function(){var e=i.state.formattedGraphicalItems,t=i.props,r=t.children,n=t.width,o=t.height,a=i.props.margin||{},c=n-(a.left||0)-(a.right||0),l=yr({children:r,formattedGraphicalItems:e,legendWidth:c,legendContent:s});if(!l)return null;var u=l.item,p=Pc(l,kc);return(0,f.cloneElement)(u,Lc(Lc({},p),{},{chartWidth:n,chartHeight:o,margin:a,onBBoxUpdate:i.handleLegendBBoxUpdate}))})),_c(Ic(i),"renderTooltip",(function(){var e,t=mt(i.props.children,Ko);if(!t)return null;var r=i.state,n=r.isTooltipActive,o=r.activeCoordinate,a=r.activePayload,c=r.activeLabel,l=r.offset,s=null!==(e=t.props.active)&&void 0!==e?e:n;return(0,f.cloneElement)(t,{viewBox:Lc(Lc({},l),{},{x:l.left,y:l.top}),active:s,label:c,payload:s?a:[],coordinate:o})})),_c(Ic(i),"renderBrush",(function(e){var t=i.props,r=t.margin,n=t.data,o=i.state,a=o.offset,c=o.dataStartIndex,l=o.dataEndIndex,s=o.updateId;return(0,f.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:Dr(i.handleBrushChange,e.props.onChange),data:n,x:ve(e.props.x)?e.props.x:a.left,y:ve(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(r.bottom||0),width:ve(e.props.width)?e.props.width:a.width,startIndex:c,endIndex:l,updateId:"brush-".concat(s)})})),_c(Ic(i),"renderReferenceElement",(function(e,t,r){if(!e)return null;var n=Ic(i).clipPathId,o=i.state,a=o.xAxisMap,c=o.yAxisMap,l=o.offset,s=e.props,u=s.xAxisId,p=s.yAxisId;return(0,f.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(r),xAxis:a[u],yAxis:c[p],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:n})})),_c(Ic(i),"renderActivePoints",(function(e){var t=e.item,r=e.activePoint,n=e.basePoint,i=e.childIndex,o=e.isRange,a=[],c=t.props.key,l=t.item.props,s=l.activeDot,p=Lc(Lc({index:i,dataKey:l.dataKey,cx:r.x,cy:r.y,r:4,fill:jr(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value,key:"".concat(c,"-activePoint-").concat(i)},bt(s)),nt(s));return a.push(u.renderActiveDot(s,p)),n?a.push(u.renderActiveDot(s,Lc(Lc({},p),{},{cx:n.x,cy:n.y,key:"".concat(c,"-basePoint-").concat(i)}))):o&&a.push(null),a})),_c(Ic(i),"renderGraphicChild",(function(e,t,r){var n=i.filterFormatItem(e,t,r);if(!n)return null;var o=i.getTooltipEventType(),a=i.state,c=a.isTooltipActive,l=a.tooltipAxis,s=a.activeTooltipIndex,u=a.activeLabel,p=mt(i.props.children,Ko),d=n.props,h=d.points,m=d.isRange,y=d.baseLine,v=n.item.props,g=v.activeDot,b=v.hide,x=v.activeBar,w=v.activeShape,O=Boolean(!b&&c&&p&&(g||x||w)),k={};"axis"!==o&&p&&"click"===p.props.trigger?k={onClick:Dr(i.handleItemMouseEnter,e.props.onClick)}:"axis"!==o&&(k={onMouseLeave:Dr(i.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:Dr(i.handleItemMouseEnter,e.props.onMouseEnter)});var S=(0,f.cloneElement)(e,Lc(Lc({},n.props),k));if(O){if(!(s>=0)){var j,A=(null!==(j=i.getItemByXY(i.state.activeCoordinate))&&void 0!==j?j:{graphicalItem:S}).graphicalItem,E=A.item,P=void 0===E?e:E,T=A.childIndex,C=Lc(Lc(Lc({},n.props),k),{},{activeIndex:T});return[(0,f.cloneElement)(P,C),null,null]}var I,D;if(l.dataKey&&!l.allowDuplicatedCategory){var M="function"==typeof l.dataKey?function(e){return"function"==typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());I=Se(h,M,u),D=m&&y&&Se(y,M,u)}else I=null==h?void 0:h[s],D=m&&y&&y[s];if(w||x){var N=void 0!==e.props.activeIndex?e.props.activeIndex:s;return[(0,f.cloneElement)(e,Lc(Lc(Lc({},n.props),k),{},{activeIndex:N})),null,null]}if(!R()(I))return[S].concat(Mc(i.renderActivePoints({item:n,activePoint:I,basePoint:D,childIndex:s,isRange:m})))}return m?[S,null,null]:[S,null]})),_c(Ic(i),"renderCustomized",(function(e,t,r){return(0,f.cloneElement)(e,Lc(Lc({key:"recharts-customized-".concat(r)},i.props),i.state))})),_c(Ic(i),"renderMap",{CartesianGrid:{handler:i.renderGrid,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:i.renderReferenceElement},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:i.renderXAxis},YAxis:{handler:i.renderYAxis},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(t=e.id)&&void 0!==t?t:xe("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=G()(i.triggeredAfterMouseMove,null!==(n=e.throttleDelay)&&void 0!==n?n:1e3/60),i.state={},i}return t=u,n=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(r=this.props.margin.left)&&void 0!==r?r:0,top:null!==(n=this.props.margin.top)&&void 0!==n?n:0}}),null):null;var r,n}},{key:"componentDidUpdate",value:function(){}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=mt(this.props.children,Ko);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return c.indexOf(t)>=0?t:o}return o}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,r=this.container,n=r.getBoundingClientRect(),i=(t=n).top+window.scrollY-document.documentElement.clientTop,o=t.left+window.scrollX-document.documentElement.clientLeft,a={chartX:Math.round(e.pageX-o),chartY:Math.round(e.pageY-i)},c=n.width/r.offsetWidth||1,l=this.inRange(a.chartX,a.chartY,c);if(!l)return null;var s=this.state,u=s.xAxisMap,p=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&u&&p){var f=Oe(u).scale,d=Oe(p).scale,h=f&&f.invert?f.invert(a.chartX):null,m=d&&d.invert?d.invert(a.chartY):null;return Lc(Lc({},a),{},{xValue:h,yValue:m})}var y=Hc(this.state,this.props.data,this.props.layout,l);return y?Lc(Lc({},a),y):null}},{key:"inRange",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.props.layout,i=e/r,o=t/r;if("horizontal"===n||"vertical"===n){var a=this.state.offset;return i>=a.left&&i<=a.left+a.width&&o>=a.top&&o<=a.top+a.height?{x:i,y:o}:null}var c=this.state,l=c.angleAxisMap,s=c.radiusAxisMap;if(l&&s){var u=Oe(l);return ce({x:i,y:o},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),r=mt(e,Ko),n={};return r&&"axis"===t&&(n="click"===r.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),Lc(Lc({},nt(this.props,this.handleOuterEvent)),n)}},{key:"addListener",value:function(){mc.on(yc,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){mc.removeListener(yc,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,r){for(var n=this.state.formattedGraphicalItems,i=0,o=n.length;i<o;i++){var a=n[i];if(a.item===e||a.props.key===e.key||t===ut(a.item.type)&&r===a.childIndex)return a}return null}},{key:"renderAxis",value:function(e,t,r,n){var i=this.props,o=i.width,a=i.height;return d().createElement(Aa,Ec({},e,{className:Z()("recharts-".concat(e.axisType," ").concat(e.axisType),e.className),key:t.key||"".concat(r,"-").concat(n),viewBox:{x:0,y:0,width:o,height:a},ticksGenerator:this.axesTicksGenerator}))}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,r=t.left,n=t.top,i=t.height,o=t.width;return d().createElement("defs",null,d().createElement("clipPath",{id:e},d().createElement("rect",{x:r,y:n,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var r=Ac(t,2),n=r[0],i=r[1];return Lc(Lc({},e),{},_c({},n,i.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var r=Ac(t,2),n=r[0],i=r[1];return Lc(Lc({},e),{},_c({},n,i.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,r=t.formattedGraphicalItems,n=t.activeItem;if(r&&r.length)for(var i=0,o=r.length;i<o;i++){var a=r[i],c=a.props,l=a.item,s=ut(l.type);if("Bar"===s){var u=(c.data||[]).find((function(t){return ri(e,t)}));if(u)return{graphicalItem:a,payload:u}}else if("RadialBar"===s){var p=(c.data||[]).find((function(t){return ce(e,t)}));if(p)return{graphicalItem:a,payload:p}}else if(Pi(a,n)||Ti(a,n)||Ci(a,n)){var f=Ni({graphicalItem:a,activeTooltipItem:n,itemData:l.props.data}),d=void 0===l.props.activeIndex?f:l.props.activeIndex;return{graphicalItem:Lc(Lc({},a),{},{childIndex:d}),payload:Ci(a,n)?l.props.data[f]:a.props.data[f]}}}return null}},{key:"render",value:function(){var e=this;if(!yt(this))return null;var t,r,n=this.props,i=n.children,o=n.className,a=n.width,c=n.height,l=n.style,s=n.compact,u=n.title,p=n.desc,f=Pc(n,Sc),h=bt(f);if(s)return d().createElement(Mt,Ec({},h,{width:a,height:c,title:u,desc:p}),this.renderClipPath(),Ot(i,this.renderMap));this.props.accessibilityLayer&&(h.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,h.role=null!==(r=this.props.role)&&void 0!==r?r:"img",h.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},h.onFocus=function(){e.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return d().createElement("div",Ec({className:Z()("recharts-wrapper",o),style:Lc({position:"relative",cursor:"default",width:a,height:c},l)},m,{ref:function(t){e.container=t},role:"region"}),d().createElement(Mt,Ec({},h,{width:a,height:c,title:u,desc:p,style:Fc}),this.renderClipPath(),Ot(i,this.renderMap)),this.renderLegend(),this.renderTooltip())}}],n&&Tc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(f.Component),_c(t,"displayName",r),_c(t,"defaultProps",Lc({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),_c(t,"getDerivedStateFromProps",(function(e,t){var r=e.dataKey,n=e.data,i=e.children,o=e.width,a=e.height,c=e.layout,l=e.stackOffset,s=e.margin;if(void 0===t.updateId){var u=Vc(e);return Lc(Lc(Lc({},u),{},{updateId:0},h(Lc(Lc({props:e},u),{},{updateId:0}),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:c,prevStackOffset:l,prevMargin:s,prevChildren:i})}if(r!==t.prevDataKey||n!==t.prevData||o!==t.prevWidth||a!==t.prevHeight||c!==t.prevLayout||l!==t.prevStackOffset||!Ze(s,t.prevMargin)){var p=Vc(e),f={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},d=Lc(Lc({},Hc(t,n,c)),{},{updateId:t.updateId+1}),m=Lc(Lc(Lc({},p),f),d);return Lc(Lc(Lc({},m),h(Lc({props:e},m),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:c,prevStackOffset:l,prevMargin:s,prevChildren:i})}if(!xt(i,t.prevChildren)){var y=R()(n)?t.updateId+1:t.updateId;return Lc(Lc({updateId:y},h(Lc(Lc({props:e},t),{},{updateId:y}),t)),{},{prevChildren:i})}return null})),_c(t,"renderActiveDot",(function(e,t){var r;return r=(0,f.isValidElement)(e)?(0,f.cloneElement)(e,t):L()(e)?e(t):d().createElement(fa,t),d().createElement(jt,{className:"recharts-active-dot",key:t.key},r)})),t},Zc=["type","layout","connectNulls","ref"];function Qc(e){return Qc="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},Qc(e)}function Jc(){return Jc=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},Jc.apply(this,arguments)}function el(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 tl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?el(Object(r),!0).forEach((function(t){ll(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):el(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rl(e){return function(e){if(Array.isArray(e))return nl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return nl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nl(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function il(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,sl(n.key),n)}}function ol(e,t){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ol(e,t)}function al(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cl(e)}function ll(e,t,r){return(t=sl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sl(e){var t=function(e,t){if("object"!==Qc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Qc(t)?t:String(t)}var ul=function(e){!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&&ol(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=cl(i);if(o){var r=cl(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Qc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return al(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ll(al(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!0,totalLength:0}),ll(al(e),"generateSimpleStrokeDasharray",(function(e,t){return"".concat(t,"px ").concat(e-t,"px")})),ll(al(e),"getStrokeDasharray",(function(t,r,n){var i=n.reduce((function(e,t){return e+t}));if(!i)return e.generateSimpleStrokeDasharray(r,t);for(var o=Math.floor(t/i),a=t%i,l=r-t,s=[],u=0,p=0;u<n.length;p+=n[u],++u)if(p+n[u]>a){s=[].concat(rl(n.slice(0,u)),[a-p]);break}var f=s.length%2==0?[0,l]:[l];return[].concat(rl(c.repeat(n,o)),rl(s),f).map((function(e){return"".concat(e,"px")})).join(", ")})),ll(al(e),"id",xe("recharts-line-")),ll(al(e),"pathRef",(function(t){e.mainCurve=t})),ll(al(e),"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()})),ll(al(e),"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()})),e}return t=c,n=[{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:"repeat",value:function(e,t){for(var r=e.length%2!=0?[].concat(rl(e),[0]):e,n=[],i=0;i<t;++i)n=[].concat(rl(n),rl(r));return n}},{key:"renderDotItem",value:function(e,t){var r;if(d().isValidElement(e))r=d().cloneElement(e,t);else if(L()(e))r=e(t);else{var n=Z()("recharts-line-dot",e?e.className:"");r=d().createElement(fa,Jc({},t,{className:n}))}return r}}],(r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.points,i=r.xAxis,o=r.yAxis,a=r.layout,c=ht(r.children,Tt);if(!c)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:kr(e.payload,t)}},s={clipPath:e?"url(#clipPath-".concat(t,")"):null};return d().createElement(jt,s,c.map((function(e){return d().cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,dataPointFormatter:l})})))}},{key:"renderDots",value:function(e,t,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,i=n.dot,o=n.points,a=n.dataKey,l=bt(this.props),s=bt(i,!0),u=o.map((function(e,t){var r=tl(tl(tl({key:"dot-".concat(t),r:3},l),s),{},{value:e.value,dataKey:a,cx:e.x,cy:e.y,index:t,payload:e.payload});return c.renderDotItem(i,r)})),p={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return d().createElement(jt,Jc({className:"recharts-line-dots",key:"dots"},p),u)}},{key:"renderCurveStatically",value:function(e,t,r,n){var i=this.props,o=i.type,a=i.layout,c=i.connectNulls,l=(i.ref,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,Zc)),s=tl(tl(tl({},bt(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(r,")"):null,points:e},n),{},{type:o,layout:a,connectNulls:c});return d().createElement(ia,Jc({},s,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.strokeDasharray,a=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,s=n.animationEasing,u=n.animationId,p=n.animateNewValues,f=n.width,h=n.height,m=this.state,y=m.prevPoints,v=m.totalLength;return d().createElement(Hr(),{begin:c,duration:l,isActive:a,easing:s,from:{t:0},to:{t:1},key:"line-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(y){var c=y.length/i.length,l=i.map((function(e,t){var r=Math.floor(t*c);if(y[r]){var n=y[r],i=ke(n.x,e.x),o=ke(n.y,e.y);return tl(tl({},e),{},{x:i(a),y:o(a)})}if(p){var l=ke(2*f,e.x),s=ke(h/2,e.y);return tl(tl({},e),{},{x:l(a),y:s(a)})}return tl(tl({},e),{},{x:e.x,y:e.y})}));return r.renderCurveStatically(l,e,t)}var s,u=ke(0,v)(a);if(o){var d="".concat(o).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));s=r.getStrokeDasharray(u,v,d)}else s=r.generateSimpleStrokeDasharray(v,u);return r.renderCurveStatically(i,e,t,{strokeDasharray:s})}))}},{key:"renderCurve",value:function(e,t){var r=this.props,n=r.points,i=r.isAnimationActive,o=this.state,a=o.prevPoints,c=o.totalLength;return i&&n&&n.length&&(!a&&c>0||!He()(a,n))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(n,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.xAxis,c=t.yAxis,l=t.top,s=t.left,u=t.width,p=t.height,f=t.isAnimationActive,h=t.id;if(r||!i||!i.length)return null;var m=this.state.isAnimationFinished,y=1===i.length,v=Z()("recharts-line",o),g=a&&a.allowDataOverflow,b=c&&c.allowDataOverflow,x=g||b,w=R()(h)?this.id:h,O=null!==(e=bt(n))&&void 0!==e?e:{r:3,strokeWidth:2},k=O.r,S=void 0===k?3:k,j=O.strokeWidth,A=void 0===j?2:j,E=(gt(n)?n:{}).clipDot,P=void 0===E||E,T=2*S+A;return d().createElement(jt,{className:v},g||b?d().createElement("defs",null,d().createElement("clipPath",{id:"clipPath-".concat(w)},d().createElement("rect",{x:g?s:s-u/2,y:b?l:l-p/2,width:g?u:2*u,height:b?p:2*p})),!P&&d().createElement("clipPath",{id:"clipPath-dots-".concat(w)},d().createElement("rect",{x:s-T/2,y:l-T/2,width:u+T,height:p+T}))):null,!y&&this.renderCurve(x,w),this.renderErrorBar(x,w),(y||n)&&this.renderDots(x,P,w),(!f||m)&&Gn.renderCallByParent(this.props,i))}}])&&il(t.prototype,r),n&&il(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);ll(ul,"displayName","Line"),ll(ul,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!je.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),ll(ul,"getComposedData",(function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,c=e.bandSize,l=e.displayedData,s=e.offset,u=t.layout;return tl({points:l.map((function(e,t){var l=kr(e,a);return"horizontal"===u?{x:Br({axis:r,ticks:i,bandSize:c,entry:e,index:t}),y:R()(l)?null:n.scale(l),value:l,payload:e}:{x:R()(l)?null:r.scale(l),y:Br({axis:n,ticks:o,bandSize:c,entry:e,index:t}),value:l,payload:e}})),layout:u},s)}));var pl=function(){return null};pl.displayName="XAxis",pl.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0};var fl=function(){return null};fl.displayName="YAxis",fl.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1};var dl,hl=Yc({chartName:"LineChart",GraphicalChild:ul,axisComponents:[{axisType:"xAxis",AxisComp:pl},{axisType:"yAxis",AxisComp:fl}],formatAxisMap:ao}),ml=Yc({chartName:"BarChart",GraphicalChild:Ji,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:pl},{axisType:"yAxis",AxisComp:fl}],formatAxisMap:ao}),yl=["layout","type","stroke","connectNulls","isRange","ref"];function vl(e){return vl="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},vl(e)}function gl(){return gl=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},gl.apply(this,arguments)}function bl(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 xl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bl(Object(r),!0).forEach((function(t){jl(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wl(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,Al(n.key),n)}}function Ol(e,t){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ol(e,t)}function kl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sl(e)}function jl(e,t,r){return(t=Al(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Al(e){var t=function(e,t){if("object"!==vl(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==vl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===vl(t)?t:String(t)}var El=function(e){!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&&Ol(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=Sl(i);if(o){var r=Sl(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===vl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return kl(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jl(kl(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!0}),jl(kl(e),"id",xe("recharts-area-")),jl(kl(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),L()(t)&&t()})),jl(kl(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),L()(t)&&t()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],(r=[{key:"renderDots",value:function(e,t,r){var n=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(n&&!i)return null;var o=this.props,a=o.dot,l=o.points,s=o.dataKey,u=bt(this.props),p=bt(a,!0),f=l.map((function(e,t){var r=xl(xl(xl({key:"dot-".concat(t),r:3},u),p),{},{dataKey:s,cx:e.x,cy:e.y,index:t,value:e.value,payload:e.payload});return c.renderDotItem(a,r)})),h={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return d().createElement(jt,gl({className:"recharts-area-dots"},h),f)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,r=t.baseLine,n=t.points,i=t.strokeWidth,o=n[0].x,a=n[n.length-1].x,c=e*Math.abs(o-a),l=_e()(n.map((function(e){return e.y||0})));return ve(r)&&"number"==typeof r?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(_e()(r.map((function(e){return e.y||0}))),l)),ve(l)?d().createElement("rect",{x:o<a?o:o-c,y:0,width:c,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,r=t.baseLine,n=t.points,i=t.strokeWidth,o=n[0].y,a=n[n.length-1].y,c=e*Math.abs(o-a),l=_e()(n.map((function(e){return e.x||0})));return ve(r)&&"number"==typeof r?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(_e()(r.map((function(e){return e.x||0}))),l)),ve(l)?d().createElement("rect",{x:0,y:o<a?o:o-c,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,r,n){var i=this.props,o=i.layout,a=i.type,c=i.stroke,l=i.connectNulls,s=i.isRange,u=(i.ref,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,yl));return d().createElement(jt,{clipPath:r?"url(#clipPath-".concat(n,")"):null},d().createElement(ia,gl({},bt(u,!0),{points:e,connectNulls:l,type:a,baseLine:t,layout:o,stroke:"none",className:"recharts-area-area"})),"none"!==c&&d().createElement(ia,gl({},bt(this.props),{className:"recharts-area-curve",layout:o,type:a,connectNulls:l,fill:"none",points:e})),"none"!==c&&s&&d().createElement(ia,gl({},bt(this.props),{className:"recharts-area-curve",layout:o,type:a,connectNulls:l,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.baseLine,a=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,s=n.animationEasing,u=n.animationId,p=this.state,f=p.prevPoints,h=p.prevBaseLine;return d().createElement(Hr(),{begin:c,duration:l,isActive:a,easing:s,from:{t:0},to:{t:1},key:"area-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(f){var c,l=f.length/i.length,s=i.map((function(e,t){var r=Math.floor(t*l);if(f[r]){var n=f[r],i=ke(n.x,e.x),o=ke(n.y,e.y);return xl(xl({},e),{},{x:i(a),y:o(a)})}return e}));return c=ve(o)&&"number"==typeof o?ke(h,o)(a):R()(o)||fe()(o)?ke(h,0)(a):o.map((function(e,t){var r=Math.floor(t*l);if(h[r]){var n=h[r],i=ke(n.x,e.x),o=ke(n.y,e.y);return xl(xl({},e),{},{x:i(a),y:o(a)})}return e})),r.renderAreaStatically(s,c,e,t)}return d().createElement(jt,null,d().createElement("defs",null,d().createElement("clipPath",{id:"animationClipPath-".concat(t)},r.renderClipRect(a))),d().createElement(jt,{clipPath:"url(#animationClipPath-".concat(t,")")},r.renderAreaStatically(i,o,e,t)))}))}},{key:"renderArea",value:function(e,t){var r=this.props,n=r.points,i=r.baseLine,o=r.isAnimationActive,a=this.state,c=a.prevPoints,l=a.prevBaseLine,s=a.totalLength;return o&&n&&n.length&&(!c&&s>0||!He()(c,n)||!He()(l,i))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(n,i,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.top,c=t.left,l=t.xAxis,s=t.yAxis,u=t.width,p=t.height,f=t.isAnimationActive,h=t.id;if(r||!i||!i.length)return null;var m=this.state.isAnimationFinished,y=1===i.length,v=Z()("recharts-area",o),g=l&&l.allowDataOverflow,b=s&&s.allowDataOverflow,x=g||b,w=R()(h)?this.id:h,O=null!==(e=bt(n))&&void 0!==e?e:{r:3,strokeWidth:2},k=O.r,S=void 0===k?3:k,j=O.strokeWidth,A=void 0===j?2:j,E=(gt(n)?n:{}).clipDot,P=void 0===E||E,T=2*S+A;return d().createElement(jt,{className:v},g||b?d().createElement("defs",null,d().createElement("clipPath",{id:"clipPath-".concat(w)},d().createElement("rect",{x:g?c:c-u/2,y:b?a:a-p/2,width:g?u:2*u,height:b?p:2*p})),!P&&d().createElement("clipPath",{id:"clipPath-dots-".concat(w)},d().createElement("rect",{x:c-T/2,y:a-T/2,width:u+T,height:p+T}))):null,y?null:this.renderArea(x,w),(n||y)&&this.renderDots(x,P,w),(!f||m)&&Gn.renderCallByParent(this.props,i))}}])&&wl(t.prototype,r),n&&wl(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);dl=El,jl(El,"displayName","Area"),jl(El,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!je.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),jl(El,"getBaseValue",(function(e,t,r,n){var i=e.layout,o=e.baseValue,a=t.props.baseValue,c=null!=a?a:o;if(ve(c)&&"number"==typeof c)return c;var l="horizontal"===i?n:r,s=l.scale.domain();if("number"===l.type){var u=Math.max(s[0],s[1]),p=Math.min(s[0],s[1]);return"dataMin"===c?p:"dataMax"===c||u<0?u:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===c?s[0]:"dataMax"===c?s[1]:s[0]})),jl(El,"getComposedData",(function(e){var t,r=e.props,n=e.item,i=e.xAxis,o=e.yAxis,a=e.xAxisTicks,c=e.yAxisTicks,l=e.bandSize,s=e.dataKey,u=e.stackedData,p=e.dataStartIndex,f=e.displayedData,d=e.offset,h=r.layout,m=u&&u.length,y=dl.getBaseValue(r,n,i,o),v="horizontal"===h,g=!1,b=f.map((function(e,t){var r;m?r=u[p+t]:(r=kr(e,s),Array.isArray(r)?g=!0:r=[y,r]);var n=null==r[1]||m&&null==kr(e,s);return v?{x:Br({axis:i,ticks:a,bandSize:l,entry:e,index:t}),y:n?null:o.scale(r[1]),value:r,payload:e}:{x:n?null:i.scale(r[1]),y:Br({axis:o,ticks:c,bandSize:l,entry:e,index:t}),value:r,payload:e}}));return t=m||g?b.map((function(e){var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=t&&null!=e.y?o.scale(t):null}:{x:null!=t?i.scale(t):null,y:e.y}})):v?o.scale(y):i.scale(y),xl({points:b,baseLine:t,layout:h,isRange:g},d)})),jl(El,"renderDotItem",(function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):L()(e)?e(t):d().createElement(fa,gl({},t,{className:"recharts-area-dot"}))}));var Pl=Yc({chartName:"AreaChart",GraphicalChild:El,axisComponents:[{axisType:"xAxis",AxisComp:pl},{axisType:"yAxis",AxisComp:fl}],formatAxisMap:ao});function Tl(e){return Tl="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},Tl(e)}function Cl(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 Il(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cl(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Tl(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Tl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Tl(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Dl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ml=(0,f.forwardRef)((function(e,t){var r=e.aspect,n=e.initialDimension,i=void 0===n?{width:-1,height:-1}:n,o=e.width,a=void 0===o?"100%":o,c=e.height,l=void 0===c?"100%":c,s=e.minWidth,u=void 0===s?0:s,p=e.minHeight,h=e.maxHeight,m=e.children,y=e.debounce,v=void 0===y?0:y,g=e.id,b=e.className,x=e.onResize,w=e.style,O=void 0===w?{}:w,k=(0,f.useRef)(null),S=(0,f.useRef)();S.current=x,(0,f.useImperativeHandle)(t,(function(){return k}));var j,A,E=(j=(0,f.useState)({containerWidth:i.width,containerHeight:i.height}),A=2,function(e){if(Array.isArray(e))return e}(j)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(j,A)||function(e,t){if(e){if("string"==typeof e)return Dl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dl(e,t):void 0}}(j,A)||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.")}()),P=E[0],T=E[1],C=(0,f.useCallback)((function(e,t){T((function(r){var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}}))}),[]);(0,f.useEffect)((function(){var e=function(e){var t,r=e[0].contentRect,n=r.width,i=r.height;C(n,i),null===(t=S.current)||void 0===t||t.call(S,n,i)};v>0&&(e=G()(e,v,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),r=k.current.getBoundingClientRect(),n=r.width,i=r.height;return C(n,i),t.observe(k.current),function(){t.disconnect()}}),[C,v]);var I=(0,f.useMemo)((function(){var e=P.containerWidth,t=P.containerHeight;if(e<0||t<0)return null;Ct(ye(a)||ye(l),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",a,l),Ct(!r||r>0,"The aspect(%s) must be greater than zero.",r);var n=ye(a)?e:a,i=ye(l)?t:l;r&&r>0&&(n?i=n/r:i&&(n=i*r),h&&i>h&&(i=h)),Ct(n>0||i>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",n,i,a,l,u,p,r);var o=!Array.isArray(m)&&(0,Ye.isElement)(m)&&ut(m.type).endsWith("Chart");return d().Children.map(m,(function(e){return(0,Ye.isElement)(e)?(0,f.cloneElement)(e,Il({width:n,height:i},o?{style:Il({height:"100%",width:"100%",maxHeight:i,maxWidth:n},e.props.style)}:{})):e}))}),[r,m,l,h,p,u,P,a]);return d().createElement("div",{id:g?"".concat(g):void 0,className:Z()("recharts-responsive-container",b),style:Il(Il({},O),{},{width:a,height:l,minWidth:u,minHeight:p,maxHeight:h}),ref:k},I)})),Nl=r(450),Rl=r.n(Nl),Bl=function(){return Bl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Bl.apply(this,arguments)};function Ll(e){var t=new Date,r=new Date(e);return Math.floor((t.getTime()-r.getTime())/1e3)}var _l,zl=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function $l(e,t){return function(e,t){var r,n=new Date(e),i=navigator.language;return r=t===_l.HOUR?{hour:"numeric",minute:"2-digit",hour12:!0}:{month:"short",day:"numeric"},n.toLocaleString(i,r)}(e,t<=1?_l.HOUR:_l.MONTH_DATE)}function Fl(e){var t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),i=t>0?"".concat(t,":"):"",o="".concat(t>0?r.toString().padStart(2,"0"):r),a=n.toString().padStart(2,"0");return"".concat(i).concat(o,":").concat(a)}function ql(e,t){var r={};return e&&(r={width:e}),t&&(r=Bl(Bl({},r),{height:t})),e||t||(r={className:"rustic-fit-container"}),r}!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(_l||(_l={}));var Wl=function(){return Wl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wl.apply(this,arguments)},Ul={line:hl,bar:ml,area:Pl};function Gl(e){var t={};return e.forEach((function(e){t[e]=!0})),t}function Hl(t){var r=(0,f.useState)(t.defaultChartType||"line"),n=r[0],i=r[1],o=(0,f.useState)(null),a=o[0],c=o[1],l=(0,f.useState)(t.timeSeries),s=l[0],u=l[1],p=M()(),d=s.length>0?Object.keys(s[0]):[],h=d[0],m=d.slice(1),y=(0,f.useState)(Gl(m)),g=y[0],x=y[1];(0,f.useEffect)((function(){if(t.updatedData&&t.updatedData.length>0){var e=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],t.timeSeries,!0);t.updatedData.forEach((function(t){e=e.concat(t.timeSeries),u(e)}))}}),[t.timeSeries,t.updatedData]);var O=Ul[n];function S(e){a?c(null):e&&c(e.currentTarget)}function A(e,r){return g[e]?t.chartColors[r%t.chartColors.length]:"grey"}function P(e){return g[e]?"none":"line-through"}if(0===s.length)return(0,e.jsx)(T(),{variant:"body2",children:"No data available"});var C,D,N,R,B=t.timeSeries[t.timeSeries.length-1],L=(C=t.timeSeries[0][h],D=B[h],N=new Date(C),R=new Date(D),Math.round(Math.abs((R.getTime()-N.getTime())/864e5)));return(0,e.jsxs)(I(),{className:"rustic-recharts-time-series",children:[!t.disableChartTypeToggle&&(0,e.jsxs)(w(),{className:"rustic-recharts-time-series-chart-toggle",children:[(0,e.jsx)(k(),{"aria-label":"chart options","aria-expanded":Boolean(a),"aria-haspopup":"true",onClick:S,children:(0,e.jsx)(b(),{sx:{color:"primary.main"}})}),(0,e.jsxs)(j(),{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:a,open:Boolean(a),onClose:function(e){return S(e)},children:[(0,e.jsx)(T(),{className:"rustic-recharts-time-series-chart-toggle-title",children:"Chart Types:"}),Object.keys(Ul).map((function(t){return(0,e.jsxs)(E(),{value:t,selected:t===n,onClick:function(){return function(e){i(e),S()}(t)},children:[t.charAt(0).toUpperCase()+t.slice(1)," ","Chart"]},t)}))]})]}),(0,e.jsxs)(I(),{children:[t.title&&(0,e.jsx)(T(),{variant:"subtitle2",className:"rustic-recharts-time-series-title",children:t.title}),t.description&&(0,e.jsx)(T(),{variant:"caption",className:"rustic-recharts-time-series-description",children:t.description}),(0,e.jsx)(Ml,{aspect:t.aspectRatio,width:t.width,maxHeight:t.maxHeight,minWidth:t.minChartWidth,children:(0,e.jsxs)(O,{data:s,margin:t.chartContainerMargin,children:[(0,e.jsx)(pl,{dataKey:h,tickFormatter:function(e){return $l(e,L)},stroke:p.palette.text.primary}),(0,e.jsx)(fl,{domain:["auto","auto"],width:t.yAxisLabelWidth,tickFormatter:t.yAxisTickFormatter,stroke:p.palette.text.primary}),(0,e.jsx)(Ko,{labelFormatter:function(e){return[$l(e,L)]},formatter:t.tooltipFormatter,contentStyle:{color:p.palette.common.black}}),(0,e.jsx)(fr,{content:function(){return(0,e.jsx)(I(),{className:"rustic-recharts-time-series-legend",children:m.map((function(t,r){return(0,e.jsxs)(I(),{className:"rustic-recharts-time-series-legend-item",onClick:function(){return function(e){var t,r=g[e]&&!m.find((function(t){return t!==e&&g[t]}));if(function(e){return Object.values(e).every((function(e){return!0===e}))}(g)){for(var n={},i=0,o=m;i<o.length;i++){var a=o[i],c=a===e;n[a]=c}x(n)}else x(r?Gl(m):Wl(Wl({},g),((t={})[e]=!g[e],t)))}(t)},children:[(0,e.jsx)(v(),{sx:{color:A(t,r)}}),(0,e.jsx)(T(),{variant:"body2",display:"inline",sx:{color:A(t,r),textDecorationLine:P(t)},children:t})]},r)}))})}}),m.map((function(r,i){return g[r]?function(r,i){var o=i%t.chartColors.length,a=g[r]?t.chartColors[o]:"transparent",c={onClick:t.onClick,cursor:"pointer"};switch(n){case"line":return(0,e.jsx)(ul,{type:"monotone",isAnimationActive:!1,dataKey:r,name:r,dot:!1,stroke:a,activeDot:t.onClick&&c},r);case"bar":return(0,e.jsx)(Ji,{dataKey:r,fill:a,onClick:t.onClick&&c.onClick,cursor:t.onClick&&c.cursor},r);case"area":return(0,e.jsxs)(f.Fragment,{children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"color".concat(r),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,e.jsx)("stop",{offset:"5%",stopColor:a,stopOpacity:.8}),(0,e.jsx)("stop",{offset:"95%",stopColor:a,stopOpacity:0})]})}),(0,e.jsx)(El,{isAnimationActive:!1,dataKey:r,type:"monotone",stroke:a,fillOpacity:1,fill:"url(#color".concat(r,")"),activeDot:t.onClick&&c},r)]},r)}}(r,i):null})),t.referenceLineYAxis&&t.referenceLineYAxis.map((function(r,n){return(0,e.jsx)(oc,{y:r,label:t.referenceLineLabel&&t.referenceLineLabel[n],stroke:t.referenceLineColor&&t.referenceLineColor[n],strokeDasharray:"3 3",ifOverflow:"extendDomain",strokeWidth:t.referenceLineStrokeWidth&&t.referenceLineStrokeWidth[n],isFront:!0},n)}))]})})]})]})}Hl.defaultProps={minChartWidth:200,maxHeight:600,yAxisLabelWidth:30,aspectRatio:16/9,disableChartTypeToggle:!1};const Xl=Hl,Vl=require("@codemirror/language"),Kl=require("@codemirror/language-data"),Yl=require("@codemirror/state"),Zl=require("@codemirror/view"),Ql=require("@mui/system");function Jl(t){var r=(0,f.useRef)(null),n=(0,f.useRef)(),i=new Yl.Compartment,o=[Yl.EditorState.readOnly.of(!0),(0,Zl.highlightSpecialChars)(),(0,Vl.syntaxHighlighting)(Vl.defaultHighlightStyle,{fallback:!0}),i.of([])],a=Kl.languages.find((function(e){return e.name.toLowerCase()===t.language.toLowerCase()}));return(0,f.useEffect)((function(){if(r.current&&!n.current){var e=r.current,c=Yl.EditorState.create({doc:t.code,extensions:o});n.current=new Zl.EditorView({state:c,parent:e}),a&&n.current&&a.load().then((function(e){var t;null===(t=n.current)||void 0===t||t.dispatch({effects:i.reconfigure(e.extension)})}))}}),[]),(0,e.jsx)(Ql.Box,{sx:{backgroundColor:"background.default"},className:"rustic-code-snippet",children:(0,e.jsx)("div",{"aria-label":"code snippet",ref:r,children:(0,e.jsx)(T(),{variant:"body2","aria-label":"language type",children:t.language})})})}var es=function(){return es=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},es.apply(this,arguments)};const ts=function(t){var r=t.supportedElements[t.message.format];return(0,e.jsx)(e.Fragment,{children:r?d().createElement(r,es(es({},t.message.data),t.message.threadMessagesData&&{updatedData:t.message.threadMessagesData})):(0,e.jsxs)(T(),{variant:"body2",children:["Unsupported element format: ",t.message.format]})})},rs=require("@mui/material/CircularProgress");var ns=r.n(rs),is=function(){return is=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},is.apply(this,arguments)};function os(t){var r=(0,f.useState)(!0),n=r[0],i=r[1],o=(0,f.useState)(""),a=o[0],c=o[1];return a.length>0?(0,e.jsx)(T(),{variant:"body2",children:a}):(0,e.jsxs)("figure",{children:[n&&(0,e.jsx)(ns(),{}),(0,e.jsx)("img",is({},ql(t.width,t.height),{src:t.src,alt:t.alt,onError:function(){c("Image failed to load"),i(!1)},onLoad:function(){i(!1)}})),t.description&&(0,e.jsx)("figcaption",{children:(0,e.jsx)(T(),{variant:"body2",children:t.description})})]})}os.defaultProps={alt:"An image is displayed"},require("ol/ol.css");const as=require("@mui/icons-material/Place");var cs=r.n(as);const ls=require("@mui/material/Alert");var ss=r.n(ls);const us=require("ol/layer/Tile.js");var ps=r.n(us);const fs=require("ol/Map.js");var ds=r.n(fs);const hs=require("ol/Overlay.js");var ms=r.n(hs);const ys=require("ol/proj.js"),vs=require("ol/source/OSM.js");var gs=r.n(vs);const bs=require("ol/View.js");var xs=r.n(bs);function ws(t){var r=(0,f.useState)(""),n=r[0],i=r[1],o=(0,f.useRef)(null),a=(0,f.useRef)(null);return(0,f.useEffect)((function(){if(i(""),t.latitude<-90||t.latitude>90||t.longitude<-180||t.longitude>180)return i("Invalid coordinates");if(o.current&&a.current){var e=new(ds())({layers:[new(ps())({source:new(gs())})],view:new(xs())({center:(0,ys.fromLonLat)([t.longitude,t.latitude]),zoom:12}),target:o.current}),r=new(ms())({element:a.current,position:(0,ys.fromLonLat)([t.longitude,t.latitude]),positioning:"bottom-center",stopEvent:!1});return e.addOverlay(r),e.once("postrender",(function(){var e;if(!(null===(e=o.current)||void 0===e?void 0:e.querySelector("canvas")))return i("An error occurred while loading the map")})),function(){e.setTarget(""),e.removeOverlay(r)}}}),[]),(0,e.jsx)(e.Fragment,{children:n.length>0?(0,e.jsx)(ss(),{severity:"error",children:n}):(0,e.jsxs)(l(),{children:[(0,e.jsx)(l(),{ref:a,children:(0,e.jsx)(cs(),{className:"rustic-open-layers-map-marker"})}),(0,e.jsx)("div",{ref:o,className:"rustic-open-layers-map-canvas"})]})})}const{entries:Os,setPrototypeOf:ks,isFrozen:Ss,getPrototypeOf:js,getOwnPropertyDescriptor:As}=Object;let{freeze:Es,seal:Ps,create:Ts}=Object,{apply:Cs,construct:Is}="undefined"!=typeof Reflect&&Reflect;Es||(Es=function(e){return e}),Ps||(Ps=function(e){return e}),Cs||(Cs=function(e,t,r){return e.apply(t,r)}),Is||(Is=function(e,t){return new e(...t)});const Ds=Us(Array.prototype.forEach),Ms=Us(Array.prototype.pop),Ns=Us(Array.prototype.push),Rs=Us(String.prototype.toLowerCase),Bs=Us(String.prototype.toString),Ls=Us(String.prototype.match),_s=Us(String.prototype.replace),zs=Us(String.prototype.indexOf),$s=Us(String.prototype.trim),Fs=Us(RegExp.prototype.test),qs=(Ws=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Is(Ws,t)});var Ws;function Us(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Cs(e,t,n)}}function Gs(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rs;ks&&ks(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(Ss(t)||(t[n]=e),i=e)}e[i]=!0}return e}function Hs(e){const t=Ts(null);for(const[r,n]of Os(e))void 0!==As(e,r)&&(t[r]=n);return t}function Xs(e,t){for(;null!==e;){const r=As(e,t);if(r){if(r.get)return Us(r.get);if("function"==typeof r.value)return Us(r.value)}e=js(e)}return function(e){return console.warn("fallback value for",e),null}}const Vs=Es(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ks=Es(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ys=Es(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zs=Es(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qs=Es(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Js=Es(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),eu=Es(["#text"]),tu=Es(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ru=Es(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nu=Es(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),iu=Es(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ou=Ps(/\{\{[\w\W]*|[\w\W]*\}\}/gm),au=Ps(/<%[\w\W]*|[\w\W]*%>/gm),cu=Ps(/\${[\w\W]*}/gm),lu=Ps(/^data-[\-\w.\u00B7-\uFFFF]/),su=Ps(/^aria-[\-\w]+$/),uu=Ps(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pu=Ps(/^(?:\w+script|data):/i),fu=Ps(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),du=Ps(/^html$/i);var hu=Object.freeze({__proto__:null,MUSTACHE_EXPR:ou,ERB_EXPR:au,TMPLIT_EXPR:cu,DATA_ATTR:lu,ARIA_ATTR:su,IS_ALLOWED_URI:uu,IS_SCRIPT_OR_DATA:pu,ATTR_WHITESPACE:fu,DOCTYPE_NAME:du});const mu=function(){return"undefined"==typeof window?null:window};var yu=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mu();const r=t=>e(t);if(r.version="3.0.6",r.removed=[],!t||!t.document||9!==t.document.nodeType)return r.isSupported=!1,r;let{document:n}=t;const i=n,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:l,Element:s,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=t,m=s.prototype,y=Xs(m,"cloneNode"),v=Xs(m,"nextSibling"),g=Xs(m,"childNodes"),b=Xs(m,"parentNode");if("function"==typeof c){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,w="";const{implementation:O,createNodeIterator:k,createDocumentFragment:S,getElementsByTagName:j}=n,{importNode:A}=i;let E={};r.isSupported="function"==typeof Os&&"function"==typeof b&&O&&void 0!==O.createHTMLDocument;const{MUSTACHE_EXPR:P,ERB_EXPR:T,TMPLIT_EXPR:C,DATA_ATTR:I,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:N}=hu;let{IS_ALLOWED_URI:R}=hu,B=null;const L=Gs({},[...Vs,...Ks,...Ys,...Qs,...eu]);let _=null;const z=Gs({},[...tu,...ru,...nu,...iu]);let $=Object.seal(Ts(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),F=null,q=null,W=!0,U=!0,G=!1,H=!0,X=!1,V=!1,K=!1,Y=!1,Z=!1,Q=!1,J=!1,ee=!0,te=!1,re=!0,ne=!1,ie={},oe=null;const ae=Gs({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ce=null;const le=Gs({},["audio","video","img","source","image","track"]);let se=null;const ue=Gs({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xhtml";let he=de,me=!1,ye=null;const ve=Gs({},[pe,fe,de],Bs);let ge=null;const be=["application/xhtml+xml","text/html"];let xe=null,we=null;const Oe=n.createElement("form"),ke=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!we||we!==e){if(e&&"object"==typeof e||(e={}),e=Hs(e),ge=ge=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===ge?Bs:Rs,B="ALLOWED_TAGS"in e?Gs({},e.ALLOWED_TAGS,xe):L,_="ALLOWED_ATTR"in e?Gs({},e.ALLOWED_ATTR,xe):z,ye="ALLOWED_NAMESPACES"in e?Gs({},e.ALLOWED_NAMESPACES,Bs):ve,se="ADD_URI_SAFE_ATTR"in e?Gs(Hs(ue),e.ADD_URI_SAFE_ATTR,xe):ue,ce="ADD_DATA_URI_TAGS"in e?Gs(Hs(le),e.ADD_DATA_URI_TAGS,xe):le,oe="FORBID_CONTENTS"in e?Gs({},e.FORBID_CONTENTS,xe):ae,F="FORBID_TAGS"in e?Gs({},e.FORBID_TAGS,xe):{},q="FORBID_ATTR"in e?Gs({},e.FORBID_ATTR,xe):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,U=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,H=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,V=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ne=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||uu,he=e.NAMESPACE||de,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(U=!1),Q&&(Z=!0),ie&&(B=Gs({},[...eu]),_=[],!0===ie.html&&(Gs(B,Vs),Gs(_,tu)),!0===ie.svg&&(Gs(B,Ks),Gs(_,ru),Gs(_,iu)),!0===ie.svgFilters&&(Gs(B,Ys),Gs(_,ru),Gs(_,iu)),!0===ie.mathMl&&(Gs(B,Qs),Gs(_,nu),Gs(_,iu))),e.ADD_TAGS&&(B===L&&(B=Hs(B)),Gs(B,e.ADD_TAGS,xe)),e.ADD_ATTR&&(_===z&&(_=Hs(_)),Gs(_,e.ADD_ATTR,xe)),e.ADD_URI_SAFE_ATTR&&Gs(se,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(oe===ae&&(oe=Hs(oe)),Gs(oe,e.FORBID_CONTENTS,xe)),re&&(B["#text"]=!0),V&&Gs(B,["html","head","body"]),B.table&&(Gs(B,["tbody"]),delete F.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw qs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw qs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(h,o)),null!==x&&"string"==typeof w&&(w=x.createHTML(""));Es&&Es(e),we=e}},je=Gs({},["mi","mo","mn","ms","mtext"]),Ae=Gs({},["foreignobject","desc","title","annotation-xml"]),Ee=Gs({},["title","style","font","a","script"]),Pe=Gs({},Ks);Gs(Pe,Ys),Gs(Pe,Zs);const Te=Gs({},Qs);Gs(Te,Js);const Ce=function(e){Ns(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Ie=function(e,t){try{Ns(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ns(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!_[e])if(Z||Q)try{Ce(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,r=null;if(Y)e="<remove></remove>"+e;else{const t=Ls(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===ge&&he===de&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=x?x.createHTML(e):e;if(he===de)try{t=(new d).parseFromString(i,ge)}catch(e){}if(!t||!t.documentElement){t=O.createDocument(he,"template",null);try{t.documentElement.innerHTML=me?w:i}catch(e){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),he===de?j.call(t,V?"html":"body")[0]:V?t.documentElement:o},Me=function(e){return k.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Ne=function(e){return"function"==typeof l&&e instanceof l},Re=function(e,t,n){E[e]&&Ds(E[e],(e=>{e.call(r,t,n,we)}))},Be=function(e){let t=null;if(Re("beforeSanitizeElements",e,null),(n=e)instanceof f&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof p)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return Ce(e),!0;var n;const i=xe(e.nodeName);if(Re("uponSanitizeElement",e,{tagName:i,allowedTags:B}),e.hasChildNodes()&&!Ne(e.firstElementChild)&&Fs(/<[/\w]/g,e.innerHTML)&&Fs(/<[/\w]/g,e.textContent))return Ce(e),!0;if(!B[i]||F[i]){if(!F[i]&&_e(i)){if($.tagNameCheck instanceof RegExp&&Fs($.tagNameCheck,i))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(i))return!1}if(re&&!oe[i]){const t=b(e)||e.parentNode,r=g(e)||e.childNodes;if(r&&t)for(let n=r.length-1;n>=0;--n)t.insertBefore(y(r[n],!0),v(e))}return Ce(e),!0}return e instanceof s&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});const r=Rs(e.tagName),n=Rs(t.tagName);return!!ye[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===de?"svg"===r:t.namespaceURI===pe?"svg"===r&&("annotation-xml"===n||je[n]):Boolean(Pe[r]):e.namespaceURI===pe?t.namespaceURI===de?"math"===r:t.namespaceURI===fe?"math"===r&&Ae[n]:Boolean(Te[r]):e.namespaceURI===de?!(t.namespaceURI===fe&&!Ae[n])&&!(t.namespaceURI===pe&&!je[n])&&!Te[r]&&(Ee[r]||!Pe[r]):!("application/xhtml+xml"!==ge||!ye[e.namespaceURI]))}(e)?(Ce(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Fs(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&3===e.nodeType&&(t=e.textContent,Ds([P,T,C],(e=>{t=_s(t,e," ")})),e.textContent!==t&&(Ns(r.removed,{element:e.cloneNode()}),e.textContent=t)),Re("afterSanitizeElements",e,null),!1):(Ce(e),!0)},Le=function(e,t,r){if(ee&&("id"===t||"name"===t)&&(r in n||r in Oe))return!1;if(U&&!q[t]&&Fs(I,t));else if(W&&Fs(D,t));else if(!_[t]||q[t]){if(!(_e(e)&&($.tagNameCheck instanceof RegExp&&Fs($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&Fs($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||"is"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Fs($.tagNameCheck,r)||$.tagNameCheck instanceof Function&&$.tagNameCheck(r))))return!1}else if(se[t]);else if(Fs(R,_s(r,N,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==zs(r,"data:")||!ce[e])if(G&&!Fs(M,_s(r,N,"")));else if(r)return!1;return!0},_e=function(e){return e.indexOf("-")>0},ze=function(e){Re("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:c,value:l}=o,s=xe(a);let u="value"===a?l:$s(l);if(n.attrName=s,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,Re("uponSanitizeAttribute",e,n),u=n.attrValue,n.forceKeepAttr)continue;if(Ie(a,e),!n.keepAttr)continue;if(!H&&Fs(/\/>/i,u)){Ie(a,e);continue}X&&Ds([P,T,C],(e=>{u=_s(u,e," ")}));const p=xe(e.nodeName);if(Le(p,s,u)){if(!te||"id"!==s&&"name"!==s||(Ie(a,e),u="user-content-"+u),x&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(c);else switch(h.getAttributeType(p,s)){case"TrustedHTML":u=x.createHTML(u);break;case"TrustedScriptURL":u=x.createScriptURL(u)}try{c?e.setAttributeNS(c,a,u):e.setAttribute(a,u),Ms(r.removed)}catch(e){}}}Re("afterSanitizeAttributes",e,null)},$e=function e(t){let r=null;const n=Me(t);for(Re("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)Re("uponSanitizeShadowNode",r,null),Be(r)||(r.content instanceof a&&e(r.content),ze(r));Re("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,c=null,s=null;if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ne(e)){if("function"!=typeof e.toString)throw qs("toString is not a function");if("string"!=typeof(e=e.toString()))throw qs("dirty is not a string, aborting")}if(!r.isSupported)return e;if(K||Se(t),r.removed=[],"string"==typeof e&&(ne=!1),ne){if(e.nodeName){const t=xe(e.nodeName);if(!B[t]||F[t])throw qs("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=De("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Z&&!X&&!V&&-1===e.indexOf("<"))return x&&J?x.createHTML(e):e;if(n=De(e),!n)return Z?null:J?w:""}n&&Y&&Ce(n.firstChild);const u=Me(ne?e:n);for(;c=u.nextNode();)Be(c)||(c.content instanceof a&&$e(c.content),ze(c));if(ne)return e;if(Z){if(Q)for(s=S.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(_.shadowroot||_.shadowrootmode)&&(s=A.call(i,s,!0)),s}let p=V?n.outerHTML:n.innerHTML;return V&&B["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&Fs(du,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p),X&&Ds([P,T,C],(e=>{p=_s(p,e," ")})),x&&J?x.createHTML(p):p},r.setConfig=function(){Se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},r.clearConfig=function(){we=null,K=!1},r.isValidAttribute=function(e,t,r){we||Se({});const n=xe(e),i=xe(t);return Le(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&(E[e]=E[e]||[],Ns(E[e],t))},r.removeHook=function(e){if(E[e])return Ms(E[e])},r.removeHooks=function(e){E[e]&&(E[e]=[])},r.removeAllHooks=function(){E={}},r}();let vu={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function gu(e){vu=e}const bu=/[&<>"']/,xu=new RegExp(bu.source,"g"),wu=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ou=new RegExp(wu.source,"g"),ku={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Su=e=>ku[e];function ju(e,t){if(t){if(bu.test(e))return e.replace(xu,Su)}else if(wu.test(e))return e.replace(Ou,Su);return e}const Au=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Eu(e){return e.replace(Au,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Pu=/(^|[^\[])\^/g;function Tu(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,n)=>(n=(n="object"==typeof n&&"source"in n?n.source:n).replace(Pu,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r}function Cu(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const Iu={exec:()=>null};function Du(e,t){const r=e.replace(/\|/g,((e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function Mu(e,t,r){const n=e.length;if(0===n)return"";let i=0;for(;i<n;){const o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.slice(0,n-i)}function Nu(e,t,r,n){const i=t.href,o=t.title?ju(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:r,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,e}return{type:"image",raw:r,href:i,title:o,text:ju(a)}}class Ru{options;rules;lexer;constructor(e){this.options=e||vu}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Mu(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Mu(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=Mu(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),r=this.lexer.state.top;this.lexer.state.top=!0;const n=this.lexer.blockTokens(e);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:n,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const o=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let a="",c="",l=!1;for(;e;){let r=!1;if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;a=t[0],e=e.substring(a.length);let n=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),s=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,c=n.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,c=n.slice(u),u+=t[1].length);let p=!1;if(!n&&/^ *$/.test(s)&&(a+=s+"\n",e=e.substring(s.length+1),r=!0),!r){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const l=e.split("\n",1)[0];if(s=l,this.options.pedantic&&(s=s.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(s))break;if(o.test(s))break;if(t.test(s))break;if(r.test(e))break;if(s.search(/[^ ]/)>=u||!s.trim())c+="\n"+s.slice(u);else{if(p)break;if(n.search(/[^ ]/)>=4)break;if(i.test(n))break;if(o.test(n))break;if(r.test(n))break;c+="\n"+s}p||s.trim()||(p=!0),a+=l+"\n",e=e.substring(l.length+1),n=s.slice(u)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(a)&&(l=!0));let f,d=null;this.options.gfm&&(d=/^\[[ xX]\] /.exec(c),d&&(f="[ ] "!==d[0],c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:a,task:!!d,checked:f,loose:!1,text:c,tokens:[]}),i.raw+=a}i.items[i.items.length-1].raw=a.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){const t=i.items[e].tokens.filter((e=>"space"===e.type)),r=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=r}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(t){if(!/[:|]/.test(t[2]))return;const e={type:"table",raw:t[0],header:Du(t[1]).map((e=>({text:e,tokens:[]}))),align:t[2].replace(/^\||\| *$/g,"").split("|"),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){let t,r,n,i,o=e.align.length;for(t=0;t<o;t++){const r=e.align[t];r&&(/^ *-+: *$/.test(r)?e.align[t]="right":/^ *:-+: *$/.test(r)?e.align[t]="center":/^ *:-+ *$/.test(r)?e.align[t]="left":e.align[t]=null)}for(o=e.rows.length,t=0;t<o;t++)e.rows[t]=Du(e.rows[t],e.header.length).map((e=>({text:e,tokens:[]})));for(o=e.header.length,r=0;r<o;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(o=e.rows.length,r=0;r<o;r++)for(i=e.rows[r],n=0;n<i.length;n++)i[n].tokens=this.lexer.inline(i[n].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:ju(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=Mu(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return-1}(t[2],"()");if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(e)?r.slice(1):r.slice(1,-1)),Nu(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return Nu(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!r.match(/[\p{L}\p{N}]/u))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let i,o,a=r,c=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(o=[...i].length,n[3]||n[4]){a+=o;continue}if((n[5]||n[6])&&r%3&&!((r+o)%3)){c+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+c);const t=[...n[0]][0].length,l=e.slice(0,r+n.index+t+o);if(Math.min(r,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const s=l.slice(2,-2);return{type:"strong",raw:l,text:s,tokens:this.lexer.inlineTokens(s)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return r&&n&&(e=e.substring(1,e.length-1)),e=ju(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=ju(t[1]),r="mailto:"+e):(e=ju(t[1]),r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=ju(t[0]),r="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0]}while(n!==t[0]);e=ju(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:ju(t[0]),{type:"text",raw:t[0],text:e}}}}const Bu={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Iu,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Bu.def=Tu(Bu.def).replace("label",Bu._label).replace("title",Bu._title).getRegex(),Bu.bullet=/(?:[*+-]|\d{1,9}[.)])/,Bu.listItemStart=Tu(/^( *)(bull) */).replace("bull",Bu.bullet).getRegex(),Bu.list=Tu(Bu.list).replace(/bull/g,Bu.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Bu.def.source+")").getRegex(),Bu._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Bu._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Bu.html=Tu(Bu.html,"i").replace("comment",Bu._comment).replace("tag",Bu._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Bu.lheading=Tu(Bu.lheading).replace(/bull/g,Bu.bullet).getRegex(),Bu.paragraph=Tu(Bu._paragraph).replace("hr",Bu.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bu._tag).getRegex(),Bu.blockquote=Tu(Bu.blockquote).replace("paragraph",Bu.paragraph).getRegex(),Bu.normal={...Bu},Bu.gfm={...Bu.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},Bu.gfm.table=Tu(Bu.gfm.table).replace("hr",Bu.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bu._tag).getRegex(),Bu.gfm.paragraph=Tu(Bu._paragraph).replace("hr",Bu.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bu.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bu._tag).getRegex(),Bu.pedantic={...Bu.normal,html:Tu("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Bu._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Iu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Tu(Bu.normal._paragraph).replace("hr",Bu.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Bu.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Lu={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Iu,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Iu,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/,_punctuation:"\\p{P}$+<=>`^|~"};Lu.punctuation=Tu(Lu.punctuation,"u").replace(/punctuation/g,Lu._punctuation).getRegex(),Lu.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Lu.anyPunctuation=/\\[punct]/g,Lu._escapes=/\\([punct])/g,Lu._comment=Tu(Bu._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Lu.emStrong.lDelim=Tu(Lu.emStrong.lDelim,"u").replace(/punct/g,Lu._punctuation).getRegex(),Lu.emStrong.rDelimAst=Tu(Lu.emStrong.rDelimAst,"gu").replace(/punct/g,Lu._punctuation).getRegex(),Lu.emStrong.rDelimUnd=Tu(Lu.emStrong.rDelimUnd,"gu").replace(/punct/g,Lu._punctuation).getRegex(),Lu.anyPunctuation=Tu(Lu.anyPunctuation,"gu").replace(/punct/g,Lu._punctuation).getRegex(),Lu._escapes=Tu(Lu._escapes,"gu").replace(/punct/g,Lu._punctuation).getRegex(),Lu._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Lu._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Lu.autolink=Tu(Lu.autolink).replace("scheme",Lu._scheme).replace("email",Lu._email).getRegex(),Lu._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Lu.tag=Tu(Lu.tag).replace("comment",Lu._comment).replace("attribute",Lu._attribute).getRegex(),Lu._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Lu._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Lu._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Lu.link=Tu(Lu.link).replace("label",Lu._label).replace("href",Lu._href).replace("title",Lu._title).getRegex(),Lu.reflink=Tu(Lu.reflink).replace("label",Lu._label).replace("ref",Bu._label).getRegex(),Lu.nolink=Tu(Lu.nolink).replace("ref",Bu._label).getRegex(),Lu.reflinkSearch=Tu(Lu.reflinkSearch,"g").replace("reflink",Lu.reflink).replace("nolink",Lu.nolink).getRegex(),Lu.normal={...Lu},Lu.pedantic={...Lu.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Tu(/^!?\[(label)\]\((.*?)\)/).replace("label",Lu._label).getRegex(),reflink:Tu(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Lu._label).getRegex()},Lu.gfm={...Lu.normal,escape:Tu(Lu.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Lu.gfm.url=Tu(Lu.gfm.url,"i").replace("email",Lu.gfm._extended_email).getRegex(),Lu.breaks={...Lu.gfm,br:Tu(Lu.br).replace("{2,}","*").getRegex(),text:Tu(Lu.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class _u{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||vu,this.options.tokenizer=this.options.tokenizer||new Ru,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Bu.normal,inline:Lu.normal};this.options.pedantic?(t.block=Bu.pedantic,t.inline=Lu.pedantic):this.options.gfm&&(t.block=Bu.gfm,this.options.breaks?t.inline=Lu.breaks:t.inline=Lu.gfm),this.tokenizer.rules=t}static get rules(){return{block:Bu,inline:Lu}}static lex(e,t){return new _u(t).lex(e)}static lexInline(e,t){return new _u(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let r,n,i,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,r)=>t+" ".repeat(r.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),o=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,n,i,o,a,c,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(c=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,c))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(c=r.raw.slice(-1)),a=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class zu{options;constructor(e){this.options=e||vu}code(e,t,r){const n=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="language-'+ju(n)+'">'+(r?e:ju(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:ju(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,r){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,r){const n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e,t,r){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,r){const n=Cu(e);if(null===n)return r;let i='<a href="'+(e=n)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+r+"</a>",i}image(e,t,r){const n=Cu(e);if(null===n)return r;let i=`<img src="${e=n}" alt="${r}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return e}}class $u{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class Fu{options;renderer;textRenderer;constructor(e){this.options=e||vu,this.options.renderer=this.options.renderer||new zu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new $u}static parse(e,t){return new Fu(t).parse(e)}static parseInline(e,t){return new Fu(t).parseInline(e)}parse(e,t=!0){let r="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){r+=t||"";continue}}switch(i.type){case"space":continue;case"hr":r+=this.renderer.hr();continue;case"heading":{const e=i;r+=this.renderer.heading(this.parseInline(e.tokens),e.depth,Eu(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=i;r+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=i;let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(n);let o="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];n="";for(let t=0;t<r.length;t++)n+=this.renderer.tablecell(this.parseInline(r[t].tokens),{header:!1,align:e.align[t]});o+=this.renderer.tablerow(n)}r+=this.renderer.table(t,o);continue}case"blockquote":{const e=i,t=this.parse(e.tokens);r+=this.renderer.blockquote(t);continue}case"list":{const e=i,t=e.ordered,n=e.start,o=e.loose;let a="";for(let t=0;t<e.items.length;t++){const r=e.items[t],n=r.checked,i=r.task;let c="";if(r.task){const e=this.renderer.checkbox(!!n);o?r.tokens.length>0&&"paragraph"===r.tokens[0].type?(r.tokens[0].text=e+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&"text"===r.tokens[0].tokens[0].type&&(r.tokens[0].tokens[0].text=e+" "+r.tokens[0].tokens[0].text)):r.tokens.unshift({type:"text",text:e+" "}):c+=e+" "}c+=this.parse(r.tokens,o),a+=this.renderer.listitem(c,i,!!n)}r+=this.renderer.list(a,t,n);continue}case"html":{const e=i;r+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;r+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let o=i,a=o.tokens?this.parseInline(o.tokens):o.text;for(;n+1<e.length&&"text"===e[n+1].type;)o=e[++n],a+="\n"+(o.tokens?this.parseInline(o.tokens):o.text);r+=t?this.renderer.paragraph(a):a;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}parseInline(e,t){t=t||this.renderer;let r="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=e||"";continue}}switch(i.type){case"escape":{const e=i;r+=t.text(e.text);break}case"html":{const e=i;r+=t.html(e.text);break}case"link":{const e=i;r+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=i;r+=t.image(e.href,e.title,e.text);break}case"strong":{const e=i;r+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=i;r+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=i;r+=t.codespan(e.text);break}case"br":r+=t.br();break;case"del":{const e=i;r+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=i;r+=t.text(e.text);break}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}}class qu{options;constructor(e){this.options=e||vu}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}const Wu=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(_u.lex,Fu.parse);parseInline=this.#e(_u.lexInline,Fu.parseInline);Parser=Fu;Renderer=zu;TextRenderer=$u;Lexer=_u;Tokenizer=Ru;Hooks=qu;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{const e=n;for(const n of e.header)r=r.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)r=r.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=n;r=r.concat(this.walkTokens(e.items,t));break}default:{const e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((n=>{r=r.concat(this.walkTokens(e[n],t))})):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new zu(this.defaults);for(const r in e.renderer){const n=e.renderer[r],i=r,o=t[i];t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Ru(this.defaults);for(const r in e.tokenizer){const n=e.tokenizer[r],i=r,o=t[i];t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new qu;for(const r in e.hooks){const n=e.hooks[r],i=r,o=t[i];qu.passThroughHooks.has(r)?t[i]=e=>{if(this.defaults.async)return Promise.resolve(n.call(t,e)).then((e=>o.call(t,e)));const r=n.call(t,e);return o.call(t,r)}:t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _u.lex(e,t??this.defaults)}parser(e,t){return Fu.parse(e,t??this.defaults)}#e(e,t){return(r,n)=>{const i={...n},o={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const a=this.#t(!!o.silent,!!o.async);if(null==r)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then((t=>e(t,o))).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));const n=e(r,o);o.walkTokens&&this.walkTokens(n,o.walkTokens);let i=t(n,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(e){return a(e)}}}#t(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+ju(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function Uu(e,t){return Wu.parse(e,t)}function Gu(e){var t=e.replace(/^[\u200B-\u200F\uFEFF]/,""),r=Uu.parse(t);return yu.sanitize(r)}Uu.options=Uu.setOptions=function(e){return Wu.setOptions(e),Uu.defaults=Wu.defaults,gu(Uu.defaults),Uu},Uu.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Uu.defaults=vu,Uu.use=function(...e){return Wu.use(...e),Uu.defaults=Wu.defaults,gu(Uu.defaults),Uu},Uu.walkTokens=function(e,t){return Wu.walkTokens(e,t)},Uu.parseInline=Wu.parseInline,Uu.Parser=Fu,Uu.parser=Fu.parse,Uu.Renderer=zu,Uu.TextRenderer=$u,Uu.Lexer=_u,Uu.lexer=_u.lex,Uu.Tokenizer=Ru,Uu.Hooks=qu,Uu.parse=Uu,Uu.options,Uu.setOptions,Uu.use,Uu.walkTokens,Uu.parseInline,Fu.parse,_u.lex;const Hu=function(t){var r=(0,f.useState)(Gu(t.text)),n=r[0],i=r[1];return(0,f.useEffect)((function(){if(t.updatedData&&t.updatedData.length>0){var e=t.updatedData[t.updatedData.length-1].text;i(Gu(e))}}),[t.text,t.updatedData]),(0,e.jsx)(T(),{variant:"body2",dangerouslySetInnerHTML:{__html:n}})},Xu=function(t){var r=(0,f.useState)(Gu(t.text)),n=r[0],i=r[1],o=(0,f.useState)(""),a=o[0],c=o[1];return(0,f.useEffect)((function(){if(t.updatedData&&t.updatedData.length>0){for(var e=t.text,r=0,n=t.updatedData;r<n.length;r++){var o=n[r];"string"!=typeof o.text?(e+=" [MISSING TEXT]",c("Some of the incoming text was not correctly formatted. Some data may be missing.")):e+=o.text}i(Gu(e))}}),[t.text,t.updatedData]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(T(),{variant:"body2",dangerouslySetInnerHTML:{__html:n}}),a&&(0,e.jsx)(ss(),{severity:"error",children:a})]})},Vu=require("@mui/material"),Ku=require("@mui/icons-material/KeyboardArrowDown");var Yu=r.n(Ku);const Zu=require("@mui/icons-material/KeyboardArrowUp");var Qu=r.n(Zu);const Ju=require("@mui/material/Button");var ep=r.n(Ju);const tp=require("@mui/material/LinearProgress");var rp=r.n(tp);const np=require("@mui/material/Slider");var ip=r.n(np);const op=require("@mui/material/Tooltip");var ap=r.n(op);const cp=require("@mui/material/Icon");var lp=r.n(cp);function sp(t){var r,n={play:{symbol:"play_circle",label:"play"},pause:{symbol:"pause_circle",label:"pause"},forward:{symbol:"forward_10",label:"forward ten seconds"},replay:{symbol:"replay_10",label:"replay ten seconds"},volumeUp:{symbol:"volume_up",label:"mute"},volumeOff:{symbol:"volume_off",label:"unmute"},pictureInPicture:{symbol:"picture_in_picture",label:"picture in picture"},pictureInPictureExit:{symbol:"picture_in_picture_off",label:"exit picture in picture"},fullscreen:{symbol:"fullscreen",label:"fullscreen"},fullscreenExit:{symbol:"fullscreen_exit",label:"exit fullscreen"},captionsOn:{symbol:"closed_caption",label:"show captions"},captionsOff:{symbol:"closed_caption_disabled",label:"hide captions"}};return n[t.action].label.replaceAll(" ","-"),(0,e.jsx)(ap(),{title:n[t.action].label,PopperProps:{container:null!==(r=document.fullscreenElement)&&void 0!==r?r:document.body},children:(0,e.jsx)(k(),{onClick:t.onClick,className:t.className,children:(0,e.jsx)(lp(),{color:"primary",children:(0,e.jsx)("span",{className:"material-symbols-rounded",children:n[t.action].symbol})})})})}var up=100;function pp(t){var r=Fl(t.mediaElement.currentTime);return(0,e.jsxs)(l(),{className:"rustic-progress",children:[function(){for(var r=t.mediaElement.buffered,n=0,i=r.length-1;i>=0;--i){var o=r.start(i),a=r.end(i);if(o<t.mediaElement.currentTime){n=a;break}}var c=n/t.mediaElement.duration*up;return(0,e.jsx)(rp(),{className:"rustic-progress-buffered",variant:"determinate",value:c})}(),(0,e.jsx)(ip(),{className:"rustic-progress-slider",size:"small","aria-label":"Time","aria-valuetext":"Current time: ".concat(r),max:t.mediaElement.duration,value:t.mediaElement.currentTime,onChange:function(e,r){t.mediaElement.currentTime=r},valueLabelDisplay:"auto",valueLabelFormat:function(e){return Fl(e)},color:"secondary"})]})}function fp(t){var r=(0,f.useState)(t.mediaElement.volume),n=r[0],i=r[1],o=(0,f.useState)(t.mediaElement.volume),a=o[0],c=o[1],s=t.mediaElement.muted?"volumeOff":"volumeUp";return(0,e.jsxs)(l(),{className:"rustic-volume-settings",children:[(0,e.jsx)(sp,{onClick:function(){t.mediaElement.muted=!t.mediaElement.muted,t.mediaElement.muted?(c(t.mediaElement.volume),i(0)):i(a)},className:"rustic-mute-button",action:s}),(0,e.jsx)(ip(),{className:"rustic-volume-slider",size:"small",max:1,step:.1,"aria-label":"Volume","aria-valuetext":"Volume: ".concat(n*up,"%"),value:n,onChange:function(e,r){var n=r;t.mediaElement.muted=0===n,t.mediaElement.volume=n,i(t.mediaElement.volume)}})]})}function dp(t){var r=t.isTranscriptVisible?Qu():Yu(),n="".concat(t.isTranscriptVisible?"Hide":"Show"," Transcript");return(0,e.jsx)(ep(),{className:"rustic-transcript-toggle",onClick:t.setIsTranscriptVisible,endIcon:(0,e.jsx)(r,{}),children:(0,e.jsx)(T(),{variant:"overline",children:n})})}function hp(t){var r=(0,f.useState)(!t.mediaElement.paused),n=r[0],i=r[1],o=n?"pause":"play";return t.mediaElement.onended=function(){i(!1)},t.mediaElement.onpause=function(){i(!1)},t.mediaElement.onplay=function(){i(!0)},(0,e.jsx)(sp,{onClick:function(){n?t.mediaElement.pause():t.mediaElement.play().catch((function(e){t.onError("Failed to play the media. Error: ".concat(e.message))}))},action:o,className:"rustic-pause-play-icon"})}function mp(t){var r,n=(0,f.useState)(t.mediaElement.playbackRate),i=n[0],o=n[1];return(0,e.jsx)(ap(),{title:"playback rate",PopperProps:{container:null!==(r=document.fullscreenElement)&&void 0!==r?r:document.body},children:(0,e.jsx)(ep(),{onClick:function(){var e=1;t.mediaElement.playbackRate<2&&(e=t.mediaElement.playbackRate+.5),t.mediaElement.playbackRate=e,o(e)},className:"rustic-playback-rate-button",children:(0,e.jsxs)(T(),{variant:"body1",children:[i,"X"]})})})}function yp(t){var r="replay"===t.movement,n=r?function(){t.mediaElement.currentTime-=10}:function(){t.mediaElement.currentTime+=10},i=r?"replay":"forward";return(0,e.jsx)(sp,{onClick:n,action:i})}function vp(t){var r=Fl(t.elapsedTimeInSeconds),n=Fl(t.durationTimeInSeconds),i="".concat(r," / ").concat(n);return"wide"===t.style?(0,e.jsxs)(l(),{className:"rustic-time-container",children:[(0,e.jsx)(T(),{variant:"overline",children:r}),(0,e.jsx)(T(),{variant:"overline",children:n})]}):(0,e.jsx)(T(),{variant:"overline",className:"rustic-time-display",children:i})}vp.defaultProps={style:"condensed"};const gp=require("@mui/material/Divider");var bp=r.n(gp);function xp(t){var r=!!document.fullscreenElement;return(0,e.jsxs)(Ql.Box,{className:"rustic-transcript-container",children:[!r&&(0,e.jsxs)(Ql.Box,{className:"rustic-transcript-header",children:[(0,e.jsx)(bp(),{orientation:"vertical",flexItem:!0}),(0,e.jsx)(T(),{variant:"overline",color:"text.secondary",children:"Transcript"})]}),(0,e.jsx)(T(),{className:"rustic-transcript-content",variant:"body2",children:t.transcript})]})}function wp(t){var r=(0,f.useState)(!1),n=r[0],i=r[1],o=(0,f.useState)(!1),a=o[0],c=o[1],l=(0,f.useState)(!0),s=l[0],u=l[1],p=(0,f.useState)(0),d=p[0],h=p[1],m=(0,f.useState)(""),y=m[0],v=m[1],g=(0,f.useState)(""),b=g[0],x=g[1],w=(0,Vu.useTheme)(),O=(0,f.useRef)(null),k=(0,Vu.useMediaQuery)(w.breakpoints.down("md"));function S(){return(0,e.jsx)(T(),{variant:"h6",className:"rustic-sound-title",children:t.title})}function j(){if(t.captions&&t.captions.length>0){var r=a?"captionsOff":"captionsOn";return(0,e.jsx)(sp,{action:r,onClick:function(){return c(!a)}})}}function A(){if(O.current)return(0,e.jsxs)(Ql.Box,{className:"rustic-time-controls",children:[(0,e.jsx)(yp,{mediaElement:O.current,movement:"replay"}),(0,e.jsx)(hp,{mediaElement:O.current,onError:x}),(0,e.jsx)(yp,{mediaElement:O.current,movement:"forward"})]})}function E(){if(t.transcript&&n)return(0,e.jsx)(xp,{transcript:t.transcript})}function P(){if(t.transcript)return(0,e.jsx)(dp,{isTranscriptVisible:n,setIsTranscriptVisible:function(){return i(!n)}})}function C(){return(0,e.jsx)("video",{src:t.src,ref:O,className:a?"rustic-has-captions":"",children:a&&(0,e.jsx)("track",{src:t.captions,kind:"captions",default:!0})})}(0,f.useEffect)((function(){var e,t,r,n;function i(e){v(e)}null===(e=O.current)||void 0===e||e.addEventListener("timeupdate",(function(){O.current&&h(O.current.currentTime)})),null===(t=O.current)||void 0===t||t.addEventListener("canplay",(function(){v(""),u(!1)})),null===(r=O.current)||void 0===r||r.addEventListener("error",(function(){return i("Failed to load the audio.")})),null===(n=O.current)||void 0===n||n.addEventListener("stalled",(function(){return i("Failed to fetch audio data, but trying.")}))}),[]);var I=k?function(){if(O.current)return(0,e.jsxs)(Ql.Box,{className:"rustic-sound-controls",children:[(0,e.jsx)(vp,{elapsedTimeInSeconds:d,durationTimeInSeconds:O.current.duration,style:"wide"}),(0,e.jsx)(pp,{mediaElement:O.current}),S(),(0,e.jsxs)(Ql.Box,{className:"rustic-sound-bottom-controls",children:[(0,e.jsx)(Ql.Box,{className:"rustic-sound-bottom-controls-left",children:A()}),(0,e.jsx)(fp,{mediaElement:O.current}),(0,e.jsxs)(Ql.Box,{className:"rustic-sound-bottom-controls-right",children:[P(),(0,e.jsxs)(Ql.Box,{children:[j(),(0,e.jsx)(mp,{mediaElement:O.current})]})]})]}),E()]})}:function(){if(O.current)return(0,e.jsxs)(e.Fragment,{children:[S(),(0,e.jsxs)(Ql.Box,{className:"rustic-sound-controls",children:[(0,e.jsx)(pp,{mediaElement:O.current}),(0,e.jsxs)(Ql.Box,{className:"rustic-sound-bottom-controls",children:[(0,e.jsxs)(Ql.Box,{className:"rustic-sound-bottom-controls-left",children:[A(),j(),(0,e.jsx)(mp,{mediaElement:O.current}),(0,e.jsx)(fp,{mediaElement:O.current}),(0,e.jsx)(vp,{elapsedTimeInSeconds:d,durationTimeInSeconds:O.current.duration,style:"condensed"})]}),(0,e.jsx)(Ql.Box,{className:"rustic-sound-bottom-controls-right",children:P()})]}),E()]})]})};return y.length>0?(0,e.jsx)(ss(),{severity:"error",children:y}):s?(0,e.jsxs)(Ql.Box,{className:"rustic-sound",children:[C(),(0,e.jsx)(ns(),{})]}):(0,e.jsxs)(Ql.Box,{className:"rustic-sound",children:[C(),I(),b.length>0&&(0,e.jsx)(ss(),{severity:"error",className:"rustic-control-error",onClose:function(){return x("")},children:b})]})}function Op(t){var r=(0,f.useState)(!!document.pictureInPictureElement),n=r[0],i=r[1],o=t.mediaElement,a=n?"pictureInPictureExit":"pictureInPicture";return o.onleavepictureinpicture=function(){i(!1)},(0,e.jsx)(sp,{onClick:function(){n?document.exitPictureInPicture().then((function(){i(!1)})).catch((function(e){t.onError("Failed to exit picture-in-picture mode. Error: ".concat(e.message))})):o.requestPictureInPicture().then((function(){i(!0)})).catch((function(e){t.onError("Failed to enter picture-in-picture mode. Error: ".concat(e.message))}))},action:a})}function kp(t){var r=(0,f.useState)(!!document.fullscreenElement),n=r[0],i=r[1],o=t.element,a=n?"fullscreenExit":"fullscreen";return o.onfullscreenchange=function(){i(!!document.fullscreenElement)},(0,e.jsx)(sp,{onClick:function(){n?document.exitFullscreen().then((function(){i(!1)})).catch((function(e){t.onError("Failed to exit fullscreen mode. Error: ".concat(e.message))})):o.requestFullscreen().then((function(){i(!0)})).catch((function(e){t.onError("Failed to enter fullscreen mode. Error: ".concat(e.message))}))},action:a})}function Sp(t){var r=(0,f.useState)(!1),n=r[0],i=r[1],o=(0,f.useState)(!1),a=o[0],c=o[1],l=(0,f.useState)(!0),s=l[0],u=l[1],p=(0,f.useState)(!!document.fullscreenElement),d=p[0],h=p[1],m=(0,f.useState)(!1),y=m[0],v=m[1],g=(0,f.useState)(""),b=g[0],x=g[1],w=(0,f.useState)(""),O=w[0],k=w[1],S=(0,f.useState)(0),j=S[0],A=S[1],E=(0,f.useRef)(null),P=(0,f.useRef)(null),C=(0,Vu.useTheme)(),I=(0,Vu.useMediaQuery)(C.breakpoints.down("md"));(0,f.useEffect)((function(){var e,t,r,n,i,o,a,c;function l(e){k(e),u(!1)}function s(){clearTimeout(c),c=setTimeout((function(){return v(!1)}),3e3)}null===(e=P.current)||void 0===e||e.addEventListener("timeupdate",(function(){P.current&&A(P.current.currentTime)})),null===(t=P.current)||void 0===t||t.addEventListener("canplay",(function(){k(""),u(!1)})),null===(r=P.current)||void 0===r||r.addEventListener("error",(function(){return l("Failed to load the video.")})),null===(n=P.current)||void 0===n||n.addEventListener("stalled",(function(){return l("Failed to fetch video data, but trying.")})),document.addEventListener("fullscreenchange",(function(){h(!!document.fullscreenElement)})),null===(i=E.current)||void 0===i||i.addEventListener("mousemove",(function(){v(!0),s()})),null===(o=E.current)||void 0===o||o.addEventListener("mouseleave",(function(){v(!1)})),null===(a=E.current)||void 0===a||a.addEventListener("keydown",(function(){v(!0),s()}))}),[]);var D={backgroundColor:C.palette.background.paper,opacity:y?1:0};function M(){if(t.transcript&&n)return(0,e.jsx)(xp,{transcript:t.transcript})}function N(){if(t.captions&&t.captions.length>0){var r=a?"captionsOff":"captionsOn";return(0,e.jsx)(sp,{action:r,onClick:function(){return c(!a)}})}}function R(){if(t.transcript)return(0,e.jsx)(dp,{isTranscriptVisible:n,setIsTranscriptVisible:function(){return i(!n)}})}var B=I?function(){return d?(0,e.jsx)(e.Fragment,{children:P.current&&E.current&&(0,e.jsxs)(Ql.Box,{className:"rustic-video-controls",sx:D,children:[(0,e.jsxs)(Ql.Box,{className:"rustic-video-top-controls",children:[(0,e.jsx)(hp,{mediaElement:P.current,onError:x}),(0,e.jsx)(pp,{mediaElement:P.current}),(0,e.jsx)(vp,{elapsedTimeInSeconds:j,durationTimeInSeconds:P.current.duration})]}),(0,e.jsxs)(Ql.Box,{className:"rustic-video-bottom-controls",children:[(0,e.jsxs)(Ql.Box,{className:"rustic-time-controls",children:[(0,e.jsx)(yp,{mediaElement:P.current,movement:"replay"}),(0,e.jsx)(yp,{mediaElement:P.current,movement:"forward"}),N(),(0,e.jsx)(mp,{mediaElement:P.current})]}),R()]}),M()]})}):(0,e.jsx)(e.Fragment,{children:P.current&&E.current&&(0,e.jsxs)(Ql.Box,{className:"rustic-video-controls-mobile-preview",children:[(0,e.jsx)(hp,{mediaElement:P.current,onError:x}),(0,e.jsxs)(Ql.Box,{className:"rustic-video-controls-right",children:[R(),(0,e.jsx)(kp,{element:E.current,onError:x})]})]})})}:function(){return(0,e.jsx)(e.Fragment,{children:P.current&&E.current&&(0,e.jsxs)(Ql.Box,{className:"rustic-video-controls",sx:D,children:[(0,e.jsx)(pp,{mediaElement:P.current}),(0,e.jsxs)(Ql.Box,{className:"rustic-video-bottom-controls",children:[(0,e.jsxs)(Ql.Box,{className:"rustic-video-bottom-controls-left",children:[(0,e.jsx)(hp,{mediaElement:P.current,onError:x}),(0,e.jsx)(yp,{mediaElement:P.current,movement:"replay"}),(0,e.jsx)(yp,{mediaElement:P.current,movement:"forward"}),N(),(0,e.jsx)(mp,{mediaElement:P.current}),(0,e.jsx)(fp,{mediaElement:P.current}),(0,e.jsx)(vp,{elapsedTimeInSeconds:j,durationTimeInSeconds:P.current.duration,style:"condensed"})]}),(0,e.jsxs)(Ql.Box,{className:"rustic-video-bottom-controls-right",children:[R(),(0,e.jsx)(Op,{mediaElement:P.current,onError:x}),(0,e.jsx)(kp,{element:E.current,onError:x})]})]}),d&&M()]})})};return O.length>0?(0,e.jsx)(ss(),{severity:"error",children:O}):(0,e.jsxs)(Ql.Box,{className:"rustic-video",children:[s&&(0,e.jsx)(ns(),{className:"rustic-video-loading-spinner"}),(0,e.jsxs)(Ql.Box,{ref:E,className:"rustic-video-screen",sx:{visibility:s?"hidden":"visible"},children:[b.length>0&&(0,e.jsx)(ss(),{severity:"error",className:"rustic-control-error",onClose:function(){return x("")},children:b}),(!I||d)&&function(){if(P.current&&E.current)return(0,e.jsxs)(Ql.Box,{className:"rustic-video-title",sx:D,children:[(0,e.jsx)(T(),{variant:"body2",children:t.title}),d&&I&&(0,e.jsxs)(Ql.Box,{children:[(0,e.jsx)(Op,{mediaElement:P.current,onError:x}),(0,e.jsx)(kp,{element:E.current,onError:x})]})]})}(),(0,e.jsx)("video",{className:"rustic-video-element",ref:P,src:t.src,poster:t.poster,children:a&&(0,e.jsx)("track",{src:t.captions,kind:"captions",default:!0})}),B()]}),!d&&M()]})}const jp=require("@mui/material/Drawer");var Ap=r.n(jp);const Ep=require("@mui/material/ListItemText");var Pp=r.n(Ep),Tp=function(){return Tp=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Tp.apply(this,arguments)};function Cp(t){var r=(0,f.useState)(!1),n=r[0],i=r[1],o=(0,f.useRef)(null),a=(0,s.useTheme)(),c=(0,Vu.useMediaQuery)(a.breakpoints.down("md")),l=c?Ap():j(),u={borderRadius:"".concat(a.shape.borderRadius,"px"),border:"1px solid ".concat(a.palette.divider)};c&&(u=Tp(Tp({},u),{borderRadius:"".concat(a.shape.borderRadius,"px ").concat(a.shape.borderRadius,"px 0 0"),borderBottom:0}));var p,d=t.menuItems.map((function(t){return(0,e.jsxs)(E(),{onClick:function(e){t.onClick(e),i(!1)},children:[t.startDecorator&&(0,e.jsx)(Ql.Box,{sx:{color:"primary.main"},className:"rustic-popover-menu-item-icon rustic-popover-menu-item-start-icon",children:t.startDecorator}),(0,e.jsx)(Pp(),{children:(0,e.jsx)(T(),{variant:"body2",children:t.label})}),t.endDecorator&&(0,e.jsx)(Ql.Box,{sx:{color:"secondary.main"},className:"rustic-popover-menu-item-icon",children:t.endDecorator})]},t.label)}));return(0,e.jsxs)(e.Fragment,{children:[(p={onClick:function(e){e.stopPropagation(),i(!0)},"aria-label":t.ariaLabel,ref:o,className:"rustic-popover-menu-button"},t.buttonText?(0,e.jsx)(ep(),Tp({},p,{startIcon:t.icon?t.icon:null,children:t.buttonText})):(0,e.jsx)(k(),Tp({},p,{children:t.icon?t.icon:(0,e.jsx)(b(),{})}))),(0,e.jsx)(l,{open:n,onClose:function(){return i(!1)},anchorEl:o.current,anchor:"bottom",className:"rustic-popover-menu",sx:{"& .MuiPaper-root":Tp(Tp({},u),{backgroundImage:"none",boxShadow:a.shadows[2]})},children:d})]})}const Ip=require("@mui/material/Card");var Dp=r.n(Ip);const Mp=function(t){return(0,e.jsx)(T(),{variant:"caption",color:"textSecondary",children:(r=t.timestamp,Ll(r)<86400?function(e){var t=Ll(e);if(t<60)return"".concat(Rl()("second",t,!0)," ago");if(t<3600){var r=Math.floor(t/60);return"".concat(Rl()("minute",r,!0)," ago")}var n=Math.floor(t/3600);return"".concat(Rl()("hour",n,!0)," ago")}(r):(n=r,i=new Date(n),o=navigator.language,a={month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0},Ll(n)/86400>365&&(a.year="numeric"),i.toLocaleTimeString(o,a).replace(/,/g,"")))});var r,n,i,o,a};function Np(t){var r;return(0,e.jsxs)(I(),{id:t.message.id,className:"rustic-message-canvas",children:[(0,e.jsxs)(I(),{className:"rustic-sender-info",children:[t.getProfileComponent&&t.getProfileComponent(t.message),(0,e.jsxs)(T(),{variant:"body2",color:"text.secondary",children:[t.message.sender,":"]})]}),(0,e.jsx)(Dp(),{variant:"outlined",className:"rustic-message-actions-container",children:t.children}),(0,e.jsxs)(I(),{className:"rustic-message-footer",children:[t.getActionsComponent&&(0,e.jsx)(Dp(),{variant:"outlined",children:t.getActionsComponent(t.message)}),(0,e.jsxs)(I(),{className:"rustic-timestamp",children:[t.message.lastThreadMessage&&(0,e.jsx)(T(),{variant:"caption",children:"last updated: "}),(0,e.jsx)(Mp,{timestamp:(null===(r=t.message.lastThreadMessage)||void 0===r?void 0:r.timestamp)||t.message.timestamp})]})]})]})}const Rp=function(t){return(0,e.jsx)(I(),{className:"rustic-message-space",children:t.messages&&t.messages.length>0&&t.messages.map((function(r){return(0,e.jsx)(Np,{message:r,getActionsComponent:t.getActionsComponent,getProfileComponent:t.getProfileComponent,children:(0,e.jsx)(ts,{message:r,supportedElements:t.supportedElements})},r.id)}))})},Bp=require("@mui/material/AppBar");var Lp=r.n(Bp);const _p=require("@mui/material/Toolbar");var zp=r.n(_p);const $p=function(t){var r=(0,s.useTheme)();return(0,e.jsx)(Lp(),{position:"fixed",color:"inherit",sx:{borderBottom:"1px solid ".concat(r.palette.divider)},children:(0,e.jsxs)(zp(),{className:"rustic-nav-bar",children:[t.leftDrawerIcon&&(0,e.jsx)(k(),{color:"inherit","aria-label":t.leftDrawerAriaLabel,edge:"start",onClick:t.handleLeftDrawerToggle,className:"rustic-nav-bar-button",children:t.leftDrawerIcon}),t.logo,t.rightDrawerIcon&&(0,e.jsx)(k(),{color:"inherit","aria-label":t.rightDrawerAriaLabel,edge:"end",onClick:t.handleRightDrawerToggle,className:"rustic-nav-bar-button",children:t.rightDrawerIcon})]})})},Fp=require("@mui/icons-material/AccountCircle");var qp=r.n(Fp);const Wp=require("@mui/icons-material/SmartToy");var Up=r.n(Wp);const Gp=require("@mui/material/Dialog");var Hp=r.n(Gp);const Xp=require("@mui/material/DialogTitle");var Vp=r.n(Xp);const Kp=require("@mui/material/List");var Yp=r.n(Kp);const Zp=require("@mui/material/ListItem");var Qp=r.n(Zp);const Jp=require("@mui/material/ListSubheader");var ef,tf,rf=r.n(Jp);!function(e){e.Owner="owner",e.Member="member"}(ef||(ef={})),function(e){e.Human="human",e.Agent="agent"}(tf||(tf={}));var nf=function(t){var r=(0,f.useState)(!1),n=r[0],i=r[1],o=t.participants.length,a=n?t.participants:t.participants.slice(0,3),c="".concat(Rl()(t.participantType,o)," (").concat(o,")"),l=n?"Show Less":"Show All ".concat(o);return 0===o?(0,e.jsx)(T(),{variant:"caption",className:"rustic-participant-list-no-participants-message",children:"There are currently no participants."}):(0,e.jsx)(Yp(),{className:"rustic-participant-list",subheader:(0,e.jsxs)(rf(),{disableSticky:!0,className:"rustic-participant-list-subheader",children:[(0,e.jsxs)(Ql.Box,{className:"rustic-participant-list-subheader-title",children:[t.participantTypeIcon,(0,e.jsx)(T(),{variant:"subtitle2",color:"text.secondary",children:c})]}),o>3&&(0,e.jsx)(ep(),{onClick:function(){return i(!n)},color:"primary",size:"small",startIcon:(0,e.jsx)(Yu(),{}),children:l})]}),children:a.map((function(t){return(0,e.jsxs)(Qp(),{className:"rustic-participant-list-item",children:[(0,e.jsx)(T(),{variant:"subtitle2",children:t.displayName}),(0,e.jsx)(T(),{variant:t.participantRole===ef.Owner?"subtitle2":"caption",children:zl(t.participantRole)})]},t.id)}))})};const of=function(t){function r(e,t){return function(e){return function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],e,!0).sort((function(e,t){return t.participantRole===ef.Owner?1:-1}))}(e.filter((function(e){return e.participantType===t})))}var n=r(t.participants,tf.Human),i=r(t.participants,tf.Agent),o="".concat(Rl()("Participant",t.participants.length)," (").concat(t.participants.length,")");return(0,e.jsxs)(Hp(),{open:t.isParticipantListOpen,onClose:t.onClose,className:"rustic-participants-container",maxWidth:"sm",fullWidth:!0,children:[(0,e.jsx)(Vp(),{sx:{borderBottom:"1px solid",borderColor:"divider"},component:"h6",className:"rustic-participants-container-title",children:o}),(0,e.jsx)(nf,{participantType:"Human",participantTypeIcon:(0,e.jsx)(qp(),{}),participants:n}),i.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(bp(),{className:"rustic-participants-container-divider"}),(0,e.jsx)(nf,{participantType:"Agent",participantTypeIcon:(0,e.jsx)(Up(),{}),participants:i})]})]})},af=require("@mui/material/Table");var cf=r.n(af);const lf=require("@mui/material/TableBody");var sf=r.n(lf);const uf=require("@mui/material/TableCell");var pf=r.n(uf);const ff=require("@mui/material/TableContainer");var df=r.n(ff);const hf=require("@mui/material/TableHead");var mf=r.n(hf);const yf=require("@mui/material/TableRow");var vf=r.n(yf);function gf(t){if(0===t.data.length)return(0,e.jsx)(T(),{variant:"body2",children:"No data available"});var r=Array.from(new Set(t.data.flatMap((function(e){return Object.keys(e)})))),n=t.headers||r.map((function(e){return{dataKey:e}}));return(0,e.jsxs)(l(),{className:"rustic-table",children:[t.title&&(0,e.jsx)(T(),{variant:"body1",className:"rustic-table-title",children:t.title}),t.description&&(0,e.jsx)(T(),{variant:"subtitle2",children:t.description}),(0,e.jsx)(df(),{children:(0,e.jsxs)(cf(),{"aria-label":t.title||"a table of data",size:"small",children:[n.length>0&&(0,e.jsx)(mf(),{children:(0,e.jsx)(vf(),{children:n.map((function(t,r){return(0,e.jsx)(pf(),{children:t.label||zl(t.dataKey)},"header-".concat(r))}))})}),(0,e.jsx)(sf(),{children:t.data.map((function(t,r){return(0,e.jsx)(vf(),{children:n.map((function(n,i){return(0,e.jsx)(pf(),{children:t[n.dataKey]},"cell-".concat(r,"-").concat(i))}))},"row-".concat(r))}))})]})})]})}const bf=function(t){var r=(0,f.useState)(yu.sanitize(t.text)),n=r[0],i=r[1],o=(0,f.useState)(""),a=o[0],c=o[1];return(0,f.useEffect)((function(){if(t.updatedData&&t.updatedData.length>0){for(var e=t.text,r=0,n=t.updatedData;r<n.length;r++){var o=n[r];"string"!=typeof o.text&&(e+=" [MISSING TEXT]",c("Some of the incoming text was not correctly formatted. Some data may be missing.")),e+=o.text}i(yu.sanitize(e))}}),[t.text,t.updatedData]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(T(),{variant:"body2",children:n}),a&&(0,e.jsx)(ss(),{severity:"error",children:a})]})},xf=function(t){return(0,e.jsx)(T(),{variant:"body2",className:"rustic-text",children:yu.sanitize(t.text)})},wf=require("@mui/material/InputAdornment");var Of=r.n(wf);const kf=require("@mui/material/TextField");var Sf=r.n(kf);const jf=require("crypto");var Af=r.n(jf);const Ef={randomUUID:Af().randomUUID},Pf=new Uint8Array(256);let Tf=Pf.length;function Cf(){return Tf>Pf.length-16&&(Af().randomFillSync(Pf),Tf=0),Pf.slice(Tf,Tf+=16)}const If=[];for(let e=0;e<256;++e)If.push((e+256).toString(16).slice(1));const Df=function(e,t,r){if(Ef.randomUUID&&!t&&!e)return Ef.randomUUID();const n=(e=e||{}).random||(e.rng||Cf)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return If[e[t+0]]+If[e[t+1]]+If[e[t+2]]+If[e[t+3]]+"-"+If[e[t+4]]+If[e[t+5]]+"-"+If[e[t+6]]+If[e[t+7]]+"-"+If[e[t+8]]+If[e[t+9]]+"-"+If[e[t+10]]+If[e[t+11]]+If[e[t+12]]+If[e[t+13]]+If[e[t+14]]+If[e[t+15]]}(n)};function Mf(t){var r=(0,f.useState)(""),n=r[0],i=r[1],o=(0,f.useState)(""),a=o[0],c=o[1],s=(0,f.useState)(!1),u=s[0],p=s[1],d=(0,f.useState)(!1),h=d[0],m=d[1],y=(0,f.useState)(!1),v=y[0],g=y[1],b=(0,f.useRef)(null),x=!n.trim().length,w="".concat(u?"Stop":"Start"," speech to text"),O=u?"error.main":h?"primary.main":"primary.light",S=u?"stop_circle":"speech_to_text",j={"no-speech":"No speech detected. Check your microphone volume and try again.",aborted:"Speech input was aborted. Ensure no other windows are accessing your microphone and try again.","audio-capture":"Could not capture any audio. Check that your microphone is connected and try again.",network:"Failed to connect to the internet for recognition. Check your internet connection and try again.","not-allowed":"This functionality requires microphone access. Please allow microphone access and try again.","service-not-allowed":"Speech recognition service is not allowed, either because the browser doesn't support it or because of reasons of security, privacy or user preference.","bad-grammar":"There was an error in the speech recognition grammar or format. Check your speech input or grammar rules.","language-not-supported":"The language you're speaking isn't supported. Try speaking in a different language or check your device settings."},A={endAdornment:(0,e.jsx)(Of(),{position:"end",children:v?(0,e.jsx)(ns(),{size:24}):(0,e.jsx)(ap(),{title:w,children:(0,e.jsx)(k(),{onClick:function(){var e=new window.webkitSpeechRecognition,t=navigator.language;e.lang=t,u?(e.stop(),g(!0),p(!1)):(e.start(),c(""),p(!0)),e.onstart=function(){p(!0)},e.onresult=function(e){var t,r=e.results[0][0].transcript;n.length>0?i(n+" "+r):i(r),null===(t=b.current)||void 0===t||t.focus(),p(!1)},e.onerror=function(e){var t=j[e.error];c(t),p(!1)},e.onend=function(){g(!1),p(!1)}},size:"small",sx:{color:O},children:(0,e.jsx)("span",{className:"material-symbols-rounded",children:S})})})})};function E(){if(!x){var e=(new Date).toISOString(),r={id:Df(),timestamp:e,sender:t.sender,conversationId:t.conversationId,format:"text",data:{text:n}};t.ws.send(r),i("")}}return(0,e.jsxs)(l(),{className:"rustic-text-input-container",children:[(0,e.jsxs)(l(),{className:"rustic-text-input-and-error-container",children:[a.length>0&&(0,e.jsx)(T(),{variant:"caption",color:"error",className:"rustic-error-message",children:a}),(0,e.jsx)(Sf(),{className:"rustic-text-input",variant:"outlined",value:n,label:t.label,placeholder:t.placeholder,maxRows:t.maxRows,multiline:t.multiline,fullWidth:t.fullWidth,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),E())},onChange:function(e){c(""),i(e.target.value)},onFocus:function(){return m(!0)},onBlur:function(){return m(!1)},inputRef:b,color:"secondary",size:"small",error:!!a,InputProps:t.enableSpeechToText?A:{}})]}),(0,e.jsx)(k(),{"aria-label":"send message",onClick:E,disabled:x,color:"primary",children:(0,e.jsx)("span",{className:"material-symbols-rounded",children:"send"})})]})}Mf.defaultProps={multiline:!0,fullWidth:!0,maxRows:6,enableSpeechToText:!1};var Nf=function(){return Nf=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Nf.apply(this,arguments)};function Rf(t){var r=yu.sanitize(t.youtubeVideoId);return(0,e.jsx)("iframe",Nf({},ql(t.width,t.height),{src:"https://www.youtube.com/embed/".concat(r),title:t.title,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",loading:"lazy"}))}Rf.defaultProps={title:"Embedded video"};var Bf=function(){return Bf=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Bf.apply(this,arguments)},Lf="#FFFFFF",_f="#FF6928",zf="#E54500",$f="#5F5C5A",Ff="#FDFDFD",qf="#E5E5E5",Wf="#C7C2C0",Uf="#D6D0D0",Gf="#D0C4BE",Hf=(0,s.createTheme)({shape:{borderRadius:16},typography:{fontFamily:"Inter",h1:{fontStyle:"normal",fontWeight:400,fontSize:"96px",letterSpacing:"-1.5px"},h2:{fontStyle:"normal",fontWeight:400,fontSize:"60px",letterSpacing:"-0.5px"},h3:{fontStyle:"normal",fontWeight:400,fontSize:"48px",letterSpacing:"0px"},h4:{fontStyle:"normal",fontWeight:400,fontSize:"34px",letterSpacing:"0.25px"},h5:{fontStyle:"normal",fontWeight:400,fontSize:"24px",letterSpacing:"0px"},h6:{fontStyle:"normal",fontWeight:400,fontSize:"20px",letterSpacing:"0.15px"},body1:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.15px"},body2:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.17px"},subtitle1:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.15px",textDecoration:"none"},subtitle2:{fontStyle:"normal",fontWeight:500,fontSize:"14px",letterSpacing:"0.01px"},overline:{fontStyle:"normal",fontWeight:400,fontSize:"14px",letterSpacing:"0.15px"},caption:{fontStyle:"normal",fontWeight:500,fontSize:"12px",letterSpacing:"0.04px"}},palette:{common:{black:"#000000",white:Lf},error:{main:"#F82A43"},warning:{main:"#FFB800"},info:{main:"#0094FF"},success:{main:"#35A700"}},shadows:function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],(0,s.createTheme)({}).shadows.map((function(e,t){return 1===t?"0 4px 5px rgba(0, 0, 0, 0.05)":2===t?"0 4px 10px rgba(0, 0, 0, 0.1)":3===t?"0 4px 15px rgba(0, 0, 0, 0.15)":"none"})),!0)}),Xf="#3D3834",Vf=(0,s.createTheme)(Bf(Bf({},Hf),{palette:{mode:"light",divider:Gf,text:{primary:"#1E0C04",secondary:"#4E443F",disabled:"#B0ACAB"},primary:{main:Xf,dark:"#2D2825",light:"#BAACA5"},secondary:{main:_f,light:"#FFDBCC",dark:zf},background:{default:"#F4F0EF",paper:Lf},action:{active:$f,hover:"#EFEAEA",selected:Uf,disabledBackground:qf,focus:Ff,disabled:Wf}},components:{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:Xf,color:Lf}}}}})),Kf="#2F2F2F",Yf="#FFFCFB",Zf=(0,s.createTheme)(Bf(Bf({},Hf),{palette:{mode:"dark",divider:Gf,primary:{main:Yf,dark:zf,light:"#FFDBCC"},secondary:{main:_f,light:"#FFA983",dark:zf},background:{default:"#040404",paper:Kf},text:{primary:Lf,secondary:"#EBEBEB",disabled:"#C1C1C1"},action:{active:$f,hover:"#9A9A9A",selected:Uf,focus:Ff,disabledBackground:qf,disabled:Wf}},components:{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:Yf,color:Kf}}}}}));Vf=(0,s.responsiveFontSizes)(Vf),Zf=(0,s.responsiveFontSizes)(Zf)})(),n})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{var e={450:function(e){e.exports=function(){var e=[],t=[],r={},n={},i={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function a(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function c(e,t){return e.replace(t[0],(function(r,n){var i,o,c=(i=t[1],o=arguments,i.replace(/\$(\d{1,2})/g,(function(e,t){return o[t]||""})));return a(""===r?e[n-1]:r,c)}))}function l(e,t,n){if(!e.length||r.hasOwnProperty(e))return t;for(var i=n.length;i--;){var o=n[i];if(o[0].test(t))return c(t,o)}return t}function s(e,t,r){return function(n){var i=n.toLowerCase();return t.hasOwnProperty(i)?a(n,i):e.hasOwnProperty(i)?a(n,e[i]):l(i,n,r)}}function u(e,t,r,n){return function(n){var i=n.toLowerCase();return!!t.hasOwnProperty(i)||!e.hasOwnProperty(i)&&l(i,i,r)===i}}function p(e,t,r){return(r?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=s(i,n,e),p.isPlural=u(i,n,e),p.singular=s(n,i,t),p.isSingular=u(n,i,t),p.addPluralRule=function(t,r){e.push([o(t),r])},p.addSingularRule=function(e,r){t.push([o(e),r])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):r[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),i[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return p.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return p.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return p.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(p.addUncountableRule),p}()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{Action:()=>Yp,CodeSnippet:()=>Yl,CopyText:()=>Zp,ElementRenderer:()=>Ql,FCCalendar:()=>m,Image:()=>rs,MarkedMarkdown:()=>wp,MarkedStreamingMarkdown:()=>Op,MessageCanvas:()=>Jp,MessageSpace:()=>ef,MultimodalInput:()=>Ms,Multipart:()=>rf,NavBar:()=>lf,OpenLayersMap:()=>Ys,ParticipantRole:()=>gf,ParticipantType:()=>bf,ParticipantsContainer:()=>Of,PopoverMenu:()=>Kp,RechartsTimeSeries:()=>ql,Sound:()=>Fp,StreamingText:()=>Bf,Table:()=>Rf,Text:()=>tf,TextInput:()=>Bs,Timestamp:()=>Qp,Video:()=>Wp,YoutubeVideo:()=>Lf,rusticDarkTheme:()=>ed,rusticLightTheme:()=>Zf});const e=require("react/jsx-runtime"),t=require("@fullcalendar/daygrid");var i=r.n(t);const o=require("@fullcalendar/react");var a=r.n(o);const c=require("@mui/material/Box");var l=r.n(c);const s=require("@mui/material/styles"),u=require("@mui/material/useMediaQuery");var p=r.n(u);const f=require("react");var d=r.n(f);function h(e){return{title:e.title?e.title:"",start:e.start,end:e.end,allDay:e.isAllDay}}function m(t){var r=(0,s.useTheme)(),n=p()(r.breakpoints.up("md"));return(0,e.jsx)(l(),{className:"rustic-fc-calendar",children:(0,e.jsx)(a(),{plugins:[i()],initialView:n?"dayGridMonth":"dayGridDay",headerToolbar:{left:"prev,next",center:"title",right:"dayGridMonth,dayGridWeek,dayGridDay"},eventTimeFormat:{hour:"2-digit",minute:"2-digit"},initialDate:t.events[0].start,events:t.events.map(h),views:{dayGridMonth:{titleFormat:{year:"numeric",month:"short"}},dayGridWeek:{},dayGridDay:{titleFormat:{year:"numeric",month:"short",day:"numeric"}}}})})}const y=require("@mui/material/FormControl");var v=r.n(y);const g=require("@mui/material/IconButton");var b=r.n(g);const x=require("@mui/material/Menu");var w=r.n(x);const O=require("@mui/material/MenuItem");var k=r.n(O);const S=require("@mui/material/Typography");var j=r.n(S);const E=require("@mui/system/Box");var A=r.n(E);const P=require("@mui/system/useTheme");var T=r.n(P);const C=require("lodash/isNil");var I=r.n(C);const D=require("lodash/isFunction");var M=r.n(D);const N=require("lodash/range");var R=r.n(N);const B=require("lodash/get");var _=r.n(B);const L=require("lodash/sortBy");var z=r.n(L);const F=require("lodash/throttle");var $=r.n(F);const U=require("lodash/find");var W=r.n(U);const q=require("lodash/every");var H=r.n(q);const G=require("clsx");var X=r.n(G);const V=require("tiny-invariant");var K=r.n(V);function Y(e){return Y="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},Y(e)}function Z(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?Z(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Y(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Y(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var J=Math.PI/180,ee=function(e){return 180*e/Math.PI},te=function(e,t,r,n){return{x:e+Math.cos(-J*n)*r,y:t+Math.sin(-J*n)*r}},re=function(e,t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360);return e+360*Math.min(i,o)},ne=function(e,t){var r=function(e,t){var r,n,i,o,a,c,l=e.x,s=e.y,u=t.cx,p=t.cy,f=(i=(r={x:l,y:s}).x,o=r.y,a=(n={x:u,y:p}).x,c=n.y,Math.sqrt(Math.pow(i-a,2)+Math.pow(o-c,2)));if(f<=0)return{radius:f};var d=(l-u)/f,h=Math.acos(d);return s>p&&(h=2*Math.PI-h),{radius:f,angle:ee(h),angleInRadian:h}}({x:e.x,y:e.y},t),n=r.radius,i=r.angle,o=t.innerRadius,a=t.outerRadius;if(n<o||n>a)return!1;if(0===n)return!0;var c,l=function(e){var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-360*o,endAngle:r-360*o}}(t),s=l.startAngle,u=l.endAngle,p=i;if(s<=u){for(;p>u;)p-=360;for(;p<s;)p+=360;c=p>=s&&p<=u}else{for(;p>s;)p-=360;for(;p<u;)p+=360;c=p>=u&&p<=s}return c?Q(Q({},t),{},{radius:n,angle:re(p,t)}):null};function ie(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle;return{points:[te(t,r,n,i),te(t,r,n,o)],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}const oe=require("lodash/isString");var ae=r.n(oe);const ce=require("lodash/isNaN");var le=r.n(ce);const se=require("lodash/isNumber");var ue=r.n(se),pe=function(e){return 0===e?0:e>0?1:-1},fe=function(e){return ae()(e)&&e.indexOf("%")===e.length-1},de=function(e){return ue()(e)&&!le()(e)},he=function(e){return de(e)||ae()(e)},me=0,ye=function(e){var t=++me;return"".concat(e||"").concat(t)},ve=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!de(e)&&!ae()(e))return n;if(fe(e)){var o=e.indexOf("%");r=t*parseFloat(e.slice(0,o))/100}else r=+e;return le()(r)&&(r=n),i&&r>t&&(r=t),r},ge=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},be=function(e,t){return de(e)&&de(t)?function(r){return e+r*(t-e)}:function(){return t}};function xe(e,t,r){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):_()(e,t))===r})):null}var we={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return we[e]},set:function(e,t){if("string"==typeof e)we[e]=t;else{var r=Object.keys(e);r&&r.length&&r.forEach((function(t){we[t]=e[t]}))}}};function Oe(e){return Oe="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},Oe(e)}function ke(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 Se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Oe(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Oe(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ke(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var je={widthCache:{},cacheCount:0},Ee={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Ae="recharts_measurement_span",Pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||we.isSsr)return{width:0,height:0};var r,n=(r=Se({},t),Object.keys(r).forEach((function(e){r[e]||delete r[e]})),r),i=JSON.stringify({text:e,copyStyle:n});if(je.widthCache[i])return je.widthCache[i];try{var o=document.getElementById(Ae);o||((o=document.createElement("span")).setAttribute("id",Ae),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=Se(Se({},Ee),n);Object.assign(o.style,a),o.textContent="".concat(e);var c=o.getBoundingClientRect(),l={width:c.width,height:c.height};return je.widthCache[i]=l,++je.cacheCount>2e3&&(je.cacheCount=0,je.widthCache={}),l}catch(e){return{width:0,height:0}}};const Te=require("lodash/mapValues");var Ce=r.n(Te);const Ie=require("victory-vendor/d3-scale"),De=require("victory-vendor/d3-shape"),Me=require("lodash/max");var Ne=r.n(Me);const Re=require("lodash/min");var Be=r.n(Re);const _e=require("lodash/flatMap");var Le=r.n(_e);const ze=require("lodash/upperFirst");var Fe=r.n(ze);const $e=require("lodash/isEqual");var Ue=r.n($e);const We=require("recharts-scale"),qe=require("lodash/isObject");var He=r.n(qe);const Ge=require("react-is");function Xe(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Ve(e){return Ve="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},Ve(e)}var Ke=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Ye=["points","pathLength"],Ze={svg:["viewBox","children"],polygon:Ye,polyline:Ye},Qe=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Je=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,f.isValidElement)(e)&&(r=e.props),!He()(r))return null;var n={};return Object.keys(r).forEach((function(e){Qe.includes(e)&&(n[e]=t||function(t){return r[e](r,t)})})),n},et=function(e,t,r){if(!He()(e)||"object"!==Ve(e))return null;var n=null;return Object.keys(e).forEach((function(i){var o=e[i];Qe.includes(i)&&"function"==typeof o&&(n||(n={}),n[i]=function(e,t,r){return function(n){return e(t,r,n),null}}(o,t,r))})),n},tt=["children"],rt=["children"];function nt(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function it(e){return it="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},it(e)}var ot={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},at=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},ct=null,lt=null,st=function e(t){if(t===ct&&Array.isArray(lt))return lt;var r=[];return f.Children.forEach(t,(function(t){I()(t)||((0,Ge.isFragment)(t)?r=r.concat(e(t.props.children)):r.push(t))})),lt=r,ct=t,r};function ut(e,t){var r=[],n=[];return n=Array.isArray(t)?t.map((function(e){return at(e)})):[at(t)],st(e).forEach((function(e){var t=_()(e,"type.displayName")||_()(e,"type.name");-1!==n.indexOf(t)&&r.push(e)})),r}function pt(e,t){var r=ut(e,t);return r&&r[0]}var ft=function(e){if(!e||!e.props)return!1;var t=e.props,r=t.width,n=t.height;return!(!de(r)||r<=0||!de(n)||n<=0)},dt=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],ht=function(e){return e&&"object"===it(e)&&"cx"in e&&"cy"in e&&"r"in e},mt=function(e,t,r){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,f.isValidElement)(e)&&(n=e.props),!He()(n))return null;var i={};return Object.keys(n).forEach((function(e){var o;(function(e,t,r,n){var i,o=null!==(i=null==Ze?void 0:Ze[n])&&void 0!==i?i:[];return!M()(e)&&(n&&o.includes(t)||Ke.includes(t))||r&&Qe.includes(t)})(null===(o=n)||void 0===o?void 0:o[e],e,t,r)&&(i[e]=n[e])})),i},yt=function e(t,r){if(t===r)return!0;var n=f.Children.count(t);if(n!==f.Children.count(r))return!1;if(0===n)return!0;if(1===n)return vt(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var o=t[i],a=r[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!vt(o,a))return!1}return!0},vt=function(e,t){if(I()(e)&&I()(t))return!0;if(!I()(e)&&!I()(t)){var r=e.props||{},n=r.children,i=nt(r,tt),o=t.props||{},a=o.children,c=nt(o,rt);return n&&a?Xe(i,c)&&yt(n,a):!n&&!a&&Xe(i,c)}return!1},gt=function(e,t){var r=[],n={};return st(e).forEach((function(e,i){if(function(e){return e&&e.type&&ae()(e.type)&&dt.indexOf(e.type)>=0}(e))r.push(e);else if(e){var o=at(e.type),a=t[o]||{},c=a.handler,l=a.once;if(c&&(!l||!n[o])){var s=c(e,o,i);r.push(s),n[o]=!0}}})),r},bt=["children","className"];function xt(){return xt=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},xt.apply(this,arguments)}var wt=d().forwardRef((function(e,t){var r=e.children,n=e.className,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,bt),o=X()("recharts-layer",n);return d().createElement("g",xt({className:o},mt(i,!0),{ref:t}),r)})),Ot=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function kt(){return kt=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},kt.apply(this,arguments)}function St(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jt(e){var t=e.offset,r=e.layout,n=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,c=e.xAxis,l=e.yAxis,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Ot),u=mt(s),p=o.map((function(e){var o=a(e,i),s=o.x,p=o.y,f=o.value,h=o.errorVal;if(!h)return null;var m,y,v,g,b=[];if(Array.isArray(h)){var x=(g=2,function(e){if(Array.isArray(e))return e}(v=h)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(v,g)||function(e,t){if(e){if("string"==typeof e)return St(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?St(e,t):void 0}}(v,g)||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.")}());m=x[0],y=x[1]}else m=y=h;if("vertical"===r){var w=c.scale,O=p+t,k=O+n,S=O-n,j=w(f-m),E=w(f+y);b.push({x1:E,y1:k,x2:E,y2:S}),b.push({x1:j,y1:O,x2:E,y2:O}),b.push({x1:j,y1:k,x2:j,y2:S})}else if("horizontal"===r){var A=l.scale,P=s+t,T=P-n,C=P+n,I=A(f-m),D=A(f+y);b.push({x1:T,y1:D,x2:C,y2:D}),b.push({x1:P,y1:I,x2:P,y2:D}),b.push({x1:T,y1:I,x2:C,y2:I})}return d().createElement(wt,kt({className:"recharts-errorBar",key:"bar-".concat(b.map((function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)})))},u),b.map((function(e){return d().createElement("line",kt({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))})))}));return d().createElement(wt,{className:"recharts-errorBars"},p)}jt.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},jt.displayName="ErrorBar";var Et=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]},At=["children","width","height","viewBox","className","style","title","desc"];function Pt(){return Pt=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},Pt.apply(this,arguments)}function Tt(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,a=e.style,c=e.title,l=e.desc,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,At),u=i||{width:r,height:n,x:0,y:0},p=X()("recharts-surface",o);return d().createElement("svg",Pt({},mt(s,!0,"svg"),{className:p,width:r,height:n,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),d().createElement("title",null,c),d().createElement("desc",null,l),t)}function Ct(e){return Ct="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},Ct(e)}var It=["type","size","sizeType"];function Dt(){return Dt=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},Dt.apply(this,arguments)}function Mt(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 Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ct(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ct(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Rt={symbolCircle:De.symbolCircle,symbolCross:De.symbolCross,symbolDiamond:De.symbolDiamond,symbolSquare:De.symbolSquare,symbolStar:De.symbolStar,symbolTriangle:De.symbolTriangle,symbolWye:De.symbolWye},Bt=Math.PI/180,_t=function(e){var t,r,n=e.type,i=void 0===n?"circle":n,o=e.size,a=void 0===o?64:o,c=e.sizeType,l=void 0===c?"area":c,s=Nt(Nt({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,It)),{},{type:i,size:a,sizeType:l}),u=s.className,p=s.cx,f=s.cy,h=mt(s,!0);return p===+p&&f===+f&&a===+a?d().createElement("path",Dt({},h,{className:X()("recharts-symbols",u),transform:"translate(".concat(p,", ").concat(f,")"),d:(t=function(e){var t="symbol".concat(Fe()(e));return Rt[t]||De.symbolCircle}(i),r=(0,De.symbol)().type(t).size(function(e,t,r){if("area"===t)return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var n=18*Bt;return 1.25*e*e*(Math.tan(n)-Math.tan(2*n)*Math.pow(Math.tan(n),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(a,l,i)),r())})):null};function Lt(e){return Lt="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},Lt(e)}function zt(){return zt=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},zt.apply(this,arguments)}function Ft(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 $t(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,Ht(n.key),n)}}function Ut(e,t){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ut(e,t)}function Wt(e){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wt(e)}function qt(e,t,r){return(t=Ht(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ht(e){var t=function(e,t){if("object"!==Lt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Lt(t)?t:String(t)}_t.registerSymbol=function(e,t){Rt["symbol".concat(Fe()(e))]=t};var Gt=32,Xt=function(e){!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&&Ut(e,t)}(a,e);var t,r,n,i,o=(n=a,i=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}}(),function(){var e,t=Wt(n);if(i){var r=Wt(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Lt(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)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,r=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,r=16,n=Gt/6,i=Gt/3,o=e.inactive?t:e.color;if("plainline"===e.type)return d().createElement("line",{strokeWidth:4,fill:"none",stroke:o,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:r,x2:Gt,y2:r,className:"recharts-legend-icon"});if("line"===e.type)return d().createElement("path",{strokeWidth:4,fill:"none",stroke:o,d:"M0,".concat(r,"h").concat(i,"\n A").concat(n,",").concat(n,",0,1,1,").concat(2*i,",").concat(r,"\n H").concat(Gt,"M").concat(2*i,",").concat(r,"\n A").concat(n,",").concat(n,",0,1,1,").concat(i,",").concat(r),className:"recharts-legend-icon"});if("rect"===e.type)return d().createElement("path",{stroke:"none",fill:o,d:"M0,".concat(4,"h").concat(Gt,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(d().isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ft(Object(r),!0).forEach((function(t){qt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);return delete a.legendIcon,d().cloneElement(e.legendIcon,a)}return d().createElement(_t,{fill:o,cx:r,cy:r,size:Gt,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,r=t.payload,n=t.iconSize,i=t.layout,o=t.formatter,a=t.inactiveColor,c={x:0,y:0,width:Gt,height:Gt},l={display:"horizontal"===i?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map((function(t,r){var i,u=t.formatter||o,p=X()((qt(i={"recharts-legend-item":!0},"legend-item-".concat(r),!0),qt(i,"inactive",t.inactive),i));if("none"===t.type)return null;var f=M()(t.value)?null:t.value;Et(!M()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var h=t.inactive?a:t.color;return d().createElement("li",zt({className:p,style:l,key:"legend-item-".concat(r)},et(e.props,t,r)),d().createElement(Tt,{width:n,height:n,viewBox:c,style:s},e.renderIcon(t)),d().createElement("span",{className:"recharts-legend-item-text",style:{color:h}},u?u(f,t,r):f))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,r=e.layout,n=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===r?n:"left"};return d().createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}],r&&$t(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(f.PureComponent);qt(Xt,"displayName","Legend"),qt(Xt,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});const Vt=require("lodash/uniqBy");var Kt=r.n(Vt);function Yt(e,t,r){return!0===t?Kt()(e,r):M()(t)?Kt()(e,t):e}function Zt(e){return Zt="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},Zt(e)}var Qt=["ref"];function Jt(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 er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(r),!0).forEach((function(t){or(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tr(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,ar(n.key),n)}}function rr(e,t){return rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rr(e,t)}function nr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ir(e){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ir(e)}function or(e,t,r){return(t=ar(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ar(e){var t=function(e,t){if("object"!==Zt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Zt(t)?t:String(t)}function cr(e){return e.value}var lr=function(e){!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&&rr(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=ir(i);if(o){var r=ir(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Zt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return nr(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return or(nr(e=a.call.apply(a,[this].concat(r))),"lastBoundingBox",{width:-1,height:-1}),e}return t=c,n=[{key:"getWithHeight",value:function(e,t){var r=e.props.layout;return"vertical"===r&&de(e.props.height)?{height:e.props.height}:"horizontal"===r?{width:e.props.width||t}:null}}],(r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){return this.wrapperNode&&this.wrapperNode.getBoundingClientRect?this.wrapperNode.getBoundingClientRect():null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var t=this.wrapperNode.getBoundingClientRect();(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t))}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?er({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,r,n=this.props,i=n.layout,o=n.align,a=n.verticalAlign,c=n.margin,l=n.chartWidth,s=n.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===o&&"vertical"===i?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===o?{right:c&&c.right||0}:{left:c&&c.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(r="middle"===a?{top:((s||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:c&&c.bottom||0}:{top:c&&c.top||0}),er(er({},t),r)}},{key:"render",value:function(){var e=this,t=this.props,r=t.content,n=t.width,i=t.height,o=t.wrapperStyle,a=t.payloadUniqBy,c=t.payload,l=er(er({position:"absolute",width:n||"auto",height:i||"auto"},this.getDefaultPosition(o)),o);return d().createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(d().isValidElement(e))return d().cloneElement(e,t);if("function"==typeof e)return d().createElement(e,t);t.ref;var r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,Qt);return d().createElement(Xt,r)}(r,er(er({},this.props),{},{payload:Yt(c,a,cr)})))}}])&&tr(t.prototype,r),n&&tr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);function sr(e){return sr="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},sr(e)}function ur(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 pr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==sr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===sr(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}or(lr,"displayName","Legend"),or(lr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var fr=function(e){var t,r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,o=e.legendContent,a=pt(r,lr);return a?(t=a.props&&a.props.payload?a.props&&a.props.payload:"children"===o?(n||[]).reduce((function(e,t){var r=t.item,n=t.props,i=n.sectors||n.data||[];return e.concat(i.map((function(e){return{type:a.props.iconType||r.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(n||[]).map((function(e){var t=e.item,r=t.props,n=r.dataKey,i=r.name,o=r.legendType;return{inactive:r.hide,dataKey:n,type:a.props.iconType||o||"square",color:wr(t),value:i||n,payload:t.props}})),pr(pr(pr({},a.props),lr.getWithHeight(a,i)),{},{payload:t,item:a})):null};function dr(e){return dr="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},dr(e)}function hr(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 mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(r),!0).forEach((function(t){yr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==dr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===dr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vr(e){return function(e){if(Array.isArray(e))return gr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return gr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function br(e,t,r){return I()(e)||I()(t)?r:he(t)?_()(e,t,r):M()(t)?t(e):r}function xr(e,t,r,n){var i=Le()(e,(function(e){return br(e,t)}));if("number"===r){var o=i.filter((function(e){return de(e)||parseFloat(e)}));return o.length?[Be()(o),Ne()(o)]:[1/0,-1/0]}return(n?i.filter((function(e){return!I()(e)})):i).map((function(e){return he(e)||e instanceof Date?e:""}))}var wr=function(e){var t,r=e.type.displayName,n=e.props,i=n.stroke,o=n.fill;switch(r){case"Line":t=i;break;case"Area":case"Radar":t=i&&"none"!==i?i:o;break;default:t=o}return t},Or=function(e,t,r,n,i){var o=ut(t.props.children,jt).filter((function(e){return function(e,t,r){return!!I()(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===r?"xAxis"===t:"y"!==r||"yAxis"===t)}(n,i,e.props.direction)}));if(o&&o.length){var a=o.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var n=br(t,r,0),i=Array.isArray(n)?[Be()(n),Ne()(n)]:[n,n],o=a.reduce((function(e,r){var n=br(t,r,0),o=i[0]-Math.abs(Array.isArray(n)?n[0]:n),a=i[1]+Math.abs(Array.isArray(n)?n[1]:n);return[Math.min(o,e[0]),Math.max(a,e[1])]}),[1/0,-1/0]);return[Math.min(o[0],e[0]),Math.max(o[1],e[1])]}),[1/0,-1/0])}return null},kr=function(e,t,r,n,i){var o=t.map((function(t){var o=t.props.dataKey;return"number"===r&&o&&Or(e,t,o,n)||xr(e,o,r,i)}));if("number"===r)return o.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var a={};return o.reduce((function(e,t){for(var r=0,n=t.length;r<n;r++)a[t[r]]||(a[t[r]]=!0,e.push(t[r]));return e}),[])},Sr=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},jr=function(e,t,r,n){if(n)return e.map((function(e){return e.coordinate}));var i,o,a=e.map((function(e){return e.coordinate===t&&(i=!0),e.coordinate===r&&(o=!0),e.coordinate}));return i||a.push(t),o||a.push(r),a},Er=function(e,t,r){if(!e)return null;var n=e.scale,i=e.duplicateDomain,o=e.type,a=e.range,c="scaleBand"===e.realScaleType?n.bandwidth()/2:2,l=(t||r)&&"category"===o&&n.bandwidth?n.bandwidth()/c:0;return l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*pe(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map((function(e){var t=i?i.indexOf(e):e;return{coordinate:n(t)+l,value:e,offset:l}})).filter((function(e){return!le()(e.coordinate)})):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:n(e)+l,value:e,index:t,offset:l}})):n.ticks&&!r?n.ticks(e.tickCount).map((function(e){return{coordinate:n(e)+l,value:e,offset:l}})):n.domain().map((function(e,t){return{coordinate:n(e)+l,value:i?i[e]:e,index:t,offset:l}}))},Ar=new WeakMap,Pr=function(e,t){if("function"!=typeof t)return e;Ar.has(e)||Ar.set(e,new WeakMap);var r=Ar.get(e);if(r.has(t))return r.get(t);var n=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return r.set(t,n),n},Tr=1e-4,Cr={sign:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0,a=0;a<t;++a){var c=le()(e[a][r][1])?e[a][r][0]:e[a][r][1];c>=0?(e[a][r][0]=i,e[a][r][1]=i+c,i=e[a][r][1]):(e[a][r][0]=o,e[a][r][1]=o+c,o=e[a][r][1])}},expand:De.stackOffsetExpand,none:De.stackOffsetNone,silhouette:De.stackOffsetSilhouette,wiggle:De.stackOffsetWiggle,positive:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0;o<t;++o){var a=le()(e[o][r][1])?e[o][r][0]:e[o][r][1];a>=0?(e[o][r][0]=i,e[o][r][1]=i+a,i=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}}},Ir=function(e,t,r){var n=t.map((function(e){return e.props.dataKey})),i=Cr[r];return(0,De.stack)().keys(n).value((function(e,t){return+br(e,t,0)})).order(De.stackOrderNone).offset(i)(e)},Dr=function(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!I()(i[t.dataKey])){var c=xe(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var l=br(i,I()(a)?t.dataKey:a);return I()(l)?null:t.scale(l)},Mr=function(e){var t=e.axis,r=e.ticks,n=e.offset,i=e.bandSize,o=e.entry,a=e.index;if("category"===t.type)return r[a]?r[a].coordinate+n:null;var c=br(o,t.dataKey,t.domain[a]);return I()(c)?null:t.scale(c)-i/2+n},Nr=function(e,t,r){return Object.keys(e).reduce((function(n,i){var o=e[i].stackedData.reduce((function(e,n){var i=n.slice(t,r+1).reduce((function(e,t){return[Be()(t.concat([e[0]]).filter(de)),Ne()(t.concat([e[1]]).filter(de))]}),[1/0,-1/0]);return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]}),[1/0,-1/0]);return[Math.min(o[0],n[0]),Math.max(o[1],n[1])]}),[1/0,-1/0]).map((function(e){return e===1/0||e===-1/0?0:e}))},Rr=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Br=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_r=function(e,t,r){if(M()(e))return e(t,r);if(!Array.isArray(e))return t;var n=[];if(de(e[0]))n[0]=r?e[0]:Math.min(e[0],t[0]);else if(Rr.test(e[0])){var i=+Rr.exec(e[0])[1];n[0]=t[0]-i}else M()(e[0])?n[0]=e[0](t[0]):n[0]=t[0];if(de(e[1]))n[1]=r?e[1]:Math.max(e[1],t[1]);else if(Br.test(e[1])){var o=+Br.exec(e[1])[1];n[1]=t[1]+o}else M()(e[1])?n[1]=e[1](t[1]):n[1]=t[1];return n},Lr=function(e,t,r){if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=z()(t,(function(e){return e.coordinate})),o=1/0,a=1,c=i.length;a<c;a++){var l=i[a],s=i[a-1];o=Math.min((l.coordinate||0)-(s.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},zr=function(e,t,r){return e&&e.length?Ue()(e,_()(r,"type.defaultProps.domain"))?t:e:t},Fr=function(e,t){var r=e.props,n=r.dataKey,i=r.name,o=r.unit,a=r.formatter,c=r.tooltipType,l=r.chartType;return mr(mr({},mt(e)),{},{dataKey:n,unit:o,formatter:a,name:i||n,color:wr(e),value:br(t,n),type:c,payload:t,chartType:l})};const $r=require("react-smooth");var Ur=r.n($r),Wr=function(e){return null};Wr.displayName="Cell";const qr=require("lodash/last");var Hr=r.n(qr);function Gr(e){return Gr="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},Gr(e)}function Xr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vr(e,t):void 0}}(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.")}()}function Vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kr(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,(void 0,i=function(e,t){if("object"!==Gr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===Gr(i)?i:String(i)),n)}var i}var Yr=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Zr=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Qr=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Jr=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,en={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},tn=Object.keys(en),rn="NaN",nn=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),""===r||Qr.test(r)||(this.num=NaN,this.unit=""),tn.includes(r)&&(this.num=function(e,t){return e*en[t]}(t,r),this.unit="px")}var t,r,n;return t=e,n=[{key:"parse",value:function(t){var r,n=Xr(null!==(r=Jr.exec(t))&&void 0!==r?r:[],3),i=n[1],o=n[2];return new e(parseFloat(i),null!=o?o:"")}}],(r=[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&Kr(t.prototype,r),n&&Kr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function on(e){if(e.includes(rn))return rn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=Xr(null!==(r=Yr.exec(t))&&void 0!==r?r:[],4),i=n[1],o=n[2],a=n[3],c=nn.parse(null!=i?i:""),l=nn.parse(null!=a?a:""),s="*"===o?c.multiply(l):c.divide(l);if(s.isNaN())return rn;t=t.replace(Yr,s.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,p=Xr(null!==(u=Zr.exec(t))&&void 0!==u?u:[],4),f=p[1],d=p[2],h=p[3],m=nn.parse(null!=f?f:""),y=nn.parse(null!=h?h:""),v="+"===d?m.add(y):m.subtract(y);if(v.isNaN())return rn;t=t.replace(Zr,v.toString())}return t}var an=/\(([^()]*)\)/;function cn(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var r=Xr(an.exec(t),2)[1];t=t.replace(an,on(r))}return t}(t),on(t)}(e)}catch(e){return rn}}(e.slice(5,-1));return t===rn?"":t}var ln=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],sn=["dx","dy","angle","className","breakAll"];function un(){return un=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},un.apply(this,arguments)}function pn(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return dn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dn(e,t):void 0}}(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.")}()}function dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var hn=/[ \f\n\r\t\v\u2028\u2029]+/,mn=function(e){var t=e.children,r=e.breakAll,n=e.style;try{var i=[];return I()(t)||(i=r?t.toString().split(""):t.toString().split(hn)),{wordsWithComputedWidth:i.map((function(e){return{word:e,width:Pe(e,n).width}})),spaceWidth:r?0:Pe(" ",n).width}}catch(e){return null}},yn=function(e){return[{words:I()(e)?[]:e.toString().split(hn)}]},vn="#808080",gn=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.lineHeight,a=void 0===o?"1em":o,c=e.capHeight,l=void 0===c?"0.71em":c,s=e.scaleToFit,u=void 0!==s&&s,p=e.textAnchor,h=void 0===p?"start":p,m=e.verticalAnchor,y=void 0===m?"end":m,v=e.fill,g=void 0===v?vn:v,b=pn(e,ln),x=(0,f.useMemo)((function(){return function(e){var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||r)&&!we.isSsr){var c=mn({breakAll:o,children:n,style:i});return c?function(e,t,r,n,i){var o=e.maxLines,a=e.children,c=e.style,l=e.breakAll,s=de(o),u=a,p=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t){var o=t.word,a=t.width,c=e[e.length-1];if(c&&(null==n||i||c.width+a+r<Number(n)))c.words.push(o),c.width+=a+r;else{var l={words:[o],width:a};e.push(l)}return e}),[])},f=p(t);if(!s)return f;for(var d,h=function(e){var t=u.slice(0,e),r=mn({breakAll:l,style:c,children:t+"…"}).wordsWithComputedWidth,i=p(r),a=i.length>o||function(e){return e.reduce((function(e,t){return e.width>t.width?e:t}))}(i).width>Number(n);return[a,i]},m=0,y=u.length-1,v=0;m<=y&&v<=u.length-1;){var g=Math.floor((m+y)/2),b=fn(h(g-1),2),x=b[0],w=b[1],O=fn(h(g),1)[0];if(x||O||(m=g+1),x&&O&&(y=g-1),!x&&O){d=w;break}v++}return d||f}({breakAll:o,children:n,maxLines:a,style:i},c.wordsWithComputedWidth,c.spaceWidth,t,r):yn(n)}return yn(n)}({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:u,style:b.style,width:b.width})}),[b.breakAll,b.children,b.maxLines,u,b.style,b.width]),w=b.dx,O=b.dy,k=b.angle,S=b.className,j=b.breakAll,E=pn(b,sn);if(!he(r)||!he(i))return null;var A,P=r+(de(w)?w:0),T=i+(de(O)?O:0);switch(y){case"start":A=cn("calc(".concat(l,")"));break;case"middle":A=cn("calc(".concat((x.length-1)/2," * -").concat(a," + (").concat(l," / 2))"));break;default:A=cn("calc(".concat(x.length-1," * -").concat(a,")"))}var C=[];if(u){var I=x[0].width,D=b.width;C.push("scale(".concat((de(D)?D/I:1)/I,")"))}return k&&C.push("rotate(".concat(k,", ").concat(P,", ").concat(T,")")),C.length&&(E.transform=C.join(" ")),d().createElement("text",un({},mt(E,!0),{x:P,y:T,className:X()("recharts-text",S),textAnchor:h,fill:g.includes("url")?vn:g}),x.map((function(e,t){var r=e.words.join(j?"":" ");return d().createElement("tspan",{x:P,dy:0===t?A:a,key:r},r)})))};function bn(e){return bn="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},bn(e)}var xn=["offset"];function wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function On(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 kn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?On(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==bn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===bn(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):On(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Sn(){return Sn=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},Sn.apply(this,arguments)}var jn=function(e){var t=e.value,r=e.formatter,n=I()(e.children)?t:e.children;return M()(r)?r(n):n},En=function(e,t,r){var n,i,o=e.position,a=e.viewBox,c=e.offset,l=e.className,s=a,u=s.cx,p=s.cy,f=s.innerRadius,h=s.outerRadius,m=s.startAngle,y=s.endAngle,v=s.clockWise,g=(f+h)/2,b=function(e,t){return pe(t-e)*Math.min(Math.abs(t-e),360)}(m,y),x=b>=0?1:-1;"insideStart"===o?(n=m+x*c,i=v):"insideEnd"===o?(n=y-x*c,i=!v):"end"===o&&(n=y+x*c,i=v),i=b<=0?i:!i;var w=te(u,p,g,n),O=te(u,p,g,n+359*(i?1:-1)),k="M".concat(w.x,",").concat(w.y,"\n A").concat(g,",").concat(g,",0,1,").concat(i?0:1,",\n ").concat(O.x,",").concat(O.y),S=I()(e.id)?ye("recharts-radial-line-"):e.id;return d().createElement("text",Sn({},r,{dominantBaseline:"central",className:X()("recharts-radial-bar-label",l)}),d().createElement("defs",null,d().createElement("path",{id:S,d:k})),d().createElement("textPath",{xlinkHref:"#".concat(S)},t))},An=function(e){var t=e.viewBox,r=e.offset,n=e.position,i=t,o=i.cx,a=i.cy,c=i.innerRadius,l=i.outerRadius,s=(i.startAngle+i.endAngle)/2;if("outside"===n){var u=te(o,a,l+r,s),p=u.x;return{x:p,y:u.y,textAnchor:p>=o?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var f=te(o,a,(c+l)/2,s);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}},Pn=function(e){var t=e.viewBox,r=e.parentViewBox,n=e.offset,i=e.position,o=t,a=o.x,c=o.y,l=o.width,s=o.height,u=s>=0?1:-1,p=u*n,f=u>0?"end":"start",d=u>0?"start":"end",h=l>=0?1:-1,m=h*n,y=h>0?"end":"start",v=h>0?"start":"end";if("top"===i)return kn(kn({},{x:a+l/2,y:c-u*n,textAnchor:"middle",verticalAnchor:f}),r?{height:Math.max(c-r.y,0),width:l}:{});if("bottom"===i)return kn(kn({},{x:a+l/2,y:c+s+p,textAnchor:"middle",verticalAnchor:d}),r?{height:Math.max(r.y+r.height-(c+s),0),width:l}:{});if("left"===i){var g={x:a-m,y:c+s/2,textAnchor:y,verticalAnchor:"middle"};return kn(kn({},g),r?{width:Math.max(g.x-r.x,0),height:s}:{})}if("right"===i){var b={x:a+l+m,y:c+s/2,textAnchor:v,verticalAnchor:"middle"};return kn(kn({},b),r?{width:Math.max(r.x+r.width-b.x,0),height:s}:{})}var x=r?{width:l,height:s}:{};return"insideLeft"===i?kn({x:a+m,y:c+s/2,textAnchor:v,verticalAnchor:"middle"},x):"insideRight"===i?kn({x:a+l-m,y:c+s/2,textAnchor:y,verticalAnchor:"middle"},x):"insideTop"===i?kn({x:a+l/2,y:c+p,textAnchor:"middle",verticalAnchor:d},x):"insideBottom"===i?kn({x:a+l/2,y:c+s-p,textAnchor:"middle",verticalAnchor:f},x):"insideTopLeft"===i?kn({x:a+m,y:c+p,textAnchor:v,verticalAnchor:d},x):"insideTopRight"===i?kn({x:a+l-m,y:c+p,textAnchor:y,verticalAnchor:d},x):"insideBottomLeft"===i?kn({x:a+m,y:c+s-p,textAnchor:v,verticalAnchor:f},x):"insideBottomRight"===i?kn({x:a+l-m,y:c+s-p,textAnchor:y,verticalAnchor:f},x):He()(i)&&(de(i.x)||fe(i.x))&&(de(i.y)||fe(i.y))?kn({x:a+ve(i.x,l),y:c+ve(i.y,s),textAnchor:"end",verticalAnchor:"end"},x):kn({x:a+l/2,y:c+s/2,textAnchor:"middle",verticalAnchor:"middle"},x)},Tn=function(e){return"cx"in e&&de(e.cx)};function Cn(e){var t,r=e.offset,n=kn({offset:void 0===r?5:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,xn)),i=n.viewBox,o=n.position,a=n.value,c=n.children,l=n.content,s=n.className,u=void 0===s?"":s,p=n.textBreakAll;if(!i||I()(a)&&I()(c)&&!(0,f.isValidElement)(l)&&!M()(l))return null;if((0,f.isValidElement)(l))return(0,f.cloneElement)(l,n);if(M()(l)){if(t=(0,f.createElement)(l,n),(0,f.isValidElement)(t))return t}else t=jn(n);var h=Tn(i),m=mt(n,!0);if(h&&("insideStart"===o||"insideEnd"===o||"end"===o))return En(n,t,m);var y=h?An(n):Pn(n);return d().createElement(gn,Sn({className:X()("recharts-label",u)},m,y,{breakAll:p}),t)}Cn.displayName="Label";var In=function(e){var t=e.cx,r=e.cy,n=e.angle,i=e.startAngle,o=e.endAngle,a=e.r,c=e.radius,l=e.innerRadius,s=e.outerRadius,u=e.x,p=e.y,f=e.top,d=e.left,h=e.width,m=e.height,y=e.clockWise,v=e.labelViewBox;if(v)return v;if(de(h)&&de(m)){if(de(u)&&de(p))return{x:u,y:p,width:h,height:m};if(de(f)&&de(d))return{x:f,y:d,width:h,height:m}}return de(u)&&de(p)?{x:u,y:p,width:0,height:0}:de(t)&&de(r)?{cx:t,cy:r,startAngle:i||n||0,endAngle:o||n||0,innerRadius:l||0,outerRadius:s||c||a||0,clockWise:y}:e.viewBox?e.viewBox:{}};function Dn(e){return Dn="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},Dn(e)}Cn.parseViewBox=In,Cn.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=In(e),o=ut(n,Cn).map((function(e,r){return(0,f.cloneElement)(e,{viewBox:t||i,key:"label-".concat(r)})}));if(!r)return o;var a,c=function(e,t){return e?!0===e?d().createElement(Cn,{key:"label-implicit",viewBox:t}):he(e)?d().createElement(Cn,{key:"label-implicit",viewBox:t,value:e}):(0,f.isValidElement)(e)?e.type===Cn?(0,f.cloneElement)(e,{key:"label-implicit",viewBox:t}):d().createElement(Cn,{key:"label-implicit",content:e,viewBox:t}):M()(e)?d().createElement(Cn,{key:"label-implicit",content:e,viewBox:t}):He()(e)?d().createElement(Cn,Sn({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||i);return[c].concat(function(e){if(Array.isArray(e))return wn(e)}(a=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return wn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wn(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())};var Mn=["valueAccessor"],Nn=["data","dataKey","clockWise","id","textBreakAll"];function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bn(){return Bn=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},Bn.apply(this,arguments)}function _n(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 Ln(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Dn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Dn(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function zn(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Fn=function(e){return Array.isArray(e.value)?Hr()(e.value):e.value};function $n(e){var t=e.valueAccessor,r=void 0===t?Fn:t,n=zn(e,Mn),i=n.data,o=n.dataKey,a=n.clockWise,c=n.id,l=n.textBreakAll,s=zn(n,Nn);return i&&i.length?d().createElement(wt,{className:"recharts-label-list"},i.map((function(e,t){var n=I()(o)?r(e,t):br(e&&e.payload,o),i=I()(c)?{}:{id:"".concat(c,"-").concat(t)};return d().createElement(Cn,Bn({},mt(e,!0),s,i,{parentViewBox:e.parentViewBox,value:n,textBreakAll:l,viewBox:Cn.parseViewBox(I()(a)?e:Ln(Ln({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))}))):null}$n.displayName="LabelList",$n.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var n,i=ut(e.children,$n).map((function(e,r){return(0,f.cloneElement)(e,{data:t,key:"labelList-".concat(r)})}));return r?[function(e,t){return e?!0===e?d().createElement($n,{key:"labelList-implicit",data:t}):d().isValidElement(e)||M()(e)?d().createElement($n,{key:"labelList-implicit",data:t,content:e}):He()(e)?d().createElement($n,Bn({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t)].concat(function(e){if(Array.isArray(e))return Rn(e)}(n=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Rn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rn(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):i};const Un=require("lodash/isPlainObject");var Wn=r.n(Un);const qn=require("lodash/isBoolean");var Hn=r.n(qn);function Gn(e){return Gn="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},Gn(e)}function Xn(){return Xn=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},Xn.apply(this,arguments)}function Vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kn(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 Yn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Gn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Gn(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Zn=function(e,t,r,n,i){var o,a=Math.min(Math.abs(r)/2,Math.abs(n)/2),c=n>=0?1:-1,l=r>=0?1:-1,s=n>=0&&r>=0||n<0&&r<0?1:0;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],p=0;p<4;p++)u[p]=i[p]>a?a:i[p];o="M".concat(e,",").concat(t+c*u[0]),u[0]>0&&(o+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(s,",").concat(e+l*u[0],",").concat(t)),o+="L ".concat(e+r-l*u[1],",").concat(t),u[1]>0&&(o+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(s,",\n ").concat(e+r,",").concat(t+c*u[1])),o+="L ".concat(e+r,",").concat(t+n-c*u[2]),u[2]>0&&(o+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(s,",\n ").concat(e+r-l*u[2],",").concat(t+n)),o+="L ".concat(e+l*u[3],",").concat(t+n),u[3]>0&&(o+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(s,",\n ").concat(e,",").concat(t+n-c*u[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var f=Math.min(a,i);o="M ".concat(e,",").concat(t+c*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+r-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+r,",").concat(t+c*f,"\n L ").concat(e+r,",").concat(t+n-c*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+r-l*f,",").concat(t+n,"\n L ").concat(e+l*f,",").concat(t+n,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e,",").concat(t+n-c*f," Z")}else o="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return o},Qn=function(e,t){if(!e||!t)return!1;var r=e.x,n=e.y,i=t.x,o=t.y,a=t.width,c=t.height;if(Math.abs(a)>0&&Math.abs(c)>0){var l=Math.min(i,i+a),s=Math.max(i,i+a),u=Math.min(o,o+c),p=Math.max(o,o+c);return r>=l&&r<=s&&n>=u&&n<=p}return!1},Jn={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ei=function(e){var t,r,n=Yn(Yn({},Jn),e),i=(0,f.useRef)(),o=(t=(0,f.useState)(-1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Vn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vn(e,t):void 0}}(t,r)||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.")}()),a=o[0],c=o[1];(0,f.useEffect)((function(){if(i.current&&i.current.getTotalLength)try{var e=i.current.getTotalLength();e&&c(e)}catch(e){}}),[]);var l=n.x,s=n.y,u=n.width,p=n.height,h=n.radius,m=n.className,y=n.animationEasing,v=n.animationDuration,g=n.animationBegin,b=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||s!==+s||u!==+u||p!==+p||0===u||0===p)return null;var w=X()("recharts-rectangle",m);return x?d().createElement(Ur(),{canBegin:a>0,from:{width:u,height:p,x:l,y:s},to:{width:u,height:p,x:l,y:s},duration:v,animationEasing:y,isActive:x},(function(e){var t=e.width,r=e.height,o=e.x,c=e.y;return d().createElement(Ur(),{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:v,isActive:b,easing:y},d().createElement("path",Xn({},mt(n,!0),{className:w,d:Zn(o,c,t,r,h),ref:i})))})):d().createElement("path",Xn({},mt(n,!0),{className:w,d:Zn(l,s,u,p,h)}))};function ti(e){return ti="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},ti(e)}function ri(){return ri=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},ri.apply(this,arguments)}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ii(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 oi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ii(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ti(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ti(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ii(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ai=function(e,t,r,n,i){var o,a=r-n;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+r,",").concat(t),o+="L ".concat(e+r-a/2,",").concat(t+i),(o+="L ".concat(e+r-a/2-n,",").concat(t+i))+"L ".concat(e,",").concat(t," Z")},ci={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},li=function(e){var t,r,n=oi(oi({},ci),e),i=(0,f.useRef)(),o=(t=(0,f.useState)(-1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return ni(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ni(e,t):void 0}}(t,r)||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.")}()),a=o[0],c=o[1];(0,f.useEffect)((function(){if(i.current&&i.current.getTotalLength)try{var e=i.current.getTotalLength();e&&c(e)}catch(e){}}),[]);var l=n.x,s=n.y,u=n.upperWidth,p=n.lowerWidth,h=n.height,m=n.className,y=n.animationEasing,v=n.animationDuration,g=n.animationBegin,b=n.isUpdateAnimationActive;if(l!==+l||s!==+s||u!==+u||p!==+p||h!==+h||0===u&&0===p||0===h)return null;var x=X()("recharts-trapezoid",m);return b?d().createElement(Ur(),{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:s},to:{upperWidth:u,lowerWidth:p,height:h,x:l,y:s},duration:v,animationEasing:y,isActive:b},(function(e){var t=e.upperWidth,r=e.lowerWidth,o=e.height,c=e.x,l=e.y;return d().createElement(Ur(),{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:v,easing:y},d().createElement("path",ri({},mt(n,!0),{className:x,d:ai(c,l,t,r,o),ref:i})))})):d().createElement("g",null,d().createElement("path",ri({},mt(n,!0),{className:x,d:ai(l,s,u,p,h)})))};function si(e){return si="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},si(e)}function ui(){return ui=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},ui.apply(this,arguments)}function pi(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 fi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pi(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==si(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==si(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===si(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var di=function(e){var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,a=e.isExternal,c=e.cornerRadius,l=e.cornerIsExternal,s=c*(a?1:-1)+n,u=Math.asin(c/s)/J,p=l?i:i+o*u,f=l?i-o*u:i;return{center:te(t,r,s,p),circleTangency:te(t,r,n,p),lineTangency:te(t,r,s*Math.cos(u*J),f),theta:u}},hi=function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,a=function(e,t){return pe(t-e)*Math.min(Math.abs(t-e),359.999)}(o,e.endAngle),c=o+a,l=te(t,r,i,o),s=te(t,r,i,c),u="M ".concat(l.x,",").concat(l.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(o>c),",\n ").concat(s.x,",").concat(s.y,"\n ");if(n>0){var p=te(t,r,n,o),f=te(t,r,n,c);u+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(n,",").concat(n,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(o<=c),",\n ").concat(p.x,",").concat(p.y," Z")}else u+="L ".concat(t,",").concat(r," Z");return u},mi={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},yi=function(e){var t=fi(fi({},mi),e),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,c=t.forceCornerRadius,l=t.cornerIsExternal,s=t.startAngle,u=t.endAngle,p=t.className;if(o<i||s===u)return null;var f,h=X()("recharts-sector",p),m=o-i,y=ve(a,m,0,!0);return f=y>0&&Math.abs(s-u)<360?function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,c=e.cornerIsExternal,l=e.startAngle,s=e.endAngle,u=pe(s-l),p=di({cx:t,cy:r,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:c}),f=p.circleTangency,d=p.lineTangency,h=p.theta,m=di({cx:t,cy:r,radius:i,angle:s,sign:-u,cornerRadius:o,cornerIsExternal:c}),y=m.circleTangency,v=m.lineTangency,g=m.theta,b=c?Math.abs(l-s):Math.abs(l-s)-h-g;if(b<0)return a?"M ".concat(d.x,",").concat(d.y,"\n a").concat(o,",").concat(o,",0,0,1,").concat(2*o,",0\n a").concat(o,",").concat(o,",0,0,1,").concat(2*-o,",0\n "):hi({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:s});var x="M ".concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n A").concat(i,",").concat(i,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(y.x,",").concat(y.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(v.x,",").concat(v.y,"\n ");if(n>0){var w=di({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=w.circleTangency,k=w.lineTangency,S=w.theta,j=di({cx:t,cy:r,radius:n,angle:s,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),E=j.circleTangency,A=j.lineTangency,P=j.theta,T=c?Math.abs(l-s):Math.abs(l-s)-S-P;if(T<0&&0===o)return"".concat(x,"L").concat(t,",").concat(r,"Z");x+="L".concat(A.x,",").concat(A.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(E.x,",").concat(E.y,"\n A").concat(n,",").concat(n,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(O.x,",").concat(O.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(k.x,",").concat(k.y,"Z")}else x+="L".concat(t,",").concat(r,"Z");return x}({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,m/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:s,endAngle:u}):hi({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:s,endAngle:u}),d().createElement("path",ui({},mt(t,!0),{className:h,d:f,role:"img"}))},vi=["option","shapeType","propTransformer","activeClassName","isActive"];function gi(e){return gi="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},gi(e)}function bi(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 xi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==gi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==gi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===gi(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wi(e,t){return xi(xi({},t),e)}function Oi(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return d().createElement(ei,r);case"trapezoid":return d().createElement(li,r);case"sector":return d().createElement(yi,r);case"symbols":if(function(e,t){return"symbols"===e}(t))return d().createElement(_t,r);break;default:return null}}function ki(e){var t,r=e.option,n=e.shapeType,i=e.propTransformer,o=void 0===i?wi:i,a=e.activeClassName,c=void 0===a?"recharts-active-shape":a,l=e.isActive,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,vi);if((0,f.isValidElement)(r))t=(0,f.cloneElement)(r,xi(xi({},s),function(e){return(0,f.isValidElement)(e)?e.props:e}(r)));else if(M()(r))t=r(s);else if(Wn()(r)&&!Hn()(r)){var u=o(r,s);t=d().createElement(Oi,{shapeType:n,elementProps:u})}else{var p=s;t=d().createElement(Oi,{shapeType:n,elementProps:p})}return l?d().createElement(wt,{className:c},t):t}function Si(e,t){return null!=t&&"trapezoids"in e.props}function ji(e,t){return null!=t&&"sectors"in e.props}function Ei(e,t){return null!=t&&"points"in e.props}function Ai(e,t){var r,n,i=e.x===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.x)||e.x===t.x,o=e.y===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.y)||e.y===t.y;return i&&o}function Pi(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Ti(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Ci(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=function(e,t){var r;return Si(e,t)?r="trapezoids":ji(e,t)?r="sectors":Ei(e,t)&&(r="points"),r}(r,t),o=function(e,t){var r,n;return Si(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:ji(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:Ei(e,t)?t.payload:{}}(r,t),a=n.filter((function(e,n){var a=Ue()(o,e),c=r.props[i].filter((function(e){var n=function(e,t){var r;return Si(e,t)?r=Ai:ji(e,t)?r=Pi:Ei(e,t)&&(r=Ti),r}(r,t);return n(e,t)})),l=r.props[i].indexOf(c[c.length-1]);return a&&n===l}));return n.indexOf(a[a.length-1])}function Ii(e){return Ii="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},Ii(e)}var Di=["x","y"];function Mi(){return Mi=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},Mi.apply(this,arguments)}function Ni(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 Ri(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ni(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Ii(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ii(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ii(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ni(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Bi(e,t){var r=e.x,n=e.y,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Di),o="".concat(r),a=parseInt(o,10),c="".concat(n),l=parseInt(c,10),s="".concat(t.height||i.height),u=parseInt(s,10),p="".concat(t.width||i.width),f=parseInt(p,10);return Ri(Ri(Ri(Ri(Ri({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function _i(e){return d().createElement(ki,Mi({shapeType:"rectangle",propTransformer:Bi,activeClassName:"recharts-active-bar"},e))}var Li=["value","background"];function zi(e){return zi="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},zi(e)}function Fi(){return Fi=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},Fi.apply(this,arguments)}function $i(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 Ui(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$i(Object(r),!0).forEach((function(t){Xi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Wi(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,Vi(n.key),n)}}function qi(e,t){return qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qi(e,t)}function Hi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gi(e){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gi(e)}function Xi(e,t,r){return(t=Vi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vi(e){var t=function(e,t){if("object"!==zi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===zi(t)?t:String(t)}var Ki=function(e){!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&&qi(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=Gi(i);if(o){var r=Gi(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===zi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hi(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xi(Hi(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!1}),Xi(Hi(e),"id",ye("recharts-bar-")),Xi(Hi(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()})),Xi(Hi(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],(r=[{key:"renderRectanglesStatically",value:function(e){var t=this,r=this.props,n=r.shape,i=r.dataKey,o=r.activeIndex,a=r.activeBar,c=mt(this.props);return e&&e.map((function(e,r){var l=r===o,s=l?a:n,u=Ui(Ui(Ui({},c),e),{},{isActive:l,option:s,index:r,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return d().createElement(wt,Fi({className:"recharts-bar-rectangle"},et(t.props,e,r),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value)}),d().createElement(_i,u))}))}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,r=t.data,n=t.layout,i=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,c=t.animationEasing,l=t.animationId,s=this.state.prevData;return d().createElement(Ur(),{begin:o,duration:a,isActive:i,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(t){var i=t.t,o=r.map((function(e,t){var r=s&&s[t];if(r){var o=be(r.x,e.x),a=be(r.y,e.y),c=be(r.width,e.width),l=be(r.height,e.height);return Ui(Ui({},e),{},{x:o(i),y:a(i),width:c(i),height:l(i)})}if("horizontal"===n){var u=be(0,e.height)(i);return Ui(Ui({},e),{},{y:e.y+e.height-u,height:u})}var p=be(0,e.width)(i);return Ui(Ui({},e),{},{width:p})}));return d().createElement(wt,null,e.renderRectanglesStatically(o))}))}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,r=e.isAnimationActive,n=this.state.prevData;return!(r&&t&&t.length)||n&&Ue()(n,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,r=t.data,n=t.dataKey,i=t.activeIndex,o=mt(this.props.background);return r.map((function(t,r){t.value;var a=t.background,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,Li);if(!a)return null;var l=Ui(Ui(Ui(Ui(Ui({},c),{},{fill:"#eee"},a),o),et(e.props,t,r)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:n,index:r,key:"background-bar-".concat(r),className:"recharts-bar-background-rectangle"});return d().createElement(_i,Fi({option:e.props.background,isActive:r===i},l))}))}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.data,i=r.xAxis,o=r.yAxis,a=r.layout,c=ut(r.children,jt);if(!c)return null;var l="vertical"===a?n[0].height/2:n[0].width/2,s=function(e,t){var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:br(e,t)}},u={clipPath:e?"url(#clipPath-".concat(t,")"):null};return d().createElement(wt,u,c.map((function(e){return d().cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,offset:l,dataPointFormatter:s})})))}},{key:"render",value:function(){var e=this.props,t=e.hide,r=e.data,n=e.className,i=e.xAxis,o=e.yAxis,a=e.left,c=e.top,l=e.width,s=e.height,u=e.isAnimationActive,p=e.background,f=e.id;if(t||!r||!r.length)return null;var h=this.state.isAnimationFinished,m=X()("recharts-bar",n),y=i&&i.allowDataOverflow,v=o&&o.allowDataOverflow,g=y||v,b=I()(f)?this.id:f;return d().createElement(wt,{className:m},y||v?d().createElement("defs",null,d().createElement("clipPath",{id:"clipPath-".concat(b)},d().createElement("rect",{x:y?a:a-l/2,y:v?c:c-s/2,width:y?l:2*l,height:v?s:2*s}))):null,d().createElement(wt,{className:"recharts-bar-rectangles",clipPath:g?"url(#clipPath-".concat(b,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(g,b),(!u||h)&&$n.renderCallByParent(this.props,r))}}])&&Wi(t.prototype,r),n&&Wi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);function Yi(e){return Yi="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},Yi(e)}function Zi(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,to(n.key),n)}}function Qi(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 Ji(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qi(Object(r),!0).forEach((function(t){eo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function eo(e,t,r){return(t=to(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function to(e){var t=function(e,t){if("object"!==Yi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Yi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Yi(t)?t:String(t)}Xi(Ki,"displayName","Bar"),Xi(Ki,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!0,isAnimationActive:!we.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Xi(Ki,"getComposedData",(function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,c=e.xAxisTicks,l=e.yAxisTicks,s=e.stackedData,u=e.dataStartIndex,p=e.displayedData,f=e.offset,d=function(e,t){if(!e)return null;for(var r=0,n=e.length;r<n;r++)if(e[r].item===t)return e[r].position;return null}(n,r);if(!d)return null;var h=t.layout,m=r.props,y=m.dataKey,v=m.children,g=m.minPointSize,b="horizontal"===h?a:o,x=s?b.scale.domain():null,w=function(e){var t=e.numericAxis,r=t.scale.domain();if("number"===t.type){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]}({numericAxis:b}),O=ut(v,Wr),k=p.map((function(e,t){var n,p,f,m,v,b;if(s?n=function(e,t){if(!t||2!==t.length||!de(t[0])||!de(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!de(e[0])||e[0]<r)&&(i[0]=r),(!de(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i}(s[u+t],x):(n=br(e,y),Array.isArray(n)||(n=[w,n])),"horizontal"===h){var k,S=[a.scale(n[0]),a.scale(n[1])],j=S[0],E=S[1];p=Mr({axis:o,ticks:c,bandSize:i,offset:d.offset,entry:e,index:t}),f=null!==(k=null!=E?E:j)&&void 0!==k?k:void 0,m=d.size;var A=j-E;if(v=Number.isNaN(A)?0:A,b={x:p,y:a.y,width:m,height:a.height},Math.abs(g)>0&&Math.abs(v)<Math.abs(g)){var P=pe(v||g)*(Math.abs(g)-Math.abs(v));f-=P,v+=P}}else{var T=[o.scale(n[0]),o.scale(n[1])],C=T[0],I=T[1];p=C,f=Mr({axis:a,ticks:l,bandSize:i,offset:d.offset,entry:e,index:t}),m=I-C,v=d.size,b={x:o.x,y:f,width:o.width,height:v},Math.abs(g)>0&&Math.abs(m)<Math.abs(g)&&(m+=pe(m||g)*(Math.abs(g)-Math.abs(m)))}return Ui(Ui(Ui({},e),{},{x:p,y:f,width:m,height:v,value:s?n:n[1],payload:e,background:b},O&&O[t]&&O[t].props),{},{tooltipPayload:[Fr(r,e)],tooltipPosition:{x:p+m/2,y:f+v/2}})}));return Ui({data:k,layout:h},f)}));var ro=function(e,t,r,n,i){var o=e.width,a=e.height,c=e.layout,l=e.children,s=Object.keys(t),u={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},p=!!pt(l,Ki);return s.reduce((function(o,a){var l,s,f,d,h,m=t[a],y=m.orientation,v=m.domain,g=m.padding,b=void 0===g?{}:g,x=m.mirror,w=m.reversed,O="".concat(y).concat(x?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var k=v[1]-v[0],S=1/0,j=m.categoricalDomain.sort();j.forEach((function(e,t){t>0&&(S=Math.min((e||0)-(j[t-1]||0),S))}));var E=S/k,A="vertical"===m.layout?r.height:r.width;if("gap"===m.padding&&(l=E*A/2),"no-gap"===m.padding){var P=ve(e.barCategoryGap,E*A),T=E*A/2;l=T-P-(T-P)/A*P}}s="xAxis"===n?[r.left+(b.left||0)+(l||0),r.left+r.width-(b.right||0)-(l||0)]:"yAxis"===n?"horizontal"===c?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(l||0),r.top+r.height-(b.bottom||0)-(l||0)]:m.range,w&&(s=[s[1],s[0]]);var C=function(e,t,r){var n=e.scale,i=e.type,o=e.layout,a=e.axisType;if("auto"===n)return"radial"===o&&"radiusAxis"===a?{scale:Ie.scaleBand(),realScaleType:"band"}:"radial"===o&&"angleAxis"===a?{scale:Ie.scaleLinear(),realScaleType:"linear"}:"category"===i&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!r)?{scale:Ie.scalePoint(),realScaleType:"point"}:"category"===i?{scale:Ie.scaleBand(),realScaleType:"band"}:{scale:Ie.scaleLinear(),realScaleType:"linear"};if(ae()(n)){var c="scale".concat(Fe()(n));return{scale:(Ie[c]||Ie.scalePoint)(),realScaleType:Ie[c]?c:"point"}}return M()(n)?{scale:n}:{scale:Ie.scalePoint(),realScaleType:"point"}}(m,i,p),I=C.scale,D=C.realScaleType;I.domain(v).range(s),function(e){var t=e.domain();if(t&&!(t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-Tr,o=Math.max(n[0],n[1])+Tr,a=e(t[0]),c=e(t[r-1]);(a<i||a>o||c<i||c>o)&&e.domain([t[0],t[r-1]])}}(I);var N=function(e,t){var r=t.realScaleType,n=t.type,i=t.tickCount,o=t.originalDomain,a=t.allowDecimals,c=r||t.scale;if("auto"!==c&&"linear"!==c)return null;if(i&&"number"===n&&o&&("auto"===o[0]||"auto"===o[1])){var l=e.domain();if(!l.length)return null;var s=(0,We.getNiceTickValues)(l,i,a);return e.domain([Be()(s),Ne()(s)]),{niceTicks:s}}if(i&&"number"===n){var u=e.domain();return{niceTicks:(0,We.getTickValuesFixedDomain)(u,i,a)}}return null}(I,Ji(Ji({},m),{},{realScaleType:D}));"xAxis"===n?(h="top"===y&&!x||"bottom"===y&&x,f=r.left,d=u[O]-h*m.height):"yAxis"===n&&(h="left"===y&&!x||"right"===y&&x,f=u[O]-h*m.width,d=r.top);var R=Ji(Ji(Ji({},m),N),{},{realScaleType:D,x:f,y:d,scale:I,width:"xAxis"===n?r.width:m.width,height:"yAxis"===n?r.height:m.height});return R.bandSize=Lr(R,N),m.hide||"xAxis"!==n?m.hide||(u[O]+=(h?-1:1)*R.width):u[O]+=(h?-1:1)*R.height,Ji(Ji({},o),{},eo({},a,R))}),{})},no=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y;return{x:Math.min(r,i),y:Math.min(n,o),width:Math.abs(i-r),height:Math.abs(o-n)}},io=function(e){var t=e.x1,r=e.y1,n=e.x2,i=e.y2;return no({x:t,y:r},{x:n,y:i})},oo=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}var t,r,n;return t=e,r=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.bandAware,n=t.position;if(void 0!==e){if(n)switch(n){case"start":default:return this.scale(e);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case"end":var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}if(r){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),r=t[0],n=t[t.length-1];return r<=n?e>=r&&e<=n:e>=n&&e<=r}}],n=[{key:"create",value:function(t){return new e(t)}}],r&&Zi(t.prototype,r),n&&Zi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();eo(oo,"EPS",1e-4);var ao=function(e){var t=Object.keys(e).reduce((function(t,r){return Ji(Ji({},t),{},eo({},r,oo.create(e[r])))}),{});return Ji(Ji({},t),{},{apply:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.bandAware,i=r.position;return Ce()(e,(function(e,r){return t[r].apply(e,{bandAware:n,position:i})}))},isInRange:function(e){return H()(e,(function(e,r){return t[r].isInRange(e)}))}})};function co(e,t,r){if(t<1)return[];if(1===t&&void 0===r)return e;for(var n=[],i=0;i<e.length;i+=t){if(void 0!==r&&!0!==r(e[i]))return;n.push(e[i])}return n}function lo(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function so(e){return so="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},so(e)}function uo(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 po(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==so(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==so(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===so(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function fo(e,t,r){var n=e.tick,i=e.ticks,o=e.viewBox,a=e.minTickGap,c=e.orientation,l=e.interval,s=e.tickFormatter,u=e.unit,p=e.angle;if(!i||!i.length||!n)return[];if(de(l)||we.isSsr)return function(e,t){return co(e,t+1)}(i,"number"==typeof l&&de(l)?l:0);var f=[],d="top"===c||"bottom"===c?"width":"height",h=u&&"width"===d?Pe(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(e,n){var i=M()(s)?s(e.value,n):e.value;return"width"===d?function(e,t,r){return function(e){var t=e.width,r=e.height,n=((arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)%180+180)%180*Math.PI/180,i=Math.atan(r/t),o=n>i&&n<Math.PI-i?r/Math.sin(n):t/Math.cos(n);return Math.abs(o)}({width:e.width+t.width,height:e.height+t.height},r)}(Pe(i,{fontSize:t,letterSpacing:r}),h,p):Pe(i,{fontSize:t,letterSpacing:r})[d]},y=i.length>=2?pe(i[1].coordinate-i[0].coordinate):1,v=function(e,t,r){var n="width"===r,i=e.x,o=e.y,a=e.width,c=e.height;return 1===t?{start:n?i:o,end:n?i+a:o+c}:{start:n?i+a:o+c,end:n?i:o}}(o,y,d);return"equidistantPreserveStart"===l?function(e,t,r,n,i){for(var o,a=(n||[]).slice(),c=t.start,l=t.end,s=0,u=1,p=c,f=function(){var t=null==n?void 0:n[s];if(void 0===t)return{v:co(n,u)};var o,a=s,f=function(){return void 0===o&&(o=r(t,a)),o},d=t.coordinate,h=0===s||lo(e,d,f,p,l);h||(s=0,p=c,u+=1),h&&(p=d+e*(f()/2+i),s+=u)};u<=a.length;)if(o=f())return o.v;return[]}(y,v,m,i,a):(f="preserveStart"===l||"preserveStartEnd"===l?function(e,t,r,n,i,o){var a=(n||[]).slice(),c=a.length,l=t.start,s=t.end;if(o){var u=n[c-1],p=r(u,c-1),f=e*(u.coordinate+e*p/2-s);a[c-1]=u=po(po({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),lo(e,u.tickCoord,(function(){return p}),l,s)&&(s=u.tickCoord-e*(p/2+i),a[c-1]=po(po({},u),{},{isShow:!0}))}for(var d=o?c-1:c,h=function(t){var n,o=a[t],c=function(){return void 0===n&&(n=r(o,t)),n};if(0===t){var u=e*(o.coordinate-e*c()/2-l);a[t]=o=po(po({},o),{},{tickCoord:u<0?o.coordinate-u*e:o.coordinate})}else a[t]=o=po(po({},o),{},{tickCoord:o.coordinate});lo(e,o.tickCoord,c,l,s)&&(l=o.tickCoord+e*(c()/2+i),a[t]=po(po({},o),{},{isShow:!0}))},m=0;m<d;m++)h(m);return a}(y,v,m,i,a,"preserveStartEnd"===l):function(e,t,r,n,i){for(var o=(n||[]).slice(),a=o.length,c=t.start,l=t.end,s=function(t){var n,s=o[t],u=function(){return void 0===n&&(n=r(s,t)),n};if(t===a-1){var p=e*(s.coordinate+e*u()/2-l);o[t]=s=po(po({},s),{},{tickCoord:p>0?s.coordinate-p*e:s.coordinate})}else o[t]=s=po(po({},s),{},{tickCoord:s.coordinate});lo(e,s.tickCoord,u,c,l)&&(l=s.tickCoord-e*(u()/2+i),o[t]=po(po({},s),{},{isShow:!0}))},u=a-1;u>=0;u--)s(u);return o}(y,v,m,i,a),f.filter((function(e){return e.isShow})))}function ho(e){return ho="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},ho(e)}function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yo(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 vo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ho(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ho(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ho(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function go(e){return Array.isArray(e)&&he(e[0])&&he(e[1])?e.join(" ~ "):e}var bo=function(e){var t=e.separator,r=void 0===t?" : ":t,n=e.contentStyle,i=void 0===n?{}:n,o=e.itemStyle,a=void 0===o?{}:o,c=e.labelStyle,l=void 0===c?{}:c,s=e.payload,u=e.formatter,p=e.itemSorter,f=e.wrapperClassName,h=e.labelClassName,m=e.label,y=e.labelFormatter,v=vo({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),g=vo({margin:0},l),b=!I()(m),x=b?m:"",w=X()("recharts-default-tooltip",f),O=X()("recharts-tooltip-label",h);return b&&y&&null!=s&&(x=y(m,s)),d().createElement("div",{className:w,style:v},d().createElement("p",{className:O,style:g},d().isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(p?z()(s,p):s).map((function(e,t){if("none"===e.type)return null;var n=vo({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),i=e.formatter||u||go,o=e.value,c=e.name,l=o,p=c;if(i&&null!=l&&null!=p){var f=i(o,c,e,t,s);if(Array.isArray(f)){var h=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mo(e,t):void 0}}(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.")}()}(f,2);l=h[0],p=h[1]}else l=f}return d().createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:n},he(p)?d().createElement("span",{className:"recharts-tooltip-item-name"},p):null,he(p)?d().createElement("span",{className:"recharts-tooltip-item-separator"},r):null,d().createElement("span",{className:"recharts-tooltip-item-value"},l),d().createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return d().createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function xo(e){return xo="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},xo(e)}function wo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==xo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===xo(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Oo="recharts-tooltip-wrapper",ko={visibility:"hidden"};function So(e){var t,r=e.coordinate,n=e.translateX,i=e.translateY;return X()(Oo,(wo(t={},"".concat(Oo,"-right"),de(n)&&r&&de(r.x)&&n>=r.x),wo(t,"".concat(Oo,"-left"),de(n)&&r&&de(r.x)&&n<r.x),wo(t,"".concat(Oo,"-bottom"),de(i)&&r&&de(r.y)&&i>=r.y),wo(t,"".concat(Oo,"-top"),de(i)&&r&&de(r.y)&&i<r.y),t))}function jo(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,c=e.tooltipDimension,l=e.viewBox,s=e.viewBoxDimension;if(o&&de(o[n]))return o[n];var u=r[n]-c-i,p=r[n]+i;return t[n]?a[n]?u:p:a[n]?u<l[n]?Math.max(p,l[n]):Math.max(u,l[n]):p+c>l[n]+s?Math.max(u,l[n]):Math.max(p,l[n])}function Eo(e){return Eo="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},Eo(e)}function Ao(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 Po(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(r),!0).forEach((function(t){Mo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function To(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,No(n.key),n)}}function Co(e,t){return Co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Co(e,t)}function Io(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Do(e){return Do=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Do(e)}function Mo(e,t,r){return(t=No(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function No(e){var t=function(e,t){if("object"!==Eo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Eo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Eo(t)?t:String(t)}var Ro=function(e){!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&&Co(e,t)}(a,e);var t,r,n,i,o=(n=a,i=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}}(),function(){var e,t=Do(n);if(i){var r=Do(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Eo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Io(e)}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mo(Io(e=o.call.apply(o,[this].concat(r))),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Mo(Io(e),"lastBoundingBox",{width:-1,height:-1}),Mo(Io(e),"handleKeyDown",(function(t){var r,n,i,o;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(r=null===(n=e.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==r?r:0,y:null!==(i=null===(o=e.props.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})})),e}return t=a,(r=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.lastBoundingBox.width)>1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height)}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var e=this,t=this.props,r=t.active,n=t.allowEscapeViewBox,i=t.animationDuration,o=t.animationEasing,a=t.children,c=t.coordinate,l=t.hasPayload,s=t.isAnimationActive,u=t.offset,p=t.position,f=t.reverseDirection,h=t.useTranslate3d,m=t.viewBox,y=t.wrapperStyle,v=function(e){var t,r,n,i=e.allowEscapeViewBox,o=e.coordinate,a=e.offsetTopLeft,c=e.position,l=e.reverseDirection,s=e.tooltipBox,u=e.useTranslate3d,p=e.viewBox;return t=s.height>0&&s.width>0&&o?function(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return(0,$r.translateStyle)({transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")})}({translateX:r=jo({allowEscapeViewBox:i,coordinate:o,key:"x",offsetTopLeft:a,position:c,reverseDirection:l,tooltipDimension:s.width,viewBox:p,viewBoxDimension:p.width}),translateY:n=jo({allowEscapeViewBox:i,coordinate:o,key:"y",offsetTopLeft:a,position:c,reverseDirection:l,tooltipDimension:s.height,viewBox:p,viewBoxDimension:p.height}),useTranslate3d:u}):ko,{cssProperties:t,cssClasses:So({translateX:r,translateY:n,coordinate:o})}}({allowEscapeViewBox:n,coordinate:c,offsetTopLeft:u,position:p,reverseDirection:f,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:h,viewBox:m}),g=v.cssClasses,b=v.cssProperties,x=Po(Po(Po({},s&&r&&(0,$r.translateStyle)({transition:"transform ".concat(i,"ms ").concat(o)})),b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&r&&l?"visible":"hidden",position:"absolute",top:0,left:0},y);return d().createElement("div",{tabIndex:-1,role:"dialog",className:g,style:x,ref:function(t){e.wrapperNode=t}},a)}}])&&To(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(f.PureComponent);function Bo(e){return Bo="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},Bo(e)}function _o(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 Lo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_o(Object(r),!0).forEach((function(t){Uo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function zo(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,Wo(n.key),n)}}function Fo(e,t){return Fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fo(e,t)}function $o(e){return $o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$o(e)}function Uo(e,t,r){return(t=Wo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wo(e){var t=function(e,t){if("object"!==Bo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Bo(t)?t:String(t)}function qo(e){return e.dataKey}var Ho=function(e){!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&&Fo(e,t)}(a,e);var t,r,n,i,o=(n=a,i=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}}(),function(){var e,t=$o(n);if(i){var r=$o(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Bo(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)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){var e=this.props,t=e.active,r=e.allowEscapeViewBox,n=e.animationDuration,i=e.animationEasing,o=e.content,a=e.coordinate,c=e.filterNull,l=e.isAnimationActive,s=e.offset,u=e.payload,p=e.payloadUniqBy,f=e.position,h=e.reverseDirection,m=e.useTranslate3d,y=e.viewBox,v=e.wrapperStyle,g=null!=u?u:[];c&&g.length&&(g=Yt(u.filter((function(e){return null!=e.value})),p,qo));var b=g.length>0;return d().createElement(Ro,{allowEscapeViewBox:r,animationDuration:n,animationEasing:i,isAnimationActive:l,active:t,coordinate:a,hasPayload:b,offset:s,position:f,reverseDirection:h,useTranslate3d:m,viewBox:y,wrapperStyle:v},function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):"function"==typeof e?d().createElement(e,t):d().createElement(bo,t)}(o,Lo(Lo({},this.props),{},{payload:g})))}}])&&zo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(f.PureComponent);function Go(e){return Go="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},Go(e)}function Xo(){return Xo=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},Xo.apply(this,arguments)}function Vo(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 Ko(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vo(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Go(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Go(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Go(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Uo(Ho,"displayName","Tooltip"),Uo(Ho,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!we.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Yo={curveBasisClosed:De.curveBasisClosed,curveBasisOpen:De.curveBasisOpen,curveBasis:De.curveBasis,curveBumpX:De.curveBumpX,curveBumpY:De.curveBumpY,curveLinearClosed:De.curveLinearClosed,curveLinear:De.curveLinear,curveMonotoneX:De.curveMonotoneX,curveMonotoneY:De.curveMonotoneY,curveNatural:De.curveNatural,curveStep:De.curveStep,curveStepAfter:De.curveStepAfter,curveStepBefore:De.curveStepBefore},Zo=function(e){return e.x===+e.x&&e.y===+e.y},Qo=function(e){return e.x},Jo=function(e){return e.y},ea=function(e){var t=e.className,r=e.points,n=e.path,i=e.pathRef;if(!(r&&r.length||n))return null;var o=r&&r.length?function(e){var t,r=e.type,n=void 0===r?"linear":r,i=e.points,o=void 0===i?[]:i,a=e.baseLine,c=e.layout,l=e.connectNulls,s=void 0!==l&&l,u=function(e,t){if(M()(e))return e;var r="curve".concat(Fe()(e));return"curveMonotone"!==r&&"curveBump"!==r||!t?Yo[r]||De.curveLinear:Yo["".concat(r).concat("vertical"===t?"Y":"X")]}(n,c),p=s?o.filter((function(e){return Zo(e)})):o;if(Array.isArray(a)){var f=s?a.filter((function(e){return Zo(e)})):a,d=p.map((function(e,t){return Ko(Ko({},e),{},{base:f[t]})}));return(t="vertical"===c?(0,De.area)().y(Jo).x1(Qo).x0((function(e){return e.base.x})):(0,De.area)().x(Qo).y1(Jo).y0((function(e){return e.base.y}))).defined(Zo).curve(u),t(d)}return(t="vertical"===c&&de(a)?(0,De.area)().y(Jo).x1(Qo).x0(a):de(a)?(0,De.area)().x(Qo).y1(Jo).y0(a):(0,De.line)().x(Qo).y(Jo)).defined(Zo).curve(u),t(p)}(e):n;return d().createElement("path",Xo({},mt(e),Je(e),{className:X()("recharts-curve",t),d:o,ref:i}))};function ta(e){return ta="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},ta(e)}var ra=["x","y","top","left","width","height","className"];function na(){return na=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},na.apply(this,arguments)}function ia(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}var oa=function(e,t,r,n,i,o){return"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r)},aa=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.top,a=void 0===o?0:o,c=e.left,l=void 0===c?0:c,s=e.width,u=void 0===s?0:s,p=e.height,f=void 0===p?0:p,h=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ia(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==ta(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ta(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ta(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ia(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({x:r,y:i,top:a,left:l,width:u,height:f},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ra));return de(r)&&de(i)&&de(u)&&de(f)&&de(a)&&de(l)?d().createElement("path",na({},mt(m,!0),{className:X()("recharts-cross",h),d:oa(r,i,u,f,a,l)})):null};function ca(){return ca=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},ca.apply(this,arguments)}var la=function(e){var t=e.cx,r=e.cy,n=e.r,i=e.className,o=X()("recharts-dot",i);return t===+t&&r===+r&&n===+n?d().createElement("circle",ca({},mt(e),Je(e),{className:o,cx:t,cy:r,r:n})):null},sa=["viewBox"],ua=["viewBox"],pa=["ticks"];function fa(e){return fa="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},fa(e)}function da(){return da=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},da.apply(this,arguments)}function ha(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 ma(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ha(Object(r),!0).forEach((function(t){xa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ha(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ya(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function va(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,wa(n.key),n)}}function ga(e,t){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ga(e,t)}function ba(e){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ba(e)}function xa(e,t,r){return(t=wa(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wa(e){var t=function(e,t){if("object"!==fa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===fa(t)?t:String(t)}var Oa=function(e){!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&&ga(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=ba(i);if(o){var r=ba(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===fa(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)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e)).state={fontSize:"",letterSpacing:""},t}return t=c,n=[{key:"renderTickItem",value:function(e,t,r){return d().isValidElement(e)?d().cloneElement(e,t):M()(e)?e(t):d().createElement(gn,da({},t,{className:"recharts-cartesian-axis-tick-value"}),r)}}],(r=[{key:"shouldComponentUpdate",value:function(e,t){var r=e.viewBox,n=ya(e,sa),i=this.props,o=i.viewBox,a=ya(i,ua);return!Xe(r,o)||!Xe(n,a)||!Xe(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,r,n,i,o,a,c=this.props,l=c.x,s=c.y,u=c.width,p=c.height,f=c.orientation,d=c.tickSize,h=c.mirror,m=c.tickMargin,y=h?-1:1,v=e.tickSize||d,g=de(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=r=e.coordinate,a=(n=(i=s+ +!h*p)-y*v)-y*m,o=g;break;case"left":n=i=e.coordinate,o=(t=(r=l+ +!h*u)-y*v)-y*m,a=g;break;case"right":n=i=e.coordinate,o=(t=(r=l+ +h*u)+y*v)+y*m,a=g;break;default:t=r=e.coordinate,a=(n=(i=s+ +h*p)+y*v)+y*m,o=g}return{line:{x1:t,y1:n,x2:r,y2:i},tick:{x:o,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,r=t.orientation,n=t.mirror;switch(r){case"left":e=n?"start":"end";break;case"right":e=n?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,r=e.mirror,n="end";switch(t){case"left":case"right":n="middle";break;case"top":n=r?"start":"end";break;default:n=r?"end":"start"}return n}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.orientation,a=e.mirror,c=e.axisLine,l=ma(ma(ma({},mt(this.props)),mt(c)),{},{fill:"none"});if("top"===o||"bottom"===o){var s=+("top"===o&&!a||"bottom"===o&&a);l=ma(ma({},l),{},{x1:t,y1:r+s*i,x2:t+n,y2:r+s*i})}else{var u=+("left"===o&&!a||"right"===o&&a);l=ma(ma({},l),{},{x1:t+u*n,y1:r,x2:t+u*n,y2:r+i})}return d().createElement("line",da({},l,{className:X()("recharts-cartesian-axis-line",_()(c,"className"))}))}},{key:"renderTicks",value:function(e,t,r){var n=this,i=this.props,o=i.tickLine,a=i.stroke,l=i.tick,s=i.tickFormatter,u=i.unit,p=fo(ma(ma({},this.props),{},{ticks:e}),t,r),f=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=mt(this.props),y=mt(l),v=ma(ma({},m),{},{fill:"none"},mt(o)),g=p.map((function(e,t){var r=n.getTickLineCoord(e),i=r.line,g=r.tick,b=ma(ma(ma(ma({textAnchor:f,verticalAnchor:h},m),{},{stroke:"none",fill:a},y),g),{},{index:t,payload:e,visibleTicksCount:p.length,tickFormatter:s});return d().createElement(wt,da({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},et(n.props,e,t)),o&&d().createElement("line",da({},v,i,{className:X()("recharts-cartesian-axis-tick-line",_()(o,"className"))})),l&&c.renderTickItem(l,b,"".concat(M()(s)?s(e.value,t):e.value).concat(u||"")))}));return d().createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var e=this,t=this.props,r=t.axisLine,n=t.width,i=t.height,o=t.ticksGenerator,a=t.className;if(t.hide)return null;var c=this.props,l=c.ticks,s=ya(c,pa),u=l;return M()(o)&&(u=l&&l.length>0?o(this.props):o(s)),n<=0||i<=0||!u||!u.length?null:d().createElement(wt,{className:X()("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},r&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),Cn.renderCallByParent(this.props))}}])&&va(t.prototype,r),n&&va(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.Component);function ka(e){return ka="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},ka(e)}function Sa(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 ja(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sa(Object(r),!0).forEach((function(t){Ea(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ea(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==ka(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ka(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ka(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}xa(Oa,"displayName","CartesianAxis"),xa(Oa,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Aa=["Webkit","Moz","O","ms"];function Pa(e){return Pa="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},Pa(e)}function Ta(){return Ta=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},Ta.apply(this,arguments)}function Ca(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 Ia(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ca(Object(r),!0).forEach((function(t){Ba(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ca(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Da(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,_a(n.key),n)}}function Ma(e,t){return Ma=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ma(e,t)}function Na(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ra(e){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ra(e)}function Ba(e,t,r){return(t=_a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _a(e){var t=function(e,t){if("object"!==Pa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Pa(t)?t:String(t)}var La=function(e){return e.changedTouches&&!!e.changedTouches.length},za=function(e){!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&&Ma(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=Ra(i);if(o){var r=Ra(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Pa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Na(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Ba(Na(t=a.call(this,e)),"handleDrag",(function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)})),Ba(Na(t),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])})),Ba(Na(t),"handleDragEnd",(function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},(function(){var e=t.props,r=e.endIndex,n=e.onDragEnd,i=e.startIndex;null==n||n({endIndex:r,startIndex:i})})),t.detachDragEndListener()})),Ba(Na(t),"handleLeaveWrapper",(function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))})),Ba(Na(t),"handleEnterSlideOrTraveller",(function(){t.setState({isTextActive:!0})})),Ba(Na(t),"handleLeaveSlideOrTraveller",(function(){t.setState({isTextActive:!1})})),Ba(Na(t),"handleSlideDragStart",(function(e){var r=La(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:r.pageX}),t.attachDragEndListener()})),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(Na(t),"startX"),endX:t.handleTravellerDragStart.bind(Na(t),"endX")},t.state={},t}return t=c,n=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=e.stroke,a=Math.floor(r+i/2)-1;return d().createElement(d().Fragment,null,d().createElement("rect",{x:t,y:r,width:n,height:i,fill:o,stroke:"none"}),d().createElement("line",{x1:t+1,y1:a,x2:t+n-1,y2:a,fill:"none",stroke:"#fff"}),d().createElement("line",{x1:t+1,y1:a+2,x2:t+n-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):M()(e)?e(t):c.renderDefaultTraveller(t)}},{key:"getDerivedStateFromProps",value:function(e,t){var r=e.data,n=e.width,i=e.x,o=e.travellerWidth,a=e.updateId,c=e.startIndex,l=e.endIndex;if(r!==t.prevData||a!==t.prevUpdateId)return Ia({prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n},r&&r.length?function(e){var t=e.data,r=e.startIndex,n=e.endIndex,i=e.x,o=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var c=t.length,l=(0,Ie.scalePoint)().domain(R()(0,c)).range([i,i+o-a]),s=l.domain().map((function(e){return l(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(r),endX:l(n),scale:l,scaleValues:s}}({data:r,width:n,x:i,travellerWidth:o,startIndex:c,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(n!==t.prevWidth||i!==t.prevX||o!==t.prevTravellerWidth)){t.scale.range([i,i+n-o]);var s=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:s}}return null}},{key:"getIndexInRange",value:function(e,t){for(var r=0,n=e.length-1;n-r>1;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i}return t>=e[n]?n:r}}],(r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,r=e.endX,n=this.state.scaleValues,i=this.props,o=i.gap,a=i.data.length-1,l=Math.min(t,r),s=Math.max(t,r),u=c.getIndexInRange(n,l),p=c.getIndexInRange(n,s);return{startIndex:u-u%o,endIndex:p===a?a:p-p%o}}},{key:"getTextOfTick",value:function(e){var t=this.props,r=t.data,n=t.tickFormatter,i=t.dataKey,o=br(r[e],i,e);return M()(n)?n(o,e):o}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,r=t.slideMoveStartX,n=t.startX,i=t.endX,o=this.props,a=o.x,c=o.width,l=o.travellerWidth,s=o.startIndex,u=o.endIndex,p=o.onChange,f=e.pageX-r;f>0?f=Math.min(f,a+c-l-i,a+c-l-n):f<0&&(f=Math.max(f,a-n,a-i));var d=this.getIndex({startX:n+f,endX:i+f});d.startIndex===s&&d.endIndex===u||!p||p(d),this.setState({startX:n+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var r=La(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:r.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,r=this.state,n=r.brushMoveStartX,i=r.movingTravellerId,o=r.endX,a=r.startX,c=this.state[i],l=this.props,s=l.x,u=l.width,p=l.travellerWidth,f=l.onChange,d=l.gap,h=l.data,m={startX:this.state.startX,endX:this.state.endX},y=e.pageX-n;y>0?y=Math.min(y,s+u-p-c):y<0&&(y=Math.max(y,s-c)),m[i]=c+y;var v=this.getIndex(m),g=v.startIndex,b=v.endIndex;this.setState((Ba(t={},i,c+y),Ba(t,"brushMoveStartX",e.pageX),t),(function(){var e;f&&(e=h.length-1,("startX"===i&&(o>a?g%d==0:b%d==0)||o<a&&b===e||"endX"===i&&(o>a?b%d==0:g%d==0)||o>a&&b===e)&&f(v))}))}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var r=this,n=this.state,i=n.scaleValues,o=n.startX,a=n.endX,c=this.state[t],l=i.indexOf(c);if(-1!==l){var s=l+e;if(!(-1===s||s>=i.length)){var u=i[s];"startX"===t&&u>=a||"endX"===t&&u<=o||this.setState(Ba({},t,u),(function(){r.props.onChange(r.getIndex({startX:r.state.startX,endX:r.state.endX}))}))}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.fill,a=e.stroke;return d().createElement("rect",{stroke:a,fill:o,x:t,y:r,width:n,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.data,a=e.children,c=e.padding,l=f.Children.only(a);return l?d().cloneElement(l,{x:t,y:r,width:n,height:i,margin:c,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,t){var r=this,n=this.props,i=n.y,o=n.travellerWidth,a=n.height,l=n.traveller,s=n.ariaLabel,u=n.data,p=n.startIndex,f=n.endIndex,h=Math.max(e,this.props.x),m=Ia(Ia({},mt(this.props)),{},{x:h,y:i,width:o,height:a}),y=s||"Min value: ".concat(u[p].name,", Max value: ").concat(u[f].name);return d().createElement(wt,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,t))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},c.renderTraveller(l,m))}},{key:"renderSlide",value:function(e,t){var r=this.props,n=r.y,i=r.height,o=r.stroke,a=r.travellerWidth,c=Math.min(e,t)+a,l=Math.max(Math.abs(t-e)-a,0);return d().createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:o,fillOpacity:.2,x:c,y:n,width:l,height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,r=e.endIndex,n=e.y,i=e.height,o=e.travellerWidth,a=e.stroke,c=this.state,l=c.startX,s=c.endX,u={pointerEvents:"none",fill:a};return d().createElement(wt,{className:"recharts-brush-texts"},d().createElement(gn,Ta({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,s)-5,y:n+i/2},u),this.getTextOfTick(t)),d().createElement(gn,Ta({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,s)+o+5,y:n+i/2},u),this.getTextOfTick(r)))}},{key:"render",value:function(){var e=this.props,t=e.data,r=e.className,n=e.children,i=e.x,o=e.y,a=e.width,c=e.height,l=e.alwaysShowText,s=this.state,u=s.startX,p=s.endX,f=s.isTextActive,h=s.isSlideMoving,m=s.isTravellerMoving,y=s.isTravellerFocused;if(!t||!t.length||!de(i)||!de(o)||!de(a)||!de(c)||a<=0||c<=0)return null;var v,g,b,x,w=X()("recharts-brush",r),O=1===d().Children.count(n),k=(g="none",b=(v="userSelect").replace(/(\w)/,(function(e){return e.toUpperCase()})),(x=Aa.reduce((function(e,t){return ja(ja({},e),{},Ea({},t+b,g))}),{}))[v]=g,x);return d().createElement(wt,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(u,p),this.renderTravellerLayer(u,"startX"),this.renderTravellerLayer(p,"endX"),(f||h||m||y||l)&&this.renderText())}}])&&Da(t.prototype,r),n&&Da(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);Ba(za,"displayName","Brush"),Ba(za,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Fa=function(e,t){var r=e.alwaysShow,n=e.ifOverflow;return r&&(n="extendDomain"),n===t};function $a(e){return $a="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},$a(e)}function Ua(){return Ua=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},Ua.apply(this,arguments)}function Wa(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 qa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wa(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==$a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==$a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===$a(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ha(e){var t=e.x,r=e.y,n=e.r,i=e.alwaysShow,o=e.clipPathId,a=he(t),c=he(r);if(Et(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!a||!c)return null;var l=function(e){var t=e.x,r=e.y,n=e.xAxis,i=e.yAxis,o=ao({x:n.scale,y:i.scale}),a=o.apply({x:t,y:r},{bandAware:!0});return Fa(e,"discard")&&!o.isInRange(a)?null:a}(e);if(!l)return null;var s=l.x,u=l.y,p=e.shape,f=e.className,h=qa(qa({clipPath:Fa(e,"hidden")?"url(#".concat(o,")"):void 0},mt(e,!0)),{},{cx:s,cy:u});return d().createElement(wt,{className:X()("recharts-reference-dot",f)},Ha.renderDot(p,h),Cn.renderCallByParent(e,{x:s-n,y:u-n,width:2*n,height:2*n}))}Ha.displayName="ReferenceDot",Ha.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},Ha.renderDot=function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):M()(e)?e(t):d().createElement(la,Ua({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))};const Ga=require("lodash/some");var Xa=r.n(Ga);function Va(e){return Va="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},Va(e)}function Ka(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 Ya(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ka(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==Va(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Va(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Va(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ka(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Za(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qa(){return Qa=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},Qa.apply(this,arguments)}var Ja=function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):M()(e)?e(t):d().createElement("line",Qa({},t,{className:"recharts-reference-line-line"}))},ec=function(e,t,r,n,i){var o=i.viewBox,a=o.x,c=o.y,l=o.width,s=o.height,u=i.position;if(r){var p=i.y,f=i.yAxis.orientation,d=e.y.apply(p,{position:u});if(Fa(i,"discard")&&!e.y.isInRange(d))return null;var h=[{x:a+l,y:d},{x:a,y:d}];return"left"===f?h.reverse():h}if(t){var m=i.x,y=i.xAxis.orientation,v=e.x.apply(m,{position:u});if(Fa(i,"discard")&&!e.x.isInRange(v))return null;var g=[{x:v,y:c+s},{x:v,y:c}];return"top"===y?g.reverse():g}if(n){var b=i.segment.map((function(t){return e.apply(t,{position:u})}));return Fa(i,"discard")&&Xa()(b,(function(t){return!e.isInRange(t)}))?null:b}return null};function tc(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxis,o=e.yAxis,a=e.shape,c=e.className,l=e.alwaysShow,s=e.clipPathId;Et(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=ao({x:i.scale,y:o.scale}),p=he(t),f=he(r),h=n&&2===n.length,m=ec(u,p,f,h,e);if(!m)return null;var y,v,g=(v=2,function(e){if(Array.isArray(e))return e}(y=m)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(y,v)||function(e,t){if(e){if("string"==typeof e)return Za(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Za(e,t):void 0}}(y,v)||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.")}()),b=g[0],x=b.x,w=b.y,O=g[1],k=O.x,S=O.y,j=Ya(Ya({clipPath:Fa(e,"hidden")?"url(#".concat(s,")"):void 0},mt(e,!0)),{},{x1:x,y1:w,x2:k,y2:S});return d().createElement(wt,{className:X()("recharts-reference-line",c)},Ja(a,j),Cn.renderCallByParent(e,io({x1:x,y1:w,x2:k,y2:S})))}function rc(e){return rc="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},rc(e)}function nc(){return nc=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},nc.apply(this,arguments)}function ic(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 oc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ic(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==rc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==rc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===rc(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ic(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ac(e){var t=e.x1,r=e.x2,n=e.y1,i=e.y2,o=e.className,a=e.alwaysShow,c=e.clipPathId;Et(void 0===a,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=he(t),s=he(r),u=he(n),p=he(i),f=e.shape;if(!(l||s||u||p||f))return null;var h=function(e,t,r,n,i){var o=i.x1,a=i.x2,c=i.y1,l=i.y2,s=i.xAxis,u=i.yAxis;if(!s||!u)return null;var p=ao({x:s.scale,y:u.scale}),f={x:e?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(c,{position:"start"}):p.y.rangeMin},d={x:t?p.x.apply(a,{position:"end"}):p.x.rangeMax,y:n?p.y.apply(l,{position:"end"}):p.y.rangeMax};return!Fa(i,"discard")||p.isInRange(f)&&p.isInRange(d)?no(f,d):null}(l,s,u,p,e);if(!h&&!f)return null;var m=Fa(e,"hidden")?"url(#".concat(c,")"):void 0;return d().createElement(wt,{className:X()("recharts-reference-area",o)},ac.renderRect(f,oc(oc({clipPath:m},mt(e,!0)),h)),Cn.renderCallByParent(e,h))}function cc(e){return function(e){if(Array.isArray(e))return lc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return lc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}tc.displayName="ReferenceLine",tc.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"},ac.displayName="ReferenceArea",ac.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},ac.renderRect=function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):M()(e)?e(t):d().createElement(ei,nc({},t,{className:"recharts-reference-area-rect"}))};var sc=function(e,t,r,n,i){var o=ut(e,tc),a=ut(e,Ha),c=[].concat(cc(o),cc(a)),l=ut(e,ac),s="".concat(n,"Id"),u=n[0],p=t;if(c.length&&(p=c.reduce((function(e,t){if(t.props[s]===r&&Fa(t.props,"extendDomain")&&de(t.props[u])){var n=t.props[u];return[Math.min(e[0],n),Math.max(e[1],n)]}return e}),p)),l.length){var f="".concat(u,"1"),d="".concat(u,"2");p=l.reduce((function(e,t){if(t.props[s]===r&&Fa(t.props,"extendDomain")&&de(t.props[f])&&de(t.props[d])){var n=t.props[f],i=t.props[d];return[Math.min(e[0],n,i),Math.max(e[1],n,i)]}return e}),p)}return i&&i.length&&(p=i.reduce((function(e,t){return de(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),p)),p};const uc=require("eventemitter3");var pc=new(r.n(uc)()),fc="recharts.syncMouseEvents";function dc(e){return dc="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},dc(e)}function hc(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,yc(n.key),n)}}function mc(e,t,r){return(t=yc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yc(e){var t=function(e,t){if("object"!==dc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==dc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===dc(t)?t:String(t)}var vc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),mc(this,"activeIndex",0),mc(this,"coordinateList",[]),mc(this,"layout","horizontal")}var t,r;return t=e,(r=[{key:"setDetails",value:function(e){var t=e.coordinateList,r=void 0===t?[]:t,n=e.container,i=void 0===n?null:n,o=e.layout,a=void 0===o?null:o,c=e.offset,l=void 0===c?null:c,s=e.mouseHandlerCallback,u=void 0===s?null:s;this.coordinateList=null!=r?r:this.coordinateList,this.container=null!=i?i:this.container,this.layout=null!=a?a:this.layout,this.offset=null!=l?l:this.offset,this.mouseHandlerCallback=null!=u?u:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var r=this.container.getBoundingClientRect(),n=r.x,i=r.y,o=r.height,a=this.coordinateList[this.activeIndex].coordinate,c=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,s=n+a+c,u=i+this.offset.top+o/2+l;this.mouseHandlerCallback({pageX:s,pageY:u})}}}])&&hc(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function gc(e,t,r){var n,i,o,a;if("horizontal"===e)o=n=t.x,i=r.top,a=r.top+r.height;else if("vertical"===e)a=i=t.y,n=r.left,o=r.left+r.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return ie(t);var c=t.cx,l=t.cy,s=t.innerRadius,u=t.outerRadius,p=t.angle,f=te(c,l,s,p),d=te(c,l,u,p);n=f.x,i=f.y,o=d.x,a=d.y}return[{x:n,y:i},{x:o,y:a}]}var bc=["item"],xc=["children","className","width","height","style","compact","title","desc"];function wc(e){return wc="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},wc(e)}function Oc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||Cc(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.")}()}function kc(){return kc=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},kc.apply(this,arguments)}function Sc(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jc(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,Rc(n.key),n)}}function Ec(e,t){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ec(e,t)}function Ac(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pc(e){return Pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pc(e)}function Tc(e){return function(e){if(Array.isArray(e))return Ic(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Cc(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cc(e,t){if(e){if("string"==typeof e)return Ic(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ic(e,t):void 0}}function Ic(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dc(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 Mc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dc(Object(r),!0).forEach((function(t){Nc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Nc(e,t,r){return(t=Rc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rc(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==wc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===wc(t)?t:String(t)}var Bc={xAxis:["bottom","top"],yAxis:["left","right"]},_c={width:"100%",height:"100%"},Lc={x:0,y:0},zc=function(e,t){var r=t.graphicalItems,n=t.dataStartIndex,i=t.dataEndIndex,o=(null!=r?r:[]).reduce((function(e,t){var r=t.props.data;return r&&r.length?[].concat(Tc(e),Tc(r)):e}),[]);return o.length>0?o:e&&e.length&&de(n)&&de(i)?e.slice(n,i+1):[]};function Fc(e){return"number"===e?[0,"auto"]:void 0}var $c=function(e,t,r,n){var i=e.graphicalItems,o=e.tooltipAxis,a=zc(t,e);return r<0||!i||!i.length||r>=a.length?null:i.reduce((function(i,c){var l;if(c.props.hide)return i;var s,u=null!==(l=c.props.data)&&void 0!==l?l:t;return u&&e.dataStartIndex+e.dataEndIndex!==0&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),(s=o.dataKey&&!o.allowDuplicatedCategory?xe(void 0===u?a:u,o.dataKey,n):u&&u[r]||a[r])?[].concat(Tc(i),[Fr(c,s)]):i}),[])},Uc=function(e,t,r,n){var i=n||{x:e.chartX,y:e.chartY},o=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(i,r),a=e.orderedTooltipTicks,c=e.tooltipAxis,l=e.tooltipTicks,s=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,a=null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0;if(a<=1)return 0;if(i&&"angleAxis"===i.axisType&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,l=0;l<a;l++){var s=l>0?n[l-1].coordinate:n[a-1].coordinate,u=n[l].coordinate,p=l>=a-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(pe(u-s)!==pe(p-u)){var d=[];if(pe(p-u)===pe(c[1]-c[0])){f=p;var h=u+c[1]-c[0];d[0]=Math.min(h,(h+s)/2),d[1]=Math.max(h,(h+s)/2)}else{f=s;var m=p+c[1]-c[0];d[0]=Math.min(u,(m+u)/2),d[1]=Math.max(u,(m+u)/2)}var y=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>y[0]&&e<=y[1]||e>=d[0]&&e<=d[1]){o=n[l].index;break}}else{var v=Math.min(s,p),g=Math.max(s,p);if(e>(v+u)/2&&e<=(g+u)/2){o=n[l].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b>0&&b<a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b===a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2){o=r[b].index;break}return o}(o,a,l,c);if(s>=0&&l){var u=l[s]&&l[s].value,p=$c(e,t,s,u),f=function(e,t,r,n){var i=t.find((function(e){return e&&e.index===r}));if(i){if("horizontal"===e)return{x:i.coordinate,y:n.y};if("vertical"===e)return{x:n.x,y:i.coordinate};if("centric"===e){var o=i.coordinate,a=n.radius;return Mc(Mc(Mc({},n),te(n.cx,n.cy,a,o)),{},{angle:o,radius:a})}var c=i.coordinate,l=n.angle;return Mc(Mc(Mc({},n),te(n.cx,n.cy,c,l)),{},{angle:l,radius:c})}return Lc}(r,a,s,i);return{activeTooltipIndex:s,activeLabel:u,activePayload:p,activeCoordinate:f}}return null},Wc=function(e,t){var r=t.axisType,n=void 0===r?"xAxis":r,i=t.AxisComp,o=t.graphicalItems,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.children,u="".concat(n,"Id"),p=ut(s,i),f={};return p&&p.length?f=function(e,t){var r=t.axes,n=t.graphicalItems,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,u=e.children,p=e.stackOffset,f=Sr(s,i);return r.reduce((function(t,r){var d,h=r.props,m=h.type,y=h.dataKey,v=h.allowDataOverflow,g=h.allowDuplicatedCategory,b=h.scale,x=h.ticks,w=h.includeHidden,O=r.props[o];if(t[O])return t;var k,S,j,E=zc(e.data,{graphicalItems:n.filter((function(e){return e.props[o]===O})),dataStartIndex:c,dataEndIndex:l}),A=E.length;(function(e,t,r){if("number"===r&&!0===t&&Array.isArray(e)){var n=null==e?void 0:e[0],i=null==e?void 0:e[1];if(n&&i&&de(n)&&de(i))return!0}return!1})(r.props.domain,v,m)&&(k=_r(r.props.domain,null,v),!f||"number"!==m&&"auto"===b||(j=xr(E,y,"category")));var P=Fc(m);if(!k||0===k.length){var T,C=null!==(T=r.props.domain)&&void 0!==T?T:P;if(y){if(k=xr(E,y,m),"category"===m&&f){var D=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++){if(r[e[n]])return!0;r[e[n]]=!0}return!1}(k);g&&D?(S=k,k=R()(0,A)):g||(k=zr(C,k,r).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(Tc(e),[t])}),[]))}else if("category"===m)k=g?k.filter((function(e){return""!==e&&!I()(e)})):zr(C,k,r).reduce((function(e,t){return e.indexOf(t)>=0||""===t||I()(t)?e:[].concat(Tc(e),[t])}),[]);else if("number"===m){var M=function(e,t,r,n,i){var o=t.map((function(t){return Or(e,t,r,i,n)})).filter((function(e){return!I()(e)}));return o&&o.length?o.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(E,n.filter((function(e){return e.props[o]===O&&(w||!e.props.hide)})),y,i,s);M&&(k=M)}!f||"number"!==m&&"auto"===b||(j=xr(E,y,"category"))}else k=f?R()(0,A):a&&a[O]&&a[O].hasStack&&"number"===m?"expand"===p?[0,1]:Nr(a[O].stackGroups,c,l):kr(E,n.filter((function(e){return e.props[o]===O&&(w||!e.props.hide)})),m,s,!0);if("number"===m)k=sc(u,k,O,i,x),C&&(k=_r(C,k,v));else if("category"===m&&C){var N=C;k.every((function(e){return N.indexOf(e)>=0}))&&(k=N)}}return Mc(Mc({},t),{},Nc({},O,Mc(Mc({},r.props),{},{axisType:i,domain:k,categoricalDomain:j,duplicateDomain:S,originalDomain:null!==(d=r.props.domain)&&void 0!==d?d:P,isCategorical:f,layout:s})))}),{})}(e,{axes:p,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:l}):o&&o.length&&(f=function(e,t){var r=t.graphicalItems,n=t.Axis,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,c=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,u=e.children,p=zc(e.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:l}),f=p.length,d=Sr(s,i),h=-1;return r.reduce((function(e,t){var m,y=t.props[o],v=Fc("number");return e[y]?e:(h++,d?m=R()(0,f):a&&a[y]&&a[y].hasStack?(m=Nr(a[y].stackGroups,c,l),m=sc(u,m,y,i)):(m=_r(v,kr(p,r.filter((function(e){return e.props[o]===y&&!e.props.hide})),"number",s),n.defaultProps.allowDataOverflow),m=sc(u,m,y,i)),Mc(Mc({},e),{},Nc({},y,Mc(Mc({axisType:i},n.defaultProps),{},{hide:!0,orientation:_()(Bc,"".concat(i,".").concat(h%2),null),domain:m,originalDomain:v,isCategorical:d,layout:s}))))}),{})}(e,{Axis:i,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:l})),f},qc=function(e){var t=e.children,r=e.defaultShowTooltip,n=pt(t,za),i=0,o=0;return e.data&&0!==e.data.length&&(o=e.data.length-1),n&&n.props&&(n.props.startIndex>=0&&(i=n.props.startIndex),n.props.endIndex>=0&&(o=n.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:Boolean(r)}},Hc=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Gc=function(e){var t,r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,o=void 0===i?"axis":i,a=e.validateTooltipEventTypes,c=void 0===a?["axis"]:a,l=e.axisComponents,s=e.legendContent,u=e.formatAxisMap,p=e.defaultProps,h=function(e,t){var i=e.props,o=e.dataStartIndex,a=e.dataEndIndex,c=e.updateId;if(!ft({props:i}))return null;var s=i.children,p=i.layout,f=i.stackOffset,d=i.data,h=i.reverseStackOrder,m=Hc(p),y=m.numericAxisName,v=m.cateAxisName,g=ut(s,n),b=function(e,t,r,n,i,o){if(!e)return null;var a=(o?t.reverse():t).reduce((function(e,t){var i=t.props,o=i.stackId;if(i.hide)return e;var a=t.props[r],c=e[a]||{hasStack:!1,stackGroups:{}};if(he(o)){var l=c.stackGroups[o]||{numericAxisId:r,cateAxisId:n,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[ye("_stackId_")]={numericAxisId:r,cateAxisId:n,items:[t]};return mr(mr({},e),{},yr({},a,c))}),{});return Object.keys(a).reduce((function(t,o){var c=a[o];return c.hasStack&&(c.stackGroups=Object.keys(c.stackGroups).reduce((function(t,o){var a=c.stackGroups[o];return mr(mr({},t),{},yr({},o,{numericAxisId:r,cateAxisId:n,items:a.items,stackedData:Ir(e,a.items,i)}))}),{})),mr(mr({},t),{},yr({},o,c))}),{})}(d,g,"".concat(y,"Id"),"".concat(v,"Id"),f,h),x=l.reduce((function(e,t){var r="".concat(t.axisType,"Map");return Mc(Mc({},e),{},Nc({},r,Wc(i,Mc(Mc({},t),{},{graphicalItems:g,stackGroups:t.axisType===y&&b,dataStartIndex:o,dataEndIndex:a}))))}),{}),w=function(e,t){var r=e.props,n=(e.graphicalItems,e.xAxisMap),i=void 0===n?{}:n,o=e.yAxisMap,a=void 0===o?{}:o,c=r.width,l=r.height,s=r.children,u=r.margin||{},p=pt(s,za),f=pt(s,lr),d=Object.keys(a).reduce((function(e,t){var r=a[t],n=r.orientation;return r.mirror||r.hide?e:Mc(Mc({},e),{},Nc({},n,e[n]+r.width))}),{left:u.left||0,right:u.right||0}),h=Object.keys(i).reduce((function(e,t){var r=i[t],n=r.orientation;return r.mirror||r.hide?e:Mc(Mc({},e),{},Nc({},n,_()(e,"".concat(n))+r.height))}),{top:u.top||0,bottom:u.bottom||0}),m=Mc(Mc({},h),d),y=m.bottom;p&&(m.bottom+=p.props.height||za.defaultProps.height),f&&t&&(m=function(e,t,r,n){var i=r.children,o=r.width,a=r.margin,c=o-(a.left||0)-(a.right||0),l=fr({children:i,legendWidth:c});if(l){var s=n||{},u=s.width,p=s.height,f=l.align,d=l.verticalAlign,h=l.layout;if(("vertical"===h||"horizontal"===h&&"middle"===d)&&"center"!==f&&de(e[f]))return mr(mr({},e),{},yr({},f,e[f]+(u||0)));if(("horizontal"===h||"vertical"===h&&"center"===f)&&"middle"!==d&&de(e[d]))return mr(mr({},e),{},yr({},d,e[d]+(p||0)))}return e}(m,0,r,t));var v=c-m.left-m.right,g=l-m.top-m.bottom;return Mc(Mc({brushBottom:y},m),{},{width:Math.max(v,0),height:Math.max(g,0)})}(Mc(Mc({},x),{},{props:i,graphicalItems:g}),null==t?void 0:t.legendBBox);Object.keys(x).forEach((function(e){x[e]=u(i,x[e],w,e.replace("Map",""),r)}));var O,k,S=x["".concat(v,"Map")],j=(O=ge(S),{tooltipTicks:k=Er(O,!1,!0),orderedTooltipTicks:z()(k,(function(e){return e.coordinate})),tooltipAxis:O,tooltipAxisBandSize:Lr(O,k)}),E=function(e,t){var r=t.graphicalItems,n=t.stackGroups,i=t.offset,o=t.updateId,a=t.dataStartIndex,c=t.dataEndIndex,s=e.barSize,u=e.layout,p=e.barGap,f=e.barCategoryGap,d=e.maxBarSize,h=Hc(u),m=h.numericAxisName,y=h.cateAxisName,v=function(e){return!(!e||!e.length)&&e.some((function(e){var t=at(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(r),g=v&&function(e){var t=e.barSize,r=e.stackGroups,n=void 0===r?{}:r;if(!n)return{};for(var i={},o=Object.keys(n),a=0,c=o.length;a<c;a++)for(var l=n[o[a]].stackGroups,s=Object.keys(l),u=0,p=s.length;u<p;u++){var f=l[s[u]],d=f.items,h=f.cateAxisId,m=d.filter((function(e){return at(e.type).indexOf("Bar")>=0}));if(m&&m.length){var y=m[0].props.barSize,v=m[0].props[h];i[v]||(i[v]=[]),i[v].push({item:m[0],stackList:m.slice(1),barSize:I()(y)?t:y})}}return i}({barSize:s,stackGroups:n}),b=[];return r.forEach((function(r,s){var h=zc(e.data,{graphicalItems:[r],dataStartIndex:a,dataEndIndex:c}),v=r.props,x=v.dataKey,w=v.maxBarSize,O=r.props["".concat(m,"Id")],k=r.props["".concat(y,"Id")],S=l.reduce((function(e,n){var i,o=t["".concat(n.axisType,"Map")],a=r.props["".concat(n.axisType,"Id")];o&&o[a]||"zAxis"===n.axisType||K()(!1);var c=o[a];return Mc(Mc({},e),{},(Nc(i={},n.axisType,c),Nc(i,"".concat(n.axisType,"Ticks"),Er(c)),i))}),{}),j=S[y],E=S["".concat(y,"Ticks")],A=n&&n[O]&&n[O].hasStack&&function(e,t){var r=e.props.stackId;if(he(r)){var n=t[r];if(n){var i=n.items.indexOf(e);return i>=0?n.stackedData[i]:null}}return null}(r,n[O].stackGroups),P=at(r.type).indexOf("Bar")>=0,T=Lr(j,E),C=[];if(P){var D,M,N=I()(w)?d:w,R=null!==(D=null!==(M=Lr(j,E,!0))&&void 0!==M?M:N)&&void 0!==D?D:0;C=function(e){var t=e.barGap,r=e.barCategoryGap,n=e.bandSize,i=e.sizeList,o=void 0===i?[]:i,a=e.maxBarSize,c=o.length;if(c<1)return null;var l,s=ve(t,n,0,!0),u=[];if(o[0].barSize===+o[0].barSize){var p=!1,f=n/c,d=o.reduce((function(e,t){return e+t.barSize||0}),0);(d+=(c-1)*s)>=n&&(d-=(c-1)*s,s=0),d>=n&&f>0&&(p=!0,d=c*(f*=.9));var h={offset:((n-d)/2|0)-s,size:0};l=o.reduce((function(e,t){var r={item:t.item,position:{offset:h.offset+h.size+s,size:p?f:t.barSize}},n=[].concat(vr(e),[r]);return h=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:h})})),n}),u)}else{var m=ve(r,n,0,!0);n-2*m-(c-1)*s<=0&&(s=0);var y=(n-2*m-(c-1)*s)/c;y>1&&(y>>=0);var v=a===+a?Math.min(y,a):y;l=o.reduce((function(e,t,r){var n=[].concat(vr(e),[{item:t.item,position:{offset:m+(y+s)*r+(y-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:n[n.length-1].position})})),n}),u)}return l}({barGap:p,barCategoryGap:f,bandSize:R!==T?R:T,sizeList:g[k],maxBarSize:N}),R!==T&&(C=C.map((function(e){return Mc(Mc({},e),{},{position:Mc(Mc({},e.position),{},{offset:e.position.offset-R/2})})})))}var B,_,L,z=r&&r.type&&r.type.getComposedData;z&&b.push({props:Mc(Mc({},z(Mc(Mc({},S),{},{displayedData:h,props:e,dataKey:x,item:r,bandSize:T,barPosition:C,offset:i,stackedData:A,layout:u,dataStartIndex:a,dataEndIndex:c}))),{},(B={key:r.key||"item-".concat(s)},Nc(B,m,S[m]),Nc(B,y,S[y]),Nc(B,"animationId",o),B)),childIndex:(_=r,L=e.children,st(L).indexOf(_)),item:r})})),b}(i,Mc(Mc({},x),{},{dataStartIndex:o,dataEndIndex:a,updateId:c,graphicalItems:g,stackGroups:b,offset:w}));return Mc(Mc({formattedGraphicalItems:E,graphicalItems:g,offset:w,stackGroups:b},j),x)};return t=function(e){!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&&Ec(e,t)}(u,e);var t,n,i,a,l=(i=u,a=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}}(),function(){var e,t=Pc(i);if(a){var r=Pc(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ac(e)}(this,e)});function u(e){var t,n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),Nc(Ac(i=l.call(this,e)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Nc(Ac(i),"accessibilityManager",new vc),Nc(Ac(i),"handleLegendBBoxUpdate",(function(e){if(e){var t=i.state,r=t.dataStartIndex,n=t.dataEndIndex,o=t.updateId;i.setState(Mc({legendBBox:e},h({props:i.props,dataStartIndex:r,dataEndIndex:n,updateId:o},Mc(Mc({},i.state),{},{legendBBox:e}))))}})),Nc(Ac(i),"handleReceiveSyncEvent",(function(e,t,r){if(i.props.syncId===e){if(r===i.eventEmitterSymbol&&"function"!=typeof i.props.syncMethod)return;i.applySyncEvent(t)}})),Nc(Ac(i),"handleBrushChange",(function(e){var t=e.startIndex,r=e.endIndex;if(t!==i.state.dataStartIndex||r!==i.state.dataEndIndex){var n=i.state.updateId;i.setState((function(){return Mc({dataStartIndex:t,dataEndIndex:r},h({props:i.props,dataStartIndex:t,dataEndIndex:r,updateId:n},i.state))})),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:r})}})),Nc(Ac(i),"handleMouseEnter",(function(e){var t=i.getMouseInfo(e);if(t){var r=Mc(Mc({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseEnter;M()(n)&&n(r,e)}})),Nc(Ac(i),"triggeredAfterMouseMove",(function(e){var t=i.getMouseInfo(e),r=t?Mc(Mc({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseMove;M()(n)&&n(r,e)})),Nc(Ac(i),"handleItemMouseEnter",(function(e){i.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))})),Nc(Ac(i),"handleItemMouseLeave",(function(){i.setState((function(){return{isTooltipActive:!1}}))})),Nc(Ac(i),"handleMouseMove",(function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)})),Nc(Ac(i),"handleMouseLeave",(function(e){var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var r=i.props.onMouseLeave;M()(r)&&r(t,e)})),Nc(Ac(i),"handleOuterEvent",(function(e){var t,r=function(e){var t=e&&e.type;return t&&ot[t]?ot[t]:null}(e),n=_()(i.props,"".concat(r));r&&M()(n)&&n(null!==(t=/.*touch.*/i.test(r)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)})),Nc(Ac(i),"handleClick",(function(e){var t=i.getMouseInfo(e);if(t){var r=Mc(Mc({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onClick;M()(n)&&n(r,e)}})),Nc(Ac(i),"handleMouseDown",(function(e){var t=i.props.onMouseDown;M()(t)&&t(i.getMouseInfo(e),e)})),Nc(Ac(i),"handleMouseUp",(function(e){var t=i.props.onMouseUp;M()(t)&&t(i.getMouseInfo(e),e)})),Nc(Ac(i),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])})),Nc(Ac(i),"handleTouchStart",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])})),Nc(Ac(i),"handleTouchEnd",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])})),Nc(Ac(i),"triggerSyncEvent",(function(e){void 0!==i.props.syncId&&pc.emit(fc,i.props.syncId,e,i.eventEmitterSymbol)})),Nc(Ac(i),"applySyncEvent",(function(e){var t=i.props,r=t.layout,n=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,c=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(Mc({dataStartIndex:a,dataEndIndex:c},h({props:i.props,dataStartIndex:a,dataEndIndex:c,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,s=e.chartY,u=e.activeTooltipIndex,p=i.state,f=p.offset,d=p.tooltipTicks;if(!f)return;if("function"==typeof n)u=n(d,e);else if("value"===n){u=-1;for(var m=0;m<d.length;m++)if(d[m].value===e.activeLabel){u=m;break}}var y=Mc(Mc({},f),{},{x:f.left,y:f.top}),v=Math.min(l,y.x+y.width),g=Math.min(s,y.y+y.height),b=d[u]&&d[u].value,x=$c(i.state,i.props.data,u),w=d[u]?{x:"horizontal"===r?d[u].coordinate:v,y:"horizontal"===r?g:d[u].coordinate}:Lc;i.setState(Mc(Mc({},e),{},{activeLabel:b,activeCoordinate:w,activePayload:x,activeTooltipIndex:u}))}else i.setState(e)})),Nc(Ac(i),"verticalCoordinatesGenerator",(function(e,t){var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return jr(fo(Mc(Mc(Mc({},Oa.defaultProps),r),{},{ticks:Er(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)})),Nc(Ac(i),"horizontalCoordinatesGenerator",(function(e,t){var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return jr(fo(Mc(Mc(Mc({},Oa.defaultProps),r),{},{ticks:Er(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)})),Nc(Ac(i),"axesTicksGenerator",(function(e){return Er(e,!0)})),Nc(Ac(i),"renderCursor",(function(e){var t,n=i.state,o=n.isTooltipActive,a=n.activeCoordinate,c=n.activePayload,l=n.offset,s=n.activeTooltipIndex,u=n.tooltipAxisBandSize,p=i.getTooltipEventType(),d=null!==(t=e.props.active)&&void 0!==t?t:o;if(!e||!e.props.cursor||!d||!a||"ScatterChart"!==r&&"axis"!==p)return null;var h,m=i.props.layout,y=ea;if("ScatterChart"===r)h=a,y=aa;else if("BarChart"===r)h=function(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:t.y-i,width:"horizontal"===e?n:r.width-1,height:"horizontal"===e?r.height-1:n}}(m,a,l,u),y=ei;else if("radial"===m){var v=ie(a),g=v.cx,b=v.cy,x=v.radius;h={cx:g,cy:b,startAngle:v.startAngle,endAngle:v.endAngle,innerRadius:x,outerRadius:x},y=yi}else h={points:gc(m,a,l)},y=ea;var w=e.key||"_recharts-cursor",O=Mc(Mc(Mc(Mc({stroke:"#ccc",pointerEvents:"none"},l),h),mt(e.props.cursor)),{},{payload:c,payloadIndex:s,key:w,className:"recharts-tooltip-cursor"});return(0,f.isValidElement)(e.props.cursor)?(0,f.cloneElement)(e.props.cursor,O):(0,f.createElement)(y,O)})),Nc(Ac(i),"renderPolarAxis",(function(e,t,r){var n=_()(e,"type.axisType"),o=_()(i.state,"".concat(n,"Map")),a=o&&o[e.props["".concat(n,"Id")]];return(0,f.cloneElement)(e,Mc(Mc({},a),{},{className:n,key:e.key||"".concat(t,"-").concat(r),ticks:Er(a,!0)}))})),Nc(Ac(i),"renderXAxis",(function(e,t,r){var n=i.state.xAxisMap[e.props.xAxisId];return i.renderAxis(n,e,t,r)})),Nc(Ac(i),"renderYAxis",(function(e,t,r){var n=i.state.yAxisMap[e.props.yAxisId];return i.renderAxis(n,e,t,r)})),Nc(Ac(i),"renderGrid",(function(e){var t=i.state,r=t.xAxisMap,n=t.yAxisMap,o=t.offset,a=i.props,c=a.width,l=a.height,s=ge(r),u=W()(n,(function(e){return H()(e.domain,Number.isFinite)}))||ge(n),p=e.props||{};return(0,f.cloneElement)(e,{key:e.key||"grid",x:de(p.x)?p.x:o.left,y:de(p.y)?p.y:o.top,width:de(p.width)?p.width:o.width,height:de(p.height)?p.height:o.height,xAxis:s,yAxis:u,offset:o,chartWidth:c,chartHeight:l,verticalCoordinatesGenerator:p.verticalCoordinatesGenerator||i.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:p.horizontalCoordinatesGenerator||i.horizontalCoordinatesGenerator})})),Nc(Ac(i),"renderPolarGrid",(function(e){var t=e.props,r=t.radialLines,n=t.polarAngles,o=t.polarRadius,a=i.state,c=a.radiusAxisMap,l=a.angleAxisMap,s=ge(c),u=ge(l),p=u.cx,d=u.cy,h=u.innerRadius,m=u.outerRadius;return(0,f.cloneElement)(e,{polarAngles:Array.isArray(n)?n:Er(u,!0).map((function(e){return e.coordinate})),polarRadius:Array.isArray(o)?o:Er(s,!0).map((function(e){return e.coordinate})),cx:p,cy:d,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:r})})),Nc(Ac(i),"renderLegend",(function(){var e=i.state.formattedGraphicalItems,t=i.props,r=t.children,n=t.width,o=t.height,a=i.props.margin||{},c=n-(a.left||0)-(a.right||0),l=fr({children:r,formattedGraphicalItems:e,legendWidth:c,legendContent:s});if(!l)return null;var u=l.item,p=Sc(l,bc);return(0,f.cloneElement)(u,Mc(Mc({},p),{},{chartWidth:n,chartHeight:o,margin:a,onBBoxUpdate:i.handleLegendBBoxUpdate}))})),Nc(Ac(i),"renderTooltip",(function(){var e,t=pt(i.props.children,Ho);if(!t)return null;var r=i.state,n=r.isTooltipActive,o=r.activeCoordinate,a=r.activePayload,c=r.activeLabel,l=r.offset,s=null!==(e=t.props.active)&&void 0!==e?e:n;return(0,f.cloneElement)(t,{viewBox:Mc(Mc({},l),{},{x:l.left,y:l.top}),active:s,label:c,payload:s?a:[],coordinate:o})})),Nc(Ac(i),"renderBrush",(function(e){var t=i.props,r=t.margin,n=t.data,o=i.state,a=o.offset,c=o.dataStartIndex,l=o.dataEndIndex,s=o.updateId;return(0,f.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:Pr(i.handleBrushChange,e.props.onChange),data:n,x:de(e.props.x)?e.props.x:a.left,y:de(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(r.bottom||0),width:de(e.props.width)?e.props.width:a.width,startIndex:c,endIndex:l,updateId:"brush-".concat(s)})})),Nc(Ac(i),"renderReferenceElement",(function(e,t,r){if(!e)return null;var n=Ac(i).clipPathId,o=i.state,a=o.xAxisMap,c=o.yAxisMap,l=o.offset,s=e.props,u=s.xAxisId,p=s.yAxisId;return(0,f.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(r),xAxis:a[u],yAxis:c[p],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:n})})),Nc(Ac(i),"renderActivePoints",(function(e){var t=e.item,r=e.activePoint,n=e.basePoint,i=e.childIndex,o=e.isRange,a=[],c=t.props.key,l=t.item.props,s=l.activeDot,p=Mc(Mc({index:i,dataKey:l.dataKey,cx:r.x,cy:r.y,r:4,fill:wr(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value,key:"".concat(c,"-activePoint-").concat(i)},mt(s)),Je(s));return a.push(u.renderActiveDot(s,p)),n?a.push(u.renderActiveDot(s,Mc(Mc({},p),{},{cx:n.x,cy:n.y,key:"".concat(c,"-basePoint-").concat(i)}))):o&&a.push(null),a})),Nc(Ac(i),"renderGraphicChild",(function(e,t,r){var n=i.filterFormatItem(e,t,r);if(!n)return null;var o=i.getTooltipEventType(),a=i.state,c=a.isTooltipActive,l=a.tooltipAxis,s=a.activeTooltipIndex,u=a.activeLabel,p=pt(i.props.children,Ho),d=n.props,h=d.points,m=d.isRange,y=d.baseLine,v=n.item.props,g=v.activeDot,b=v.hide,x=v.activeBar,w=v.activeShape,O=Boolean(!b&&c&&p&&(g||x||w)),k={};"axis"!==o&&p&&"click"===p.props.trigger?k={onClick:Pr(i.handleItemMouseEnter,e.props.onClick)}:"axis"!==o&&(k={onMouseLeave:Pr(i.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:Pr(i.handleItemMouseEnter,e.props.onMouseEnter)});var S=(0,f.cloneElement)(e,Mc(Mc({},n.props),k));if(O){if(!(s>=0)){var j,E=(null!==(j=i.getItemByXY(i.state.activeCoordinate))&&void 0!==j?j:{graphicalItem:S}).graphicalItem,A=E.item,P=void 0===A?e:A,T=E.childIndex,C=Mc(Mc(Mc({},n.props),k),{},{activeIndex:T});return[(0,f.cloneElement)(P,C),null,null]}var D,M;if(l.dataKey&&!l.allowDuplicatedCategory){var N="function"==typeof l.dataKey?function(e){return"function"==typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());D=xe(h,N,u),M=m&&y&&xe(y,N,u)}else D=null==h?void 0:h[s],M=m&&y&&y[s];if(w||x){var R=void 0!==e.props.activeIndex?e.props.activeIndex:s;return[(0,f.cloneElement)(e,Mc(Mc(Mc({},n.props),k),{},{activeIndex:R})),null,null]}if(!I()(D))return[S].concat(Tc(i.renderActivePoints({item:n,activePoint:D,basePoint:M,childIndex:s,isRange:m})))}return m?[S,null,null]:[S,null]})),Nc(Ac(i),"renderCustomized",(function(e,t,r){return(0,f.cloneElement)(e,Mc(Mc({key:"recharts-customized-".concat(r)},i.props),i.state))})),Nc(Ac(i),"renderMap",{CartesianGrid:{handler:i.renderGrid,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:i.renderReferenceElement},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:i.renderXAxis},YAxis:{handler:i.renderYAxis},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(t=e.id)&&void 0!==t?t:ye("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=$()(i.triggeredAfterMouseMove,null!==(n=e.throttleDelay)&&void 0!==n?n:1e3/60),i.state={},i}return t=u,n=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(r=this.props.margin.left)&&void 0!==r?r:0,top:null!==(n=this.props.margin.top)&&void 0!==n?n:0}}),null):null;var r,n}},{key:"componentDidUpdate",value:function(){}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=pt(this.props.children,Ho);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return c.indexOf(t)>=0?t:o}return o}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,r=this.container,n=r.getBoundingClientRect(),i=(t=n).top+window.scrollY-document.documentElement.clientTop,o=t.left+window.scrollX-document.documentElement.clientLeft,a={chartX:Math.round(e.pageX-o),chartY:Math.round(e.pageY-i)},c=n.width/r.offsetWidth||1,l=this.inRange(a.chartX,a.chartY,c);if(!l)return null;var s=this.state,u=s.xAxisMap,p=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&u&&p){var f=ge(u).scale,d=ge(p).scale,h=f&&f.invert?f.invert(a.chartX):null,m=d&&d.invert?d.invert(a.chartY):null;return Mc(Mc({},a),{},{xValue:h,yValue:m})}var y=Uc(this.state,this.props.data,this.props.layout,l);return y?Mc(Mc({},a),y):null}},{key:"inRange",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.props.layout,i=e/r,o=t/r;if("horizontal"===n||"vertical"===n){var a=this.state.offset;return i>=a.left&&i<=a.left+a.width&&o>=a.top&&o<=a.top+a.height?{x:i,y:o}:null}var c=this.state,l=c.angleAxisMap,s=c.radiusAxisMap;if(l&&s){var u=ge(l);return ne({x:i,y:o},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),r=pt(e,Ho),n={};return r&&"axis"===t&&(n="click"===r.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),Mc(Mc({},Je(this.props,this.handleOuterEvent)),n)}},{key:"addListener",value:function(){pc.on(fc,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){pc.removeListener(fc,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,r){for(var n=this.state.formattedGraphicalItems,i=0,o=n.length;i<o;i++){var a=n[i];if(a.item===e||a.props.key===e.key||t===at(a.item.type)&&r===a.childIndex)return a}return null}},{key:"renderAxis",value:function(e,t,r,n){var i=this.props,o=i.width,a=i.height;return d().createElement(Oa,kc({},e,{className:X()("recharts-".concat(e.axisType," ").concat(e.axisType),e.className),key:t.key||"".concat(r,"-").concat(n),viewBox:{x:0,y:0,width:o,height:a},ticksGenerator:this.axesTicksGenerator}))}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,r=t.left,n=t.top,i=t.height,o=t.width;return d().createElement("defs",null,d().createElement("clipPath",{id:e},d().createElement("rect",{x:r,y:n,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var r=Oc(t,2),n=r[0],i=r[1];return Mc(Mc({},e),{},Nc({},n,i.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var r=Oc(t,2),n=r[0],i=r[1];return Mc(Mc({},e),{},Nc({},n,i.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,r=t.formattedGraphicalItems,n=t.activeItem;if(r&&r.length)for(var i=0,o=r.length;i<o;i++){var a=r[i],c=a.props,l=a.item,s=at(l.type);if("Bar"===s){var u=(c.data||[]).find((function(t){return Qn(e,t)}));if(u)return{graphicalItem:a,payload:u}}else if("RadialBar"===s){var p=(c.data||[]).find((function(t){return ne(e,t)}));if(p)return{graphicalItem:a,payload:p}}else if(Si(a,n)||ji(a,n)||Ei(a,n)){var f=Ci({graphicalItem:a,activeTooltipItem:n,itemData:l.props.data}),d=void 0===l.props.activeIndex?f:l.props.activeIndex;return{graphicalItem:Mc(Mc({},a),{},{childIndex:d}),payload:Ei(a,n)?l.props.data[f]:a.props.data[f]}}}return null}},{key:"render",value:function(){var e=this;if(!ft(this))return null;var t,r,n=this.props,i=n.children,o=n.className,a=n.width,c=n.height,l=n.style,s=n.compact,u=n.title,p=n.desc,f=Sc(n,xc),h=mt(f);if(s)return d().createElement(Tt,kc({},h,{width:a,height:c,title:u,desc:p}),this.renderClipPath(),gt(i,this.renderMap));this.props.accessibilityLayer&&(h.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,h.role=null!==(r=this.props.role)&&void 0!==r?r:"img",h.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},h.onFocus=function(){e.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return d().createElement("div",kc({className:X()("recharts-wrapper",o),style:Mc({position:"relative",cursor:"default",width:a,height:c},l)},m,{ref:function(t){e.container=t},role:"region"}),d().createElement(Tt,kc({},h,{width:a,height:c,title:u,desc:p,style:_c}),this.renderClipPath(),gt(i,this.renderMap)),this.renderLegend(),this.renderTooltip())}}],n&&jc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(f.Component),Nc(t,"displayName",r),Nc(t,"defaultProps",Mc({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),Nc(t,"getDerivedStateFromProps",(function(e,t){var r=e.dataKey,n=e.data,i=e.children,o=e.width,a=e.height,c=e.layout,l=e.stackOffset,s=e.margin;if(void 0===t.updateId){var u=qc(e);return Mc(Mc(Mc({},u),{},{updateId:0},h(Mc(Mc({props:e},u),{},{updateId:0}),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:c,prevStackOffset:l,prevMargin:s,prevChildren:i})}if(r!==t.prevDataKey||n!==t.prevData||o!==t.prevWidth||a!==t.prevHeight||c!==t.prevLayout||l!==t.prevStackOffset||!Xe(s,t.prevMargin)){var p=qc(e),f={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},d=Mc(Mc({},Uc(t,n,c)),{},{updateId:t.updateId+1}),m=Mc(Mc(Mc({},p),f),d);return Mc(Mc(Mc({},m),h(Mc({props:e},m),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:c,prevStackOffset:l,prevMargin:s,prevChildren:i})}if(!yt(i,t.prevChildren)){var y=I()(n)?t.updateId+1:t.updateId;return Mc(Mc({updateId:y},h(Mc(Mc({props:e},t),{},{updateId:y}),t)),{},{prevChildren:i})}return null})),Nc(t,"renderActiveDot",(function(e,t){var r;return r=(0,f.isValidElement)(e)?(0,f.cloneElement)(e,t):M()(e)?e(t):d().createElement(la,t),d().createElement(wt,{className:"recharts-active-dot",key:t.key},r)})),t},Xc=["type","layout","connectNulls","ref"];function Vc(e){return Vc="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},Vc(e)}function Kc(){return Kc=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},Kc.apply(this,arguments)}function Yc(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 Zc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yc(Object(r),!0).forEach((function(t){il(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qc(e){return function(e){if(Array.isArray(e))return Jc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Jc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function el(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,ol(n.key),n)}}function tl(e,t){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tl(e,t)}function rl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nl(e)}function il(e,t,r){return(t=ol(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ol(e){var t=function(e,t){if("object"!==Vc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Vc(t)?t:String(t)}var al=function(e){!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&&tl(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=nl(i);if(o){var r=nl(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Vc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rl(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return il(rl(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!0,totalLength:0}),il(rl(e),"generateSimpleStrokeDasharray",(function(e,t){return"".concat(t,"px ").concat(e-t,"px")})),il(rl(e),"getStrokeDasharray",(function(t,r,n){var i=n.reduce((function(e,t){return e+t}));if(!i)return e.generateSimpleStrokeDasharray(r,t);for(var o=Math.floor(t/i),a=t%i,l=r-t,s=[],u=0,p=0;u<n.length;p+=n[u],++u)if(p+n[u]>a){s=[].concat(Qc(n.slice(0,u)),[a-p]);break}var f=s.length%2==0?[0,l]:[l];return[].concat(Qc(c.repeat(n,o)),Qc(s),f).map((function(e){return"".concat(e,"px")})).join(", ")})),il(rl(e),"id",ye("recharts-line-")),il(rl(e),"pathRef",(function(t){e.mainCurve=t})),il(rl(e),"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()})),il(rl(e),"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()})),e}return t=c,n=[{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:"repeat",value:function(e,t){for(var r=e.length%2!=0?[].concat(Qc(e),[0]):e,n=[],i=0;i<t;++i)n=[].concat(Qc(n),Qc(r));return n}},{key:"renderDotItem",value:function(e,t){var r;if(d().isValidElement(e))r=d().cloneElement(e,t);else if(M()(e))r=e(t);else{var n=X()("recharts-line-dot",e?e.className:"");r=d().createElement(la,Kc({},t,{className:n}))}return r}}],(r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.points,i=r.xAxis,o=r.yAxis,a=r.layout,c=ut(r.children,jt);if(!c)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:br(e.payload,t)}},s={clipPath:e?"url(#clipPath-".concat(t,")"):null};return d().createElement(wt,s,c.map((function(e){return d().cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,dataPointFormatter:l})})))}},{key:"renderDots",value:function(e,t,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,i=n.dot,o=n.points,a=n.dataKey,l=mt(this.props),s=mt(i,!0),u=o.map((function(e,t){var r=Zc(Zc(Zc({key:"dot-".concat(t),r:3},l),s),{},{value:e.value,dataKey:a,cx:e.x,cy:e.y,index:t,payload:e.payload});return c.renderDotItem(i,r)})),p={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return d().createElement(wt,Kc({className:"recharts-line-dots",key:"dots"},p),u)}},{key:"renderCurveStatically",value:function(e,t,r,n){var i=this.props,o=i.type,a=i.layout,c=i.connectNulls,l=(i.ref,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,Xc)),s=Zc(Zc(Zc({},mt(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(r,")"):null,points:e},n),{},{type:o,layout:a,connectNulls:c});return d().createElement(ea,Kc({},s,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.strokeDasharray,a=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,s=n.animationEasing,u=n.animationId,p=n.animateNewValues,f=n.width,h=n.height,m=this.state,y=m.prevPoints,v=m.totalLength;return d().createElement(Ur(),{begin:c,duration:l,isActive:a,easing:s,from:{t:0},to:{t:1},key:"line-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(y){var c=y.length/i.length,l=i.map((function(e,t){var r=Math.floor(t*c);if(y[r]){var n=y[r],i=be(n.x,e.x),o=be(n.y,e.y);return Zc(Zc({},e),{},{x:i(a),y:o(a)})}if(p){var l=be(2*f,e.x),s=be(h/2,e.y);return Zc(Zc({},e),{},{x:l(a),y:s(a)})}return Zc(Zc({},e),{},{x:e.x,y:e.y})}));return r.renderCurveStatically(l,e,t)}var s,u=be(0,v)(a);if(o){var d="".concat(o).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));s=r.getStrokeDasharray(u,v,d)}else s=r.generateSimpleStrokeDasharray(v,u);return r.renderCurveStatically(i,e,t,{strokeDasharray:s})}))}},{key:"renderCurve",value:function(e,t){var r=this.props,n=r.points,i=r.isAnimationActive,o=this.state,a=o.prevPoints,c=o.totalLength;return i&&n&&n.length&&(!a&&c>0||!Ue()(a,n))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(n,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.xAxis,c=t.yAxis,l=t.top,s=t.left,u=t.width,p=t.height,f=t.isAnimationActive,h=t.id;if(r||!i||!i.length)return null;var m=this.state.isAnimationFinished,y=1===i.length,v=X()("recharts-line",o),g=a&&a.allowDataOverflow,b=c&&c.allowDataOverflow,x=g||b,w=I()(h)?this.id:h,O=null!==(e=mt(n))&&void 0!==e?e:{r:3,strokeWidth:2},k=O.r,S=void 0===k?3:k,j=O.strokeWidth,E=void 0===j?2:j,A=(ht(n)?n:{}).clipDot,P=void 0===A||A,T=2*S+E;return d().createElement(wt,{className:v},g||b?d().createElement("defs",null,d().createElement("clipPath",{id:"clipPath-".concat(w)},d().createElement("rect",{x:g?s:s-u/2,y:b?l:l-p/2,width:g?u:2*u,height:b?p:2*p})),!P&&d().createElement("clipPath",{id:"clipPath-dots-".concat(w)},d().createElement("rect",{x:s-T/2,y:l-T/2,width:u+T,height:p+T}))):null,!y&&this.renderCurve(x,w),this.renderErrorBar(x,w),(y||n)&&this.renderDots(x,P,w),(!f||m)&&$n.renderCallByParent(this.props,i))}}])&&el(t.prototype,r),n&&el(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);il(al,"displayName","Line"),il(al,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!we.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),il(al,"getComposedData",(function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,c=e.bandSize,l=e.displayedData,s=e.offset,u=t.layout;return Zc({points:l.map((function(e,t){var l=br(e,a);return"horizontal"===u?{x:Dr({axis:r,ticks:i,bandSize:c,entry:e,index:t}),y:I()(l)?null:n.scale(l),value:l,payload:e}:{x:I()(l)?null:r.scale(l),y:Dr({axis:n,ticks:o,bandSize:c,entry:e,index:t}),value:l,payload:e}})),layout:u},s)}));var cl=function(){return null};cl.displayName="XAxis",cl.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0};var ll=function(){return null};ll.displayName="YAxis",ll.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1};var sl,ul=Gc({chartName:"LineChart",GraphicalChild:al,axisComponents:[{axisType:"xAxis",AxisComp:cl},{axisType:"yAxis",AxisComp:ll}],formatAxisMap:ro}),pl=Gc({chartName:"BarChart",GraphicalChild:Ki,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:cl},{axisType:"yAxis",AxisComp:ll}],formatAxisMap:ro}),fl=["layout","type","stroke","connectNulls","isRange","ref"];function dl(e){return dl="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},dl(e)}function hl(){return hl=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},hl.apply(this,arguments)}function ml(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 yl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ml(Object(r),!0).forEach((function(t){wl(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ml(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vl(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,Ol(n.key),n)}}function gl(e,t){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gl(e,t)}function bl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xl(e)}function wl(e,t,r){return(t=Ol(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ol(e){var t=function(e,t){if("object"!==dl(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==dl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===dl(t)?t:String(t)}var kl=function(e){!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&&gl(e,t)}(c,e);var t,r,n,i,o,a=(i=c,o=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}}(),function(){var e,t=xl(i);if(o){var r=xl(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===dl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bl(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wl(bl(e=a.call.apply(a,[this].concat(r))),"state",{isAnimationFinished:!0}),wl(bl(e),"id",ye("recharts-area-")),wl(bl(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),M()(t)&&t()})),wl(bl(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),M()(t)&&t()})),e}return t=c,n=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],(r=[{key:"renderDots",value:function(e,t,r){var n=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(n&&!i)return null;var o=this.props,a=o.dot,l=o.points,s=o.dataKey,u=mt(this.props),p=mt(a,!0),f=l.map((function(e,t){var r=yl(yl(yl({key:"dot-".concat(t),r:3},u),p),{},{dataKey:s,cx:e.x,cy:e.y,index:t,value:e.value,payload:e.payload});return c.renderDotItem(a,r)})),h={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return d().createElement(wt,hl({className:"recharts-area-dots"},h),f)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,r=t.baseLine,n=t.points,i=t.strokeWidth,o=n[0].x,a=n[n.length-1].x,c=e*Math.abs(o-a),l=Ne()(n.map((function(e){return e.y||0})));return de(r)&&"number"==typeof r?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(Ne()(r.map((function(e){return e.y||0}))),l)),de(l)?d().createElement("rect",{x:o<a?o:o-c,y:0,width:c,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,r=t.baseLine,n=t.points,i=t.strokeWidth,o=n[0].y,a=n[n.length-1].y,c=e*Math.abs(o-a),l=Ne()(n.map((function(e){return e.x||0})));return de(r)&&"number"==typeof r?l=Math.max(r,l):r&&Array.isArray(r)&&r.length&&(l=Math.max(Ne()(r.map((function(e){return e.x||0}))),l)),de(l)?d().createElement("rect",{x:0,y:o<a?o:o-c,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,r,n){var i=this.props,o=i.layout,a=i.type,c=i.stroke,l=i.connectNulls,s=i.isRange,u=(i.ref,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,fl));return d().createElement(wt,{clipPath:r?"url(#clipPath-".concat(n,")"):null},d().createElement(ea,hl({},mt(u,!0),{points:e,connectNulls:l,type:a,baseLine:t,layout:o,stroke:"none",className:"recharts-area-area"})),"none"!==c&&d().createElement(ea,hl({},mt(this.props),{className:"recharts-area-curve",layout:o,type:a,connectNulls:l,fill:"none",points:e})),"none"!==c&&s&&d().createElement(ea,hl({},mt(this.props),{className:"recharts-area-curve",layout:o,type:a,connectNulls:l,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.baseLine,a=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,s=n.animationEasing,u=n.animationId,p=this.state,f=p.prevPoints,h=p.prevBaseLine;return d().createElement(Ur(),{begin:c,duration:l,isActive:a,easing:s,from:{t:0},to:{t:1},key:"area-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(f){var c,l=f.length/i.length,s=i.map((function(e,t){var r=Math.floor(t*l);if(f[r]){var n=f[r],i=be(n.x,e.x),o=be(n.y,e.y);return yl(yl({},e),{},{x:i(a),y:o(a)})}return e}));return c=de(o)&&"number"==typeof o?be(h,o)(a):I()(o)||le()(o)?be(h,0)(a):o.map((function(e,t){var r=Math.floor(t*l);if(h[r]){var n=h[r],i=be(n.x,e.x),o=be(n.y,e.y);return yl(yl({},e),{},{x:i(a),y:o(a)})}return e})),r.renderAreaStatically(s,c,e,t)}return d().createElement(wt,null,d().createElement("defs",null,d().createElement("clipPath",{id:"animationClipPath-".concat(t)},r.renderClipRect(a))),d().createElement(wt,{clipPath:"url(#animationClipPath-".concat(t,")")},r.renderAreaStatically(i,o,e,t)))}))}},{key:"renderArea",value:function(e,t){var r=this.props,n=r.points,i=r.baseLine,o=r.isAnimationActive,a=this.state,c=a.prevPoints,l=a.prevBaseLine,s=a.totalLength;return o&&n&&n.length&&(!c&&s>0||!Ue()(c,n)||!Ue()(l,i))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(n,i,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.top,c=t.left,l=t.xAxis,s=t.yAxis,u=t.width,p=t.height,f=t.isAnimationActive,h=t.id;if(r||!i||!i.length)return null;var m=this.state.isAnimationFinished,y=1===i.length,v=X()("recharts-area",o),g=l&&l.allowDataOverflow,b=s&&s.allowDataOverflow,x=g||b,w=I()(h)?this.id:h,O=null!==(e=mt(n))&&void 0!==e?e:{r:3,strokeWidth:2},k=O.r,S=void 0===k?3:k,j=O.strokeWidth,E=void 0===j?2:j,A=(ht(n)?n:{}).clipDot,P=void 0===A||A,T=2*S+E;return d().createElement(wt,{className:v},g||b?d().createElement("defs",null,d().createElement("clipPath",{id:"clipPath-".concat(w)},d().createElement("rect",{x:g?c:c-u/2,y:b?a:a-p/2,width:g?u:2*u,height:b?p:2*p})),!P&&d().createElement("clipPath",{id:"clipPath-dots-".concat(w)},d().createElement("rect",{x:c-T/2,y:a-T/2,width:u+T,height:p+T}))):null,y?null:this.renderArea(x,w),(n||y)&&this.renderDots(x,P,w),(!f||m)&&$n.renderCallByParent(this.props,i))}}])&&vl(t.prototype,r),n&&vl(t,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(f.PureComponent);sl=kl,wl(kl,"displayName","Area"),wl(kl,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!we.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),wl(kl,"getBaseValue",(function(e,t,r,n){var i=e.layout,o=e.baseValue,a=t.props.baseValue,c=null!=a?a:o;if(de(c)&&"number"==typeof c)return c;var l="horizontal"===i?n:r,s=l.scale.domain();if("number"===l.type){var u=Math.max(s[0],s[1]),p=Math.min(s[0],s[1]);return"dataMin"===c?p:"dataMax"===c||u<0?u:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===c?s[0]:"dataMax"===c?s[1]:s[0]})),wl(kl,"getComposedData",(function(e){var t,r=e.props,n=e.item,i=e.xAxis,o=e.yAxis,a=e.xAxisTicks,c=e.yAxisTicks,l=e.bandSize,s=e.dataKey,u=e.stackedData,p=e.dataStartIndex,f=e.displayedData,d=e.offset,h=r.layout,m=u&&u.length,y=sl.getBaseValue(r,n,i,o),v="horizontal"===h,g=!1,b=f.map((function(e,t){var r;m?r=u[p+t]:(r=br(e,s),Array.isArray(r)?g=!0:r=[y,r]);var n=null==r[1]||m&&null==br(e,s);return v?{x:Dr({axis:i,ticks:a,bandSize:l,entry:e,index:t}),y:n?null:o.scale(r[1]),value:r,payload:e}:{x:n?null:i.scale(r[1]),y:Dr({axis:o,ticks:c,bandSize:l,entry:e,index:t}),value:r,payload:e}}));return t=m||g?b.map((function(e){var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=t&&null!=e.y?o.scale(t):null}:{x:null!=t?i.scale(t):null,y:e.y}})):v?o.scale(y):i.scale(y),yl({points:b,baseLine:t,layout:h,isRange:g},d)})),wl(kl,"renderDotItem",(function(e,t){return d().isValidElement(e)?d().cloneElement(e,t):M()(e)?e(t):d().createElement(la,hl({},t,{className:"recharts-area-dot"}))}));var Sl=Gc({chartName:"AreaChart",GraphicalChild:kl,axisComponents:[{axisType:"xAxis",AxisComp:cl},{axisType:"yAxis",AxisComp:ll}],formatAxisMap:ro});function jl(e){return jl="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},jl(e)}function El(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 Al(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?El(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!==jl(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===jl(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):El(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Tl=(0,f.forwardRef)((function(e,t){var r=e.aspect,n=e.initialDimension,i=void 0===n?{width:-1,height:-1}:n,o=e.width,a=void 0===o?"100%":o,c=e.height,l=void 0===c?"100%":c,s=e.minWidth,u=void 0===s?0:s,p=e.minHeight,h=e.maxHeight,m=e.children,y=e.debounce,v=void 0===y?0:y,g=e.id,b=e.className,x=e.onResize,w=e.style,O=void 0===w?{}:w,k=(0,f.useRef)(null),S=(0,f.useRef)();S.current=x,(0,f.useImperativeHandle)(t,(function(){return k}));var j,E,A=(j=(0,f.useState)({containerWidth:i.width,containerHeight:i.height}),E=2,function(e){if(Array.isArray(e))return e}(j)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(j,E)||function(e,t){if(e){if("string"==typeof e)return Pl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pl(e,t):void 0}}(j,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.")}()),P=A[0],T=A[1],C=(0,f.useCallback)((function(e,t){T((function(r){var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}}))}),[]);(0,f.useEffect)((function(){var e=function(e){var t,r=e[0].contentRect,n=r.width,i=r.height;C(n,i),null===(t=S.current)||void 0===t||t.call(S,n,i)};v>0&&(e=$()(e,v,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),r=k.current.getBoundingClientRect(),n=r.width,i=r.height;return C(n,i),t.observe(k.current),function(){t.disconnect()}}),[C,v]);var I=(0,f.useMemo)((function(){var e=P.containerWidth,t=P.containerHeight;if(e<0||t<0)return null;Et(fe(a)||fe(l),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",a,l),Et(!r||r>0,"The aspect(%s) must be greater than zero.",r);var n=fe(a)?e:a,i=fe(l)?t:l;r&&r>0&&(n?i=n/r:i&&(n=i*r),h&&i>h&&(i=h)),Et(n>0||i>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",n,i,a,l,u,p,r);var o=!Array.isArray(m)&&(0,Ge.isElement)(m)&&at(m.type).endsWith("Chart");return d().Children.map(m,(function(e){return(0,Ge.isElement)(e)?(0,f.cloneElement)(e,Al({width:n,height:i},o?{style:Al({height:"100%",width:"100%",maxHeight:i,maxWidth:n},e.props.style)}:{})):e}))}),[r,m,l,h,p,u,P,a]);return d().createElement("div",{id:g?"".concat(g):void 0,className:X()("recharts-responsive-container",b),style:Al(Al({},O),{},{width:a,height:l,minWidth:u,minHeight:p,maxHeight:h}),ref:k},I)})),Cl=r(450),Il=r.n(Cl),Dl=function(){return Dl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Dl.apply(this,arguments)};function Ml(e){var t=new Date,r=new Date(e);return Math.floor((t.getTime()-r.getTime())/1e3)}var Nl,Rl=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function Bl(e,t){return function(e,t){var r,n=new Date(e),i=navigator.language;return r=t===Nl.HOUR?{hour:"numeric",minute:"2-digit",hour12:!0}:{month:"short",day:"numeric"},n.toLocaleString(i,r)}(e,t<=1?Nl.HOUR:Nl.MONTH_DATE)}function _l(e){var t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),i=t>0?"".concat(t,":"):"",o="".concat(t>0?r.toString().padStart(2,"0"):r),a=n.toString().padStart(2,"0");return"".concat(i).concat(o,":").concat(a)}function Ll(e,t){var r={};return e&&(r={width:e}),t&&(r=Dl(Dl({},r),{height:t})),e||t||(r={className:"rustic-fit-container"}),r}function zl(t){return t.name.replaceAll("_","-"),(0,e.jsx)("span",{className:"".concat(t.className?t.className+" ":"","material-symbols-rounded"),children:t.name})}!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(Nl||(Nl={}));var Fl=function(){return Fl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Fl.apply(this,arguments)},$l={line:ul,bar:pl,area:Sl};function Ul(e){var t={};return e.forEach((function(e){t[e]=!0})),t}function Wl(t){var r=(0,f.useState)(t.defaultChartType||"line"),n=r[0],i=r[1],o=(0,f.useState)(null),a=o[0],c=o[1],l=(0,f.useState)(t.timeSeries),s=l[0],u=l[1],p=T()(),d=s.length>0?Object.keys(s[0]):[],h=d[0],m=d.slice(1),y=(0,f.useState)(Ul(m)),g=y[0],x=y[1];(0,f.useEffect)((function(){if(t.updatedData&&t.updatedData.length>0){var e=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],t.timeSeries,!0);t.updatedData.forEach((function(t){e=e.concat(t.timeSeries),u(e)}))}}),[t.timeSeries,t.updatedData]);var O=$l[n];function S(e){a?c(null):e&&c(e.currentTarget)}function E(e,r){return g[e]?t.chartColors[r%t.chartColors.length]:"grey"}function P(e){return g[e]?"none":"line-through"}if(0===s.length)return(0,e.jsx)(j(),{variant:"body2",children:"No data available"});var C,I,D,M,N=t.timeSeries[t.timeSeries.length-1],R=(C=t.timeSeries[0][h],I=N[h],D=new Date(C),M=new Date(I),Math.round(Math.abs((M.getTime()-D.getTime())/864e5)));return(0,e.jsxs)(A(),{className:"rustic-recharts-time-series",children:[!t.disableChartTypeToggle&&(0,e.jsxs)(v(),{className:"rustic-recharts-time-series-chart-toggle",children:[(0,e.jsx)(b(),{"aria-label":"chart options","aria-expanded":Boolean(a),"aria-haspopup":"true",onClick:S,color:"primary",children:(0,e.jsx)(zl,{name:"more_vert"})}),(0,e.jsxs)(w(),{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:a,open:Boolean(a),onClose:function(e){return S(e)},children:[(0,e.jsx)(j(),{className:"rustic-recharts-time-series-chart-toggle-title",children:"Chart Types:"}),Object.keys($l).map((function(t){return(0,e.jsxs)(k(),{value:t,selected:t===n,onClick:function(){return function(e){i(e),S()}(t)},children:[t.charAt(0).toUpperCase()+t.slice(1)," ","Chart"]},t)}))]})]}),(0,e.jsxs)(A(),{children:[t.title&&(0,e.jsx)(j(),{variant:"subtitle2",className:"rustic-recharts-time-series-title",children:t.title}),t.description&&(0,e.jsx)(j(),{variant:"caption",className:"rustic-recharts-time-series-description",children:t.description}),(0,e.jsx)(Tl,{aspect:t.aspectRatio,width:t.width,maxHeight:t.maxHeight,minWidth:t.minChartWidth,children:(0,e.jsxs)(O,{data:s,margin:t.chartContainerMargin,children:[(0,e.jsx)(cl,{dataKey:h,tickFormatter:function(e){return Bl(e,R)},stroke:p.palette.text.primary}),(0,e.jsx)(ll,{domain:["auto","auto"],width:t.yAxisLabelWidth,tickFormatter:t.yAxisTickFormatter,stroke:p.palette.text.primary}),(0,e.jsx)(Ho,{labelFormatter:function(e){return[Bl(e,R)]},formatter:t.tooltipFormatter,contentStyle:{color:p.palette.common.black}}),(0,e.jsx)(lr,{content:function(){return(0,e.jsx)(A(),{className:"rustic-recharts-time-series-legend",children:m.map((function(t,r){return(0,e.jsxs)(A(),{className:"rustic-recharts-time-series-legend-item",onClick:function(){return function(e){var t,r=g[e]&&!m.find((function(t){return t!==e&&g[t]}));if(function(e){return Object.values(e).every((function(e){return!0===e}))}(g)){for(var n={},i=0,o=m;i<o.length;i++){var a=o[i],c=a===e;n[a]=c}x(n)}else x(r?Ul(m):Fl(Fl({},g),((t={})[e]=!g[e],t)))}(t)},sx:{color:E(t,r)},children:[(0,e.jsx)(zl,{name:"crop_16_9"}),(0,e.jsx)(j(),{variant:"body2",display:"inline",sx:{textDecorationLine:P(t)},children:t})]},r)}))})}}),m.map((function(r,i){return g[r]?function(r,i){var o=i%t.chartColors.length,a=g[r]?t.chartColors[o]:"transparent",c={onClick:t.onClick,cursor:"pointer"};switch(n){case"line":return(0,e.jsx)(al,{type:"monotone",isAnimationActive:!1,dataKey:r,name:r,dot:!1,stroke:a,activeDot:t.onClick&&c},r);case"bar":return(0,e.jsx)(Ki,{dataKey:r,fill:a,onClick:t.onClick&&c.onClick,cursor:t.onClick&&c.cursor},r);case"area":return(0,e.jsxs)(f.Fragment,{children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"color".concat(r),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,e.jsx)("stop",{offset:"5%",stopColor:a,stopOpacity:.8}),(0,e.jsx)("stop",{offset:"95%",stopColor:a,stopOpacity:0})]})}),(0,e.jsx)(kl,{isAnimationActive:!1,dataKey:r,type:"monotone",stroke:a,fillOpacity:1,fill:"url(#color".concat(r,")"),activeDot:t.onClick&&c},r)]},r)}}(r,i):null})),t.referenceLineYAxis&&t.referenceLineYAxis.map((function(r,n){return(0,e.jsx)(tc,{y:r,label:t.referenceLineLabel&&t.referenceLineLabel[n],stroke:t.referenceLineColor&&t.referenceLineColor[n],strokeDasharray:"3 3",ifOverflow:"extendDomain",strokeWidth:t.referenceLineStrokeWidth&&t.referenceLineStrokeWidth[n],isFront:!0},n)}))]})})]})]})}Wl.defaultProps={minChartWidth:200,maxHeight:600,yAxisLabelWidth:30,aspectRatio:16/9,disableChartTypeToggle:!1};const ql=Wl,Hl=require("@codemirror/language"),Gl=require("@codemirror/language-data"),Xl=require("@codemirror/state"),Vl=require("@codemirror/view"),Kl=require("@mui/system");function Yl(t){var r=(0,f.useRef)(null),n=(0,f.useRef)(),i=new Xl.Compartment,o=[Xl.EditorState.readOnly.of(!0),(0,Vl.highlightSpecialChars)(),(0,Hl.syntaxHighlighting)(Hl.defaultHighlightStyle,{fallback:!0}),i.of([])],a=Gl.languages.find((function(e){return e.name.toLowerCase()===t.language.toLowerCase()}));return(0,f.useEffect)((function(){if(r.current&&!n.current){var e=r.current,c=Xl.EditorState.create({doc:t.code,extensions:o});n.current=new Vl.EditorView({state:c,parent:e}),a&&n.current&&a.load().then((function(e){var t;null===(t=n.current)||void 0===t||t.dispatch({effects:i.reconfigure(e.extension)})}))}}),[]),(0,e.jsx)(Kl.Box,{sx:{backgroundColor:"background.default"},className:"rustic-code-snippet",children:(0,e.jsx)("div",{"aria-label":"code snippet",ref:r,children:(0,e.jsx)(j(),{variant:"body2","aria-label":"language type",children:t.language})})})}var Zl=function(){return Zl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Zl.apply(this,arguments)};const Ql=function(t){var r=t.supportedElements[t.message.format];return(0,e.jsx)(e.Fragment,{children:r?d().createElement(r,Zl(Zl({},t.message.data),t.message.threadMessagesData&&{updatedData:t.message.threadMessagesData})):(0,e.jsxs)(j(),{variant:"body2",children:["Unsupported element format: ",t.message.format]})})},Jl=require("@mui/material/CircularProgress");var es=r.n(Jl),ts=function(){return ts=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ts.apply(this,arguments)};function rs(t){var r=(0,f.useState)(!0),n=r[0],i=r[1],o=(0,f.useState)(""),a=o[0],c=o[1];return a.length>0?(0,e.jsx)(j(),{variant:"body2",children:a}):(0,e.jsxs)("figure",{children:[n&&(0,e.jsx)(es(),{}),(0,e.jsx)("img",ts({},Ll(t.width,t.height),{src:t.src,alt:t.alt,onError:function(){c("Image failed to load"),i(!1)},onLoad:function(){i(!1)}})),t.description&&(0,e.jsx)("figcaption",{children:(0,e.jsx)(j(),{variant:"body2",children:t.description})})]})}rs.defaultProps={alt:"An image is displayed"};const ns=require("crypto");var is=r.n(ns);const os={randomUUID:is().randomUUID},as=new Uint8Array(256);let cs=as.length;function ls(){return cs>as.length-16&&(is().randomFillSync(as),cs=0),as.slice(cs,cs+=16)}const ss=[];for(let e=0;e<256;++e)ss.push((e+256).toString(16).slice(1));const us=function(e,t,r){if(os.randomUUID&&!t&&!e)return os.randomUUID();const n=(e=e||{}).random||(e.rng||ls)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return ss[e[t+0]]+ss[e[t+1]]+ss[e[t+2]]+ss[e[t+3]]+"-"+ss[e[t+4]]+ss[e[t+5]]+"-"+ss[e[t+6]]+ss[e[t+7]]+"-"+ss[e[t+8]]+ss[e[t+9]]+"-"+ss[e[t+10]]+ss[e[t+11]]+ss[e[t+12]]+ss[e[t+13]]+ss[e[t+14]]+ss[e[t+15]]}(n)},ps=require("@mui/material/InputAdornment");var fs=r.n(ps);const ds=require("@mui/material/TextField");var hs=r.n(ds);const ms=require("@mui/material/Tooltip");var ys=r.n(ms),vs=(0,f.forwardRef)((function(t,r){var n=(0,f.useState)(""),i=n[0],o=n[1],a=(0,f.useState)(!1),c=a[0],s=a[1],u=(0,f.useState)(!1),p=u[0],d=u[1],h=(0,f.useState)(!1),m=h[0],y=h[1],v=(0,f.useState)(""),g=v[0],x=v[1],w=(0,f.useRef)(null),O=!i.trim().length&&!t.isSendEnabled,k="".concat(c?"Stop":"Start"," speech to text"),S=c?"error.main":p?"primary.main":"primary.light",E=c?"stop_circle":"speech_to_text",A={"no-speech":"No speech detected. Check your microphone volume and try again.",aborted:"Speech input was aborted. Ensure no other windows are accessing your microphone and try again.","audio-capture":"Could not capture any audio. Check that your microphone is connected and try again.",network:"Failed to connect to the internet for recognition. Check your internet connection and try again.","not-allowed":"This functionality requires microphone access. Please allow microphone access and try again.","service-not-allowed":"Speech recognition service is not allowed, either because the browser doesn't support it or because of reasons of security, privacy or user preference.","bad-grammar":"There was an error in the speech recognition grammar or format. Check your speech input or grammar rules.","language-not-supported":"The language you're speaking isn't supported. Try speaking in a different language or check your device settings."},P={endAdornment:(0,e.jsx)(fs(),{position:"end",children:m?(0,e.jsx)(es(),{size:24}):(0,e.jsx)(ys(),{title:k,children:(0,e.jsx)(b(),{onClick:function(){var e=new window.webkitSpeechRecognition,t=navigator.language;e.lang=t,c?(e.stop(),y(!0),s(!1)):(e.start(),x(""),s(!0)),e.onstart=function(){s(!0)},e.onresult=function(e){var t,r=e.results[0][0].transcript;i.length>0?o(i+" "+r):o(r),null===(t=w.current)||void 0===t||t.focus(),s(!1)},e.onerror=function(e){var t=A[e.error];x(t),s(!1)},e.onend=function(){y(!1),s(!1)}},size:"small",sx:{color:S},children:(0,e.jsx)(zl,{name:E})})})})};function T(){var e=(new Date).toISOString(),r={id:us(),timestamp:e,sender:t.sender,conversationId:t.conversationId,format:"text",data:{text:i}};t.send(r),o(""),x("")}return(0,e.jsxs)(l(),{className:"rustic-base-input",ref:r,children:[(0,e.jsxs)(l(),{className:"rustic-error-and-input-container",children:[(0,e.jsx)(l(),{className:"rustic-error-container",children:(0,e.jsx)(j(),{variant:"caption",color:"error",className:"rustic-error-message",children:g})}),(0,e.jsxs)(l(),{className:"rustic-input-field",sx:{border:"1px solid",borderColor:p?"secondary.main":"action.disabled"},children:[(0,e.jsx)(hs(),{className:"rustic-text-field",variant:"outlined",value:i,label:t.label,placeholder:t.placeholder,maxRows:t.maxRows,multiline:t.multiline,fullWidth:t.fullWidth,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),!O&&T())},onChange:function(e){x(""),o(e.target.value)},onFocus:function(){return d(!0)},onBlur:function(){return d(!1)},inputRef:w,color:"secondary",size:"small",InputProps:t.enableSpeechToText?P:{},InputLabelProps:{className:p?"":"rustic-input-label",sx:{backgroundColor:"background.paper"}}}),(0,e.jsx)("div",{className:"rustic-input-extras"})]})]}),(0,e.jsxs)(l(),{className:"rustic-input-actions",children:[t.children,(0,e.jsx)(ys(),{title:"Send",children:(0,e.jsx)(b(),{"aria-label":"send message",onClick:T,disabled:O,color:"primary",className:"rustic-send-button",children:(0,e.jsx)(zl,{name:"send"})})})]})]})}));vs.defaultProps={multiline:!0,fullWidth:!0,maxRows:6,enableSpeechToText:!1};const gs=vs,bs=require("@mui/material/LinearProgress");var xs=r.n(bs);const ws=require("axios");var Os=r.n(ws);const ks=require("react-dom"),Ss=require("@mui/material/Card");var js=r.n(Ss);function Es(t){var r,n=(0,s.useTheme)();return(0,e.jsxs)(js(),{className:"rustic-file-preview",variant:"outlined",sx:{boxShadow:n.shadows[1]},children:[(0,e.jsx)(j(),{variant:"subtitle2",children:(r=t.file.name,15,r.length<=15?r:r.substring(0,12)+"...")}),t.children]})}var As=function(){return As=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},As.apply(this,arguments)},Ps=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};function Ts(e){for(var t=["Bytes","KB","MB","GB"],r=0;e>=1024&&r<t.length-1;)e/=1024,r++;var n=e.toFixed(1).toString().replace(/\.0$/,"");return"".concat(n," ").concat(t[r])}const Cs=function(t){var r=(0,f.useState)([]),n=r[0],i=r[1],o=(0,f.useState)([]),a=o[0],c=o[1],s=(0,f.useRef)({}),u=us();(0,f.useEffect)((function(){i([]),c([]),s.current={}}),[t.messageId]);var p=(0,e.jsx)(l(),{className:"rustic-files rustic-padding-16",children:n.map((function(r,n){return(0,e.jsx)(Es,{file:{name:r.name},children:(0,e.jsxs)(l(),{className:"rustic-flex-center",children:[r.loadingProgress<100&&(0,e.jsx)(xs(),{variant:"determinate",color:"secondary",value:r.loadingProgress,className:"rustic-upload-progress"}),(0,e.jsx)(ys(),{title:"Delete",children:(0,e.jsx)(b(),{color:"primary",onClick:function(){return function(e,r){var n,o;c([]);var a=e.name;if(s.current=As(As({},s.current),((n={})[a]=s.current[a]--,n)),t.onFileUpdate("remove",a),100===e.loadingProgress){var l="".concat(t.deleteFileEndpoint,"?message-id=").concat(t.messageId,"&file-id=").concat(e.id);Os().delete(l).then((function(){return i((function(e){return e.filter((function(e,t){return t!==r}))}))})).catch((function(){return t.onFileUpdate("add",a),c((function(e){return Ps(Ps([],e,!0),["Failed to delete ".concat(a,". Please try again.")],!1)}))}))}else e.abortController.abort(),i((function(e){return e.filter((function(e,t){return t!==r}))})),s.current=As(As({},s.current),((o={})[a]=s.current[a]++,o))}(r,n)},className:"rustic-delete-button","aria-label":"cancel file upload",children:(0,e.jsx)("span",{className:"material-symbols-rounded",children:"cancel"})})})]})},n)}))}),d=(0,e.jsx)(l(),{children:a.map((function(t,r){return(0,e.jsx)(j(),{variant:"caption",color:"error",className:"rustic-error-message",children:t},r)}))});function h(e,t){return t?(0,ks.createPortal)(e,t):e}return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(l(),{className:"rustic-uploader",children:[(0,e.jsx)("label",{htmlFor:u,children:(0,e.jsx)(ys(),{title:"Upload",children:(0,e.jsx)(b(),{component:"span","aria-label":"Upload file",color:"primary",children:(0,e.jsx)("span",{className:"material-symbols-rounded",children:"upload_2"})})})}),(0,e.jsx)("input",{type:"file",id:u,onChange:function(e){c([]);var r=e.target.files&&Array.from(e.target.files),o=n.length+(r?r.length:0);t.maxFileCount&&o>t.maxFileCount&&c((function(e){return Ps(Ps([],e,!0),["You can only upload ".concat(t.maxFileCount," files.")],!1)}));var a=r&&function(e,t,r){return r?t<=r?e:e.slice(0,r-t):e}(r,o,t.maxFileCount);a&&a.forEach((function(e){!function(e){var r;t.maxFileSize&&e.size>t.maxFileSize?(r=e.name,c((function(e){return Ps(Ps([],e,!0),["Failed to upload ".concat(r,". You cannot upload files larger than ").concat(t.maxFileSize&&Ts(t.maxFileSize),".")],!1)}))):function(e){var r=new FormData,n=new AbortController,o=function(e){var t,r,n=e.name,i=s.current[n];if(i){var o=i+1,a=n.lastIndexOf("."),c=n.substring(0,a),l=n.substring(a);n="".concat(c,"(").concat(i,")").concat(l),s.current=As(As({},s.current),((t={})[e.name]=o,t))}else s.current=As(As({},s.current),((r={})[e.name]=1,r));return n}(e),a=new File([e],o,{type:e.type});r.append("file",a);var l=us(),u={name:o,loadingProgress:0,abortController:n,id:l};i((function(e){return Ps(Ps([],e,!0),[u],!1)})),t.onFileUpdate("add",o);var p="".concat(t.uploadFileEndpoint,"?message-id=").concat(t.messageId);Os().post(p,r,{onUploadProgress:function(e){var t,r;e.total&&(t=e.loaded/e.total*100,r=u.id,i((function(e){var n=e.map((function(e){return e.id===r?As(As({},e),{loadingProgress:t}):e}));return n})))},signal:n.signal}).then((function(e){var t,r;t=e.data,r=u.id,i((function(e){var n=e.findIndex((function(e){return e.id===r}));if(-1!==n){var i=Ps([],e,!0);return i[n]=As(As({},i[n]),{id:t.fileId}),i}return e}))})).catch((function(r){var n,a;t.onFileUpdate("remove",o),s.current=As(As({},s.current),((n={})[o]=s.current[e.name]--,n)),function(e,t,r){c((function(t){return Ps(Ps([],t,!0),["Failed to upload ".concat(e,". ").concat((null==r?void 0:r.message)||"")],!1)})),i((function(e){return e.filter((function(e){return e.id!==t}))}))}(e.name,u.id,null===(a=r.response)||void 0===a?void 0:a.data)}))}(e)}(e)})),e.target.value=""},multiple:!0,accept:t.acceptedFileTypes})]}),a.length>0&&h(d,t.errorMessagesContainer),n.length>0&&h(p,t.filePreviewsContainer)]})};var Is=function(){return Is=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Is.apply(this,arguments)},Ds=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};function Ms(t){var r=(0,f.useState)([]),n=r[0],i=r[1],o=(0,f.useState)(us()),a=o[0],c=o[1],s=(0,f.useState)(),u=s[0],p=s[1],d=(0,f.useState)(),h=d[0],m=d[1],y=(0,f.useRef)(null),v=n.length>0;return(0,f.useEffect)((function(){y.current&&(m(y.current.querySelector(".rustic-error-container")),p(y.current.querySelector(".rustic-input-extras")))})),(0,e.jsx)(l(),{className:"rustic-multimodal-input",children:(0,e.jsx)(gs,Is({},t,{send:function(e){v&&(e.id=a,e.format="multipart",e.data.files=n),t.ws.send(e),c(us()),i([])},isSendEnabled:v,ref:y,children:(0,e.jsx)(l(),{className:"rustic-bottom-buttons",children:(0,e.jsx)(Cs,{acceptedFileTypes:t.acceptedFileTypes,maxFileCount:t.maxFileCount,maxFileSize:t.maxFileSize,uploadFileEndpoint:t.uploadFileEndpoint,deleteFileEndpoint:t.deleteFileEndpoint,onFileUpdate:function(e,t){i("add"===e?function(e){return Ds(Ds([],e,!0),[{name:t}],!1)}:function(e){return e.filter((function(e){return e.name!==t}))})},messageId:a,filePreviewsContainer:u,errorMessagesContainer:h})})}))})}Ms.defaultProps={multiline:!0,fullWidth:!0,maxRows:6,maxFileSize:2097152,maxFileCount:1};var Ns=function(){return Ns=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ns.apply(this,arguments)},Rs=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function Bs(t){var r=t.ws,n=Rs(t,["ws"]);return(0,e.jsx)(gs,Ns({},n,{send:function(e){r.send(e)}}))}require("ol/ol.css");const _s=require("@mui/material/Alert");var Ls=r.n(_s);const zs=require("ol/layer/Tile.js");var Fs=r.n(zs);const $s=require("ol/Map.js");var Us=r.n($s);const Ws=require("ol/Overlay.js");var qs=r.n(Ws);const Hs=require("ol/proj.js"),Gs=require("ol/source/OSM.js");var Xs=r.n(Gs);const Vs=require("ol/View.js");var Ks=r.n(Vs);function Ys(t){var r=(0,f.useState)(""),n=r[0],i=r[1],o=(0,f.useRef)(null),a=(0,f.useRef)(null);return(0,f.useEffect)((function(){if(i(""),t.latitude<-90||t.latitude>90||t.longitude<-180||t.longitude>180)return i("Invalid coordinates");if(o.current&&a.current){var e=new(Us())({layers:[new(Fs())({source:new(Xs())})],view:new(Ks())({center:(0,Hs.fromLonLat)([t.longitude,t.latitude]),zoom:12}),target:o.current}),r=new(qs())({element:a.current,position:(0,Hs.fromLonLat)([t.longitude,t.latitude]),positioning:"bottom-center",stopEvent:!1});return e.addOverlay(r),e.once("postrender",(function(){var e;if(!(null===(e=o.current)||void 0===e?void 0:e.querySelector("canvas")))return i("An error occurred while loading the map")})),function(){e.setTarget(""),e.removeOverlay(r)}}}),[]),(0,e.jsx)(e.Fragment,{children:n.length>0?(0,e.jsx)(Ls(),{severity:"error",children:n}):(0,e.jsxs)(l(),{children:[(0,e.jsx)(l(),{ref:a,children:(0,e.jsx)(zl,{className:"rustic-open-layers-map-marker",name:"location_on"})}),(0,e.jsx)("div",{ref:o,className:"rustic-open-layers-map-canvas"})]})})}const{entries:Zs,setPrototypeOf:Qs,isFrozen:Js,getPrototypeOf:eu,getOwnPropertyDescriptor:tu}=Object;let{freeze:ru,seal:nu,create:iu}=Object,{apply:ou,construct:au}="undefined"!=typeof Reflect&&Reflect;ru||(ru=function(e){return e}),nu||(nu=function(e){return e}),ou||(ou=function(e,t,r){return e.apply(t,r)}),au||(au=function(e,t){return new e(...t)});const cu=bu(Array.prototype.forEach),lu=bu(Array.prototype.pop),su=bu(Array.prototype.push),uu=bu(String.prototype.toLowerCase),pu=bu(String.prototype.toString),fu=bu(String.prototype.match),du=bu(String.prototype.replace),hu=bu(String.prototype.indexOf),mu=bu(String.prototype.trim),yu=bu(RegExp.prototype.test),vu=(gu=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return au(gu,t)});var gu;function bu(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return ou(e,t,n)}}function xu(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:uu;Qs&&Qs(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(Js(t)||(t[n]=e),i=e)}e[i]=!0}return e}function wu(e){const t=iu(null);for(const[r,n]of Zs(e))void 0!==tu(e,r)&&(t[r]=n);return t}function Ou(e,t){for(;null!==e;){const r=tu(e,t);if(r){if(r.get)return bu(r.get);if("function"==typeof r.value)return bu(r.value)}e=eu(e)}return function(e){return console.warn("fallback value for",e),null}}const ku=ru(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Su=ru(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ju=ru(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Eu=ru(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Au=ru(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Pu=ru(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tu=ru(["#text"]),Cu=ru(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Iu=ru(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Du=ru(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mu=ru(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Nu=nu(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ru=nu(/<%[\w\W]*|[\w\W]*%>/gm),Bu=nu(/\${[\w\W]*}/gm),_u=nu(/^data-[\-\w.\u00B7-\uFFFF]/),Lu=nu(/^aria-[\-\w]+$/),zu=nu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fu=nu(/^(?:\w+script|data):/i),$u=nu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Uu=nu(/^html$/i);var Wu=Object.freeze({__proto__:null,MUSTACHE_EXPR:Nu,ERB_EXPR:Ru,TMPLIT_EXPR:Bu,DATA_ATTR:_u,ARIA_ATTR:Lu,IS_ALLOWED_URI:zu,IS_SCRIPT_OR_DATA:Fu,ATTR_WHITESPACE:$u,DOCTYPE_NAME:Uu});const qu=function(){return"undefined"==typeof window?null:window};var Hu=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qu();const r=t=>e(t);if(r.version="3.0.6",r.removed=[],!t||!t.document||9!==t.document.nodeType)return r.isSupported=!1,r;let{document:n}=t;const i=n,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:l,Element:s,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=t,m=s.prototype,y=Ou(m,"cloneNode"),v=Ou(m,"nextSibling"),g=Ou(m,"childNodes"),b=Ou(m,"parentNode");if("function"==typeof c){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,w="";const{implementation:O,createNodeIterator:k,createDocumentFragment:S,getElementsByTagName:j}=n,{importNode:E}=i;let A={};r.isSupported="function"==typeof Zs&&"function"==typeof b&&O&&void 0!==O.createHTMLDocument;const{MUSTACHE_EXPR:P,ERB_EXPR:T,TMPLIT_EXPR:C,DATA_ATTR:I,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:N}=Wu;let{IS_ALLOWED_URI:R}=Wu,B=null;const _=xu({},[...ku,...Su,...ju,...Au,...Tu]);let L=null;const z=xu({},[...Cu,...Iu,...Du,...Mu]);let F=Object.seal(iu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,U=null,W=!0,q=!0,H=!1,G=!0,X=!1,V=!1,K=!1,Y=!1,Z=!1,Q=!1,J=!1,ee=!0,te=!1,re=!0,ne=!1,ie={},oe=null;const ae=xu({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ce=null;const le=xu({},["audio","video","img","source","image","track"]);let se=null;const ue=xu({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xhtml";let he=de,me=!1,ye=null;const ve=xu({},[pe,fe,de],pu);let ge=null;const be=["application/xhtml+xml","text/html"];let xe=null,we=null;const Oe=n.createElement("form"),ke=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!we||we!==e){if(e&&"object"==typeof e||(e={}),e=wu(e),ge=ge=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===ge?pu:uu,B="ALLOWED_TAGS"in e?xu({},e.ALLOWED_TAGS,xe):_,L="ALLOWED_ATTR"in e?xu({},e.ALLOWED_ATTR,xe):z,ye="ALLOWED_NAMESPACES"in e?xu({},e.ALLOWED_NAMESPACES,pu):ve,se="ADD_URI_SAFE_ATTR"in e?xu(wu(ue),e.ADD_URI_SAFE_ATTR,xe):ue,ce="ADD_DATA_URI_TAGS"in e?xu(wu(le),e.ADD_DATA_URI_TAGS,xe):le,oe="FORBID_CONTENTS"in e?xu({},e.FORBID_CONTENTS,xe):ae,$="FORBID_TAGS"in e?xu({},e.FORBID_TAGS,xe):{},U="FORBID_ATTR"in e?xu({},e.FORBID_ATTR,xe):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,H=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,V=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,ne=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||zu,he=e.NAMESPACE||de,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(q=!1),Q&&(Z=!0),ie&&(B=xu({},[...Tu]),L=[],!0===ie.html&&(xu(B,ku),xu(L,Cu)),!0===ie.svg&&(xu(B,Su),xu(L,Iu),xu(L,Mu)),!0===ie.svgFilters&&(xu(B,ju),xu(L,Iu),xu(L,Mu)),!0===ie.mathMl&&(xu(B,Au),xu(L,Du),xu(L,Mu))),e.ADD_TAGS&&(B===_&&(B=wu(B)),xu(B,e.ADD_TAGS,xe)),e.ADD_ATTR&&(L===z&&(L=wu(L)),xu(L,e.ADD_ATTR,xe)),e.ADD_URI_SAFE_ATTR&&xu(se,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(oe===ae&&(oe=wu(oe)),xu(oe,e.FORBID_CONTENTS,xe)),re&&(B["#text"]=!0),V&&xu(B,["html","head","body"]),B.table&&(xu(B,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw vu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw vu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(h,o)),null!==x&&"string"==typeof w&&(w=x.createHTML(""));ru&&ru(e),we=e}},je=xu({},["mi","mo","mn","ms","mtext"]),Ee=xu({},["foreignobject","desc","title","annotation-xml"]),Ae=xu({},["title","style","font","a","script"]),Pe=xu({},Su);xu(Pe,ju),xu(Pe,Eu);const Te=xu({},Au);xu(Te,Pu);const Ce=function(e){su(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Ie=function(e,t){try{su(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){su(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!L[e])if(Z||Q)try{Ce(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,r=null;if(Y)e="<remove></remove>"+e;else{const t=fu(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===ge&&he===de&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=x?x.createHTML(e):e;if(he===de)try{t=(new d).parseFromString(i,ge)}catch(e){}if(!t||!t.documentElement){t=O.createDocument(he,"template",null);try{t.documentElement.innerHTML=me?w:i}catch(e){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),he===de?j.call(t,V?"html":"body")[0]:V?t.documentElement:o},Me=function(e){return k.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Ne=function(e){return"function"==typeof l&&e instanceof l},Re=function(e,t,n){A[e]&&cu(A[e],(e=>{e.call(r,t,n,we)}))},Be=function(e){let t=null;if(Re("beforeSanitizeElements",e,null),(n=e)instanceof f&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof p)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return Ce(e),!0;var n;const i=xe(e.nodeName);if(Re("uponSanitizeElement",e,{tagName:i,allowedTags:B}),e.hasChildNodes()&&!Ne(e.firstElementChild)&&yu(/<[/\w]/g,e.innerHTML)&&yu(/<[/\w]/g,e.textContent))return Ce(e),!0;if(!B[i]||$[i]){if(!$[i]&&Le(i)){if(F.tagNameCheck instanceof RegExp&&yu(F.tagNameCheck,i))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(i))return!1}if(re&&!oe[i]){const t=b(e)||e.parentNode,r=g(e)||e.childNodes;if(r&&t)for(let n=r.length-1;n>=0;--n)t.insertBefore(y(r[n],!0),v(e))}return Ce(e),!0}return e instanceof s&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});const r=uu(e.tagName),n=uu(t.tagName);return!!ye[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===de?"svg"===r:t.namespaceURI===pe?"svg"===r&&("annotation-xml"===n||je[n]):Boolean(Pe[r]):e.namespaceURI===pe?t.namespaceURI===de?"math"===r:t.namespaceURI===fe?"math"===r&&Ee[n]:Boolean(Te[r]):e.namespaceURI===de?!(t.namespaceURI===fe&&!Ee[n])&&!(t.namespaceURI===pe&&!je[n])&&!Te[r]&&(Ae[r]||!Pe[r]):!("application/xhtml+xml"!==ge||!ye[e.namespaceURI]))}(e)?(Ce(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!yu(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&3===e.nodeType&&(t=e.textContent,cu([P,T,C],(e=>{t=du(t,e," ")})),e.textContent!==t&&(su(r.removed,{element:e.cloneNode()}),e.textContent=t)),Re("afterSanitizeElements",e,null),!1):(Ce(e),!0)},_e=function(e,t,r){if(ee&&("id"===t||"name"===t)&&(r in n||r in Oe))return!1;if(q&&!U[t]&&yu(I,t));else if(W&&yu(D,t));else if(!L[t]||U[t]){if(!(Le(e)&&(F.tagNameCheck instanceof RegExp&&yu(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&yu(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&yu(F.tagNameCheck,r)||F.tagNameCheck instanceof Function&&F.tagNameCheck(r))))return!1}else if(se[t]);else if(yu(R,du(r,N,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==hu(r,"data:")||!ce[e])if(H&&!yu(M,du(r,N,"")));else if(r)return!1;return!0},Le=function(e){return e.indexOf("-")>0},ze=function(e){Re("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:c,value:l}=o,s=xe(a);let u="value"===a?l:mu(l);if(n.attrName=s,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,Re("uponSanitizeAttribute",e,n),u=n.attrValue,n.forceKeepAttr)continue;if(Ie(a,e),!n.keepAttr)continue;if(!G&&yu(/\/>/i,u)){Ie(a,e);continue}X&&cu([P,T,C],(e=>{u=du(u,e," ")}));const p=xe(e.nodeName);if(_e(p,s,u)){if(!te||"id"!==s&&"name"!==s||(Ie(a,e),u="user-content-"+u),x&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(c);else switch(h.getAttributeType(p,s)){case"TrustedHTML":u=x.createHTML(u);break;case"TrustedScriptURL":u=x.createScriptURL(u)}try{c?e.setAttributeNS(c,a,u):e.setAttribute(a,u),lu(r.removed)}catch(e){}}}Re("afterSanitizeAttributes",e,null)},Fe=function e(t){let r=null;const n=Me(t);for(Re("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)Re("uponSanitizeShadowNode",r,null),Be(r)||(r.content instanceof a&&e(r.content),ze(r));Re("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,c=null,s=null;if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ne(e)){if("function"!=typeof e.toString)throw vu("toString is not a function");if("string"!=typeof(e=e.toString()))throw vu("dirty is not a string, aborting")}if(!r.isSupported)return e;if(K||Se(t),r.removed=[],"string"==typeof e&&(ne=!1),ne){if(e.nodeName){const t=xe(e.nodeName);if(!B[t]||$[t])throw vu("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=De("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Z&&!X&&!V&&-1===e.indexOf("<"))return x&&J?x.createHTML(e):e;if(n=De(e),!n)return Z?null:J?w:""}n&&Y&&Ce(n.firstChild);const u=Me(ne?e:n);for(;c=u.nextNode();)Be(c)||(c.content instanceof a&&Fe(c.content),ze(c));if(ne)return e;if(Z){if(Q)for(s=S.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(L.shadowroot||L.shadowrootmode)&&(s=E.call(i,s,!0)),s}let p=V?n.outerHTML:n.innerHTML;return V&&B["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&yu(Uu,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p),X&&cu([P,T,C],(e=>{p=du(p,e," ")})),x&&J?x.createHTML(p):p},r.setConfig=function(){Se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},r.clearConfig=function(){we=null,K=!1},r.isValidAttribute=function(e,t,r){we||Se({});const n=xe(e),i=xe(t);return _e(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&(A[e]=A[e]||[],su(A[e],t))},r.removeHook=function(e){if(A[e])return lu(A[e])},r.removeHooks=function(e){A[e]&&(A[e]=[])},r.removeAllHooks=function(){A={}},r}();let Gu={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Xu(e){Gu=e}const Vu=/[&<>"']/,Ku=new RegExp(Vu.source,"g"),Yu=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Zu=new RegExp(Yu.source,"g"),Qu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ju=e=>Qu[e];function ep(e,t){if(t){if(Vu.test(e))return e.replace(Ku,Ju)}else if(Yu.test(e))return e.replace(Zu,Ju);return e}const tp=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function rp(e){return e.replace(tp,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const np=/(^|[^\[])\^/g;function ip(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,n)=>(n=(n="object"==typeof n&&"source"in n?n.source:n).replace(np,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r}function op(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const ap={exec:()=>null};function cp(e,t){const r=e.replace(/\|/g,((e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function lp(e,t,r){const n=e.length;if(0===n)return"";let i=0;for(;i<n;){const o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.slice(0,n-i)}function sp(e,t,r,n){const i=t.href,o=t.title?ep(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:r,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,e}return{type:"image",raw:r,href:i,title:o,text:ep(a)}}class up{options;rules;lexer;constructor(e){this.options=e||Gu}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:lp(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=lp(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=lp(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),r=this.lexer.state.top;this.lexer.state.top=!0;const n=this.lexer.blockTokens(e);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:n,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const o=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let a="",c="",l=!1;for(;e;){let r=!1;if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;a=t[0],e=e.substring(a.length);let n=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),s=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,c=n.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,c=n.slice(u),u+=t[1].length);let p=!1;if(!n&&/^ *$/.test(s)&&(a+=s+"\n",e=e.substring(s.length+1),r=!0),!r){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const l=e.split("\n",1)[0];if(s=l,this.options.pedantic&&(s=s.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(s))break;if(o.test(s))break;if(t.test(s))break;if(r.test(e))break;if(s.search(/[^ ]/)>=u||!s.trim())c+="\n"+s.slice(u);else{if(p)break;if(n.search(/[^ ]/)>=4)break;if(i.test(n))break;if(o.test(n))break;if(r.test(n))break;c+="\n"+s}p||s.trim()||(p=!0),a+=l+"\n",e=e.substring(l.length+1),n=s.slice(u)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(a)&&(l=!0));let f,d=null;this.options.gfm&&(d=/^\[[ xX]\] /.exec(c),d&&(f="[ ] "!==d[0],c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:a,task:!!d,checked:f,loose:!1,text:c,tokens:[]}),i.raw+=a}i.items[i.items.length-1].raw=a.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){const t=i.items[e].tokens.filter((e=>"space"===e.type)),r=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=r}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(t){if(!/[:|]/.test(t[2]))return;const e={type:"table",raw:t[0],header:cp(t[1]).map((e=>({text:e,tokens:[]}))),align:t[2].replace(/^\||\| *$/g,"").split("|"),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){let t,r,n,i,o=e.align.length;for(t=0;t<o;t++){const r=e.align[t];r&&(/^ *-+: *$/.test(r)?e.align[t]="right":/^ *:-+: *$/.test(r)?e.align[t]="center":/^ *:-+ *$/.test(r)?e.align[t]="left":e.align[t]=null)}for(o=e.rows.length,t=0;t<o;t++)e.rows[t]=cp(e.rows[t],e.header.length).map((e=>({text:e,tokens:[]})));for(o=e.header.length,r=0;r<o;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(o=e.rows.length,r=0;r<o;r++)for(i=e.rows[r],n=0;n<i.length;n++)i[n].tokens=this.lexer.inline(i[n].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:ep(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=lp(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return-1}(t[2],"()");if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(e)?r.slice(1):r.slice(1,-1)),sp(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return sp(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!r.match(/[\p{L}\p{N}]/u))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let i,o,a=r,c=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(o=[...i].length,n[3]||n[4]){a+=o;continue}if((n[5]||n[6])&&r%3&&!((r+o)%3)){c+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+c);const t=[...n[0]][0].length,l=e.slice(0,r+n.index+t+o);if(Math.min(r,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const s=l.slice(2,-2);return{type:"strong",raw:l,text:s,tokens:this.lexer.inlineTokens(s)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return r&&n&&(e=e.substring(1,e.length-1)),e=ep(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=ep(t[1]),r="mailto:"+e):(e=ep(t[1]),r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=ep(t[0]),r="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0]}while(n!==t[0]);e=ep(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:ep(t[0]),{type:"text",raw:t[0],text:e}}}}const pp={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ap,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};pp.def=ip(pp.def).replace("label",pp._label).replace("title",pp._title).getRegex(),pp.bullet=/(?:[*+-]|\d{1,9}[.)])/,pp.listItemStart=ip(/^( *)(bull) */).replace("bull",pp.bullet).getRegex(),pp.list=ip(pp.list).replace(/bull/g,pp.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pp.def.source+")").getRegex(),pp._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",pp._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,pp.html=ip(pp.html,"i").replace("comment",pp._comment).replace("tag",pp._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pp.lheading=ip(pp.lheading).replace(/bull/g,pp.bullet).getRegex(),pp.paragraph=ip(pp._paragraph).replace("hr",pp.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pp._tag).getRegex(),pp.blockquote=ip(pp.blockquote).replace("paragraph",pp.paragraph).getRegex(),pp.normal={...pp},pp.gfm={...pp.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},pp.gfm.table=ip(pp.gfm.table).replace("hr",pp.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pp._tag).getRegex(),pp.gfm.paragraph=ip(pp._paragraph).replace("hr",pp.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pp.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pp._tag).getRegex(),pp.pedantic={...pp.normal,html:ip("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",pp._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ap,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ip(pp.normal._paragraph).replace("hr",pp.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",pp.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const fp={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ap,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ap,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/,_punctuation:"\\p{P}$+<=>`^|~"};fp.punctuation=ip(fp.punctuation,"u").replace(/punctuation/g,fp._punctuation).getRegex(),fp.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,fp.anyPunctuation=/\\[punct]/g,fp._escapes=/\\([punct])/g,fp._comment=ip(pp._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),fp.emStrong.lDelim=ip(fp.emStrong.lDelim,"u").replace(/punct/g,fp._punctuation).getRegex(),fp.emStrong.rDelimAst=ip(fp.emStrong.rDelimAst,"gu").replace(/punct/g,fp._punctuation).getRegex(),fp.emStrong.rDelimUnd=ip(fp.emStrong.rDelimUnd,"gu").replace(/punct/g,fp._punctuation).getRegex(),fp.anyPunctuation=ip(fp.anyPunctuation,"gu").replace(/punct/g,fp._punctuation).getRegex(),fp._escapes=ip(fp._escapes,"gu").replace(/punct/g,fp._punctuation).getRegex(),fp._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,fp._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,fp.autolink=ip(fp.autolink).replace("scheme",fp._scheme).replace("email",fp._email).getRegex(),fp._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,fp.tag=ip(fp.tag).replace("comment",fp._comment).replace("attribute",fp._attribute).getRegex(),fp._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fp._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,fp._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,fp.link=ip(fp.link).replace("label",fp._label).replace("href",fp._href).replace("title",fp._title).getRegex(),fp.reflink=ip(fp.reflink).replace("label",fp._label).replace("ref",pp._label).getRegex(),fp.nolink=ip(fp.nolink).replace("ref",pp._label).getRegex(),fp.reflinkSearch=ip(fp.reflinkSearch,"g").replace("reflink",fp.reflink).replace("nolink",fp.nolink).getRegex(),fp.normal={...fp},fp.pedantic={...fp.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ip(/^!?\[(label)\]\((.*?)\)/).replace("label",fp._label).getRegex(),reflink:ip(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fp._label).getRegex()},fp.gfm={...fp.normal,escape:ip(fp.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},fp.gfm.url=ip(fp.gfm.url,"i").replace("email",fp.gfm._extended_email).getRegex(),fp.breaks={...fp.gfm,br:ip(fp.br).replace("{2,}","*").getRegex(),text:ip(fp.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class dp{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Gu,this.options.tokenizer=this.options.tokenizer||new up,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:pp.normal,inline:fp.normal};this.options.pedantic?(t.block=pp.pedantic,t.inline=fp.pedantic):this.options.gfm&&(t.block=pp.gfm,this.options.breaks?t.inline=fp.breaks:t.inline=fp.gfm),this.tokenizer.rules=t}static get rules(){return{block:pp,inline:fp}}static lex(e,t){return new dp(t).lex(e)}static lexInline(e,t){return new dp(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let r,n,i,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,r)=>t+" ".repeat(r.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),o=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,n,i,o,a,c,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(c=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,c))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(c=r.raw.slice(-1)),a=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class hp{options;constructor(e){this.options=e||Gu}code(e,t,r){const n=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="language-'+ep(n)+'">'+(r?e:ep(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:ep(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,r){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,r){const n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e,t,r){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,r){const n=op(e);if(null===n)return r;let i='<a href="'+(e=n)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+r+"</a>",i}image(e,t,r){const n=op(e);if(null===n)return r;let i=`<img src="${e=n}" alt="${r}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return e}}class mp{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class yp{options;renderer;textRenderer;constructor(e){this.options=e||Gu,this.options.renderer=this.options.renderer||new hp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new mp}static parse(e,t){return new yp(t).parse(e)}static parseInline(e,t){return new yp(t).parseInline(e)}parse(e,t=!0){let r="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){r+=t||"";continue}}switch(i.type){case"space":continue;case"hr":r+=this.renderer.hr();continue;case"heading":{const e=i;r+=this.renderer.heading(this.parseInline(e.tokens),e.depth,rp(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=i;r+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=i;let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(n);let o="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];n="";for(let t=0;t<r.length;t++)n+=this.renderer.tablecell(this.parseInline(r[t].tokens),{header:!1,align:e.align[t]});o+=this.renderer.tablerow(n)}r+=this.renderer.table(t,o);continue}case"blockquote":{const e=i,t=this.parse(e.tokens);r+=this.renderer.blockquote(t);continue}case"list":{const e=i,t=e.ordered,n=e.start,o=e.loose;let a="";for(let t=0;t<e.items.length;t++){const r=e.items[t],n=r.checked,i=r.task;let c="";if(r.task){const e=this.renderer.checkbox(!!n);o?r.tokens.length>0&&"paragraph"===r.tokens[0].type?(r.tokens[0].text=e+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&"text"===r.tokens[0].tokens[0].type&&(r.tokens[0].tokens[0].text=e+" "+r.tokens[0].tokens[0].text)):r.tokens.unshift({type:"text",text:e+" "}):c+=e+" "}c+=this.parse(r.tokens,o),a+=this.renderer.listitem(c,i,!!n)}r+=this.renderer.list(a,t,n);continue}case"html":{const e=i;r+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;r+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let o=i,a=o.tokens?this.parseInline(o.tokens):o.text;for(;n+1<e.length&&"text"===e[n+1].type;)o=e[++n],a+="\n"+(o.tokens?this.parseInline(o.tokens):o.text);r+=t?this.renderer.paragraph(a):a;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}parseInline(e,t){t=t||this.renderer;let r="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=e||"";continue}}switch(i.type){case"escape":{const e=i;r+=t.text(e.text);break}case"html":{const e=i;r+=t.html(e.text);break}case"link":{const e=i;r+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=i;r+=t.image(e.href,e.title,e.text);break}case"strong":{const e=i;r+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=i;r+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=i;r+=t.codespan(e.text);break}case"br":r+=t.br();break;case"del":{const e=i;r+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=i;r+=t.text(e.text);break}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}}class vp{options;constructor(e){this.options=e||Gu}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}const gp=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(dp.lex,yp.parse);parseInline=this.#e(dp.lexInline,yp.parseInline);Parser=yp;Renderer=hp;TextRenderer=mp;Lexer=dp;Tokenizer=up;Hooks=vp;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{const e=n;for(const n of e.header)r=r.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)r=r.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=n;r=r.concat(this.walkTokens(e.items,t));break}default:{const e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((n=>{r=r.concat(this.walkTokens(e[n],t))})):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new hp(this.defaults);for(const r in e.renderer){const n=e.renderer[r],i=r,o=t[i];t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new up(this.defaults);for(const r in e.tokenizer){const n=e.tokenizer[r],i=r,o=t[i];t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new vp;for(const r in e.hooks){const n=e.hooks[r],i=r,o=t[i];vp.passThroughHooks.has(r)?t[i]=e=>{if(this.defaults.async)return Promise.resolve(n.call(t,e)).then((e=>o.call(t,e)));const r=n.call(t,e);return o.call(t,r)}:t[i]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return dp.lex(e,t??this.defaults)}parser(e,t){return yp.parse(e,t??this.defaults)}#e(e,t){return(r,n)=>{const i={...n},o={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const a=this.#t(!!o.silent,!!o.async);if(null==r)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then((t=>e(t,o))).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));const n=e(r,o);o.walkTokens&&this.walkTokens(n,o.walkTokens);let i=t(n,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(e){return a(e)}}}#t(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+ep(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function bp(e,t){return gp.parse(e,t)}function xp(e){var t=e.replace(/^[\u200B-\u200F\uFEFF]/,""),r=bp.parse(t);return Hu.sanitize(r)}bp.options=bp.setOptions=function(e){return gp.setOptions(e),bp.defaults=gp.defaults,Xu(bp.defaults),bp},bp.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},bp.defaults=Gu,bp.use=function(...e){return gp.use(...e),bp.defaults=gp.defaults,Xu(bp.defaults),bp},bp.walkTokens=function(e,t){return gp.walkTokens(e,t)},bp.parseInline=gp.parseInline,bp.Parser=yp,bp.parser=yp.parse,bp.Renderer=hp,bp.TextRenderer=mp,bp.Lexer=dp,bp.lexer=dp.lex,bp.Tokenizer=up,bp.Hooks=vp,bp.parse=bp,bp.options,bp.setOptions,bp.use,bp.walkTokens,bp.parseInline,yp.parse,dp.lex;const wp=function(t){var r=(0,f.useState)(xp(t.text)),n=r[0],i=r[1];return(0,f.useEffect)((function(){if(t.updatedData&&t.updatedData.length>0){var e=t.updatedData[t.updatedData.length-1].text;i(xp(e))}}),[t.text,t.updatedData]),(0,e.jsx)(j(),{variant:"body2",dangerouslySetInnerHTML:{__html:n}})},Op=function(t){var r=(0,f.useState)(xp(t.text)),n=r[0],i=r[1],o=(0,f.useState)(""),a=o[0],c=o[1];return(0,f.useEffect)((function(){if(t.updatedData&&t.updatedData.length>0){for(var e=t.text,r=0,n=t.updatedData;r<n.length;r++){var o=n[r];"string"!=typeof o.text?(e+=" [MISSING TEXT]",c("Some of the incoming text was not correctly formatted. Some data may be missing.")):e+=o.text}i(xp(e))}}),[t.text,t.updatedData]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(j(),{variant:"body2",dangerouslySetInnerHTML:{__html:n}}),a&&(0,e.jsx)(Ls(),{severity:"error",children:a})]})},kp=require("@mui/material"),Sp=require("@mui/material/Button");var jp=r.n(Sp);const Ep=require("@mui/material/Slider");var Ap=r.n(Ep);function Pp(t){var r,n={play:{symbol:"play_circle",label:"play"},pause:{symbol:"pause_circle",label:"pause"},forward:{symbol:"forward_10",label:"forward ten seconds"},replay:{symbol:"replay_10",label:"replay ten seconds"},volumeUp:{symbol:"volume_up",label:"mute"},volumeOff:{symbol:"volume_off",label:"unmute"},pictureInPicture:{symbol:"picture_in_picture",label:"picture in picture"},pictureInPictureExit:{symbol:"picture_in_picture_off",label:"exit picture in picture"},fullscreen:{symbol:"fullscreen",label:"fullscreen"},fullscreenExit:{symbol:"fullscreen_exit",label:"exit fullscreen"},captionsOn:{symbol:"closed_caption",label:"show captions"},captionsOff:{symbol:"closed_caption_disabled",label:"hide captions"}};return n[t.action].label.replaceAll(" ","-"),(0,e.jsx)(ys(),{title:n[t.action].label,PopperProps:{container:null!==(r=document.fullscreenElement)&&void 0!==r?r:document.body},children:(0,e.jsx)(b(),{onClick:t.onClick,className:t.className,color:"primary",children:(0,e.jsx)(zl,{name:n[t.action].symbol})})})}var Tp=100;function Cp(t){var r=_l(t.mediaElement.currentTime);return(0,e.jsxs)(l(),{className:"rustic-progress",children:[function(){for(var r=t.mediaElement.buffered,n=0,i=r.length-1;i>=0;--i){var o=r.start(i),a=r.end(i);if(o<t.mediaElement.currentTime){n=a;break}}var c=n/t.mediaElement.duration*Tp;return(0,e.jsx)(xs(),{className:"rustic-progress-buffered",variant:"determinate",value:c})}(),(0,e.jsx)(Ap(),{className:"rustic-progress-slider",size:"small","aria-label":"Time","aria-valuetext":"Current time: ".concat(r),max:t.mediaElement.duration,value:t.mediaElement.currentTime,onChange:function(e,r){t.mediaElement.currentTime=r},valueLabelDisplay:"auto",valueLabelFormat:function(e){return _l(e)},color:"secondary"})]})}function Ip(t){var r=(0,f.useState)(t.mediaElement.volume),n=r[0],i=r[1],o=(0,f.useState)(t.mediaElement.volume),a=o[0],c=o[1],s=t.mediaElement.muted?"volumeOff":"volumeUp";return(0,e.jsxs)(l(),{className:"rustic-volume-settings",children:[(0,e.jsx)(Pp,{onClick:function(){t.mediaElement.muted=!t.mediaElement.muted,t.mediaElement.muted?(c(t.mediaElement.volume),i(0)):i(a)},className:"rustic-mute-button",action:s}),(0,e.jsx)(Ap(),{className:"rustic-volume-slider",size:"small",max:1,step:.1,"aria-label":"Volume","aria-valuetext":"Volume: ".concat(n*Tp,"%"),value:n,onChange:function(e,r){var n=r;t.mediaElement.muted=0===n,t.mediaElement.volume=n,i(t.mediaElement.volume)}})]})}function Dp(t){var r=t.isTranscriptVisible?"keyboard_arrow_up":"keyboard_arrow_down",n="".concat(t.isTranscriptVisible?"Hide":"Show"," Transcript");return(0,e.jsx)(jp(),{className:"rustic-transcript-toggle",onClick:t.setIsTranscriptVisible,endIcon:(0,e.jsx)(zl,{name:r}),children:(0,e.jsx)(j(),{variant:"overline",children:n})})}function Mp(t){var r=(0,f.useState)(!t.mediaElement.paused),n=r[0],i=r[1],o=n?"pause":"play";return t.mediaElement.onended=function(){i(!1)},t.mediaElement.onpause=function(){i(!1)},t.mediaElement.onplay=function(){i(!0)},(0,e.jsx)(Pp,{onClick:function(){n?t.mediaElement.pause():t.mediaElement.play().catch((function(e){t.onError("Failed to play the media. Error: ".concat(e.message))}))},action:o,className:"rustic-pause-play-icon"})}function Np(t){var r,n=(0,f.useState)(t.mediaElement.playbackRate),i=n[0],o=n[1];return(0,e.jsx)(ys(),{title:"playback rate",PopperProps:{container:null!==(r=document.fullscreenElement)&&void 0!==r?r:document.body},children:(0,e.jsx)(jp(),{onClick:function(){var e=1;t.mediaElement.playbackRate<2&&(e=t.mediaElement.playbackRate+.5),t.mediaElement.playbackRate=e,o(e)},className:"rustic-playback-rate-button",children:(0,e.jsxs)(j(),{variant:"body1",children:[i,"X"]})})})}function Rp(t){var r="replay"===t.movement,n=r?function(){t.mediaElement.currentTime-=10}:function(){t.mediaElement.currentTime+=10},i=r?"replay":"forward";return(0,e.jsx)(Pp,{onClick:n,action:i})}function Bp(t){var r=_l(t.elapsedTimeInSeconds),n=_l(t.durationTimeInSeconds),i="".concat(r," / ").concat(n);return"wide"===t.style?(0,e.jsxs)(l(),{className:"rustic-time-container",children:[(0,e.jsx)(j(),{variant:"overline",children:r}),(0,e.jsx)(j(),{variant:"overline",children:n})]}):(0,e.jsx)(j(),{variant:"overline",className:"rustic-time-display",children:i})}Bp.defaultProps={style:"condensed"};const _p=require("@mui/material/Divider");var Lp=r.n(_p);function zp(t){var r=!!document.fullscreenElement;return(0,e.jsxs)(Kl.Box,{className:"rustic-transcript-container",children:[!r&&(0,e.jsxs)(Kl.Box,{className:"rustic-transcript-header",children:[(0,e.jsx)(Lp(),{orientation:"vertical",flexItem:!0}),(0,e.jsx)(j(),{variant:"overline",color:"text.secondary",children:"Transcript"})]}),(0,e.jsx)(j(),{className:"rustic-transcript-content",variant:"body2",children:t.transcript})]})}function Fp(t){var r=(0,f.useState)(!1),n=r[0],i=r[1],o=(0,f.useState)(!1),a=o[0],c=o[1],l=(0,f.useState)(!0),s=l[0],u=l[1],p=(0,f.useState)(0),d=p[0],h=p[1],m=(0,f.useState)(""),y=m[0],v=m[1],g=(0,f.useState)(""),b=g[0],x=g[1],w=(0,kp.useTheme)(),O=(0,f.useRef)(null),k=(0,kp.useMediaQuery)(w.breakpoints.down("md"));function S(){return(0,e.jsx)(j(),{variant:"h6",className:"rustic-sound-title",children:t.title})}function E(){if(t.captions&&t.captions.length>0){var r=a?"captionsOff":"captionsOn";return(0,e.jsx)(Pp,{action:r,onClick:function(){return c(!a)}})}}function A(){if(O.current)return(0,e.jsxs)(Kl.Box,{className:"rustic-time-controls",children:[(0,e.jsx)(Rp,{mediaElement:O.current,movement:"replay"}),(0,e.jsx)(Mp,{mediaElement:O.current,onError:x}),(0,e.jsx)(Rp,{mediaElement:O.current,movement:"forward"})]})}function P(){if(t.transcript&&n)return(0,e.jsx)(zp,{transcript:t.transcript})}function T(){if(t.transcript)return(0,e.jsx)(Dp,{isTranscriptVisible:n,setIsTranscriptVisible:function(){return i(!n)}})}function C(){return(0,e.jsx)("video",{src:t.src,ref:O,className:a?"rustic-has-captions":"",children:a&&(0,e.jsx)("track",{src:t.captions,kind:"captions",default:!0})})}(0,f.useEffect)((function(){var e,t,r,n;function i(e){v(e)}null===(e=O.current)||void 0===e||e.addEventListener("timeupdate",(function(){O.current&&h(O.current.currentTime)})),null===(t=O.current)||void 0===t||t.addEventListener("canplay",(function(){v(""),u(!1)})),null===(r=O.current)||void 0===r||r.addEventListener("error",(function(){return i("Failed to load the audio.")})),null===(n=O.current)||void 0===n||n.addEventListener("stalled",(function(){return i("Failed to fetch audio data, but trying.")}))}),[]);var I=k?function(){if(O.current)return(0,e.jsxs)(Kl.Box,{className:"rustic-sound-controls",children:[(0,e.jsx)(Bp,{elapsedTimeInSeconds:d,durationTimeInSeconds:O.current.duration,style:"wide"}),(0,e.jsx)(Cp,{mediaElement:O.current}),S(),(0,e.jsxs)(Kl.Box,{className:"rustic-sound-bottom-controls",children:[(0,e.jsx)(Kl.Box,{className:"rustic-sound-bottom-controls-left",children:A()}),(0,e.jsx)(Ip,{mediaElement:O.current}),(0,e.jsxs)(Kl.Box,{className:"rustic-sound-bottom-controls-right",children:[T(),(0,e.jsxs)(Kl.Box,{children:[E(),(0,e.jsx)(Np,{mediaElement:O.current})]})]})]}),P()]})}:function(){if(O.current)return(0,e.jsxs)(e.Fragment,{children:[S(),(0,e.jsxs)(Kl.Box,{className:"rustic-sound-controls",children:[(0,e.jsx)(Cp,{mediaElement:O.current}),(0,e.jsxs)(Kl.Box,{className:"rustic-sound-bottom-controls",children:[(0,e.jsxs)(Kl.Box,{className:"rustic-sound-bottom-controls-left",children:[A(),E(),(0,e.jsx)(Np,{mediaElement:O.current}),(0,e.jsx)(Ip,{mediaElement:O.current}),(0,e.jsx)(Bp,{elapsedTimeInSeconds:d,durationTimeInSeconds:O.current.duration,style:"condensed"})]}),(0,e.jsx)(Kl.Box,{className:"rustic-sound-bottom-controls-right",children:T()})]}),P()]})]})};return y.length>0?(0,e.jsx)(Ls(),{severity:"error",children:y}):s?(0,e.jsxs)(Kl.Box,{className:"rustic-sound",children:[C(),(0,e.jsx)(es(),{})]}):(0,e.jsxs)(Kl.Box,{className:"rustic-sound",children:[C(),I(),b.length>0&&(0,e.jsx)(Ls(),{severity:"error",className:"rustic-control-error",onClose:function(){return x("")},children:b})]})}function $p(t){var r=(0,f.useState)(!!document.pictureInPictureElement),n=r[0],i=r[1],o=t.mediaElement,a=n?"pictureInPictureExit":"pictureInPicture";return o.onleavepictureinpicture=function(){i(!1)},(0,e.jsx)(Pp,{onClick:function(){n?document.exitPictureInPicture().then((function(){i(!1)})).catch((function(e){t.onError("Failed to exit picture-in-picture mode. Error: ".concat(e.message))})):o.requestPictureInPicture().then((function(){i(!0)})).catch((function(e){t.onError("Failed to enter picture-in-picture mode. Error: ".concat(e.message))}))},action:a})}function Up(t){var r=(0,f.useState)(!!document.fullscreenElement),n=r[0],i=r[1],o=t.element,a=n?"fullscreenExit":"fullscreen";return o.onfullscreenchange=function(){i(!!document.fullscreenElement)},(0,e.jsx)(Pp,{onClick:function(){n?document.exitFullscreen().then((function(){i(!1)})).catch((function(e){t.onError("Failed to exit fullscreen mode. Error: ".concat(e.message))})):o.requestFullscreen().then((function(){i(!0)})).catch((function(e){t.onError("Failed to enter fullscreen mode. Error: ".concat(e.message))}))},action:a})}function Wp(t){var r=(0,f.useState)(!1),n=r[0],i=r[1],o=(0,f.useState)(!1),a=o[0],c=o[1],l=(0,f.useState)(!0),s=l[0],u=l[1],p=(0,f.useState)(!!document.fullscreenElement),d=p[0],h=p[1],m=(0,f.useState)(!1),y=m[0],v=m[1],g=(0,f.useState)(""),b=g[0],x=g[1],w=(0,f.useState)(""),O=w[0],k=w[1],S=(0,f.useState)(0),E=S[0],A=S[1],P=(0,f.useRef)(null),T=(0,f.useRef)(null),C=(0,kp.useTheme)(),I=(0,kp.useMediaQuery)(C.breakpoints.down("md"));(0,f.useEffect)((function(){var e,t,r,n,i,o,a,c;function l(e){k(e),u(!1)}function s(){clearTimeout(c),c=setTimeout((function(){return v(!1)}),3e3)}null===(e=T.current)||void 0===e||e.addEventListener("timeupdate",(function(){T.current&&A(T.current.currentTime)})),null===(t=T.current)||void 0===t||t.addEventListener("canplay",(function(){k(""),u(!1)})),null===(r=T.current)||void 0===r||r.addEventListener("error",(function(){return l("Failed to load the video.")})),null===(n=T.current)||void 0===n||n.addEventListener("stalled",(function(){return l("Failed to fetch video data, but trying.")})),document.addEventListener("fullscreenchange",(function(){h(!!document.fullscreenElement)})),null===(i=P.current)||void 0===i||i.addEventListener("mousemove",(function(){v(!0),s()})),null===(o=P.current)||void 0===o||o.addEventListener("mouseleave",(function(){v(!1)})),null===(a=P.current)||void 0===a||a.addEventListener("keydown",(function(){v(!0),s()}))}),[]);var D={backgroundColor:C.palette.background.paper,opacity:y?1:0};function M(){if(t.transcript&&n)return(0,e.jsx)(zp,{transcript:t.transcript})}function N(){if(t.captions&&t.captions.length>0){var r=a?"captionsOff":"captionsOn";return(0,e.jsx)(Pp,{action:r,onClick:function(){return c(!a)}})}}function R(){if(t.transcript)return(0,e.jsx)(Dp,{isTranscriptVisible:n,setIsTranscriptVisible:function(){return i(!n)}})}var B=I?function(){return d?(0,e.jsx)(e.Fragment,{children:T.current&&P.current&&(0,e.jsxs)(Kl.Box,{className:"rustic-video-controls",sx:D,children:[(0,e.jsxs)(Kl.Box,{className:"rustic-video-top-controls",children:[(0,e.jsx)(Mp,{mediaElement:T.current,onError:x}),(0,e.jsx)(Cp,{mediaElement:T.current}),(0,e.jsx)(Bp,{elapsedTimeInSeconds:E,durationTimeInSeconds:T.current.duration})]}),(0,e.jsxs)(Kl.Box,{className:"rustic-video-bottom-controls",children:[(0,e.jsxs)(Kl.Box,{className:"rustic-time-controls",children:[(0,e.jsx)(Rp,{mediaElement:T.current,movement:"replay"}),(0,e.jsx)(Rp,{mediaElement:T.current,movement:"forward"}),N(),(0,e.jsx)(Np,{mediaElement:T.current})]}),R()]}),M()]})}):(0,e.jsx)(e.Fragment,{children:T.current&&P.current&&(0,e.jsxs)(Kl.Box,{className:"rustic-video-controls-mobile-preview",children:[(0,e.jsx)(Mp,{mediaElement:T.current,onError:x}),(0,e.jsxs)(Kl.Box,{className:"rustic-video-controls-right",children:[R(),(0,e.jsx)(Up,{element:P.current,onError:x})]})]})})}:function(){return(0,e.jsx)(e.Fragment,{children:T.current&&P.current&&(0,e.jsxs)(Kl.Box,{className:"rustic-video-controls",sx:D,children:[(0,e.jsx)(Cp,{mediaElement:T.current}),(0,e.jsxs)(Kl.Box,{className:"rustic-video-bottom-controls",children:[(0,e.jsxs)(Kl.Box,{className:"rustic-video-bottom-controls-left",children:[(0,e.jsx)(Mp,{mediaElement:T.current,onError:x}),(0,e.jsx)(Rp,{mediaElement:T.current,movement:"replay"}),(0,e.jsx)(Rp,{mediaElement:T.current,movement:"forward"}),N(),(0,e.jsx)(Np,{mediaElement:T.current}),(0,e.jsx)(Ip,{mediaElement:T.current}),(0,e.jsx)(Bp,{elapsedTimeInSeconds:E,durationTimeInSeconds:T.current.duration,style:"condensed"})]}),(0,e.jsxs)(Kl.Box,{className:"rustic-video-bottom-controls-right",children:[R(),(0,e.jsx)($p,{mediaElement:T.current,onError:x}),(0,e.jsx)(Up,{element:P.current,onError:x})]})]}),d&&M()]})})};return O.length>0?(0,e.jsx)(Ls(),{severity:"error",children:O}):(0,e.jsxs)(Kl.Box,{className:"rustic-video",children:[s&&(0,e.jsx)(es(),{className:"rustic-video-loading-spinner"}),(0,e.jsxs)(Kl.Box,{ref:P,className:"rustic-video-screen",sx:{visibility:s?"hidden":"visible"},children:[b.length>0&&(0,e.jsx)(Ls(),{severity:"error",className:"rustic-control-error",onClose:function(){return x("")},children:b}),(!I||d)&&function(){if(T.current&&P.current)return(0,e.jsxs)(Kl.Box,{className:"rustic-video-title",sx:D,children:[(0,e.jsx)(j(),{variant:"body2",children:t.title}),d&&I&&(0,e.jsxs)(Kl.Box,{children:[(0,e.jsx)($p,{mediaElement:T.current,onError:x}),(0,e.jsx)(Up,{element:P.current,onError:x})]})]})}(),(0,e.jsx)("video",{className:"rustic-video-element",ref:T,src:t.src,poster:t.poster,children:a&&(0,e.jsx)("track",{src:t.captions,kind:"captions",default:!0})}),B()]}),!d&&M()]})}const qp=require("@mui/material/Drawer");var Hp=r.n(qp);const Gp=require("@mui/material/ListItemText");var Xp=r.n(Gp),Vp=function(){return Vp=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Vp.apply(this,arguments)};function Kp(t){var r=(0,f.useState)(!1),n=r[0],i=r[1],o=(0,f.useRef)(null),a=(0,s.useTheme)(),c=(0,kp.useMediaQuery)(a.breakpoints.down("md")),l=c?Hp():w(),u={borderRadius:"".concat(a.shape.borderRadius,"px"),border:"1px solid ".concat(a.palette.divider)};c&&(u=Vp(Vp({},u),{borderRadius:"".concat(a.shape.borderRadius,"px ").concat(a.shape.borderRadius,"px 0 0"),borderBottom:0}));var p,d,h=t.menuItems.map((function(t){return(0,e.jsxs)(k(),{onClick:function(e){t.onClick(e),i(!1)},children:[t.startDecorator&&(0,e.jsx)(Kl.Box,{sx:{color:"primary.main"},className:"rustic-popover-menu-item-icon rustic-popover-menu-item-start-icon",children:t.startDecorator}),(0,e.jsx)(Xp(),{children:(0,e.jsx)(j(),{variant:"body2",children:t.label})}),t.endDecorator&&(0,e.jsx)(Kl.Box,{sx:{color:"secondary.main"},className:"rustic-popover-menu-item-icon",children:t.endDecorator})]},t.label)}));return(0,e.jsxs)(e.Fragment,{children:[(p={onClick:function(e){e.stopPropagation(),i(!0)},"aria-label":t.ariaLabel,ref:o,className:"rustic-popover-menu-button"},d=(0,e.jsx)(zl,{name:"more_vert"}),t.buttonText?(0,e.jsx)(jp(),Vp({},p,{startIcon:t.icon?t.icon:null,children:t.buttonText})):(0,e.jsx)(b(),Vp({},p,{children:t.icon?t.icon:d}))),(0,e.jsx)(l,{open:n,onClose:function(){return i(!1)},anchorEl:o.current,anchor:"bottom",className:"rustic-popover-menu",sx:{"& .MuiPaper-root":Vp(Vp({},u),{backgroundImage:"none",boxShadow:a.shadows[2]})},children:h})]})}function Yp(t){return(0,e.jsx)(ys(),{title:t.label,children:(0,e.jsx)(b(),{color:"inherit","aria-label":t.label,onClick:function(e){e.stopPropagation(),e.preventDefault(),t.onClick(t.message)},className:"rustic-message-actions",children:t.icon})})}function Zp(t){var r=(0,f.useState)("Copy Text"),n=r[0],i=r[1];return(0,e.jsx)(Yp,{message:t.message,icon:(0,e.jsx)(zl,{name:"file_copy"}),onClick:function(e){e.data.text&&navigator.clipboard.writeText(e.data.text).then((function(){i("Copied"),setTimeout((function(){i("Copy Text")}),2e3)})).catch((function(){i("Failed to copy")}))},label:n})}const Qp=function(t){return(0,e.jsx)(j(),{variant:"caption",color:"textSecondary",children:(r=t.timestamp,Ml(r)<86400?function(e){var t=Ml(e);if(t<60)return"".concat(Il()("second",t,!0)," ago");if(t<3600){var r=Math.floor(t/60);return"".concat(Il()("minute",r,!0)," ago")}var n=Math.floor(t/3600);return"".concat(Il()("hour",n,!0)," ago")}(r):(n=new Date(r),i=navigator.language,o={month:"short",day:"numeric"},a=new Date,l=(c=n.getFullYear()!==a.getFullYear())?" at ":", ",c&&(o.year="numeric"),n.toLocaleDateString(i,o)+l+n.toLocaleTimeString(i,{hour:"numeric",minute:"2-digit",hour12:!0})))});var r,n,i,o,a,c,l};function Jp(t){var r;return(0,e.jsxs)(A(),{id:t.message.id,className:"rustic-message-canvas",children:[(0,e.jsxs)(A(),{className:"rustic-sender-info",children:[t.getProfileComponent&&t.getProfileComponent(t.message),(0,e.jsxs)(j(),{variant:"body2",color:"text.secondary",children:[t.message.sender,":"]})]}),(0,e.jsx)(js(),{variant:"outlined",className:"rustic-message-actions-container",children:t.children}),(0,e.jsxs)(A(),{className:"rustic-message-footer",children:[t.getActionsComponent&&t.getActionsComponent(t.message)&&(0,e.jsx)(js(),{variant:"outlined",children:t.getActionsComponent(t.message)}),(0,e.jsxs)(A(),{className:"rustic-timestamp",children:[t.message.lastThreadMessage&&(0,e.jsx)(j(),{variant:"caption",children:"last updated: "}),(0,e.jsx)(Qp,{timestamp:(null===(r=t.message.lastThreadMessage)||void 0===r?void 0:r.timestamp)||t.message.timestamp})]})]})]})}function ef(t){return(0,e.jsx)(A(),{className:"rustic-message-space",children:t.messages&&t.messages.length>0&&t.messages.map((function(r){return(0,e.jsx)(Jp,{message:r,getActionsComponent:t.getActionsComponent,getProfileComponent:t.getProfileComponent,children:(0,e.jsx)(Ql,{message:r,supportedElements:t.supportedElements})},r.id)}))})}const tf=function(t){return(0,e.jsx)(j(),{variant:"body2",className:"rustic-text",children:Hu.sanitize(t.text)})};function rf(t){return(0,e.jsxs)(A(),{className:"rustic-multipart",children:[t.text&&(0,e.jsx)(tf,{text:t.text}),(r=t.files.map((function(t,r){return(0,e.jsx)(Es,{file:t},r)})),(0,e.jsx)(A(),{className:"rustic-files",children:r}))]});var r}const nf=require("@mui/material/AppBar");var of=r.n(nf);const af=require("@mui/material/Toolbar");var cf=r.n(af);const lf=function(t){var r=(0,s.useTheme)();return(0,e.jsx)(of(),{position:"fixed",color:"inherit",sx:{borderBottom:"1px solid ".concat(r.palette.divider)},children:(0,e.jsxs)(cf(),{className:"rustic-nav-bar",children:[t.leftDrawerIcon&&(0,e.jsx)(b(),{color:"inherit","aria-label":t.leftDrawerAriaLabel,edge:"start",onClick:t.handleLeftDrawerToggle,className:"rustic-nav-bar-button",children:t.leftDrawerIcon}),t.logo,t.rightDrawerIcon&&(0,e.jsx)(b(),{color:"inherit","aria-label":t.rightDrawerAriaLabel,edge:"end",onClick:t.handleRightDrawerToggle,className:"rustic-nav-bar-button",children:t.rightDrawerIcon})]})})},sf=require("@mui/material/Dialog");var uf=r.n(sf);const pf=require("@mui/material/DialogTitle");var ff=r.n(pf);const df=require("@mui/material/List");var hf=r.n(df);const mf=require("@mui/material/ListItem");var yf=r.n(mf);const vf=require("@mui/material/ListSubheader");var gf,bf,xf=r.n(vf);!function(e){e.Owner="owner",e.Member="member"}(gf||(gf={})),function(e){e.Human="human",e.Agent="agent"}(bf||(bf={}));var wf=function(t){var r=(0,f.useState)(!1),n=r[0],i=r[1],o=t.participants.length,a=n?t.participants:t.participants.slice(0,3),c="".concat(Il()(t.participantType,o)," (").concat(o,")"),l=n?"Show Less":"Show All ".concat(o);return 0===o?(0,e.jsx)(j(),{variant:"caption",className:"rustic-participant-list-no-participants-message",children:"There are currently no participants."}):(0,e.jsx)(hf(),{className:"rustic-participant-list",subheader:(0,e.jsxs)(xf(),{disableSticky:!0,className:"rustic-participant-list-subheader",children:[(0,e.jsxs)(Kl.Box,{className:"rustic-participant-list-subheader-title",children:[t.participantTypeIcon,(0,e.jsx)(j(),{variant:"subtitle2",color:"text.secondary",children:c})]}),o>3&&(0,e.jsx)(jp(),{onClick:function(){return i(!n)},color:"primary",size:"small",startIcon:(0,e.jsx)(zl,{name:"keyboard_arrow_down"}),children:l})]}),children:a.map((function(t){return(0,e.jsxs)(yf(),{className:"rustic-participant-list-item",children:[(0,e.jsx)(j(),{variant:"subtitle2",children:t.displayName}),(0,e.jsx)(j(),{variant:t.participantRole===gf.Owner?"subtitle2":"caption",children:Rl(t.participantRole)})]},t.id)}))})};const Of=function(t){function r(e,t){return function(e){return function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],e,!0).sort((function(e,t){return t.participantRole===gf.Owner?1:-1}))}(e.filter((function(e){return e.participantType===t})))}var n=r(t.participants,bf.Human),i=r(t.participants,bf.Agent),o="".concat(Il()("Participant",t.participants.length)," (").concat(t.participants.length,")");return(0,e.jsxs)(uf(),{open:t.isParticipantListOpen,onClose:t.onClose,className:"rustic-participants-container",maxWidth:"sm",fullWidth:!0,children:[(0,e.jsx)(ff(),{sx:{borderBottom:"1px solid",borderColor:"divider"},component:"h6",className:"rustic-participants-container-title",children:o}),(0,e.jsx)(wf,{participantType:"Human",participantTypeIcon:(0,e.jsx)(zl,{name:"account_circle"}),participants:n}),i.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Lp(),{className:"rustic-participants-container-divider"}),(0,e.jsx)(wf,{participantType:"Agent",participantTypeIcon:(0,e.jsx)(zl,{name:"smart_toy"}),participants:i})]})]})},kf=require("@mui/material/Table");var Sf=r.n(kf);const jf=require("@mui/material/TableBody");var Ef=r.n(jf);const Af=require("@mui/material/TableCell");var Pf=r.n(Af);const Tf=require("@mui/material/TableContainer");var Cf=r.n(Tf);const If=require("@mui/material/TableHead");var Df=r.n(If);const Mf=require("@mui/material/TableRow");var Nf=r.n(Mf);function Rf(t){if(0===t.data.length)return(0,e.jsx)(j(),{variant:"body2",children:"No data available"});var r=Array.from(new Set(t.data.flatMap((function(e){return Object.keys(e)})))),n=t.headers||r.map((function(e){return{dataKey:e}}));return(0,e.jsxs)(l(),{className:"rustic-table",children:[t.title&&(0,e.jsx)(j(),{variant:"body1",className:"rustic-table-title",children:t.title}),t.description&&(0,e.jsx)(j(),{variant:"subtitle2",children:t.description}),(0,e.jsx)(Cf(),{children:(0,e.jsxs)(Sf(),{"aria-label":t.title||"a table of data",size:"small",children:[n.length>0&&(0,e.jsx)(Df(),{children:(0,e.jsx)(Nf(),{children:n.map((function(t,r){return(0,e.jsx)(Pf(),{children:t.label||Rl(t.dataKey)},"header-".concat(r))}))})}),(0,e.jsx)(Ef(),{children:t.data.map((function(t,r){return(0,e.jsx)(Nf(),{children:n.map((function(n,i){return(0,e.jsx)(Pf(),{children:t[n.dataKey]},"cell-".concat(r,"-").concat(i))}))},"row-".concat(r))}))})]})})]})}const Bf=function(t){var r=(0,f.useState)(Hu.sanitize(t.text)),n=r[0],i=r[1],o=(0,f.useState)(""),a=o[0],c=o[1];return(0,f.useEffect)((function(){if(t.updatedData&&t.updatedData.length>0){for(var e=t.text,r=0,n=t.updatedData;r<n.length;r++){var o=n[r];"string"!=typeof o.text&&(e+=" [MISSING TEXT]",c("Some of the incoming text was not correctly formatted. Some data may be missing.")),e+=o.text}i(Hu.sanitize(e))}}),[t.text,t.updatedData]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(j(),{variant:"body2",children:n}),a&&(0,e.jsx)(Ls(),{severity:"error",children:a})]})};var _f=function(){return _f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_f.apply(this,arguments)};function Lf(t){var r=Hu.sanitize(t.youtubeVideoId);return(0,e.jsx)("iframe",_f({},Ll(t.width,t.height),{src:"https://www.youtube.com/embed/".concat(r),title:t.title,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",loading:"lazy"}))}Lf.defaultProps={title:"Embedded video"};var zf=function(){return zf=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zf.apply(this,arguments)},Ff="#FFFFFF",$f="#FF6928",Uf="#E54500",Wf="#5F5C5A",qf="#E7E7E7",Hf="#CFCFCF",Gf="#A7A19E",Xf="#D6D0D0",Vf="#D0C4BE",Kf=(0,s.createTheme)({shape:{borderRadius:16},typography:{fontFamily:"Inter",h1:{fontStyle:"normal",fontWeight:300,fontSize:"94px",lineHeight:1.167,letterSpacing:"-1.5px"},h2:{fontStyle:"normal",fontWeight:300,fontSize:"59px",letterSpacing:"-0.5px",lineHeight:1.2},h3:{fontStyle:"normal",fontWeight:400,fontSize:"47px",letterSpacing:"0px",lineHeight:1.167},h4:{fontStyle:"normal",fontWeight:400,fontSize:"33px",letterSpacing:"0.25px",lineHeight:1.235},h5:{fontStyle:"normal",fontWeight:400,fontSize:"24px",letterSpacing:"0px",lineHeight:1.334},h6:{fontStyle:"normal",fontWeight:500,fontSize:"20px",letterSpacing:"0.15px",lineHeight:1.6},body1:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.5px",lineHeight:1.5},body2:{fontStyle:"normal",fontWeight:400,fontSize:"14px",letterSpacing:"0.25px",lineHeight:1.43},subtitle1:{fontStyle:"normal",fontWeight:400,fontSize:"16px",letterSpacing:"0.15px",lineHeight:1.75},subtitle2:{fontStyle:"normal",fontWeight:500,fontSize:"14px",letterSpacing:"0.1px",lineHeight:1.57},overline:{fontStyle:"normal",fontWeight:400,fontSize:"10px",letterSpacing:"1.5px",lineHeight:1.5,textTransform:"uppercase"},caption:{fontStyle:"normal",fontWeight:400,fontSize:"12px",letterSpacing:"0.4px",lineHeight:1.66}},palette:{common:{black:"#000000",white:Ff},error:{main:"#F82A43"},warning:{main:"#FFB800"},info:{main:"#0094FF"},success:{main:"#35A700"}},shadows:function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],(0,s.createTheme)({}).shadows.map((function(e,t){return 1===t?"0 4px 5px rgba(0, 0, 0, 0.05)":2===t?"0 4px 10px rgba(0, 0, 0, 0.1)":3===t?"0 4px 15px rgba(0, 0, 0, 0.15)":"none"})),!0)}),Yf="#3D3834",Zf=(0,s.createTheme)(zf(zf({},Kf),{palette:{mode:"light",divider:Vf,text:{primary:"#1E0C04",secondary:"#4E443F",disabled:"#9C9795"},primary:{main:Yf,dark:"#2D2825",light:"#716865"},secondary:{main:$f,light:"#FFDBCC",dark:Uf},background:{default:"#F7F6F5",paper:Ff},action:{active:Wf,hover:"#EFEAEA",selected:Xf,disabledBackground:Hf,focus:qf,disabled:Gf}},components:{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:Yf,color:Ff}}}}})),Qf="#2F2F2F",Jf="#FFFCFB",ed=(0,s.createTheme)(zf(zf({},Kf),{palette:{mode:"dark",divider:Vf,primary:{main:Jf,dark:Uf,light:"#FFDBCC"},secondary:{main:$f,light:"#FFA983",dark:Uf},background:{default:"#040404",paper:Qf},text:{primary:Ff,secondary:"#EBEBEB",disabled:"#C1C1C1"},action:{active:Wf,hover:"#9A9A9A",selected:Xf,focus:qf,disabledBackground:Hf,disabled:Gf}},components:{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:Jf,color:Qf}}}}}));Zf=(0,s.responsiveFontSizes)(Zf),ed=(0,s.responsiveFontSizes)(ed)})(),n})()));