@yugabytedb/perf-advisor-ui 1.0.65 → 1.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -7,5 +7,5 @@
7
7
  *
8
8
  * LICENSE
9
9
  * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
10
- */var rg=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new _p,o=n.renderer||"canvas";tg[o]||(o=vc(tg)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new tg[o](t,i,n,e),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=Fu.node||Fu.worker||s?null:new yf(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Fu.touchEventsSupported:!!c)&&(l=Oc(n.pointerSize,44)),this.handler=new up(i,a,u,a.root,l),this.animation=new ef({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh()},e.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return vh(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=vh(t[i].color,1);return(n/=r)<.4}return!1}(e)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(e){var t,n=Zh();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=Zh();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this.handler.off(e,t)},e.prototype.trigger=function(e,t){this.handler.trigger(e,t)},e.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof eg&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete ng[e]},e}();function ig(e,t){var n=new rg(ic(),e,t);return ng[n.id]=n,n}var og=1e-4;function ag(e,t,n,r){var i=t[0],o=t[1],a=n[0],s=n[1],l=o-i,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r)if(l>0){if(e<=i)return a;if(e>=o)return s}else{if(e>=i)return a;if(e<=o)return s}else{if(e===i)return a;if(e===o)return s}return(e-i)/l*u+a}function sg(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return wc(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function lg(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function ug(e){return e.sort((function(e,t){return e-t})),e}function cg(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,o=t.indexOf("."),a=o<0?0:i-1-o;return Math.max(0,a-r)}(e)}function dg(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),o=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-i+o,0),20);return isFinite(a)?a:20}function pg(e,t){var n=Math.max(cg(e),cg(t)),r=e+t;return n>20?r:lg(r,n)}function hg(e){var t=2*Math.PI;return(e%t+t)%t}function fg(e){return e>-1e-4&&e<og}var gg=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function mg(e){if(e instanceof Date)return e;if(wc(e)){var t=gg.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function vg(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function yg(e,t){var n=vg(e),r=Math.pow(10,n),i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function xg(e){var t=parseFloat(e);return t==e&&(0!==t||!wc(e)||e.indexOf("x")<=0)?t:NaN}function _g(){return Math.round(9*Math.random())}function bg(e,t){return 0===t?e:bg(t,e%t)}function wg(e,t){return null==e?t:null==t?e:e*t/bg(e,t)}"undefined"!=typeof console&&console.warn&&console.log;function Sg(e){throw new Error(e)}function Cg(e,t,n){return(t-e)*n+e}var Tg="series\0";function Mg(e){return e instanceof Array?e:null==e?[]:[e]}function Eg(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var Ig=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Ag(e){return!Tc(e)||_c(e)||e instanceof Date?e:e.value}function Dg(e){return Tc(e)&&!(e instanceof Array)}function kg(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=Wc();hc(t,(function(e,n){Tc(e)||(t[n]=null)}));var s,l,u=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||Pg(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||i)&&function(e,t,n,r){hc(r,(function(i,o){if(i&&null!=i.id){var a=Rg(i.id),s=n.get(a);if(null!=s){var l=e[s];Pc(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=i,l.existing=t[s],r[o]=null}}}))}(u,e,a,t),r&&function(e,t){hc(t,(function(n,r){if(n&&null!=n.name)for(var i=0;i<e.length;i++){var o=e[i].existing;if(!e[i].newOption&&o&&(null==o.id||null==n.id)&&!Pg(n)&&!Pg(o)&&Og("name",o,n))return e[i].newOption=n,void(t[r]=null)}}))}(u,t),r||i?function(e,t,n){hc(t,(function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Pg(r.existing)||r.existing&&null!=t.id&&!Og("id",t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}}))}(u,t,i):o&&function(e,t){hc(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}(u,t),s=u,l=Wc(),hc(s,(function(e){var t=e.existing;t&&l.set(t.id,e)})),hc(s,(function(e){var t=e.newOption;Pc(!t||null==t.id||!l.get(t.id)||l.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&l.set(t.id,e),!e.keyInfo&&(e.keyInfo={})})),hc(s,(function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(Tc(r)){if(i.name=null!=r.name?Rg(r.name):n?n.name:Tg+t,n)i.id=Rg(n.id);else if(null!=r.id)i.id=Rg(r.id);else{var o=0;do{i.id="\0"+i.name+"\0"+o++}while(l.get(i.id))}l.set(i.id,e)}})),u}function Og(e,t,n){var r=Ng(t[e],null),i=Ng(n[e],null);return null!=r&&null!=i&&r===i}function Rg(e){return Ng(e,"")}function Ng(e,t){return null==e?t:wc(e)?e:Cc(e)||Sc(e)?e+"":t}function Lg(e){var t=e.name;return!(!t||!t.indexOf(Tg))}function Pg(e){return e&&null!=e.id&&0===Rg(e.id).indexOf("\0_ec_\0")}function Bg(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?_c(t.dataIndex)?fc(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?_c(t.name)?fc(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function jg(){var e="__ec_inner_"+Fg++;return function(t){return t[e]||(t[e]={})}}var Fg=_g();function Ug(e,t,n){var r=zg(t,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each((function(t,r){var i=Wg(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]})),a}function zg(e,t){var n;if(wc(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Wc(),o={},a=!1;return hc(n,(function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&cc(t.includeMainTypes,s)<0))a=a||!!s,(i.get(s)||i.set(s,{}))[l]=e}else o[n]=e})),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var Hg={useDefault:!0,enableAll:!1,enableNone:!1},Vg={useDefault:!1,enableAll:!0,enableNone:!0};function Wg(e,t,n,r){r=r||Hg;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===i||!1===i?(Pc(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(Pc(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=e.queryComponents({mainType:t,index:i,id:o,name:a}),s)}function Yg(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}var Gg="___EC__COMPONENT__CONTAINER___",qg="___EC__EXTENDED_CLASS___";function Qg(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function Zg(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return bc(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return j(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(t,this)),lc(t.prototype,e),t[qg]=!0,t.extend=this.extend,t.superCall=Kg,t.superApply=Jg,t.superClass=r,t}}function Xg(e,t){e.extend=t.extend}var $g=Math.round(10*Math.random());function Kg(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function Jg(e,t,n){return this.superClass.prototype[t].apply(e,n)}function em(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){Pc(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=Qg(r);if(i.sub){if(i.sub!==Gg){var o=function(e){var n=t[e.main];n&&n[Gg]||((n=t[e.main]={})[Gg]=!0);return n}(i);o[i.sub]=e}}else t[i.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Gg]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=Qg(e),r=[],i=t[n.main];return i&&i[Gg]?hc(i,(function(e,t){t!==Gg&&r.push(e)})):r.push(i),r},e.hasClass=function(e){var n=Qg(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return hc(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){var n=Qg(e),r=t[n.main];return r&&r[Gg]}}function tm(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&cc(r,s)>=0||i&&cc(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var nm=tm([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),rm=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return nm(this,e,t)},e}(),im=new Kp(50);function om(e){if("string"==typeof e){var t=im.get(e);return t&&t.image}return e}function am(e,t,n,r,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=im.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!lm(t=o.image)&&o.pending.push(a):((t=Yu.loadImage(e,sm,sm)).__zrImageSrc=e,im.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function sm(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function lm(e){return e&&e.width&&e.height}var um=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function cm(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=dm(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=pm(o[a],i);return o.join("\n")}function dm(e,t,n,r){var i=lc({},r=r||{});i.font=t,n=Oc(n,"..."),i.maxIterations=Oc(r.maxIterations,2);var o=i.minChar=Oc(r.minChar,0);i.cnCharWidth=Nf("国",t);var a=i.ascCharWidth=Nf("a",t);i.placeholder=Oc(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=Nf(n,t);return u>s&&(n="",u=0),s=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function pm(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=Nf(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?hm(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=Nf(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function hm(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}var fm=function(){},gm=function(e){this.tokens=[],e&&(this.tokens=e)},mm=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function vm(e,t,n,r,i){var o,a,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var p=l.padding,h=p?p[1]+p[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Uf(l.width,r.width)+h;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var g=_m(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+h,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var m=0;m<o.length;m++){var v=o[m],y=new fm;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:Nf(v,c),m||d)u.push(new gm([y]));else{var x=(u[u.length-1]||(u[0]=new gm)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(v||!_||s)&&x.push(y)}}}var ym=gc(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function xm(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!ym[e]}function _m(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var p=e.charAt(d);if("\n"!==p){var h=Nf(p,t),f=!r&&!xm(p);(o.length?c+h>n:i+c+h>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=h):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=h)):f?(o.push(l),a.push(u),l=p,u=h):(o.push(p),a.push(h)):(c+=h,f?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}var bm="__zr_style_"+Math.round(10*Math.random()),wm={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Sm={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};wm[bm]=!0;var Cm=["z","z2","invisible"],Tm=["invisible"],Mm=function(e){function t(t){return e.call(this,t)||this}var n;return j(t,e),t.prototype._init=function(t){for(var n=vc(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){Em.copy(e.getBoundingRect()),e.transform&&Em.applyTransform(e.transform);return Im.width=t,Im.height=n,!Em.intersect(Im)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new Kd(0,0,0,0)),t?Kd.applyTransform(e,n,t):e.copy(n),(i||o||a)&&(e.width+=2*i+Math.abs(o),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+o-i),e.y=Math.min(e.y,e.y+a-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Kd(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:lc(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Yc(wm,e)},t.prototype.useStyle=function(e){e[bm]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[bm]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,Cm)},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=vc(u),d=0;d<c.length;d++){(h=c[d])in s&&(s[h]=s[h],this.style[h]=u[h])}var p=vc(s);for(d=0;d<p.length;d++){var h=p[d];this.style[h]=this.style[h]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Tm:Cm;for(d=0;d<f.length;d++){h=f[d];n&&null!=n[h]?this[h]=n[h]:l&&null!=r[h]&&(this[h]=r[h])}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return lc(e,t),e},t.prototype.getAnimationStyleProps=function(){return Sm},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(Kf),Em=new Kd(0,0,0,0),Im=new Kd(0,0,0,0);var Am=Mm,Dm=Math.min,km=Math.max,Om=Math.sin,Rm=Math.cos,Nm=2*Math.PI,Lm=Xc(),Pm=Xc(),Bm=Xc();function jm(e,t,n,r,i,o){i[0]=Dm(e,n),i[1]=Dm(t,r),o[0]=km(e,n),o[1]=km(t,r)}var Fm=[],Um=[];function zm(e,t,n,r,i,o,a,s,l,u){var c=jp,d=Lp,p=c(e,n,i,a,Fm);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var f=d(e,n,i,a,Fm[h]);l[0]=Dm(f,l[0]),u[0]=km(f,u[0])}p=c(t,r,o,s,Um);for(h=0;h<p;h++){var g=d(t,r,o,s,Um[h]);l[1]=Dm(g,l[1]),u[1]=km(g,u[1])}l[0]=Dm(e,l[0]),u[0]=km(e,u[0]),l[0]=Dm(a,l[0]),u[0]=km(a,u[0]),l[1]=Dm(t,l[1]),u[1]=km(t,u[1]),l[1]=Dm(s,l[1]),u[1]=km(s,u[1])}function Hm(e,t,n,r,i,o,a,s){var l=Vp,u=zp,c=km(Dm(l(e,n,i),1),0),d=km(Dm(l(t,r,o),1),0),p=u(e,n,i,c),h=u(t,r,o,d);a[0]=Dm(e,i,p),a[1]=Dm(t,o,h),s[0]=km(e,i,p),s[1]=km(t,o,h)}function Vm(e,t,n,r,i,o,a,s,l){var u=ad,c=sd,d=Math.abs(i-o);if(d%Nm<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(Lm[0]=Rm(i)*n+e,Lm[1]=Om(i)*r+t,Pm[0]=Rm(o)*n+e,Pm[1]=Om(o)*r+t,u(s,Lm,Pm),c(l,Lm,Pm),(i%=Nm)<0&&(i+=Nm),(o%=Nm)<0&&(o+=Nm),i>o&&!a?o+=Nm:i<o&&a&&(i+=Nm),a){var p=o;o=i,i=p}for(var h=0;h<o;h+=Math.PI/2)h>i&&(Bm[0]=Rm(h)*n+e,Bm[1]=Om(h)*r+t,u(s,Bm,s),c(l,Bm,l))}var Wm={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ym=[],Gm=[],qm=[],Qm=[],Zm=[],Xm=[],$m=Math.min,Km=Math.max,Jm=Math.cos,ev=Math.sin,tv=Math.abs,nv=Math.PI,rv=2*nv,iv="undefined"!=typeof Float32Array,ov=[];function av(e){return Math.round(e/nv*1e8)/1e8%2*nv}var sv=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=tv(n/_f/e)||0,this._uy=tv(n/_f/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Wm.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=tv(e-this._xi),r=tv(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Wm.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData(Wm.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Wm.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),ov[0]=r,ov[1]=i,function(e,t){var n=av(e[0]);n<0&&(n+=rv);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=rv?i=n+rv:t&&n-i>=rv?i=n-rv:!t&&n>i?i=n+(rv-av(n-i)):t&&n<i&&(i=n-(rv-av(i-n))),e[0]=n,e[1]=i}(ov,o),r=ov[0];var a=(i=ov[1])-r;return this.addData(Wm.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=Jm(i)*n+e,this._yi=ev(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Wm.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Wm.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!iv||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();iv&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},e.prototype.addData=function(e,t,n,r,i,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,iv&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){qm[0]=qm[1]=Zm[0]=Zm[1]=Number.MAX_VALUE,Qm[0]=Qm[1]=Xm[0]=Xm[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(i=n=t[e],o=r=t[e+1]),a){case Wm.M:n=i=t[e++],r=o=t[e++],Zm[0]=i,Zm[1]=o,Xm[0]=i,Xm[1]=o;break;case Wm.L:jm(n,r,t[e],t[e+1],Zm,Xm),n=t[e++],r=t[e++];break;case Wm.C:zm(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],Zm,Xm),n=t[e++],r=t[e++];break;case Wm.Q:Hm(n,r,t[e++],t[e++],t[e],t[e+1],Zm,Xm),n=t[e++],r=t[e++];break;case Wm.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],p=t[e++],h=t[e++]+p;e+=1;var f=!t[e++];s&&(i=Jm(p)*c+l,o=ev(p)*d+u),Vm(l,u,c,d,p,h,f,Zm,Xm),n=Jm(h)*c+l,r=ev(h)*d+u;break;case Wm.R:jm(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],Zm,Xm);break;case Wm.Z:n=i,r=o}ad(qm,qm,Zm),sd(Qm,Qm,Xm)}return 0===e&&(qm[0]=qm[1]=Qm[0]=Qm[1]=0),new Kd(qm[0],qm[1],Qm[0]-qm[0],Qm[1]-qm[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var p=e[d++],h=1===d;h&&(a=i=e[d],s=o=e[d+1]);var f=-1;switch(p){case Wm.M:i=a=e[d++],o=s=e[d++];break;case Wm.L:var g=e[d++],m=(x=e[d++])-o;(tv(A=g-i)>n||tv(m)>r||d===t-1)&&(f=Math.sqrt(A*A+m*m),i=g,o=x);break;case Wm.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],b=e[d++];f=Up(i,o,v,y,g,x,_,b,10),i=_,o=b;break;case Wm.Q:f=Yp(i,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),i=g,o=x;break;case Wm.A:var w=e[d++],S=e[d++],C=e[d++],T=e[d++],M=e[d++],E=e[d++],I=E+M;d+=1,e[d++],h&&(a=Jm(M)*C+w,s=ev(M)*T+S),f=Km(C,T)*$m(rv,Math.abs(E)),i=Jm(I)*C+w,o=ev(I)*T+S;break;case Wm.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case Wm.Z:var A=a-i;m=s-o;f=Math.sqrt(A*A+m*m),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,l,u,c,d,p=this.data,h=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var _=0;_<g;){var b=p[_++],w=1===_;switch(w&&(n=i=p[_],r=o=p[_+1]),b!==Wm.L&&x>0&&(e.lineTo(c,d),x=0),b){case Wm.M:n=i=p[_++],r=o=p[_++],e.moveTo(i,o);break;case Wm.L:a=p[_++],s=p[_++];var S=tv(a-i),C=tv(s-o);if(S>h||C>f){if(m){if(v+(Q=l[y++])>u){var T=(u-v)/Q;e.lineTo(i*(1-T)+a*T,o*(1-T)+s*T);break e}v+=Q}e.lineTo(a,s),i=a,o=s,x=0}else{var M=S*S+C*C;M>x&&(c=a,d=s,x=M)}break;case Wm.C:var E=p[_++],I=p[_++],A=p[_++],D=p[_++],k=p[_++],O=p[_++];if(m){if(v+(Q=l[y++])>u){Fp(i,E,A,k,T=(u-v)/Q,Ym),Fp(o,I,D,O,T,Gm),e.bezierCurveTo(Ym[1],Gm[1],Ym[2],Gm[2],Ym[3],Gm[3]);break e}v+=Q}e.bezierCurveTo(E,I,A,D,k,O),i=k,o=O;break;case Wm.Q:E=p[_++],I=p[_++],A=p[_++],D=p[_++];if(m){if(v+(Q=l[y++])>u){Wp(i,E,A,T=(u-v)/Q,Ym),Wp(o,I,D,T,Gm),e.quadraticCurveTo(Ym[1],Gm[1],Ym[2],Gm[2]);break e}v+=Q}e.quadraticCurveTo(E,I,A,D),i=A,o=D;break;case Wm.A:var R=p[_++],N=p[_++],L=p[_++],P=p[_++],B=p[_++],j=p[_++],F=p[_++],U=!p[_++],z=L>P?L:P,H=tv(L-P)>.001,V=B+j,W=!1;if(m)v+(Q=l[y++])>u&&(V=B+j*(u-v)/Q,W=!0),v+=Q;if(H&&e.ellipse?e.ellipse(R,N,L,P,F,B,V,U):e.arc(R,N,z,B,V,U),W)break e;w&&(n=Jm(B)*L+R,r=ev(B)*P+N),i=Jm(V)*L+R,o=ev(V)*P+N;break;case Wm.R:n=i=p[_],r=o=p[_+1],a=p[_++],s=p[_++];var Y=p[_++],G=p[_++];if(m){if(v+(Q=l[y++])>u){var q=u-v;e.moveTo(a,s),e.lineTo(a+$m(q,Y),s),(q-=Y)>0&&e.lineTo(a+Y,s+$m(q,G)),(q-=G)>0&&e.lineTo(a+Km(Y-q,0),s+G),(q-=Y)>0&&e.lineTo(a,s+Km(G-q,0));break e}v+=Q}e.rect(a,s,Y,G);break;case Wm.Z:if(m){var Q;if(v+(Q=l[y++])>u){T=(u-v)/Q;e.lineTo(i*(1-T)+n*T,o*(1-T)+r*T);break e}v+=Q}e.closePath(),i=n,o=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Wm,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),lv=sv;function uv(e,t,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>t+s&&a>r+s||a<t-s&&a<r-s||o>e+s&&o>n+s||o<e-s&&o<n-s)return!1;if(e===n)return Math.abs(o-e)<=s/2;var u=(l=(t-r)/(e-n))*o-a+(e*r-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function cv(e,t,n,r,i,o,a,s,l,u,c){if(0===l)return!1;var d=l;if(c>t+d&&c>r+d&&c>o+d&&c>s+d||c<t-d&&c<r-d&&c<o-d&&c<s-d||u>e+d&&u>n+d&&u>i+d&&u>a+d||u<e-d&&u<n-d&&u<i-d&&u<a-d)return!1;var p=function(e,t,n,r,i,o,a,s,l,u,c){var d,p,h,f,g,m=.005,v=1/0;Dp[0]=l,Dp[1]=u;for(var y=0;y<1;y+=.05)kp[0]=Lp(e,n,i,a,y),kp[1]=Lp(t,r,o,s,y),(f=id(Dp,kp))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Ep);x++)p=d-m,h=d+m,kp[0]=Lp(e,n,i,a,p),kp[1]=Lp(t,r,o,s,p),f=id(kp,Dp),p>=0&&f<v?(d=p,v=f):(Op[0]=Lp(e,n,i,a,h),Op[1]=Lp(t,r,o,s,h),g=id(Op,Dp),h<=1&&g<v?(d=h,v=g):m*=.5);return c&&(c[0]=Lp(e,n,i,a,d),c[1]=Lp(t,r,o,s,d)),Tp(v)}(e,t,n,r,i,o,a,s,u,c,null);return p<=d/2}function dv(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;if(l>t+u&&l>r+u&&l>o+u||l<t-u&&l<r-u&&l<o-u||s>e+u&&s>n+u&&s>i+u||s<e-u&&s<n-u&&s<i-u)return!1;var c=function(e,t,n,r,i,o,a,s,l){var u,c=.005,d=1/0;Dp[0]=a,Dp[1]=s;for(var p=0;p<1;p+=.05)kp[0]=zp(e,n,i,p),kp[1]=zp(t,r,o,p),(m=id(Dp,kp))<d&&(u=p,d=m);d=1/0;for(var h=0;h<32&&!(c<Ep);h++){var f=u-c,g=u+c;kp[0]=zp(e,n,i,f),kp[1]=zp(t,r,o,f);var m=id(kp,Dp);if(f>=0&&m<d)u=f,d=m;else{Op[0]=zp(e,n,i,g),Op[1]=zp(t,r,o,g);var v=id(Op,Dp);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=zp(e,n,i,u),l[1]=zp(t,r,o,u)),Tp(d)}(e,t,n,r,i,o,s,l,null);return c<=u/2}var pv=2*Math.PI;function hv(e){return(e%=pv)<0&&(e+=pv),e}var fv=2*Math.PI;function gv(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-i)%fv<1e-4)return!0;if(o){var d=r;r=hv(i),i=hv(d)}else r=hv(r),i=hv(i);r>i&&(i+=fv);var p=Math.atan2(l,s);return p<0&&(p+=fv),p>=r&&p<=i||p+fv>=r&&p+fv<=i}function mv(e,t,n,r,i,o){if(o>t&&o>r||o<t&&o<r)return 0;if(r===t)return 0;var a=(o-t)/(r-t),s=r<t?1:-1;1!==a&&0!==a||(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===i?1/0:l>i?s:0}var vv=lv.CMD,yv=2*Math.PI;var xv=[-1,-1,-1],_v=[-1,-1];function bv(e,t,n,r,i,o,a,s,l,u){if(u>t&&u>r&&u>o&&u>s||u<t&&u<r&&u<o&&u<s)return 0;var c,d=Bp(t,r,o,s,u,xv);if(0===d)return 0;for(var p=0,h=-1,f=void 0,g=void 0,m=0;m<d;m++){var v=xv[m],y=0===v||1===v?.5:1;Lp(e,n,i,a,v)<l||(h<0&&(h=jp(t,r,o,s,_v),_v[1]<_v[0]&&h>1&&(c=void 0,c=_v[0],_v[0]=_v[1],_v[1]=c),f=Lp(t,r,o,s,_v[0]),h>1&&(g=Lp(t,r,o,s,_v[1]))),2===h?v<_v[0]?p+=f<t?y:-y:v<_v[1]?p+=g<f?y:-y:p+=s<g?y:-y:v<_v[0]?p+=f<t?y:-y:p+=s<f?y:-y)}return p}function wv(e,t,n,r,i,o,a,s){if(s>t&&s>r&&s>o||s<t&&s<r&&s<o)return 0;var l=function(e,t,n,r,i){var o=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(Rp(o))Np(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(Rp(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=Tp(u),p=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),p>=0&&p<=1&&(i[l++]=p)}}return l}(t,r,o,s,xv);if(0===l)return 0;var u=Vp(t,r,o);if(u>=0&&u<=1){for(var c=0,d=zp(t,r,o,u),p=0;p<l;p++){var h=0===xv[p]||1===xv[p]?.5:1;zp(e,n,i,xv[p])<a||(xv[p]<u?c+=d<t?h:-h:c+=o<d?h:-h)}return c}h=0===xv[0]||1===xv[0]?.5:1;return zp(e,n,i,xv[0])<a?0:o<t?h:-h}function Sv(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);xv[0]=-l,xv[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=yv-1e-4){r=0,i=yv;var c=o?1:-1;return a>=xv[0]+e&&a<=xv[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=yv,i+=yv);for(var p=0,h=0;h<2;h++){var f=xv[h];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=yv+g),(g>=r&&g<=i||g+yv>=r&&g+yv<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function Cv(e,t,n,r,i){for(var o,a,s,l,u=e.data,c=e.len(),d=0,p=0,h=0,f=0,g=0,m=0;m<c;){var v=u[m++],y=1===m;switch(v===vv.M&&m>1&&(n||(d+=mv(p,h,f,g,r,i))),y&&(f=p=u[m],g=h=u[m+1]),v){case vv.M:p=f=u[m++],h=g=u[m++];break;case vv.L:if(n){if(uv(p,h,u[m],u[m+1],t,r,i))return!0}else d+=mv(p,h,u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case vv.C:if(n){if(cv(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=bv(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case vv.Q:if(n){if(dv(p,h,u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=wv(p,h,u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case vv.A:var x=u[m++],_=u[m++],b=u[m++],w=u[m++],S=u[m++],C=u[m++];m+=1;var T=!!(1-u[m++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,y?(f=o,g=a):d+=mv(p,h,o,a,r,i);var M=(r-x)*w/b+x;if(n){if(gv(x,_,w,S,S+C,T,t,M,i))return!0}else d+=Sv(x,_,w,S,S+C,T,M,i);p=Math.cos(S+C)*b+x,h=Math.sin(S+C)*w+_;break;case vv.R:if(f=p=u[m++],g=h=u[m++],o=f+u[m++],a=g+u[m++],n){if(uv(f,g,o,g,t,r,i)||uv(o,g,o,a,t,r,i)||uv(o,a,f,a,t,r,i)||uv(f,a,f,g,t,r,i))return!0}else d+=mv(o,g,o,a,r,i),d+=mv(f,a,f,g,r,i);break;case vv.Z:if(n){if(uv(p,h,f,g,t,r,i))return!0}else d+=mv(p,h,f,g,r,i);p=f,h=g}}return n||(s=h,l=g,Math.abs(s-l)<1e-4)||(d+=mv(p,h,f,g,r,i)||0),0!==d}var Tv=uc({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},wm),Mv={style:uc({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Sm.style)},Ev=kf.concat(["invisible","culling","z","z2","zlevel","parent"]),Iv=function(e){function t(t){return e.call(this,t)||this}var n;return j(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<Ev.length;++s)i[Ev[s]]=this[Ev[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=vc(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=t[o];"style"===o?this.style?lc(this.style,a):this.useStyle(a):"shape"===o?lc(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(wc(e)){var t=vh(e,0);return t>.5?bf:t>.2?"#eee":wf}if(e)return wf}return bf},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(wc(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===vh(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new lv(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){o.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return Cv(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return Cv(e,0,!1,t,n)}(o,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:lc(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return Yc(Tv,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=lc({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=lc({},r.shape),lc(s,n.shape)):(s=lc({},i?this.shape:r.shape),lc(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=lc({},this.shape);for(var u={},c=vc(s),d=0;d<c.length;d++){var p=c[d];"object"==typeof s[p]?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return Mv},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return j(n,t),n.prototype.getDefaultStyle=function(){return ac(e.style)},n.prototype.getDefaultShape=function(){return ac(e.shape)},n}(t);for(var r in e)"function"==typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(Am),Av=Iv,Dv=uc({strokeFirst:!0,font:zu,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Tv),kv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return Yc(Dv,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=Pf(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Am);kv.prototype.type="tspan";var Ov=kv,Rv=uc({x:0,y:0},wm),Nv={style:uc({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Sm.style)};var Lv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.createStyle=function(e){return Yc(Rv,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r=function(e){return!!(e&&"string"!=typeof e&&e.width&&e.height)}(t.image)?t.image:this.__image;if(!r)return 0;var i="width"===e?"height":"width",o=t[i];return null==o?r[e]:r[e]/r[i]*o},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Nv},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Kd(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Am);Lv.prototype.type="image";var Pv=Lv;var Bv=Math.round;function jv(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s?(Bv(2*r)===Bv(2*i)&&(e.x1=e.x2=Uv(r,s,!0)),Bv(2*o)===Bv(2*a)&&(e.y1=e.y2=Uv(o,s,!0)),e):e}}function Fv(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Uv(r,s,!0),e.y=Uv(i,s,!0),e.width=Math.max(Uv(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(Uv(i+a,s,!1)-e.y,0===a?0:1),e):e}}function Uv(e,t,n){if(!t)return e;var r=Bv(2*e);return(r+Bv(t))%2==0?r/2:(r+(n?1:-1))/2}var zv=function(){this.x=0,this.y=0,this.width=0,this.height=0},Hv={},Vv=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new zv},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Fv(Hv,t,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,i=t.width,o=t.height;t.r?function(e,t){var n,r,i,o,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=i=o=d:d instanceof Array?1===d.length?n=r=i=o=d[0]:2===d.length?(n=i=d[0],r=o=d[1]):3===d.length?(n=d[0],r=o=d[1],i=d[2]):(n=d[0],r=d[1],i=d[2],o=d[3]):n=r=i=o=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-i),0!==i&&e.arc(s+u-i,l+c-i,i,0,Math.PI/2),e.lineTo(s+o,l+c),0!==o&&e.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,i,o)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Av);Vv.prototype.type="rect";var Wv=Vv,Yv={fill:"#000"},Gv={style:uc({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Sm.style)},qv=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Yv,n.attr(t),n}return j(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,ey(e=this.style),hc(e.rich,ey),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Kd(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o=t[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Yv},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return lc(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=vc(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},lc(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Gv},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||zu,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a="truncate"===r,s=Ff(o),l=Oc(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=t.width,p=(n=null==d||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?_m(e,t.font,d,"breakAll"===r,0).lines:[]).length*l,h=Oc(t.height,p);if(p>h&&c){var f=Math.floor(h/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var g=dm(d,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m=0;m<n.length;m++)n[m]=pm(n[m],g);var v=h,y=0;for(m=0;m<n.length;m++)y=Math.max(Nf(n[m],o),y);null==d&&(d=y);var x=y;return i&&(v+=i[0]+i[2],x+=i[1]+i[3],d+=i[1]+i[3]),u&&(x=d),{lines:n,height:h,outerWidth:x,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:p,width:d}}(iy(e),e),i=oy(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle,p=e.x||0,h=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=p,v=jf(h,r.contentHeight,g);if(i||n){var y=Bf(p,s,f),x=jf(h,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=ry(p,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var _=0,b=!1,w=(ny("fill"in e?e.fill:(b=!0,d.fill))),S=(ty("stroke"in e?e.stroke:o||d.autoStroke&&!b?null:(_=2,d.stroke))),C=e.textShadowBlur>0,T=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=r.calculatedLineHeight,E=0;E<u.length;E++){var I=this._getOrCreateChild(Ov),A=I.createStyle();I.useStyle(A),A.text=u[E],A.x=m,A.y=v,f&&(A.textAlign=f),A.textBaseline="middle",A.opacity=e.opacity,A.strokeFirst=!0,C&&(A.shadowBlur=e.textShadowBlur||0,A.shadowColor=e.textShadowColor||"transparent",A.shadowOffsetX=e.textShadowOffsetX||0,A.shadowOffsetY=e.textShadowOffsetY||0),A.stroke=S,A.fill=w,S&&(A.lineWidth=e.lineWidth||_,A.lineDash=e.lineDash,A.lineDashOffset=e.lineDashOffset||0),A.font=t,Kv(A,e),v+=c,T&&I.setBoundingRect(new Kd(Bf(A.x,e.width,A.textAlign),jf(A.y,M,A.textBaseline),l,M))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new mm;if(null!=e&&(e+=""),!e)return n;for(var r,i=t.width,o=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==i?null:{width:i,accumWidth:0,breakAll:"breakAll"===a},l=um.lastIndex=0;null!=(r=um.exec(e));){var u=r.index;u>l&&vm(n,e.substring(l,u),t,s),vm(n,r[2],t,s,r[1]),l=um.lastIndex}l<e.length&&vm(n,e.substring(l,e.length),t,s);var c=[],d=0,p=0,h=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,p=Math.max(p,t)}e:for(var v=0;v<n.lines.length;v++){for(var y=n.lines[v],x=0,_=0,b=0;b<y.tokens.length;b++){var w=(O=y.tokens[b]).styleName&&t.rich[O.styleName]||{},S=O.textPadding=w.padding,C=S?S[1]+S[3]:0,T=O.font=w.font||t.font;O.contentHeight=Ff(T);var M=Oc(w.height,O.contentHeight);if(O.innerHeight=M,S&&(M+=S[0]+S[2]),O.height=M,O.lineHeight=Rc(w.lineHeight,t.lineHeight,M),O.align=w&&w.align||t.align,O.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=o&&d+O.lineHeight>o){b>0?(y.tokens=y.tokens.slice(0,b),m(y,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var E=w.width,I=null==E||"auto"===E;if("string"==typeof E&&"%"===E.charAt(E.length-1))O.percentWidth=E,c.push(O),O.contentWidth=Nf(O.text,T);else{if(I){var A=w.backgroundColor,D=A&&A.image;D&&lm(D=om(D))&&(O.width=Math.max(O.width,D.width*M/D.height))}var k=f&&null!=i?i-_:null;null!=k&&k<O.width?!I||k<C?(O.text="",O.width=O.contentWidth=0):(O.text=cm(O.text,k-C,T,t.ellipsis,{minChar:t.truncateMinChar}),O.width=O.contentWidth=Nf(O.text,T)):O.contentWidth=Nf(O.text,T)}O.width+=C,_+=O.width,w&&(x=Math.max(x,O.lineHeight))}m(y,_,x)}for(n.outerWidth=n.width=Oc(i,p),n.outerHeight=n.height=Oc(o,d),n.contentHeight=d,n.contentWidth=p,h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]),v=0;v<c.length;v++){var O,R=(O=c[v]).percentWidth;O.width=parseInt(R,10)/100*n.width}return n}(iy(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign,d=Bf(a,r,u),p=jf(s,i,c),h=d,f=p;o&&(h+=o[3],f+=o[0]);var g=h+n;oy(e)&&this._renderBackground(e,e,d,p,r,i);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,_=x.length,b=y.lineHeight,w=y.width,S=0,C=h,T=g,M=_-1,E=void 0;S<_&&(!(E=x[S]).align||"left"===E.align);)this._placeToken(E,e,b,f,C,"left",m),w-=E.width,C+=E.width,S++;for(;M>=0&&"right"===(E=x[M]).align;)this._placeToken(E,e,b,f,T,"right",m),w-=E.width,T-=E.width,M--;for(C+=(n-(C-h)-(g-T)-w)/2;S<=M;)E=x[S],this._placeToken(E,e,b,f,C+E.width/2,"center",m),C+=E.width,S++;f+=b}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&oy(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(i=ry(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(Ov),h=p.createStyle();p.useStyle(h);var f=this._defaultStyle,g=!1,m=0,v=ny("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=ty("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;h.text=e.text,h.x=i,h.y=u,x&&(h.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,h.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",h.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,h.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),h.textAlign=o,h.textBaseline="middle",h.font=e.font||zu,h.opacity=Rc(s.opacity,t.opacity,1),Kv(h,s),y&&(h.lineWidth=Rc(s.lineWidth,t.lineWidth,m),h.lineDash=Oc(s.lineDash,t.lineDash),h.lineDashOffset=t.lineDashOffset||0,h.stroke=y),v&&(h.fill=v);var _=e.contentWidth,b=e.contentHeight;p.setBoundingRect(new Kd(Bf(h.x,_,h.textAlign),jf(h.y,b,h.textBaseline),_,b))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,p=u&&u.image,h=u&&!p,f=e.borderRadius,g=this;if(h||e.lineHeight||c&&d){(a=this._getOrCreateChild(Wv)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=r,m.width=i,m.height=o,m.r=f,a.dirtyShape()}if(h)(l=a.style).fill=u||null,l.fillOpacity=Oc(e.fillOpacity,1);else if(p){(s=this._getOrCreateChild(Pv)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=i,v.height=o}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Oc(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Rc(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return Jv(e)&&(t=[e.fontStyle,e.fontWeight,$v(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Bc(t)||e.textFont||e.font},t}(Am),Qv={left:!0,right:1,center:1},Zv={top:1,bottom:1,middle:1},Xv=["fontStyle","fontWeight","fontSize","fontFamily"];function $v(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function Kv(e,t){for(var n=0;n<Xv.length;n++){var r=Xv[n],i=t[r];null!=i&&(e[r]=i)}}function Jv(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function ey(e){if(e){e.font=qv.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||Qv[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||Zv[n]?n:"top",e.padding&&(e.padding=Lc(e.padding))}}function ty(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function ny(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function ry(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function iy(e){var t=e.text;return null!=t&&(t+=""),t}function oy(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var ay=qv,sy=jg(),ly=1,uy={},cy=jg(),dy=jg(),py=["emphasis","blur","select"],hy=["normal","emphasis","blur","select"],fy="highlight",gy="downplay",my="select",vy="unselect",yy="toggleSelect";function xy(e){return null!=e&&"none"!==e}var _y=new Kp(100);function by(e){if(wc(e)){var t=_y.get(e);return t||(t=hh(e,-.1),_y.put(e,t)),t}if(Ac(e)){var n=lc({},e);return n.colorStops=fc(e.colorStops,(function(e){return{offset:e.offset,color:hh(e.color,-.1)}})),n}return e}function wy(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Sy(e){wy(e,"emphasis",2)}function Cy(e){2===e.hoverState&&wy(e,"normal",0)}function Ty(e){wy(e,"blur",1)}function My(e){1===e.hoverState&&wy(e,"normal",0)}function Ey(e){e.selected=!0}function Iy(e){e.selected=!1}function Ay(e,t,n){t(e,n)}function Dy(e,t,n){Ay(e,t,n),e.isGroup&&e.traverse((function(e){Ay(e,t,n)}))}function ky(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function Oy(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&cc(n,"select")>=0,o=!1;if(e instanceof Av){var a=cy(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(xy(s)||xy(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=lc({},r),(u=lc({},u)).fill=s):!xy(u.fill)&&xy(s)?(o=!0,r=lc({},r),(u=lc({},u)).fill=by(s)):!xy(u.stroke)&&xy(l)&&(o||(r=lc({},r),u=lc({},u)),u.stroke=by(l)),r.style=u}}if(r&&null==r.z2){o||(r=lc({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=cc(e.currentStates,t)>=0,i=e.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=i[s];o[s]=null==l?r&&r[s]:l}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(o,t)}return o}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=lc({},n),a=lc({opacity:r?i:.1*o.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=lc({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function Ry(e){e.stateProxy=Oy;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Oy),n&&(n.stateProxy=Oy)}function Ny(e,t){!zy(e,t)&&!e.__highByOuter&&Dy(e,Sy)}function Ly(e,t){!zy(e,t)&&!e.__highByOuter&&Dy(e,Cy)}function Py(e,t){e.__highByOuter|=1<<(t||0),Dy(e,Sy)}function By(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Dy(e,Cy)}function jy(e){Dy(e,My)}function Fy(e){Dy(e,Ey)}function Uy(e){Dy(e,Iy)}function zy(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Hy(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,i){var o=dy(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(e){My(e)})),a&&n.push(i)),o.isBlured=!1})),hc(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function Vy(e,t,n,r){var i=r.getModel();function o(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&jy(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=i.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries((function(e){var i=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&s?u===s:i)||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse((function(e){e.__highByOuter&&i&&"self"===t||Ty(e)})),pc(t))o(e.getData(),t);else if(Tc(t))for(var c=vc(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),dy(e).isBlured=!0}})),i.eachComponent((function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}}))}}function Wy(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){dy(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse((function(e){Ty(e)}))}}}function Yy(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;var o=r.getModel().getComponent(e,t);if(!o)return i;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return i;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===sy(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Gy(e){hc(e.getAllData(),(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){e.isSelected(n,r)?Fy(t):Uy(t)}))}))}function qy(e){var t=[];return e.eachSeries((function(e){hc(e.getAllData(),(function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:e.seriesIndex};null!=r&&(o.dataType=r),t.push(o)}}))})),t}function Qy(e,t,n){Jy(e,!0),Dy(e,Ry),function(e,t,n){var r=sy(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function Zy(e,t,n,r){r?function(e){Jy(e,!1)}(e):Qy(e,t,n)}var Xy=["emphasis","blur","select"],$y={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ky(e,t,n,r){n=n||"itemStyle";for(var i=0;i<Xy.length;i++){var o=Xy[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[$y[n]]()}}function Jy(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function ex(e){return!(!e||!e.__highDownDispatcher)}function tx(e){var t=e.type;return t===my||t===vy||t===yy}function nx(e){var t=e.type;return t===fy||t===gy}var rx=lv.CMD,ix=[[],[],[]],ox=Math.sqrt,ax=Math.atan2;var sx=Math.sqrt,lx=Math.sin,ux=Math.cos,cx=Math.PI;function dx(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function px(e,t){return(e[0]*t[0]+e[1]*t[1])/(dx(e)*dx(t))}function hx(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(px(e,t))}function fx(e,t,n,r,i,o,a,s,l,u,c){var d=l*(cx/180),p=ux(d)*(e-n)/2+lx(d)*(t-r)/2,h=-1*lx(d)*(e-n)/2+ux(d)*(t-r)/2,f=p*p/(a*a)+h*h/(s*s);f>1&&(a*=sx(f),s*=sx(f));var g=(i===o?-1:1)*sx((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,m=g*a*h/s,v=g*-s*p/a,y=(e+n)/2+ux(d)*m-lx(d)*v,x=(t+r)/2+lx(d)*m+ux(d)*v,_=hx([1,0],[(p-m)/a,(h-v)/s]),b=[(p-m)/a,(h-v)/s],w=[(-1*p-m)/a,(-1*h-v)/s],S=hx(b,w);if(px(b,w)<=-1&&(S=cx),px(b,w)>=1&&(S=0),S<0){var C=Math.round(S/cx*1e6)/1e6;S=2*cx+C%2*cx}c.addData(u,y,x,a,s,_,S,d,o)}var gx=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,mx=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var vx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.applyTransform=function(e){},t}(Av);function yx(e){return null!=e.setData}function xx(e,t){var n=function(e){var t=new lv;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=lv.CMD,l=e.match(gx);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),p=void 0,h=c.match(mx)||[],f=h.length,g=0;g<f;g++)h[g]=parseFloat(h[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,C=r,T=i,M=void 0,E=void 0;switch(d){case"l":r+=h[m++],i+=h[m++],p=s.L,t.addData(p,r,i);break;case"L":r=h[m++],i=h[m++],p=s.L,t.addData(p,r,i);break;case"m":r+=h[m++],i+=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="l";break;case"M":r=h[m++],i=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="L";break;case"h":r+=h[m++],p=s.L,t.addData(p,r,i);break;case"H":r=h[m++],p=s.L,t.addData(p,r,i);break;case"v":i+=h[m++],p=s.L,t.addData(p,r,i);break;case"V":i=h[m++],p=s.L,t.addData(p,r,i);break;case"C":p=s.C,t.addData(p,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),r=h[m-2],i=h[m-1];break;case"c":p=s.C,t.addData(p,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i),r+=h[m-2],i+=h[m-1];break;case"S":v=r,y=i,M=t.len(),E=t.data,n===s.C&&(v+=r-E[M-4],y+=i-E[M-3]),p=s.C,C=h[m++],T=h[m++],r=h[m++],i=h[m++],t.addData(p,v,y,C,T,r,i);break;case"s":v=r,y=i,M=t.len(),E=t.data,n===s.C&&(v+=r-E[M-4],y+=i-E[M-3]),p=s.C,C=r+h[m++],T=i+h[m++],r+=h[m++],i+=h[m++],t.addData(p,v,y,C,T,r,i);break;case"Q":C=h[m++],T=h[m++],r=h[m++],i=h[m++],p=s.Q,t.addData(p,C,T,r,i);break;case"q":C=h[m++]+r,T=h[m++]+i,r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,C,T,r,i);break;case"T":v=r,y=i,M=t.len(),E=t.data,n===s.Q&&(v+=r-E[M-4],y+=i-E[M-3]),r=h[m++],i=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"t":v=r,y=i,M=t.len(),E=t.data,n===s.Q&&(v+=r-E[M-4],y+=i-E[M-3]),r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"A":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],fx(C=r,T=i,r=h[m++],i=h[m++],w,S,x,_,b,p=s.A,t);break;case"a":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],fx(C=r,T=i,r+=h[m++],i+=h[m++],w,S,x,_,b,p=s.A,t)}}"z"!==d&&"Z"!==d||(p=s.Z,t.addData(p),r=o,i=a),n=p}return t.toStatic(),t}(e),r=lc({},t);return r.buildPath=function(e){if(yx(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){!function(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=rx.M,d=rx.C,p=rx.L,h=rx.R,f=rx.A,g=rx.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case p:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=ox(t[0]*t[0]+t[1]*t[1]),x=ox(t[2]*t[2]+t[3]*t[3]),_=ax(-t[1]/x,t[0]/y);l[i]*=y,l[i++]+=m,l[i]*=x,l[i++]+=v,l[i++]*=y,l[i++]*=x,l[i++]+=_,l[i++]+=_,o=i+=2;break;case h:s[0]=l[i++],s[1]=l[i++],od(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],od(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var b=ix[a];b[0]=l[i++],b[1]=l[i++],od(b,b,t),l[o++]=b[0],l[o++]=b[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var _x=function(){this.cx=0,this.cy=0,this.r=0},bx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new _x},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(Av);bx.prototype.type="circle";var Sx=bx,Cx=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Tx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Cx},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=o*n,l=a*n;e.moveTo(r-o,i),e.bezierCurveTo(r-o,i-l,r-s,i-a,r,i-a),e.bezierCurveTo(r+s,i-a,r+o,i-l,r+o,i),e.bezierCurveTo(r+o,i+l,r+s,i+a,r,i+a),e.bezierCurveTo(r-s,i+a,r-o,i+l,r-o,i),e.closePath()},t}(Av);Tx.prototype.type="ellipse";var Mx=Tx,Ex=Math.PI,Ix=2*Ex,Ax=Math.sin,Dx=Math.cos,kx=Math.acos,Ox=Math.atan2,Rx=Math.abs,Nx=Math.sqrt,Lx=Math.max,Px=Math.min,Bx=1e-4;function jx(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/Nx(s*s+l*l),c=u*l,d=-u*s,p=e+c,h=t+d,f=n+c,g=r+d,m=(p+f)/2,v=(h+g)/2,y=f-p,x=g-h,_=y*y+x*x,b=i-o,w=p*g-f*h,S=(x<0?-1:1)*Nx(Lx(0,b*b*_-w*w)),C=(w*x-y*S)/_,T=(-w*y-x*S)/_,M=(w*x+y*S)/_,E=(-w*y+x*S)/_,I=C-m,A=T-v,D=M-m,k=E-v;return I*I+A*A>D*D+k*k&&(C=M,T=E),{cx:C,cy:T,x0:-c,y0:-d,x1:C*(i/b-1),y1:T*(i/b-1)}}function Fx(e,t){var n,r=Lx(t.r,0),i=Lx(t.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,p=Rx(l-s),h=p>Ix&&p%Ix;if(h>Bx&&(p=h),r>Bx)if(p>Ix-Bx)e.moveTo(u+r*Dx(s),c+r*Ax(s)),e.arc(u,c,r,s,l,!d),i>Bx&&(e.moveTo(u+i*Dx(l),c+i*Ax(l)),e.arc(u,c,i,l,s,d));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,C=void 0,T=void 0,M=void 0,E=void 0,I=void 0,A=void 0,D=r*Dx(s),k=r*Ax(s),O=i*Dx(l),R=i*Ax(l),N=p>Bx;if(N){var L=t.cornerRadius;L&&(n=function(e){var t;if(_c(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(L),f=n[0],g=n[1],m=n[2],v=n[3]);var P=Rx(r-i)/2;if(y=Px(P,m),x=Px(P,v),_=Px(P,f),b=Px(P,g),C=w=Lx(y,x),T=S=Lx(_,b),(w>Bx||S>Bx)&&(M=r*Dx(l),E=r*Ax(l),I=i*Dx(s),A=i*Ax(s),p<Ex)){var B=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,p=d*l-c*u;if(!(p*p<Bx))return[e+(p=(c*(t-o)-d*(e-i))/p)*l,t+p*u]}(D,k,I,A,M,E,O,R);if(B){var j=D-B[0],F=k-B[1],U=M-B[0],z=E-B[1],H=1/Ax(kx((j*U+F*z)/(Nx(j*j+F*F)*Nx(U*U+z*z)))/2),V=Nx(B[0]*B[0]+B[1]*B[1]);C=Px(w,(r-V)/(H+1)),T=Px(S,(i-V)/(H-1))}}}if(N)if(C>Bx){var W=Px(m,C),Y=Px(v,C),G=jx(I,A,D,k,r,W,d),q=jx(M,E,O,R,r,Y,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),C<w&&W===Y?e.arc(u+G.cx,c+G.cy,C,Ox(G.y0,G.x0),Ox(q.y0,q.x0),!d):(W>0&&e.arc(u+G.cx,c+G.cy,W,Ox(G.y0,G.x0),Ox(G.y1,G.x1),!d),e.arc(u,c,r,Ox(G.cy+G.y1,G.cx+G.x1),Ox(q.cy+q.y1,q.cx+q.x1),!d),Y>0&&e.arc(u+q.cx,c+q.cy,Y,Ox(q.y1,q.x1),Ox(q.y0,q.x0),!d))}else e.moveTo(u+D,c+k),e.arc(u,c,r,s,l,!d);else e.moveTo(u+D,c+k);if(i>Bx&&N)if(T>Bx){W=Px(f,T),G=jx(O,R,M,E,i,-(Y=Px(g,T)),d),q=jx(D,k,I,A,i,-W,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),T<S&&W===Y?e.arc(u+G.cx,c+G.cy,T,Ox(G.y0,G.x0),Ox(q.y0,q.x0),!d):(Y>0&&e.arc(u+G.cx,c+G.cy,Y,Ox(G.y0,G.x0),Ox(G.y1,G.x1),!d),e.arc(u,c,i,Ox(G.cy+G.y1,G.cx+G.x1),Ox(q.cy+q.y1,q.cx+q.x1),d),W>0&&e.arc(u+q.cx,c+q.cy,W,Ox(q.y1,q.x1),Ox(q.y0,q.x0),!d))}else e.lineTo(u+O,c+R),e.arc(u,c,i,l,s,d);else e.lineTo(u+O,c+R)}else e.moveTo(u,c);e.closePath()}}}var Ux=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},zx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Ux},t.prototype.buildPath=function(e,t){Fx(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Av);zx.prototype.type="sector";var Hx=zx,Vx=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Wx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Vx},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Av);Wx.prototype.type="ring";var Yx=Wx;function Gx(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var o=function(e,t,n,r){var i,o,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,h=e.length;p<h;p++)ad(a,a,e[p]),sd(s,s,e[p]);ad(a,a,r[0]),sd(s,s,r[1])}for(p=0,h=e.length;p<h;p++){var f=e[p];if(n)i=e[p?p-1:h-1],o=e[(p+1)%h];else{if(0===p||p===h-1){l.push($c(e[p]));continue}i=e[p-1],o=e[p+1]}Jc(u,o,i),ed(u,u,t);var g=nd(f,i),m=nd(f,o),v=g+m;0!==v&&(g/=v,m/=v),ed(c,u,-g),ed(d,u,m);var y=Kc([],f,c),x=Kc([],f,d);r&&(sd(y,y,a),ad(y,y,s),sd(x,x,a),ad(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);s=1;for(var d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var qx=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Qx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new qx},t.prototype.buildPath=function(e,t){Gx(e,t,!0)},t}(Av);Qx.prototype.type="polygon";var Zx=Qx,Xx=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},$x=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Xx},t.prototype.buildPath=function(e,t){Gx(e,t,!1)},t}(Av);$x.prototype.type="polyline";var Kx=$x,Jx={},e_=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},t_=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new e_},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=jv(Jx,t,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=t.x1,r=t.y1,i=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),e.lineTo(i,o))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Av);t_.prototype.type="line";var n_=t_,r_=[],i_=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function o_(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?Pp:Lp)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Pp:Lp)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Hp:zp)(e.x1,e.cpx1,e.x2,t),(n?Hp:zp)(e.y1,e.cpy1,e.y2,t)]}var a_=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new i_},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&(Wp(n,a,i,c,r_),a=r_[1],i=r_[2],Wp(r,s,o,c,r_),s=r_[1],o=r_[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(Fp(n,a,l,i,c,r_),a=r_[1],l=r_[2],i=r_[3],Fp(r,s,u,o,c,r_),s=r_[1],u=r_[2],o=r_[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return o_(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=o_(this.shape,e,!0);return td(t,t)},t}(Av);a_.prototype.type="bezier-curve";var s_=a_,l_=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},u_=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new l_},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(o),u=Math.sin(o);e.moveTo(l*i+n,u*i+r),e.arc(n,r,i,o,a,!s)},t}(Av);u_.prototype.type="arc";var c_=u_,d_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return j(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Av.prototype.getBoundingRect.call(this)},t}(Av),p_=d_,h_=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),f_=function(e){function t(t,n,r,i,o,a){var s=e.call(this,o)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=a||!1,s}return j(t,e),t}(h_),g_=function(e){function t(t,n,r,i,o){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return j(t,e),t}(h_),m_=[0,0],v_=[0,0],y_=new Hd,x_=new Hd,__=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Hd;for(n=0;n<2;n++)this._axes[n]=new Hd;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width,s=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);Hd.sub(r[0],n[1],n[0]),Hd.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return y_.set(1/0,1/0),x_.set(0,0),!this._intersectCheckOneSide(this,e,y_,x_,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,y_,x_,r,-1)&&(n=!1,r)||r||Hd.copy(t,n?y_:x_),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,m_),this._getProjMinMaxOnAxis(s,t._corners,v_),m_[1]<v_[0]||m_[0]>v_[1]){if(a=!1,i)return a;var u=Math.abs(v_[0]-m_[1]),c=Math.abs(m_[0]-v_[1]);Math.min(u,c)>r.len()&&(u<c?Hd.scale(r,l,-u*o):Hd.scale(r,l,c*o))}else if(n){u=Math.abs(v_[0]-m_[1]),c=Math.abs(m_[0]-v_[1]);Math.min(u,c)<n.len()&&(u<c?Hd.scale(n,l,u*o):Hd.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}(),b_=__,w_=[],S_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return j(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Kd(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(w_)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},t}(Am),C_=jg();function T_(e,t,n,r,i,o,a){var s,l=!1;bc(i)?(a=o,o=i,i=null):Tc(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=function(e,t,n,r,i){var o;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=Oc(r.duration,200),u=Oc(r.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(l=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),bc(c)&&(c=c(n,i)),bc(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),o&&o()}function M_(e,t,n,r,i,o){T_("update",e,t,n,r,i,o)}function E_(e,t,n,r,i,o){T_("enter",e,t,n,r,i,o)}function I_(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function A_(e,t,n,r,i,o){I_(e)||T_("leave",e,t,n,r,i,o)}function D_(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),A_(e,{style:{opacity:0}},t,n,r)}function k_(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||D_(e,t,n,r)})):D_(e,t,n,r)}function O_(e){C_(e).oldStyle=e.style}var R_=Math.max,N_=Math.min,L_={};var P_=function(e,t){var n=xx(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return j(t,e),t}(vx)};function B_(e,t){L_[e]=t}function j_(e,t,n,r){var i=function(e,t){return new vx(xx(e,t))}(e,t);return n&&("center"===r&&(n=U_(n,i.getBoundingRect())),H_(i,n)),i}function F_(e,t,n){var r=new Pv({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(U_(t,i))}}});return r}function U_(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var z_=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}var a=new Av(t);return a.createPathProxy(),a.buildPath=function(e){if(yx(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function H_(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function V_(e,t){return jv(e,e,{lineWidth:t}),e}var W_=Uv;function Y_(e,t){for(var n=Pd([]);e&&e!==t;)Bd(n,e.getLocalTransform(),n),e=e.parent;return n}function G_(e,t,n){return t&&!pc(t)&&(t=Df.getLocalTransform(t)),n&&(t=Ud([],t)),od([],e,t)}function q_(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return o=G_(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Q_(e){return!e.isGroup}function Z_(e,t,n){if(e&&t){var r,i=(r={},e.traverse((function(e){Q_(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(Q_(e)&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),M_(e,r,n,sy(e).dataIndex)}}}))}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=lc({},e.shape)),t}}function X_(e,t){return fc(e,(function(e){var n=e[0];n=R_(n,t.x),n=N_(n,t.x+t.width);var r=e[1];return r=R_(r,t.y),[n,r=N_(r,t.y+t.height)]}))}function $_(e,t,n){var r=lc({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),uc(i,n),new Pv(r)):j_(e.replace("path://",""),r,n,"center")}function K_(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(J_(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function J_(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,p=s-o,h=eb(d,p,u,c);if((l=h)<=1e-6&&l>=-1e-6)return!1;var f=e-i,g=t-o,m=eb(f,g,u,c)/h;if(m<0||m>1)return!1;var v=eb(f,g,d,p)/h;return!(v<0||v>1)}function eb(e,t,n,r){return e*r-n*t}function tb(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=wc(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&hc(vc(l),(function(e){qc(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=sy(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:uc({content:r,formatterParams:s},i)}}function nb(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function rb(e,t){if(e)if(_c(e))for(var n=0;n<e.length;n++)nb(e[n],t);else nb(e,t)}B_("circle",Sx),B_("ellipse",Mx),B_("sector",Hx),B_("ring",Yx),B_("polygon",Zx),B_("polyline",Kx),B_("rect",Wv),B_("line",n_),B_("bezierCurve",s_),B_("arc",c_);var ib=Object.freeze({__proto__:null,updateProps:M_,initProps:E_,removeElement:A_,removeElementWithFadeOut:k_,isElementRemoved:I_,extendShape:function(e){return Av.extend(e)},extendPath:function(e,t){return P_(e,t)},registerShape:B_,getShapeClass:function(e){if(L_.hasOwnProperty(e))return L_[e]},makePath:j_,makeImage:F_,mergePath:z_,resizePath:H_,subPixelOptimizeLine:V_,subPixelOptimizeRect:function(e){return Fv(e.shape,e.shape,e.style),e},subPixelOptimize:W_,getTransform:Y_,applyTransform:G_,transformDirection:q_,groupTransition:Z_,clipPointsByRect:X_,clipRectByRect:function(e,t){var n=R_(e.x,t.x),r=N_(e.x+e.width,t.x+t.width),i=R_(e.y,t.y),o=N_(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}},createIcon:$_,linePolygonIntersect:K_,lineLineIntersect:J_,setTooltipConfig:tb,traverseElements:rb,Group:eg,Image:Pv,Text:ay,Circle:Sx,Ellipse:Mx,Sector:Hx,Ring:Yx,Polygon:Zx,Polyline:Kx,Rect:Wv,Line:n_,BezierCurve:s_,Arc:c_,IncrementalDisplayable:S_,CompoundPath:p_,LinearGradient:f_,RadialGradient:g_,BoundingRect:Kd,OrientedBoundingRect:b_,Point:Hd,Path:Av}),ob={};function ab(e,t,n){var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=bc(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<py.length;u++){var c=py[u],d=t[c];l[c]=Oc(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function sb(e,t,n,r){n=n||ob;for(var i=e instanceof ay,o=!1,a=0;a<hy.length;a++){if((p=t[hy[a]])&&p.getShallow("show")){o=!0;break}}var s=i?e:e.getTextContent();if(o){i||(s||(s=new ay,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=ab(n,t),u=t.normal,c=!!u.getShallow("show"),d=ub(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(cb(u,n,!1));for(a=0;a<py.length;a++){var p,h=py[a];if(p=t[h]){var f=s.ensureState(h),g=!!Oc(p.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=ub(p,r&&r[h],n,!0,!i),f.style.text=l[h],!i)e.ensureState(h).textConfig=cb(p,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(gb(s).setLabelText=function(e){var r=ab(n,t,e);!function(e,t){for(var n=0;n<py.length;n++){var r=py[n],i=t[r],o=e.ensureState(r);o.style=o.style||{},o.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}(s,r)})}else s&&(s.ignore=!0);e.dirty()}function lb(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<py.length;r++){var i=py[r];n[i]=e.getModel([i,t])}return n}function ub(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||ob;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||ob).rich;if(n){t=t||{};for(var r=vc(n),i=0;i<r.length;i++){t[r[i]]=1}}e=e.parentModel}return t}(t);if(l)for(var u in o={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);fb(o[u]={},c,s,n,r,i,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var p=t.get("minMargin");null!=p&&(e.margin=p);fb(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&lc(o,t),o}function cb(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=Oc(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var db=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],pb=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],hb=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function fb(e,t,n,r,i,o,a,s){n=!i&&n||ob;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=Oc(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var p=Oc(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=Oc(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var f=Oc(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),i||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),i||o||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var g=0;g<db.length;g++){var m=db[g];null!=(y=Oc(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<pb.length;g++){m=pb[g];null!=(y=t.getShallow(m))&&(e[m]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!a||!r.disableBox){for(g=0;g<hb.length;g++){var y;m=hb[g];null!=(y=t.getShallow(m))&&(e[m]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}var gb=jg();var mb,vb,yb=["textStyle","color"],xb=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],_b=new ay,bb=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(yb):null)},e.prototype.getFont=function(){return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},t=this.ecModel,n=t&&t.getModel("textStyle"),Bc([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "));var e,t,n},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<xb.length;n++)t[xb[n]]=this.getShallow(xb[n]);return _b.useStyle(t),_b.update(),_b.getBoundingRect()},e}(),wb=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Sb=tm(wb),Cb=function(){function e(){}return e.prototype.getLineStyle=function(e){return Sb(this,e)},e}(),Tb=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Mb=tm(Tb),Eb=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Mb(this,e,t)},e}(),Ib=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){sc(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(ac(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Fu.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();Zg(Ib),mb=Ib,vb=["__\0is_clz",$g++].join("_"),mb.prototype[vb]=!0,mb.isInstance=function(e){return!(!e||!e[vb])},dc(Ib,Cb),dc(Ib,Eb),dc(Ib,rm),dc(Ib,bb);var Ab=Ib,Db=Math.round(10*Math.random());function kb(e){return[e||"",Db++].join("_")}function Ob(e,t){return sc(sc({},e,!0),t,!0)}var Rb="ZH",Nb="EN",Lb=Nb,Pb={},Bb={},jb=Fu.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(Rb)>-1?Rb:Lb;function Fb(e,t){e=e.toUpperCase(),Bb[e]=new Ab(t),Pb[e]=t}Fb(Nb,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Fb(Rb,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Ub=1e3,zb=6e4,Hb=36e5,Vb=864e5,Wb=31536e6,Yb={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Gb="{yyyy}-{MM}-{dd}",qb={year:"{yyyy}",month:"{yyyy}-{MM}",day:Gb,hour:Gb+" "+Yb.hour,minute:Gb+" "+Yb.minute,second:Gb+" "+Yb.second,millisecond:Yb.none},Qb=["year","month","day","hour","minute","second","millisecond"],Zb=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Xb(e,t){return"0000".substr(0,t-(e+="").length)+e}function $b(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Kb(e){return e===$b(e)}function Jb(e,t,n,r){var i=mg(e),o=i[nw(n)](),a=i[rw(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[iw(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[ow(n)](),d=(c-1)%12+1,p=i[aw(n)](),h=i[sw(n)](),f=i[lw(n)](),g=r instanceof Ab?r:function(e){return Bb[e]}(r||jb)||Bb[Lb],m=g.getModel("time"),v=m.get("month"),y=m.get("monthAbbr"),x=m.get("dayOfWeek"),_=m.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,Xb(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,Xb(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Xb(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Xb(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Xb(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Xb(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Xb(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Xb(f,3)).replace(/{S}/g,f+"")}function ew(e,t){var n=mg(e),r=n[rw(t)]()+1,i=n[iw(t)](),o=n[ow(t)](),a=n[aw(t)](),s=n[sw(t)](),l=0===n[lw(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,p=d&&1===i;return p&&1===r?"year":p?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function tw(e,t,n){var r=Cc(e)?mg(e):e;switch(t=t||ew(e,n)){case"year":return r[nw(n)]();case"half-year":return r[rw(n)]()>=6?1:0;case"quarter":return Math.floor((r[rw(n)]()+1)/4);case"month":return r[rw(n)]();case"day":return r[iw(n)]();case"half-day":return r[ow(n)]()/24;case"hour":return r[ow(n)]();case"minute":return r[aw(n)]();case"second":return r[sw(n)]();case"millisecond":return r[lw(n)]()}}function nw(e){return e?"getUTCFullYear":"getFullYear"}function rw(e){return e?"getUTCMonth":"getMonth"}function iw(e){return e?"getUTCDate":"getDate"}function ow(e){return e?"getUTCHours":"getHours"}function aw(e){return e?"getUTCMinutes":"getMinutes"}function sw(e){return e?"getUTCSeconds":"getSeconds"}function lw(e){return e?"getUTCMilliseconds":"getMilliseconds"}function uw(e){return e?"setUTCFullYear":"setFullYear"}function cw(e){return e?"setUTCMonth":"setMonth"}function dw(e){return e?"setUTCDate":"setDate"}function pw(e){return e?"setUTCHours":"setHours"}function hw(e){return e?"setUTCMinutes":"setMinutes"}function fw(e){return e?"setUTCSeconds":"setSeconds"}function gw(e){return e?"setUTCMilliseconds":"setMilliseconds"}function mw(e){if(isNaN(xg(e)))return wc(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function vw(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var yw=Lc;function xw(e,t,n){function r(e){return e&&Bc(e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?mg(e):e;if(!isNaN(+s))return Jb(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return Sc(e)?r(e):Cc(e)&&i(e)?e+"":"-";var l=xg(e);return i(l)?mw(l):Sc(e)?r(e):"boolean"==typeof e?e+"":"-"}var _w=["a","b","c","d","e","f","g"],bw=function(e,t){return"{"+e+(null==t?"":t)+"}"};function ww(e,t,n){_c(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=_w[o];e=e.replace(bw(a),bw(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(bw(_w[l],s),n?wd(u):u)}return e}function Sw(e,t){return t=t||"transparent",wc(e)?e:Tc(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Cw(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var Tw=hc,Mw=["left","right","top","bottom","width","height"],Ew=[["width","left","right"],["height","top","bottom"]];function Iw(e,t,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild((function(l,u){var c,d,p=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect();if("horizontal"===e){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var m=p.height+(f?-f.y+p.y:0);(d=a+m)>i||l.newline?(o+=s+n,a=0,d=m,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)}))}var Aw=Iw;function Dw(e,t,n){n=yw(n||0);var r=t.width,i=t.height,o=sg(e.left,r),a=sg(e.top,i),s=sg(e.right,r),l=sg(e.bottom,i),u=sg(e.width,r),c=sg(e.height,i),d=n[2]+n[0],p=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-p-o),isNaN(c)&&(c=i-l-d-a),null!=h&&(isNaN(u)&&isNaN(c)&&(h>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(o)&&(o=r-s-u-p),isNaN(a)&&(a=i-l-c-d),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-p}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-d}o=o||0,a=a||0,isNaN(u)&&(u=r-p-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new Kd(o+n[3],a+n[0],u,c);return f.margin=n,f}function kw(e){var t=e.layoutMode||e.constructor.layoutMode;return Tc(t)?t:t?{type:t}:null}function Ow(e,t,n){var r=n&&n.ignoreSize;!_c(r)&&(r=[r,r]);var i=a(Ew[0],0),o=a(Ew[1],1);function a(n,i){var o={},a=0,u={},c=0;if(Tw(n,(function(t){u[t]=e[t]})),Tw(n,(function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++})),r[i])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var d=0;d<n.length;d++){var p=n[d];if(!s(o,p)&&s(e,p)){o[p]=e[p];break}}return o}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){Tw(e,(function(e){t[e]=n[e]}))}u(Ew[0],e,i),u(Ew[1],e,o)}function Rw(e){return function(e,t){return t&&e&&Tw(Mw,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}({},e)}xc(Iw,"vertical"),xc(Iw,"horizontal");var Nw=jg(),Lw=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=kb("ec_cpt_model"),i}return j(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=kw(this),r=n?Rw(e):{};sc(e,t.getTheme().get(this.mainType)),sc(e,this.getDefaultOption()),n&&Ow(e,r,n)},t.prototype.mergeOption=function(e,t){sc(this.option,e,!0);var n=kw(this);n&&Ow(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[qg])}(e))return e.defaultOption;var t=Nw(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=sc(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Wg(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Ab);Xg(Lw,Ab),em(Lw),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Qg(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=Qg(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(Lw),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,i,o){if(e.length){var a=function(e){var r={},i=[];return hc(e,(function(o){var a=n(r,o),s=function(e,t){var n=[];return hc(e,(function(e){cc(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),hc(s,(function(e){cc(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);cc(t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(hc(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],p=!!u[c];p&&(i.call(o,c,d.originalDeps.slice()),delete u[c]),hc(d.successor,p?f:h)}hc(u,(function(){throw new Error("")}))}function h(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,h(e)}}}(Lw,(function(e){var t=[];hc(Lw.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=fc(t,(function(e){return Qg(e).main})),"dataset"!==e&&cc(t,"dataset")<=0&&t.unshift("dataset");return t}));var Pw=Lw,Bw="";"undefined"!=typeof navigator&&(Bw=navigator.platform||"");var jw="rgba(0, 0, 0, 0.2)",Fw={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:jw,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:jw,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:jw,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:jw,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:jw,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:jw,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Bw.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Uw=Wc(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),zw="original",Hw="arrayRows",Vw="objectRows",Ww="keyedColumns",Yw="typedArray",Gw="unknown",qw="column",Qw="row",Zw=1,Xw=2,$w=3,Kw=jg();function Jw(e,t,n){var r={},i=eS(t);if(!i||!e)return r;var o,a,s=[],l=[],u=t.ecModel,c=Kw(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;hc(e=e.slice(),(function(t,n){var i=Tc(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]}));var p=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function h(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return hc(e,(function(e,t){var n=e.name,i=f(e);if(null==o){var a=p.valueWayDim;h(r[n],a,i),h(l,a,i),p.valueWayDim+=i}else if(o===t)h(r[n],0,i),h(s,0,i);else{a=p.categoryWayDim;h(r[n],a,i),h(l,a,i),p.categoryWayDim+=i}})),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function eS(e){if(!e.get("data",!0))return Wg(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Hg).models[0]}function tS(e,t){return function(e,t,n,r,i,o){var a,s,l,u=5;if(Ec(e))return $w;if(r){var c=r[o];Tc(c)?(s=c.name,l=c.type):wc(c)&&(s=c)}if(null!=l)return"ordinal"===l?Zw:$w;if(t===Hw){var d=e;if(n===Qw){for(var p=d[o],h=0;h<(p||[]).length&&h<u;h++)if(null!=(a=x(p[i+h])))return a}else for(h=0;h<d.length&&h<u;h++){var f=d[i+h];if(f&&null!=(a=x(f[o])))return a}}else if(t===Vw){var g=e;if(!s)return $w;for(h=0;h<g.length&&h<u;h++){if((v=g[h])&&null!=(a=x(v[s])))return a}}else if(t===Ww){if(!s)return $w;if(!(p=e[s])||Ec(p))return $w;for(h=0;h<p.length&&h<u;h++)if(null!=(a=x(p[h])))return a}else if(t===zw){var m=e;for(h=0;h<m.length&&h<u;h++){var v,y=Ag(v=m[h]);if(!_c(y))return $w;if(null!=(a=x(y[o])))return a}}function x(e){var t=wc(e);return null!=e&&isFinite(e)&&""!==e?t?Xw:$w:t&&"-"!==e?Zw:void 0}return $w}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var nS=Wc();var rS=jg();jg();var iS,oS,aS,sS=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Mg(this.get("color",!0)),i=this.get("colorLayer",!0);return function(e,t,n,r,i,o,a){o=o||e;var s=t(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if(c=c||n,!c||!c.length)return;var d=c[l];i&&(u[i]=d);return s.paletteIdx=(l+1)%c.length,d}(this,rS,r,i,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,rS)},e}();var lS="\0_ec_inner",uS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new Ab(r),this._locale=new Ab(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=pS(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,pS(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):aS(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&hc(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=Wc(),s=t&&t.replaceMergeMainTypeMap;Kw(this).datasetMap=Wc(),hc(e,(function(e,t){null!=e&&(Pw.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?ac(e):sc(n[t],e,!0))})),s&&s.each((function(e,t){Pw.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),Pw.topologicalTravel(o,Pw.getAllClassMainTypes(),(function(t){var o=function(e,t,n){var r=nS.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,Mg(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=kg(a,o,l);(function(e,t,n){hc(e,(function(e){var r=e.newOption;Tc(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,Pw),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],p=[],h=0;hc(u,(function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=Pw.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(c)return;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=lc({componentIndex:n},e.keyInfo);lc(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),p.push(r),h++):(d.push(void 0),p.push(void 0))}),this),n[t]=d,r.set(t,p),i.set(t,h),"series"===t&&iS(this)}),this),this._seriesIndices||iS(this)},t.prototype.getOption=function(){var e=ac(this.option);return hc(e,(function(t,n){if(Pw.hasClass(n)){for(var r=Mg(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!Pg(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e[lS],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,i=e.id,o=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=r?(n=[],hc(Mg(r),(function(e){a[e]&&n.push(a[e])}))):n=null!=i?cS("id",i,a):null!=o?cS("name",o,a):mc(a,(function(e){return!!e})),dS(n,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,o,a=e.query,s=e.mainType,l=(n=s+"Index",r=s+"Id",i=s+"Name",!(t=a)||null==t[n]&&null==t[r]&&null==t[i]?null:{mainType:s,index:t[n],id:t[r],name:t[i]}),u=l?this.queryComponents(l):mc(this._componentsMap.get(s),(function(e){return!!e}));return o=dS(u,e),e.filter?mc(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(bc(e)){var i=t,o=e;r.each((function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&o.call(i,t,r,r.componentIndex)}}))}else for(var a=wc(e)?r.get(e):Tc(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=Ng(e,null);return mc(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return mc(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return mc(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){oS(this),hc(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},t.prototype.eachRawSeries=function(e,t){hc(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,n){oS(this),hc(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)}),this)},t.prototype.eachRawSeriesByType=function(e,t,n){return hc(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return oS(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){oS(this);var n=[];hc(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)}),this),this._seriesIndices=n,this._seriesIndicesMap=Wc(n)},t.prototype.restoreData=function(e){iS(this);var t=this._componentsMap,n=[];t.each((function(e,t){Pw.hasClass(t)&&n.push(t)})),Pw.topologicalTravel(n,Pw.getAllClassMainTypes(),(function(n){hc(t.get(n),(function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e)||t.restoreData()}))}))},t.internalField=(iS=function(e){var t=e._seriesIndices=[];hc(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=Wc(t)},oS=function(e){},void(aS=function(e,t){e.option={},e.option[lS]=1,e._componentsMap=Wc({series:[]}),e._componentsCount=Wc();var n=t.aria;Tc(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;hc(t,(function(t,r){"colorLayer"===r&&n||Pw.hasClass(r)||("object"==typeof t?e[r]=e[r]?sc(e[r],t,!1):ac(t):null==e[r]&&(e[r]=t))}))}(t,e._theme.option),sc(t,Fw,!1),e._mergeOption(t,null)})),t}(Ab);function cS(e,t,n){if(_c(t)){var r=Wc();return hc(t,(function(e){null!=e&&(null!=Ng(e,null)&&r.set(e,!0))})),mc(n,(function(t){return t&&r.get(t[e])}))}var i=Ng(t,null);return mc(n,(function(t){return t&&null!=i&&t[e]===i}))}function dS(e,t){return t.hasOwnProperty("subType")?mc(e,(function(e){return e&&e.subType===t.subType})):e}function pS(e){var t=Wc();return e&&hc(Mg(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}dc(uS,sS);var hS=uS,fS=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],gS=function(e){hc(fS,(function(t){this[t]=yc(e[t],e)}),this)},mS={},vS=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];hc(mS,(function(r,i){var o=r.create(e,t);n=n.concat(o||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){hc(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){mS[e]=t},e.get=function(e){return mS[e]},e}(),yS=/^(min|max)?(.+)$/,xS=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(hc(Mg(e.series),(function(e){e&&e.data&&Ec(e.data)&&Fc(e.data)})),hc(Mg(e.dataset),(function(e){e&&e.source&&Ec(e.source)&&Fc(e.source)}))),e=ac(e);var r=this._optionBackup,i=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(i=a).timeline||(i.timeline=s):((d||c)&&(e.options=e.media=null),i=e);c&&_c(u)&&hc(u,(function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}));function p(e){hc(t,(function(t){t(e,n)}))}return p(i),hc(l,(function(e){return p(e)})),hc(o,(function(e){return p(e.option)})),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],ac(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=ac(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)_S(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=fc(s,(function(e){return ac(-1===e?a.option:o[e].option)}))),this._currentMediaIndices=s,l},e}();function _S(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return hc(e,(function(e,t){var n=t.match(yS);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(r[a],e,o)||(i=!1)}})),i}var bS=xS,wS=hc,SS=Tc,CS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function TS(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=CS.length;n<r;n++){var i=CS[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?sc(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?sc(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function MS(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,uc(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function ES(e){MS(e,"itemStyle"),MS(e,"lineStyle"),MS(e,"areaStyle"),MS(e,"label"),MS(e,"labelLine"),MS(e,"upperLabel"),MS(e,"edgeLabel")}function IS(e,t){var n=SS(e)&&e[t],r=SS(n)&&n.textStyle;if(r)for(var i=0,o=Ig.length;i<o;i++){var a=Ig[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function AS(e){e&&(ES(e),IS(e,"label"),e.emphasis&&IS(e.emphasis,"label"))}function DS(e){return _c(e)?e:e?[e]:[]}function kS(e){return(_c(e)?e[0]:e)||{}}function OS(e,t){wS(DS(e.series),(function(e){SS(e)&&function(e){if(SS(e)){TS(e),ES(e),IS(e,"label"),IS(e,"upperLabel"),IS(e,"edgeLabel"),e.emphasis&&(IS(e.emphasis,"label"),IS(e.emphasis,"upperLabel"),IS(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(TS(t),AS(t));var n=e.markLine;n&&(TS(n),AS(n));var r=e.markArea;r&&AS(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!Ec(o))for(var a=0;a<o.length;a++)AS(o[a]);hc(e.categories,(function(e){ES(e)}))}if(i&&!Ec(i))for(a=0;a<i.length;a++)AS(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)AS(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)_c(l[a])?(AS(l[a][0]),AS(l[a][1])):AS(l[a])}"gauge"===e.type?(IS(e,"axisLabel"),IS(e,"title"),IS(e,"detail")):"treemap"===e.type?(MS(e.breadcrumb,"itemStyle"),hc(e.levels,(function(e){ES(e)}))):"tree"===e.type&&ES(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),wS(n,(function(t){wS(DS(e[t]),(function(e){e&&(IS(e,"axisLabel"),IS(e.axisPointer,"label"))}))})),wS(DS(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;IS(t,"axisLabel"),IS(t&&t.axisPointer,"label")})),wS(DS(e.calendar),(function(e){MS(e,"itemStyle"),IS(e,"dayLabel"),IS(e,"monthLabel"),IS(e,"yearLabel")})),wS(DS(e.radar),(function(e){IS(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),wS(DS(e.geo),(function(e){SS(e)&&(AS(e),wS(DS(e.regions),(function(e){AS(e)})))})),wS(DS(e.timeline),(function(e){AS(e),MS(e,"label"),MS(e,"itemStyle"),MS(e,"controlStyle",!0);var t=e.data;_c(t)&&hc(t,(function(e){Tc(e)&&(MS(e,"label"),MS(e,"itemStyle"))}))})),wS(DS(e.toolbox),(function(e){MS(e,"iconStyle"),wS(e.feature,(function(e){MS(e,"iconStyle")}))})),IS(kS(e.axisPointer),"label"),IS(kS(e.tooltip).axisPointer,"label")}function RS(e){e&&hc(NS,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var NS=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],LS=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],PS=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function BS(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<PS.length;n++){var r=PS[n][1],i=PS[n][0];null!=t[r]&&(t[i]=t[r])}}function jS(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function FS(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function US(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&US(e[n].children,t)}function zS(e,t){OS(e,t),e.series=Mg(e.series),hc(e.series,(function(e){if(Tc(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),jS(e.label),(i=e.data)&&!Ec(i))for(var n=0;n<i.length;n++)jS(i[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=function(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=r&&function(e,t,n,r){for(var i,o=t.split(","),a=e,s=0;s<o.length-1;s++)null==a[i=o[s]]&&(a[i]={}),a=a[i];(r||null==a[o[s]])&&(a[o[s]]=n)}(e,"itemStyle.color",r)}else if("bar"===t){var i;if(BS(e),BS(e.backgroundStyle),BS(e.emphasis),(i=e.data)&&!Ec(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(BS(i[n]),BS(i[n]&&i[n].emphasis))}else if("sunburst"===t){var o=e.highlightPolicy;o&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=o)),FS(e),US(e.data,FS)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&uc(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),RS(e)}})),e.dataRange&&(e.visualMap=e.dataRange),hc(LS,(function(t){var n=e[t];n&&(_c(n)||(n=[n]),hc(n,(function(e){RS(e)})))}))}function HS(e){hc(e,(function(t,n){var r=[],i=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,u,c){var d,p,h=a.get(t.stackedDimension,c);if(isNaN(h))return i;s?p=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var v=m.data.getByRawIndex(m.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&h>=0&&v>0||"samesign"===l&&h<=0&&v<0){h=pg(h,v),f=v;break}}}return r[0]=h,r[1]=f,r}))}))}var VS,WS,YS,GS,qS,QS=function(e){this.data=e.data||(e.sourceFormat===Ww?{}:[]),this.sourceFormat=e.sourceFormat||Gw,this.seriesLayoutBy=e.seriesLayoutBy||qw,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&tS(this,n)===Zw&&(r.type="ordinal")}};function ZS(e){return e instanceof QS}function XS(e,t,n){n=n||JS(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:eC(i),startIndex:a,dimensionsDetectedCount:o};if(t===Hw){var s=e;"auto"===r||null==r?tC((function(e){null!=e&&"-"!==e&&(wc(e)?null==a&&(a=1):a=0)}),n,s,10):a=Cc(r)?r:r?1:0,i||1!==a||(i=[],tC((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:n===Qw?s.length:s[0]?s[0].length:null}else if(t===Vw)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return vc(t)}(e));else if(t===Ww)i||(i=[],hc(e,(function(e,t){i.push(t)})));else if(t===zw){var l=Ag(e[0]);o=_c(l)&&l.length||1}return{startIndex:a,dimensionsDefine:eC(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new QS({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ac(t)})}function $S(e){return new QS({data:e,sourceFormat:Ec(e)?Yw:zw})}function KS(e){return new QS({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:ac(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function JS(e){var t=Gw;if(Ec(e))t=Yw;else if(_c(e)){0===e.length&&(t=Hw);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(_c(i)){t=Hw;break}if(Tc(i)){t=Vw;break}}}}else if(Tc(e))for(var o in e)if(qc(e,o)&&pc(e[o])){t=Ww;break}return t}function eC(e){if(e){var t=Wc();return fc(e,(function(e,n){var r={name:(e=Tc(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r}))}}function tC(e,t,n,r){if(t===Qw)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else{var o=n[0]||[];for(i=0;i<o.length&&i<r;i++)e(o[i],i)}}function nC(e){var t=e.sourceFormat;return t===Vw||t===Ww}var rC=function(){function e(e,t){var n=ZS(e)?e:$S(e);this._source=n;var r=this._data=n.data;n.sourceFormat===Yw&&(this._offset=0,this._dimSize=t,this._data=r),qS(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;qS=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(lc(e,GS[hC(a,s)]),a===Yw)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=aC(a,s);e.getItem=yc(c,null,i,l,u);var d=uC(a,s);e.count=yc(d,null,i,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},n=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],p=0;p<c;p++){var h=i[p*o+a];d[e+p]=h,h<l&&(l=h),h>u&&(u=h)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[Hw+"_"+qw]={pure:!0,appendData:i},e[Hw+"_"+Qw]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Vw]={pure:!0,appendData:i},e[Ww]={pure:!0,appendData:function(e){var t=this._data;hc(e,(function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])}))}},e[zw]={appendData:i},e[Yw]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},GS=e}(),e}(),iC=function(e,t,n,r){return e[r]},oC=((VS={})[Hw+"_"+qw]=function(e,t,n,r){return e[r+t]},VS[Hw+"_"+Qw]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=e,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[r]:null}return o},VS[Vw]=iC,VS[Ww]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},VS[zw]=iC,VS);function aC(e,t){return oC[hC(e,t)]}var sC=function(e,t,n){return e.length},lC=((WS={})[Hw+"_"+qw]=function(e,t,n){return Math.max(0,e.length-t)},WS[Hw+"_"+Qw]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},WS[Vw]=sC,WS[Ww]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},WS[zw]=sC,WS);function uC(e,t){return lC[hC(e,t)]}var cC=function(e,t,n){return e[t]},dC=((YS={})[Hw]=cC,YS[Vw]=function(e,t,n){return e[n]},YS[Ww]=cC,YS[zw]=function(e,t,n){var r=Ag(e);return r instanceof Array?r[t]:r},YS[Yw]=cC,YS);function pC(e){return dC[e]}function hC(e,t){return e===Hw?e+"_"+t:e}function fC(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=i.getDimensionProperty(a);return pC(o)(r,a,s)}var l=r;return o===zw&&(l=Ag(r)),l}}}var gC=/\{@(.+?)\}/g,mC=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,p=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:a,dataType:t,value:r,color:l,borderColor:u,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(o&&(s.value=o.interpolatedValue),null!=r&&_c(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return bc(i)?(s.status=t,s.dimensionIndex=r,i(s)):wc(i)?ww(i,s).replace(gC,(function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=fC(a,e,i);if(o&&_c(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return fC(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function vC(e){var t,n;return Tc(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function yC(e){return new xC(e)}var xC=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,h=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(o||p<h)){var f=this._progress;if(_c(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],p,h,l,u);else this._doProgress(f,p,h,l,u)}this._dueIndex=h;var m=null!=this._settedOutputEnd?this._settedOutputEnd:h;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){_C.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:_C.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),_c(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),_C=function(){var e,t,n,r,i,o={reset:function(l,u,c,d){t=l,e=u,n=c,r=d,i=Math.ceil(r/n),o.next=n>1&&r>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%i*n+Math.ceil(t/i),a=t>=e?null:o<r?o:t;return t++,a}}();function bC(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||Cc(e)||null==e||"-"===e||(e=+mg(e)),null==e||""===e?NaN:+e)}Wc({number:function(e){return parseFloat(e)},time:function(e){return+mg(e)},trim:function(e){return wc(e)?Bc(e):e}});var wC=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Cc(e)?e:xg(e),r=Cc(t)?t:xg(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=wc(e),s=wc(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),SC=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return bC(e,t)},e}();function CC(e){if(!DC(e.sourceFormat)){Sg("")}return e.data}function TC(e){var t=e.sourceFormat,n=e.data;if(!DC(t)){Sg("")}if(t===Hw){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===Vw){for(r=[],i=0,o=n.length;i<o;i++)r.push(lc({},n[i]));return r}}function MC(e,t,n){if(null!=n)return Cc(n)||!isNaN(n)&&!qc(t,n)?e[n]:qc(t,n)?t[n]:void 0}function EC(e){return ac(e)}var IC=Wc();function AC(e,t,n,r){t.length||Sg(""),Tc(e)||Sg("");var i=e.type,o=IC.get(i);o||Sg("");var a=fc(t,(function(e){return function(e,t){var n=new SC,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==qw&&Sg("");var a=[],s={},l=e.dimensionsDefine;if(l)hc(l,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(qc(s,n)&&Sg(""),s[n]=r)}));else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=aC(i,qw);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=yc(CC,null,e)),n.cloneRawData=yc(TC,null,e);var d=uC(i,qw);n.count=yc(d,null,r,o,a);var p=pC(i);n.retrieveValue=function(e,t){var n=c(r,o,a,e);return h(n,t)};var h=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=yc(MC,null,a,s),n.cloneAllDimensionInfo=yc(EC,null,a),n}(e,o)}));return fc(Mg(o.transform({upstream:a[0],upstreamList:a,config:ac(e.config)})),(function(e,n){var r;Tc(e)||Sg(""),e.data||Sg(""),DC(JS(e.data))||Sg("");var i=t[0];if(i&&0===n&&!e.dimensions){var o=i.startIndex;o&&(e.data=i.data.slice(0,o).concat(e.data)),r={seriesLayoutBy:qw,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:qw,sourceHeader:0,dimensions:e.dimensions};return XS(e.data,r,null)}))}function DC(e){return e===Hw||e===Vw}var kC,OC="undefined",RC=typeof Uint32Array===OC?Array:Uint32Array,NC=typeof Uint16Array===OC?Array:Uint16Array,LC=typeof Int32Array===OC?Array:Int32Array,PC=typeof Float64Array===OC?Array:Float64Array,BC={float:PC,int:LC,ordinal:Array,number:Array,time:PC};function jC(e){return e>65535?RC:NC}function FC(e,t,n,r,i){var o=BC[n||"float"];if(i){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(r)}var UC=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Wc()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=kC[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],nC(r),this._dimensions=fc(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new BC[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[e]=[1/0,-1/0]);for(var s=i[e],l=o;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<i;l++){FC(n,l,(h=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,p=0;p<i;p++){var h=r[p],f=kC.arrayRows.call(this,e[d]||u,h.property,d,p);n[p][c]=f;var g=o[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=fc(o,(function(e){return e.property})),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=[1/0,-1/0]),FC(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],p=e;p<t;p++){d=r.getItem(p,d);for(var h=0;h<a;h++){var f=i[h],g=this._dimValueGetter(d,l[h],p,h);f[p]=g;var m=s[h];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;i=0;for(var o=r.length;i<o;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],(function(e){isNaN(e)||t.push(e)}));var n=t.sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=o+1;else{if(!(t[o]>e))return o;i=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-r[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<o||d===o&&c>=0&&a<0)&&(o=d,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{e=new(n=jC(this._rawCount))(this.count());for(i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(jC(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,p=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][p],c)}else{for(var h=0;h<a;h++)o[h]=u[e[h]][p];o[h]=c,d=t.apply(null,o)}d&&(i[s++]=p)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=vc(e),i=r.length;if(!i)return this;var o=t.count(),a=new(jC(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,p=!1;if(!t._indices){var h=0;if(1===i){for(var f=d[r[0]],g=0;g<n;g++){((x=f[g])>=u&&x<=c||isNaN(x))&&(a[s++]=h),h++}p=!0}else if(2===i){f=d[r[0]];var m=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(g=0;g<n;g++){var x=f[g],_=m[g];(x>=u&&x<=c||isNaN(x))&&(_>=v&&_<=y||isNaN(_))&&(a[s++]=h),h++}p=!0}}if(!p)if(1===i)for(g=0;g<o;g++){var b=t.getRawIndex(g);((x=d[r[0]][b])>=u&&x<=c||isNaN(x))&&(a[s++]=b)}else for(g=0;g<o;g++){for(var w=!0,S=(b=t.getRawIndex(g),0);S<i;S++){var C=r[S];((x=d[C][b])<e[C][0]||x>e[C][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(g))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=[1/0,-1/0];for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),p=0;p<o;p++)s[p]=r[t[p]][d];s[o]=c;var h=n&&n.apply(null,s);if(null!=h){"object"!=typeof h&&(i[0]=h,h=i);for(u=0;u<h.length;u++){var f=t[u],g=h[u],m=l[f],v=r[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,o=this.clone([e],!0),a=o._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(jC(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var p=1;p<s-1;p+=u){for(var h=Math.min(p+u,s-1),f=Math.min(p+2*u,s),g=(f+h)/2,m=0,v=h;v<f;v++){var y=a[T=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-h;var x=p,_=Math.min(p+u,s),b=p-1,w=a[c];n=-1,i=x;var S=-1,C=0;for(v=x;v<_;v++){var T;y=a[T=this.getRawIndex(v)];isNaN(y)?(C++,S<0&&(S=T)):(r=Math.abs((b-g)*(y-w)-(b-v)*(m-w)))>n&&(n=r,i=T)}C>0&&C<_-x&&(d[l++]=Math.min(S,i),i=Math.max(S,i)),d[l++]=i,c=i}return d[l++]=this.getRawIndex(s-1),o._count=l,o._indices=d,o.getRawIndex=this._getRawIdx,o},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=i._rawExtent[e]=[1/0,-1/0],d=new(jC(this._rawCount))(Math.ceil(u/s)),p=0,h=0;h<u;h+=s){s>u-h&&(s=u-h,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(h+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(h+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[p++]=v}return i._count=p,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var r,i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var o=(r=n)[0],a=r[1],s=0;s<i;s++){var l=t[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return r=[o,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r,i,o=new e,a=this._chunks,s=t&&gc(t,(function(e,t){return e[t]=!0,e}),{});if(s)for(var l=0;l<a.length;l++)o._chunks[l]=s[l]?(r=a[l],i=void 0,(i=r.constructor)===Array?r.slice():new i(r)):a[l];else o._chunks=a;return this._copyCommonProps(o),n||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=ac(this._extent),e._rawExtent=ac(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return bC(e[r],this._dimensions[r])}kC={arrayRows:e,objectRows:function(e,t,n,r){return bC(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return bC(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),zC=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(HC(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Ec(a=o.get("data",!0))?Yw:zw,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},p=Oc(c.seriesLayoutBy,d.seriesLayoutBy)||null,h=Oc(c.sourceHeader,d.sourceHeader),f=Oc(c.dimensions,d.dimensions);e=p!==d.seriesLayoutBy||!!h!=!!d.sourceHeader||f?[XS(a,{seriesLayoutBy:p,sourceHeader:h,dimensions:f},s)]:[]}else{var g=n;if(i){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[XS(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==e.length&&VC("")}var o=[],a=[];return hc(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||VC(""),o.push(t),a.push(e._getVersionSign())})),r?t=function(e,t){var n=Mg(e),r=n.length;r||Sg("");for(var i=0,o=r;i<o;i++)t=AC(n[i],t),i!==o-1&&(t.length=Math.max(t.length,1));return t}(r,o,n.componentIndex):null!=i&&(t=[KS(o[0])]),{sourceList:t,upstreamSignList:a}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];HC(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new UC).initData(new rC(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(HC(e)){var t=eS(e);return t?[t.getSourceManager()]:[]}return fc(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Wg(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Hg).models:[]}(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(HC(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=r;e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function HC(e){return"series"===e.mainType}function VC(e){throw new Error(e)}var WC="line-height:1";function YC(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+wd(r+"")+"px;color:"+wd(n)+";font-weight:"+wd(i+""),valueStyle:"font-size:"+wd(a+"")+"px;color:"+wd(o)+";font-weight:"+wd(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var GC=[0,10,20,30],qC=["","\n","\n\n","\n\n\n"];function QC(e,t){return t.type=e,t}function ZC(e){return"section"===e.type}function XC(e){return ZC(e)?KC:JC}function $C(e){if(ZC(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return hc(e.blocks,(function(e){var n=$C(e);n>=t&&(t=n+ +(r&&(!n||ZC(e)&&!e.noHeader)))})),t}return 0}function KC(e,t,n,r){var i,o=t.noHeader,a=(i=$C(t),{html:GC[i],richText:qC[i]}),s=[],l=t.blocks||[];Pc(!l||_c(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(qc(c,u)){var d=new wC(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}hc(l,(function(n,i){var o=t.valueFormatter,l=XC(n)(o?lc(lc({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)}));var p="richText"===e.renderMode?s.join(a.richText):tT(s.join(""),o?n:a.html);if(o)return p;var h=xw(t.header,"ordinal",e.useUTC),f=YC(r,e.renderMode).nameStyle;return"richText"===e.renderMode?nT(e,h,f)+a.richText+p:tT('<div style="'+f+";"+WC+';">'+wd(h)+"</div>"+p,n)}function JC(e,t,n,r){var i=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return fc(e=_c(e)?e:[e],(function(e,t){return xw(e,_c(h)?h[t]:h,u)}))};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),p=o?"":xw(l,"ordinal",u),h=t.valueType,f=a?[]:c(t.value),g=!s||!o,m=!s&&o,v=YC(r,i),y=v.nameStyle,x=v.valueStyle;return"richText"===i?(s?"":d)+(o?"":nT(e,p,y))+(a?"":function(e,t,n,r,i){var o=[i],a=r?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(_c(t)?t.join(" "):t,o)}(e,f,g,m,x)):tT((s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+wd(e)+"</span>"}(p,!s,y))+(a?"":function(e,t,n,r){var i=n?"10px":"20px",o=t?"float:right;margin-left:"+i:"";return e=_c(e)?e:[e],'<span style="'+o+";"+r+'">'+fc(e,(function(e){return wd(e)})).join("&nbsp;&nbsp;")+"</span>"}(f,g,m,x)),n)}}function eT(e,t,n,r,i,o){if(e)return XC(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function tT(e,t){return'<div style="'+("margin: "+t+"px 0 0")+";"+WC+';">'+e+'<div style="clear:both"></div></div>'}function nT(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function rT(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var iT=function(){function e(){this.richTextStyles={},this._nextStyleNameId=_g()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,i=function(e,t){var n=wc(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+wd(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+wd(r)+";"+(t||"")+'"></span>':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return wc(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};_c(t)?hc(t,(function(e){return lc(n,e)})):lc(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function oT(e){var t,n,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=o.getRawValue(a),p=_c(d),h=function(e,t){return Sw(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(o,a);if(c>1||p&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=gc(e,(function(e,t,n){var r=o.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(QC("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?hc(r,(function(e){c(fC(o,n,e),e)})):hc(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,h);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=fC(l,a,u[0]),n=g.type}else i=t=p?d[0]:d;var m=Lg(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return QC("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[QC("nameValue",{markerType:"item",markerColor:h,name:x,noName:!Bc(x),value:t,valueType:n})].concat(r||[])})}var aT=jg();function sT(e,t){return e.getName(t)||e.getId(t)}var lT=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return j(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=yC({count:cT,reset:dT}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(aT(this).sourceManager=new zC(this)).prepareSource();var r=this.getInitialData(e,n);hT(r,this),this.dataTask.context.data=r,aT(this).dataBeforeProcessed=r,uT(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=kw(this),r=n?Rw(e):{},i=this.subType;Pw.hasClass(i)&&(i+="Series"),sc(e,t.getTheme().get(this.subType)),sc(e,this.getDefaultOption()),Eg(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Ow(e,r,n)},t.prototype.mergeOption=function(e,t){e=sc(this.option,e,!0),this.fillDataTextStyle(e.data);var n=kw(this);n&&Ow(this.option,e,n);var r=aT(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);hT(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,aT(this).dataBeforeProcessed=i,uT(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Ec(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Eg(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=gT(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return aT(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=gT(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}aT(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Wc(e)},t.prototype.getSourceManager=function(){return aT(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return aT(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return oT({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Fu.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=sS.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<e.length;o++){var a=sT(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=vc(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[sT(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,o=i.selectedMode,a=t.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){Tc(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l];s[d=sT(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=sT(e,c);i.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(c),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each((function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)})),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Pw.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(Pw);function uT(e){var t=e.name;Lg(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return hc(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function cT(e){return e.model.getRawData().count()}function dT(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),pT}function pT(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function hT(e,t){hc(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,xc(fT,t))}))}function fT(e,t){var n=gT(e);return n&&n.setOutputEnd((t||this).count()),t}function gT(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}dc(lT,mC),dc(lT,sS),Xg(lT,Pw);var mT=lT,vT=function(){function e(){this.group=new eg,this.uid=kb("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Zg(vT),em(vT);var yT=vT;function xT(){var e=jg();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}var _T=jg(),bT=xT(),wT=function(){function e(){this.group=new eg,this.uid=kb("viewChart"),this.renderTask=yC({plan:TT,reset:MT}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&CT(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&CT(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){rb(this.group,e)},e.markUpdateMethod=function(e,t){_T(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function ST(e,t,n){e&&ex(e)&&("emphasis"===t?Py:By)(e,n)}function CT(e,t,n){var r=Bg(e,t),i=t&&null!=t.highlightKey?function(e){var t=uy[e];return null==t&&ly<=32&&(t=uy[e]=ly++),t}(t.highlightKey):null;null!=r?hc(Mg(r),(function(t){ST(e.getItemGraphicEl(t),n,i)})):e.eachItemGraphicEl((function(e){ST(e,n,i)}))}function TT(e){return bT(e.model)}function MT(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&_T(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),ET[l]}Zg(wT),em(wT);var ET={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},IT=wT,AT="\0__throttleOriginMethod",DT="\0__throttleRate",kT="\0__throttleType";function OT(e,t,n){var r,i,o,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(o,a||[])}t=t||0;var p=function(){for(var e=[],p=0;p<arguments.length;p++)e[p]=arguments[p];r=(new Date).getTime(),o=this,a=e;var h=s||t,f=s||n;s=null,i=r-(f?l:u)-h,clearTimeout(c),f?c=setTimeout(d,h):i>=0?d():c=setTimeout(d,-i),l=r};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(e){s=e},p}function RT(e,t,n,r){var i=e[t];if(i){var o=i[AT]||i,a=i[kT];if(i[DT]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=OT(o,n,"debounce"===r))[AT]=o,i[kT]=r,i[DT]=n}return i}}function NT(e,t){var n=e[t];n&&n[AT]&&(n.clear&&n.clear(),e[t]=n[AT])}var LT=jg(),PT={itemStyle:tm(Tb,!0),lineStyle:tm(wb,!0)},BT={lineStyle:"stroke",itemStyle:"fill"};function jT(e,t){var n=e.visualStyleMapper||PT[t];return n||(console.warn("Unknown style type '"+t+"'."),PT.itemStyle)}function FT(e,t){var n=e.visualDrawType||BT[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var UT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=jT(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=FT(e,r),l=o[s],u=bc(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=d,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||bc(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||bc(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=lc({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},zT=new Ab,HT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=jT(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){zT.option=n[r];var a=i(zT);lc(e.ensureUniqueItemVisual(t,"style"),a),zT.option.decal&&(e.setItemVisual(t,"decal",zT.option.decal),zT.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},VT={performRawSeries:!0,overallReset:function(e){var t=Wc();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),LT(e).scope=i}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=LT(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=FT(t,a);i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}}))}}))}},WT=Math.PI;var YT=function(){function e(e,t,n,r){this._stageTaskMap=Wc(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Wc();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;hc(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});Pc(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}hc(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,p=c.agentStubMap;p.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),o.updatePayload(c,n);var h=o.getPerformArgs(c,r.block);p.each((function(e){e.perform(h)})),c.perform(h)&&(i=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=Wc(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||yC({plan:XT,reset:$T,count:eM}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||yC({reset:GT});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=Wc(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function p(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,yC({reset:qT,onDirty:ZT})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}Pc(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):(c=!1,hc(n.getSeries(),p)),d&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return bc(e)&&(e={overallReset:e,seriesType:tM(e)}),e.uid=kb("stageHandler"),t&&(e.visualType=t),e},e}();function GT(e){e.overallReset(e.ecModel,e.api,e.payload)}function qT(e){return e.overallProgress&&QT}function QT(){this.agent.dirty(),this.getDownstream().dirty()}function ZT(){this.agent&&this.agent.dirty()}function XT(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function $T(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Mg(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?fc(t,(function(e,t){return JT(t)})):KT}var KT=JT(0);function JT(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function eM(e){return e.data.count()}function tM(e){nM=null;try{e(rM,iM)}catch(e){}return nM}var nM,rM={},iM={};function oM(e,t){for(var n in t.prototype)e[n]=Qc}oM(rM,hS),oM(iM,gS),rM.eachSeriesByType=rM.eachRawSeriesByType=function(e){nM=e},rM.eachComponent=function(e){"series"===e.mainType&&e.subType&&(nM=e.subType)};var aM=YT,sM=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],lM={color:sM,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],sM]},uM="#B9B8CE",cM="#100C2A",dM=function(){return{axisLine:{lineStyle:{color:uM}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},pM=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],hM={darkMode:!0,color:pM,backgroundColor:cM,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:uM}},textStyle:{color:uM},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:uM}},dataZoom:{borderColor:"#71708A",textStyle:{color:uM},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:uM}},timeline:{lineStyle:{color:uM},label:{color:uM},controlStyle:{color:uM,borderColor:uM}},calendar:{itemStyle:{color:cM},dayLabel:{color:uM},monthLabel:{color:uM},yearLabel:{color:uM}},timeAxis:dM(),logAxis:dM(),valueAxis:dM(),categoryAxis:dM(),line:{symbol:"circle"},graph:{color:pM},gauge:{title:{color:uM},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:uM},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};hM.categoryAxis.splitLine.show=!1;var fM=hM,gM=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(wc(e)){var i=Qg(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};hc(e,(function(e,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),mM=["symbol","symbolSize","symbolRotate","symbolOffset"],vM=mM.concat(["symbolKeepAspect"]),yM={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a<mM.length;a++){var s=mM[a],l=e.get(s);bc(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(lc({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=vc(i);return{dataEach:o?function(t,n){for(var r=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,i[s](r,o))}}:null}}}}},xM={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<vM.length;r++){var i=vM[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function _M(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function bM(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=Bg(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:_c(u)?l.getName(u[0]):l.getName(u),selected:wc(r)?r:lc({},r)})}}))}function wM(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var SM=Math.round(9*Math.random()),CM="function"==typeof Object.defineProperty,TM=function(){function e(){this._id="__ec_inner_"+SM++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return CM?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),MM=TM,EM=Av.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r+o),e.lineTo(n-i,r+o),e.closePath()}}),IM=Av.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r),e.lineTo(n,r+o),e.lineTo(n-i,r),e.closePath()}}),AM=Av.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=Math.max(i,t.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),p=Math.cos(u),h=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*h,l+s+p*h,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*h,l+s+p*h,n-c,l+s),e.closePath()}}),DM=Av.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,o=t.y,a=r/3*2;e.moveTo(i,o),e.lineTo(i+a,o+n),e.lineTo(i,o+n/4*3),e.lineTo(i-a,o+n),e.lineTo(i,o),e.closePath()}}),kM={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var o=Math.min(n,r);i.x=e,i.y=t,i.width=o,i.height=o},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},OM={};hc({line:n_,rect:Wv,roundRect:Wv,square:Wv,circle:Sx,diamond:IM,pin:AM,arrow:DM,triangle:EM},(function(e,t){OM[t]=new e}));var RM=Av.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=zf(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=OM[r];i||(i=OM[r="rect"]),kM[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function NM(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function LM(e,t,n,r,i,o,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?F_(e.slice(8),new Kd(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?j_(e.slice(7),{},new Kd(t,n,r,i),a?"center":"cover"):new RM({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=NM,o&&s.setColor(o),s}function PM(e,t){if(null!=e)return _c(e)||(e=[e,e]),[sg(e[0],t[0])||0,sg(Oc(e[1],e[0]),t[1])||0]}function BM(e){return isFinite(e)}function jM(e,t,n){for(var r="radial"===t.type?function(e,t,n){var r=n.width,i=n.height,o=Math.min(r,i),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*r+n.x,s=s*i+n.y,l*=o),a=BM(a)?a:.5,s=BM(s)?s:.5,l=l>=0&&BM(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,o=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=BM(r)?r:0,i=BM(i)?i:1,o=BM(o)?o:0,a=BM(a)?a:0,e.createLinearGradient(r,o,i,a)}(e,t,n),i=t.colorStops,o=0;o<i.length;o++)r.addColorStop(i[o].offset,i[o].color);return r}function FM(e){return parseInt(e,10)}function UM(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||FM(s[r])||FM(e.style[r]))-(FM(s[o])||0)-(FM(s[a])||0)|0}function zM(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:Cc(t)?[t]:_c(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=fc(i,(function(e){return e/a})),o/=a)}return[i,o]}var HM=new lv(!0);function VM(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function WM(e){return"string"==typeof e&&"none"!==e}function YM(e){var t=e.fill;return null!=t&&"none"!==t}function GM(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function qM(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function QM(e,t,n){var r=am(t.image,t.__image,n);if(lm(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*Zc),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var ZM=["shadowBlur","shadowOffsetX","shadowOffsetY"],XM=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function $M(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){eE(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?wm.opacity:a}(r||t.blend!==n.blend)&&(o||(eE(e,i),o=!0),e.globalCompositeOperation=t.blend||wm.blend);for(var s=0;s<ZM.length;s++){var l=ZM[s];(r||t[l]!==n[l])&&(o||(eE(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(eE(e,i),o=!0),e.shadowColor=t.shadowColor||wm.shadowColor),o}function KM(e,t,n,r,i){var o=tE(t,i.inHover),a=r?null:n&&tE(n,i.inHover)||{};if(o===a)return!1;var s=$M(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(eE(e,i),s=!0),WM(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(eE(e,i),s=!0),WM(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(eE(e,i),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(eE(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<XM.length;u++){var c=XM[u],d=c[0];(r||o[d]!==a[d])&&(s||(eE(e,i),s=!0),e[d]=o[d]||c[1])}return s}function JM(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function eE(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function tE(e,t){return t&&e.__hoverStyle||e.style}function nE(e,t){rE(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function rE(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var o=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,a)||(a&&a.length&&(eE(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(eE(e,n),e.save(),function(e,t,n){for(var r=!1,i=0;i<e.length;i++){var o=e[i];r=r||o.isZeroArea(),JM(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=r}(o,e,n),s=!0),n.prevElClipPaths=o),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c,d,p=t instanceof Av&&t.autoBatch&&function(e){var t=YM(e),n=VM(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);s||(c=i,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(eE(e,n),JM(e,t)):p||eE(e,n);var h=tE(t,n.inHover);t instanceof Av?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),KM(e,t,u,l,n),p&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o=VM(n),a=YM(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||HM,d=t.__dirty;if(!r){var p=n.fill,h=n.stroke,f=a&&!!p.colorStops,g=o&&!!h.colorStops,m=a&&!!p.image,v=o&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0;(f||g)&&(w=t.getBoundingRect()),f&&(y=d?jM(e,p,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?jM(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(_=d||!t.__canvasFillPattern?QM(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(b=d||!t.__canvasStrokePattern?QM(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:m&&(_?e.fillStyle=_:a=!1),g?e.strokeStyle=x:v&&(b?e.strokeStyle=b:o=!1)}var S,C,T=t.getGlobalScale();c.setScale(T[0],T[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(S=(i=zM(t))[0],C=i[1]);var M=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),M=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),M&&c.rebuildPath(e,l?s:1),S&&(e.setLineDash(S),e.lineDashOffset=C),r||(n.strokeFirst?(o&&qM(e,n),a&&GM(e,n)):(a&&GM(e,n),o&&qM(e,n))),S&&e.setLineDash([])}(e,t,h,p),p&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"")):t instanceof Ov?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),KM(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||zu,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=zM(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(VM(n)&&e.strokeText(i,n.x,n.y),YM(n)&&e.fillText(i,n.x,n.y)):(YM(n)&&e.fillText(i,n.x,n.y),VM(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,h)):t instanceof Pv?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){$M(e,tE(t,i.inHover),n&&tE(n,i.inHover),r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=am(n.image,t.__image,t,t.onload);if(r&&lm(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var d=a-(u=n.sx),p=s-(c=n.sy);e.drawImage(r,u,c,d,p,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,h)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=t.getCursor(),a=r.length;o<a;o++){(c=r[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),rE(e,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c;(c=i[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),rE(e,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),p&&r&&eE(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var iE=new MM,oE=new Kp(100),aE=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function sE(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&iE.delete(e);var o=iE.get(e);if(o)return o;var a=uc(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,o=[n],s=!0,l=0;l<aE.length;++l){var u=a[aE[l]];if(null!=u&&!_c(u)&&!wc(u)&&!Cc(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(i?"-svg":"");var c=oE.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,p=uE(a.dashArrayX),h=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(Cc(e)){var t=Math.ceil(e);return[t,t]}var n=fc(e,(function(e){return Math.ceil(e)}));return e.length%2?n.concat(n):n}(a.dashArrayY),f=lE(a.symbol),g=(_=p,fc(_,(function(e){return cE(e)}))),m=cE(h),v=!i&&Yu.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=wg(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=wg(r,f[t].length);e*=r;var i=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var _;v&&(v.width=x.width*n,v.height=x.height*n,d=v.getContext("2d"));(function(){d&&(d.clearRect(0,0,v.width,v.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<h.length;++t)e+=h[t];if(e<=0)return;var o=-m,s=0,l=0,u=0;for(;o<x.height;){if(s%2==0){for(var c=l/2%f.length,g=0,_=0,b=0;g<2*x.width;){var w=0;for(t=0;t<p[u].length;++t)w+=p[u][t];if(w<=0)break;if(_%2==0){var S=.5*(1-a.symbolSize),C=g+p[u][_]*S,T=o+h[s]*S,M=p[u][_]*a.symbolSize,E=h[s]*a.symbolSize,I=b/2%f[c].length;A(C,T,M,E,f[c][I])}g+=p[u][_],++b,++_===p[u].length&&(_=0)}++u===p.length&&(u=0)}o+=h[s],++l,++s===h.length&&(s=0)}function A(e,t,o,s,l){var u=i?1:n,c=LM(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(i){var p=r.painter.renderOneToVNode(c);p&&y.children.push(p)}else nE(d,c)}})(),s&&oE.put(t,v||y);e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=i?1:1/n,iE.set(e,s),e.dirty=!1,s}function lE(e){if(!e||0===e.length)return[["rect"]];if(wc(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!wc(e[n])){t=!1;break}if(t)return lE([e]);var r=[];for(n=0;n<e.length;++n)wc(e[n])?r.push([e[n]]):r.push(e[n]);return r}function uE(e){if(!e||0===e.length)return[[0,0]];if(Cc(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!Cc(e[n])){t=!1;break}if(t)return uE([e]);var r=[];for(n=0;n<e.length;++n)if(Cc(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=fc(e[n],(function(e){return Math.ceil(e)}))).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function cE(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var dE=new pd,pE={};var hE=2e3,fE=4500,gE={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:hE,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:fE,ARIA:6e3,DECAL:7e3}},mE="__flagInMainProcess",vE="__pendingUpdate",yE="__needsUpdateStatus",xE=/^[a-zA-Z0-9_]+$/,_E="__connectUpdateStatus";function bE(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return SE(this,e,t);this.id}}function wE(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return SE(this,e,t)}}function SE(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),pd.prototype[t].apply(e,n)}var CE,TE,ME,EE,IE,AE,DE,kE,OE,RE,NE,LE,PE,BE,jE,FE,UE,zE,HE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t}(pd),VE=HE.prototype;VE.on=wE("on"),VE.off=wE("off");var WE=function(e){function t(t,n,r){var i=e.call(this,new gM)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},wc(n)&&(n=KE[n]),i._dom=t;var o=i._zr=ig(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:Oc(r.useDirtyRect,!1),useCoarsePointer:Oc(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=OT(yc(o.flush,o),17),(n=ac(n))&&zS(n,!0),i._theme=n,i._locale=function(e){if(wc(e)){var t=Pb[e.toUpperCase()]||{};return e===Rb||e===Nb?ac(t):sc(ac(t),ac(Pb[Lb]),!1)}return sc(ac(e),ac(Pb[Lb]),!1)}(r.locale||jb),i._coordSysMgr=new vS;var a=i._api=jE(i);function s(e,t){return e.__prio-t.__prio}return gp($E,s),gp(ZE,s),i._scheduler=new aM(i,a,ZE,$E),i._messageCenter=new HE,i._initEvents(),i.resize=yc(i.resize,i),o.animation.on("frame",i._onframe,i),RE(o,i),NE(o,i),Fc(i),i}return j(t,e),t.prototype._onframe=function(){if(!this._disposed){zE(this);var e=this._scheduler;if(this[vE]){var t=this[vE].silent;this[mE]=!0;try{CE(this),EE.update.call(this,null,this[vE].updateParams)}catch(e){throw this[mE]=!1,this[vE]=null,e}this._zr.flush(),this[mE]=!1,this[vE]=null,kE.call(this,t),OE.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),AE(this,r),e.performVisualTasks(r),BE(this,this._model,i,"remain",{}),n-=+new Date-o}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[mE])if(this._disposed)this.id;else{var r,i,o;if(Tc(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[mE]=!0,!this._model||t){var a=new bS(this._api),s=this._theme,l=this._model=new hS;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},XE);var u={seriesTransition:o,optionChanged:!0};if(n)this[vE]={silent:r,updateParams:u},this[mE]=!1,this.getZr().wakeUp();else{try{CE(this),EE.update.call(this,null,u)}catch(e){throw this[vE]=null,this[mE]=!1,e}this._ssr||this._zr.flush(),this[vE]=null,this[mE]=!1,kE.call(this,r),OE.call(this,r)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Fu.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Fu.svgSupported){var e=this._zr;return hc(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;hc(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return hc(r,(function(e){e.group.ignore=!1})),o}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if(tI[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();hc(eI,(function(o,d){if(o.group===n){var p=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(ac(e)),h=o.getDom().getBoundingClientRect();a=r(h.left,a),s=r(h.top,s),l=i(h.right,l),u=i(h.bottom,u),c.push({dom:p,left:h.left,top:h.top})}}));var p=(l*=d)-(a*=d),h=(u*=d)-(s*=d),f=Yu.createCanvas(),g=ig(f,{renderer:t?"svg":"canvas"});if(g.resize({width:p,height:h}),t){var m="";return hc(c,(function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Wv({shape:{x:0,y:0,width:p,height:h},style:{fill:e.connectedBackgroundColor}})),hc(c,(function(e){var t=new Pv({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,t){return IE(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return IE(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return hc(Ug(this._model,e),(function(e,r){r.indexOf("Models")>=0&&hc(e,(function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}}),this)}),this),!!n;this.id},t.prototype.getVisual=function(e,t){var n=Ug(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?_M(r,i,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;hc(GE,(function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&wM(o,(function(e){var t=sy(e);if(t&&null!=t.dataIndex){var r=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return n=lc({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),hc(QE,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),hc(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(bM("map","selectchanged",t,r,e),bM("pie","selectchanged",t,r,e)):"select"===e.fromAction?(bM("map","selected",t,r,e),bM("pie","selected",t,r,e)):"unselect"===e.fromAction&&(bM("map","unselected",t,r,e),bM("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Yg(this.getDom(),iI,"");var e=this,t=e._api,n=e._model;hc(e._componentsViews,(function(e){e.dispose(n,t)})),hc(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete eI[e.id]}},t.prototype.resize=function(e){if(!this[mE])if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[vE]&&(null==r&&(r=this[vE].silent),n=!0,this[vE]=null),this[mE]=!0;try{n&&CE(this),EE.update.call(this,{type:"resize",animation:lc({duration:0},e&&e.animation)})}catch(e){throw this[mE]=!1,e}this[mE]=!1,kE.call(this,r),OE.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(Tc(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),JE[e]){var n=JE[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=lc({},e);return t.type=QE[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(Tc(t)||(t={silent:!!t}),qE[e.type]&&this._model)if(this[mE])this._pendingActions.push(e);else{var n=t.silent;DE.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Fu.browser.weChat&&this._throttledZrFlush(),kE.call(this,n),OE.call(this,n)}},t.prototype.updateLabelLayout=function(){dE.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,i=e.get("zlevel")||0;t.eachRendered((function(e){return r(e,n,i,-1/0),!0}))}}function r(e,t,n,i){var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)i=Math.max(r(s[l],t,n,i),i);else e.z=t,e.zlevel=n,i=Math.max(e.z2,i);if(o&&(o.z=t,o.zlevel=n,isFinite(i)&&(o.z2=i+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function i(e,t){t.eachRendered((function(e){if(!I_(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}}))}function o(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(I_(e))return;if(e instanceof Av&&function(e){var t=cy(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(i){e.stateTransition=a;var r=e.getTextContent(),o=e.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}CE=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),TE(e,!0),TE(e,!1),t.plan()},TE=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&o[u];if(!c){var d=Qg(e.type);(c=new(t?yT.getClass(d.main,d.sub):IT.getClass(d.sub))).init(n,s),o[u]=c,i.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(c,e,n,s)}t?n.eachComponent((function(e,t){"series"!==e&&u(t)})):n.eachSeries(u);for(l=0;l<i.length;){var c=i[l];c.__alive?l++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},ME=function(e,t,n,r,i){var o=e._model;if(o.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};i&&(s.subType=i);var l,u=n.excludeSeriesId;null!=u&&(l=Wc(),hc(Mg(u),(function(e){var t=Ng(e,null);null!=t&&l.set(t,!0)}))),o&&o.eachComponent(s,(function(t){if(!(l&&null!=l.get(t.id)))if(nx(n))if(t instanceof mT)n.type!==fy||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=Bg(i,t);o=(_c(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=sy(a);Vy(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&Vy(r,c,d,n)}}}(t,n,e._api);else{var r=Yy(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,o=r.dispatchers;n.type===fy&&i&&!n.notBlur&&Wy(t.mainType,t.componentIndex,e._api),o&&hc(o,(function(e){n.type===fy?Py(e):By(e)}))}else tx(n)&&t instanceof mT&&(!function(e,t){if(tx(t)){var n=t.dataType,r=Bg(e.getData(n),t);_c(r)||(r=[r]),e[t.type===yy?"toggleSelect":t.type===my?"select":"unselect"](r,n)}}(t,n,e._api),Gy(t),UE(e))}),e),o&&o.eachComponent(s,(function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else hc([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,n)}},EE={prepareAndUpdate:function(e){CE(this),EE.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,t),AE(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),LE(this,r,i,t,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),dE.trigger("afterupdate",r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var o=[];r.eachComponent((function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,i,t);l&&l.update&&o.push(s)}else o.push(s)}}));var a=Wc();r.eachSeries((function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,r,i,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)})),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),BE(this,r,i,t,{},a),dE.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),IT.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),LE(this,n,this._api,t,{}),dE.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries((function(e){e.getData().clearAllVisual()})),IT.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent((function(e,i){if("series"!==e){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,t)}})),r.eachSeries((function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)})),dE.trigger("afterupdate",r,this._api))},updateLayout:function(e){EE.update.call(this,e)}},IE=function(e,t,n,r){if(e._disposed)e.id;else for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=Ug(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},AE=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},DE=function(e,t){var n=this,r=this.getModel(),i=e.type,o=e.escapeConnect,a=qE[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&Qg(l[0]);this[mE]=!0;var d=[e],p=!1;e.batch&&(p=!0,d=fc(e.batch,(function(t){return(t=uc(lc({},t),e)).batch=null,t})));var h,f=[],g=tx(e),m=nx(e);if(m&&Hy(this._api),hc(d,(function(t){if((h=(h=a.action(t,n._model,n._api))||lc({},t)).type=s.event||h.type,f.push(h),m){var r=zg(e),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";ME(n,u,t,o),UE(n)}else g?(ME(n,u,t,"series"),UE(n)):c&&ME(n,u,t,c.main,c.sub)})),"none"!==u&&!m&&!g&&!c)try{this[vE]?(CE(this),EE.update.call(this,e),this[vE]=null):EE[u].call(this,e)}catch(e){throw this[mE]=!1,e}if(h=p?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[mE]=!1,!t){var v=this._messageCenter;if(v.trigger(h.type,h),g){var y={type:"selectchanged",escapeConnect:o,selected:qy(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},kE=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();DE.call(this,n,e)}},OE=function(e){!e&&this.trigger("updated")},RE=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[vE]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},NE=function(e,t){e.on("mouseover",(function(e){var n=wM(e.target,ex);n&&(!function(e,t,n){var r=sy(e),i=Yy(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&Wy(r.componentMainType,r.componentIndex,n),hc(o,(function(e){return Ny(e,t)}))):(Vy(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&Wy(r.componentMainType,r.componentIndex,n),Ny(e,t))}(n,e,t._api),UE(t))})).on("mouseout",(function(e){var n=wM(e.target,ex);n&&(!function(e,t,n){Hy(n);var r=sy(e),i=Yy(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?hc(i,(function(e){return Ly(e,t)})):Ly(e,t)}(n,e,t._api),UE(t))})).on("click",(function(e){var n=wM(e.target,(function(e){return null!=sy(e).dataIndex}),!0);if(n){var r=n.selected?"unselect":"select",i=sy(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}}))},LE=function(e,t,n,r,i){!function(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})})),r){var i,o,a=t.concat(n);gp(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),hc(a,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)}))}}(t),PE(e,t,n,r,i),hc(e._chartsViews,(function(e){e.__alive=!1})),BE(e,t,n,r,i),hc(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},PE=function(e,t,r,a,s,l){hc(l||e._componentsViews,(function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)}))},BE=function(e,t,r,a,s,l){var u=e._scheduler;s=lc(s||{},{updatedSeries:t.getSeries()}),dE.trigger("series:beforeupdate",t,r,s);var c=!1;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;u.updatePayload(r,a),i(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}(t,n),Gy(t)})),u.unfinished=c||u.unfinished,dE.trigger("series:layoutlabels",t,r,s),dE.trigger("series:transition",t,r,s),t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];n(t,r),o(t,r)})),function(e,t){var n=e._zr,r=n.storage,i=0;r.traverse((function(e){e.isGroup||i++})),i>t.get("hoverLayerThreshold")&&!Fu.node&&!Fu.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),dE.trigger("series:afterupdate",t,r,s)},UE=function(e){e[yE]=!0,e.getZr().wakeUp()},zE=function(e){e[yE]&&(e.getZr().storage.traverse((function(e){I_(e)||t(e)})),e[yE]=!1)},jE=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return j(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Py(t,n),UE(e)},n.prototype.leaveEmphasis=function(t,n){By(t,n),UE(e)},n.prototype.enterBlur=function(t){!function(e){Dy(e,Ty)}(t),UE(e)},n.prototype.leaveBlur=function(t){jy(t),UE(e)},n.prototype.enterSelect=function(t){Fy(t),UE(e)},n.prototype.leaveSelect=function(t){Uy(t),UE(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(gS))(e)},FE=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][_E]=t}}hc(QE,(function(n,r){e._messageCenter.on(r,(function(n){if(tI[e.group]&&0!==e[_E]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];hc(eI,(function(t){t!==e&&t.group===e.group&&i.push(t)})),t(i,0),hc(i,(function(e){1!==e[_E]&&e.dispatchAction(r)})),t(i,2)}}))}))}}(),t}(pd),YE=WE.prototype;YE.on=bE("on"),YE.off=bE("off"),YE.one=function(e,t,n){var r=this;this.on.call(this,e,(function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)}),n)};var GE=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var qE={},QE={},ZE=[],XE=[],$E=[],KE={},JE={},eI={},tI={},nI=+new Date-0,rI=+new Date-0,iI="_echarts_instance_";function oI(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return eI[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,iI)]}(e);if(i)return i}var o=new WE(e,t,n);return o.id="ec_"+nI++,eI[o.id]=o,r&&Yg(e,iI,o.id),FE(o),dE.trigger("afterinit",o),o}function aI(e){if(_c(e)){var t=e;e=null,hc(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+rI++,hc(t,(function(t){t.group=e}))}return tI[e]=!0,e}function sI(e){tI[e]=!1}function lI(e,t){KE[e]=t}function uI(e){cc(XE,e)<0&&XE.push(e)}function cI(e,t){gI(ZE,e,t,2e3)}function dI(e,t){dE.on(e,t)}function pI(e,t,n){bc(t)&&(n=t,t="");var r=Tc(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,QE[t]||(Pc(xE.test(r)&&xE.test(t)),qE[r]||(qE[r]={action:n,actionInfo:e}),QE[t]=r)}function hI(e,t){gI($E,e,t,3e3,"visual")}var fI=[];function gI(e,t,n,r,i){if((bc(t)||Tc(t))&&(n=t,t=r),!(cc(fI,n)>=0)){fI.push(n);var o=aM.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function mI(e,t){JE[e]=t}var vI=function(e){var t=(e=ac(e)).type;t||Sg("");var n=t.split(":");2!==n.length&&Sg("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,IC.set(t,e)};function yI(e){return null==e?0:e.length||1}function xI(e){return e}hI(hE,UT),hI(fE,HT),hI(fE,VT),hI(hE,yM),hI(fE,xM),hI(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=sE(n,t))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=sE(i,t)}}))})),uI(zS),cI(900,(function(e){var t=Wc();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),t.each(HS)})),mI("default",(function(e,t){uc(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new eg,r=new Wv({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new ay({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Wv({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new c_({shape:{startAngle:-WT/2,endAngle:-WT/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*WT/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*WT/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),pI({type:fy,event:fy,update:fy},Qc),pI({type:gy,event:gy,update:gy},Qc),pI({type:my,event:my,update:my},Qc),pI({type:vy,event:vy,update:vy},Qc),pI({type:yy,event:yy,update:yy},Qc),lI("light",lM),lI("dark",fM);var _I=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||xI,this._newKeyGetter=r||xI,this.context=i,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=r[o],s=n[a],l=yI(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=yI(l),d=yI(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var p=0;p<c;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(o,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=yI(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[r](e[o],o);if(i||(n[o]=a),t){var s=t[a],l=yI(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),bI=_I,wI=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function SI(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var CI=function(e){this.otherDims={},null!=e&&lc(this,e)},TI=jg(),MI={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},EI=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=DI(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Oc(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=nC(this.source),n=!kI(e),r="",i=[],o=0,a=0;o<e;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(o);d&&(s=t?d.name:null,l=d.type)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=MI[l]||"f",u&&(r+=u.uid),r+="$"}var p=this.source;return{dimensions:i,hash:[p.seriesLayoutBy,p.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function II(e){return e instanceof EI}function AI(e){for(var t=Wc(),n=0;n<(e||[]).length;n++){var r=e[n],i=Tc(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function DI(e){var t=TI(e);return t.dimNameMap||(t.dimNameMap=AI(e.dimensionsDefine))}function kI(e){return e>30}var OI,RI,NI,LI,PI,BI,jI,FI=Tc,UI=fc,zI="undefined"==typeof Int32Array?Array:Int32Array,HI=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],VI=["_approximateExtent"],WI=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;II(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=wc(c)?new CI({name:c}):c instanceof CI?c:new CI(c),p=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=p,d.coordDimIndex=0);var h=d.otherDims=d.otherDims||{};o.push(p),i[p]=d,null!=l[p]&&(s=!0),d.createInvertedIndices&&(a[p]=[]),0===h.itemName&&(this._nameDimIdx=u),0===h.itemId&&(this._idDimIdx=u),r&&(d.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=Wc();hc(o,(function(e){f.set(i[e].storeDimIndex,e)}))}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(Cc(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,i=this;if(e instanceof UC&&(r=e),!r){var o=this.dimensions,a=ZS(e)||pc(e)?new rC(e,o.length):e;r=new UC;var s=UI(o,(function(e){return{type:i._dimInfos[e].type,property:e}}));r.initData(a,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n={},r=n.encode={},i=Wc(),o=[],a=[],s={};hc(e.dimensions,(function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;SI(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),SI(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}Uw.each((function(e,t){var n=SI(r,t),i=l.otherDims[t];null!=i&&!1!==i&&(n[i]=l.name)}))}));var l=[],u={};i.each((function(e,t){var n=r[t];u[t]=n[0],l=l.concat(n)})),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=fc(l,(function(t){return e.getDimensionInfo(t).storeDimIndex})),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(o=c.slice());var d=r.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,n.userOutput=new wI(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=t[s],o&&jI(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==Yw&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===zw&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&Dg(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=Ng(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=Ng(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)jI(this,a);OI(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){FI(e)?lc(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=NI(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return RI(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return _c(e)?r.getValues(UI(e,(function(e){return n._getStoreDimIndex(e)})),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){bc(e)&&(n=t,t=e,e=[]);var r=n||this,i=UI(LI(e),this._getStoreDimIndex,this);this._store.each(i,r?yc(t,r):t)},e.prototype.filterSelf=function(e,t,n){bc(e)&&(n=t,t=e,e=[]);var r=n||this,i=UI(LI(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?yc(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={};return hc(vc(e),(function(r){var i=t._getStoreDimIndex(r);n[i]=e[r]})),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){bc(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,o=UI(LI(e),this._getStoreDimIndex,this),a=BI(this);return a._store=this._store.map(o,i?yc(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=UI(LI(e),this._getStoreDimIndex,this);this._store.modify(o,i?yc(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=BI(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=BI(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new Ab(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new bI(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return RI(e,t)}),(function(e){return RI(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},FI(e)?lc(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(_c(i=this.getVisual(t))?i=i.slice():FI(i)&&(i=lc({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,FI(t)?lc(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){FI(e)?lc(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?lc(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){!function(e,t,n,r){if(r){var i=sy(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,"group"===r.type&&r.traverse((function(r){var i=sy(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){hc(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:UI(this.dimensions,this._getDimInfo,this),this.hostModel)),PI(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];bc(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Nc(arguments)))})},e.internalField=(OI=function(e){var t=e._invertedIndicesMap;hc(t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new zI(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}}))},NI=function(e,t,n){return Ng(e._getCategory(t,n),null)},RI=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=NI(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},LI=function(e){return _c(e)||(e=null!=e?[e]:[]),e},BI=function(t){var n=new e(t._schema?t._schema:UI(t.dimensions,t._getDimInfo,t),t.hostModel);return PI(n,t),n},PI=function(e,t){hc(HI.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,hc(VI,(function(n){e[n]=ac(t[n])})),e._calculationInfo=lc({},t._calculationInfo)},void(jI=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=NI(e,i,t)),null==s&&null!=o&&(r[t]=s=NI(e,o,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[t]=s}})),e}(),YI=WI;function GI(e,t){ZS(e)||(e=$S(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Wc(),o=[],a=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return hc(t,(function(e){var t;Tc(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&kI(a),l=r===e.dimensionsDefine,u=l?DI(e):AI(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Wc(c),p=new LC(a),h=0;h<p.length;h++)p[h]=-1;function f(e){var t=p[e];if(t<0){var n=r[e],i=Tc(n)?n:{name:n},a=new CI,s=i.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var l=o.length;return p[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(h=0;h<a;h++)f(h);d.each((function(e,t){var n=Mg(e).slice();if(1===n.length&&!wc(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);hc(n,(function(e,n){var i=wc(e)?u.get(e):e;null!=i&&i<a&&(r[n]=i,m(f(i),t,n))}))}}));var g=0;function m(e,t,n){null!=Uw.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}hc(n,(function(e){var t,n,r,i;if(wc(e))t=e,i={};else{t=(i=e).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=lc({},i)).ordinalMeta=o,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=Mg(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}hc(s,(function(e,o){var a=f(e);if(l&&null!=i.type&&(a.type=i.type),m(uc(a,i),t,o),null==a.name&&n){var s=n[o];!Tc(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&uc(a.otherDims,r)}))}}));var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var _=v||"value";function b(e){null==e.name&&(e.name=e.coordDim)}if(s)hc(o,(function(e){b(e)})),o.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var w=0;w<a;w++){var S=f(w);null==S.coordDim&&(S.coordDim=qI(_,i,x),S.coordDimIndex=0,(!v||y<=0)&&(S.isExtraCoord=!0),y--),b(S),null!=S.type||tS(e,w)!==Zw&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(e){for(var t=Wc(),n=0;n<e.length;n++){var r=e[n],i=r.name,o=t.get(i)||0;o>0&&(r.name=i+(o-1)),o++,t.set(i,o)}}(o),new EI({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function qI(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var QI=function(e){this.coordSysDims=[],this.axisMap=Wc(),this.categoryAxisMap=Wc(),this.coordSysName=e};var ZI={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",Hg).models[0],o=e.getReferringComponents("yAxis",Hg).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),XI(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),XI(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",Hg).models[0];t.coordSysDims=["single"],n.set("single",i),XI(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",Hg).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),XI(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),XI(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();hc(o.parallelAxisIndex,(function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),XI(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function XI(e){return"category"===e.get("type")}function $I(e,t,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!II(e.schema)}(t)?(i=t.schema,r=i.dimensions,o=t.store):r=t;var l,u,c,d,p=!(!e||!e.get("stack"));if(hc(r,(function(e,t){wc(e)&&(r[t]=e={name:e}),p&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,f=u.type,g=0;hc(r,(function(e){e.coordDim===h&&g++}));var m={name:c,coordDim:h,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(d,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),i.appendCalculationDimension(m),i.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function KI(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function JI(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=$S(e)):o=(r=i.getSource()).sourceFormat===zw;var a=function(e){var t=e.get("coordinateSystem"),n=new QI(t),r=ZI[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=vS.get(r);return t&&t.coordSysDims&&(n=fc(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=bc(l)?l:l?xc(Jw,s,t):null,c=GI(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var r,i;return n&&hc(e,(function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)})),i||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),p=o?null:i.getSharedDataStore(c),h=$I(t,{schema:c,store:p}),f=new YI(c,t);f.setCalculationInfo(h);var g=null!=d&&function(e){if(e.sourceFormat===zw){return!_c(Ag(function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(o?r:p,null,g),f}var eA=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();em(eA);var tA=eA,nA=0,rA=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++nA}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&fc(r,iA);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!wc(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Wc(this.categories))},e}();function iA(e){return Tc(e)&&null!=e.value?e.value:e+""}var oA=rA;function aA(e){return"interval"===e.type||"log"===e.type}function sA(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=yg(o/t,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=uA(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),cA(e,0,t),cA(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[lg(Math.ceil(e[0]/a)*a,s),lg(Math.floor(e[1]/a)*a,s)],e),i}function lA(e){var t=Math.pow(10,vg(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,lg(n*t)}function uA(e){return cg(e)+2}function cA(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function dA(e,t){return e>=t[0]&&e<=t[1]}function pA(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function hA(e,t){return e*(t[1]-t[0])+t[0]}var fA=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new oA({})),_c(r)&&(r=new oA({categories:fc(r,(function(e){return Tc(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return j(t,e),t.prototype.parse=function(e){return null==e?NaN:wc(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return dA(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return pA(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(hA(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(tA);tA.registerClass(fA);var gA=fA,mA=lg,vA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return j(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return dA(e,this._extent)},t.prototype.normalize=function(e){return pA(e,this._extent)},t.prototype.scale=function(e){return hA(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=uA(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]<r[0]&&(e?o.push({value:mA(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=mA(a+t,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:mA(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=mA(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=cg(e.value)||0:"auto"===n&&(n=this._intervalPrecision),mw(mA(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var o=sA(r,e,t,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=mA(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=mA(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(tA);tA.registerClass(vA);var yA=vA,xA="undefined"!=typeof Float32Array,_A=xA?Float32Array:Array;function bA(e){return _c(e)?xA?new Float32Array(e):e:new _A(e)}function wA(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function SA(e){return e.dim+e.index}function CA(e,t){var n=[];return t.eachSeriesByType(e,(function(e){EA(e)&&n.push(e)})),n}function TA(e){var t=function(e){var t={};hc(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[i]?t[i].push(u):t[i]=[u]}}));var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort((function(e,t){return e-t}));for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return hc(e,(function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,s=t[a],l=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(o[1]-o[0])/d.count()}var p=sg(e.get("barWidth"),r),h=sg(e.get("barMaxWidth"),r),f=sg(e.get("barMinWidth")||(IA(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:h,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:SA(i),stackId:wA(e)})})),function(e){var t={};hc(e,(function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var p=e.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return hc(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=vc(r).length;o=Math.max(35-4*a,15)+"%"}var s=sg(o,i),l=sg(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),hc(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var p,h=0;hc(r,(function(e,t){e.width||(e.width=d),p=e,h+=e.width*(1+l)})),p&&(h-=p.width*l);var f=-h/2;hc(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}(n)}function MA(e,t){var n=CA(e,t),r=TA(n);hc(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=wA(e),o=r[SA(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function EA(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function IA(e){return e.pipelineContext&&e.pipelineContext.large}var AA=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return j(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return Jb(e.value,qb[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}($b(this._minLevelUnit))]||qb.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,i){var o=null;if(wc(n))o=n;else if(bc(n))o=n(e.value,t,{level:e.level});else{var a=lc({},Yb);if(e.level>0)for(var s=0;s<Qb.length;++s)a[Qb[s]]="{primary|"+a[Qb[s]]+"}";var l=n?!1===n.inherit?n:uc(n,a):a,u=ew(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=Zb.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(_c(o)){var c=null==e.level?0:e.level>=0?e.level:o.length+e.level;o=o[c=Math.min(c,o.length-1)]}}return Jb(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),i=function(e,t,n,r){var i=1e4,o=Zb,a=0;function s(e,t,n,i,o,a,s){for(var l=new Date(t),u=t,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=e,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(e,i,o){var a=[],l=!i.length;if(!function(e,t,n,r){var i=mg(t),o=mg(n),a=function(e){return tw(i,e,r)===tw(o,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},p=function(){return d()&&a("second")},h=function(){return p()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return p();case"millisecond":return h()}}($b(e),r[0],r[1],n)){l&&(i=[{value:PA(new Date(r[0]),e,n)},{value:r[1]}]);for(var u=0;u<i.length-1;u++){var c=i[u].value,d=i[u+1].value;if(c!==d){var p=void 0,h=void 0,f=void 0,g=!1;switch(e){case"year":p=Math.max(1,Math.round(t/Vb/365)),h=nw(n),f=uw(n);break;case"half-year":case"quarter":case"month":p=OA(t),h=rw(n),f=cw(n);break;case"week":case"half-week":case"day":p=kA(t),h=iw(n),f=dw(n),g=!0;break;case"half-day":case"quarter-day":case"hour":p=RA(t),h=ow(n),f=pw(n);break;case"minute":p=NA(t,!0),h=aw(n),f=hw(n);break;case"second":p=NA(t,!1),h=sw(n),f=fw(n);break;case"millisecond":p=LA(t),h=lw(n),f=gw(n)}s(p,c,d,h,f,g,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,p=0,h=0;h<o.length&&a++<i;++h){var f=$b(o[h]);if(Kb(o[h]))if(l(o[h],u[u.length-1]||[],c),f!==(o[h+1]?$b(o[h+1]):null)){if(c.length){p=d,c.sort((function(e,t){return e.value-t.value}));for(var g=[],m=0;m<c.length;++m){var v=c[m].value;0!==m&&c[m-1].value===v||(g.push(c[m]),v>=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&p>y/1.5)break;if(u.push(g),d>y||e===o[h])break}c=[]}}var x=mc(fc(u,(function(e){return mc(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),_=[],b=x.length-1;for(h=0;h<x.length;++h)for(var w=x[h],S=0;S<w.length;++S)_.push({value:w[S].value,level:b-h});_.sort((function(e,t){return e.value-t.value}));var C=[];for(h=0;h<_.length;++h)0!==h&&_[h].value===_[h-1].value||C.push(_[h]);return C}(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(i)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=Vb,t[1]+=Vb),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-Vb}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,i=r[1]-r[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=DA.length,a=Math.min(function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n}(DA,this._approxInterval,0,o),o-1);this._interval=DA[a][1],this._minLevelUnit=DA[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Cc(e)?e:+mg(e)},t.prototype.contain=function(e){return dA(this.parse(e),this._extent)},t.prototype.normalize=function(e){return pA(this.parse(e),this._extent)},t.prototype.scale=function(e){return hA(e,this._extent)},t.type="time",t}(yA),DA=[["second",Ub],["minute",zb],["hour",Hb],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",Wb/2],["year",Wb]];function kA(e,t){return(e/=Vb)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function OA(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function RA(e){return(e/=Hb)>12?12:e>6?6:e>3.5?4:e>2?2:1}function NA(e,t){return(e/=t?zb:Ub)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function LA(e){return yg(e,!0)}function PA(e,t,n){var r=new Date(e);switch($b(t)){case"year":case"month":r[cw(n)](0);case"day":r[dw(n)](1);case"hour":r[pw(n)](0);case"minute":r[hw(n)](0);case"second":r[fw(n)](0),r[gw(n)](0)}return r.getTime()}tA.registerClass(AA);var BA=AA,jA=tA.prototype,FA=yA.prototype,UA=lg,zA=Math.floor,HA=Math.ceil,VA=Math.pow,WA=Math.log,YA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new yA,t._interval=0,t}return j(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return fc(FA.getTicks.call(this,e),(function(e){var t=e.value,i=lg(VA(this.base,t));return i=t===n[0]&&this._fixMin?qA(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?qA(i,r[1]):i}}),this)},t.prototype.setExtent=function(e,t){var n=WA(this.base);e=WA(Math.max(0,e))/n,t=WA(Math.max(0,t))/n,FA.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=jA.getExtent.call(this);t[0]=VA(e,t[0]),t[1]=VA(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=qA(t[0],n[0])),this._fixMax&&(t[1]=qA(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=WA(e[0])/WA(t),e[1]=WA(e[1])/WA(t),jA.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,vg(r)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[lg(HA(t[0]/i)*i),lg(zA(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){FA.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return dA(e=WA(e)/WA(this.base),this._extent)},t.prototype.normalize=function(e){return pA(e=WA(e)/WA(this.base),this._extent)},t.prototype.scale=function(e){return e=hA(e,this._extent),VA(this.base,e)},t.type="log",t}(tA),GA=YA.prototype;function qA(e,t){return UA(e,cg(t))}GA.getMinorTicks=FA.getMinorTicks,GA.getLabel=FA.getLabel,tA.registerClass(YA);var QA=YA,ZA=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);bc(i)?this._modelMinNum=JA(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=JA(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(bc(o)?this._modelMaxNum=JA(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=JA(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=_c(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Uf(s[0],1),Uf(s[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=e?r?0:NaN:t-i[0]*o),null==s&&(s=e?r?r-1:NaN:n+i[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=Dc(a)||Dc(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(a=d,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[$A[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[XA[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),XA={min:"_determinedMin",max:"_determinedMax"},$A={min:"_dataMin",max:"_dataMax"};function KA(e,t,n){var r=e.rawExtentInfo;return r||(r=new ZA(e,t,n),e.rawExtentInfo=r,r)}function JA(e,t){return null==t?null:Dc(t)?NaN:e.parse(t)}function eD(e,t){var n=e.type,r=KA(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=CA("bar",a),l=!1;if(hc(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=TA(s),c=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=function(e,t,n){if(e&&t){var r=e[SA(t)];return null!=r&&null!=n?r[wA(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;hc(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;hc(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/o)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(i,o,t,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function tD(e,t){var n=t,r=eD(e,n),i=r.extent,o=n.get("splitNumber");e instanceof QA&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function nD(e){var t,n,r=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):wc(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):bc(r)?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(rD(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function rD(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function iD(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new Kd(e.x,e.y,o,a)}function oD(e){var t=e.get("interval");return null==t?"auto":t}function aD(e){return"category"===e.type&&0===oD(e.getLabelModel())}function sD(e,t){var n={};return hc(e.mapDimensionsAll(t),(function(t){n[function(e,t){return KI(e,t)?e.getCalculationInfo("stackResultDimension"):t}(e,t)]=!0})),vc(n)}var lD=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),uD=[],cD={registerPreprocessor:uI,registerProcessor:cI,registerPostInit:function(e){dI("afterinit",e)},registerPostUpdate:function(e){dI("afterupdate",e)},registerUpdateLifecycle:dI,registerAction:pI,registerCoordinateSystem:function(e,t){vS.register(e,t)},registerLayout:function(e,t){gI($E,e,t,1e3,"layout")},registerVisual:hI,registerTransform:vI,registerLoading:mI,registerMap:function(e,t,n){var r=function(e){return pE[e]}("registerMap");r&&r(e,t,n)},registerImpl:function(e,t){pE[e]=t},PRIORITY:gE,ComponentModel:Pw,ComponentView:yT,SeriesModel:mT,ChartView:IT,registerComponentModel:function(e){Pw.registerClass(e)},registerComponentView:function(e){yT.registerClass(e)},registerSeriesModel:function(e){mT.registerClass(e)},registerChartView:function(e){IT.registerClass(e)},registerSubTypeDefaulter:function(e,t){Pw.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){!function(e,t){tg[e]=t}(e,t)}};function dD(e){_c(e)?hc(e,(function(e){dD(e)})):cc(uD,e)>=0||(uD.push(e),bc(e)&&(e={install:e}),e.install(cD))}function pD(e,t){return Math.abs(e-t)<1e-8}function hD(e,t,n){var r=0,i=e[0];if(!i)return!1;for(var o=1;o<e.length;o++){var a=e[o];r+=mv(i[0],i[1],a[0],a[1],t,n),i=a}var s=e[0];return pD(i[0],s[0])&&pD(i[1],s[1])||(r+=mv(i[0],i[1],s[0],s[1],t,n)),0!==r}var fD=jg();function gD(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=vD(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=nD(e);return{labels:fc(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function mD(e,t){return"category"===e.type?function(e,t){var n,r,i=yD(e,"ticks"),o=oD(t),a=xD(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(bc(o))n=wD(e,o,!0);else if("auto"===o){var s=vD(e,e.getLabelModel());r=s.labelCategoryInterval,n=fc(s.labels,(function(e){return e.tickValue}))}else n=bD(e,r=o,!0);return _D(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:fc(e.scale.getTicks(),(function(e){return e.value}))}}function vD(e,t){var n,r,i=yD(e,"labels"),o=oD(t),a=xD(i,o);return a||(bc(o)?n=wD(e,o):(r="auto"===o?function(e){var t=fD(e).autoInterval;return null!=t?t:fD(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=bD(e,r)),_D(i,o,{labels:n,labelCategoryInterval:r}))}function yD(e,t){return fD(e)[t]||(fD(e)[t]=[])}function xD(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function _D(e,t,n){return e.push({key:t,value:n}),n}function bD(e,t,n){var r=nD(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=aD(e),p=a.get("showMinLabel")||d,h=a.get("showMaxLabel")||d;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return h&&f-l!==o[1]&&g(o[1]),s}function wD(e,t,n){var r=e.scale,i=nD(e),o=[];return hc(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var SD=[0,1],CD=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return dg(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&TD(n=n.slice(),r.count()),ag(e,SD,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&TD(n=n.slice(),r.count());var i=ag(e,n,SD,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=fc(mD(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var o,a,s=e.getExtent();if(1===i)t[0].coord=s[0],o=t[1]={coord:s[1]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;hc(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*a},t.push(o)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],o.coord)&&(r?o.coord=s[1]:t.pop());r&&d(o.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=lg(e),t=lg(t),c?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),fc(this.scale.getMinorTicks(e),(function(e){return fc(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return gD(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=nD(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),p=0,h=0;l<=o[1];l+=s){var f,g,m=Pf(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,p=Math.max(p,f,7),h=Math.max(h,g,7)}var v=p/c,y=h/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=fD(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},e}();function TD(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var MD=CD;function ED(e,t){return e===t||e!=e&&t!=t}function ID(e,t){for(var n=e.length;n--;)if(ED(e[n][0],t))return n;return-1}var AD=Array.prototype.splice;function DD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}DD.prototype.clear=function(){this.__data__=[],this.size=0},DD.prototype.delete=function(e){var t=this.__data__,n=ID(t,e);return!(n<0)&&(n==t.length-1?t.pop():AD.call(t,n,1),--this.size,!0)},DD.prototype.get=function(e){var t=this.__data__,n=ID(t,e);return n<0?void 0:t[n][1]},DD.prototype.has=function(e){return ID(this.__data__,e)>-1},DD.prototype.set=function(e,t){var n=this.__data__,r=ID(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function kD(e){if(!Na(e))return!1;var t=Ga(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var OD,RD=ja["__core-js_shared__"],ND=(OD=/[^.]+$/.exec(RD&&RD.keys&&RD.keys.IE_PROTO||""))?"Symbol(src)_1."+OD:"";var LD=Function.prototype.toString;function PD(e){if(null!=e){try{return LD.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var BD=/^\[object .+?Constructor\]$/,jD=Function.prototype,FD=Object.prototype,UD=jD.toString,zD=FD.hasOwnProperty,HD=RegExp("^"+UD.call(zD).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function VD(e){return!(!Na(e)||(t=e,ND&&ND in t))&&(kD(e)?HD:BD).test(PD(e));var t}function WD(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return VD(n)?n:void 0}var YD=WD(ja,"Map"),GD=WD(Object,"create");var qD=Object.prototype.hasOwnProperty;var QD=Object.prototype.hasOwnProperty;function ZD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function XD(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function $D(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ZD.prototype.clear=function(){this.__data__=GD?GD(null):{},this.size=0},ZD.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ZD.prototype.get=function(e){var t=this.__data__;if(GD){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return qD.call(t,e)?t[e]:void 0},ZD.prototype.has=function(e){var t=this.__data__;return GD?void 0!==t[e]:QD.call(t,e)},ZD.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=GD&&void 0===t?"__lodash_hash_undefined__":t,this},$D.prototype.clear=function(){this.size=0,this.__data__={hash:new ZD,map:new(YD||DD),string:new ZD}},$D.prototype.delete=function(e){var t=XD(this,e).delete(e);return this.size-=t?1:0,t},$D.prototype.get=function(e){return XD(this,e).get(e)},$D.prototype.has=function(e){return XD(this,e).has(e)},$D.prototype.set=function(e,t){var n=XD(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function KD(e){var t=this.__data__=new DD(e);this.size=t.size}KD.prototype.clear=function(){this.__data__=new DD,this.size=0},KD.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},KD.prototype.get=function(e){return this.__data__.get(e)},KD.prototype.has=function(e){return this.__data__.has(e)},KD.prototype.set=function(e,t){var n=this.__data__;if(n instanceof DD){var r=n.__data__;if(!YD||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $D(r)}return n.set(e,t),this.size=n.size,this};var JD=function(){try{var e=WD(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function ek(e,t,n){"__proto__"==t&&JD?JD(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var tk=Object.prototype.hasOwnProperty;function nk(e,t,n){var r=e[t];tk.call(e,t)&&ED(r,n)&&(void 0!==n||t in e)||ek(e,t,n)}function rk(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?ek(n,s,l):nk(n,s,l)}return n}function ik(e){return qa(e)&&"[object Arguments]"==Ga(e)}var ok=Object.prototype,ak=ok.hasOwnProperty,sk=ok.propertyIsEnumerable,lk=ik(function(){return arguments}())?ik:function(e){return qa(e)&&ak.call(e,"callee")&&!sk.call(e,"callee")};var uk="object"==typeof exports&&exports&&!exports.nodeType&&exports,ck=uk&&"object"==typeof module&&module&&!module.nodeType&&module,dk=ck&&ck.exports===uk?ja.Buffer:void 0,pk=(dk?dk.isBuffer:void 0)||function(){return!1},hk=/^(?:0|[1-9]\d*)$/;function fk(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&hk.test(e))&&e>-1&&e%1==0&&e<t}function gk(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var mk={};function vk(e){return function(t){return e(t)}}mk["[object Float32Array]"]=mk["[object Float64Array]"]=mk["[object Int8Array]"]=mk["[object Int16Array]"]=mk["[object Int32Array]"]=mk["[object Uint8Array]"]=mk["[object Uint8ClampedArray]"]=mk["[object Uint16Array]"]=mk["[object Uint32Array]"]=!0,mk["[object Arguments]"]=mk["[object Array]"]=mk["[object ArrayBuffer]"]=mk["[object Boolean]"]=mk["[object DataView]"]=mk["[object Date]"]=mk["[object Error]"]=mk["[object Function]"]=mk["[object Map]"]=mk["[object Number]"]=mk["[object Object]"]=mk["[object RegExp]"]=mk["[object Set]"]=mk["[object String]"]=mk["[object WeakMap]"]=!1;var yk="object"==typeof exports&&exports&&!exports.nodeType&&exports,xk=yk&&"object"==typeof module&&module&&!module.nodeType&&module,_k=xk&&xk.exports===yk&&Pa.process,bk=function(){try{var e=xk&&xk.require&&xk.require("util").types;return e||_k&&_k.binding&&_k.binding("util")}catch(e){}}(),wk=bk&&bk.isTypedArray,Sk=wk?vk(wk):function(e){return qa(e)&&gk(e.length)&&!!mk[Ga(e)]},Ck=Object.prototype.hasOwnProperty;function Tk(e,t){var n=La(e),r=!n&&lk(e),i=!n&&!r&&pk(e),o=!n&&!r&&!i&&Sk(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var u in e)!t&&!Ck.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||fk(u,l))||s.push(u);return s}var Mk=Object.prototype;function Ek(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Mk)}function Ik(e,t){return function(n){return e(t(n))}}var Ak=Ik(Object.keys,Object),Dk=Object.prototype.hasOwnProperty;function kk(e){return null!=e&&gk(e.length)&&!kD(e)}function Ok(e){return kk(e)?Tk(e):function(e){if(!Ek(e))return Ak(e);var t=[];for(var n in Object(e))Dk.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var Rk=Object.prototype.hasOwnProperty;function Nk(e){if(!Na(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ek(e),n=[];for(var r in e)("constructor"!=r||!t&&Rk.call(e,r))&&n.push(r);return n}function Lk(e){return kk(e)?Tk(e,!0):Nk(e)}var Pk="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bk=Pk&&"object"==typeof module&&module&&!module.nodeType&&module,jk=Bk&&Bk.exports===Pk?ja.Buffer:void 0,Fk=jk?jk.allocUnsafe:void 0;function Uk(){return[]}var zk=Object.prototype.propertyIsEnumerable,Hk=Object.getOwnPropertySymbols,Vk=Hk?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(Hk(e),(function(t){return zk.call(e,t)})))}:Uk,Wk=Vk;function Yk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Gk=Ik(Object.getPrototypeOf,Object),qk=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Yk(t,Wk(e)),e=Gk(e);return t}:Uk;function Qk(e,t,n){var r=t(e);return La(e)?r:Yk(r,n(e))}function Zk(e){return Qk(e,Ok,Wk)}function Xk(e){return Qk(e,Lk,qk)}var $k=WD(ja,"DataView"),Kk=WD(ja,"Promise"),Jk=WD(ja,"Set"),eO=WD(ja,"WeakMap"),tO="[object Map]",nO="[object Promise]",rO="[object Set]",iO="[object WeakMap]",oO="[object DataView]",aO=PD($k),sO=PD(YD),lO=PD(Kk),uO=PD(Jk),cO=PD(eO),dO=Ga;($k&&dO(new $k(new ArrayBuffer(1)))!=oO||YD&&dO(new YD)!=tO||Kk&&dO(Kk.resolve())!=nO||Jk&&dO(new Jk)!=rO||eO&&dO(new eO)!=iO)&&(dO=function(e){var t=Ga(e),n="[object Object]"==t?e.constructor:void 0,r=n?PD(n):"";if(r)switch(r){case aO:return oO;case sO:return tO;case lO:return nO;case uO:return rO;case cO:return iO}return t});var pO=dO,hO=Object.prototype.hasOwnProperty;var fO=ja.Uint8Array;function gO(e){var t=new e.constructor(e.byteLength);return new fO(t).set(new fO(e)),t}var mO=/\w*$/;var vO=Fa?Fa.prototype:void 0,yO=vO?vO.valueOf:void 0;function xO(e,t,n){var r,i=e.constructor;switch(t){case"[object ArrayBuffer]":return gO(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?gO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?gO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,mO.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,yO?Object(yO.call(r)):{}}}var _O=Object.create,bO=function(){function e(){}return function(t){if(!Na(t))return{};if(_O)return _O(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),wO=bO;var SO=bk&&bk.isMap,CO=SO?vk(SO):function(e){return qa(e)&&"[object Map]"==pO(e)};var TO=bk&&bk.isSet,MO=TO?vk(TO):function(e){return qa(e)&&"[object Set]"==pO(e)},EO="[object Arguments]",IO="[object Function]",AO="[object Object]",DO={};function kO(e,t,n,r,i,o){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Na(e))return e;var c=La(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&hO.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,a)}else{var d=pO(e),p=d==IO||"[object GeneratorFunction]"==d;if(pk(e))return function(e,t){if(t)return e.slice();var n=e.length,r=Fk?Fk(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==AO||d==EO||p&&!i){if(a=l||p?{}:function(e){return"function"!=typeof e.constructor||Ek(e)?{}:wO(Gk(e))}(e),!s)return l?function(e,t){return rk(e,qk(e),t)}(e,function(e,t){return e&&rk(t,Lk(t),e)}(a,e)):function(e,t){return rk(e,Wk(e),t)}(e,function(e,t){return e&&rk(t,Ok(t),e)}(a,e))}else{if(!DO[d])return i?e:{};a=xO(e,d,s)}}o||(o=new KD);var h=o.get(e);if(h)return h;o.set(e,a),MO(e)?e.forEach((function(r){a.add(kO(r,t,n,r,e,o))})):CO(e)&&e.forEach((function(r,i){a.set(i,kO(r,t,n,i,e,o))}));var f=c?void 0:(u?l?Xk:Zk:l?Lk:Ok)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(f||e,(function(r,i){f&&(r=e[i=r]),nk(a,i,kO(r,t,n,i,e,o))})),a}DO[EO]=DO["[object Array]"]=DO["[object ArrayBuffer]"]=DO["[object DataView]"]=DO["[object Boolean]"]=DO["[object Date]"]=DO["[object Float32Array]"]=DO["[object Float64Array]"]=DO["[object Int8Array]"]=DO["[object Int16Array]"]=DO["[object Int32Array]"]=DO["[object Map]"]=DO["[object Number]"]=DO[AO]=DO["[object RegExp]"]=DO["[object Set]"]=DO["[object String]"]=DO["[object Symbol]"]=DO["[object Uint8Array]"]=DO["[object Uint8ClampedArray]"]=DO["[object Uint16Array]"]=DO["[object Uint32Array]"]=!0,DO["[object Error]"]=DO[IO]=DO["[object WeakMap]"]=!1;var OO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(Pw),RO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Hg).models[0]},t.type="cartesian2dAxis",t}(Pw);dc(RO,lD);var NO={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},LO=sc({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},NO),PO=sc({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},NO),BO={category:LO,value:PO,time:sc({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},PO),log:uc({logBase:10},PO)},jO={value:1,category:1,time:1,log:1};function FO(e,t,n,r){hc(jO,(function(i,o){var a=sc(sc({},BO[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return j(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=kw(this),r=n?Rw(e):{};sc(e,t.getTheme().get(o+"Axis")),sc(e,this.getDefaultOption()),e.type=UO(e),n&&Ow(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=oA.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",UO)}function UO(e){return e.type||(e.data?"category":"value")}var zO=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return fc(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),mc(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),HO=["x","y"];function VO(e){return"interval"===e.type||"time"===e.type}var WO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=HO,t}return j(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(VO(e)&&VO(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,p=this._transform=[l,0,0,u,c,d];this._invTransform=Ud([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),o=new Kd(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return od(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return od(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),i=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-r;return new Kd(n,r,i,o)},t}(zO),YO=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return j(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(MD),GO=YO;function qO(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f="x"===u?[d[2]-h,d[3]+h]:[d[0]-h,d[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:d[0],"x"===u?f[p[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),kc(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function QO(e){return"cartesian2d"===e.get("coordinateSystem")}function ZO(e){var t={xAxisModel:null,yAxisModel:null};return hc(t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,Hg).models[0];t[r]=o})),t}var XO=Math.log;var $O=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=HO,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=vc(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;aA(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(tD(l,s),aA(l)&&(t=a))}i.length&&(t||tD((t=i.pop()).scale,t.model),hc(i,(function(e){!function(e,t,n){var r=yA.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=eD(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var p=XO(e.base);u=[XO(u[0])/p,XO(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var h=r.getExtent.call(e);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var f=r.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=lA(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=lA(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=lA(f));var v=f*a;(g=lg((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=lg(v)):m>0&&u[1]<=0&&(m=0,g=-lg(v))}var y=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+f*y,m+f*x),r.setInterval.call(e,f),(y||x)&&r.setNiceExtent.call(e,g+f,m-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};hc(n.x,(function(e){JO(n,"y",e,i)})),hc(n.y,(function(e){JO(n,"x",e,i)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=Dw(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){hc(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?o.x:o.y)}))}s(),i&&(hc(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();i=n instanceof gA?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=nD(e),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var d=l(r?r[c]:{value:o[0]+c},c),p=iD(s.getTextRect(d),s.get("rotate")||0);a?a.union(p):a=p}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}})),s()),hc(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}Tc(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",Hg).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",Hg).models[0],a=e.gridModel,s=this._coordsList;if(r)cc(s,t=r.coordinateSystem)<0&&(t=null);else if(i&&o)t=this.getCartesian(i.componentIndex,o.componentIndex);else if(i)n=this.getAxis("x",i.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(KO(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new GO(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new gA({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new BA({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(tA.getClass(t)||yA)}}(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,hc(a.x,(function(t,n){hc(a.y,(function(i,o){var a="x"+n+"y"+o,s=new WO(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)}))}))},e.prototype._updateScale=function(e,t){function n(e,t){hc(sD(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}hc(this._axesList,(function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}})),e.eachSeries((function(e){if(QO(e)){var r=ZO(e),i=r.xAxisModel,o=r.yAxisModel;if(!KO(i,t)||!KO(o,t))return;var a=this.getCartesian(i.componentIndex,o.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}),this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return hc(this.getCartesians(),(function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);cc(t,i)<0&&t.push(i),cc(n,o)<0&&n.push(o)})),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",(function(i,o){var a=new e(i,t,n);a.name="grid_"+o,a.resize(i,n,!0),i.coordinateSystem=a,r.push(a)})),t.eachSeries((function(e){if(QO(e)){var t=ZO(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}})),r},e.dimensions=HO,e}();function KO(e,t){return e.getCoordSysModel()===t}function JO(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)eR(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&eR(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function eR(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}(e)}var tR=$O,nR=Math.PI,rR=function(){function e(e,t){this.group=new eg,this.opt=t,this.axisModel=e,uc(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new eg({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!iR[e]},e.prototype.add=function(e){iR[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,i,o=hg(t-e);return fg(o)?(i=n>0?"top":"bottom",r="center"):fg(o-nR)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<nR?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),iR={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(od(s,s,a),od(l,l,a));var c=lc({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new n_({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});V_(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var p=t.get(["axisLine","symbol"]);if(null!=p){var h=t.get(["axisLine","symbolSize"]);wc(p)&&(p=[p,p]),(wc(h)||Cc(h))&&(h=[h,h]);var f=PM(t.get(["axisLine","symbolOffset"])||0,h),g=h[0],m=h[1];hc([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==p[r]&&null!=p[r]){var i=LM(p[r],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;i.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=lR(i.getTicksCoords(),t.transform,l,uc(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}(n,r,t,e),o=function(e,t,n,r){var i=n.axis,o=kc(r.axisLabelShow,n.get(["axisLabel","show"]));if(!o||i.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=i.getViewLabels(),u=(kc(r.labelRotate,a.get("rotate"))||0)*nR/180,c=rR.innerTextLayout(r.rotation,u,r.labelDirection),d=n.getCategories&&n.getCategories(!0),p=[],h=rR.isLabelSilent(n),f=n.get("triggerEvent");return hc(l,(function(o,l){var u="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,g=o.formattedLabel,m=o.rawLabel,v=a;if(d&&d[u]){var y=d[u];Tc(y)&&y.textStyle&&(v=new Ab(y.textStyle,a,n.ecModel))}var x=v.getTextColor()||n.get(["axisLine","lineStyle","color"]),_=i.dataToCoord(u),b=new ay({x:_,y:r.labelOffset+r.labelDirection*s,rotation:c.rotation,silent:h,z2:10+(o.level||0),style:ub(v,{text:g,align:v.getShallow("align",!0)||c.textAlign,verticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||c.textVerticalAlign,fill:bc(x)?x("category"===i.type?m:"value"===i.type?u+"":u,l):x})});if(b.anid="label_"+u,f){var w=rR.makeAxisEventDataBase(n);w.targetType="axisLabel",w.value=m,w.tickIndex=l,"category"===i.type&&(w.dataIndex=u),sy(b).eventData=w}t.add(b),b.updateTransform(),p.push(b),e.add(b),b.decomposeTransform()})),p}(n,r,t,e);(function(e,t,n){if(aD(e.axis))return;var r=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],p=n[n.length-2];!1===r?(oR(o),oR(u)):aR(o,a)&&(r?(oR(a),oR(c)):(oR(o),oR(u)));!1===i?(oR(s),oR(d)):aR(l,s)&&(i?(oR(l),oR(p)):(oR(s),oR(d)))}(t,o,i),function(e,t,n,r){var i=n.axis,o=n.getModel("minorTick");if(!o.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var s=o.getModel("lineStyle"),l=r*o.get("length"),u=uc(s.getLineStyle(),uc(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=lR(a[c],t.transform,l,u,"minorticks_"+c),p=0;p<d.length;p++)e.add(d[p])}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&function(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new Kd(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var o=e[i],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=o.obb,p=!1,h=0;h<t.length;h++){var f=t[h];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new b_(f.localRect,f.transform)),d||(d=new b_(s,l)),d.intersect(f.obb)){p=!0;break}}}p?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new b_(a,o):null;t.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return t}(fc(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var i=kc(e.axisName,t.get("name"));if(i){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),p=d[0]>d[1]?-1:1,h=["start"===s?d[0]-p*c:"end"===s?d[1]+p*c:(d[0]+d[1])/2,sR(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*nR/180),sR(s)?o=rR.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,r){var i,o,a=hg(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;fg(a-nR/2)?(o=l?"bottom":"top",i="center"):fg(a-1.5*nR)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*nR&&a>nR/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,y=kc(e.nameTruncateMaxWidth,m.maxWidth,a),x=new ay({x:h[0],y:h[1],rotation:o.rotation,silent:rR.isLabelSilent(t),style:ub(u,{text:i,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(tb({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=rR.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,sy(x).eventData=_}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function oR(e){e&&(e.ignore=!0)}function aR(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=Pd([]);return Fd(i,i,-e.rotation),n.applyTransform(Bd([],i,e.getLocalTransform())),r.applyTransform(Bd([],i,t.getLocalTransform())),n.intersect(r)}}function sR(e){return"middle"===e||"center"===e}function lR(e,t,n,r,i){for(var o=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(od(a,a,t),od(s,s,t));var c=new n_({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});V_(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}var uR=rR;function cR(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var r=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),o=i.get("link",!0)||[],a=[];hc(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=fR(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(hc(n.getAxes(),xc(h,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),p=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&hc(p.baseAxes,xc(h,!d||"cross",c)),d&&hc(p.otherAxes,xc(h,"cross",!1))}}function h(r,s,c){var d=c.model.getModel("axisPointer",i),p=d.get("show");if(p&&("auto"!==p||r||hR(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};hc(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=ac(a.get(e))})),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===i){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&uc(l,c.textStyle)}}return e.model.getModel("axisPointer",new Ab(s,n,r))}(c,u,i,t,r,s):d;var h=d.get("snap"),f=d.get("triggerEmphasis"),g=fR(c.model),m=s||h||"category"===c.type,v=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:h,useHandle:hR(d),seriesModels:[],linkGroup:null};l[g]=v,e.seriesInvolved=e.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(dR(o[r+"AxisId"],n.id)||dR(o[r+"AxisIndex"],n.componentIndex)||dR(o[r+"AxisName"],n.name))return i}}(o,c);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=o[y].mapper,v.linkGroup=x}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&hc(e.coordSysAxesInfo[fR(n.model)],(function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}))}(n,e),n}function dR(e,t){return"all"===e||_c(e)&&cc(e,t)>=0||e===t}function pR(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[fR(e)]}function hR(e){return!!e.get(["handle","show"])}function fR(e){return e.type+"||"+e.id}var gR={},mR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=pR(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=hR(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),i.value=a,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=function(e){var t=pR(e);return t&&t.axisPointerModel}(e);o?(this._axisPointer||(this._axisPointer=new i)).render(e,o,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){gR[e]=t},t.getAxisPointerClass=function(e){return e&&gR[e]},t.type="axis",t}(yT),vR=mR,yR=jg();var xR=["axisLine","axisTickLabel","axisName"],_R=["splitArea","splitLine","minorSplitLine"],bR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return j(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new eg,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=qO(a,t),l=new uR(t,lc({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(aA(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));hc(xR,l.add,l),this._axisGroup.add(l.getGroup()),hc(_R,(function(e){t.get([e,"show"])&&wR[e](this,this._axisGroup,t,a)}),this),i&&"changeAxisOrder"===i.type&&i.isInitSort||Z_(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){yR(this).splitAreaColors=null},t.type="cartesianAxis",t}(vR),wR={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=_c(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o}),p=[],h=[],f=a.getLineStyle(),g=0;g<d.length;g++){var m=i.toGlobalCoord(d[g].coord);u?(p[0]=m,p[1]=l.y,h[0]=m,h[1]=l.y+l.height):(p[0]=l.x,p[1]=m,h[0]=l.x+l.width,h[1]=m);var v=c++%s.length,y=d[g].tickValue,x=new n_({anid:null!=y?"line_"+d[g].tickValue:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:h[0],y2:h[1]},style:uc({stroke:s[v]},f),silent:!0});V_(x.shape,f.lineWidth),t.add(x)}}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=o.getLineStyle(),p=0;p<l.length;p++)for(var h=0;h<l[p].length;h++){var f=i.toGlobalCoord(l[p][h].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new n_({anid:"minor_line_"+l[p][h].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});V_(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,d=yR(e).splitAreaColors,p=Wc(),h=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){h=(g+(c-1)*f)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();for(s=_c(s)?s:[s],f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,_=void 0,b=void 0,w=void 0;i.isHorizontal()?(x=m,_=l.y,b=y-x,w=l.height,m=x+b):(x=l.x,_=m,b=l.width,m=_+(w=y-_));var S=u[f-1].tickValue;null!=S&&p.set(S,h),t.add(new Wv({anid:null!=S?"area_"+S:null,shape:{x:x,y:_,width:b,height:w},style:uc({fill:s[h]},v),autoBatch:!0,silent:!0})),h=(h+1)%c}yR(e).splitAreaColors=p}}}(e,t,n,r)}},SR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="xAxis",t}(bR),CR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=SR.type,t}return j(t,e),t.type="yAxis",t}(bR),TR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return j(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Wv({shape:e.coordinateSystem.getRect(),style:uc({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(yT),MR={offset:0};function ER(e){e.registerComponentView(TR),e.registerComponentModel(OO),e.registerCoordinateSystem("cartesian2d",tR),FO(e,"x",RO,MR),FO(e,"y",RO,MR),e.registerComponentView(SR),e.registerComponentView(CR),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}var IR=jg(),AR=ac,DR=yc,kR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=xc(OR,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new eg,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);PR(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=pR(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=IR(e).pointerEl=new ib[i.type](AR(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=IR(e).labelEl=new ay(AR(t.label));e.add(i),NR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=IR(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=IR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),NR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=$_(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){kd(e.event)},onmousedown:DR(this._onHandleDragMove,this,0,0),drift:DR(this._onHandleDragMove,this),ondragend:DR(this._onHandleDragEnd,this)}),r.add(i)),PR(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");_c(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,RT(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){OR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,LR(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(LR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(LR(r)),IR(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),NT(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function OR(e,t,n,r){RR(IR(n).lastProp,r)||(IR(n).lastProp=r,t?M_(n,r,e):(n.stopAnimation(),n.attr(r)))}function RR(e,t){if(Tc(e)&&Tc(t)){var n=!0;return hc(t,(function(t,r){n=n&&RR(e[r],t)})),!!n}return e===t}function NR(e,t){e[t.get(["label","show"])?"show":"hide"]()}function LR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function PR(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)}))}function BR(e,t,n,r,i){var o=jR(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=yw(a.get("padding")||0),l=a.getFont(),u=Pf(o,l),c=i.position,d=u.width+s[1]+s[3],p=u.height+s[0]+s[2],h=i.align;"right"===h&&(c[0]-=d),"center"===h&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(e,t,n,r){var i=r.getWidth(),o=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,p,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:ub(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function jR(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:rD(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};hc(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),wc(a)?o=a.replace("{value}",o):bc(a)&&(o=a(s))}return o}function FR(e,t,n){var r=[1,0,0,1,0,0];return Fd(r,r,n.rotation),jd(r,r,n.position),G_([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var UR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=zR(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=HR[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,i,o){var a=uR.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),BR(t,r,i,o,{position:FR(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,qO(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=qO(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=FR(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=zR(o,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(kR);function zR(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var HR={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],o=VR(e),{x1:r[o=o||0],y1:r[1-o],x2:i[o],y2:i[1-o]})}},shadow:function(e,t,n){var r,i,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],i=[a,s],o=VR(e),{x:r[o=o||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function VR(e){return"x"===e.dim?0:1}var WR=UR,YR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(Pw),GR=jg(),qR=hc;function QR(e,t,n){if(!Fu.node){var r=t.getZr();GR(r).records||(GR(r).records={}),function(e,t){if(GR(e).initialized)return;function n(n,r){e.on(n,(function(n){var i=function(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);qR(GR(e).records,(function(e){e&&r(e,n,i.dispatchAction)})),function(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)}))}GR(e).initialized=!0,n("click",xc(XR,"click")),n("mousemove",xc(XR,"mousemove")),n("globalout",ZR)}(r,t),(GR(r).records[e]||(GR(r).records[e]={})).handler=n}}function ZR(e,t,n){e.handler("leave",null,n)}function XR(e,t,n,r){t.handler(e,n,r)}function $R(e,t){if(!Fu.node){var n=t.getZr();(GR(n).records||{})[e]&&(GR(n).records[e]=null)}}var KR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";QR("axisPointer",n,(function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){$R("axisPointer",t)},t.prototype.dispose=function(e,t){$R("axisPointer",t)},t.type="axisPointer",t}(yT),JR=KR;function eN(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=Bg(o,e);if(null==a||a<0||_c(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,p="x"===c||"radius"===c?1:0,h=o.mapDimension(d),f=[];f[p]=o.get(h,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(fc(l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var tN=jg();function nN(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||yc(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){sN(i)&&(i=eN({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=sN(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||sN(i),p={},h={},f={list:[],map:{}},g={showPointer:xc(iN,h),showTooltip:xc(oN,f)};hc(s.coordSysMap,(function(e,t){var n=l||e.containPoint(i);hc(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=r.pointToData(i)),null!=a&&rN(e,a,g,!1,p)}}))}));var m={};return hc(c,(function(e,t){var n=e.linkGroup;n&&!h[t]&&hc(n.axesInfo,(function(t,r){var i=h[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,aN(t),aN(e)))),m[e.key]=o}}))})),hc(m,(function(e,t){rN(c[t],e,g,!0,p)})),function(e,t,n){var r=n.axesInfo=[];hc(t,(function(t,n){var i=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}))}(h,c,p),function(e,t,n,r){if(sN(t)||!e.list.length)return void r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(f,i,e,a),function(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",o=tN(r)[i]||{},a=tN(r)[i]={};hc(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&hc(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];hc(o,(function(e,t){!a[t]&&l.push(e)})),hc(a,(function(e,t){!o[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),p}}function rN(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,i=e,o=[],a=Number.MAX_VALUE,s=-1;return hc(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(d,e,n);c=p.dataIndices,u=p.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var h=e-u,f=Math.abs(h);f<=a&&((f<a||h>=0&&s<0)&&(a=f,s=h,i=u,o.length=0),hc(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:i}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==i.seriesIndex&&lc(i,s[0]),!r&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function iN(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function oN(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=fR(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function aN(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function sN(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function lN(e){vR.registerAxisPointerClass("CartesianAxisPointer",WR),e.registerComponentModel(YR),e.registerComponentView(JR),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!_c(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=cR(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},nN)}function uN(e){dD(ER),dD(lN)}var cN="\0_ec_interaction_mutex";function dN(e,t){return!!pN(e)[t]}function pN(e){return e[cN]||(e[cN]={})}pI({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Qc);var hN=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=yc(n._mousedownHandler,n),i=yc(n._mousemoveHandler,n),o=yc(n._mouseupHandler,n),a=yc(n._mousewheelHandler,n),s=yc(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=uc(ac(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return j(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Od(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&mN("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!dN(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y,o=t-r,a=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&kd(e.event),gN(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Od(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=mN("zoomOnMouseWheel",e,this._opt),n=mN("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;fN(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);fN(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){dN(this._zr,"globalPan")||fN(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(pd);function fN(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(kd(r.event),gN(e,t,n,r,i))}function gN(e,t,n,r,i){i.isAvailableBehavior=yc(mN,null,n,r),e.trigger(t,i)}function mN(e,t,n){var r=n[e];return!e||r&&(!wc(r)||t.event[r+"Key"])}var vN=hN,yN={axisPointer:1,tooltip:1,brush:1};function xN(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=bN(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=bN(s,[0,a]),i=o=bN(s,[i,o]),r=0}t[0]=bN(t[0],n),t[1]=bN(t[1],n);var l=_N(t,r);t[r]+=e;var u,c=i||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[r]=bN(t[r],d),u=_N(t,r),null!=i&&(u.sign!==l.sign||u.span<i)&&(t[1-r]=t[r]+l.sign*i),u=_N(t,r),null!=o&&u.span>o&&(t[1-r]=t[r]+u.sign*o),t}function _N(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function bN(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var wN=!0,SN=Math.min,CN=Math.max,TN=Math.pow,MN="globalPan",EN={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},IN={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},AN={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},DN=0,kN=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new eg,n._uid="brushController_"+DN++,hc(iL,(function(e,t){this._handlers[t]=yc(e,this)}),n),n}return j(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){pN(e)[t]=n}(t,MN,this._uid),hc(this._handlers,(function(e,n){t.on(n,e)})),this._brushType=e.brushType,this._brushOption=sc(ac(AN),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=pN(e);r[t]===n&&(r[t]=null)}(e,MN,this._uid),hc(this._handlers,(function(t,n){e.off(n,t)})),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};hc(e,(function(e){t[e.panelId]=ac(e)}))}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=fc(e,(function(e){return sc(ac(AN),e,!0)}));var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new bI(t,e,(function(e,t){return o(e.__brushOption,t)}),o).add(a).update(a).remove((function(e){t[e]!==i&&r.group.remove(t[e])})).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(o,a){var s=e[o];if(null!=a&&t[a]===i)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):RN(r,ON(r,s));PN(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),UN(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(pd);function ON(e,t){var n=aL[t.brushType].createCover(e,t);return n.__brushOption=t,LN(n,t),e.group.add(n),n}function RN(e,t){var n=BN(t);return n.endCreating&&(n.endCreating(e,t),LN(t,t.__brushOption)),t}function NN(e,t){var n=t.__brushOption;BN(t).updateCoverShape(e,t,n.range,n)}function LN(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function PN(e,t){BN(t).updateCommon(e,t),NN(e,t)}function BN(e){return aL[e.__brushOption.brushType]}function jN(e,t,n){var r,i=e._panels;if(!i)return wN;var o=e._transform;return hc(i,(function(e){e.isTargetByCursor(t,n,o)&&(r=e)})),r}function FN(e,t){var n=e._panels;if(!n)return wN;var r=t.__brushOption.panelId;return null!=r?n[r]:wN}function UN(e){var t=e._covers,n=t.length;return hc(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function zN(e,t){var n=fc(e._covers,(function(e){var t=e.__brushOption,n=ac(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function HN(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function VN(e,t,n,r){var i=new eg;return i.add(new Wv({name:"main",style:qN(n),silent:!0,draggable:!0,cursor:"move",drift:xc(XN,e,t,i,["n","s","w","e"]),ondragend:xc(zN,t,{isEnd:!0})})),hc(r,(function(n){i.add(new Wv({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:xc(XN,e,t,i,n),ondragend:xc(zN,t,{isEnd:!0})}))})),i}function WN(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=CN(i,6),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],d=n[1][1],p=c-o+i/2,h=d-o+i/2,f=c-a,g=d-s,m=f+i,v=g+i;GN(e,t,"main",a,s,f,g),r.transformable&&(GN(e,t,"w",l,u,o,v),GN(e,t,"e",p,u,o,v),GN(e,t,"n",l,u,m,o),GN(e,t,"s",l,h,m,o),GN(e,t,"nw",l,u,o,o),GN(e,t,"ne",p,u,o,o),GN(e,t,"sw",l,h,o,o),GN(e,t,"se",p,h,o,o))}function YN(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(qN(n)),i.attr({silent:!r,cursor:r?"move":"default"}),hc([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var i=t.childOfName(n.join("")),o=1===n.length?ZN(e,n[0]):function(e,t){var n=[ZN(e,t[0]),ZN(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?IN[o]+"-resize":null})}))}function GN(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=SN(e[0][0],e[1][0]),n=SN(e[0][1],e[1][1]),r=CN(e[0][0],e[1][0]),i=CN(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}(JN(e,t,[[r,i],[r+o,i+a]])))}function qN(e){return uc({strokeNoScale:!0},e.brushStyle)}function QN(e,t,n,r){var i=[SN(e,n),SN(t,r)],o=[CN(e,n),CN(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function ZN(e,t){var n=q_({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return Y_(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function XN(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=KN(t,i,o);hc(r,(function(e){var t=EN[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(QN(s[0][0],s[1][0],s[0][1],s[1][1])),PN(t,n),zN(t,{isEnd:!1})}function $N(e,t,n,r){var i=t.__brushOption.range,o=KN(e,n,r);hc(i,(function(e){e[0]+=o[0],e[1]+=o[1]})),PN(e,t),zN(e,{isEnd:!1})}function KN(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function JN(e,t,n){var r=FN(e,t);return r&&r!==wN?r.clipPath(n,e._transform):ac(n)}function eL(e){var t=e.event;t.preventDefault&&t.preventDefault()}function tL(e,t,n){return e.childOfName("main").contain(t,n)}function nL(e,t,n,r){var i,o=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return TN(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&UN(e);var l=ac(s);l.brushType=rL(l.brushType,a),l.panelId=a===wN?null:a.panelId,o=e._creatingCover=ON(e,l),e._covers.push(o)}if(o){var u=aL[rL(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(JN(e,o,e._track)),r&&(RN(e,o),u.updateCommon(e,o)),NN(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&jN(e,t,n)&&UN(e)&&(i={isEnd:r,removeOnClick:!0});return i}function rL(e,t){return"auto"===e?t.defaultBrushType:e}var iL={mousedown:function(e){if(this._dragging)oL(this,e);else if(!e.target||!e.target.draggable){eL(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=jN(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,i=e._covers,o=jN(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var s=i[a].__brushOption;if(o&&(o===wN||s.panelId===o.panelId)&&aL[s.brushType].contain(i[a],n[0],n[1]))return}o&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){eL(e);var i=nL(this,e,r,!1);i&&zN(this,i)}},mouseup:function(e){oL(this,e)}};function oL(e,t){if(e._dragging){eL(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=nL(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&zN(e,o)}}var aL={lineX:sL(0),lineY:sL(1),rect:{createCover:function(e,t){function n(e){return e}return VN({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=HN(e);return QN(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){WN(e,t,n,r)},updateCommon:YN,contain:tL},polygon:{createCover:function(e,t){var n=new eg;return n.add(new Kx({name:"main",style:qN(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Zx({name:"main",draggable:!0,drift:xc($N,e,t),ondragend:xc(zN,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:JN(e,t,n)})},updateCommon:YN,contain:tL}};function sL(e){return{createCover:function(t,n){return VN({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=HN(t);return[SN(n[0][e],n[1][e]),CN(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=FN(t,n);if(a!==wN&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),WN(t,n,l,i)},updateCommon:YN,contain:tL}}var lL=kN;function uL(e){return e=pL(e),function(t){return X_(t,e)}}function cL(e,t){return e=pL(e),function(n){var r=null!=t?t:n,i=r?e.width:e.height,o=r?e.x:e.y;return[o,o+(i||0)]}}function dL(e,t,n){var r=pL(e);return function(e,i){return r.contain(i[0],i[1])&&!function(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!yN.hasOwnProperty(r.mainType)&&i&&i.model!==n}(e,t,n)}}function pL(e){return Kd.create(e)}var hL=["x","y","radius","angle","single"],fL=["cartesian2d","polar","singleAxis"];function gL(e){return e+"Axis"}function mL(e,t){var n,r=Wc(),i=[],o=Wc();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return i}function vL(e){var t=e.ecModel,n={infoList:[],infoMap:Wc()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(gL(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var yL=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),xL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return j(t,e),t.prototype.init=function(e,t,n){var r=_L(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=_L(e);sc(this.option,e,!0),sc(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;hc([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Wc();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return hc(hL,(function(n){var r=this.getReferringComponents(gL(n),Vg);if(r.specified){t=!0;var i=new yL;hc(r.models,(function(e){i.add(e.componentIndex)})),e.set(n,i)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x";o(n.findComponents({mainType:i+"Axis"}),i)}r&&o(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function o(t,n){var i=t[0];if(i){var o=new yL;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",Hg).models[0];a&&hc(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",Hg).models[0]&&o.add(e.componentIndex)}))}}}r&&hc(hL,(function(t){if(r){var i=n.findComponents({mainType:gL(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new yL;o.add(i[0].componentIndex),e.set(t,o),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");hc([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(gL(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){hc(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(gL(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;hc([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;hc(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(i,o.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(Pw);function _L(e){var t={};return hc(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var bL=xL,wL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(yT),SL=hc,CL=ug,TL=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return cc(fL,t)>=0}(t)){var n=gL(this._dimName),r=t.getReferringComponents(n,Hg).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return ac(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];SL(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(ag(c,o,n))):(t=!0,c=ag(d=null==d?n[u]:r.parse(d),n,o)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?o[u]:c})),CL(s),CL(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";xN(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=ag(e[s],n,i,!0),o&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];SL(n,(function(e){!function(e,t,n){t&&hc(sD(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var i=e.getAxisModel(),o=KA(i.axis.scale,i,r).calculate();return[o.min,o.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&SL(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=fc(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,i,l=0;l<r.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<o[0],p=u>o[1];if(c&&!d&&!p)return!0;c&&(i=!0),d&&(t=!0),p&&(n=!0)}return i&&t&&n}))}else SL(r,(function(n){if("empty"===i)e.setData(t=t.map(n,(function(e){return function(e){return e>=o[0]&&e<=o[1]}(e)?e:NaN})));else{var r={};r[n]=o,t.selectRange(r)}}));SL(r,(function(e){t.setApproximateExtent(o,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;SL(["min","max"],(function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=ag(n[0]+o,n,[0,100],!0):null!=i&&(o=ag(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=dg(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();var ML=TL,EL={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(gL(r),i);t(r,i,o,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new ML(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=Wc();return hc(n,(function(e){hc(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var IL=!1;function AL(e){IL||(IL=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,EL),function(e){e.registerAction("dataZoom",(function(e,t){hc(mL(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}var DL=function(){},kL={};var OL=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],RL=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=LL(t,e);hc(PL,(function(e,t){(!n||!n.include||cc(n.include,t)>=0)&&e(i,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=FL[e.brushType](0,n,t);e.__rangeOffset={offset:zL[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){hc(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&hc(r.coordSyses,(function(r){var i=FL[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){hc(e,(function(e){var n,r,i,o,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=FL[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?zL[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,i=VL(n),o=VL(r),a=[i[0]/o[0],i[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return fc(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:uL(r),isTargetByCursor:dL(r,e,n.coordSysModel),getLinearBrushOtherExtent:cL(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&cc(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=LL(t,e),i=0;i<n.length;i++){var o=n[i],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<BL.length;s++)if(BL[s](r,o))return o}return!0},e}();function NL(e){return e[0]>e[1]&&e.reverse(),e}function LL(e,t){return Ug(e,t,{includeMainTypes:OL})}var PL={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=Wc(),a={},s={};(n||r||i)&&(hc(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),hc(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),hc(i,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var i=e.coordinateSystem,o=[];hc(i.getCartesians(),(function(e,t){(cc(n,e.getAxis("x").model)>=0||cc(r,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:jL.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){hc(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:jL.geo})}))}},BL=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],jL={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(Y_(e)),t}},FL={lineX:xc(UL,0),lineY:xc(UL,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[NL([i[0],o[0]]),NL([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:fc(n,(function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o})),xyMinMax:i}}};function UL(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=NL(fc([0,1],(function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var zL={lineX:xc(HL,0),lineY:xc(HL,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return fc(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function HL(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function VL(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var WL=RL,YL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(Pw);function GL(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function qL(e){if(Fu.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var QL=qL(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function ZL(e,t){if(!e)return t;t=vw(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var XL=ZL(qL(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),$L=ZL(QL,"transform"),KL="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Fu.transform3dSupported?"will-change:transform;":"");function JL(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Fu.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=Fu.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+$L+":"+a+";":[["top",0],["left",0],[QL,a]]}function eP(e,t,n){var r=[],i=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=rT(e,"html"),p=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+p),t&&i&&r.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,i="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,i+=Fu.transformSupported?","+$L+r:",left"+r+",top"+r),XL+":"+i}(i,n)),o&&r.push("background-color:"+o),hc(["width","color","radius"],(function(t){var n="border-"+t,i=vw(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))})),r.push(function(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+a+"px "+s+"px "+o+"px "+i),hc(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}(c)),null!=d&&r.push("padding:"+yw(d).join("px ")+"px"),r.join(";")+";"}function tP(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,r,i){yd(vd,t,r,i,!0)&&yd(e,n,vd[0],vd[1])}(e,a,document.body,r,i)}else{e[0]=r,e[1]=i;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var nP=function(){function e(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Fu.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;tP(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;Ad(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){var t,n,r,i=this._container,o=(n="position",(r=(t=i).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t))?n?r[n]:r:null),a=i.style;"absolute"!==a.position&&"absolute"!==o&&(a.position="relative");var s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=KL+eP(e,!this._firstShow,this._longHide)+JL(i[0],i[1],!0)+"border-color:"+Sw(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null!=e){var a="";if(wc(i)&&"item"===n.get("trigger")&&!GL(n)&&(a=function(e,t,n){if(!wc(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=Sw(t);var o,a,s="left"===(o=n)?"right":"right"===o?"left":"top"===o?"bottom":"top",l=Math.max(1.5*Math.round(i),6),u="",c=$L+":";cc(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,p=l+i,h=p*Math.abs(Math.cos(d))+p*Math.abs(Math.sin(d)),f=t+" solid "+i+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-p)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),wc(e))o.innerHTML=e+a;else if(e){o.innerHTML="",_c(e)||(e=[e]);for(var s=0;s<e.length;s++)Ic(e[s])&&e[s].parentNode!==o&&o.appendChild(e[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}}else o.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if(tP(n,this._zr,this._appendToBody,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;hc(JL(n[0],n[1]),(function(e){r[e[0]]=e[1]}))}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Fu.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(yc(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},e}(),rP=nP;function iP(e){return Math.max(0,e)}function oP(e){var t=iP(e.shadowBlur||0),n=iP(e.shadowOffsetX||0),r=iP(e.shadowOffsetY||0);return{left:iP(t-n),right:iP(t+n),top:iP(t-r),bottom:iP(t+r)}}function aP(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var sP=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),aP(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var o=this;Tc(e)&&Sg(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new ay({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:rT(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),hc(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){o.el.style[e]=n.get(e)})),hc(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){o.el.style[e]=a.get(e)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=oP(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;aP(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=iP(i.borderWidth||0),a=oP(i);n.x=e+o+a.left,n.y=t+o+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(yc(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}(),lP=new Wv({shape:{x:-1,y:-1,width:2,height:2}}),uP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.init=function(e,t){if(!Fu.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?Fu.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new sP(t):new rP(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)})}},t.prototype.render=function(e,t,n){if(!Fu.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?RT(this,"_updatePosition",50,"fixRate"):NT(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");QR("itemTooltip",this._api,yc((function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Fu.node&&n.getDom()){var i=dP(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=zg(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=Wg(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=sy(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=lP;l.x=r.x,l.y=r.y,l.update(),sy(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=eN(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(dP(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s)if("axis"===cP([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var i,o;this._lastDataByCoordSys=null,wM(n,(function(e){return null!=sy(e).dataIndex?(i=e,!0):null!=sy(e).tooltipConfig?(o=e,!0):void 0}),!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=yc(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=cP([t.tooltipOption],r),a=this._renderMode,s=[],l=QC("section",{blocks:[],noHeader:!0}),u=[],c=new iT;hc(e,(function(e){hc(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=jR(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=QC("section",{header:o,noHeader:!Bc(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),hc(e.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=p.getDataParams(h);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=rD(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",Sw(f.color),a);var g=vC(p.formatTooltip(h,!0,null)),m=g.frag;if(m){var v=cP([p],r).get("valueFormatter");d.blocks.push(v?lc({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,p=o.get("order"),h=eT(l,c,a,p,n.get("useUTC"),o.get("textStyle"));h&&u.unshift(h);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=sy(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,p=e.positionDefault,h=cP([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=h.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new iT;g.marker=m.makeTooltipMarker("item",Sw(g.color),d);var v=vC(s.formatTooltip(l,!1,u)),y=h.get("order"),x=h.get("valueFormatter"),_=v.frag,b=_?eT(x?lc({valueFormatter:x},_):_,m,d,y,r.get("useUTC"),h.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,b,g,w,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=sy(t),i=r.tooltipConfig.option||{};if(wc(i)){i={content:i,formatter:i}}var o=[i],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a),o.push({formatter:i.content});var s=e.positionDefault,l=cP(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new iT;this._showOrMove(l,(function(){var n=ac(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,p=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(wc(c)){var h=e.ecModel.get("useUTC"),f=_c(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=Jb(f.axisValue,d,h)),d=ww(d,n,!0)}else if(bc(c)){var g=yc((function(t,r){t===this._ticket&&(u.setContent(r,l,e,p,a),this._updatePosition(e,a,i,o,u,n,s))}),this);this._ticket=r,d=c(n,r,g)}else d=c;u.setContent(d,l,e,p,a),u.show(e,p),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||_c(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:_c(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),bc(t)&&(t=t([n,r],o,i.el,p,{viewSize:[s,l],contentSize:u.slice()})),_c(t))n=sg(t[0],s),r=sg(t[1],l);else if(Tc(t)){var h=t;h.width=u[0],h.height=u[1];var f=Dw(h,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(wc(t)&&a){var g=function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}(t,p,u,e.get("borderWidth"));n=g[0],r=g[1]}else{g=function(e,t,n,r,i,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(e+l+o+2>r?e-=l+o:e+=o);null!=a&&(t+u+a>i?t-=u+a:t+=a);return[e,t]}(n,r,i,s,l,c?null:20,d?null:20);n=g[0],r=g[1]}if(c&&(n-=pP(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=pP(d)?u[1]/2:"bottom"===d?u[1]:0),GL(e)){g=function(e,t,n,r,i){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,i,s,l);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&hc(n,(function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&hc(a,(function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&hc(a,(function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&hc(e.seriesDataIndices,(function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Fu.node&&t.getDom()&&(NT(this,"_updatePosition"),this._tooltipContent.dispose(),$R("itemTooltip",t))},t.type="tooltip",t}(yT);function cP(e,t,n){var r,i=t.ecModel;n?(r=new Ab(n,i,i),r=new Ab(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof Ab&&(a=a.get("tooltip",!0)),wc(a)&&(a={formatter:a}),a&&(r=new Ab(a,r,i)))}return r}function dP(e,t){return e.dispatchAction||yc(t.dispatchAction,t)}function pP(e){return"center"===e||"middle"===e}var hP=uP;function fP(e){dD(lN),e.registerComponentModel(YL),e.registerComponentView(hP),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Qc),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Qc)}var gP=["rect","polygon","keep","clear"];function mP(e,t){var n=Mg(e?e.brush:[]);if(n.length){var r=[];hc(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;_c(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(e){var t={};hc(e,(function(e){t[e]=1})),e.length=0,hc(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,gP)}}var vP=hc,yP=Tc,xP=-1,_P=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=ac(t);this.type=r,this.mappingMethod=n,this._normalizeData=DP[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(bP(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,hc(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===n?i.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(vP(t,(function(e,t){n[e]=t})),!_c(r)){var i=[];Tc(r)?vP(r,(function(e,t){var r=n[t];i[null!=r?r:xP]=e})):i[-1]=r,r=AP(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):bP(i,!0):(Pc("linear"!==n||i.dataExtent),bP(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return yc(this._normalizeData,this)},e.listVisualTypes=function(){return vc(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){Tc(e)?hc(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=_c(t)?[]:Tc(t)?{}:(i=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,r={};return t&&vP(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(_c(e))e=e.slice();else{if(!yP(e))return[];var t=[];vP(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||wc(s)&&s===e+"")return o;n&&d(s,o)}}for(o=0,a=t.length;o<a;o++){var l=t[o],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(kP(c[1],e,u[1]))return o}else if(u[1]===1/0){if(kP(c[0],u[0],e))return o}else if(kP(c[0],u[0],e)&&kP(c[1],e,u[1]))return o;n&&d(u[0],o),n&&d(u[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:CP("color"),getColorMapper:function(){var e=this.option;return yc("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),TP.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=fh(t,e.parsedVisual,r),i?r:mh(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return mh(fh(e,this.option.parsedVisual),"rgba")},category:TP,piecewise:function(e,t){var n=IP.call(this,t);return null==n&&(n=mh(fh(e,this.option.parsedVisual),"rgba")),n},fixed:MP}},colorHue:wP((function(e,t){return gh(e,t)})),colorSaturation:wP((function(e,t){return gh(e,null,t)})),colorLightness:wP((function(e,t){return gh(e,null,null,t)})),colorAlpha:wP((function(e,t){return function(e,t){var n=dh(e);if(n&&null!=t)return n[3]=th(t),mh(n,"rgba")}(e,t)})),decal:{applyVisual:CP("decal"),_normalizedToVisual:{linear:null,category:TP,piecewise:null,fixed:null}},opacity:{applyVisual:CP("opacity"),_normalizedToVisual:EP([0,1])},liftZ:{applyVisual:CP("liftZ"),_normalizedToVisual:{linear:MP,category:MP,piecewise:MP,fixed:MP}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:SP,category:TP,piecewise:function(e,t){var n=IP.call(this,t);return null==n&&(n=SP.call(this,e)),n},fixed:MP}},symbolSize:{applyVisual:CP("symbolSize"),_normalizedToVisual:EP([0,1])}},e}();function bP(e,t){var n=e.visual,r=[];Tc(n)?vP(n,(function(e){r.push(e)})):null!=n&&r.push(n);t||1!==r.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(r[1]=r[0]),AP(e,r)}function wP(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:EP([0,1])}}function SP(e){var t=this.option.visual;return t[Math.round(ag(e,[0,1],[0,t.length-1],!0))]||{}}function CP(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function TP(e){var t=this.option.visual;return t[this.option.loop&&e!==xP?e%t.length:e]}function MP(){return this.option.visual[0]}function EP(e){return{linear:function(t){return ag(t,e,this.option.visual,!0)},category:TP,piecewise:function(t,n){var r=IP.call(this,n);return null==r&&(r=ag(t,e,this.option.visual,!0)),r},fixed:MP}}function IP(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[_P.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function AP(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=fc(t,(function(e){var t=dh(e);return t||[0,0,0,1]}))),t}var DP={linear:function(e){return ag(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=_P.findPieceIndex(e,t,!0);if(null!=n)return ag(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?xP:t},fixed:Qc};function kP(e,t,n){return e?t<=n:t<n}var OP=_P,RP=hc;function NP(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var LP={lineX:PP(0),lineY:PP(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&hD(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,o=e.y,a=e.width,s=e.height,l=r[0];return!!(hD(r,i,o)||hD(r,i+a,o)||hD(r,i,o+s)||hD(r,i+a,o+s)||Kd.create(e).contain(l[0],l[1])||K_(i,o,i+a,o,r)||K_(i,o,i,o+s,r)||K_(i+a,o,i+a,o+s,r)||K_(i,o+s,i+a,o+s,r))||void 0}}};function PP(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return BP(t[e],i)}},rect:function(r,i,o){if(r){var a=o.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),BP(s[0],a)||BP(s[1],a)||BP(a[0],s)||BP(a[1],s)}}}}function BP(e,t){return t[0]<=e&&e<=t[1]}var jP=["inBrush","outOfBrush"],FP="__ecBrushSelect",UP="__ecInBrushSelectEvent";function zP(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new WL(t.option,e)).setInputRanges(t.areas,e)}))}function HP(e,t,n){var r,i,o=[];e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),zP(e),e.eachComponent({mainType:"brush"},(function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:ac(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],p=!1;n||(r=s.throttleType,i=s.throttleDelay);var h=fc(t.areas,(function(e){var t=YP[e.brushType],n=uc({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return LP[t].point(r,n,e)},rect:function(r){return LP[t].rect(r,n,e)}};return n}(n),n})),f=function(e,t,n){var r={};return RP(t,(function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);RP(e[t],(function(e,r){if(OP.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new OP(i),"opacity"===r&&((i=ac(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new OP(i))}}))})),r}(t.option,jP,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}_c(l)&&hc(l,(function(e){u[e]=1})),e.eachSeries((function(n,r){var i=d[r]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;p=p||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,r):function(n,r,i){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(_c(n)?cc(n,t)<0:t!==n)}(t,r))return;if(hc(h,(function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),p=p||m(i)})),g(r)&&m(i)){var o=n.getData();o.each((function(e){WP(n,i,o,e)&&(c[e]=1)}))}}(n,r,i)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var r=d[t],i=e.getData(),o=g(t)?function(e){return c[e]?(n.dataIndex.push(i.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return WP(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?p:m(r))&&function(e,t,n,r,i,o){var a,s={};function l(e){return _M(n,a,e)}function u(e,t){!function(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}(n,a,e,t)}function c(e,c){a=null==o?e:c;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var p=r.call(i,e),h=t[p],f=s[p],g=0,m=f.length;g<m;g++){var v=f[g];h[v]&&h[v].applyVisual(e,l,u)}}hc(e,(function(e){var n=OP.prepareVisualTypes(t[e]);s[e]=n})),null==o?n.each(c):n.each([o],c)}(jP,f,i,o)}))})),function(e,t,n,r,i){if(!i)return;var o=e.getZr();if(o[UP])return;o[FP]||(o[FP]=VP);var a=RT(o,FP,n,t);a(e,r)}(t,r,i,o,n)}function VP(e,t){if(!e.isDisposed()){var n=e.getZr();n[UP]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[UP]=!1}}function WP(e,t,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i];if(e.brushSelector(r,n,a.selectors,a))return!0}}var YP={rect:function(e){return GP(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=n[r];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&GP(t)}};function GP(e){return new Kd(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var qP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new lL(t.getZr())).on("brush",yc(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){zP(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:ac(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:ac(n),$from:t})},t.type="brush",t}(yT),QP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return j(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&function(e,t,n){var r;hc(n,(function(e){t.hasOwnProperty(e)&&NP(t[e])&&(r=!0)})),r&&hc(n,(function(n){t.hasOwnProperty(n)&&NP(t[n])?e[n]=ac(t[n]):delete e[n]}))}(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=fc(e,(function(e){return ZP(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=ZP(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Pw);function ZP(e,t){return sc({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Ab(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var XP=QP,$P=["rect","polygon","lineX","lineY","keep","clear"],KP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.render=function(e,t,n){var r,i,o;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,i=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=r,this._brushMode=i,hc(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?o:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return hc(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){return{show:!0,type:$P.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(DL),JP=KP;function eB(e){e.registerComponentView(qP),e.registerComponentModel(XP),e.registerPreprocessor(mP),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,HP),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Qc),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Qc),function(e,t){kL[e]=t}("brush",JP)}var tB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return j(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Pw),nB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Oc(e.get("textBaseline"),e.get("textVerticalAlign")),l=new ay({style:ub(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new ay({style:ub(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),h=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!p&&!f,d.silent=!h&&!f,p&&l.on("click",(function(){Cw(p,"_"+e.get("target"))})),h&&d.on("click",(function(){Cw(h,"_"+e.get("subtarget"))})),sy(l).eventData=sy(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=Dw(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=r.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new Wv({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});r.add(b)}},t.type="title",t}(yT);function rB(e){e.registerComponentModel(tB),e.registerComponentView(nB)}function iB(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=fC(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(fC(e,t,n[a]));return o.join(" ")}}function oB(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!_c(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);o>=0&&r.push(t[o])}return r.join(" ")}var aB=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return j(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=LM(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=sB,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Py(this.childAt(0))},t.prototype.downplay=function(){By(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(d):M_(p,d,a,n),O_(p)}if(this._updateCommon(e,n,s,r,i),l){var p=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,E_(p,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f=this.childAt(0),g=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,p=r.hoverScale,h=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=lb(m),p=v.getShallow("scale"),h=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=PM(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),h&&f.attr("cursor",h);var _=e.getItemVisual(t,"style"),b=_.fill;if(f instanceof Pv){var w=f.style;f.useStyle(lc({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(lc({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),C=this._z2;null!=S?null==C&&(this._z2=f.z2,f.z2+=S):null!=C&&(f.z2=C,this._z2=null);var T=i&&i.useNameLabel;sb(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return T?e.getName(t):iB(e,t)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var E=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;M.scaleX=this._sizeX*E,M.scaleY=this._sizeY*E,this.setSymbolScale(1),Zy(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=sy(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&A_(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();A_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return _c(n=e.getItemVisual(t,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},t}(eg);function sB(e,t){this.parent.drift(e,t)}var lB=aB;function uB(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function cB(e){return null==e||Tc(e)||(e={isIgnore:e}),e||{}}function dB(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:lb(t),cursorStyle:t.get("cursor")}}var pB=function(){function e(e){this.group=new eg,this._SymbolCtor=e||lB}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=cB(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=dB(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add((function(r){var i=u(r);if(uB(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var p=i.getItemGraphicEl(d),h=u(c);if(uB(e,h,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(e,c,s,l)).setPosition(h);else{p.updateData(e,c,s,l);var m={x:h[0],y:h[1]};a?p.attr(m):M_(p,m,r)}n.add(p),e.setItemGraphicEl(c,p)}else n.remove(p)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=dB(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=cB(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(uB(t,o,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){rb(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),n.hostModel)})):t.removeAll()},e}(),hB=pB;function fB(e,t){return e.type===t}var gB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return j(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),_c(t)&&hc(t,(function(e,r){wc(e)&&(e={type:e}),t[r]=sc(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries((function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&Lg(r)&&t.push(r.name)})),this._availableNames=n;var r=this.get("data")||t,i=Wc(),o=fc(r,(function(e){return(wc(e)||Cc(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new Ab(e,this,this.ecModel))}),this);this._data=mc(o,(function(e){return!!e}))},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&hc(this._data,(function(e){t[e.get("name")]=!1}));t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;hc(e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;hc(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&cc(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(Pw),mB=gB,vB=xc,yB=hc,xB=eg,_B=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return j(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new xB),this.group.add(this._selectorGroup=new xB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=Dw(l,u,c),p=this.layoutInner(e,i,d,r,a,s),h=Dw(uc({width:p.width,height:p.height},l),u,c);this.group.x=h.x-p.x,this.group.y=h.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(e,t){var n=yw(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),new Wv({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),l=Wc(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),yB(t.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new xB;return d.newline=!0,void s.add(d)}var p=n.getSeriesByName(a)[0];if(!l.get(a))if(p){var h=p.getData(),f=h.getVisual("legendLineStyle")||{},g=h.getVisual("legendIcon"),m=h.getVisual("style");this._createItem(p,a,o,i,t,e,f,m,g,u,r).on("click",vB(bB,a,null,r,c)).on("mouseover",vB(SB,p.name,null,r,c)).on("mouseout",vB(CB,p.name,null,r,c)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var d=s.indexOfName(a),p=s.getItemVisual(d,"style"),h=s.getItemVisual(d,"legendIcon"),f=dh(p.fill);f&&0===f[3]&&(f[3]=.2,p=lc(lc({},p),{fill:mh(f,"rgba")})),this._createItem(n,a,o,i,t,e,{},p,h,u,r).on("click",vB(bB,null,a,r,c)).on("mouseover",vB(SB,null,a,r,c)).on("mouseout",vB(CB,null,a,r,c)),l.set(a,!0)}}),this)}),this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();yB(e,(function(e){var r=e.type,i=new ay({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),sb(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),Qy(i)}))},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,p=i.get("itemWidth"),h=i.get("itemHeight"),f=i.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),yB(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?sE(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity);s(u,r);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}(l=v||l||"roundRect",r,a,s,d,f,c),x=new xB,_=r.getModel("textStyle");if(!bc(e.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=LM(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:h,icon:l,iconRotate:b,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:p,itemHeight:h,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var w="left"===o?p+5:-5,S=o,C=i.get("formatter"),T=t;wc(C)&&C?T=C.replace("{name}",null!=t?t:""):bc(C)&&(T=C(t));var M=f?_.getTextColor():r.get("inactiveColor");x.add(new ay({style:ub(_,{text:T,x:w,y:h/2,fill:M,align:S,verticalAlign:"middle"},{inheritColor:M})}));var E=new Wv({shape:x.getBoundingRect(),invisible:!0}),I=r.getModel("tooltip");return I.get("show")&&tb({el:E,componentModel:i,itemName:t,itemTooltipOption:I.option}),x.add(E),x.eachChild((function(e){e.silent=!0})),E.silent=!u,this.getContentGroup().add(x),Qy(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Aw(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),i){Aw("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),h=e.getOrient().index,f=0===h?"width":"height",g=0===h?"height":"width",m=0===h?"y":"x";"end"===o?d[h]+=l[f]+p:u[h]+=c[f]+p,d[1-h]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-h]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(yT);function bB(e,t,n,r){CB(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),SB(e,t,n,r)}function wB(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function SB(e,t,n,r){wB(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function CB(e,t,n,r){wB(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}var TB=_B;function MB(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))}function EB(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",(function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),hc(n.getData(),(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);i.hasOwnProperty(t)?i[t]=i[t]&&r:i[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function IB(e){e.registerComponentModel(mB),e.registerComponentView(TB),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,MB),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(e){e.registerAction("legendToggleSelect","legendselectchanged",xc(EB,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",xc(EB,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",xc(EB,"inverseSelect")),e.registerAction("legendSelect","legendselected",xc(EB,"select")),e.registerAction("legendUnSelect","legendunselected",xc(EB,"unSelect"))}(e)}function AB(e,t,n){var r=[1,1];r[e.getOrient().index]=0,Ow(t,n,{type:"box",ignoreSize:!!r})}var DB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Rw(t);e.prototype.init.call(this,t,n,r),AB(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),AB(this,this.option,t)},t.type="legend.scroll",t.defaultOption=Ob(mB.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(mB),kB=eg,OB=["width","height"],RB=["x","y"],NB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return j(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new kB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new kB)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=_c(c)?c:[c,c];h("pagePrev",0);var p=n.getModel("pageTextStyle");function h(e,t){var r=e+"DataIndex",o=$_(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:yc(l._pageGo,l,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});o.name=e,u.add(o)}u.add(new ay({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=OB[s],u=RB[s],c=OB[1-s],d=RB[1-s];i&&Aw("horizontal",a,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),h=a.getBoundingRect(),f=[-h.x,-h.y],g=ac(n);i&&(g[l]=n[l]-h[l]-p);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(i){if("end"===o)f[s]+=m[l]+p;else{var v=h[l]+p;f[s]-=v,m[u]-=v}m[l]+=h[l]+p,f[1-s]+=m[d]+m[c]/2-h[c]/2,m[c]=Math.max(m[c],h[c]),m[d]=Math.min(m[d],h[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;Aw(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),Aw("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),p=c.getBoundingRect(),h=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-p.x,-p.y],v=Oc(e.get("pageButtonGap",!0),e.get("itemGap",!0));h&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-p[i]:g[r]+=p[i]+v);m[1-r]+=d[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=h?n[i]:d[i],y[o]=Math.max(d[o],p[o]),y[a]=Math.min(0,p[a]+m[1-r]),u.__rectSize=n[i],h){var x={x:0,y:0};x[i]=Math.max(n[i]-p[i]-v,0),x[o]=y[o],u.setClipPath(new Wv({shape:x})),u.__rectSize=x[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&M_(l,{x:_.contentPosition[0],y:_.contentPosition[1]},h?e:null),this._updatePageInfoView(e,_),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;hc(["pagePrev","pageNext"],(function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",wc(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=OB[i],a=RB[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,p={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var h=y(u);p.contentPosition[i]=-h.s;for(var f=s+1,g=h,m=h,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+r||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),m=v;for(f=s-1,g=h,m=h,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=v;return p;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(TB),LB=NB;function PB(e){dD(IB),e.registerComponentModel(DB),e.registerComponentView(LB),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}function BB(e){dD(IB),dD(PB)}var jB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="dataZoom.inside",t.defaultOption=Ob(bL.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(bL),FB=jg();function UB(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function zB(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function HB(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function VB(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=FB(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Wc());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){hc(vL(e).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:xc(HB,t),dispatchAction:xc(zB,e),dataZoomInfoMap:null,controller:null},r=n.controller=new vN(e.getZr());return hc(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&a&&r.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Wc())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(t=i.get(o))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each((function(e){var o=e.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),i=i&&o.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),RT(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else UB(r,e)}))}))}var WB=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return j(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){FB(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:yc(YB.pan,this),zoom:yc(YB.zoom,this),scrollMove:yc(YB.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=FB(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||UB(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(wL),YB={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=qB[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return xN(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:GB((function(e,t,n,r,i,o){var a=qB[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:GB((function(e,t,n,r,i,o){return qB[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta}))};function GB(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return xN(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var qB={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},QB=WB;function ZB(e){AL(e),e.registerComponentModel(jB),e.registerComponentView(QB),VB(e)}var XB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Ob(bL.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(bL),$B=Wv,KB="horizontal",JB="vertical",ej=["line","bar","candlestick","scatter"],tj={easing:"cubicOut",duration:100,delay:0},nj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return j(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=yc(this._onBrush,this),this._onBrushEnd=yc(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),RT(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){NT(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new eg;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===KB?{right:i.width-r.x-r.width,top:i.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=Rw(e.option);hc(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=o[e])}));var s=Dw(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===JB&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==KB||i?n===KB&&i?{scaleY:a?1:-1,scaleX:-1}:n!==JB||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new $B({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new $B({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:yc(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=i.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,p=[0,t[1]],h=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=h[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(y>0&&t%y)v+=m;else{var n=null==e||isNaN(e)||""===e,r=n?0:ag(e,u,p,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=m,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new eg,r=new Zx({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new Kx({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(i,o){hc(e.getAxisProxy(i,o).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&cc(ej,e.get("type"))<0)){var a,s=r.getComponent(gL(i),o).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(i),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:i,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new $B({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new $B({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),hc([0,1],(function(t){var o=a.get("handleIcon");!OM[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=LM(o,-1,0,2,2,null,!0);s.attr({cursor:rj(this._orient),draggable:!0,drift:yc(this._onDragMove,this,t),ondragend:yc(this._onDragEnd,this),onmouseover:yc(this._showDataInfo,this,!0),onmouseout:yc(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=sg(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Qy(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new ay({silent:!0,invisible:!0,style:ub(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var p=sg(a.get("moveHandleSize"),o[1]),h=t.moveHandle=new Wv({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=t.moveHandleIcon=LM(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(p,10));(d=t.moveZone=new Wv({invisible:!0,shape:{y:o[1]-m,height:p+m}})).on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),i.add(h),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:rj(this._orient),drift:yc(this._onDragMove,this,"all"),ondragstart:yc(this._showDataInfo,this,!0),ondragend:yc(this._onDragEnd,this),onmouseover:yc(this._showDataInfo,this,!0),onmouseout:yc(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[ag(e[0],[0,100],t,!0),ag(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];xN(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?ag(o.minSpan,a,i,!0):null,null!=o.maxSpan?ag(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=ug([ag(r[0],i,a,!0),ag(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=ug(n.slice()),i=this._size;hc([0,1],(function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new Wv,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,o=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=ug(this._handleEnds.slice());function d(e){var t=Y_(n.handles[e].parent,this.group),a=q_(0===e?"right":"left",t),s=this._handleWidth/2+5,l=G_([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===KB?"middle":a,align:i===KB?a:"center",text:o[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),i=n.get("labelPrecision");null!=i&&"auto"!==i||(i=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return bc(r)?r(e,o):wc(r)?r.replace("{value}",o):o},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,kd(r.event);var i=G_([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Hd(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100];this._range=ug([ag(n.x,r,i,!0),ag(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(kd(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new $B({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?tj:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=vL(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(wL);function rj(e){return"vertical"===e?"ns-resize":"ew-resize"}var ij=nj;function oj(e){e.registerComponentModel(XB),e.registerComponentView(ij),AL(e)}function aj(e){dD(ZB),dD(oj)}var sj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return j(t,e),t.prototype.getInitialData=function(e){return JI(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new eg,n=LM("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*e.itemHeight,s=LM(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?i:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(mT);function lj(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),o=function(e,t){var n=0,r=e.scale.getExtent();"start"===t?n=r[0]:"end"===t?n=r[1]:Cc(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=fc(e.dimensions,(function(e){return t.mapDimension(e)})),p=!1,h=t.getCalculationInfo("stackResultDimension");return KI(t,d[0])&&(p=!0,d[0]=h),KI(t,d[1])&&(p=!0,d[1]=h),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function uj(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var cj=Math.min,dj=Math.max;function pj(e,t){return isNaN(e)||isNaN(t)}function hj(e,t,n,r,i,o,a,s,l){for(var u,c,d,p,h,f,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(pj(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,p=y;else{var x=v-u,_=y-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],S=t[2*b+1];w===v&&S===y&&m<r;)m++,g+=o,w=t[2*(b+=o)],S=t[2*b+1],x=(v=t[2*g])-u,_=(y=t[2*g+1])-c;var C=m+1;if(l)for(;pj(w,S)&&C<r;)C++,w=t[2*(b+=o)],S=t[2*b+1];var T=.5,M=0,E=0,I=void 0,A=void 0;if(C>=r||pj(w,S))h=v,f=y;else{M=w-u,E=S-c;var D=v-u,k=w-v,O=y-c,R=S-y,N=void 0,L=void 0;if("x"===s){var P=M>0?1:-1;h=v-P*(N=Math.abs(D))*a,f=y,I=v+P*(L=Math.abs(k))*a,A=y}else if("y"===s){var B=E>0?1:-1;h=v,f=y-B*(N=Math.abs(O))*a,I=v,A=y+B*(L=Math.abs(R))*a}else N=Math.sqrt(D*D+O*O),h=v-M*a*(1-(T=(L=Math.sqrt(k*k+R*R))/(L+N))),f=y-E*a*(1-T),A=y+E*a*T,I=cj(I=v+M*a*T,dj(w,v)),A=cj(A,dj(S,y)),I=dj(I,cj(w,v)),f=y-(E=(A=dj(A,cj(S,y)))-y)*N/L,h=cj(h=v-(M=I-v)*N/L,dj(u,v)),f=cj(f,dj(c,y)),I=v+(M=v-(h=dj(h,cj(u,v))))*L/N,A=y+(E=y-(f=dj(f,cj(c,y))))*L/N}e.bezierCurveTo(d,p,h,f,v,y),d=I,p=A}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var fj=function(){this.smooth=0,this.smoothConstraint=!0},gj=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new fj},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&pj(n[2*i-2],n[2*i-1]);i--);for(;r<i&&pj(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=hj(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,o=lv.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,p=void 0,h=void 0,f=void 0,g=void 0;switch(i[l++]){case o.M:n=i[l++],r=i[l++];break;case o.L:if(u=i[l++],c=i[l++],(g=a?(e-n)/(u-n):(e-r)/(c-r))<=1&&g>=0){var m=a?(c-r)*g+r:(u-n)*g+n;return a?[e,m]:[m,e]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],d=i[l++],p=i[l++],h=i[l++],f=i[l++];var v=a?Bp(n,u,d,h,e,s):Bp(r,c,p,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?Lp(r,c,p,f,x):Lp(n,u,d,h,x);return a?[e,m]:[m,e]}}n=h,r=f}}},t}(Av),mj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t}(fj),vj=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return j(t,e),t.prototype.getDefaultShape=function(){return new mj},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&pj(n[2*o-2],n[2*o-1]);o--);for(;i<o&&pj(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=hj(e,n,i,o,o,1,t.smooth,a,t.connectNulls);hj(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(Av);function yj(e,t,n,r,i){var o=e.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,a=Math.floor(a),l=Math.round(l);var d=new Wv({shape:{x:a,y:s,width:l,height:u}});if(t){var p=e.getBaseAxis(),h=p.isHorizontal(),f=p.inverse;h?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=bc(i)?function(e){i(e,d)}:null;E_(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function xj(e,t,n){var r=e.getArea(),i=lg(r.r0,1),o=lg(r.r,1),a=new Hx({shape:{cx:lg(e.cx,1),cy:lg(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,E_(a,{shape:{endAngle:r.endAngle,r:o}},n));return a}function _j(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function bj(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function wj(e,t){var n=bj(e),r=n[0],i=n[1],o=bj(t),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function Sj(e){return Cc(e)?e:e?.5:0}function Cj(e,t,n,r){var i=t.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],s=0,l=[],u=[],c=[],d=[];if(r){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||d.push(e[s],e[s+1]);e=d}for(s=0;s<e.length-2;s+=2)switch(c[0]=e[s+2],c[1]=e[s+3],u[0]=e[s],u[1]=e[s+1],a.push(u[0],u[1]),n){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var p=(u[o]+c[o])/2,h=[];l[o]=h[o]=p,l[1-o]=u[1-o],h[1-o]=c[1-o],a.push(l[0],l[1]),a.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function Tj(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=dh(t[i]),s=dh(t[o]),l=r-i,u=mh([eh(oh(a[0],s[0],l)),eh(oh(a[1],s[1],l)),eh(oh(a[2],s[2],l)),th(oh(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function Mj(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*lB.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return hc(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function Ej(e,t){return[e[2*t],e[2*t+1]]}function Ij(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<py.length;t++)if(e.get([py[t],"endLabel","show"]))return!0;return!1}function Aj(e,t,n,r){if(fB(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=Ij(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=yj(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),l);if(!r.get("clip",!0)){var d=c.shape,p=Math.max(d.width,d.height);u?(d.y-=p,d.height+=2*p):(d.x-=p,d.width+=2*p)}return l&&l(1,c),c}return xj(t,n,r)}var Dj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.init=function(){var e=new eg,t=new hB;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem,o=this.group,a=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),u=a.getLayout("points")||[],c="polar"===i.type,d=this._coordSys,p=this._symbolDraw,h=this._polyline,f=this._polygon,g=this._lineGroup,m=!t.ssr&&e.isAnimationEnabled(),v=!l.isEmpty(),y=l.get("origin"),x=lj(i,a,y),_=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=bA(2*r),o=0;o<r;o++){var a=uj(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(i,a,x),b=e.get("showSymbol"),w=e.get("connectNulls"),S=b&&!c&&Mj(e,a,i),C=this._data;C&&C.eachItemGraphicEl((function(e,t){e.__temp&&(o.remove(e),C.setItemGraphicEl(t,null))})),b||p.remove(),o.add(g);var T,M=!c&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(T=i.getArea()).width?(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2):T.r0&&(T.r0-=.5,T.r+=.5)),this._clipShapeForSymbol=T;var E=function(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,o,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){o=r[a];break}}if(o){var l=t.getAxis(i),u=fc(o.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var p=Tj(u,"x"===i?n.getWidth():n.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=p[0].coord-10,g=p[h-1].coord+10,m=g-f;if(m<.001)return"transparent";hc(p,(function(e){e.offset=(e.coord-f)/m})),p.push({offset:h?p[h-1].offset:.5,color:d[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:d[0]||"transparent"});var v=new f_(0,0,0,0,p,!0);return v[i]=f,v[i+"2"]=g,v}}}(a,i,n)||a.getVisual("style")[a.getVisual("drawType")];if(h&&d.type===i.type&&M===this._step){v&&!f?f=this._newPolygon(u,_):f&&!v&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,Sw(E));var I=g.getClipPath();if(I)E_(I,{shape:Aj(this,i,!1,e).shape},e);else g.setClipPath(Aj(this,i,!0,e));b&&p.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),_j(this._stackedOnPoints,_)&&_j(this._points,u)||(m?this._doUpdateAnimation(a,_,i,n,M,y,w):(M&&(u=Cj(u,i,M,w),_&&(_=Cj(_,i,M,w))),h.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))}else b&&p.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),m&&this._initSymbolLabelAnimation(a,i,T),M&&(u=Cj(u,i,M,w),_&&(_=Cj(_,i,M,w))),h=this._newPolyline(u),v?f=this._newPolygon(u,_):f&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,Sw(E)),g.setClipPath(Aj(this,i,!0,e));var A=e.getModel("emphasis"),D=A.get("focus"),k=A.get("blurScope"),O=A.get("disabled");(h.useStyle(uc(s.getLineStyle(),{fill:"none",stroke:E,lineJoin:"bevel"})),Ky(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);sy(h).seriesIndex=e.seriesIndex,Zy(h,D,k,O);var R=Sj(e.get("smooth")),N=e.get("smoothMonotone");if(h.setShape({smooth:R,smoothMonotone:N,connectNulls:w}),f){var L=a.getCalculationInfo("stackedOnSeries"),P=0;f.useStyle(uc(l.getAreaStyle(),{fill:E,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),L&&(P=Sj(L.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:P,smoothMonotone:N,connectNulls:w}),Ky(f,e,"areaStyle"),sy(f).seriesIndex=e.seriesIndex,Zy(f,D,k,O)}var B=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=B)})),this._polyline.onHoverStateChange=B,this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=M,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,h),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){sy(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=Bg(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new lB(i,o)).x=l,s.y=u,s.setZ(c,d);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=d,p.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else IT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=Bg(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else IT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;ky(this._polyline,e),t&&ky(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new gj({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new vj({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");bc(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=bc(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var d=[e.x,e.y],p=void 0,h=void 0,f=void 0;if(n)if(i){var g=n,m=t.pointToCoord(d);r?(p=g.startAngle,h=g.endAngle,f=-m[1]/180*Math.PI):(p=g.r0,h=g.r,f=m[0])}else{var v=n;r?(p=v.x,h=v.x+v.width,f=e.x):(p=v.y+v.height,h=v.y,f=e.y)}var y=h===p?0:(f-p)/(h-p);a&&(y=1-y);var x=bc(u)?u(o):l*y+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(Ij(e)){var i=e.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new ay({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(sb(o,lb(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?oB(i,n):iB(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||o,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),p=o.get("precision"),h=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?h:0)*(m?-1:1),_=(g?0:-h)*(m?-1:1),b=g?"x":"y",w=function(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(i=e[2*u+a],!isNaN(i)&&!isNaN(e[2*u+1-a]))if(0!==u){if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(t-r)/(i-r)}}(u,y,b),S=w.range,C=S[1]-S[0],T=void 0;if(C>=1){if(C>1&&!d){var M=Ej(u,S[0]);s.attr({x:M[0]+x,y:M[1]+_}),i&&(T=c.getRawValue(S[0]))}else{(M=l.getPointOn(y,b))&&s.attr({x:M[0]+x,y:M[1]+_});var E=c.getRawValue(S[0]),I=c.getRawValue(S[1]);i&&(T=function(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(Cc(r))return lg(f=Cg(n||0,r,i),o?Math.max(cg(n||0),cg(r)):t);if(wc(r))return i<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(i<1&&s?s:l)[c];else{var p=s&&s[c]?s[c]:0,h=l[c],f=Cg(p,h,i);a[c]=lg(f,o?Math.max(cg(p),cg(h)):t)}}return a}(n,p,E,I,w.t))}r.lastFrameIndex=S[0]}else{var A=1===e||r.lastFrameIndex>0?S[0]:0;M=Ej(u,A);i&&(T=c.getRawValue(A)),s.attr({x:M[0]+x,y:M[1]+_})}if(i){var D=gb(s);"function"==typeof D.setLabelText&&D.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,o,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],p=[],h=[],f=[],g=lj(i,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=2*x.idx,w=2*x.idx1;var S=m[b],C=m[b+1],T=v[w],M=v[w+1];(isNaN(S)||isNaN(C))&&(S=T,C=M),l.push(S,C),u.push(T,M),c.push(n[b],n[b+1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var E=x.idx,I=g.dataDimsForPoint,A=i.dataToPoint([t.get(I[0],E),t.get(I[1],E)]);w=2*E,l.push(A[0],A[1]),u.push(v[w],v[w+1]);var D=uj(g,i,t,E);c.push(D[0],D[1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(E));break;case"-":_=!1}_&&(p.push(x),h.push(h.length))}h.sort((function(e,t){return f[e]-f[t]}));var k=l.length,O=bA(k),R=bA(k),N=bA(k),L=bA(k),P=[];for(y=0;y<h.length;y++){var B=h[y],j=2*y,F=2*B;O[j]=l[F],O[j+1]=l[F+1],R[j]=u[F],R[j+1]=u[F+1],N[j]=c[F],N[j+1]=c[F+1],L[j]=d[F],L[j+1]=d[F+1],P[y]=p[B]}return{current:O,next:R,stackedOnCurrent:N,stackedOnNext:L,status:P}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,p=c.stackedOnCurrent,h=c.next,f=c.stackedOnNext;if(i&&(d=Cj(c.current,n,i,a),p=Cj(c.stackedOnCurrent,n,i,a),h=Cj(c.next,n,i,a),f=Cj(c.stackedOnNext,n,i,a)),wj(d,h)>3e3||l&&wj(p,f)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:h}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),M_(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:p}),l.stopAnimation(),M_(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;y<v.length;y++){if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}}))},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(IT),kj=Dj;var Oj={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},Rj=function(e){return Math.round(e.length/2)};function Nj(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),p=Math.round(a/d);if(isFinite(p)&&p>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/p));var h=void 0;wc(i)?h=Oj[i]:bc(i)&&(h=i),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/p,h,Rj))}}}}}function Lj(e){e.registerChartView(kj),e.registerSeriesModel(sj),e.registerLayout(function(e,t){return{seriesType:e,plan:xT(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=fc(r.dimensions,(function(e){return n.mapDimension(e)})).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");KI(n,a[0])&&(a[0]=l),KI(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=o&&bA(n*s),a=[],l=[],p=e.start,h=0;p<e.end;p++){var f=void 0;if(1===s){var g=u.get(c,p);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,p),a[1]=u.get(d,p),f=r.dataToPoint(a,null,l);o?(i[h++]=f[0],i[h++]=f[1]):t.setItemLayout(p,f.slice())}o&&t.setLayout("points",i)}}}}}}("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Nj("line"))}var Pj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.getInitialData=function(e,t){return JI(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)hc(r.getAxes(),(function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=i[n],s="x1"===t[n]||"y1"===t[n];if(s&&(a+=1),r.length<2)return;if(2===r.length)return void(o[n]=e.toGlobalCoord(e.getExtent()[s?1:0]));for(var l=void 0,u=void 0,c=1,d=0;d<r.length;d++){var p=r[d].coord,h=d===r.length-1?r[d-1].tickValue+c:r[d].tickValue;if(h===a){u=p;break}if(h<a)l=p;else if(null!=l&&h>a){u=(p+l)/2;break}1===d&&(c=h-r[0].tickValue)}null==u&&(l?l&&(u=r[r.length-1].coord):u=r[0].coord),o[n]=e.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(mT);mT.registerClass(Pj);var Bj=Pj,jj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.getInitialData=function(){return JI(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Ob(Bj.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(Bj),Fj=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Uj=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return j(t,e),t.prototype.getDefaultShape=function(){return new Fj},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,p=c?u-l<d:l-u<d;p||(l=u-(c?d:-d));var h=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);p?(e.moveTo(h*i+n,f*i+r),e.arc(h*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(h*o+n,f*o+r),e.arc(n,r,o,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(Av),zj=Uj;function Hj(e,t,n){return t*Math.sin(e)*(n?-1:1)}function Vj(e,t,n){return t*Math.cos(e)*(n?1:-1)}var Wj=Math.max,Yj=Math.min;var Gj=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return j(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"!==i&&"polar"!==i||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){rb(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var p=e.get("clip",!0)||d,h=function(e,t){var n=e.getArea&&e.getArea();if(fB(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,_=r&&r.isInitSort,b=r&&"changeAxisOrder"===r.type;function w(e){var t=eF[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?Hx:Wv;return new r({shape:sF(t,n,e),silent:!0,z2:0})}(l,i,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=eF[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&Jj[l.type](r)){var s=!1;p&&(s=qj[l.type](h,r));var m=Qj[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),nF(m,a,t,n,r,e,i,"polar"===l.type),_?m.attr({shape:r}):d?Zj(d,c,m,r,t,i,!1,!1):E_(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),S=eF[l.type](a,t,r);if(g){var C=void 0;0===x.length?C=w(n):((C=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",v):C.setShape("cornerRadius",v),y[t]=C);var T=eF[l.type](a,t);M_(C,{shape:sF(i,T,l)},c,t)}var M=s.getItemGraphicEl(n);if(a.hasValue(t)&&Jj[l.type](S)){var E=!1;if(p&&(E=qj[l.type](h,S))&&o.remove(M),M?O_(M):M=Qj[l.type](e,a,t,S,i,c,u.model,!!M,f),d&&(M.forceLabelAnimation=!0),b){var I=M.getTextContent();if(I){var A=gb(I);null!=A.prevValue&&(A.prevValue=A.value)}}else nF(M,a,t,r,S,e,i,"polar"===l.type);_?M.attr({shape:S}):d?Zj(d,c,M,S,t,i,!0,b):M_(M,{shape:S},e,t,null),a.setItemGraphicEl(t,M),M.ignore=E,o.add(M)}else o.remove(M)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&k_(n,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new eg);S.removeAll();for(var C=0;C<y.length;++C)S.add(y[C]);o.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),oF(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),oF(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,r,i){return e?"polar"===e.type?xj(e,t,n):"cartesian2d"===e.type?yj(e,t,n,r,i):null:null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),(function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})})),r.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:fc(r,(function(e){return e.ordinalNumber}))}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){k_(t,e,sy(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(IT),qj={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=Wj(t.x,e.x),s=Yj(t.x+t.width,i),l=Wj(t.y,e.y),u=Yj(t.y+t.height,o),c=s<a,d=u<l;return t.x=c&&a>i?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=Yj(t.r,e.r),o=Wj(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},Qj={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new Wv({shape:lc({},r),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[i?"height":"width"]=0);return u},polar:function(e,t,n,r,i,o,a,s,l){var u=!i&&l?zj:Hx,c=new u({shape:r,z2:1});c.name="item";var d,p,h=tF(i);if(c.calculateTextPosition=(d=h,p=({isRoundCap:u===zj}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return zf(e,t,n);var i=d(r),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,h=(u+c)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=p?Math.abs(u-c)/2:0,y=Math.cos,x=Math.sin,_=s+u*y(f),b=l+u*x(f),w="left",S="top";switch(i){case"startArc":_=s+(c-o)*y(m),b=l+(c-o)*x(m),w="center",S="top";break;case"insideStartArc":_=s+(c+o)*y(m),b=l+(c+o)*x(m),w="center",S="bottom";break;case"startAngle":_=s+h*y(f)+Hj(f,o+v,!1),b=l+h*x(f)+Vj(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+h*y(f)+Hj(f,-o+v,!1),b=l+h*x(f)+Vj(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+h*y(m),b=l+h*x(m),w="center",S="middle";break;case"endArc":_=s+(u+o)*y(m),b=l+(u+o)*x(m),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*y(m),b=l+(u-o)*x(m),w="center",S="top";break;case"endAngle":_=s+h*y(g)+Hj(g,o+v,!0),b=l+h*x(g)+Vj(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+h*y(g)+Hj(g,-o+v,!0),b=l+h*x(g)+Vj(g,-o+v,!0),w="right",S="middle";break;default:return zf(e,t,n)}return(e=e||{}).x=_,e.y=b,e.align=w,e.verticalAlign=S,e}),o){var f=i?"r":"endAngle",g={};c.shape[f]=i?r.r0:r.startAngle,g[f]=r[f],(s?M_:E_)(c,{shape:g},o)}return c}};function Zj(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?M_:E_)(n,{shape:l},t,i,null),(a?M_:E_)(n,{shape:u},t?e.baseAxis.model:null,i)}function Xj(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var $j=["x","y","width","height"],Kj=["cx","cy","r","startAngle","endAngle"],Jj={cartesian2d:function(e){return!Xj(e,$j)},polar:function(e){return!Xj(e,Kj)}},eF={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),i=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,o)}(n,r):0,o=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function tF(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function nF(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;lc(u,function(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;_c(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:fc(r,(function(e){return Uf(e,i)}))}}(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var p=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",h=lb(r);sb(e,h,{labelFetcher:o,labelDataIndex:n,defaultText:iB(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=e.getTextContent();if(s&&f){var g=r.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,r){if(Cc(r))e.setTextConfig({rotation:r});else if(_c(t))e.setTextConfig({rotation:0});else{var i,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===g?p:g,tF(a),r.get(["label","rotate"]))}!function(e,t,n,r){if(e){var i=gb(e);i.prevValue=i.value,i.value=n;var o=t.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}(f,h,o.getRawValue(n),(function(e){return oB(t,e)}));var m=r.getModel(["emphasis"]);Zy(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Ky(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",hc(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var rF=function(){},iF=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return j(t,e),t.prototype.getDefaultShape=function(){return new rF},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],a[0],a[1])},t}(Av);function oF(e,t,n,r){var i=e.getData(),o=i.getLayout("valueAxisHorizontal")?1:0,a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new iF({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new iF({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(i.getVisual("style")),sy(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",aF),d.on("mousemove",aF)),n&&n.push(d)}var aF=OT((function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c<d;c++){var p=3*c;if(l[r]=u,l[i]=o[p+2],s[r]=o[p+r],s[i]=o[p+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);sy(this).dataIndex=t>=0?t:null}),30,!1);function sF(e,t,n){if(fB(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var o=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:o.r0,r:e?i.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}var lF=Gj;function uF(e){e.registerChartView(lF),e.registerSeriesModel(jj),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,xc(MA,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,function(e){return{seriesType:e,plan:xT(),reset:function(e){if(EA(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(i.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=KI(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),p=function(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}(0,i),h=IA(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),m=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=h&&bA(3*i),u=h&&s&&bA(3*i),y=h&&bA(i),x=n.master.getRect(),_=d?x.width:x.height,b=t.getStore(),w=0;null!=(r=e.next());){var S=b.get(c?g:o,r),C=b.get(a,r),T=p,M=void 0;c&&(M=+S-b.get(o,r));var E=void 0,I=void 0,A=void 0,D=void 0;if(d){var k=n.dataToPoint([S,C]);c&&(T=n.dataToPoint([M,C])[0]),E=T,I=k[1]+v,A=k[0]-T,D=m,Math.abs(A)<f&&(A=(A<0?-1:1)*f)}else k=n.dataToPoint([C,S]),c&&(T=n.dataToPoint([C,M])[1]),E=k[0]+v,I=T,A=m,D=k[1]-T,Math.abs(D)<f&&(D=(D<=0?-1:1)*f);h?(l[w]=E,l[w+1]=I,l[w+2]=d?A:D,u&&(u[w]=d?x.x:E,u[w+1]=d?I:x.y,u[w+2]=_),y[r]=r):t.setItemLayout(r,{x:E,y:I,width:A,height:D}),w+=3}h&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Nj("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var cF=Math.sin,dF=Math.cos,pF=Math.PI,hF=2*Math.PI,fF=180/pF,gF=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){this._add("C",e,t,n,r,i,o)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,o){this.ellipse(e,t,n,n,0,r,i,o)},e.prototype.ellipse=function(e,t,n,r,i,o,a,s){var l=a-o,u=!s,c=Math.abs(l),d=bh(c-hF)||(u?l>=hF:-l>=hF),p=l>0?l%hF:l%hF+hF,h=!1;h=!!d||!bh(c)&&p>=pF==!!u;var f=e+n*dF(o),g=t+r*cF(o);this._start&&this._add("M",f,g);var m=Math.round(i*fF);if(d){var v=1/this._p,y=(u?1:-1)*(hF-v);this._add("A",n,r,m,1,+u,e+n*dF(o+y),t+r*cF(o+y)),v>.01&&this._add("A",n,r,m,0,+u,f,g)}else{var x=e+n*dF(a),_=t+r*cF(a);this._add("A",n,r,m,+h,+u,x,_)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,i,o,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p))return void(this._invalid=!0);u.push(Math.round(p*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),mF="none",vF=Math.round;var yF=["lineCap","miterLimit","lineJoin"],xF=fc(yF,(function(e){return"stroke-"+e.toLowerCase()}));function _F(e,t,n,r){var i=null==t.opacity?1:t.opacity;if(n instanceof Pv)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==mF}(t)){var o=xh(t.fill);e("fill",o.color);var a=null!=t.fillOpacity?t.fillOpacity*o.opacity*i:o.opacity*i;(r||a<1)&&e("fill-opacity",a)}else e("fill",mF);if(function(e){var t=e.stroke;return null!=t&&t!==mF}(t)){var s=xh(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*i:s.opacity*i,d=t.strokeFirst;if((r||1!==u)&&e("stroke-width",u),(r||d)&&e("paint-order",d?"stroke":"fill"),(r||c<1)&&e("stroke-opacity",c),t.lineDash){var p=zM(n),h=p[0],f=p[1];h&&(f=vF(f||0),e("stroke-dasharray",h.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",mF);for(var g=0;g<yF.length;g++){var m=yF[g];if(r||t[m]!==Tv[m]){var v=t[m]||Tv[m];v&&e(xF[g],v)}}}else r&&e("stroke",mF)}}var bF="http://www.w3.org/2000/svg",wF="http://www.w3.org/1999/xlink";function SF(e){return document.createElementNS(bF,e)}function CF(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function TF(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var r=t.children,i=t.tag,o=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var r in t){var i=t[r],o=r;!1!==i&&(!0!==i&&null!=i&&(o+='="'+i+'"'),n.push(o))}return"<"+e+" "+n.join(" ")+">"}(i,o)+("style"!==i?wd(a):a||"")+(r?""+n+fc(r,(function(t){return e(t)})).join(n)+n:"")+function(e){return"</"+e+">"}(i)}(e)}function MF(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function EF(e,t,n,r){return CF("svg","root",{width:e,height:t,xmlns:bF,"xmlns:xlink":wF,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var IF={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},AF="transform-origin";function DF(e,t,n){var r=lc({},e.shape);lc(r,t),e.buildPath(n,r);var i=new gF;return i.reset(kh(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function kF(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[AF]=n+"px "+r+"px")}var OF={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function RF(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function NF(e){return wc(e)?IF[e]?"cubic-bezier("+IF[e]+")":qp(e)?e:"":""}function LF(e,t,n,r){var i=e.animators,o=i.length,a=[];if(e instanceof p_){var s=function(e,t,n){var r,i,o=e.shape.paths,a={};if(hc(o,(function(e){var t=MF(n.zrId);t.animation=!0,LF(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=vc(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var d in c){var p=c[d];a[d]=a[d]||{d:""},a[d].d+=p.d||""}for(var h in s){var f=s[h].animation;f.indexOf(i)>=0&&(r=f)}}})),r){t.d=!1;var s=RF(a,n);return r.replace(i,s)}}(e,t,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u<o;u++){var c=i[u],d=[c.getMaxTime()/1e3+"s"],p=NF(c.getClip().easing),h=c.getDelay();p?d.push(p):d.push("linear"),h&&d.push(h/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function g(i){var o,a=i[1],s=a.length,l={},u={},c={},d="animation-timing-function";function p(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),o=0;o<r.length;o++){var a=r[o];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var c=s[u],p=Math.round(c.time/i*100)+"%",h=NF(c.easing),f=c.rawValue;(wc(f)||Cc(f))&&(t[p]=t[p]||{},t[p][l]=c.rawValue,h&&(t[p][d]=h))}}}}for(var h=0;h<s;h++){(S=(w=a[h]).targetName)?"shape"===S&&p(w,u):!r&&p(w,l)}for(var f in l){var g={};Of(g,e),lc(g,l[f]);var m=Oh(g),v=l[f][d];c[f]=m?{transform:m}:{},kF(c[f],g),v&&(c[f][d]=v)}var y=!0;for(var f in u){c[f]=c[f]||{};var x=!o;v=u[f][d];x&&(o=new lv);var _=o.len();o.reset(),c[f].d=DF(e,u[f],o);var b=o.len();if(!x&&_!==b){y=!1;break}v&&(c[f][d]=v)}if(!y)for(var f in c)delete c[f].d;if(!r)for(h=0;h<s;h++){var w,S;"style"===(S=(w=a[h]).targetName)&&p(w,c,(function(e){return OF[e]}))}var C,T=vc(c),M=!0;for(h=1;h<T.length;h++){var E=T[h-1],I=T[h];if(c[E][AF]!==c[I][AF]){M=!1;break}C=c[E][AF]}if(M&&C){for(var f in c)c[f][AF]&&delete c[f][AF];t[AF]=C}if(mc(T,(function(e){return vc(c[e]).length>0})).length)return RF(c,n)+" "+i[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}var PF=Math.round;function BF(e){return e&&wc(e.src)}function jF(e){return e&&bc(e.toDataURL)}function FF(e,t,n,r){_F((function(i,o){var a="fill"===i||"stroke"===i;a&&Ah(o)?ZF(t,e,i,r):a&&Mh(o)?XF(n,e,i,r):e[i]=o}),t,n,!1),function(e,t,n){var r=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(r)){var i=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),o=n.shadowCache,a=o[i];if(!a){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,d=r.shadowOffsetY||0,p=r.shadowBlur,h=xh(r.shadowColor),f=h.opacity,g=h.color,m=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=CF("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[CF("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[i]=a}t.filter=Dh(a)}}(n,e,r)}function UF(e){return bh(e[0]-1)&&bh(e[1])&&bh(e[2])&&bh(e[3]-1)}function zF(e,t,n){if(t&&(!function(e){return bh(e[4])&&bh(e[5])}(t)||!UF(t))){var r=n?10:1e4;e.transform=UF(t)?"translate("+PF(t[4]*r)/r+" "+PF(t[5]*r)/r+")":function(e){return"matrix("+wh(e[0])+","+wh(e[1])+","+wh(e[2])+","+wh(e[3])+","+Sh(e[4])+","+Sh(e[5])+")"}(t)}}function HF(e,t,n){for(var r=e.points,i=[],o=0;o<r.length;o++)i.push(PF(r[o][0]*n)/n),i.push(PF(r[o][1]*n)/n);t.points=i.join(" ")}function VF(e){return!e.smooth}var WF,YF,GF={circle:[(WF=["cx","cy","r"],YF=fc(WF,(function(e){return"string"==typeof e?[e,e]:e})),function(e,t,n){for(var r=0;r<YF.length;r++){var i=YF[r],o=e[i[0]];null!=o&&(t[i[1]]=PF(o*n)/n)}})],polyline:[HF,VF],polygon:[HF,VF]};function qF(e,t){var n=e.style,r=e.shape,i=GF[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&kh(e)||4;if(!i||t.willUpdate||i[1]&&!i[1](r)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||l<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),h=e,f=h.__svgPathBuilder;h.__svgPathVersion===p&&f&&l===h.__svgPathStrokePercent||(f||(f=h.__svgPathBuilder=new gF),f.reset(u),d.rebuildPath(f,l),f.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);i[0](r,o,g)}return zF(o,e.transform),FF(o,n,e,t),t.animation&&LF(e,o,t),CF(s,e.id+"",o)}function QF(e,t){return e instanceof Av?qF(e,t):e instanceof Pv?function(e,t){var n=e.style,r=n.image;if(r&&!wc(r)&&(BF(r)?r=r.src:jF(r)&&(r=r.toDataURL())),r){var i=n.x||0,o=n.y||0,a={href:r,width:n.width,height:n.height};return i&&(a.x=i),o&&(a.y=o),zF(a,e.transform),FF(a,n,e,t),t.animation&&LF(e,a,t),CF("image",e.id+"",a)}}(e,t):e instanceof Ov?function(e,t){var n=e.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||zu,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,Ff(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":Ch[n.textAlign]||n.textAlign};if(Jv(n)){var l="",u=n.fontStyle,c=$v(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Uu,p=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),p&&"normal"!==p&&(l+="font-weight:"+p+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),zF(s,e.transform),FF(s,n,e,t),t.animation&&LF(e,s,t),CF("text",e.id+"",s,void 0,r)}}(e,t):void 0}function ZF(e,t,n,r){var i,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Eh(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Ih(o))return;i="radialGradient",a.cx=Oc(o.x,.5),a.cy=Oc(o.y,.5),a.r=Oc(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*Sh(s[u].offset)+"%",p=xh(s[u].color),h=p.color,f=p.opacity,g={offset:d};g["stop-color"]=h,f<1&&(g["stop-opacity"]=f),l.push(CF("stop",u+"",g))}var m=TF(CF(i,"",a,l)),v=r.gradientCache,y=v[m];y||(y=r.zrId+"-g"+r.gradientIdx++,v[m]=y,a.id=y,r.defs[y]=CF(i,y,a,l)),t[n]=Dh(y)}function XF(e,t,n,r){var i,o=e.style[n],a=e.getBoundingRect(),s={},l=o.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(Th(o)){var p=o.imageWidth,h=o.imageHeight,f=void 0,g=o.image;if(wc(g)?f=g:BF(g)?f=g.src:jF(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";Pc(p,m),Pc(h,m)}else if(null==p||null==h){var v=function(e,t){if(e){var n=e.elm,r=p||t.width,i=h||t.height;"pattern"===e.tag&&(c?(i=1,r/=a.width):d&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute("width",r),n.setAttribute("height",i))}},y=am(f,null,e,(function(e){u||v(w,e),v(i,e)}));y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}i=CF("image","img",{href:f,width:p,height:h}),s.width=p,s.height=h}else o.svgElement&&(i=ac(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(i){var x,_;u?x=_=1:c?(_=1,x=s.width/a.width):d?(x=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==_||isNaN(_)||(s.height=_);var b=Oh(o);b&&(s.patternTransform=b);var w=CF("pattern","",s,[i]),S=TF(w),C=r.patternCache,T=C[S];T||(T=r.zrId+"-p"+r.patternIdx++,C[S]=T,s.id=T,w=r.defs[T]=CF("pattern",T,s,[i])),t[n]=Dh(T)}}function $F(e,t,n){var r=n.clipPathCache,i=n.defs,o=r[e.id];if(!o){var a={id:o=n.zrId+"-c"+n.clipPathIdx++};r[e.id]=o,i[o]=CF("clipPath",o,a,[qF(e,n)])}t["clip-path"]=Dh(o)}function KF(e){return document.createTextNode(e)}function JF(e,t,n){e.insertBefore(t,n)}function eU(e,t){e.removeChild(t)}function tU(e,t){e.appendChild(t)}function nU(e){return e.parentNode}function rU(e){return e.nextSibling}function iU(e,t){e.textContent=t}var oU=CF("","");function aU(e){return void 0===e}function sU(e){return void 0!==e}function lU(e,t,n){for(var r={},i=t;i<=n;++i){var o=e[i].key;void 0!==o&&(r[o]=i)}return r}function uU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function cU(e){var t,n=e.children,r=e.tag;if(sU(r)){var i=e.elm=SF(r);if(hU(oU,e),_c(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&tU(i,cU(o))}else sU(e.text)&&!Tc(e.text)&&tU(i,KF(e.text))}else e.elm=KF(e.text);return e.elm}function dU(e,t,n,r,i){for(;r<=i;++r){var o=n[r];null!=o&&JF(e,cU(o),t)}}function pU(e,t,n,r){for(;n<=r;++n){var i=t[n];if(null!=i)if(sU(i.tag))eU(nU(i.elm),i.elm);else eU(e,i.elm)}}function hU(e,t){var n,r=t.elm,i=e&&e.attrs||{},o=t.attrs||{};if(i!==o){for(n in o){var a=o[n];i[n]!==a&&(!0===a?r.setAttribute(n,""):!1===a?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?r.setAttributeNS(wF,n,a):r.setAttribute(n,a))}for(n in i)n in o||r.removeAttribute(n)}}function fU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(hU(e,t),aU(t.text)?sU(r)&&sU(i)?r!==i&&function(e,t,n){for(var r,i,o,a=0,s=0,l=t.length-1,u=t[0],c=t[l],d=n.length-1,p=n[0],h=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==p?p=n[++s]:null==h?h=n[--d]:uU(u,p)?(fU(u,p),u=t[++a],p=n[++s]):uU(c,h)?(fU(c,h),c=t[--l],h=n[--d]):uU(u,h)?(fU(u,h),JF(e,u.elm,rU(c.elm)),u=t[++a],h=n[--d]):uU(c,p)?(fU(c,p),JF(e,c.elm,u.elm),c=t[--l],p=n[++s]):(aU(r)&&(r=lU(t,a,l)),aU(i=r[p.key])||(o=t[i]).tag!==p.tag?JF(e,cU(p),u.elm):(fU(o,p),t[i]=void 0,JF(e,o.elm,u.elm)),p=n[++s]);(a<=l||s<=d)&&(a>l?dU(e,null==n[d+1]?null:n[d+1].elm,n,s,d):pU(e,t,a,l))}(n,r,i):sU(i)?(sU(e.text)&&iU(n,""),dU(n,null,i,0,i.length-1)):sU(r)?pU(n,r,0,r.length-1):sU(e.text)&&iU(n,""):e.text!==t.text&&(sU(r)&&pU(n,r,0,r.length-1),iU(n,t.text)))}var gU=0,mU=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=t,this._opts=n=lc({},n),this.root=e,this._id="zr"+gU++,this._oldVNode=EF(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=SF("svg");hU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(uU(e,t))fU(e,t);else{var n=e.elm,r=nU(n);cU(t),null!==r&&(JF(r,t.elm,rU(n)),pU(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return QF(e,MF(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=MF(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress;var o=[],a=this._bgVNode=function(e,t,n,r){var i;if(n&&"none"!==n)if(i=CF("rect","bg",{width:e,height:t,x:"0",y:"0",id:"0"}),Ah(n))ZF({fill:n},i.attrs,"fill",r);else if(Mh(n))XF({style:{fill:n},dirty:Qc,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",r);else{var o=xh(n),a=o.color,s=o.opacity;i.attrs.fill=a,s<1&&(i.attrs["fill-opacity"]=s)}return i}(n,r,this._backgroundColor,i);a&&o.push(a);var s=e.compress?null:this._mainVNode=CF("g","main",{},[]);this._paintList(t,i,s?s.children:o),s&&o.push(s);var l=fc(vc(i.defs),(function(e){return i.defs[e]}));if(l.length&&o.push(CF("defs","defs",{},l)),e.animation){var u=function(e,t,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=fc(vc(e),(function(t){return t+i+fc(vc(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+o})).join(r),s=fc(vc(t),(function(e){return"@keyframes "+e+i+fc(vc(t[e]),(function(n){return n+i+fc(vc(t[e][n]),(function(r){var i=t[e][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=CF("style","stl",{},[],u);o.push(c)}}return EF(n,r,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},TF(this.renderToVNode({animation:Oc(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Oc(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,i,o=e.length,a=[],s=0,l=0,u=0;u<o;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,p=d&&d.length||0,h=i&&i.length||0,f=void 0;for(f=Math.max(p-1,h-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var g=h-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<p;m++){var v={};$F(d[m],v,t);var y=CF("g","clip-g-"+l++,v,[]);(r?r.children:n).push(y),a[s++]=y,r=y}i=d;var x=QF(c,t);x&&(r?r.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),r&&i&&(i.style.display="none",e=UM(r,0,n),t=UM(r,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(Mh(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=Rh(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();var vU=mU;function yU(e,t,n){var r=Yu.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var xU=function(e){function t(t,n,r){var i,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||_f,"string"==typeof t?i=yU(t,n,r):Tc(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(Gc(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return j(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=yU("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new Kd(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new Kd(0,0,0,0)).copy(e),o.push(t)}else{for(var t,n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var d=new Kd(0,0,0,0);d.copy(c),d.union(e),o[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var p=e.width*e.height,h=c.width*c.height,f=l.width*l.height-p-h;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n)(t=new Kd(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(h=e[c]){var d=h.shouldBePainted(n,r,!0,!0);(f=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null)&&u(f);var p=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null;p&&u(p)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h,f;d=(h=t[c]).shouldBePainted(n,r,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered)(f=h.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(i=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(i);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/u,a/u));var d=this.domBack;function p(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;if(Ac(t))a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||jM(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o;else null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=QM(i,t,{dirty:function(){c.setUnpainted(),c.__painter.refresh()}}));i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(d,e,n,r,o),i.restore())}!n||s?p(0,0,o,a):n.length&&hc(n,(function(e){p(e.x*u,e.y*u,e.width*u,e.height*u)}))},t}(pd),_U=xU,bU=1e5,wU=314159,SU=.01;var CU=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=lc({},n||{}),this.dpr=n.devicePixelRatio||_f,this._singleCanvas=i,this.root=e,e.style&&(Gc(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var s=e,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new _U(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=wU,o.push(wU),this._domRoot=e}else{this._width=UM(e,0,n),this._height=UM(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<t;o++){var a=e[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(bU)),r||(r=n.ctx).save(),rE(r,a,i,o===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(bU)},e.prototype.paintOne=function(e,t){nE(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer((function(e){e.afterBrush&&e.afterBrush()}));else{var s=this;bp((function(){s._paintList(e,t,n,r)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(wU).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&i.push(l)}for(var u=!0,c=!1,d=function(a){var s,l=i[a],d=l.ctx,h=o&&l.createRepaintRects(e,t,p._width,p._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,h);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,h)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var i=e[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(h)if(0===h.length)s=l.__endIndex;else for(var _=p.dpr,b=0;b<h.length;++b){var w=h[b];d.save(),d.beginPath(),d.rect(w.x*_,w.y*_,w.width*_,w.height*_),d.clip(),x(w),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},p=this,h=0;h<i.length;h++)d(h);return Fu.wxa&&hc(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,i,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(rE(a,e,i,o),e.setPrevPaintRect(s))}else rE(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=wU);var n=this._layers[e];return n||((n=new _U("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?sc(n,this._layerConfig[e],!0):this._layerConfig[e-SU]&&sc(n,this._layerConfig[e-SU],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(t.dom,l.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){o&&(o.__endIndex!==e&&(o.__dirty=!0),o.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,i,o=null,a=0;for(i=0;i<e.length;i++){var s,l=(s=e[i]).zlevel,u=void 0;r!==l&&(r=l,a=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?SU:0),this._needsManuallyCompositing),u.__builtin__||oc("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,t(i),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,hc(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?sc(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===e||i===e+SU)sc(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(cc(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=UM(i,0,r),t=UM(i,1,r),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(wU).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new _U("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];rE(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),TU=CU;function MU(e){var n=t.useRef();return t.useEffect((function(){n.current=e}),[e]),n.current}dD([rB,fP,BB,uN,aj,Lj,uF,function(e){e.registerPainter("canvas",TU)},eB]);var EU=(null===window||void 0===window?void 0:window.outerWidth)>1728?550:470,IU=(null===window||void 0===window?void 0:window.outerWidth)>1728?680:590,AU=r.makeStyles((function(){return{outlierOnlyButton:{borderRadius:"8px"},metricPanel:{position:"relative"},overideMuiSelect:{"& .MuiInput-input":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},"& .MuiInput-root":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"}},overrideDefaultMuiSelect:{maxHeight:"300px","& .MuiInput-root":{height:"32px"}},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},menuItem:{fontWeight:300,fontSize:"14px",padding:"15px 20px",height:"52px"},outlierButtonContainer:{position:"absolute",top:"8px",right:"8px",zIndex:2,pointerEvents:"auto",display:"flex"},prometheusIcon:{position:"absolute",top:"15px",right:"15px",marginLeft:"17px",marginTop:"5px"}}})),DU=C.default.memo((function(n){var i,o,a=n.metricData,s=n.appName,l=n.metricKey,u=n.metricMeasure,c=n.operations,d=n.groupByOperations;n.height;var p=n.timezone,h=n.graphTitle,f=n.graphType,g=n.queryData,m=n.dateTimeRange,v=n.isHistoricalQueryView,y=n.showTitle,x=void 0===y||y,_=n.onEChartsDateSelect,b=n.onSelectAshLabel,w=n.registerChartInstance,S=AU(),C=c,T="".concat("echart-").concat(l),M=t.useState(null==d?void 0:d[0]),E=M[0],I=M[1],A=t.useState(null==C?void 0:C[0]),D=A[0],k=A[1],O=t.useState("undefined"!=typeof window?window.innerWidth:1280),R=O[0],N=O[1],L=t.useState([]),P=L[0],B=L[1],j=t.useRef(P),U=t.useRef(null),z=t.useRef(null),H=MU(a),W=t.useCallback((function(){var e,t,n=f===exports.GraphType.SINGLE_SUPPORTING||f===exports.GraphType.MAIN_RCA,r=null===(t=null===(e=U.current)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement,i=r?r.clientWidth:R;if(n)return Math.max(.99*i,250);var o=Math.floor(i/500),a=16*((o=Math.max(1,o))-1),l=Math.floor((i-a)/o);return Math.max(Math.min(l,EU),s===exports.AppName.YBM?IU:490)}),[f,R]),G=t.useCallback((function(e){var t,n,r,i,o,l,d,f=kO(a,5),v=x?null!=h?h:null===(t=f.layout)||void 0===t?void 0:t.title:"";if(!Ka(f)||!$a(f.data))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:v,left:16,top:16,textStyle:{fontWeight:600,fontFamily:rl,fontSize:15,color:"#0B1117"}},legend:{data:[]},graphic:[{type:"text",left:"center",top:"50%",style:{text:"No Data Available",fontSize:11.5,fontWeight:600,fill:"#0B1117"}}]};var y=u===exports.MetricMeasure.OUTLIER,_=u===exports.MetricMeasure.OUTLIER_TABLES,b=u===exports.MetricMeasure.OUTLIER_DB,w=null!=e?e:null==c?void 0:c[0];((null==c?void 0:c.length)||e)&&(y||_||b)&&(f.data=f.data.filter((function(e){return(null==e?void 0:e.name)===w})));var S=null!==(o=null===(i=null===(r=null===(n=f.layout)||void 0===n?void 0:n.yaxis)||void 0===r?void 0:r.ticksuffix)||void 0===i?void 0:i.replace(/(&nbsp;|\s)+/g,""))&&void 0!==o?o:null,C=0,T=f.data.map((function(e,t){var n,r,i,o,a,s,l,c,d,h,m,v=e.name;if(e.instanceName&&e.name!==e.instanceName)v="".concat(e.name," (").concat(e.instanceName,")"),u===exports.MetricMeasure.OUTLIER&&(v=e.instanceName);else if(u!==exports.MetricMeasure.OUTLIER||e.instanceName||e.global){if(_)v=e.tableName;else if(b)v=e.dbName;else if((null===(n=null==f?void 0:f.layout)||void 0===n?void 0:n.type)===el&&u===exports.MetricMeasure.OVERALL&&(null===(o=null===(i=null===(r=null==f?void 0:f.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0])===exports.WaitEventClassification.QUERY_ID){var y=null==g?void 0:g.find((function(t){return t.id.queryId===e.name}));v=null==y?void 0:y.query}}else v=ol.NODE_AVERAGE;var x=v,w=(null==v?void 0:v.length)>30;(null===(a=null==f?void 0:f.layout)||void 0===a?void 0:a.type)===el&&u===exports.MetricMeasure.OVERALL&&(null===(c=null===(l=null===(s=null==f?void 0:f.layout)||void 0===s?void 0:s.metadata)||void 0===l?void 0:l.currentGroupBy)||void 0===c?void 0:c[0])===exports.WaitEventClassification.QUERY_ID?x=(null==v?void 0:v.substring(0,30))+"...":w&&u!==exports.MetricMeasure.OUTLIER?x=v.substring(0,30)+"...":u!==exports.MetricMeasure.OUTLIER||e.global?_?x=e.namespaceName?"".concat(e.namespaceName,".").concat(e.tableName):e.tableName:b&&(x=e.namespaceName):x=e.instanceName?"".concat(e.instanceName," (").concat(e.name,")"):ol.NODE_AVERAGE;var S=e.x.map((function(t,n){return[t,e.y[n]]})),C=(null===(d=null==f?void 0:f.layout)||void 0===d||d.type,S);return F(F({name:x,fullname:v,type:(null===(h=null==f?void 0:f.layout)||void 0===h?void 0:h.type)===el?"bar":"line",data:C,color:Ql[t%Ql.length]},e.name===ol.NODE_AVERAGE?{lineStyle:{type:"dashed"}}:{}),{tooltip:{formatter:function(e){var t=e.value[1],n=new Date(e.value[0]).toLocaleString(void 0,{timeZone:p});return"".concat(e.seriesName,": ").concat(t.toFixed(2)," at ").concat(n)}},stack:(null===(m=null==f?void 0:f.layout)||void 0===m?void 0:m.type)===el?"total":void 0,smooth:!1,showSymbol:!1})}));Ka(null===(l=f.layout)||void 0===l?void 0:l.yaxis)&&"µs"===S&&$a(f.data)&&ns(f.data)&&(T.forEach((function(e){e.data=e.data.map((function(e){return[e[0],e[1]/1e3]}))})),S="ms");var M=0;T.forEach((function(e){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>M&&(M=t)}));C=1.5*M,(null===(d=null==f?void 0:f.layout)||void 0===d?void 0:d.type)===el&&(C=3.5*M),0===C&&(C=1.01);var E={title:{text:s!==exports.AppName.YBA&&S?"".concat(v," (").concat(S,")"):v,left:16,top:16,textStyle:{fontWeight:600,fontFamily:rl,fontSize:15,color:"#0B1117"}},tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"shadow",shadowStyle:{color:"#E9EEF2"},lineStyle:{color:"#E9EEF2",width:1}},textStyle:{fontFamily:rl,fontSize:13,lineHeight:16,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; box-shadow:none;",formatter:function(e){var t,n=(null===(t=e[0])||void 0===t?void 0:t.axisValue)||"",r=new Date(n),i=Oa(p?Ra(r,p):r,"MMM d HH:mm (zzz)",{timeZone:null!=p?p:void 0}),o=e.map((function(e){var t=e.value[1],n=ku(e.color,e.seriesName),r=Ou(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(i,'</b><br/><span style="margin-top: 16px;">').concat(o,"</span></div>")}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:{left:"3%",right:"4%",bottom:"20%",containLabel:!0,top:"22%"},xAxis:{type:"time",boundaryGap:!1,splitNumber:6,axisLabel:{color:"#6D7C88",textStyle:{fontFamily:rl,fontSize:11.5},interval:"auto",formatter:function(e){var t,n=new Date(e),r=(t=m.startDateTime,(m.endDateTime-t)/864e5);return Oa(n,r>5?"MM/dd":r>2&&r<=5?"MM/dd, HH:mm":"HH:mm")}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}}},yAxis:{type:"value",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:rl,fontSize:11.5},formatter:function(e){return"".concat(null==e?void 0:e.toFixed(2)," ").concat(null!=S?S:"")}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}},min:0,max:C},series:T,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0},legend:{type:T.length>3?"scroll":"plain",orient:"horizontal",textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#6D7C88",fontFamily:rl},symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,bottom:10,data:T.filter((function(e){return e&&e.name})).slice(0,8).map((function(e){return e.name}))}};return E}),[s,m,h,a,u,c,g,x,p]),q=function(e){var t,n,r,i,o;null===(t=null==e?void 0:e.current)||void 0===t||t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}});var a=!1,s=null;null===(r=null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getZr())||void 0===r||r.on("mousedown",(function(t){var n,r,i=[t.offsetX,t.offsetY],o=null===(n=e.current)||void 0===n?void 0:n.convertFromPixel({seriesIndex:0},i);s=null!==(r=null==o?void 0:o[0])&&void 0!==r?r:null,a=!0})),null===(o=null===(i=null==e?void 0:e.current)||void 0===i?void 0:i.getZr())||void 0===o||o.on("mouseup",(function(t){var n;if(a){var r=[t.offsetX,t.offsetY],i=null===(n=e.current)||void 0===n?void 0:n.convertFromPixel({seriesIndex:0},r),o=null==i?void 0:i[0];if(null!==s&&null!==o&&Math.abs(o-s)>10){var l=Math.min(s,o),u=Math.max(s,o);_(l,u)}}a=!1}))},Q=t.useCallback((function(){var e;if(U.current){z.current||(z.current=oI(U.current,"light",{renderer:"canvas"})),w&&w(z.current);var t=G(D);z.current.setOption(t,!0),f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==U?void 0:U.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),q(z)})):(null===(e=z.current)||void 0===e||e.resize({width:W()}),q(z)),function(e){var t;null===(t=null==e?void 0:e.current)||void 0===t||t.on("legendselectchanged",(function(t){var n,r,i=t.name,o=V([],j.current,!0),a=null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getOption(),s=((null==a?void 0:a.legend)&&Array.isArray(a.legend)&&(null===(r=a.legend[0])||void 0===r?void 0:r.data)?a.legend[0].data:[]).map((function(e){return"string"==typeof e?e:e.name}));o=0===j.current.length||j.current.length===s.length?[i]:j.current.includes(i)?j.current.filter((function(e){return e!==i})):V(V([],j.current,!0),[i],!1),s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:o.includes(t)?"legendSelect":"legendUnSelect",name:t})})),B(o)}))}(z)}}),[D,G,W]);t.useEffect((function(){var e=function(){return N(window.innerWidth)};return window.addEventListener("resize",e),Q(),function(){window.removeEventListener("resize",e),z.current&&(z.current.dispose(),z.current=null)}}),[Q]),t.useEffect((function(){j.current=P}),[P]),t.useEffect((function(){var e;if(z.current){var t=G(D);z.current.setOption(t,!0),f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==U?void 0:U.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),q(z)})):(null===(e=z.current)||void 0===e||e.resize({width:W()}),q(z))}}),[a,H,D,E,W,G]);t.useEffect((function(){var e;z.current&&(f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==U?void 0:U.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=z.current)||void 0===e||e.resize({width:W()}))}),[R,W]);var Z=D||(null==c?void 0:c[0]);return e.jsxs(r.Box,F({id:l,onClick:function(e){return e.stopPropagation()},className:S.metricPanel},{children:[e.jsxs("span",F({className:S.outlierButtonContainer},{children:[(null===(i=null==a?void 0:a.layout)||void 0===i?void 0:i.type)===el&&(u===exports.MetricMeasure.OUTLIER||u===exports.MetricMeasure.OUTLIER_TABLES||u===exports.MetricMeasure.OUTLIER_DB||v)&&$a(d)&&e.jsx(r.Box,F({ml:2,mr:2},{children:e.jsx(lr,F({value:E,className:Y(S.outlierOnlyButton,S.overrideDefaultMuiSelect,S.overrideDefaultMuiFormControl)},{children:null==d?void 0:d.map((function(t,n){return e.jsx(r.MenuItem,F({value:t,onClick:function(e){!function(e){var t;I(e),(null===(t=null==a?void 0:a.layout)||void 0===t?void 0:t.type)!==el||u!==exports.MetricMeasure.OUTLIER&&u!==exports.MetricMeasure.OUTLIER_TABLES&&u!==exports.MetricMeasure.OUTLIER_DB&&!v||null==b||b(e,a,!!v)}(t),e.stopPropagation()}},{children:t}),n)}))}))})),$a(C)&&((null===(o=null==a?void 0:a.layout)||void 0===o?void 0:o.type)===el||(null==C?void 0:C.length)>1)&&e.jsx(lr,F({value:D,className:Y(S.outlierOnlyButton,S.overrideDefaultMuiSelect,S.overrideDefaultMuiFormControl)},{children:null==C?void 0:C.map((function(t,n){return e.jsx(r.MenuItem,F({className:Y(t===Z&&S.overideMuiSelect,S.menuItem),value:t,onClick:function(e){!function(e){var t;if(k(e),(null===(t=null==a?void 0:a.layout)||void 0===t?void 0:t.type)===el&&u===exports.MetricMeasure.OVERALL&&$a(c)&&(null==b||b(e,a,!!v)),z.current){var n=G(e);z.current.setOption(n,!0)}}(t),e.stopPropagation()}},{children:t}),"".concat(t,"-").concat(n))}))}))]})),e.jsx("div",{ref:U,id:T,style:{overflow:"hidden",position:"relative",zIndex:1,minHeight:s===exports.AppName.WEB?320:340,width:"100%",minWidth:0}})]}))})),kU={exports:{}},OU=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},RU=OU,NU=Object.prototype.toString;function LU(e){return"[object Array]"===NU.call(e)}function PU(e){return void 0===e}function BU(e){return null!==e&&"object"==typeof e}function jU(e){if("[object Object]"!==NU.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function FU(e){return"[object Function]"===NU.call(e)}function UU(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),LU(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var zU={isArray:LU,isArrayBuffer:function(e){return"[object ArrayBuffer]"===NU.call(e)},isBuffer:function(e){return null!==e&&!PU(e)&&null!==e.constructor&&!PU(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:BU,isPlainObject:jU,isUndefined:PU,isDate:function(e){return"[object Date]"===NU.call(e)},isFile:function(e){return"[object File]"===NU.call(e)},isBlob:function(e){return"[object Blob]"===NU.call(e)},isFunction:FU,isStream:function(e){return BU(e)&&FU(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:UU,merge:function e(){var t={};function n(n,r){jU(t[r])&&jU(n)?t[r]=e(t[r],n):jU(n)?t[r]=e({},n):LU(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)UU(arguments[r],n);return t},extend:function(e,t,n){return UU(t,(function(t,r){e[r]=n&&"function"==typeof t?RU(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},HU=zU;function VU(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var WU=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(HU.isURLSearchParams(t))r=t.toString();else{var i=[];HU.forEach(t,(function(e,t){null!=e&&(HU.isArray(e)?t+="[]":e=[e],HU.forEach(e,(function(e){HU.isDate(e)?e=e.toISOString():HU.isObject(e)&&(e=JSON.stringify(e)),i.push(VU(t)+"="+VU(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},YU=zU;function GU(){this.handlers=[]}GU.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},GU.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},GU.prototype.forEach=function(e){YU.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var qU,QU,ZU,XU,$U,KU,JU,ez,tz,nz,rz,iz,oz,az,sz,lz,uz,cz,dz=GU,pz=zU,hz=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};function fz(){if(QU)return qU;QU=1;var e=hz;return qU=function(t,n,r,i,o){var a=new Error(t);return e(a,n,r,i,o)},qU}function gz(){if(XU)return ZU;XU=1;var e=fz();return ZU=function(t,n,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?n(e("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}}function mz(){if(KU)return $U;KU=1;var e=zU;return $U=e.isStandardBrowserEnv()?{write:function(t,n,r,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),e.isString(i)&&s.push("path="+i),e.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},$U}function vz(){return ez?JU:(ez=1,JU=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function yz(){return nz?tz:(nz=1,tz=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function xz(){if(iz)return rz;iz=1;var e=vz(),t=yz();return rz=function(n,r){return n&&!e(r)?t(n,r):r}}function _z(){if(az)return oz;az=1;var e=zU,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return oz=function(n){var r,i,o,a={};return n?(e.forEach(n.split("\n"),(function(n){if(o=n.indexOf(":"),r=e.trim(n.substr(0,o)).toLowerCase(),i=e.trim(n.substr(o+1)),r){if(a[r]&&t.indexOf(r)>=0)return;a[r]="set-cookie"===r?(a[r]?a[r]:[]).concat([i]):a[r]?a[r]+", "+i:i}})),a):a}}function bz(){if(lz)return sz;lz=1;var e=zU;return sz=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(n){var r=e.isString(n)?i(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}var wz,Sz,Cz,Tz,Mz,Ez={exports:{}},Iz={exports:{}},Az={exports:{}};function Dz(){if(Sz)return wz;Sz=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return wz=function(s,l){l=l||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*i;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(s);if("number"===u&&isFinite(s))return l.long?function(i){var o=Math.abs(i);if(o>=r)return a(i,o,r,"day");if(o>=n)return a(i,o,n,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},wz}function kz(){if(Tz)return Cz;return Tz=1,Cz=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Dz(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},Cz}var Oz,Rz,Nz,Lz,Pz,Bz,jz,Fz,Uz,zz={exports:{}};function Hz(){return Rz?Oz:(Rz=1,Oz=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function Vz(){return Pz||(Pz=1,function(e,t){const n=O.default,r=R.default;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(Lz)return Nz;Lz=1;const e=N.default,t=O.default,n=Hz(),{env:r}=process;let i;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(t,o){if(0===i)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===i)return 0;const a=i||0;if("dumb"===r.TERM)return a;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?i=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(i=1),"FORCE_COLOR"in r&&(i="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),Nz={supportsColor:function(e){return o(a(e,e&&e.isTTY))},stdout:o(a(!0,t.isatty(1))),stderr:o(a(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=kz()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(zz,zz.exports)),zz.exports}function Wz(){return Bz||(Bz=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Iz.exports=(Mz||(Mz=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=kz()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Az,Az.exports)),Az.exports):Iz.exports=Vz()),Iz.exports}function Yz(){if(Uz)return Ez.exports;Uz=1;var e,t,n,r=A.default,i=r.URL,o=E.default,a=I.default,s=D.default.Writable,l=k.default,u=function(){return Fz||(Fz=1,jz=function(){if(!e){try{e=Wz()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),jz;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=L(Error.captureStackTrace),e||!t&&n||console.warn("The follow-redirects package should be excluded from browser builds.");var c=!1;try{l(new i(""))}catch(e){c="ERR_INVALID_URL"===e.code}var d=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],p=["abort","aborted","connect","error","socket","timeout"],h=Object.create(null);p.forEach((function(e){h[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var f=O("ERR_INVALID_URL","Invalid URL",TypeError),g=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",g),v=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),y=O("ERR_STREAM_WRITE_AFTER_END","write after end"),x=s.prototype.destroy||w;function _(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof g?e:new g({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var o=r+":",a=n[o]=e[r],s=t[r]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,r,a){var s;return s=e,i&&s instanceof i?e=T(e):N(e)?e=T(S(e)):(a=r,r=C(e),e={protocol:o}),L(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,N(r.host)||N(r.hostname)||(r.hostname="::1"),l.equal(r.protocol,o,"protocol mismatch"),u("options",r),new _(r,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=s.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function w(){}function S(e){var t;if(c)t=new i(e);else if(!N((t=C(r.parse(e))).protocol))throw new f({input:e});return t}function C(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new f({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new f({input:e.href||e});return e}function T(e,t){var n=t||{};for(var r of d)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function M(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function O(e,t,n){function r(n){L(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function R(e,t){for(var n of p)e.removeListener(n,h[n]);e.on("error",w),e.destroy(t)}function N(e){return"string"==typeof e||e instanceof String}function L(e){return"function"==typeof e}return _.prototype=Object.create(s.prototype),_.prototype.abort=function(){R(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_.prototype.destroy=function(e){return R(this._currentRequest,e),x.call(this,e),this},_.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!N(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;L(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new v),this.abort()):n&&n()},_.prototype.end=function(e,t,n){if(L(e)?(n=e,e=t=null):L(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},_.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){_.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(_.prototype,e,{get:function(){return this._currentRequest[e]}})})),_.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(i._redirectable=this,p))i.on(o,h[o]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,l=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(a<l.length){var n=l[a++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()}()}},_.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,o=e.headers.location;if(!o||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(R(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],M(/^content-/i,this._options.headers));var d=M(/^host$/i,this._options.headers),p=S(this._currentUrl),h=d||p.host,f=/^\w+:/.test(o)?this._currentUrl:r.format(Object.assign(p,{host:h})),g=function(e,t){return c?new i(e,t):S(r.resolve(t,e))}(o,f);if(u("redirecting to",g.href),this._isRedirect=!0,T(g,this._options),(g.protocol!==p.protocol&&"https:"!==g.protocol||g.host!==h&&!function(e,t){l(N(e)&&N(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(g.host,h))&&M(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),L(a)){var v={headers:e.headers,statusCode:t},y={url:f,method:s,headers:n};a(this._options,v,y),this._sanitizeOptions(this._options)}this._performRequest()},Ez.exports=b({http:o,https:a}),Ez.exports.wrap=b,Ez.exports}var Gz,qz,Qz={name:"axios",version:"0.21.3",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};function Zz(){if(qz)return Gz;qz=1;var e=zU,t=gz(),n=xz(),r=WU,i=E.default,o=I.default,a=Yz().http,s=Yz().https,l=A.default,u=L.default,c=Qz,d=fz(),p=hz,h=/https:?/;function f(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,f(e,t,e.href)}}return Gz=function(g){return new Promise((function(m,v){var y=function(e){m(e)},x=function(e){v(e)},_=g.data,b=g.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+c.version,_&&!e.isStream(_)){if(Buffer.isBuffer(_));else if(e.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else{if(!e.isString(_))return x(d("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",g));_=Buffer.from(_,"utf-8")}b["Content-Length"]=_.length}var w=void 0;g.auth&&(w=(g.auth.username||"")+":"+(g.auth.password||""));var S=n(g.baseURL,g.url),C=l.parse(S),T=C.protocol||"http:";if(!w&&C.auth){var M=C.auth.split(":");w=(M[0]||"")+":"+(M[1]||"")}w&&delete b.Authorization;var E=h.test(T),I=E?g.httpsAgent:g.httpAgent,A={path:r(C.path,g.params,g.paramsSerializer).replace(/^\?/,""),method:g.method.toUpperCase(),headers:b,agent:I,agents:{http:g.httpAgent,https:g.httpsAgent},auth:w};g.socketPath?A.socketPath=g.socketPath:(A.hostname=C.hostname,A.port=C.port);var D,k=g.proxy;if(!k&&!1!==k){var O=T.slice(0,-1)+"_proxy",R=process.env[O]||process.env[O.toUpperCase()];if(R){var N=l.parse(R),L=process.env.no_proxy||process.env.NO_PROXY,P=!0;if(L)P=!L.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&C.hostname.substr(C.hostname.length-e.length)===e||C.hostname===e))}));if(P&&(k={host:N.hostname,port:N.port,protocol:N.protocol},N.auth)){var B=N.auth.split(":");k.auth={username:B[0],password:B[1]}}}}k&&(A.headers.host=C.hostname+(C.port?":"+C.port:""),f(A,k,T+"//"+C.hostname+(C.port?":"+C.port:"")+A.path));var j=E&&(!k||h.test(k.protocol));g.transport?D=g.transport:0===g.maxRedirects?D=j?o:i:(g.maxRedirects&&(A.maxRedirects=g.maxRedirects),D=j?s:a),g.maxBodyLength>-1&&(A.maxBodyLength=g.maxBodyLength);var F=D.request(A,(function(n){if(!F.aborted){var r=n,i=n.req||F;if(204!==n.statusCode&&"HEAD"!==i.method&&!1!==g.decompress)switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(u.createUnzip()),delete n.headers["content-encoding"]}var o={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:g,request:i};if("stream"===g.responseType)o.data=r,t(y,x,o);else{var a=[],s=0;r.on("data",(function(e){a.push(e),s+=e.length,g.maxContentLength>-1&&s>g.maxContentLength&&(r.destroy(),x(d("maxContentLength size of "+g.maxContentLength+" exceeded",g,null,i)))})),r.on("error",(function(e){F.aborted||x(p(e,g,null,i))})),r.on("end",(function(){var n=Buffer.concat(a);"arraybuffer"!==g.responseType&&(n=n.toString(g.responseEncoding),g.responseEncoding&&"utf8"!==g.responseEncoding||(n=e.stripBOM(n))),o.data=n,t(y,x,o)}))}}}));if(F.on("error",(function(e){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||x(p(e,g,null,F))})),g.timeout){var U=parseInt(g.timeout,10);if(isNaN(U))return void x(d("error trying to parse `config.timeout` to int",g,"ERR_PARSE_TIMEOUT",F));F.setTimeout(U,(function(){F.abort(),x(d("timeout of "+U+"ms exceeded",g,g.transitional&&g.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}g.cancelToken&&g.cancelToken.promise.then((function(e){F.aborted||(F.abort(),x(e))})),e.isStream(_)?_.on("error",(function(e){x(p(e,g,null,F))})).pipe(F):F.end(_)}))}}var Xz=zU,$z=function(e,t){pz.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Kz=hz,Jz={"Content-Type":"application/x-www-form-urlencoded"};function eH(e,t){!Xz.isUndefined(e)&&Xz.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var tH,nH={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?tH=function(){if(cz)return uz;cz=1;var e=zU,t=gz(),n=mz(),r=WU,i=xz(),o=_z(),a=bz(),s=fz();return uz=function(l){return new Promise((function(u,c){var d=l.data,p=l.headers,h=l.responseType;e.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var g=l.auth.username||"",m=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";p.Authorization="Basic "+btoa(g+":"+m)}var v=i(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,n={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:e,config:l,request:f};t(u,c,n),f=null}}if(f.open(l.method.toUpperCase(),r(v,l.params,l.paramsSerializer),!0),f.timeout=l.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(c(s("Request aborted",l,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(s("Network Error",l,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+l.timeout+"ms exceeded";l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),c(s(e,l,l.transitional&&l.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var x=(l.withCredentials||a(v))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;x&&(p[l.xsrfHeaderName]=x)}"setRequestHeader"in f&&e.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),h&&"json"!==h&&(f.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&f.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",l.onUploadProgress),l.cancelToken&&l.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),d||(d=null),f.send(d)}))}}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(tH=Zz()),tH),transformRequest:[function(e,t){return $z(t,"Accept"),$z(t,"Content-Type"),Xz.isFormData(e)||Xz.isArrayBuffer(e)||Xz.isBuffer(e)||Xz.isStream(e)||Xz.isFile(e)||Xz.isBlob(e)?e:Xz.isArrayBufferView(e)?e.buffer:Xz.isURLSearchParams(e)?(eH(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Xz.isObject(e)||t&&"application/json"===t["Content-Type"]?(eH(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&Xz.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw Kz(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};nH.headers={common:{Accept:"application/json, text/plain, */*"}},Xz.forEach(["delete","get","head"],(function(e){nH.headers[e]={}})),Xz.forEach(["post","put","patch"],(function(e){nH.headers[e]=Xz.merge(Jz)}));var rH,iH,oH=nH,aH=zU,sH=oH;function lH(){return iH?rH:(iH=1,rH=function(e){return!(!e||!e.__CANCEL__)})}var uH=zU,cH=function(e,t,n){var r=this||sH;return aH.forEach(n,(function(n){e=n.call(r,e,t)})),e},dH=lH(),pH=oH;function hH(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var fH=zU,gH=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return fH.isPlainObject(e)&&fH.isPlainObject(t)?fH.merge(e,t):fH.isPlainObject(t)?fH.merge({},t):fH.isArray(t)?t.slice():t}function l(r){fH.isUndefined(t[r])?fH.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}fH.forEach(r,(function(e){fH.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),fH.forEach(i,l),fH.forEach(o,(function(r){fH.isUndefined(t[r])?fH.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),fH.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var u=r.concat(i).concat(o).concat(a),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return fH.forEach(c,l),n},mH=Qz,vH={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){vH[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var yH={},xH=mH.version.split(".");function _H(e,t){for(var n=t?t.split("."):xH,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}vH.transitional=function(e,t,n){var r=t&&_H(t);function i(e,t){return"[Axios v"+mH.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,a){if(!1===e)throw new Error(i(o," has been removed in "+t));return r&&!yH[o]&&(yH[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var bH,wH,SH,CH,TH,MH,EH,IH,AH={isOlderVersion:_H,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:vH},DH=zU,kH=WU,OH=dz,RH=function(e){return hH(e),e.headers=e.headers||{},e.data=cH.call(e,e.data,e.headers,e.transformRequest),e.headers=uH.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),uH.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||pH.adapter)(e).then((function(t){return hH(e),t.data=cH.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return dH(t)||(hH(e),t&&t.response&&(t.response.data=cH.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},NH=gH,LH=AH,PH=LH.validators;function BH(e){this.defaults=e,this.interceptors={request:new OH,response:new OH}}function jH(){if(wH)return bH;function e(e){this.message=e}return wH=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,bH=e}BH.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=NH(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&LH.assertOptions(t,{silentJSONParsing:PH.transitional(PH.boolean,"1.0.0"),forcedJSONParsing:PH.transitional(PH.boolean,"1.0.0"),clarifyTimeoutError:PH.transitional(PH.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var a=[RH,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),i=Promise.resolve(e);a.length;)i=i.then(a.shift(),a.shift());return i}for(var s=e;n.length;){var l=n.shift(),u=n.shift();try{s=l(s)}catch(e){u(e);break}}try{i=RH(s)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},BH.prototype.getUri=function(e){return e=NH(this.defaults,e),kH(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},DH.forEach(["delete","get","head","options"],(function(e){BH.prototype[e]=function(t,n){return this.request(NH(n||{},{method:e,url:t,data:(n||{}).data}))}})),DH.forEach(["post","put","patch"],(function(e){BH.prototype[e]=function(t,n,r){return this.request(NH(r||{},{method:e,url:t,data:n}))}}));var FH=zU,UH=OU,zH=BH,HH=gH;function VH(e){var t=new zH(e),n=UH(zH.prototype.request,t);return FH.extend(n,zH.prototype,t),FH.extend(n,t),n}var WH=VH(oH);WH.Axios=zH,WH.create=function(e){return VH(HH(WH.defaults,e))},WH.Cancel=jH(),WH.CancelToken=function(){if(CH)return SH;CH=1;var e=jH();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},SH=t}(),WH.isCancel=lH(),WH.all=function(e){return Promise.all(e)},WH.spread=MH?TH:(MH=1,TH=function(e){return function(t){return e.apply(null,t)}}),WH.isAxiosError=IH?EH:(IH=1,EH=function(e){return"object"==typeof e&&!0===e.isAxiosError}),kU.exports=WH,kU.exports.default=WH;var YH,GH,qH=Z(kU.exports),QH="undefined"!=typeof process&&process.env?process.env:{},ZH="development"===QH.NODE_ENV,XH=null!==(YH=QH.REACT_APP_API_URL)&&void 0!==YH?YH:ZH?"http://localhost:8080/api":"/api",$H=null;exports.QUERY_KEY=void 0,(GH=exports.QUERY_KEY||(exports.QUERY_KEY={})).fetchAnomalies="fetchAnomalies",GH.fetchGraphs="fetchGraphs",GH.fetchQueries="fetchQueries",GH.fetchUniverseMetadataList="fetchUniverseMetadataList",GH.deleteUniverseMetadata="deleteUniverseMetadata",GH.updateUniverseMetadata="updateUniverseMetadata",GH.fetchUniverseListDetails="fetchUniverseListDetails",GH.fetchUniverseById="fetchUniverseById",GH.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",GH.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",GH.fetchAnomaliesPage="fetchAnomaliesPage",GH.fetchQueriesPage="fetchQueriesPage",GH.fetchQueriesStatsPage="fetchQueriesStatsPage",GH.fetchQueriesDatabases="fetchQueriesDatabases",GH.fetchCustomerMetadataList="fetchCustomerMetadataList",GH.fetchQueryStats="fetchQueryStats",GH.fetchTablesPage="fetchTablesPage",GH.fetchNamespaces="fetchNamespaces",GH.deleteRuntimeConfig="deleteRuntimeConfig",GH.fetchRuntimeConfigs="fetchRuntimeConfigs",GH.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",GH.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",GH.updateRuntimeConfig="updateRuntimeConfig",GH.fetchAnomalyGroups="fetchAnomalyGroups",GH.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",GH.fetchAnomalyGroupsById="fetchAnomalyGroupsById",GH.getUniverseMetadata="getUniverseMetadata",GH.fetchMetricsGraphs="fetchMetricsGraphs";var KH=qH.create({baseURL:XH});KH.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===exports.AppName.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===exports.AppName.YBA&&n&&""!==n){var i=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=i}else t===exports.AppName.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var JH,eV,tV,nV,rV,iV,oV,aV,sV,lV=function(){this.fetchAnomalies=function(e,t,n,r){var i=Ja(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",o={};return t&&(o.startTime=t),n&&(o.endTime=n),KH.get(i,{params:o}).then((function(e){return e.data}))},this.fetchAnomaliesPage=function(e,t,n,r,i,o,a,s){void 0===r&&(r=10);var l=Ja(n)?"".concat(n,"/universe/").concat(e,"/anomalies/page"):"/universe/".concat(e,"/anomalies/page"),u={};return i&&(u.startTime=i),o&&(u.endTime=o),a&&a!==Ks&&(u.category=a),Ja(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,KH.get(l,{params:u})},this.fetchQueriesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=Ja(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),p={};return o&&(p.startTime=o),a&&(p.endTime=a),Ja(s)&&(p.query=s),l&&l!==Ks&&(p.dbName=l),p.sortBy=es(u)?"dbName":u,p.direction=es(c)?"DESC":c,p.offset=n*i,p.needTotalCount=!0,p.limit=i,KH.get(d,{params:p})},this.fetchQueriesStatsPage=function(e,t,n,r){var i=t.currentTablePage,o=t.apiUrl,a=t.pageSize,s=t.startTime,l=t.endTime,u=t.searchInput,c=t.database,d=t.sortBy,p=t.sortDirection,h=t.queryType,f=t.groupByOperation,g=n(),m=g.cluster,v=g.region,y=g.zone,x=g.node,_=new URLSearchParams;if(Ja(m)&&m!==Ks&&_.append("clusterUuid",m),Ja(v)&&v!==Ks&&_.append("regionCode",v),Ja(y)&&y!==Ks&&_.append("azCode",y),Ja(x)&&x!==Ks&&_.append("instanceName",x),$a(r)){var b=f===exports.WaitEventClassification.WAIT_EVENT?"events":"eventTypes";r.forEach((function(e){return _.append(b,e)}))}var w=Ja(o)?"".concat(o,"/universe/").concat(e,"/queries/stats/page?").concat(_.toString()):"/universe/".concat(e,"/queries/stats/page?").concat(_.toString()),S={};return h&&(S.queryType=h.toUpperCase()),s&&(S.startTime=s),l&&(S.endTime=l),Ja(u)&&(S.query=u),c&&c!==Ks&&(S.namespaceName=c),f&&f===exports.WaitEventClassification.WAIT_EVENT&&(S.groupEventsBy=Ns.waitEvent),S.sortBy=es(d)?"eps":d,S.direction=es(p)?"DESC":p,S.offset=i*a,S.needTotalCount=!0,S.limit=a,S.excludeTpUser=!0,KH.get(w,{params:S})},this.fetchNamespaceSchemas=function(e,t,n){var r=Ja(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return KH.get(r).then((function(e){return e.data}))},this.fetchQueryStats=function(e,t,n){var r={},i=t.startTime,o=t.endTime,a=t.queryId,s=t.dbId;i&&(r.startTime=i),o&&(r.endTime=o),a&&(r.queryId=a),s&&(r.dbId=s);var l=Ja(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return KH.get(l,{params:r}).then((function(e){return e.data}))},this.fetchTablesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startDateTime,a=t.endDateTime,s=t.searchInput,l=t.database,u=t.schema,c=t.sortBy,d=t.sortDirection,p=Ja(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),h={};return o&&(h.startTime=o),a&&(h.endTime=a),Ja(s)&&(h.tableName=s),l&&l!==Ks&&(h.namespaceName=l),u&&u!==Ks&&(h.schemaName=u),h.sortBy=es(c)?"namespaceName":c,h.direction=es(d)?"DESC":d,h.offset=n*i,h.needTotalCount=!0,h.limit=i,KH.get(p,{params:h})},this.fetchNamespaces=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return KH.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return KH.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=Ja(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return KH.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n){$H&&$H.abort(),$H=new AbortController;var r=Ja(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs"),i=qH.CancelToken.source();return $H.signal.addEventListener("abort",(function(){i.cancel("Request aborted")})),KH.post(r,t,{cancelToken:i.token}).then((function(e){return e.data}))},this.fetchQueries=function(e,t,n){var r={};Ka(n)&&(r.db_id=null==n?void 0:n.dbId,r.query_id=null==n?void 0:n.queryId,r.user_id=null==n?void 0:n.userId);var i=Ja(t)?"".concat(t,"/universe/").concat(e,"/queries"):"/universe/".concat(e,"/queries");return KH.get(i,{params:r}).then((function(e){return e.data}))},this.fetchCustomerMetadataList=function(e){var t=Ja(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return KH.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=Ja(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return KH.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=Ja(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return KH.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=Ja(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return KH.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=Ja(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",i={customer_uuid:t,universe_uuid:n};return KH.get(r,{params:i}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return KH.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=Ja(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return KH.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return KH.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},i=Ja(e)?"".concat(e,"/universe/details"):"/universe/details";return KH.get(i,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return KH.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return KH.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return KH.post(n,null).then((function(e){return e.data}))},this.fetchRuntimeConfigs=function(e,t){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var n=Ja(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return KH.get(n).then((function(e){return e.data}))},this.fetchSpecificRuntimeConfigs=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Ja(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return KH.get(r,{params:t.reduce((function(e,t){return e.append("path",t),e}),new URLSearchParams)}).then((function(e){return e.data}))},this.updateRuntimeConfig=function(e,t,n,r){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var i=Ja(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return KH.put(i,{value:n}).then((function(e){return e.data}))},this.deleteRuntimeConfig=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Ja(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return KH.delete(r).then((function(e){return e.data}))},this.fetchAnomalyGroups=function(e,t,n,r,i,o){void 0===r&&(r="");var a=i(),s=a.cluster,l=a.region,u=a.zone,c=a.node,d=new URLSearchParams;if(t&&d.append("startTime",t),n&&d.append("endTime",n),null===t&&null===n)return{};Ja(r)&&d.append("anomalyType",r),Ja(s)&&s!==Ks&&d.append("clusterUuid",s),Ja(l)&&l!==Ks&&d.append("regionCode",l),Ja(u)&&u!==Ks&&d.append("azCode",u),Ja(c)&&c!==Ks&&d.append("instanceName",c);var p=Ja(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(d.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(d.toString());return KH.get(p).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,i){var o=Ja(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r):"/universe/".concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r);return KH.get(o).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,i){if(null===n&&null===r)return{};var o=Ja(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r):"/universe/".concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r);return KH.get(o).then((function(e){return e.data}))}},uV=new lV;function cV(){return cV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cV.apply(null,arguments)}const dV=e=>S.createElement("svg",cV({xmlns:"http://www.w3.org/2000/svg",style:{display:"block",shapeRendering:"auto",backgroundPosition:"initial initial",backgroundRepeat:"initial initial"},width:24,height:24,viewBox:"30 30 40 40",preserveAspectRatio:"xMidYMid"},e),JH||(JH=S.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),eV||(eV=S.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),tV||(tV=S.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),nV||(nV=S.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),rV||(rV=S.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),iV||(iV=S.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),oV||(oV=S.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),aV||(aV=S.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),sV||(sV=S.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var pV=function(i){var o,a,s,l=i.metricMeasure,u=i.apiUrl,c=i.universeQueryStatsData,d=i.appName,p=i.timezone,h=i.urlParams,f=i.dateTimeRange,g=i.getClusterDetails,m=i.onEChartsDateSelect,v=Kl(),y=t.useRef([]),x=t.useState(null),_=x[0],b=x[1],w=t.useState([]),S=w[0],C=w[1],T=g(),M=T.universeUuid,E=T.cluster,I=T.region,A=T.zone,D=T.node,k=T.numNodes,O=T.outlierType,R=function(e,t,n){void 0===n&&(n=!1);var r=vl.WAIT_EVENT_COMPONENT;if("Class"===e?r=vl.WAIT_EVENT_CLASS:"Type"===e?r=vl.WAIT_EVENT_TYPE:"Event"===e?r=vl.WAIT_EVENT:"Query"===e?r=vl.QUERY:"Client IP"===e&&(r=vl.CLIENT_NODE_IP),n){var i=JSON.parse(JSON.stringify(S)),o=null;if(n){var a=null==i?void 0:i.filter((function(e){return e.name===(null==t?void 0:t.name)}));if(a.length>=2){var s=a.find((function(e,n){return n===a.length-1&&e.name===(null==t?void 0:t.name)}));o=s}else o=null==i?void 0:i.find((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)}))}else o=null==i?void 0:i.find((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)}));o&&(o.groupBy=[r]),i.map((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)?o:e})),C(i),N.mutate(i)}},N=n.useMutation({mutationKey:["fetchHistoricalQueryGraphs",M],mutationFn:function(e){return uV.fetchGraphs(M,e,u)},onSuccess:function(e){b(e)},onError:function(e){console.error("Failed to fetch Query graphs",e)}}),L=null===(s=null===(a=null===(o=null==N?void 0:N.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error;t.useEffect((function(){var e,t=Iu(!0,!1,0,g(),null,F(F({},h),{type:null!==(e=h.type)&&void 0!==e?e:null}));t&&C(t),t&&N.mutate(t)}),[l,f,I,E,A,D,O,k]);var P=function(e,t){y.current[t]=e};return t.useEffect((function(){y.current=[]}),[l]),t.useEffect((function(){return N.isSuccess&&_&&_.length>0&&y.current.length===_.length&&aI(y.current),function(){sI(y.current)}}),[N.isSuccess,_]),e.jsxs(r.Box,F({mt:3,mr:3},{children:[N.isLoading&&e.jsx(r.Box,F({mt:2,className:v.loadingBox},{children:e.jsx(dV,{className:Y(v.icon,v.inProgressIcon)})})),N.isError&&e.jsxs(r.Box,F({mt:4},{children:[(d===exports.AppName.YBA||d===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(L)?L:Xl.QUERIES_GRAPHS_FETCH_ERROR}),d===exports.AppName.YBM&&e.jsx(kr,{text:Ja(L)?L:Xl.QUERIES_GRAPHS_FETCH_ERROR})]})),N.isSuccess&&e.jsxs(r.Box,{children:[e.jsx(r.Box,F({className:Y(v.gridBox,v.gridBoxSingle)},{children:null==_?void 0:_.filter((function(e){var t;return null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.startsWith("active_session_history")})).map((function(t,n){var i,o,a=Mu(l,t,exports.GraphType.SINGLE_SUPPORTING,!0,S,!0),s=null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.startsWith("active_session_history"),u=t.name;if(s){var h=t.layout.metadata,g=h.currentGroupBy,v=null===(o=h.supportedGroupBy.find((function(e){return e.label===g[0]})))||void 0===o?void 0:o.name;v&&a.groupByOperations.sort((function(e,t){return e===v?-1:t===v?1:0}))}return e.jsx(r.Box,F({id:"HistoricalQueryView-ash-".concat(l,"-").concat(n)},{children:e.jsx(r.Box,F({style:{border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(DU,{metricData:t,metricKey:u,dateTimeRange:f,containerWidth:null,metricMeasure:l,operations:l===exports.MetricMeasure.OVERALL?[]:a.uniqueOperations,registerChartInstance:function(e){return P(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:a.groupByOperations,appName:d,timezone:p,queryData:c,onSelectAshLabel:R,isHistoricalQueryView:!0,onEChartsDateSelect:m,showTitle:!0},"".concat(l,"-").concat(u))}))}),"HistoricalQueryView-ash-".concat(l,"-").concat(n))}))})),e.jsx(r.Box,F({className:Y(v.gridBox,v.gridBoxThree)},{children:null==_?void 0:_.filter((function(e){var t;return!(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.startsWith("active_session_history"))})).map((function(t,n){var i=Mu(l,t,exports.GraphType.SINGLE_SUPPORTING,!0,S,!0),o=t.name;return e.jsx(r.Box,F({id:"HistoricalQueryView-".concat(l,"-").concat(n)},{children:e.jsx(r.Box,F({style:{border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(DU,{metricData:t,metricKey:o,dateTimeRange:f,containerWidth:null,metricMeasure:l,operations:l===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,registerChartInstance:function(e){return P(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:i.groupByOperations,appName:d,timezone:p,queryData:c,onSelectAshLabel:R,isHistoricalQueryView:!0,onEChartsDateSelect:m,showTitle:!0},"".concat(l,"-").concat(o))}))}),"HistoricalQueryView-".concat(l,"-").concat(n))}))}))]})]}))},hV=function(n){var i=n.sourceData,o=n.expandAll,a=void 0!==o&&o,s=n.showMoreOptions,l=void 0!==s&&s,u=n.onClickShowMoreAnomalies,c=n.onSelectedIssue,d=n.startTime,p=n.name,h=n.endTime,f=n.appName,g=n.showMultiline,m=void 0===g||g,v=n.isInsightsTab,y=void 0!==v&&v;n.currentTab;var _=n.viewAllAnomalies,b=void 0!==_&&_,w=f===exports.AppName.YBM?27:35,S=t.useState({}),C=S[0],T=S[1],M=t.useState({}),E=M[0],I=M[1],A=t.useRef(null),D=t.useRef(null);t.useEffect((function(){if(i){if(l){var e=function(e){for(var t,n={},r=0,i=Object.entries(e.groups);r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=Object.keys(s);for(var l=function(e,r){n[e]=(null===(t=r.groups)||void 0===t?void 0:t.map((function(t,n){return"".concat(e,"_").concat(n)})))||[]},u=0,c=Object.entries(s);u<c.length;u++){var d=c[u];l(d[0],d[1])}}return n}(i),t=function(e){for(var t={},n=0,r=Object.entries(e.groups);n<r.length;n++){var i=r[n],o=i[0],a=i[1];t[o]=!1;for(var s=0,l=Object.keys(a);s<l.length;s++)t[l[s]]=!1}return t}(i);I(e),T(t)}else I({}),T({})}}),[i]),t.useEffect((function(){T((function(e){var t=F({},e);return Object.keys(t).forEach((function(e){t[e]=a})),t}))}),[a]);var k=function(e){var t,n=0;for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))n+=null===(t=e[r])||void 0===t?void 0:t.totalCount}return n},O=function(e){for(var t=0,n=Object.entries(E);t<n.length;t++){var r=n[t],i=r[0];if(r[1].includes(e))return O(i)}return e};function R(){var e,t,n,r,i,o;document.querySelectorAll(".custom-group-separator-left, .custom-group-separator-right, .custom-group-separator-top, .custom-group-separator-bottom").forEach((function(e){return e.remove()}));var a=Array.from(document.querySelectorAll(".vis-labelset .vis-label.custom-group-row-1"));a.forEach((function(e,t){var n,r=function(e){var t=e.nextElementSibling;for(;t&&!t.classList.contains("custom-group-row-1");)t=t.nextElementSibling;return t}(e);if(r){var i=document.createElement("div");i.className="custom-group-separator-left",null===(n=e.parentNode)||void 0===n||n.insertBefore(i,r)}var o=document.querySelector(".vis-foreground");if(o&&null!==e.offsetTop&&t>0){var a=document.createElement("div");a.className="custom-group-separator-right",a.style.top="".concat(e.offsetTop,"px"),a.style.position="absolute",o.appendChild(a)}}));var s=a[0];if(!(null===(e=s.previousElementSibling)||void 0===e?void 0:e.classList.contains("custom-group-separator-top"))){var l=document.createElement("div");l.className="custom-group-separator-top",null===(t=s.parentNode)||void 0===t||t.insertBefore(l,s)}var u=a[a.length-1],c=function(e){var t=e.nextElementSibling;for(;t&&(t.classList.contains("custom-group-row-2")||t.classList.contains("custom-group-row-3"));)t=t.nextElementSibling;return t}(u);if(!(null===(n=null==c?void 0:c.previousElementSibling)||void 0===n?void 0:n.classList.contains("custom-group-separator-bottom"))&&!(null===(r=u.nextElementSibling)||void 0===r?void 0:r.classList.contains("custom-group-separator-bottom"))){var d=document.createElement("div");d.className="custom-group-separator-bottom",c?null===(i=u.parentNode)||void 0===i||i.insertBefore(d,c):null===(o=u.parentNode)||void 0===o||o.appendChild(d)}}return t.useEffect((function(){if((Object.keys(C).length>0||$a(i))&&A.current){var e=l?function(e){for(var t=[],n=[],r=0,i=function(e,i){t.push({id:e,content:"+ ".concat(e),name:e,categoryLevel:1,categoryCount:k(i)});for(var o=function(i,o){var a="".concat(i),s=o.title;t.push({categoryLevel:2,id:a,content:o.totalCount>=1?"&#xff0b;&nbsp;&nbsp;&nbsp;".concat(s):"&#x2212;&nbsp;&nbsp;&nbsp;".concat(s),parent:e,name:s,categoryCount:o.totalCount});var u=[];if(o.groups.forEach((function(e,i){var o,s,l="".concat(a,"_").concat(i),c=(null===(o=e.lastInstance)||void 0===o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:l,name:c,content:c,parent:a,uuid:null===(s=null==e?void 0:e.lastInstance)||void 0===s?void 0:s.uuid,categoryLevel:3}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:l})})),u.push.apply(u,e.anomalyIntervals)})),o.hasMore&&l){var c="".concat(a,"_").concat(Sl),d=Sl;t.push({id:c,name:d,content:Cl,parent:a,categoryLevel:3,grandParent:e,categoryCount:o.totalCount-3}),n.push({id:"anomaly-".concat(a,"-").concat(Sl),content:"anomaly-".concat(a,"-").concat(Sl),start:"",end:"",group:a})}Du(u).forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))},a=0,s=Object.entries(i);a<s.length;a++){var u=s[a];o(u[0],u[1])}var c=Object.values(i).flatMap((function(e){return e.groups.flatMap((function(e){return e.anomalyIntervals}))}));Du(c).forEach((function(t){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:t.startTime,end:t.endTime,group:e})}))},o=0,a=Object.entries(null==e?void 0:e.groups);o<a.length;o++){var s=a[o];i(s[0],s[1])}return{groups:t,items:n}}(i):function(e){var t=[],n=[],r=0;return null==e||e.forEach((function(e,i){var o=e.lastInstance,a="group-".concat(i),s=(null==o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:a,content:s,name:s,uuid:null==o?void 0:o.uuid,categoryLevel:1}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))})),{groups:t,items:n}}(i),t=e.items,n=e.groups,r={items:t,groups:n},o=n;if(l){var a=n.map((function(e){var t,n,r=(null===(t=E[e.id])||void 0===t?void 0:t.length)>0,i=null!==(n=C[e.id])&&void 0!==n&&n,o=r?i?"&#x2212;":"&#xff0b;":"",a=void 0!==(null==e?void 0:e.categoryCount)&&e.categoryCount>=0,s="",l=O(e.id);3===e.categoryLevel&&e.name===Sl&&(l=e.grandParent),1===e.categoryLevel?s="font-family: Inter;font-size: 13px; font-weight: 400 !important;":2===e.categoryLevel?s="font-family: Inter;font-size: 11.5px; font-weight: 600 !important;":3===e.categoryLevel&&(s="font-family: Inter;font-size: 11px; font-weight: 400 !important;");var u=0;2===e.categoryLevel?u=40:3===e.categoryLevel&&(u=44);var c="margin-left: ".concat(u,"px;"),d=r||3!==e.categoryLevel?"":"border-left: 2px solid #E9EEF2; height: 100%;",p="".concat(c).concat(d).concat("color: #0B1117 !important;").concat(s),h="",f="";if(l)switch(l){case exports.AnomalyCategory.DB:h="db-background",f="Database";break;case exports.AnomalyCategory.NODE:h="node-background",f="Node";break;case exports.AnomalyCategory.SQL:h="sql-background",f="SQL";break;case exports.AnomalyCategory.APP:h="app-background",f="Application";break;case exports.AnomalyCategory.INFRA:h="infra-background",f="Infrastructure"}var g="";1===e.categoryLevel?g="custom-group-row-1":2===e.categoryLevel?g="custom-group-row-2":3===e.categoryLevel&&(g="custom-group-row-3");var m=e.content.replace(/&nbsp;/g,"").length>w?"".concat(e.content.substring(0,w),"..."):e.content;return F(F({},e),{content:r?'<a title="'.concat(e.name,'">').concat(o,"&nbsp;&nbsp;&nbsp;").concat((null==e?void 0:e.name)&&e.name.length>w?1===e.categoryLevel?f:"".concat(e.name.substring(0,w),"..."):1===e.categoryLevel?f:e.name,"</a>").concat(1!==e.categoryLevel&&2!==e.categoryLevel||i?"":"<span>".concat(e.categoryCount,"</span>")):'<a title="'.concat(e.content,'">').concat(o).concat(m,"</a>").concat(a?"<span>".concat(3===e.categoryCount?"&#xff0b;":"").concat(e.categoryCount,"</span>"):""),className:[g,h].filter(Boolean).join(" "),style:p,visible:!e.parent||C[e.parent]})})),s=a.filter((function(e){return e.visible}));Object.entries(E).forEach((function(e){var t=e[0];e[1].forEach((function(e){var n=a.find((function(t){return t.id===e}));n&&(n.visible=C[t])}))}));var g=t.filter((function(e){var t,n=a.find((function(t){return t.id===e.group}));if(n&&n.visible){var r=(null===(t=E[n.id])||void 0===t?void 0:t.length)>0,i=C[n.id];return!r||!i}return!1}));r={items:S=g.map((function(e){var t=a.find((function(t){return t.id===e.group})),n=t?O(t.id):null,r="#CCCCCC";if(n)switch(n){case exports.AnomalyCategory.DB:r=Zl[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=Zl[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=Zl[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=Zl[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=Zl[exports.AnomalyCategory.INFRA]}return F(F({},e),{style:"background-color: ".concat(r,"; height: 8px;")})})),groups:s}}else{var v="custom-group-row",_=n.map((function(e){return F(F({},e),{content:m?'<a title="'.concat(e.content,'"> ').concat(e.content.length>w?"".concat(e.content.substring(0,w),"..."):e.content,"</a>"):"",style:"font-family: Inter; margin-left: 12px; font-size: 13px; font-weight: 400; border-bottom: 1px solid #D7DEE4",className:[v].filter(Boolean).join(" ")})})),S=t.map((function(e){var t,n,r="#CCCCCC",o=null===(n=null===(t=null==i?void 0:i[0])||void 0===t?void 0:t.lastInstance)||void 0===n?void 0:n.category;if(o)switch(o){case exports.AnomalyCategory.DB:r=Zl[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=Zl[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=Zl[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=Zl[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=Zl[exports.AnomalyCategory.INFRA]}return F(F({},e),{style:"background-color: ".concat(r,"; height: 8px")})}));r={items:S,groups:_}}if(D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current.setOptions(M),D.current.setItems(r.items),D.current.setGroups(r.groups),l&&!y&&R()}else{var M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new x.Timeline(A.current,r.items,r.groups,M)}D.current.on("changed",(function(){if(b){document.querySelectorAll(".vis-label.custom-group-row .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")}))}else{document.querySelectorAll(".vis-label.custom-group-row-1 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-1")})),document.querySelectorAll(".vis-label.custom-group-row-2 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-2")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-3")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")})),document.querySelectorAll(".vis-label.db-background .vis-inner span").forEach((function(e){return e.classList.add("db-inner-background")})),document.querySelectorAll(".vis-label.node-background .vis-inner span").forEach((function(e){return e.classList.add("node-inner-background")})),document.querySelectorAll(".vis-label.sql-background .vis-inner span").forEach((function(e){return e.classList.add("sql-inner-background")})),document.querySelectorAll(".vis-label.app-background .vis-inner span").forEach((function(e){return e.classList.add("app-inner-background")})),document.querySelectorAll(".vis-label.infra-background .vis-inner span").forEach((function(e){return e.classList.add("infra-inner-background")})),l&&!y&&R();var e=document.querySelector(".vis-panel.vis-center");if(e){var t=p===Vl?"my-custom-center-panel-rca":"my-custom-center-panel";e.classList.add(t)}var n=document.querySelector(".vis-labelset");if(n){t=p===Vl?"my-custom-labelset-rca":"my-custom-labelset";n.classList.add(t)}}})),null==D||D.current.on("click",(function(e){var t=window.scrollY;setTimeout((function(){return window.scrollTo(0,t)}),0);var n,r,i,a=e.group,s="",l=null;a&&(l=o.find((function(e){return e.id===a})))&&"string"==typeof l.content&&(s=l.id),(null==l?void 0:l.uuid)&&(f===exports.AppName.YBM?(n=l.uuid,r=new URLSearchParams(window.location.search),(i={}).duration=r.get("duration"),i.startTime=r.get("startTime"),i.endTime=r.get("endTime"),null==c||c(n,i)):f!==exports.AppName.WEB&&f!==exports.AppName.YBA||function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search),r=n.toString();f===exports.AppName.YBA&&n.set("anomalyUuid",e);var i="".concat(t,"/").concat(e).concat(r?"?".concat(r):"");window.open(i,"_blank")}(l.uuid)),(null==l?void 0:l.name)===Sl&&(null==u||u(l.parent)),s&&function(e){T((function(t){var n=F({},t),r=!n[e];if(n[e]=r,!r){var i=function(e){Object.keys(n).forEach((function(t){var r;(null===(r=E[e])||void 0===r?void 0:r.includes(t))&&(n[t]=!1,i(t))}))};i(e)}return n}))}(s)}))}else if(Xa(i)&&A.current&&!D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new x.Timeline(A.current,[],[],M),D.current.setOptions(M),D.current.setItems([]),D.current.setGroups([])}return function(){D.current&&(D.current.destroy(),D.current=null)}}),[C,i]),e.jsxs(r.Box,F({id:p},{children:[e.jsx("div",{ref:A,style:{backgroundColor:"#FFFFFF"}},p),e.jsx("style",{children:"\n .vis-foreground .vis-group {\n border-bottom: none;\n }\n .vis-foreground .vis-group.custom-group-row-1 {\n top: 8px;\n }\n .vis-foreground .vis-group.parent-category {\n border-top: 1px solid #E0E0E0 !important; /* Or whatever you want */\n }\n .vis-labelset .vis-label {\n border-right: 0px solid #ccc !important;\n border-bottom: none;\n border-top: none;\n }\n .vis-timeline {\n background-color: #FFFFFF !important;\n border: 0px solid #ccc !important;\n visibility: visible !important;\n }\n .vis-panel.vis-top {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-bottom {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-left {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-inner a {\n cursor: pointer;\n letter-spacing: 0.3px;\n text-decoration: none !important;\n outline: none !important;\n color: unset !important;\n &:focus {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n &:hover {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n }\n .vis-labelset .vis-label .vis-inner {\n padding: 0px;\n }\n .vis-inner span {\n padding: 2px 6px 2px 6px;\n height: 20px;\n width: fit-content;\n font-size: 11.5px;\n line-height: 16px;\n font-family: Inter;\n font-weight: 500;\n border-radius: 4px;\n }\n .vis-item.vis-range .vis-item-content {\n display: none;\n }\n .vis-item.vis-range {\n top: 10px !important;\n border-style: unset;\n border-radius: 8px;\n }\n .vis-labelset.my-custom-labelset-rca {\n width: 0px;\n }\n .vis-labelset {\n width: 250px;\n }\n .vis-inner {\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n }\n .vis-time-axis .vis-grid.vis-vertical {\n border-left: 1px dashed !important;\n color: #D7DEE4;\n }\n .vis-panel.vis-center {\n border-left-style: dashed !important;\n border-right-style: dashed !important;\n border-top-color: #D7DEE4;\n top: 1px !important;\n margin-left: 8px;\n left: 254px !important;\n }\n .vis-panel.vis-center.my-custom-center-panel-rca {\n left: 0px !important;\n }\n .vis-time-axis .vis-grid.vis-major {\n border-color: #e5e5e5 !important;\n }\n .custom-group-separator-left {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n margin-top: 2px;\n }\n .custom-group-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n }\n .custom-group-separator-bottom {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .custom-group-separator-top {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .item-separator {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n margin-top: 2px;\n }\n .item-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n }\n .vis-label.custom-group-row-1 .vis-inner {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .vis-label.custom-group-row-2 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row-3 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-foreground .vis-group.custom-group-row {\n border-bottom: 1px solid #D7DEE4;\n bottom: 3px;\n }\n .vis-label.custom-group-row .vis-inner .category-deeplink {\n text-decoration: underline !important;\n }\n .vis-label.custom-group-row-2 .vis-inner .category-badge-2 {\n margin-right: 40px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-badge-3 {\n margin-right: 44px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-deeplink {\n margin-left: 24px;\n text-decoration: underline !important;\n }\n .vis-label.db-background .vis-inner .db-inner-background {\n background-color: #E8E9FE !important;\n color: #30307F !important;\n }\n .vis-label.node-background .vis-inner .node-inner-background {\n background-color: #FFEEC8 !important;\n color: #9D6C00 !important;\n }\n .vis-label.sql-background .vis-inner .sql-inner-background {\n background-color: rgba(187, 66, 188, 0.15) !important;\n color: #7D2777 !important;\n }\n .vis-label.app-background .vis-inner .app-inner-background {\n background-color: #D7EFF4 !important;\n color: #2B59C3 !important;\n }\n .vis-label.infra-background .vis-inner .infra-inner-background {\n background-color: #c1ccec !important;\n color: #507ce1 !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n "})]}),p)},fV=function(i){var o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,C,T,M,E,I,A,D=i.metricMeasure,k=i.appName,O=i.timezone,R=i.universeQueryData,N=i.amomalyGraphRequestParams,L=i.formattedAnomalyRca,P=i.anomalyData,B=i.gantChartData,j=i.dateTimeRange,U=i.urlParams,z=i.apiUrl,H=i.getClusterDetails,V=i.onEChartsDateSelect,W=i.onSelectedIssue,G=t.useRef([]),q=Kl(),Q=t.useState(!1);Q[0],Q[1];var Z=t.useState(0),X=Z[0],$=Z[1],K=t.useState(P),J=K[0],ee=K[1],te=t.useState(null),ne=te[0],re=te[1],ie=t.useState(N),oe=ie[0],ae=ie[1],se=H(),le=se.universeUuid,ue=se.cluster,ce=se.region,de=se.zone,pe=se.node,he=se.numNodes,fe=se.outlierType,ge=MU(D),me=function(e,t,n){var r,i,o=vl.WAIT_EVENT_COMPONENT;if("Class"===e?o=vl.WAIT_EVENT_CLASS:"Type"===e?o=vl.WAIT_EVENT_TYPE:"Event"===e?o=vl.WAIT_EVENT:"Query"===e?o=vl.QUERY:"Client IP"===e&&(o=vl.CLIENT_NODE_IP),(null===(r=null==P?void 0:P.lastInstance)||void 0===r?void 0:r.category)&&(null===(i=null==P?void 0:P.lastInstance)||void 0===i?void 0:i.category)!==exports.AnomalyCategory.DB){var a=JSON.parse(JSON.stringify(oe)),s=null==a?void 0:a.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}));s&&(s.groupBy=[o]),a.map((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)?s:e})),ae(a),ve.mutate(a)}};t.useEffect((function(){ee(P)}),[P]),t.useEffect((function(){var e;ge&&ge!==D&&re(null);var t=JSON.parse(JSON.stringify(oe)),n=H(),r=Iu(!1,!1,0,n,t,F(F({},U),{type:null!==(e=U.type)&&void 0!==e?e:null})),i=null!=r?r:oe;ae(i),ve.mutate(i)}),[D,j,ce,ue,de,pe,fe,he]);var ve=n.useMutation({mutationKey:["fetchAnomalyGraphs"],mutationFn:function(e){return uV.fetchGraphs(le,e,z)},onSuccess:function(e){re(e)},onError:function(e){console.error("Failed to fetch RCA graphs",e)}}),ye=null===(s=null===(a=null===(o=null==ve?void 0:ve.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,xe=function(t,n,i,o,a,s){return e.jsx(r.Box,F({mt:3,mr:8},{children:e.jsx(DU,{metricData:t,metricKey:t.name,graphTitle:s,containerWidth:null,dateTimeRange:j,metricMeasure:D,operations:n,groupByOperations:i,registerChartInstance:function(e){return be(e,a)},appName:k,graphType:o,timezone:O,queryData:R,onSelectAshLabel:me,onEChartsDateSelect:V},"".concat(D,"-").concat(t.name))}))},_e=null==L?void 0:L.filter((function(e){var t;return(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.length)>0}));t.useEffect((function(){G.current=[]}),[D]);var be=function(e,t){G.current[t]=e};return t.useEffect((function(){return ve.isSuccess&&ne&&ne.length>0&&aI(G.current),function(){sI(G.current)}}),[ve.isSuccess,ne,X]),e.jsx(r.Box,{children:e.jsx(Ts,{bodyClassName:q.panelItemBody,body:e.jsxs(e.Fragment,{children:[ve.isLoading&&e.jsx(r.Box,F({mt:2,className:q.loadingBox},{children:e.jsx(dV,{className:Y(q.icon,q.inProgressIcon)})})),ve.isError&&e.jsxs(r.Box,F({mt:4},{children:[(k===exports.AppName.YBA||k===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(ye)?ye:Xl.RCA_GRAPHS_FETCH_ERROR}),k===exports.AppName.YBM&&e.jsx(kr,{text:Ja(ye)?ye:Xl.RCA_GRAPHS_FETCH_ERROR})]})),ve.isSuccess&&e.jsxs(r.Box,{children:[$a(ne)&&$a(null===(l=null==P?void 0:P.lastInstance)||void 0===l?void 0:l.mainGraphs)&&(null===(u=null==P?void 0:P.lastInstance)||void 0===u?void 0:u.mainGraphs.map((function(t,n){var i,o,a,s=null==ne?void 0:ne.find((function(e){return e.name===t.name})),l=t.groupByControl,u=D===exports.MetricMeasure.OVERALL?{uniqueOperations:[],groupByOperations:[]}:Mu(D,s,exports.GraphType.MAIN_RCA,l,N);return e.jsxs(r.Box,F({className:q.mainGraphBox},{children:[e.jsx(r.Box,F({className:q.mainGraphMetadataBox},{children:e.jsxs(r.Box,F({className:q.anomalyMetadataOneBox},{children:[e.jsx("span",F({className:q.headerTitle},{children:Ll})),e.jsx("span",F({className:q.metadataDetails},{children:null===(i=null==P?void 0:P.lastInstance)||void 0===i?void 0:i.title})),e.jsx("span",F({className:Y(q.regularMetadata,(null===(o=null==P?void 0:P.lastInstance)||void 0===o?void 0:o.category)===exports.AnomalyCategory.SQL&&q.restrictLines)},{children:null===(a=null==P?void 0:P.lastInstance)||void 0===a?void 0:a.summary}))]}))})),e.jsx(r.Box,F({mt:1,className:q.boxContainer},{children:xe(s,u.uniqueOperations,u.groupByOperations,exports.GraphType.MAIN_RCA,n+10)}))]}))}))),e.jsxs(r.Box,F({mt:2,mb:1},{children:[B.isLoading&&e.jsx(r.Box,F({mt:2,className:q.loadingBox},{children:e.jsx(dV,{className:Y(q.icon,q.inProgressIcon)})})),B.isError&&404!==(null===(d=null===(c=null==B?void 0:B.error)||void 0===c?void 0:c.response)||void 0===d?void 0:d.status)&&e.jsxs(r.Box,F({mt:2},{children:[(k===exports.AppName.WEB||k===exports.AppName.YBA)&&e.jsx(wt,{customErrorMessage:Ja(null===(f=null===(h=null===(p=null==B?void 0:B.error)||void 0===p?void 0:p.response)||void 0===h?void 0:h.data)||void 0===f?void 0:f.error)?null===(v=null===(m=null===(g=null==B?void 0:B.error)||void 0===g?void 0:g.response)||void 0===m?void 0:m.data)||void 0===v?void 0:v.error:Xl.GANTCHART_FETCH_ERROR}),k===exports.AppName.YBM&&e.jsx(kr,{text:Ja(null===(_=null===(x=null===(y=null==B?void 0:B.error)||void 0===y?void 0:y.response)||void 0===x?void 0:x.data)||void 0===_?void 0:_.error)?null===(S=null===(w=null===(b=null==B?void 0:B.error)||void 0===b?void 0:b.response)||void 0===w?void 0:w.data)||void 0===S?void 0:S.error:Xl.GANTCHART_FETCH_ERROR})]})),(B.isSuccess||B.isError&&404===(null===(T=null===(C=null==B?void 0:B.error)||void 0===C?void 0:C.response)||void 0===T?void 0:T.status))&&(Ka(J)?e.jsx(r.Box,F({className:q.rcaGantChartBox},{children:e.jsx(hV,{sourceData:B.isError&&404===(null===(E=null===(M=null==B?void 0:B.error)||void 0===M?void 0:M.response)||void 0===E?void 0:E.status)?[]:[J],name:Vl,showMoreOptions:!1,expandAll:!0,startTime:null===(I=null==j?void 0:j.startDateTime)||void 0===I?void 0:I.toISOString(),endTime:null===(A=null==j?void 0:j.endDateTime)||void 0===A?void 0:A.toISOString(),onSelectedIssue:W,appName:k,showMultiline:!1},Vl)})):e.jsxs(r.Box,F({mt:2},{children:[(k===exports.AppName.WEB||k===exports.AppName.YBA)&&e.jsx("span",{children:"Failed to fetch anomaly data, please try again."}),k===exports.AppName.YBM&&e.jsx(kr,{text:"Failed to fetch anomaly data, please try again."})]})))]})),$a(ne)&&$a(_e)&&e.jsxs(r.Box,F({className:q.causesBox},{children:[e.jsx(r.Tabs,F({value:X,onChange:function(e,t){var n=window.scrollY;$(t),setTimeout((function(){return window.scrollTo(0,n)}),0)},"aria-label":"anomaly causes tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto"},{children:null==_e?void 0:_e.map((function(t,n){return e.jsx(r.Tab,{component:"div",label:t.cause,classes:{root:Y(q.causeTabButton),wrapper:q.causeTabLabelWrapper}},n)}))})),null==_e?void 0:_e.map((function(t,n){var i,o;return e.jsx(r.Box,F({role:"tabpanel",hidden:X!==n,id:"tabpanel-".concat(n),"aria-labelledby":"tab-".concat(n)},{children:X===n&&e.jsxs(r.Box,F({mt:2,display:"flex",flexDirection:"column"},{children:[e.jsx("span",F({className:q.causeText},{children:t.cause})),e.jsxs(r.Box,{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e",alt:"path"}),e.jsx("span",F({className:q.descriptionText},{children:t.description}))]}),e.jsx(r.Box,F({mt:2,className:(null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.length)>1?Y(q.gridBox,q.gridBoxDouble):""},{children:null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.map((function(i,o){var a,s,l,u=null==ne?void 0:ne.find((function(e,n){return n>0&&(null==e?void 0:e.name)===i&&t.index.includes(n)})),c=1===(null===(a=null==t?void 0:t.name)||void 0===a?void 0:a.length),d=null===(s=t.groupByControl)||void 0===s?void 0:s[0];if(Ja(null!==(l=null==u?void 0:u.errorMessage)&&void 0!==l?l:""))return e.jsx(r.Box,{});var p=Mu(D,u,exports.GraphType.MULTI_SUPPORTING,d,N);return e.jsx(r.Box,F({style:{border:"1px solid #E9EEF2",borderRadius:"8px",marginRight:c?"0px":"16px"}},{children:xe(u,p.uniqueOperations,p.groupByOperations,c?exports.GraphType.SINGLE_SUPPORTING:exports.GraphType.MULTI_SUPPORTING,n+o,t.title)}))}))}))]}))}),n)}))]}))]})]})})})},gV=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}},mV=Z(gV),vV=Object.getOwnPropertySymbols,yV=Object.prototype.hasOwnProperty,xV=Object.prototype.propertyIsEnumerable;var _V=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))yV.call(n,a)&&(i[a]=n[a]);if(vV){r=vV(n);for(var s=0;s<r.length;s++)xV.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},bV=_V,wV={};function SV(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}var CV="mixins";var TV=function(e,t,n){var r=[],i={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},o={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},a={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)l(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=bV({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=bV({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=c(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=bV({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(SV(!(n in a),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return SV("DEFINE_MANY_MERGED"===(o.hasOwnProperty(n)?o[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=c(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function s(e,t){var n=i.hasOwnProperty(t)?i[t]:null;g.hasOwnProperty(t)&&SV("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&SV("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function l(e,n){if(n){SV("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),SV(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,o=r.__reactAutoBindPairs;for(var l in n.hasOwnProperty(CV)&&a.mixins(e,n.mixins),n)if(n.hasOwnProperty(l)&&l!==CV){var u=n[l],p=r.hasOwnProperty(l);if(s(p,l),a.hasOwnProperty(l))a[l](e,u);else{var h=i.hasOwnProperty(l);if("function"==typeof u&&!h&&!p&&!1!==n.autobind)o.push(l,u),r[l]=u;else if(p){var f=i[l];SV(h&&("DEFINE_MANY_MERGED"===f||"DEFINE_MANY"===f),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,l),"DEFINE_MANY_MERGED"===f?r[l]=c(r[l],u):"DEFINE_MANY"===f&&(r[l]=d(r[l],u))}else r[l]=u}}}}function u(e,t){for(var n in SV(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(SV(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function c(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return u(i,n),u(i,r),i}}function d(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function p(e,t){return t.bind(e)}var h={componentDidMount:function(){this.__isMounted=!0}},f={componentWillUnmount:function(){this.__isMounted=!1}},g={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},m=function(){};return bV(m.prototype,e.prototype,g),function(e){var t=function(e,r,i){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=p(e,i)}}(this),this.props=e,this.context=r,this.refs=wV,this.updater=i||n,this.state=null;var o=this.getInitialState?this.getInitialState():null;SV("object"==typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=o};for(var o in t.prototype=new m,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],r.forEach(l.bind(null,t)),l(t,h),l(t,e),l(t,f),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),SV(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),i)t.prototype[o]||(t.prototype[o]=null);return t}},MV=C.default,EV=TV;if(void 0===MV)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var IV,AV,DV,kV,OV=(new MV.Component).updater,RV=Z(EV(MV.Component,MV.isValidElement,OV)),NV={exports:{}};NV.exports=function(){if(kV)return DV;kV=1;var e=AV?IV:(AV=1,IV="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,DV=function(){function r(t,n,r,i,o,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();var LV=NV.exports,PV=Z(LV),BV=function(){};function jV(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var FV=Object.create(null);function UV(e){return FV[e]||(FV[e]=function(e){for(var t="",n=[],r=[],i=void 0,o=0,a=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g;i=a.exec(e);)i.index!==o&&(r.push(e.slice(o,i.index)),t+=jV(e.slice(o,i.index))),i[1]?(t+="([^/]+)",n.push(i[1])):"**"===i[0]?(t+="(.*)",n.push("splat")):"*"===i[0]?(t+="(.*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]?t+=")?":"\\("===i[0]?t+="\\(":"\\)"===i[0]&&(t+="\\)"),r.push(i[0]),o=a.lastIndex;return o!==e.length&&(r.push(e.slice(o,e.length)),t+=jV(e.slice(o,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}(e)),FV[e]}function zV(e,t){"/"!==e.charAt(0)&&(e="/"+e);var n=UV(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;"/"!==e.charAt(e.length-1)&&(r+="/?"),"*"===o[o.length-1]&&(r+="$");var a=t.match(new RegExp("^"+r,"i"));if(null==a)return null;var s=a[0],l=t.substr(s.length);if(l){if("/"!==s.charAt(s.length-1))return null;l="/"+l}return{remainingPathname:l,paramNames:i,paramValues:a.slice(1).map((function(e){return e&&decodeURIComponent(e)}))}}function HV(e){return UV(e).paramNames}function VV(e,t){t=t||{};for(var n=UV(e).tokens,r=0,i="",o=0,a=[],s=void 0,l=void 0,u=0,c=n.length;u<c;++u)if("*"===(s=n[u])||"**"===s)null!=(l=Array.isArray(t.splat)?t.splat[o++]:t.splat)||r>0||mV(!1),null!=l&&(i+=encodeURI(l));else if("("===s)a[r]="",r+=1;else if(")"===s){var d=a.pop();(r-=1)?a[r-1]+=d:i+=d}else if("\\("===s)i+="(";else if("\\)"===s)i+=")";else if(":"===s.charAt(0))if(null!=(l=t[s.substring(1)])||r>0||mV(!1),null==l){if(r){a[r-1]="";for(var p=n.indexOf(s),h=n.slice(p,n.length),f=-1,g=0;g<h.length;g++)if(")"==h[g]){f=g;break}f>0||mV(!1),u=p+f-1}}else r?a[r-1]+=encodeURIComponent(l):i+=encodeURIComponent(l);else r?a[r-1]+=s:i+=s;return r<=0||mV(!1),i.replace(/\/+/g,"/")}function WV(e,t){var n=e&&e.routes,r=t.routes,i=void 0,o=void 0,a=void 0;if(n){var s=!1;i=n.filter((function(n){if(s)return!0;var i=-1===r.indexOf(n)||function(e,t,n){return!!e.path&&HV(e.path).some((function(e){return t.params[e]!==n.params[e]}))}(n,e,t);return i&&(s=!0),i})),i.reverse(),a=[],o=[],r.forEach((function(e){var t=-1===n.indexOf(e),r=-1!==i.indexOf(e);t||r?a.push(e):o.push(e)}))}else i=[],o=[],a=r;return{leaveRoutes:i,changeRoutes:o,enterRoutes:a}}function YV(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0;function l(){i=!0,o?s=[].concat(Array.prototype.slice.call(arguments)):n.apply(this,arguments)}!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r<e&&a;)a=!1,t.call(this,r++,u,l);o=!1,i?n.apply(this,s):r>=e&&a&&(i=!0,n())}}()}function GV(e,t,n){var r=e.length,i=[];if(0===r)return n(null,i);var o=!1,a=0;e.forEach((function(e,s){t(e,s,(function(e,t){!function(e,t,s){o||(t?(o=!0,n(t)):(i[e]=s,(o=++a===r)&&n(null,i)))}(s,e,t)}))}))}var qV=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=[],this.add=function(e){return t.hooks.push(e)},this.remove=function(e){return t.hooks=t.hooks.filter((function(t){return t!==e}))},this.has=function(e){return-1!==t.hooks.indexOf(e)},this.clear=function(){return t.hooks=[]}};function QV(){var e=new qV,t=new qV;function n(e,t,n,r){var i=e.length<n,o=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];(e.apply(t,r),i)&&(0,r[r.length-1])()};return r.add(o),o}function r(e,t,n){if(e){var r=void 0;YV(e,(function(e,n,o){t(e,i,(function(e){e||r?o(e,r):n()}))}),n)}else n();function i(e){r=e}}return{runEnterHooks:function(t,i,o){e.clear();var a=function(t){return t.reduce((function(t,r){return r.onEnter&&t.push(n(r.onEnter,r,3,e)),t}),[])}(t);return r(a.length,(function(t,n,r){a[t](i,n,(function(){e.has(a[t])&&(r.apply(void 0,arguments),e.remove(a[t]))}))}),o)},runChangeHooks:function(e,i,o,a){t.clear();var s=function(e){return e.reduce((function(e,r){return r.onChange&&e.push(n(r.onChange,r,4,t)),e}),[])}(e);return r(s.length,(function(e,n,r){s[e](i,o,n,(function(){t.has(s[e])&&(r.apply(void 0,arguments),t.remove(s[e]))}))}),a)},runLeaveHooks:function(e,t){for(var n=0,r=e.length;n<r;++n)e[n].onLeave&&e[n].onLeave.call(e[n],t)}}}var ZV="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};function XV(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return XV(e,t[n])}));if("object"===(void 0===e?"undefined":ZV(e))){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(!XV(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function $V(e,t){return null==t?null==e:null==e||XV(e,t)}function KV(e,t,n,r,i){var o=e.pathname,a=e.query;return null!=n&&("/"!==o.charAt(0)&&(o="/"+o),!!(function(e,t){return"/"!==t.charAt(0)&&(t="/"+t),"/"!==e.charAt(e.length-1)&&(e+="/"),"/"!==t.charAt(t.length-1)&&(t+="/"),t===e}(o,n.pathname)||!t&&function(e,t,n){for(var r=e,i=[],o=[],a=0,s=t.length;a<s;++a){var l=t[a].path||"";if("/"===l.charAt(0)&&(r=e,i=[],o=[]),null!==r&&l){var u=zV(l,r);if(u?(r=u.remainingPathname,i=[].concat(i,u.paramNames),o=[].concat(o,u.paramValues)):r=null,""===r)return i.every((function(e,t){return String(o[t])===String(n[e])}))}}return!1}(o,r,i))&&$V(a,n.query))}function JV(e){return e&&"function"==typeof e.then}function eW(e,t){GV(e.routes,(function(t,n,r){!function(e,t,n){if(t.component||t.components)n(null,t.component||t.components);else{var r=t.getComponent||t.getComponents;if(r){var i=r.call(t,e,n);JV(i)&&i.then((function(e){return n(null,e)}),n)}else n()}}(e,t,r)}),t)}var tW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function nW(e){return null==e||C.default.isValidElement(e)}function rW(e){return nW(e)||Array.isArray(e)&&e.every(nW)}function iW(e){var t,n,r=e.type,i=(t=r.defaultProps,n=e.props,tW({},t,n));if(i.children){var o=oW(i.children,i);o.length&&(i.childRoutes=o),delete i.children}return i}function oW(e,t){var n=[];return C.default.Children.forEach(e,(function(e){if(C.default.isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(iW(e))})),n}function aW(e){return rW(e)?e=oW(e):e&&!Array.isArray(e)&&(e=[e]),e}var sW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function lW(e,t,n,r,i){if(e.childRoutes)return[null,e.childRoutes];if(!e.getChildRoutes)return[];var o=!0,a=void 0,s={location:t,params:cW(n,r)},l=e.getChildRoutes(s,(function(e,t){t=!e&&aW(t),o?a=[e,t]:i(e,t)}));return JV(l)&&l.then((function(e){return i(null,aW(e))}),i),o=!1,a}function uW(e,t,n,r,i){if(e.indexRoute)i(null,e.indexRoute);else if(e.getIndexRoute){var o={location:t,params:cW(n,r)},a=e.getIndexRoute(o,(function(e,t){i(e,!e&&aW(t)[0])}));JV(a)&&a.then((function(e){return i(null,aW(e)[0])}),i)}else if(e.childRoutes||e.getChildRoutes){var s=function(e,o){if(e)i(e);else{var a=o.filter((function(e){return!e.path}));YV(a.length,(function(e,i,o){uW(a[e],t,n,r,(function(t,n){if(t||n){var r=[a[e]].concat(Array.isArray(n)?n:[n]);o(t,r)}else i()}))}),(function(e,t){i(null,t)}))}},l=lW(e,t,n,r,s);l&&s.apply(void 0,l)}else i()}function cW(e,t){return function(e,t,n){return t.reduce((function(e,t,r){var i=n&&n[r];return Array.isArray(e[t])?e[t].push(i):e[t]=t in e?[e[t],i]:i,e}),e)}({},e,t)}function dW(e,t,n,r,i,o){var a=e.path||"";if("/"===a.charAt(0)&&(n=t.pathname,r=[],i=[]),null!==n&&a){try{var s=zV(a,n);s?(n=s.remainingPathname,r=[].concat(r,s.paramNames),i=[].concat(i,s.paramValues)):n=null}catch(e){o(e)}if(""===n){var l={routes:[e],params:cW(r,i)};return void uW(e,t,r,i,(function(e,t){if(e)o(e);else{var n;if(Array.isArray(t))(n=l.routes).push.apply(n,t);else t&&l.routes.push(t);o(null,l)}}))}}if(null!=n||e.childRoutes){var u=function(a,s){a?o(a):s?pW(s,t,(function(t,n){t?o(t):n?(n.routes.unshift(e),o(null,n)):o()}),n,r,i):o()},c=lW(e,t,r,i,u);c&&u.apply(void 0,c)}else o()}function pW(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];void 0===r&&("/"!==t.pathname.charAt(0)&&(t=sW({},t,{pathname:"/"+t.pathname})),r=t.pathname),YV(e.length,(function(n,a,s){dW(e[n],t,r,i,o,(function(e,t){e||t?s(e,t):a()}))}),n)}var hW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function fW(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function gW(e,t,n){if(e[t])return new Error("<"+n+'> should not have a "'+t+'" prop')}LV.shape({listen:LV.func.isRequired,push:LV.func.isRequired,replace:LV.func.isRequired,go:LV.func.isRequired,goBack:LV.func.isRequired,goForward:LV.func.isRequired});var mW,vW=LV.elementType,yW=LV.oneOfType([vW,LV.object]),xW=LV.oneOfType([LV.object,LV.element]),_W=LV.oneOfType([xW,LV.arrayOf(xW)]),bW={exports:{}},wW={};bW.exports=function(){if(mW)return wW;mW=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function _(e){return x(e)===u}return wW.AsyncMode=l,wW.ConcurrentMode=u,wW.ContextConsumer=s,wW.ContextProvider=a,wW.Element=t,wW.ForwardRef=c,wW.Fragment=r,wW.Lazy=f,wW.Memo=h,wW.Portal=n,wW.Profiler=o,wW.StrictMode=i,wW.Suspense=d,wW.isAsyncMode=function(e){return _(e)||x(e)===l},wW.isConcurrentMode=_,wW.isContextConsumer=function(e){return x(e)===s},wW.isContextProvider=function(e){return x(e)===a},wW.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},wW.isForwardRef=function(e){return x(e)===c},wW.isFragment=function(e){return x(e)===r},wW.isLazy=function(e){return x(e)===f},wW.isMemo=function(e){return x(e)===h},wW.isPortal=function(e){return x(e)===n},wW.isProfiler=function(e){return x(e)===o},wW.isStrictMode=function(e){return x(e)===i},wW.isSuspense=function(e){return x(e)===d},wW.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},wW.typeOf=x,wW}();var SW=bW.exports;var CW=PV.shape({subscribe:PV.func.isRequired,eventIndex:PV.number.isRequired});function TW(e){return"@@contextSubscriber/"+e}var MW=void 0!==C.default.forwardRef;var EW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IW="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},AW=RV({displayName:"RouterContext",mixins:[function(e){var t,n,r=TW(e),i=r+"/listeners",o=r+"/eventIndex",a=r+"/subscribe",s=((n={childContextTypes:(t={},t[r]=CW.isRequired,t),getChildContext:function(){var e;return(e={})[r]={eventIndex:this[o],subscribe:this[a]},e},componentWillMount:function(){this[i]=[],this[o]=0},componentWillReceiveProps:function(){this[o]++},componentDidUpdate:function(){var e=this;this[i].forEach((function(t){return t(e[o])}))}})[a]=function(e){var t=this;return this[i].push(e),function(){t[i]=t[i].filter((function(t){return t!==e}))}},n);return MW&&(s.UNSAFE_componentWillMount=s.componentWillMount,s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillMount,delete s.componentWillReceiveProps),s}("router")],propTypes:{router:LV.object.isRequired,location:LV.object.isRequired,routes:LV.array.isRequired,params:LV.object.isRequired,components:LV.array.isRequired,createElement:LV.func.isRequired},getDefaultProps:function(){return{createElement:C.default.createElement}},childContextTypes:{router:LV.object.isRequired},getChildContext:function(){return{router:this.props.router}},createElement:function(e,t){return null==e?null:this.props.createElement(e,t)},render:function(){var e=this,t=this.props,n=t.location,r=t.routes,i=t.params,o=t.components,a=t.router,s=null;return o&&(s=o.reduceRight((function(t,o,s){if(null==o)return t;var l=r[s],u=function(e,t){var n={};return e.path?(HV(e.path).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})),n):n}(l,i),c={location:n,params:i,route:l,router:a,routeParams:u,routes:r};if(rW(t))c.children=t;else if(t)for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(c[d]=t[d]);if("object"===(void 0===o?"undefined":IW(o))&&!SW.isValidElementType(o)){var p={};for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(p[h]=e.createElement(o[h],EW({key:h},c)));return p}return e.createElement(o,c)}),s)),null===s||!1===s||C.default.isValidElement(s)||mV(!1),s}}),DW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function kW(e,t){var n=t.location,r=t.params,i=t.routes;return e.location=n,e.params=r,e.routes=i,e}var OW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var RW={history:LV.object,children:_W,routes:_W,render:LV.func,createElement:LV.func,onError:LV.func,onUpdate:LV.func,matchContext:LV.object},NW=void 0!==C.default.forwardRef,LW=RV({displayName:"Router",propTypes:RW,getDefaultProps:function(){return{render:function(e){return C.default.createElement(AW,e)}}},getInitialState:function(){return{location:null,routes:null,params:null,components:null}},handleError:function(e){if(!this.props.onError)throw e;this.props.onError.call(this,e)},createRouterObject:function(e){var t=this.props.matchContext;return t?t.router:function(e,t,n){return kW(DW({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive}),n)}(this.props.history,this.transitionManager,e)},createTransitionManager:function(){var e=this.props.matchContext;if(e)return e.transitionManager;var t=this.props.history,n=this.props,r=n.routes,i=n.children;return t.getCurrentLocation||mV(!1),function(e,t){var n={},r=QV(),i=r.runEnterHooks,o=r.runChangeHooks,a=r.runLeaveHooks,s=void 0;function l(e,n){s&&s.location===e?u(s,n):pW(t,e,(function(t,r){t?n(t):r?u(hW({},r,{location:e}),n):n()}))}function u(e,t){var r=WV(n,e),s=r.leaveRoutes,l=r.changeRoutes,u=r.enterRoutes;function c(r,i){if(r||i)return d(r,i);eW(e,(function(r,i){r?t(r):t(null,null,n=hW({},e,{components:i}))}))}function d(e,n){e?t(e):t(null,n)}a(s,n),s.filter((function(e){return-1===u.indexOf(e)})).forEach(y),o(l,n,e,(function(t,n){if(t||n)return d(t,n);i(u,e,c)}))}var c=1;function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.__id__||t&&(e.__id__=c++)}var p=Object.create(null);function h(e){return e.map((function(e){return p[d(e)]})).filter((function(e){return e}))}function f(e,r){pW(t,e,(function(t,i){if(null!=i){s=hW({},i,{location:e});for(var o=h(WV(n,s).leaveRoutes),a=void 0,l=0,u=o.length;null==a&&l<u;++l)a=o[l](e);r(a)}else r()}))}function g(){if(n.routes){for(var e=h(n.routes),t=void 0,r=0,i=e.length;"string"!=typeof t&&r<i;++r)t=e[r]();return t}}var m=void 0,v=void 0;function y(e){var t=d(e);t&&(delete p[t],fW(p)||(m&&(m(),m=null),v&&(v(),v=null)))}return{isActive:function(t,r){return KV(t=e.createLocation(t),r,n.location,n.routes,n.params)},match:l,listenBeforeLeavingRoute:function(t,n){var r=!fW(p),i=d(t,!0);return p[i]=n,r&&(m=e.listenBefore(f),e.listenBeforeUnload&&(v=e.listenBeforeUnload(g))),function(){y(t)}},listen:function(t){function r(r){n.location===r?t(null,n):l(r,(function(n,r,i){n?t(n):r?e.replace(r):i&&t(null,i)}))}var i=e.listen(r);return n.location?t(null,n):r(e.getCurrentLocation()),i}}}(t,aW(r||i))},componentWillMount:function(){var e=this;this.transitionManager=this.createTransitionManager(),this.router=this.createRouterObject(this.state),this._unlisten=this.transitionManager.listen((function(t,n){t?e.handleError(t):(kW(e.router,n),e.setState(n,e.props.onUpdate))}))},componentWillReceiveProps:function(e){},componentWillUnmount:function(){this._unlisten&&this._unlisten()},render:function(){var e=this.state,t=e.location,n=e.routes,r=e.params,i=e.components,o=this.props,a=o.createElement,s=o.render,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(o,["createElement","render"]);return null==t?null:(Object.keys(RW).forEach((function(e){return delete l[e]})),s(OW({},l,{router:this.router,location:t,routes:n,params:r,components:i,createElement:a})))}});NW&&(LW.prototype.UNSAFE_componentWillReceiveProps=LW.prototype.componentWillReceiveProps,LW.prototype.UNSAFE_componentWillMount=LW.prototype.componentWillMount,delete LW.prototype.componentWillReceiveProps,delete LW.prototype.componentWillMount);var PW=LV.shape({push:LV.func.isRequired,replace:LV.func.isRequired,go:LV.func.isRequired,goBack:LV.func.isRequired,goForward:LV.func.isRequired,setRouteLeaveHook:LV.func.isRequired,isActive:LV.func.isRequired});LV.shape({pathname:LV.string.isRequired,search:LV.string.isRequired,state:LV.object,action:LV.string.isRequired,key:LV.string});var BW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function jW(e,t){return"function"==typeof e?e(t.location):e}var FW=RV({displayName:"Link",mixins:[function(e){var t,n,r=TW(e),i=r+"/lastRenderedEventIndex",o=r+"/handleContextUpdate",a=r+"/unsubscribe",s=((n={contextTypes:(t={},t[r]=CW,t),getInitialState:function(){var e;return this.context[r]?((e={})[i]=this.context[r].eventIndex,e):{}},componentDidMount:function(){this.context[r]&&(this[a]=this.context[r].subscribe(this[o]))},componentWillReceiveProps:function(){var e;this.context[r]&&this.setState(((e={})[i]=this.context[r].eventIndex,e))},componentWillUnmount:function(){this[a]&&(this[a](),this[a]=null)}})[o]=function(e){var t;e!==this.state[i]&&this.setState(((t={})[i]=e,t))},n);return MW&&(s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillReceiveProps),s}("router")],contextTypes:{router:PW},propTypes:{to:LV.oneOfType([LV.string,LV.object,LV.func]),activeStyle:LV.object,activeClassName:LV.string,onlyActiveOnIndex:LV.bool.isRequired,onClick:LV.func,target:LV.string,innerRef:LV.oneOfType([LV.string,LV.func,LV.shape({current:LV.elementType})])},getDefaultProps:function(){return{onlyActiveOnIndex:!1,style:{}}},handleClick:function(e){if(this.props.onClick&&this.props.onClick(e),!e.defaultPrevented){var t=this.context.router;t||mV(!1),!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)&&function(e){return 0===e.button}(e)&&(this.props.target||(e.preventDefault(),t.push(jW(this.props.to,t))))}},render:function(){var e=this.props,t=e.to,n=e.activeClassName,r=e.activeStyle,i=e.onlyActiveOnIndex,o=e.innerRef,a=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","activeClassName","activeStyle","onlyActiveOnIndex","innerRef"]),s=this.context.router;if(s){if(!t)return C.default.createElement("a",BW({},a,{ref:o}));var l=jW(t,s);a.href=s.createHref(l),(n||null!=r&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(r))&&s.isActive(l,i)&&(n&&(a.className?a.className+=" "+n:a.className=n),r&&(a.style=BW({},a.style,r)))}return C.default.createElement("a",BW({},a,{onClick:this.handleClick,ref:o}))}}),UW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};RV({displayName:"IndexLink",render:function(){return C.default.createElement(FW,UW({},this.props,{onlyActiveOnIndex:!0}))}});var zW,HW={exports:{}},VW={};HW.exports=function(){if(zW)return VW;zW=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function _(e){return x(e)===u}return VW.AsyncMode=l,VW.ConcurrentMode=u,VW.ContextConsumer=s,VW.ContextProvider=a,VW.Element=t,VW.ForwardRef=c,VW.Fragment=r,VW.Lazy=f,VW.Memo=h,VW.Portal=n,VW.Profiler=o,VW.StrictMode=i,VW.Suspense=d,VW.isAsyncMode=function(e){return _(e)||x(e)===l},VW.isConcurrentMode=_,VW.isContextConsumer=function(e){return x(e)===s},VW.isContextProvider=function(e){return x(e)===a},VW.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},VW.isForwardRef=function(e){return x(e)===c},VW.isFragment=function(e){return x(e)===r},VW.isLazy=function(e){return x(e)===f},VW.isMemo=function(e){return x(e)===h},VW.isPortal=function(e){return x(e)===n},VW.isProfiler=function(e){return x(e)===o},VW.isStrictMode=function(e){return x(e)===i},VW.isSuspense=function(e){return x(e)===d},VW.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},VW.typeOf=x,VW}();var WW=HW.exports,YW={};YW[WW.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},YW[WW.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var GW=RV({displayName:"Redirect",statics:{createRouteFromReactElement:function(e){var t=iW(e);return t.from&&(t.path=t.from),t.onEnter=function(e,n){var r=e.location,i=e.params,o=void 0;if("/"===t.to.charAt(0))o=VV(t.to,i);else if(t.to){var a=e.routes.indexOf(t);o=VV(GW.getRoutePattern(e.routes,a-1).replace(/\/*$/,"/")+t.to,i)}else o=r.pathname;n({pathname:o,query:t.query||r.query,state:t.state||r.state})},t},getRoutePattern:function(e,t){for(var n="",r=t;r>=0;r--){var i=e[r].path||"";if(n=i.replace(/\/*$/,"/")+n,0===i.indexOf("/"))break}return"/"+n}},propTypes:{path:LV.string,from:LV.string,to:LV.string.isRequired,query:LV.object,state:LV.object,onEnter:gW,children:gW},render:function(){mV(!1)}});RV({displayName:"IndexRedirect",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=GW.createRouteFromReactElement(e))}},propTypes:{to:LV.string.isRequired,query:LV.object,state:LV.object,onEnter:gW,children:gW},render:function(){mV(!1)}}),RV({displayName:"IndexRoute",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=iW(e))}},propTypes:{path:gW,component:vW,components:yW,getComponent:LV.func,getComponents:LV.func},render:function(){mV(!1)}}),RV({displayName:"Route",statics:{createRouteFromReactElement:iW},propTypes:{path:LV.string,component:vW,components:yW,getComponent:LV.func,getComponents:LV.func},render:function(){mV(!1)}});var qW={__esModule:!0,PUSH:"PUSH",REPLACE:"REPLACE",POP:"POP"},QW={},ZW=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},XW=_V;function $W(e,t){return t.encode?t.strict?ZW(e):encodeURIComponent(e):e}function KW(e){return Array.isArray(e)?e.sort():"object"==typeof e?KW(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}QW.extract=function(e){return e.split("?")[1]||""},QW.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=XW({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(i),o,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=KW(n):e[t]=n,e}),Object.create(null))):r},QW.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[$W(t,e),"[",r,"]"].join(""):[$W(t,e),"[",$W(r,e),"]=",$W(n,e)].join("")};case"bracket":return function(t,n){return null===n?$W(t,e):[$W(t,e),"[]=",$W(n,e)].join("")};default:return function(t,n){return null===n?$W(t,e):[$W(t,e),"=",$W(n,e)].join("")}}}(t=XW({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return $W(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return $W(r,t)+"="+$W(i,t)})).filter((function(e){return e.length>0})).join("&"):""};var JW,eY={__esModule:!0};!(JW=BV)||JW.__esModule;eY.default=function(e,t,n){var r=e(t,n);e.length<2&&n(r)};var tY={},nY={__esModule:!0};nY.createPath=nY.parsePath=nY.getQueryStringValueFromPath=nY.stripQueryStringValueFromPath=nY.addQueryStringValueToPath=void 0,function(e){e&&e.__esModule}(BV),nY.addQueryStringValueToPath=function(e,t,n){var r=rY(e),i=r.pathname,o=r.search,a=r.hash;return iY({pathname:i,search:o+(-1===o.indexOf("?")?"?":"&")+t+"="+n,hash:a})},nY.stripQueryStringValueFromPath=function(e,t){var n=rY(e),r=n.pathname,i=n.search,o=n.hash;return iY({pathname:r,search:i.replace(new RegExp("([?&])"+t+"=[a-zA-Z0-9]+(&?)"),(function(e,t,n){return"?"===t?t:n})),hash:o})},nY.getQueryStringValueFromPath=function(e,t){var n=rY(e).search.match(new RegExp("[?&]"+t+"=([a-zA-Z0-9]+)"));return n&&n[1]};var rY=nY.parsePath=function(e){var t=function(e){var t=e.match(/^(https?:)?\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}(e),n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substring(i),t=t.substring(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substring(o),t=t.substring(0,o)),""===t&&(t="/"),{pathname:t,search:n,hash:r}},iY=nY.createPath=function(e){if(null==e||"string"==typeof e)return e;var t=e.basename,n=e.pathname,r=e.search,i=e.hash,o=(t||"")+n;return r&&"?"!==r&&(o+=r),i&&(o+=i),o};tY.__esModule=!0,tY.locationsAreEqual=tY.statesAreEqual=tY.createLocation=tY.createQuery=void 0;var oY="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},aY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sY=cY(gV);cY(BV);var lY=nY,uY=qW;function cY(e){return e&&e.__esModule?e:{default:e}}tY.createQuery=function(e){return aY(Object.create(null),e)},tY.createLocation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uY.POP,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r="string"==typeof e?(0,lY.parsePath)(e):e;return{pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:r.state,action:t,key:n}};var dY=function(e){return"[object Date]"===Object.prototype.toString.call(e)},pY=tY.statesAreEqual=function e(t,n){if(t===n)return!0;var r=void 0===t?"undefined":oY(t);if(r!==(void 0===n?"undefined":oY(n)))return!1;if("function"===r&&(0,sY.default)(!1),"object"===r){if(dY(t)&&dY(n)&&(0,sY.default)(!1),!Array.isArray(t)){var i=Object.keys(t),o=Object.keys(n);return i.length===o.length&&i.every((function(r){return e(t[r],n[r])}))}return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}))}return!1};tY.locationsAreEqual=function(e,t){return e.key===t.key&&e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&pY(e.state,t.state)};var hY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fY=QW,gY=function(e){return e&&e.__esModule?e:{default:e}}(eY),mY=tY,vY=nY;var yY=function(e){return(0,fY.stringify)(e).replace(/%20/g,"+")},xY=fY.parse,_Y=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.stringifyQuery,i=t.parseQueryString;"function"!=typeof r&&(r=yY),"function"!=typeof i&&(i=xY);var o=function(e){return e?(null==e.query&&(e.query=i(e.search.substring(1))),e):e},a=function(e,t){if(null==t)return e;var n="string"==typeof e?(0,vY.parsePath)(e):e,i=r(t);return hY({},n,{search:i?"?"+i:""})};return hY({},n,{getCurrentLocation:function(){return o(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,gY.default)(e,o(t),n)}))},listen:function(e){return n.listen((function(t){return e(o(t))}))},push:function(e){return n.push(a(e,e.query))},replace:function(e){return n.replace(a(e,e.query))},createPath:function(e){return n.createPath(a(e,e.query))},createHref:function(e){return n.createHref(a(e,e.query))},createLocation:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];var s=n.createLocation.apply(n,[a(e,e.query)].concat(r));return e.query&&(s.query=(0,mY.createQuery)(e.query)),o(s)}})}},bY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wY=function(e){return e&&e.__esModule?e:{default:e}}(eY),SY=nY;var CY=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.basename,i=function(e){return e?(r&&null==e.basename&&(0===e.pathname.toLowerCase().indexOf(r.toLowerCase())?(e.pathname=e.pathname.substring(r.length),e.basename=r,""===e.pathname&&(e.pathname="/")):e.basename=""),e):e},o=function(e){if(!r)return e;var t="string"==typeof e?(0,SY.parsePath)(e):e,n=t.pathname,i="/"===r.slice(-1)?r:r+"/",o="/"===n.charAt(0)?n.slice(1):n;return bY({},t,{pathname:i+o})};return bY({},n,{getCurrentLocation:function(){return i(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,wY.default)(e,i(t),n)}))},listen:function(e){return n.listen((function(t){return e(i(t))}))},push:function(e){return n.push(o(e))},replace:function(e){return n.replace(o(e))},createPath:function(e){return n.createPath(o(e))},createHref:function(e){return n.createHref(o(e))},createLocation:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return i(n.createLocation.apply(n,[o(e)].concat(r)))}})}},TY={},MY={__esModule:!0,loopAsync:function(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0,l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];i=!0,o?s=t:n.apply(void 0,t)};!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r<e&&a;)a=!1,t(r++,u,l);o=!1,i?n.apply(void 0,s):r>=e&&a&&(i=!0,n())}}()}};TY.__esModule=!0;var EY=MY,IY=nY,AY=function(e){return e&&e.__esModule?e:{default:e}}(eY),DY=qW,kY=tY;function OY(e){return e&&e.__esModule?e:{default:e}}TY.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getCurrentLocation,n=e.getUserConfirmation,r=e.pushLocation,i=e.replaceLocation,o=e.go,a=e.keyLength,s=void 0,l=void 0,u=[],c=[],d=[],p=function(e){var t=l&&l.action===DY.POP?d.indexOf(l.key):s?d.indexOf(s.key):-1;(s=e).action===DY.PUSH?d=[].concat(d.slice(0,t+1),[s.key]):s.action===DY.REPLACE&&(d[t]=s.key),c.forEach((function(e){return e(s)}))},h=function(e){var t,a;s&&(0,kY.locationsAreEqual)(s,e)||l&&(0,kY.locationsAreEqual)(l,e)||(l=e,t=e,a=function(t){if(l===e)if(l=null,t){if(e.action===DY.PUSH){var n=(0,IY.createPath)(s);(0,IY.createPath)(e)===n&&(0,kY.statesAreEqual)(s.state,e.state)&&(e.action=DY.REPLACE)}e.action===DY.POP?p(e):e.action===DY.PUSH?!1!==r(e)&&p(e):e.action===DY.REPLACE&&!1!==i(e)&&p(e)}else if(s&&e.action===DY.POP){var a=d.indexOf(s.key),u=d.indexOf(e.key);-1!==a&&-1!==u&&o(a-u)}},(0,EY.loopAsync)(u.length,(function(e,n,r){(0,AY.default)(u[e],t,(function(e){return null!=e?r(e):n()}))}),(function(e){n&&"string"==typeof e?n(e,(function(e){return a(!1!==e)})):a(!1!==e)})))},f=function(){return Math.random().toString(36).substr(2,a||6)},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f();return(0,kY.createLocation)(e,t,n)};return{getCurrentLocation:t,listenBefore:function(e){return u.push(e),function(){return u=u.filter((function(t){return t!==e}))}},listen:function(e){return c.push(e),function(){return c=c.filter((function(t){return t!==e}))}},transitionTo:h,push:function(e){return h(g(e,DY.PUSH))},replace:function(e){return h(g(e,DY.REPLACE))},go:o,goBack:function(){return o(-1)},goForward:function(){return o(1)},createKey:f,createPath:IY.createPath,createHref:function(e){return(0,IY.createPath)(e)},createLocation:g}},OY(BV),OY(gV),OY(TY);var RY={__esModule:!0};RY.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement);var NY={},LY={__esModule:!0,addEventListener:function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},supportsHistory:function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},supportsGoWithoutReloadUsingHash:function(){return-1===window.navigator.userAgent.indexOf("Firefox")},supportsPopstateOnHashchange:function(){return-1===window.navigator.userAgent.indexOf("Trident")},isExtraneousPopstateEvent:function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},PY={__esModule:!0};PY.readState=PY.saveState=void 0,function(e){e&&e.__esModule}(BV);var BY={QuotaExceededError:!0,QUOTA_EXCEEDED_ERR:!0},jY={SecurityError:!0},FY=function(e){return"@@History/"+e};PY.saveState=function(e,t){if(window.sessionStorage)try{null==t?window.sessionStorage.removeItem(FY(e)):window.sessionStorage.setItem(FY(e),JSON.stringify(t))}catch(e){if(jY[e.name])return;if(BY[e.name]&&0===window.sessionStorage.length)return;throw e}},PY.readState=function(e){var t=void 0;try{t=window.sessionStorage.getItem(FY(e))}catch(e){if(jY[e.name])return}if(t)try{return JSON.parse(t)}catch(e){}},NY.__esModule=!0,NY.go=NY.replaceLocation=NY.pushLocation=NY.startListener=NY.getUserConfirmation=NY.getCurrentLocation=void 0;var UY=tY,zY=LY,HY=PY,VY=nY,WY="popstate",YY="hashchange",GY=RY.canUseDOM&&!(0,zY.supportsPopstateOnHashchange)(),qY=function(e){var t=e&&e.key;return(0,UY.createLocation)({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:t?(0,HY.readState)(t):void 0},void 0,t)},QY=NY.getCurrentLocation=function(){var e=void 0;try{e=window.history.state||{}}catch(t){e={}}return qY(e)};NY.getUserConfirmation=function(e,t){return t(window.confirm(e))},NY.startListener=function(e){var t=function(t){(0,zY.isExtraneousPopstateEvent)(t)||e(qY(t.state))};(0,zY.addEventListener)(window,WY,t);var n=function(){return e(QY())};return GY&&(0,zY.addEventListener)(window,YY,n),function(){(0,zY.removeEventListener)(window,WY,t),GY&&(0,zY.removeEventListener)(window,YY,n)}};var ZY=function(e,t){var n=e.state,r=e.key;void 0!==n&&(0,HY.saveState)(r,n),t({key:r},(0,VY.createPath)(e))};NY.pushLocation=function(e){return ZY(e,(function(e,t){return window.history.pushState(e,null,t)}))},NY.replaceLocation=function(e){return ZY(e,(function(e,t){return window.history.replaceState(e,null,t)}))},NY.go=function(e){e&&window.history.go(e)};var XY={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=NY;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}});var n=tY,r=nY;e.getCurrentLocation=function(){return(0,n.createLocation)(window.location)},e.pushLocation=function(e){return window.location.href=(0,r.createPath)(e),!1},e.replaceLocation=function(e){return window.location.replace((0,r.createPath)(e)),!1}}(XY);var $Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KY=oG(gV),JY=RY,eG=iG(NY),tG=iG(XY),nG=LY,rG=oG(TY);function iG(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function oG(e){return e&&e.__esModule?e:{default:e}}var aG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};JY.canUseDOM||(0,KY.default)(!1);var t=e.forceRefresh||!(0,nG.supportsHistory)()?tG:eG,n=t.getUserConfirmation,r=t.getCurrentLocation,i=t.pushLocation,o=t.replaceLocation,a=t.go,s=(0,rG.default)($Y({getUserConfirmation:n},e,{getCurrentLocation:r,pushLocation:i,replaceLocation:o,go:a})),l=0,u=void 0,c=function(e,t){1==++l&&(u=eG.startListener(s.transitionTo));var n=t?s.listenBefore(e):s.listen(e);return function(){n(),0==--l&&u()}};return $Y({},s,{listenBefore:function(e){return c(e,!0)},listen:function(e){return c(e,!1)}})},sG=!("undefined"==typeof window||!window.document||!window.document.createElement);function lG(e){var t=void 0;return sG&&(t=function(e){return function(t){return _Y(CY(e))(t)}}(e)()),t}lG(aG);var uG={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.startListener=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=NY;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}}),function(e){e&&e.__esModule}(BV);var n=tY,r=LY,i=PY,o=nY;var a="hashchange",s=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},l=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)},u=e.getCurrentLocation=function(e,t){var r=e.decodePath(s()),a=(0,o.getQueryStringValueFromPath)(r,t),l=void 0;a&&(r=(0,o.stripQueryStringValueFromPath)(r,t),l=(0,i.readState)(a));var u=(0,o.parsePath)(r);return u.state=l,(0,n.createLocation)(u,void 0,a)},c=void 0;e.startListener=function(e,t,n){var i=function(){var r=s(),i=t.encodePath(r);if(r!==i)l(i);else{var o=u(t,n);if(c&&o.key&&c.key===o.key)return;c=o,e(o)}},o=s(),d=t.encodePath(o);return o!==d&&l(d),(0,r.addEventListener)(window,a,i),function(){return(0,r.removeEventListener)(window,a,i)}};var d=function(e,t,n,r){var a=e.state,s=e.key,l=t.encodePath((0,o.createPath)(e));void 0!==a&&(l=(0,o.addQueryStringValueToPath)(l,n,s),(0,i.saveState)(s,a)),c=e,r(l)};e.pushLocation=function(e,t,n){return d(e,t,n,(function(e){s()!==e&&function(e){window.location.hash=e}(e)}))},e.replaceLocation=function(e,t,n){return d(e,t,n,(function(e){s()!==e&&l(e)}))}}(uG);var cG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};mG(BV);var dG=mG(gV),pG=RY,hG=LY,fG=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(uG),gG=mG(TY);function mG(e){return e&&e.__esModule?e:{default:e}}var vG=function(e){return"/"===e.charAt(0)?e:"/"+e},yG={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!"+e},decodePath:function(e){return"!"===e.charAt(0)?e.substring(1):e}},noslash:{encodePath:function(e){return"/"===e.charAt(0)?e.substring(1):e},decodePath:vG},slash:{encodePath:vG,decodePath:vG}};lG((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};pG.canUseDOM||(0,dG.default)(!1);var t=e.queryKey,n=e.hashType;"string"!=typeof t&&(t="_k"),null==n&&(n="slash"),n in yG||(n="slash");var r=yG[n],i=fG.getUserConfirmation,o=(0,gG.default)(cG({getUserConfirmation:i},e,{getCurrentLocation:function(){return fG.getCurrentLocation(r,t)},pushLocation:function(e){return fG.pushLocation(e,r,t)},replaceLocation:function(e){return fG.replaceLocation(e,r,t)},go:fG.go})),a=0,s=void 0,l=function(e,n){1==++a&&(s=fG.startListener(o.transitionTo,r,t));var i=n?o.listenBefore(e):o.listen(e);return function(){i(),0==--a&&s()}};(0,hG.supportsGoWithoutReloadUsingHash)();return cG({},o,{listenBefore:function(e){return l(e,!0)},listen:function(e){return l(e,!1)},go:function(e){o.go(e)},createHref:function(e){return"#"+r.encodePath(o.createHref(e))}})}));var xG=function(n){var i,o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,C,T,M,E,I,A,D,k,O,R,N,L=n.appName,P=n.universeData,B=n.anomalyData,j=n.isDrilldownView,U=void 0===j||j,z=n.queryObject,H=n.onSelectedQuery,V=n.onSelectedIssue,W=Kl(),G=_t(),q=t.useState(!0),Z=q[0],X=q[1],$=window.location.pathname.includes("".concat(Xs.INSIGHTS)),K=window.location.href,J=K.substring(0,K.lastIndexOf("/")),ee=new URLSearchParams(window.location.search),te=ee.get("duration"),ne=ee.get("startTime"),re=ee.get("endTime"),ie=ee.get("dbId"),oe=ee.get("userId"),ae=ee.get("universeId"),se=ee.get("type"),le=ee.get("tab"),ue=new URLSearchParams;Ja(te)&&ue.append("duration",te),Ja(ne)&&ue.append("startTime",ne),Ja(re)&&ue.append("endTime",re),Ja(ie)&&ue.delete("dbId",ie),Ja(oe)&&ue.delete("userId",oe),Ja(ae)&&ue.delete("universeId",ae),Ja(se)&&ue.delete("type",se),L===exports.AppName.YBA&&Ja(le)&&ue.append("tab",le),N="".concat(J).concat(ue.toString()?"?".concat(ue.toString()):"");var ce=new URL(window.location.href);if(L===exports.AppName.YBM){["universeId","queryId","dbId","userId"].forEach((function(e){return ce.searchParams.delete(e)}))}var de="HOT_TABLET"===(null===(i=null==B?void 0:B.lastInstance)||void 0===i?void 0:i.type)||"LARGE_TABLET"===(null===(o=null==B?void 0:B.lastInstance)||void 0===o?void 0:o.type),pe=null===(a=null==B?void 0:B.lastInstance)||void 0===a?void 0:a.entityDisplayName,he=null===(s=null==B?void 0:B.lastInstance)||void 0===s?void 0:s.category,fe=(he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP)&&(null===(d=null===(c=null===(u=null===(l=null==P?void 0:P.universeDetails)||void 0===l?void 0:l.nodeDetailsSet)||void 0===u?void 0:u.find((function(e){return e.nodeName===pe})))||void 0===c?void 0:c.cloudInfo)||void 0===d?void 0:d.region),ge=(he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP)&&(null===(g=null===(f=null===(h=null===(p=null==P?void 0:P.universeDetails)||void 0===p?void 0:p.nodeDetailsSet)||void 0===h?void 0:h.find((function(e){return e.nodeName===pe})))||void 0===f?void 0:f.cloudInfo)||void 0===g?void 0:g.az);return e.jsxs(r.Box,{children:[e.jsxs(r.Box,F({display:"flex"},{children:[e.jsx(r.Box,{children:U&&e.jsxs(r.Breadcrumbs,F({className:W.breadCrumb,separator:e.jsx(r.Typography,F({variant:"body2",style:{fontSize:"18px"}},{children:"/"})),"aria-label":"breadcrumb","data-testid":"GenericHeader-Breadcrumb"},{children:[e.jsx(r.Link,F({className:W.breadcrumbColor,component:FW,variant:"h5",onClick:function(){L===exports.AppName.YBM?B?(null==V||V(null),window.history.pushState({},"",window.location.href)):(null==H||H(null),window.history.pushState({},"",ce.toString())):window.location.href=N},to:"#"},{children:e.jsx("span",F({className:W.breadCrumbText},{children:"Cluster Load"}))})),e.jsx(r.Link,F({className:W.breadcrumbColor,component:FW,variant:"h5",onClick:function(){L===exports.AppName.YBM?B?(null==V||V(null),window.history.pushState({},"",window.location.href)):(null==H||H(null),window.history.pushState({},"",ce.toString())):window.location.href=N},to:"#"},{children:B?e.jsx("span",F({className:Y(W.breadCrumbText),style:{color:"capitalize"}},{children:he?"".concat(he.charAt(0).toUpperCase()+he.slice(1).toLowerCase()," ").concat($?"Insights":"Anomalies"," "):"Unknown ".concat($?"Insights":"Anomalies")})):e.jsx("span",F({className:W.breadCrumbText},{children:"Query"}))})),e.jsx(r.Link,F({className:W.breadcrumbDefaultColor,component:"span",variant:"h5"},{children:B?e.jsx("span",F({className:Y(W.breadCrumbText)},{children:(null!==(m=null==pe?void 0:pe.length)&&void 0!==m?m:0)>30?"".concat(null==pe?void 0:pe.substring(0,30),"..."):pe})):e.jsx("span",F({className:Y(W.breadCrumbText)},{children:(null!==(y=null===(v=null==z?void 0:z.query)||void 0===v?void 0:v.length)&&void 0!==y?y:0)>30?"".concat(null===(x=null==z?void 0:z.query)||void 0===x?void 0:x.substring(0,30),"..."):null==z?void 0:z.query}))}))]}))}),e.jsx(r.Box,F({ml:2,style:{marginTop:"-4px"}},{children:!Z&&e.jsx(Q,F({size:"small",variant:"secondary",onClick:function(){return X(!0)},startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.66667 3.66667H1M4.33333 1H1M12.3333 6.33333H1M9.66667 9H1' stroke='%232B59C3' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Maximize Icon"})},{children:"Show Details"}))}))]})),U&&Z&&e.jsx(r.Box,F({className:Y(W.headerMetadataBox,W.boxContainer,W.flexColumn),mt:1},{children:B?e.jsxs(r.Box,F({className:W.flexRow,width:"100%",justifyContent:"space-between"},{children:[e.jsxs(r.Box,F({className:W.flexColumn},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:Ll})),e.jsx(r.Box,F({className:W.anomalyTypeTag},{children:e.jsx("span",F({className:W.anomalyTypeText},{children:wl[null===(_=null==B?void 0:B.lastInstance)||void 0===_?void 0:_.type]}))}))]})),e.jsxs(r.Box,F({className:W.flexColumn},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:null===(w=Al[null===(b=null==B?void 0:B.lastInstance)||void 0===b?void 0:b.type])||void 0===w?void 0:w.title})),e.jsxs(r.Box,{children:[e.jsx("span",F({className:W.regularMetadata},{children:(null===(C=null===(S=null==B?void 0:B.lastInstance)||void 0===S?void 0:S.entityDisplayName)||void 0===C?void 0:C.length)>30?"".concat(null==pe?void 0:pe.substring(0,he===exports.AnomalyCategory.SQL?40:30),"..."):pe})),e.jsx("img",{src:"data:image/svg+xml,%3csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.5 7.001V8.001H7C6.17157 8.001 5.5 8.67257 5.5 9.501V18.501C5.5 19.3294 6.17157 20.001 7 20.001H14C14.8284 20.001 15.5 19.3294 15.5 18.501V17.001H16.5V18.501C16.5 19.8817 15.3807 21.001 14 21.001H7C5.61929 21.001 4.5 19.8817 4.5 18.501V9.501C4.5 8.12029 5.61929 7.001 7 7.001H8.5ZM16.5 4.001H11C10.1716 4.001 9.5 4.67258 9.5 5.501V14.501C9.5 15.3294 10.1716 16.001 11 16.001H18C18.8284 16.001 19.5 15.3294 19.5 14.501V7.001H17C16.7239 7.001 16.5 6.77714 16.5 6.501V4.001ZM20.5 6.52898V14.501C20.5 15.8817 19.3807 17.001 18 17.001H11C9.61929 17.001 8.5 15.8817 8.5 14.501V5.501C8.5 4.12029 9.61929 3.001 11 3.001H16.972C17.1048 2.99258 17.2429 3.03684 17.3536 3.14745L20.3536 6.14745C20.4642 6.25806 20.5084 6.39623 20.5 6.52898ZM17.5 6.001H18.7929L17.5 4.70811V6.001ZM12 13.001C11.7239 13.001 11.5 12.7771 11.5 12.501C11.5 12.2249 11.7239 12.001 12 12.001H14C14.2761 12.001 14.5 12.2249 14.5 12.501C14.5 12.7771 14.2761 13.001 14 13.001H12ZM12 11.001C11.7239 11.001 11.5 10.7771 11.5 10.501C11.5 10.2249 11.7239 10.001 12 10.001H17C17.2761 10.001 17.5 10.2249 17.5 10.501C17.5 10.7771 17.2761 11.001 17 11.001H12ZM12 9.001C11.7239 9.001 11.5 8.77714 11.5 8.501C11.5 8.22486 11.7239 8.001 12 8.001H17C17.2761 8.001 17.5 8.22486 17.5 8.501C17.5 8.77714 17.2761 9.001 17 9.001H12Z' fill='%230B1117'/%3e%3c/svg%3e",alt:"Copy Icon",style:{marginLeft:"4px",cursor:"pointer"},onClick:function(){navigator.clipboard.writeText(pe)}})]})]})),e.jsxs(r.Box,F({className:W.flexColumn},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:he===exports.AnomalyCategory.DB?void 0!==de?de?Nl:Rl:Ol:he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP?Pl:null})),e.jsx(r.Box,{children:e.jsx("span",F({className:W.regularMetadata},{children:he===exports.AnomalyCategory.DB?de?null===(I=null===(E=null===(M=null===(T=null==B?void 0:B.lastInstance)||void 0===T?void 0:T.mainGraphs)||void 0===M?void 0:M[0].filters)||void 0===E?void 0:E.tabletId)||void 0===I?void 0:I[0]:null===(O=null===(k=null===(D=null===(A=null==B?void 0:B.lastInstance)||void 0===A?void 0:A.mainGraphs)||void 0===D?void 0:D[0].filters)||void 0===k?void 0:k.tableName)||void 0===O?void 0:O[0]:he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP?e.jsxs(e.Fragment,{children:[fe,fe&&ge&&" / ",ge]}):null}))})]})),e.jsx(r.Box,{children:e.jsx(Q,F({size:"small",variant:"ghost",onClick:function(){return X(!1)}},{children:e.jsx("span",F({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))})]})):e.jsxs(r.Box,{children:[e.jsxs(r.Box,F({className:W.flexRow,width:"100%"},{children:[e.jsxs(r.Box,F({className:W.flexColumn,alignItems:"flex-start",flex:1},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:Dl})),e.jsx(r.Box,{children:null==z?void 0:z.namespaceName})]})),e.jsxs(r.Box,F({className:W.flexColumn,alignItems:"flex-start",flex:1},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:kl})),e.jsx(r.Box,{children:null==z?void 0:z.queryType})]})),e.jsx(r.Box,F({className:W.flexColumn,alignItems:"flex-start",ml:"auto"},{children:e.jsx(Q,F({size:"small",variant:"ghost",onClick:function(){return X(!1)}},{children:e.jsx("span",F({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))}))]})),e.jsx(r.Box,F({className:W.flexColumn,mt:1},{children:e.jsx(r.Box,F({width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"}},{children:e.jsx(xt,{text:null!==(R=null==z?void 0:z.query)&&void 0!==R?R:"",showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,codeClassName:L===exports.AppName.YBM?G.queryCodeElement:G.queryCodeElementWeb,preClassName:G.queryPreBlockFull,containerClassName:G.queryContainerCode},"TableHelperQueries-query")}))}))]})}))]})},_G=C.default.memo((function(i){var o,a=i.universeUuid,s=i.universeData,l=i.anomalyData,u=i.amomalyGraphRequestParams,c=i.appName,d=i.timezone,p=i.formattedAnomalyRca,h=i.apiUrl,f=i.universeQueryData,g=i.universeQueryStatsData,m=i.isHistoricalQueryView,v=i.troubleshootUuid,y=i.queryIdParam,x=i.onSelectedIssue,_=i.onSelectedQuery,b=Kl(),w=function(e){var t,n,r,i,o,a,s=exports.MetricMeasure.OVERALL;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Ps.NONE&&(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitType)===Ps.NONE&&(s=exports.MetricMeasure.OVERALL),(null===(r=null==e?void 0:e.defaultSettings)||void 0===r?void 0:r.splitMode)!==Ls.TOP&&(null===(i=null==e?void 0:e.defaultSettings)||void 0===i?void 0:i.splitMode)!==Ls.BOTTOM||(s=exports.MetricMeasure.OUTLIER,(null===(o=null==e?void 0:e.defaultSettings)||void 0===o?void 0:o.splitType)===Ps.TABLE?s=exports.MetricMeasure.OUTLIER_TABLES:(null===(a=null==e?void 0:e.defaultSettings)||void 0===a?void 0:a.splitType)===Ps.NAMESPACE&&(s=exports.MetricMeasure.OUTLIER_DB)),s}(l),S=function(e){var t,n,r=Ls.TOP;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Ls.TOP?r=Ls.TOP:(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitMode)===Ls.BOTTOM&&(r=Ls.BOTTOM),r}(l),C=function(e){var t,n,r=3;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitCount)>0&&(r=null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitCount),r}(l),T=new URLSearchParams(window.location.search),M={startTime:T.get("startTime"),endTime:T.get("endTime"),duration:T.get("duration"),dbId:T.get("dbId"),queryId:null!=y?y:void 0,userId:T.get("userId"),type:T.get("type"),universeId:a},E=null==M?void 0:M.endTime,I=E?new Date(E):new Date,A=new Date(I);(null==M?void 0:M.startTime)?A=new Date(null==M?void 0:M.startTime):A.setDate(A.getDate()-1);var D=t.useState($s),k=D[0],O=D[1],R=t.useState(Js),N=R[0],L=R[1],P=t.useState(!0),B=P[0],j=P[1],U=t.useState(Ks),z=U[0],H=U[1],V=t.useState(Ks),W=V[0],Y=V[1],G=t.useState(Ks),q=G[0],Q=G[1],Z=t.useState(Ks),X=Z[0],$=Z[1],K=t.useState(w),J=K[0],ee=K[1],te=t.useState(S),ne=te[0],re=te[1],ie=t.useState(null!==(o=null==M?void 0:M.duration)&&void 0!==o?o:El[0].value),oe=ie[0],ae=ie[1],se=t.useState(C),le=se[0],ue=se[1],ce=t.useState((function(){return Nu(oe,I,A)})),de=ce[0],pe=ce[1],he=t.useState(null),fe=he[0],ge=he[1],me=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsById,a,null==l?void 0:l.groupId,de.startDateTime,de.endDateTime],(function(){return l&&(null==l?void 0:l.groupId)?uV.fetchAnomalyGroupById(a,l.groupId,de.startDateTime.toISOString(),de.endDateTime.toISOString(),h):Promise.reject(new Error("Anomaly data or group ID is missing"))}),{onSuccess:function(e){ge(e)},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!m&&Ja(v)}),ve=function(){var e,t,n=null===(e=de.startDateTime)||void 0===e?void 0:e.toISOString(),r=null===(t=de.endDateTime)||void 0===t?void 0:t.toISOString();return{universeUuid:a,cluster:z,region:W,zone:q,node:X,metricMeasure:J,numNodes:le,outlierType:ne,formattedStartDate:n,formattedEndDate:r}},ye=function(){if(oe!==Ml.CUSTOM){var e=Ru(oe,I),t=e.formattedStartDate,n=e.formattedEndDate;pe({startDateTime:t,endDateTime:n})}};t.useEffect((function(){ye()}),[oe]);var xe=function(e,t){pe({startDateTime:new Date(e),endDateTime:new Date(t)})};t.useEffect((function(){(null==M?void 0:M.duration)&&Ja(M.duration)&&ye()}),[]);var _e=function(e){ee(e)},be=function(e){re(e)},we=function(e){ue(e>10?10:e)},Se=function(e,t,n,r){j(r),n===$s&&(O($s),H(Ks),Y(Ks)),(e||t)&&(O(n),e&&(H(n),Y("")),t&&(Y(n),H("")))},Ce=function(e,t,n){n===Js&&(L(Js),Q(Ks),$(Ks)),(e||t)&&(L(n),e&&(Q(n),$("")),t&&(Q(""),$(n)))},Te=null==M?void 0:M.queryId,Me=m?Te:null==Te?void 0:Te[0],Ee=null==g?void 0:g.find((function(e){return e.queryId===Me}));return e.jsxs(r.Box,F({style:{height:"100vh",display:"flex",flexDirection:"column"}},{children:[e.jsx(xG,{appName:c,universeData:s,queryObject:Ee,anomalyData:Ka(fe)?fe:null,onSelectedIssue:Ka(l)?x:void 0,onSelectedQuery:_}),e.jsx(r.Box,F({className:b.stickyHeader},{children:e.jsx(Pu,{appName:c,filterDuration:oe,startDateTime:de.startDateTime,endDateTime:de.endDateTime,timezone:d,onSelectedFilterDuration:function(e){ae(e)},metricMeasure:J,onStartDateChange:function(e){pe((function(t){return F(F({},t),{startDateTime:new Date(e.target.value)})}))},onEndDateChange:function(e){pe((function(t){return F(F({},t),{endDateTime:new Date(e.target.value)})}))},onRefresh:function(){pe((function(e){return F(F({},e),{endDateTime:new Date})}))}})})),e.jsx(r.Box,F({className:b.headerContainer,style:{flex:1,overflow:"auto",paddingTop:"16px"}},{children:Ka(fe)?e.jsxs(e.Fragment,{children:[e.jsx(Lu,{appName:c,universeData:s,anomalyData:fe,clusterRegionItem:k,zoneNodeItem:N,isPrimaryCluster:B,cluster:z,region:W,metricMeasure:J,outlierType:ne,numNodes:le,onZoneNodeSelected:Ce,onClusterRegionSelected:Se,onOutlierTypeSelected:be,onSplitTypeSelected:_e,onNumNodesChanged:we}),e.jsx(fV,{metricMeasure:J,appName:c,dateTimeRange:de,timezone:d,universeQueryData:f,amomalyGraphRequestParams:u,formattedAnomalyRca:p,apiUrl:h,anomalyData:fe,gantChartData:me,onEChartsDateSelect:xe,onSelectedIssue:x,urlParams:M,getClusterDetails:ve})]}):e.jsxs(e.Fragment,{children:[e.jsx(Lu,{appName:c,universeData:s,anomalyData:null,clusterRegionItem:k,zoneNodeItem:N,isPrimaryCluster:B,cluster:z,region:W,metricMeasure:J,outlierType:ne,numNodes:le,onZoneNodeSelected:Ce,onClusterRegionSelected:Se,onOutlierTypeSelected:be,onSplitTypeSelected:_e,onNumNodesChanged:we}),e.jsx(pV,{urlParams:M,getClusterDetails:ve,metricMeasure:J,apiUrl:h,appName:c,timezone:d,dateTimeRange:de,universeQueryStatsData:g,onEChartsDateSelect:xe})]})}))]}))}));function bG(){return bG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bG.apply(this,arguments)}function wG(e){return"number"==typeof e&&!isNaN(e)}function SG(e){return"boolean"==typeof e}function CG(e){return"string"==typeof e}function TG(e){return"function"==typeof e}function MG(e){return CG(e)||TG(e)?e:null}function EG(e){return 0===e||e}var IG=!("undefined"==typeof window||!window.document||!window.document.createElement);function AG(e){return t.isValidElement(e)||CG(e)||TG(e)||wG(e)}var DG={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},kG={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function OG(e){var n=e.enter,r=e.exit,i=e.appendPosition,o=void 0!==i&&i,a=e.collapse,s=void 0===a||a,l=e.collapseDuration,u=void 0===l?300:l;return function(e){var i=e.children,a=e.position,l=e.preventExitTransition,c=e.done,d=e.nodeRef,p=e.isIn,h=o?n+"--"+a:n,f=o?r+"--"+a:r,g=t.useRef(),m=t.useRef(0);function v(){var e=d.current;e.removeEventListener("animationend",v),0===m.current&&(e.className=g.current)}function y(){var e=d.current;e.removeEventListener("animationend",y),s?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,c,u):c()}return t.useLayoutEffect((function(){!function(){var e=d.current;g.current=e.className,e.className+=" "+h,e.addEventListener("animationend",v)}()}),[]),t.useEffect((function(){p||(l?y():function(){m.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",y)}())}),[p]),C.default.createElement(C.default.Fragment,null,i)}}var RG={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function NG(e,n){void 0===n&&(n=!1);var r=t.useRef(e);return t.useEffect((function(){n&&(r.current=e)})),r.current}function LG(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case 1:return EG(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function PG(e){var n=t.useReducer((function(e){return e+1}),0)[1],r=t.useReducer(LG,[]),i=r[0],o=r[1],a=t.useRef(null),s=NG(0),l=NG([]),u=NG({}),c=NG({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:d,getToast:function(e){return u[e]||null}});function d(e){return-1!==i.indexOf(e)}function p(e){var t=e.containerId,n=c.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||c.containerId===t&&i)&&(s-=l.length,l=[])}function h(e){o({type:1,toastId:e})}function f(){var e=l.shift();m(e.toastContent,e.toastProps,e.staleId)}function g(e,r){var i=r.delay,o=r.staleId,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["delay","staleId"]);if(AG(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||c.props.enableMultiContainer&&t!==c.props.containerId||u[n]&&null==r)}(d)){var p=d.toastId,g=d.updateId,v=c.props,y=function(){return h(p)},x=null==d.updateId;x&&s++;var _,b,w={toastId:p,updateId:g,isIn:!1,key:d.key||c.toastKey++,type:d.type,closeToast:y,closeButton:d.closeButton,rtl:v.rtl,position:d.position||v.position,transition:d.transition||v.transition,className:MG(d.className||v.toastClassName),bodyClassName:MG(d.bodyClassName||v.bodyClassName),style:d.style||v.toastStyle,bodyStyle:d.bodyStyle||v.bodyStyle,onClick:d.onClick||v.onClick,pauseOnHover:SG(d.pauseOnHover)?d.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:SG(d.pauseOnFocusLoss)?d.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:SG(d.draggable)?d.draggable:v.draggable,draggablePercent:wG(d.draggablePercent)?d.draggablePercent:v.draggablePercent,draggableDirection:d.draggableDirection||v.draggableDirection,closeOnClick:SG(d.closeOnClick)?d.closeOnClick:v.closeOnClick,progressClassName:MG(d.progressClassName||v.progressClassName),progressStyle:d.progressStyle||v.progressStyle,autoClose:(_=d.autoClose,b=v.autoClose,!1===_||wG(_)&&_>0?_:b),hideProgressBar:SG(d.hideProgressBar)?d.hideProgressBar:v.hideProgressBar,progress:d.progress,role:CG(d.role)?d.role:v.role,deleteToast:function(){!function(e){delete u[e];var t=l.length;s=EG(e)?s-1:s-c.displayedToast,s<0&&(s=0);if(t>0){var r=EG(e)?1:c.props.limit;if(1===t||1===r)c.displayedToast++,f();else{var i=r>t?t:r;c.displayedToast=i;for(var o=0;o<i;o++)f()}}else n()}(p)}};TG(d.onOpen)&&(w.onOpen=d.onOpen),TG(d.onClose)&&(w.onClose=d.onClose),"y"===w.draggableDirection&&80===w.draggablePercent&&(w.draggablePercent*=1.5);var S=v.closeButton;!1===d.closeButton||AG(d.closeButton)?S=d.closeButton:!0===d.closeButton&&(S=!AG(v.closeButton)||v.closeButton),w.closeButton=S;var C=e;t.isValidElement(e)&&!CG(e.type)?C=t.cloneElement(e,{closeToast:y,toastProps:w}):TG(e)&&(C=e({closeToast:y,toastProps:w})),v.limit&&v.limit>0&&s>v.limit&&x?l.push({toastContent:C,toastProps:w,staleId:o}):wG(i)&&i>0?setTimeout((function(){m(C,w,o)}),i):m(C,w,o)}}function m(e,t,n){var r=t.toastId;n&&delete u[n],u[r]={content:e,props:t},o({type:0,toastId:r,staleId:n})}return t.useEffect((function(){return c.containerId=e.containerId,RG.cancelEmit(3).on(0,g).on(1,(function(e){return a.current&&h(e)})).on(5,p).emit(2,c),function(){return RG.emit(3,c)}}),[]),t.useEffect((function(){c.isToastActive=d,c.displayedToast=i.length,RG.emit(4,i.length,e.containerId)}),[i]),t.useEffect((function(){c.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(u).reverse():Object.keys(u),i=0;i<r.length;i++){var o=u[r[i]],a=o.props.position;n[a]||(n[a]=[]),n[a].push(o)}return Object.keys(n).map((function(e){return t(e,n[e])}))},collection:u,containerRef:a,isToastActive:d}}function BG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function jG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function FG(e){var n=t.useState(!0),r=n[0],i=n[1],o=t.useState(!1),a=o[0],s=o[1],l=t.useRef(null),u=NG({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),c=NG(e,!0),d=e.autoClose,p=e.pauseOnHover,h=e.closeToast,f=e.onClick,g=e.closeOnClick;function m(t){if(e.draggable){var n=l.current;u.canCloseOnClick=!0,u.canDrag=!0,u.boundingRect=n.getBoundingClientRect(),n.style.transition="",u.x=BG(t.nativeEvent),u.y=jG(t.nativeEvent),"x"===e.draggableDirection?(u.start=u.x,u.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(u.start=u.y,u.removalDistance=n.offsetHeight*(e.draggablePercent/100))}}function v(){if(u.boundingRect){var t=u.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&u.x>=i&&u.x<=o&&u.y>=n&&u.y<=r?x():y()}}function y(){i(!0)}function x(){i(!1)}function _(t){if(u.canDrag){t.preventDefault();var n=l.current;r&&x(),u.x=BG(t),u.y=jG(t),"x"===e.draggableDirection?u.delta=u.x-u.start:u.delta=u.y-u.start,u.start!==u.x&&(u.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+u.delta+"px)",n.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance))}}function b(){var t=l.current;if(u.canDrag){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}t.useEffect((function(){return TG(e.onOpen)&&e.onOpen(t.isValidElement(e.children)&&e.children.props),function(){TG(c.onClose)&&c.onClose(t.isValidElement(c.children)&&c.children.props)}}),[]),t.useEffect((function(){return e.draggable&&(document.addEventListener("mousemove",_),document.addEventListener("mouseup",b),document.addEventListener("touchmove",_),document.addEventListener("touchend",b)),function(){e.draggable&&(document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",b))}}),[e.draggable]),t.useEffect((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||x();window.addEventListener("focus",y),window.addEventListener("blur",x)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",x))}}),[e.pauseOnFocusLoss]);var w={onMouseDown:m,onTouchStart:m,onMouseUp:v,onTouchEnd:v};return d&&p&&(w.onMouseEnter=x,w.onMouseLeave=y),g&&(w.onClick=function(e){f&&f(e),u.canCloseOnClick&&h()}),{playToast:y,pauseToast:x,isRunning:r,preventExitTransition:a,toastRef:l,eventHandlers:w}}function UG(e){var n=e.closeToast,r=e.type,i=e.ariaLabel,o=void 0===i?"close":i;return t.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+r,type:"button",onClick:function(e){e.stopPropagation(),n(e)},"aria-label":o},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function zG(e){var n,r,i=e.delay,o=e.isRunning,a=e.closeToast,s=e.type,l=e.hide,u=e.className,c=e.style,d=e.controlledProgress,p=e.progress,h=e.rtl,f=e.isIn,g=bG({},c,{animationDuration:i+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(g.transform="scaleX("+p+")");var m=Y("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+s,((n={})["Toastify__progress-bar--rtl"]=h,n)),v=TG(u)?u({rtl:h,type:s,defaultClassName:m}):Y(m,u),y=((r={})[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]=d&&p<1?null:function(){f&&a()},r);return t.createElement("div",Object.assign({role:"progressbar",className:v,style:g},y))}zG.defaultProps={type:kG.DEFAULT,hide:!1};var HG=function(e){var n,r=FG(e),i=r.isRunning,o=r.preventExitTransition,a=r.toastRef,s=r.eventHandlers,l=e.closeButton,u=e.children,c=e.autoClose,d=e.onClick,p=e.type,h=e.hideProgressBar,f=e.closeToast,g=e.transition,m=e.position,v=e.className,y=e.style,x=e.bodyClassName,_=e.bodyStyle,b=e.progressClassName,w=e.progressStyle,S=e.updateId,C=e.role,T=e.progress,M=e.rtl,E=e.toastId,I=e.deleteToast,A=e.isIn,D=Y("Toastify__toast","Toastify__toast--"+p,((n={})["Toastify__toast--rtl"]=M,n)),k=TG(v)?v({rtl:M,position:m,type:p,defaultClassName:D}):Y(D,v),O=!!T;return t.createElement(g,{isIn:A,done:I,position:m,preventExitTransition:o,nodeRef:a},t.createElement("div",Object.assign({id:E,onClick:d,className:k},s,{style:y,ref:a}),t.createElement("div",Object.assign({},A&&{role:C},{className:TG(x)?x({type:p}):Y("Toastify__toast-body",x),style:_}),u),function(e){if(e){var n={closeToast:f,type:p};return TG(e)?e(n):t.isValidElement(e)?t.cloneElement(e,n):void 0}}(l),(c||O)&&t.createElement(zG,Object.assign({},S&&!O?{key:"pb-"+S}:{},{rtl:M,delay:c,isRunning:i,isIn:A,closeToast:f,hide:h,type:p,style:w,className:b,controlledProgress:O,progress:T}))))},VG=function(e){var n=PG(e),r=n.getToastToRender,i=n.containerRef,o=n.isToastActive,a=e.className,s=e.style,l=e.rtl,u=e.containerId;function c(e){var t,n=Y("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return TG(a)?a({position:e,rtl:l,defaultClassName:n}):Y(n,MG(a))}return t.createElement("div",{ref:i,className:"Toastify",id:u},r((function(e,n){var r=0===n.length?bG({},s,{pointerEvents:"none"}):bG({},s);return t.createElement("div",{className:c(e),style:r,key:"container-"+e},n.map((function(e){var n=e.content,r=e.props;return t.createElement(HG,Object.assign({},r,{isIn:o(r.toastId),key:"toast-"+r.key,closeButton:!0===r.closeButton?UG:r.closeButton}),n)})))})))};VG.defaultProps={position:DG.TOP_RIGHT,transition:OG({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:UG,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert"};var WG,YG,GG,qG=new Map,QG=[],ZG=!1;function XG(){return Math.random().toString(36).substr(2,9)}function $G(e){return e&&(CG(e.toastId)||wG(e.toastId))?e.toastId:XG()}function KG(e,n){return qG.size>0?RG.emit(0,e,n):(QG.push({content:e,options:n}),ZG&&IG&&(ZG=!1,YG=document.createElement("div"),document.body.appendChild(YG),y.render(t.createElement(VG,Object.assign({},GG)),YG))),n.toastId}function JG(e,t){return bG({},t,{type:t&&t.type||e,toastId:$G(t)})}var eq=function(e){return function(t,n){return KG(t,JG(e,n))}},tq=function(e,t){return KG(e,JG(kG.DEFAULT,t))};tq.success=eq(kG.SUCCESS),tq.info=eq(kG.INFO),tq.error=eq(kG.ERROR),tq.warning=eq(kG.WARNING),tq.dark=eq(kG.DARK),tq.warn=tq.warning,tq.dismiss=function(e){return RG.emit(1,e)},tq.clearWaitingQueue=function(e){return void 0===e&&(e={}),RG.emit(5,e)},tq.isActive=function(e){var t=!1;return qG.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},tq.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=qG.get(n||WG);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=bG({},r,t,{toastId:t.toastId||e,updateId:XG()});o.toastId!==e&&(o.staleId=e);var a=o.render||i;delete o.render,KG(a,o)}}),0)},tq.done=function(e){tq.update(e,{progress:1})},tq.onChange=function(e){return TG(e)&&RG.on(4,e),function(){TG(e)&&RG.off(4,e)}},tq.configure=function(e){void 0===e&&(e={}),ZG=!0,GG=e},tq.POSITION=DG,tq.TYPE=kG,RG.on(2,(function(e){WG=e.containerId||e,qG.set(WG,e),QG.forEach((function(e){RG.emit(0,e.content,e.options)})),QG=[]})).on(3,(function(e){qG.delete(e.containerId||e),0===qG.size&&RG.off(0).off(1).off(5),IG&&YG&&document.body.removeChild(YG)}));var nq,rq=r.makeStyles((function(e){return{itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},item:{paddingLeft:e.spacing(2)}}})),iq=function(n){var i,o=n.appName,a=n.columns,s=n.hiddenColumns,l=n.onColumnVisibilityChange,u=n.close,c=rq(),d=JSON.parse(null!==(i=sessionStorage.getItem("visibleQueryFields"))&&void 0!==i?i:"[]"),p=a.reduce((function(e,t){var n;return e[t.name]=d.length>0?d.includes(t.name):null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.display,e}),{}),h=Kn({defaultValues:p}),f=h.control,g=h.handleSubmit,m=h.reset;t.useEffect((function(){m(p)}),[a,m]);var v=function(){u()};return e.jsx(xs,F({open:!0,isSidePanel:!0,title:"Add and Remove Columns",onClose:v,onSubmit:g((function(e){var t=[];Object.keys(e).forEach((function(n){var r=e[n],i=n;l(i,r),r&&t.push(i)})),sessionStorage.setItem("visibleQueryFields",JSON.stringify(t)),v()})),enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,F({paddingLeft:2,paddingRight:2,paddingBottom:2},{children:e.jsx(r.Box,F({className:c.itemsContainer},{children:a.map((function(t){return s.includes(t.name)?null:e.jsx(r.Box,F({className:c.item},{children:e.jsx(mu,{name:t.name,label:t.label,control:f,inputProps:{"data-testid":t.name},showCheckedIcon:o===exports.AppName.WEB})}),t.name)}))}))}))}))},oq=function(n){var r=n.data,i=n.maxEPS,o=n.groupByOperation,a=t.useRef(null),s=t.useMemo((function(){var e=i<1?5:100,t=r.reduce((function(e,t){return e+t.eps}),0),n=Math.pow(t/i,.5)*e;return Math.max(n,10)+100}),[r,i]);return t.useEffect((function(){if(a.current){var e=oI(a.current),t=r.map((function(e){return o===exports.WaitEventClassification.WAIT_EVENT?e.waitEvent:e.waitEventType})).map((function(e,t){var n;return{name:e,type:"bar",stack:"total",label:{show:!1},data:[r[t].eps],itemStyle:{color:null!==(n=Zl[e])&&void 0!==n?n:Ql[t]}}})),n={animation:!1,grid:{left:50,right:50,top:20,bottom:40,containLabel:!1},tooltip:{trigger:"item",extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; z-index:9999;",formatter:function(e){var t=ku(e.color,e.seriesName),n=Ou(Number(e.value).toFixed(3)),r='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(t).concat(n,"\n </div>");return'<div style="letter-spacing:0.5px;">'.concat(r,"</div>")},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400}},xAxis:{type:"value",show:!1,min:0,max:i},yAxis:{type:"category",data:[""],show:!1},series:t};e.setOption(n);var s=new ResizeObserver((function(){e.resize()}));return s.observe(a.current),function(){s.disconnect(),e.dispose()}}}),[r,o,s,i]),e.jsx("div",{className:"query-events-chart-container",ref:a,style:{height:"".concat(80,"px"),width:"".concat(s,"px"),minWidth:"".concat(s,"px"),maxWidth:"".concat(s,"px"),display:"flex",top:"12px"}})};function aq(){return aq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aq.apply(null,arguments)}const sq=e=>S.createElement("svg",aq({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),nq||(nq=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 4a.5.5 0 0 1 .492.41l.008.09v4h4a.5.5 0 0 1 .09.992l-.09.008h-4v4a.5.5 0 0 1-.992.09l-.008-.09v-4h-4a.5.5 0 0 1-.09-.992l.09-.008h4v-4A.5.5 0 0 1 12 7Z"}))));var lq;function uq(){return uq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uq.apply(null,arguments)}const cq=e=>S.createElement("svg",uq({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),lq||(lq=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"#6D7C88",d:"M10 4a6 6 0 0 1 4.581 9.875l4.773 4.771a.5.5 0 0 1-.638.765l-.07-.057-4.771-4.773A6 6 0 1 1 10 4Zm0 1a5 5 0 1 0 0 10 5 5 0 0 0 0-10Z"}))));var dq="data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath opacity='0.5' fill-rule='evenodd' clip-rule='evenodd' d='M1.16699 6.99984C1.16699 3.77818 3.77866 1.1665 7.00033 1.1665C8.54742 1.1665 10.0312 1.78109 11.1251 2.87505C12.2191 3.96901 12.8337 5.45274 12.8337 6.99984C12.8337 10.2215 10.222 12.8332 7.00033 12.8332C3.77866 12.8332 1.16699 10.2215 1.16699 6.99984ZM6.41699 4.6665C6.41699 4.34434 6.67816 4.08317 7.00033 4.08317C7.32249 4.08317 7.58366 4.34434 7.58366 4.6665C7.58366 4.98867 7.32249 5.24984 7.00033 5.24984C6.67816 5.24984 6.41699 4.98867 6.41699 4.6665ZM6.41699 6.4165C6.41699 6.09434 6.67816 5.83317 7.00033 5.83317C7.32249 5.83317 7.58366 6.09434 7.58366 6.4165V9.33317C7.58366 9.65534 7.32249 9.9165 7.00033 9.9165C6.67816 9.9165 6.41699 9.65534 6.41699 9.33317V6.4165Z' fill='%2367666C'/%3e%3c/svg%3e",pq="databaseId",hq="eps",fq="events",gq="firstActive",mq="lastActive",vq="latencyAvg",yq="latencyP90",xq="latencyP99",_q="namespaceName",bq="query",wq="queryid",Sq="queryType",Cq="rowsAvg",Tq="rps",Mq="totalTime",Eq="universeId",Iq="totalEpsRatio",Aq={SHOW_ALL:"All Queries",SHOW_YSQL:"SQL Only",SHOW_YCQL:"CQL Only",SHOW_ACTIVITIES:"Background Tasks Only"},Dq=[wq,pq,Eq],kq=function(i){var o,a,s,l,u,c,d,p,h=i.universeUuid,f=i.apiUrl,g=i.startTime,m=i.endTime,v=i.appName,y=i.groupByOperation,x=i.filteredLegends,_=i.getClusterDetails,b=i.onSelectedQuery,w=_t(),S=Kl(),C=t.useState(null),T=C[0],M=C[1],E=t.useState(""),I=E[0],A=E[1],D=t.useState([]),k=D[0],O=D[1],R=t.useState(!1),N=R[0],L=R[1],P=t.useState(yl[0]),B=P[0],j=P[1],U=t.useState(0),z=U[0],H=U[1],V=t.useState(0),W=V[0],G=V[1],q=t.useState(Ks),Z=q[0],X=q[1],$=t.useState([]),K=$[0],J=$[1],ee=t.useState([]),te=ee[0],ne=ee[1],re=t.useState([]),ie=re[0],oe=re[1],ae=t.useState("eps"),se=ae[0],le=ae[1],ue=t.useState(null),ce=ue[0],de=ue[1],pe=t.useState(Aq.SHOW_ALL),he=pe[0],fe=pe[1],ge=t.useState(1),me=ge[0],ve=ge[1],ye=t.useState(exports.SortDirection.DESC),xe=ye[0],_e=ye[1],be=_(),we=be.cluster,Se=be.region,Ce=be.zone,Te=be.node,Me=n.useInfiniteQuery([exports.QUERY_KEY.fetchQueriesStatsPage,z,B,g,m],(function(){return uV.fetchQueriesStatsPage(h,{currentTablePage:z,apiUrl:f,pageSize:B,startTime:g,endTime:m,searchInput:I,database:Z,sortBy:se,sortDirection:xe,queryType:ce,groupByOperation:y},_,x)}),{getNextPageParam:function(e){return e.data.hasNext},onSuccess:function(e){var t,n,r,i,o,a,s,l,u,c,d,p,h,f;"eps"===se&&!1===(null===(r=null===(n=null===(t=null==e?void 0:e.pages)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||void 0===r?void 0:r.hasPrev)&&xe===exports.SortDirection.DESC&&(null===(a=null===(o=null===(i=null==e?void 0:e.pages)||void 0===i?void 0:i[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.entities)&&ve(null===(c=null===(u=null===(l=null===(s=null==e?void 0:e.pages)||void 0===s?void 0:s[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u.entities[0])||void 0===c?void 0:c.eps),oe(null===(p=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===p?void 0:p.entities),G(null===(f=null===(h=null==e?void 0:e.pages[0])||void 0===h?void 0:h.data)||void 0===f?void 0:f.totalCount)}}),Ee=Me.isFetching,Ie=Me.isError,Ae=Me.error,De=Me.fetchNextPage,ke=Me.hasNextPage,Oe=Me.refetch,Re=n.useQuery([exports.QUERY_KEY.fetchQueriesDatabases,h],(function(){return uV.fetchQueriesDatabases(h,f)}),{onSuccess:function(e){ne(e)}}),Ne=Re.isLoading,Le=Re.isError;t.useEffect((function(){}),[T]),t.useEffect((function(){Ie&&J([])}),[Ie]),t.useEffect((function(){Oe()}),[z,I,Z,se,xe,g,m,ce,y,Ce,Te,we,Se,x]),t.useEffect((function(){var t,n,i,o,a,s,l,u=sessionStorage.getItem("visibleQueryFields"),c=u?JSON.parse(u):null;O([{name:pq,label:"",options:{sort:!1,display:!1,filter:!1}},{name:Iq,label:"Total Load",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Percentage of the system load",placement:"top",arrow:!0},{children:e.jsxs("span",{children:["Total Load",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:hq,label:"AAS",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Active Sessions per Second",placement:"top",arrow:!0},{children:e.jsxs("span",{children:["AAS",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:fq,label:"Events",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{minWidth:"70px",maxWidth:"200px",overflow:"visible",position:"relative",zIndex:10},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Active Session Events per Second",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Events",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(t){return $a(t)?e.jsx(oq,{data:t,maxEPS:me,groupByOperation:y}):"-"}}},{name:bq,label:"Query",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{},className:Y(),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Query Text",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Query",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Tooltip,F({title:t,placement:"top",arrow:!0},{children:e.jsx(r.TableCell,F({colSpan:100,className:w.queryTableCell},{children:e.jsx(xt,{text:t,showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,codeClassName:v===exports.AppName.YBM?w.queryCodeElement:w.queryCodeElementWeb,preClassName:v===exports.AppName.YBM?w.queryPreBlock:w.queryPreBlockWeb,containerClassName:w.queryContainerCode},"TableHelperQueries-".concat(z,"-").concat(i))}))}))}}},{name:_q,label:"Database",options:{sort:!0,display:null!==(t=null==c?void 0:c.includes(_q))&&void 0!==t&&t,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Database Name",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Database",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return e||"-"}}},{name:gq,label:"First Active Time",options:{sort:!0,display:null!==(n=null==c?void 0:c.includes(gq))&&void 0!==n&&n,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"First Active Time",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["First Time that the query was active",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return e||"-"}}},{name:mq,label:"Last Active Time",options:{sort:!0,display:null!==(i=null==c?void 0:c.includes(mq))&&void 0!==i&&i,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Last Active Time",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Last Time that the query was active",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return e||"-"}}},{name:vq,label:"Avg Latency (ms)",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"The average latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Avg Latency (ms)",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:yq,label:"P90 Latency (ms)",options:{sort:!0,display:null!==(o=null==c?void 0:c.includes(yq))&&void 0!==o&&o,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"The P90 latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["P90 Latency (ms)",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:xq,label:"P99 Latency (ms)",options:{sort:!0,display:null!==(a=null==c?void 0:c.includes(xq))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"The P99 latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["P99 Latency (ms)",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Sq,label:"Query Type",options:{sort:!1,display:null!==(s=null==c?void 0:c.includes(Sq))&&void 0!==s&&s,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"SQL/CQL query or Background activity",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Query Type",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return e||"-"}}},{name:Mq,label:"Total Time (ms)",options:{sort:!0,display:null!==(l=null==c?void 0:c.includes(Mq))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Total time spent for query processing measured in ms",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Total Time (ms)",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Cq,label:"Avg Rows/Call",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Average rows returned",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Avg Rows",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Tq,label:"Calls/Sec",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Calls per second",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["RPS",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[K,me,y]);t.useEffect((function(){J(ie)}),[ie]);var Pe=Ee||Ne;return e.jsxs(e.Fragment,{children:[N&&e.jsx(iq,{appName:v,hiddenColumns:[pq,vq,Cq,Tq,hq,fq,wq,Eq,bq],columns:k,onColumnVisibilityChange:function(e,t){O((function(n){return n.map((function(n){return n.name===e?F(F({},n),{options:F(F({},n.options),{display:t})}):n}))}))},close:function(){return L(!1)}}),e.jsxs(r.Box,F({mt:2,mb:2,className:S.dataBox},{children:[e.jsxs(r.Box,F({display:"flex",flexDirection:"column"},{children:[e.jsx(r.Box,F({mb:2},{children:e.jsx(r.Typography,F({variant:"h5"},{children:"Queries"}))})),e.jsxs(r.Box,F({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},{children:[e.jsxs(lr,F({label:"",value:Z,className:S.overrideMuiSelect,onChange:function(e){H(0),X(e.target.value)},menuProps:{PaperProps:{style:{paddingRight:"8px",maxHeight:"300px"}}}},{children:[e.jsx(r.MenuItem,F({value:Ks,"data-testid":"HistoricalQueryData-".concat(Ks)},{children:e.jsx("span",{children:ol.ALL_DATABASES})}),Ks),te.map((function(t){return e.jsx(r.MenuItem,F({value:t,"data-testid":"HistoricalQueryData-".concat(t)},{children:e.jsx("span",{children:t})}),t)}))]})),e.jsx(lr,F({style:{marginLeft:"16px"},label:"",value:he,className:S.overrideMuiSelect,onChange:function(e){e.target.value===Aq.SHOW_ALL&&de(null),e.target.value===Aq.SHOW_YSQL&&de(exports.QueryType.SQL),e.target.value===Aq.SHOW_YCQL&&de(exports.QueryType.CQL),e.target.value===Aq.SHOW_ACTIVITIES&&de(exports.QueryType.BACKGROUND),fe(e.target.value)},menuProps:{PaperProps:{style:{paddingRight:"8px",maxHeight:"300px"}}}},{children:Object.entries(Aq).map((function(t){var n=t[0],i=t[1];return e.jsx(r.MenuItem,F({value:i,"data-testid":"HistoricalQueryData-".concat(i)},{children:e.jsx("span",{children:i})}),n)}))})),e.jsx(Tt,{placeholder:"Filter Queries",className:S.searchInput,onChange:function(e){Ja(e.target.value)&&H(0),A(e.target.value)},value:I,inputProps:{"data-testid":"HistoricalQueryData-SearchInput"},InputProps:{startAdornment:e.jsx(r.InputAdornment,F({position:"end"},{children:e.jsx(cq,{})}))}}),e.jsx(Q,F({size:"medium",style:{marginLeft:"16px",marginTop:"4px"},variant:v===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(sq,{}),onClick:function(){return L(!0)},"data-testid":"HistoricalQueryData-AddFieldsBtn"},{children:"Add Columns"}))]}))]})),e.jsxs(r.Box,F({className:v===exports.AppName.YBM?S.overrideMuiTableContainer:S.overrideMuiTableContainerWeb},{children:[Pe&&e.jsx(r.Box,F({mt:2,className:S.loadingBox},{children:e.jsx(dV,{className:Y(S.icon,S.inProgressIcon)})})),(Ie||Le)&&e.jsxs(r.Box,F({mt:3,className:S.recommendation},{children:[(v===exports.AppName.YBA||v===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(null===(a=null===(o=null==Ae?void 0:Ae.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.error)?null===(l=null===(s=null==Ae?void 0:Ae.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error:Xl.HISTORICAL_QUERY_DATA_FETCH_ERROR}),v===exports.AppName.YBM&&e.jsx(kr,{text:Ja(null===(c=null===(u=null==Ae?void 0:Ae.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error)?null===(p=null===(d=null==Ae?void 0:Ae.response)||void 0===d?void 0:d.data)||void 0===p?void 0:p.error:Xl.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),!Pe&&$a(K)&&e.jsx(Ds,{id:"HistoricalQueryData-".concat(z),className:S.overrideMuiTable,data:K,columns:null==k?void 0:k.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),options:{filter:!0,count:W,serverSide:!0,pagination:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:B,page:z,onChangePage:function(e){return H(e)},onChangeRowsPerPage:function(e){j(e),H(0)},customRowRender:tu(v,z,K,w,!0,null==k?void 0:k.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),Dq,g,m,T,(function(e){M(e)}),b),rowsPerPageOptions:yl,onColumnSortChange:function(e,t){le(e),_e(t.toUpperCase())},customFooter:$l(De,"Rows per page:",K.length,ke)}},"HistoricalQueryData-".concat(z)),!Pe&&!$a(K)&&!Ie&&e.jsx(r.Box,F({mt:3},{children:e.jsx("span",{children:"There are no queries with the current ".concat(v===exports.AppName.YBM?"cluster":"universe")})}))]}))]}))]})},Oq=r.makeStyles((function(e){return{messageBox:{width:"100%",height:"228px",border:"1px dotted #CBDBFF",borderRadius:"8px",backgroundColor:"#F2F6FF",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},ashText:{color:"#4E5F6D",marginTop:e.spacing(2),marginBottom:e.spacing(2),marginLeft:e.spacing(1),marginRight:e.spacing(1),fontSize:"13px"},ashLink:{color:"#2B59C3",fontSize:"11.5px",textDecoration:"underline",fontStyle:"solid"}}})),Rq=[{text:"Learn more.",link:"https://docs.yugabyte.com/preview/yugabyte-platform/manage-deployments/upgrade-software-install/"},{text:"Learn more.",link:"https://docs.yugabyte.com/preview/explore/observability/active-session-history/"}],Nq=function(t){var n=t.isAshSupported,i=Oq();return e.jsxs(r.Box,F({className:i.messageBox},{children:[e.jsx("img",{src:n?"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M20.5 1L12.6314 8.86863C12.2354 9.26465 12.0373 9.46265 11.809 9.53684C11.6082 9.6021 11.3918 9.6021 11.191 9.53684C10.9627 9.46265 10.7646 9.26465 10.3686 8.86863L7.63137 6.13137C7.23535 5.73535 7.03735 5.53735 6.80902 5.46316C6.60817 5.3979 6.39183 5.3979 6.19098 5.46316C5.96265 5.53735 5.76465 5.73535 5.36863 6.13137L0.5 11M20.5 1H13.5M20.5 1V8' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='42' height='22' viewBox='0 0 42 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M41 1L25.2627 16.7373C24.4707 17.5293 24.0747 17.9253 23.618 18.0737C23.2163 18.2042 22.7837 18.2042 22.382 18.0737C21.9253 17.9253 21.5293 17.5293 20.7373 16.7373L15.2627 11.2627C14.4707 10.4707 14.0747 10.0747 13.618 9.92631C13.2163 9.7958 12.7837 9.7958 12.382 9.92631C11.9253 10.0747 11.5293 10.4707 10.7373 11.2627L1 21M41 1H27M41 1V15' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Arrow"}),e.jsx("span",F({className:i.ashText},{children:n?"The Cluster Load chart requires access to the Active Session History (ASH) view, which is not enabled on this cluster. To enable ASH for this cluster, contact Support.":"The Cluster Load chart requires YugabyteDB v2024.2 or later."})),e.jsxs(r.Box,F({display:"flex",flexDirection:"row"},{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.8002 13.7616H4.48019C3.95091 13.7616 3.52019 13.3308 3.52019 12.8016C3.52019 12.2723 3.95091 11.8416 4.48019 11.8416H12.1602C12.3368 11.8416 12.4802 11.6982 12.4802 11.5216V3.20156C12.4802 2.319 11.7621 1.60156 10.8802 1.60156H4.48019C3.59827 1.60156 2.88019 2.319 2.88019 3.20156V12.8016C2.88019 13.6841 3.59827 14.4016 4.48019 14.4016H12.8002C12.9768 14.4016 13.1202 14.2582 13.1202 14.0816C13.1202 13.9049 12.9768 13.7616 12.8002 13.7616ZM3.52019 3.20156C3.52019 2.67228 3.95091 2.24156 4.48019 2.24156H10.8802C11.4095 2.24156 11.8402 2.67228 11.8402 3.20156V11.2016H4.48019C4.12051 11.2016 3.78771 11.3212 3.52019 11.5222V3.20156Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 6.08203H5.76006C5.58342 6.08203 5.44006 6.22539 5.44006 6.40203C5.44006 6.57867 5.58342 6.72203 5.76006 6.72203H9.60006C9.7767 6.72203 9.92006 6.57867 9.92006 6.40203C9.92006 6.22539 9.7767 6.08203 9.60006 6.08203Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3cpath d='M9.6 4.30469H5.76C5.58336 4.30469 5.44 4.44805 5.44 4.62469C5.44 4.80133 5.58336 4.94469 5.76 4.94469H9.6C9.77664 4.94469 9.92 4.80133 9.92 4.62469C9.92 4.44805 9.77664 4.30469 9.6 4.30469Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Docs"}),e.jsx("a",F({className:i.ashLink,href:n?Rq[1].link:Rq[0].link,target:"_blank",rel:"noreferrer"},{children:n?Rq[1].text:Rq[0].text}))]}))]}))},Lq="Cluster Load Overview",Pq="Activity By Database";dD([Lj,uF,uN,fP,BB,aj,rB,function(e){e.registerPainter("svg",vU)},eB]);var Bq,jq=i.makeStyles((function(){return{metricPanel:{position:"relative",textOverflow:"ellipsis",whiteSpace:"nowrap",border:"1px solid #E9EEF2",borderRadius:"8px",padding:"16px 24px 20px 16px",backgroundColor:"#FFFFFF",height:"320px"},groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .MuiInput-root":{height:"32px"}},groupByContainer:{position:"absolute",top:"20px",right:"20px",display:"flex",flex:1,flexDirection:"row",alignItems:"center"},groupByText:{fontSize:"13px",fontFamily:"Inter, sans-serif",fontWeight:500,color:"#0B1117"},chartTypeSelectorButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",fontSize:"13px !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},borderBarButton:{borderRadius:"8px 0px 0px 8px"},borderLineButton:{borderRadius:"0px 8px 8px 0px"}}})),Fq=[{value:exports.ChartType.BAR,label:"Bar"},{value:exports.ChartType.LINE,label:"Line"}],Uq="Cpu",zq="IO",Hq="DiskIO",Vq=function(i){var o,a,s,l=i.startTime,u=i.endTime,c=i.appName,d=i.metricKey,p=i.shouldAbbreviateTraceName,h=i.groupByOperation,f=i.timezone,g=i.universeUuid,m=i.isAshEnabled,v=i.isAshSupported,y=i.apiUrl,x=i.dbWaitEventType,_=i.isDbClusterLoadView,b=void 0!==_&&_,w=i.onEChartsDateSelect,S=i.onSetGroupByOperation,C=i.onFilterBarData,T=i.getClusterDetails,M=jq(),E=Kl(),I=t.useRef(null),A=t.useRef(null),D=t.useState([]),k=D[0],O=D[1],R=t.useState(exports.ChartType.BAR),N=R[0],L=R[1],P=t.useRef(k),B=t.useState(null),j=B[0],U=B[1],z=T(),H=z.cluster,W=z.region,G=z.zone,q=z.node,Z=n.useMutation((function(e){return uV.fetchGraphs(g,e,y)}),{onSuccess:function(e){!$a(e)||U(e)},onError:function(e){console.error("Failed to fetch cluster load data",e)}}),X=null===(s=null===(a=null===(o=null==Z?void 0:Z.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,$=function(){var e={universeUuid:[g]};b?(delete e.clusterUuid,delete e.regionCode,delete e.azCode,delete e.instanceName,e.waitEventType=x===Ks.toUpperCase()?[Uq,zq,Hq]:["CPU"===x?Uq:zq,Hq]):(H&&H!==Ks?e.clusterUuid=[H]:delete e.clusterUuid,W&&W!==Ks?e.regionCode=[W]:delete e.regionCode,G&&G!==Ks?e.azCode=[G]:delete e.azCode,q&&q!==Ks?e.instanceName=[q]:delete e.instanceName);var t=function(t){return F(F({start:l,end:u,name:t,filters:e,settings:{aggregatedValueFunction:b?js.SUM:js.AVERAGE,returnAggregatedValue:!1,splitCount:b?5:3,splitMode:b?Ls.TOP:Ls.NONE,splitType:b?Ps.NAMESPACE:Ps.NONE}},t!==al||b?{}:{groupBy:[h]}),{stepSeconds:Au(l,u)})},n=[t(al)];b||(n.push(t(sl)),n.push(t(ll))),Ja(l)&&Ja(u)&&m&&Z.mutate(n)};t.useEffect((function(){$()}),[l,u,h,H,W,G,q,x]),t.useEffect((function(){return $(),function(){U(null)}}),[]);return t.useEffect((function(){P.current=k}),[k]),t.useEffect((function(){if($a(j)&&A.current){I.current||(I.current=oI(A.current,null,{renderer:"svg"}));var e=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f,g,m=i.shouldAbbreviateTraceName;i.appName;var v=i.timezone,y=void 0===v?"":v,x=i.groupByOperation;console.error("dbWaitEventType",t);var _=null==e?void 0:e.flatMap((function(e){return e.data||[]}));_&&(null==_?void 0:_.length)>1&&!n&&(_=V(V([],_.filter((function(e){var t;return"cpu"===(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0),_.filter((function(e){var t;return"cpu"!==(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0));var b=[];if(!_||0===(null==_?void 0:_.length))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:n?t===Ks.toUpperCase()?Pq:"".concat(t," Activity By Database"):Lq,left:16,top:16,textStyle:{fontWeight:600,fontFamily:rl,fontSize:15,color:"#0B1117"},legend:{data:[]}},graphic:[{type:"text",left:"center",top:"50%",style:{text:"No Data Available",fontSize:11.5,fontWeight:600,fill:"#0B1117"}}]};null==_||_.forEach((function(t,i){var o,a=n&&null!==(o=t.namespaceName)&&void 0!==o?o:t.name,s=null;if(a===tl){var l=null==e?void 0:e.find((function(e){var n;return null===(n=e.data)||void 0===n?void 0:n.includes(t)}));(s=null==l?void 0:l.name)===ll?a=il:s===sl&&(a=nl)}var u=x===exports.WaitEventClassification.WAIT_EVENT?22:25,c=m&&(null==a?void 0:a.length)>u?"".concat(a.substring(0,u),"..."):a;if(a===nl)b.push({name:c,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:!1,tooltip:{show:!1},lineStyle:{color:"white",width:4,type:"solid"},silent:!0,symbol:"none",z:1}),b.push({name:c,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:i<35,lineStyle:{color:"black",width:2,type:"solid"},symbol:"circle",symbolSize:6,itemStyle:{color:"transparent"},emphasis:{itemStyle:{color:"black"},lineStyle:{width:2},symbolSize:8},z:2});else{var d={name:c,type:"scatter"===t.type||n&&r===exports.ChartType.LINE?"line":"bar",stack:n?r===exports.ChartType.BAR?"total":null:"scatter"!==t.type?"total":null,data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:i<35,lineStyle:{color:a===il?"#888888":Zl[a]||Ql[i%Ql.length],width:2,type:a===il?"dashed":"solid"},itemStyle:{color:a===il?"transparent":Zl[a]||Ql[i%Ql.length]},symbolSize:6,symbol:n?"none":"circle",z:1,emphasis:{lineStyle:{color:a===il?"#888888":Zl[a]||Ql[i%Ql.length],width:2},itemStyle:{color:a===il?Zl[a]||Ql[i%Ql.length]:void 0},symbolSize:a===il?8:void 0}};b.push(d)}}));var w=(null===(a=null===(o=null==b?void 0:b[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.length)||0,S=[];if(w)for(var C=0;C<w;C++){for(var T=0,M=0,E=b;M<E.length;M++){var I=E[M];"bar"===I.type&&(T+=parseFloat(null===(s=I.data[C])||void 0===s?void 0:s[1])||0)}S.push(T)}var A=Math.max.apply(Math,V([.1],S,!1)),D=0;b.forEach((function(e){if("line"===e.type){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>D&&(D=t)}}));var k=Math.max(1,1.4*A,1.4*D),O=Math.ceil(k),R=null===(d=null===(c=null===(u=null===(l=null==e?void 0:e[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u[0])||void 0===c?void 0:c.x)||void 0===d?void 0:d[0],N=null===(g=null===(f=null===(h=null===(p=null==e?void 0:e[0])||void 0===p?void 0:p.data)||void 0===h?void 0:h[0])||void 0===f?void 0:f.x)||void 0===g?void 0:g.slice(-1)[0],L=N&&R?(new Date(N).getTime()-new Date(R).getTime())/864e5:0,P={title:{text:n?t===Ks.toUpperCase()?Pq:"".concat(t," Activity By Database"):Lq,left:16,top:16,textStyle:{fontWeight:600,fontFamily:rl,fontSize:15,color:"#0B1117"}},tooltip:{trigger:x===exports.WaitEventClassification.WAIT_EVENT?"item":"axis",axisPointer:{type:"shadow",shadowStyle:{color:"#E9EEF2"},lineStyle:{color:"#E9EEF2",width:1}},textStyle:{fontFamily:rl,fontSize:13,lineHeight:16,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; box-shadow:none;",z:1,formatter:function(e){var t,n,r;if(Array.isArray(e)){var i=(null===(t=e[0])||void 0===t?void 0:t.axisValueLabel)||"",o=new Date(i),a=Oa(y?Ra(o,y):o,"MMM d HH:mm (zzz)",{timeZone:y||void 0}),s=e.map((function(e){var t=Array.isArray(e.value)?e.value[1]:e.value,n=ku(e.color,e.seriesName),r=Ou(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(a,'</b><br/><span style="margin-top: 16px;">').concat(s,"</span></div>")}i=null!==(r=null!==(n=e.axisValueLabel)&&void 0!==n?n:e.value&&e.value[0])&&void 0!==r?r:"",o=new Date(i),a=Oa(y?Ra(o,y):o,"MMM d HH:mm (zzz)",{timeZone:y||void 0});var l=Array.isArray(e.value)?e.value[1]:e.value,u=ku(e.color,e.seriesName),c=Ou(l);return s='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(u).concat(c,"\n </div>"),'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(a,'</b><br/><span style="margin-top: 16px;">').concat(s,"</span></div>")}},legend:{type:"scroll",orient:"vertical",left:"1%",top:"18%",bottom:"10%",width:"250px",height:"220px",symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,itemWidth:16,itemHeight:16,textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#6D7C88",fontFamily:rl,rich:{dashedLine:{backgroundColor:{image:'data:image/svg+xml;utf8,<svg width="24" height="6" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="3" x2="24" y2="3" stroke="%23888" stroke-width="2" stroke-dasharray="6,4" /></svg>'},width:24,height:6,padding:[0,4,0,0],lineHeight:14},thickLine:{backgroundColor:"black",width:24,height:0,borderWidth:1,borderColor:"black",borderType:"solid",padding:[2,4,0,0],lineHeight:14}}},data:b.filter((function(e){return e.showLegend})).map((function(e){return e.name===il||e.name===nl?{name:e.name,icon:"none"}:e.name})),formatter:function(e){return e===il?"{dashedLine|} # vCPU":e===nl?"{thickLine|} Queries":e}},grid:{left:"270px",right:"2%",top:"22%",bottom:"10%",containLabel:!0},xAxis:{type:"time",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:rl,fontSize:11.5},formatter:function(e){var t=new Date(e);return Oa(y?Ra(t,y):t,L>1?"MMM d HH:mm":"HH:mm",{timeZone:y||void 0})}},axisLine:{lineStyle:{color:"#6D7C88"}}},yAxis:{type:"value",name:"Active Sessions",nameLocation:"middle",nameGap:50,nameTextStyle:{fontWeight:"bold",fontFamily:rl,fontSize:13,color:"#0B1117",rotate:90},axisLine:{lineStyle:{color:"#6D7C88"}},axisLabel:{color:"#6D7C88",textStyle:{fontFamily:rl,fontSize:11.5},precision:0},splitNumber:4,max:O},series:b,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0}};return P}(j,x,b,N,{shouldAbbreviateTraceName:p,appName:c,timezone:f,metricKey:d,groupByOperation:h});I.current.setOption(e),n=!1,r=null,(t=I).current.getZr().on("mousedown",(function(e){var i,o,a=[e.offsetX,e.offsetY],s=null===(i=t.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},a);r=null!==(o=null==s?void 0:s[0])&&void 0!==o?o:null,n=!0})),t.current.getZr().on("mouseup",(function(e){var i;if(n){var o=[e.offsetX,e.offsetY],a=null===(i=t.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},o),s=null==a?void 0:a[0];if(null!==r&&null!==s&&Math.abs(s-r)>10){var l=Math.min(r,s),u=Math.max(r,s);w(l,u)}}n=!1})),b||function(e){e.current.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}}),e.current.on("legendselectchanged",(function(t){var n,r,i=t.name,o=V([],P.current,!0),a=null===(n=e.current)||void 0===n?void 0:n.getOption(),s=((null==a?void 0:a.legend)&&Array.isArray(a.legend)&&(null===(r=a.legend[0])||void 0===r?void 0:r.data)?a.legend[0].data:[]).map((function(e){return"string"==typeof e?e:e.name}));o=0===P.current.length||P.current.length===s.length?[i]:P.current.includes(i)?P.current.filter((function(e){return e!==i})):V(V([],P.current,!0),[i],!1),s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:o.includes(t)?"legendSelect":"legendUnSelect",name:t})})),O(o),C(o)}))}(I)}var t,n,r;return function(){I.current&&(I.current.dispose(),I.current=null)}}),[j,Z.isLoading,d,N]),t.useEffect((function(){var e=function(){I.current&&I.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),e.jsx(r.Box,F({mt:2},{children:e.jsxs(r.Box,{children:[Z.isLoading&&e.jsx(r.Box,F({mt:2,className:E.loadingBox},{children:e.jsx(dV,{className:Y(E.icon,E.inProgressIcon)})})),Z.isError&&e.jsxs(r.Box,F({mt:3},{children:[(c===exports.AppName.YBA||c===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(X)?X:Xl.CLUSTER_LOAD_FETCH_ERROR}),c===exports.AppName.YBM&&e.jsx(kr,{text:Ja(X)?X:Xl.CLUSTER_LOAD_FETCH_ERROR})]})),e.jsxs(r.Box,{children:[Z.isSuccess&&e.jsxs(r.Box,F({id:"".concat(d,"-wrapper"),display:"flex",flexDirection:"row",className:M.metricPanel,onClick:function(e){e.stopPropagation()},width:"100%"},{children:[e.jsx("div",{ref:A,id:d,style:{flexGrow:1,minWidth:0}}),!b&&e.jsxs("div",F({className:M.groupByContainer},{children:[e.jsxs("span",F({className:M.groupByText},{children:["Group By","   "]})),e.jsx(lr,F({value:h,className:Y(M.groupByOperationDropdown,M.overrideDefaultMuiSelect,M.overrideDefaultMuiFormControl)},{children:null==qs?void 0:qs.map((function(t,n){return e.jsx(r.MenuItem,F({value:t,onClick:function(e){S(t),e.stopPropagation()}},{children:Gs[t]}),"".concat(t,"-").concat(n))}))}))]})),b&&e.jsx("div",F({className:M.groupByContainer},{children:Fq.map((function(t,n){var r,i=N===t.value;return e.jsx(e.Fragment,{children:e.jsx(Q,{className:Y(M.chartTypeSelectorButton,i&&M.overrideMuiButton,(r={},r[M.borderBarButton]=0===n,r[M.borderLineButton]=1===n,r)),"data-testid":"DbLoadHeader-".concat(n),onClick:function(){var e;e=t.value,L(e)},size:"medium",variant:"secondary",startIcon:e.jsx("img",{src:t.value===exports.ChartType.BAR?"data:image/svg+xml,%3csvg width='18' height='16' viewBox='0 0 18 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0.599976 6.43334V14.6M5.93331 0.600006V14.6M11.2666 6.43334V14.6M16.6 0.600006V14.6' stroke='%232B59C3' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19.6 10.6L13.8724 4.62478C13.6553 4.39833 13.5468 4.28511 13.4159 4.22658C13.3003 4.17493 13.1729 4.15363 13.0464 4.16477C12.903 4.1774 12.7621 4.2489 12.4804 4.3919L7.7196 6.80811C7.43784 6.95111 7.29696 7.02261 7.15357 7.03524C7.027 7.04639 6.89966 7.02508 6.78409 6.97343C6.65315 6.91491 6.54462 6.80168 6.32755 6.57523L0.599976 0.600006' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Chart Type Icon",style:{color:i?"#2b59c3":"#0B1117"}})})})}))}))]})),!m&&e.jsx(r.Box,F({mt:2,mb:1.5},{children:e.jsx(Nq,{isAshSupported:v})}))]})]})}))},Wq=r.makeStyles((function(e){return{modal:{display:"flex",justifyContent:"flex-end"},paper:{width:"50vw",height:"100vh",backgroundColor:e.palette.background.paper,padding:e.spacing(2),overflowY:"auto",boxShadow:e.shadows[5],display:"flex",flexDirection:"column"},content:{flexGrow:1},footer:{paddingTop:e.spacing(2),borderTop:"1px solid #ccc",textAlign:"right"},search:{top:0,position:"sticky",padding:e.spacing(2,0),backgroundColor:e.palette.background.paper,zIndex:1},container:{border:"1px solid ".concat(e.palette.grey[200]),borderRadius:e.shape.borderRadius},itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},group:{"&:not(:first-child)":{borderTop:"1px solid ".concat(e.palette.grey[200])}},groupHeader:{height:44,padding:e.spacing(0,3),display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:r.alpha(e.palette.grey[200],.25)},iconRotate:{transform:"rotate(180deg)"},item:{paddingLeft:e.spacing(2)}}})),Yq=function(n){var i=n.open,o=n.selectedTabIndex,a=n.metricMeasure,s=n.onClose,l=n.onSubmit,u=n.metricResources,c=Wq(),d=a===exports.MetricMeasure.OUTLIER_TABLES,p=a===exports.MetricMeasure.OUTLIER_DB,h=d||p?d?jl[o]:Fl[o]:Bl[o],f=Hl.reduce((function(e,t){return e[t.name]=t.name===h,e}),{}),g=t.useState(f),m=g[0],v=g[1],y=function(){var e=d||p?d?sessionStorage.getItem(Gl):sessionStorage.getItem(ql):sessionStorage.getItem(Yl);if(e)return JSON.parse(e);var t={};return u.forEach((function(e){e.metrics.forEach((function(e){t[e]=!0}))})),t},x=t.useState(""),_=x[0],b=x[1],w=t.useState(y),S=w[0],C=w[1];t.useEffect((function(){C(y())}),[i]);var T=t.useMemo((function(){return u.map((function(e){var t=e.metrics.filter((function(e){return e.toLowerCase().includes(_.toLowerCase())}));return 0===t.length?null:F(F({},e),{metrics:t})})).filter(Boolean)}),[u,_]),M=0===T.length;return e.jsx(xs,F({open:i,isSidePanel:!0,title:"Add and Remove Charts",onClose:s,enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},onSubmit:function(){sessionStorage.setItem(d||p?d?Gl:ql:Yl,JSON.stringify(S)),l(S),s()},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,F({paddingLeft:2,paddingRight:2,paddingBottom:2},{children:e.jsxs(r.Box,F({className:c.itemsContainer},{children:[e.jsx(r.Box,F({className:c.search},{children:e.jsx(Tt,{fullWidth:!0,placeholder:"Search",value:_,inputProps:{"data-testid":"MetricsSelectionSearch"},InputProps:{startAdornment:e.jsx(r.InputAdornment,F({position:"end"},{children:e.jsx(cq,{})}))},onChange:function(e){b(e.target.value)}})})),M?e.jsx(r.Box,F({textAlign:"center",mt:3,"data-testid":"MetricsSelectionNoResult"},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"No results returned"}))})):e.jsx(r.Box,F({className:c.container},{children:T.map((function(t){if(!t.metrics.length)return null;var n=m[t.name]||!!_;return e.jsxs(r.Box,F({className:c.group},{children:[e.jsxs(r.Box,F({className:c.groupHeader,onClick:function(){return e=t.name,void v((function(t){var n;return F(F({},t),((n={})[e]=!t[e],n))}));var e}},{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center"},{children:e.jsx(r.Typography,F({variant:"body1"},{children:t.title}))})),e.jsx(P.default,{className:Y(n&&c.iconRotate)})]})),e.jsx(r.Collapse,F({in:n},{children:e.jsx(r.Box,F({className:c.itemsContainer},{children:t.metrics.map((function(n){return e.jsx(r.Box,F({className:Y(c.item)},{children:e.jsx(Rr,{name:"".concat(t.name,".").concat(n),label:Wl[n]||n,inputProps:{"data-testid":n},checked:!!S[n],onChange:function(){return e=n,void C((function(t){var n;return F(F({},t),((n={})[e]=!t[e],n))}));var e}})}),n)}))}))}))]}),t.name)}))}))]}))}))}))},Gq="metricsTab",qq=function(i){var o,a,s,l=i.appName,u=i.isMetricsDrawerOpen,c=i.apiUrl,d=i.timezone,p=i.metricMeasure,h=i.dateTimeRange,f=i.filterTrigger,g=i.urlParams,m=i.getClusterDetails,v=i.onEChartsDateSelect,y=i.handleFilterMetrics,x=i.openSelectionModal,_=i.closeSelectionModal,b=Kl(),w=t.useRef([]),S=t.useState(null),C=S[0],T=S[1],M=t.useState(0),E=M[0],I=M[1],A=t.useState(!1),D=A[0],k=A[1],O=m(),R=O.universeUuid,N=O.cluster,L=O.region,P=O.zone,B=O.node,j=O.numNodes,U=O.outlierType;t.useEffect((function(){var e=p===exports.MetricMeasure.OUTLIER_TABLES,t=p===exports.MetricMeasure.OUTLIER_DB,n=e?jl:Bl;if(e||t)I(0),k(!0);else if(p)if(l!==exports.AppName.YBA){var r=window.location.pathname.split("/"),i=r[r.length-1];if(i===Xs.METRICS){var o=n[0];return window.history.replaceState(null,"","".concat(window.location.pathname,"/").concat(o)),I(0),void k(!0)}if(-1!==(c=n.indexOf(i)))I(c),k(!0);else{o=n[0];var a=r.slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(o)),I(0),k(!0)}}else{a=window.location.pathname;var s=new URLSearchParams(window.location.search),u=(o=n[0],s.get(Gq)),c=n.indexOf(u);s.set(Gq,null!=u?u:o),window.history.replaceState(null,"","".concat(a,"?").concat(s.toString())),I(null!=c?c:0),k(!0)}}),[p]);var z=n.useMutation({mutationKey:[exports.QUERY_KEY.fetchMetricsGraphs,R,h],mutationFn:function(e){return uV.fetchGraphs(R,e,c)},onSuccess:function(e){T(e)},onError:function(e){console.error("Failed to fetch metrics",e)}}),H=null===(s=null===(a=null===(o=null==z?void 0:z.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error;return t.useEffect((function(){var e;if(D){var t=Iu(!1,!0,E,m(),null,F(F({},g),{type:null!==(e=g.type)&&void 0!==e?e:null}));t&&z.mutate(t)}}),[p,h,E,L,D,N,P,B,U,j,f]),t.useEffect((function(){return z.isSuccess&&C&&C.length>0&&w.current.length===C.length&&aI(w.current),function(){sI(w.current)}}),[z.isSuccess,C]),e.jsxs(r.Box,F({mt:2,mb:2,mr:2,className:b.metricsBox},{children:[e.jsxs(r.Box,F({display:"flex",alignItems:"center"},{children:[e.jsxs(r.Tabs,F({defaultValue:0,value:E,onChange:function(e,t){if(t!==E){var n=p===exports.MetricMeasure.OUTLIER_TABLES,r=p===exports.MetricMeasure.OUTLIER_DB,i=(n||r?n?jl:Fl:Bl)[t],o=window.location.pathname;if(l!==exports.AppName.YBA){var a=o.split("/").slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(i))}else{var s=new URLSearchParams(window.location.search);s.set(Gq,i),window.history.replaceState(null,"","".concat(o,"?").concat(s.toString()))}I(t)}},"aria-label":"metric tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto",style:{flexGrow:1}},{children:[(p===exports.MetricMeasure.OVERALL||p===exports.MetricMeasure.OUTLIER)&&Bl.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==Hl?void 0:Hl.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(b.causeTabButton),wrapper:b.causeTabLabelWrapper}},t)})),p===exports.MetricMeasure.OUTLIER_TABLES&&jl.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==Ul?void 0:Ul.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(b.causeTabButton),wrapper:b.causeTabLabelWrapper}},t)})),p===exports.MetricMeasure.OUTLIER_DB&&Fl.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==zl?void 0:zl.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(b.causeTabButton),wrapper:b.causeTabLabelWrapper}},t)}))]})),e.jsx(Q,F({variant:l===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(sq,{}),size:"medium",onClick:x,"data-testid":"GenericHeader-AddChartsBtn"},{children:"Add and Remove Charts"}))]})),z.isLoading&&e.jsx(r.Box,F({mt:2,className:b.loadingBox},{children:e.jsx(dV,{className:Y(b.icon,b.inProgressIcon)})})),z.isError&&e.jsxs(r.Box,F({mt:4},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(H)?H:Xl.METRICS_GRAPHS_FETCH_ERROR}),l===exports.AppName.YBM&&e.jsx(kr,{text:Ja(H)?H:Xl.METRICS_GRAPHS_FETCH_ERROR})]})),z.isSuccess&&e.jsx(r.Box,F({className:Y(b.gridBox,b.gridBoxDouble)},{children:null==C?void 0:C.map((function(t,n){if(Ja(null==t?void 0:t.errorMessage))return e.jsx(r.Box,{});var i=Mu(p,t,exports.GraphType.MULTI_SUPPORTING,!0,[],!0);return e.jsx(r.Box,F({style:{marginTop:"16px",marginRight:"16px",border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(r.Box,{children:e.jsx(DU,{metricData:t,metricKey:t.name,containerWidth:null,metricMeasure:p,operations:p===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,registerChartInstance:function(e){return function(e,t){w.current[t]=e}(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,dateTimeRange:h,groupByOperations:i.groupByOperations,appName:l,timezone:d,isHistoricalQueryView:!1,onEChartsDateSelect:v,showTitle:!0},"".concat(t.name,"-").concat(p))},"TopKMetricsView-".concat(n))}))}))})),u&&e.jsx(Yq,{onSubmit:y,metricResources:p===exports.MetricMeasure.OUTLIER_TABLES||p===exports.MetricMeasure.OUTLIER_DB?p===exports.MetricMeasure.OUTLIER_TABLES?Ul:zl:Hl,open:u,onClose:_,selectedTabIndex:E,metricMeasure:p})]}))},Qq=C.default.memo((function(n){var i,o,a,s=n.universeUuid,l=n.appName,u=n.timezone,c=n.apiUrl,d=n.onEChartsDateSelect,p=n.getClusterDetails,h=new URLSearchParams(window.location.search),f={startTime:h.get("startTime"),endTime:h.get("endTime"),duration:h.get("duration"),dbId:h.get("dbId"),queryId:void 0,userId:h.get("userId"),type:h.get("type"),universeId:s},g=t.useState(0),m=g[0],v=g[1],y=t.useState(!1),x=y[0],_=y[1];t.useEffect((function(){var e=sessionStorage.getItem(Yl),t=sessionStorage.getItem(Gl),n=sessionStorage.getItem(ql);if(!e){var r={};Hl.forEach((function(e){e.metrics.forEach((function(e){r[e]=!0}))})),sessionStorage.setItem(Yl,JSON.stringify(r))}if(!t){var i={};Ul.forEach((function(e){e.metrics.forEach((function(e){i[e]=!0}))})),sessionStorage.setItem(Gl,JSON.stringify(i))}if(!n){var o={};zl.forEach((function(e){e.metrics.forEach((function(e){o[e]=!0}))})),sessionStorage.setItem(ql,JSON.stringify(o))}}),[]);return e.jsx(r.Box,{children:e.jsx(qq,{apiUrl:c,isMetricsDrawerOpen:x,appName:l,timezone:u,metricMeasure:null===(i=p())||void 0===i?void 0:i.metricMeasure,dateTimeRange:{startDateTime:null===(o=p())||void 0===o?void 0:o.formattedStartDate,endDateTime:null===(a=p())||void 0===a?void 0:a.formattedEndDate},urlParams:f,filterTrigger:m,onEChartsDateSelect:d,openSelectionModal:function(){return _(!0)},closeSelectionModal:function(){return _(!1)},getClusterDetails:p,handleFilterMetrics:function(){v((function(e){return e+1}))}})})})),Zq=r.makeStyles((function(e){return{tabsContainer:{display:"flex",alignItems:"center",width:"100%",boxShadow:"inset 0px -1px 0px 0px ".concat(e.palette.grey[300]),"& .MuiTabs-fixed":{boxShadow:"none"}},tabButton:{textAlign:"left",marginRight:e.spacing(1),minHeight:e.spacing(4),maxHeight:e.spacing(4),marginBottom:e.spacing(.5),padding:e.spacing(0,2),boxSizing:"border-box","&:hover":{boxShadow:"none",borderRadius:e.shape.borderRadius},"& .Mui-selected":{background:e.palette.grey[300],borderRadius:e.spacing(1)},"& .MuiTab-wrapper":{alignItems:"center",display:"contents"}},tabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117",flexDirection:"row",alignItems:"center",justifyContent:"center"},tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"0px 24px 4px 16px",backgroundColor:"#FFFFFF",marginTop:e.spacing(2)},expandAllButton:{fontSize:"13px",fontWeight:600},detectionButton:{marginRight:e.spacing(2),marginLeft:e.spacing(2)},noteText:{fontSize:"11.5px",fontWeight:600,fontStyle:"semibold",fontFamily:"Inter",letterSpacing:"0px"},warningText:{fontSize:"11.5px",fontWeight:400,fontStyle:"regular",fontFamily:"Inter",letterSpacing:"0px"}}})),Xq=function(i){var o,a,l,u,c,d=i.startTime,p=i.endTime,h=i.universeUuid,f=i.appName,g=i.timezone,m=i.apiUrl,v=i.isAshEnabled,y=i.isAshSupported,x=i.queryType,_=i.dbWaitEventType,b=i.onClickShowMoreAnomalies,w=i.onEChartsDateSelect,S=i.onSelectedIssue,C=i.onSelectedQuery,T=i.notifyTabChange,M=i.getClusterDetails,E=Zq(),I=Kl(),A=t.useState([]),D=A[0],k=A[1],O=t.useState(null),R=O[0],N=O[1],L=t.useState((u=window.location.pathname,c=exports.InsightsTabs.CLUSTER_LOAD,u.includes("/".concat(Xs.METRICS))&&(c=exports.InsightsTabs.METRICS),u.includes("/".concat(Xs.INSIGHTS))&&(c=exports.InsightsTabs.INSIGHTS),u.includes("/".concat(Xs.CLUSTER_LOAD_DB))&&(c=exports.InsightsTabs.CLUSTER_LOAD_DB),u.includes("/".concat(Xs.CLUSTER_LOAD))&&(c=exports.InsightsTabs.CLUSTER_LOAD),c)),P=L[0],B=L[1],j=t.useState(!1),U=j[0],z=j[1],H=t.useState(Object.values(exports.InsightsTabs)),V=H[0],W=H[1],G=t.useState(qs[0]),q=G[0],Z=G[1],X=t.useState(exports.ClusterLoadTabs.QUERIES),$=X[0],K=X[1],J=t.useState(null);J[0];var ee=J[1],te=t.useState(exports.AnomalyDetectionStatusText.EMPTY),ne=te[0],re=te[1],ie=M(),oe=ie.cluster,ae=ie.region,se=ie.zone,le=ie.node,ue=function(e){k(e)},ce=function(e,t,n){var r=Object.values(exports.InsightsTabs);return t||(r=r.filter((function(e){return e!==exports.InsightsTabs.METRICS}))),n||(r=r.filter((function(e){return e!==exports.InsightsTabs.CLUSTER_LOAD_DB}))),r},de=function(e){Z(e)};n.useQuery(exports.QUERY_KEY.fetchAnomalyDetectionStatus,(function(){return uV.fetchAnomalyDetectionStatus(h,m)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||es(t))ee(null);else{var n=new Date(t),r=ss(n,as,g);ee(r)}re(e.status)},onError:function(e){console.error("Failed to fetch anomaly detection status",e)},refetchOnWindowFocus:!0,refetchInterval:1e4,enabled:ne!==exports.AnomalyDetectionStatusText.SUCCESS});var pe=n.useMutation((function(){return uV.scheduleAnomalyDetectionStatus(h,m)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||es(t))ee(null);else{var n=new Date(t),r=ss(n,as,g);ee(r)}re(e.status)},onError:function(e){var t,n,r,i;tq.error(Ja(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)?null===(i=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.error:Xl.ANOMALY_SCHEDULE_ERROR)}}),he=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroups,d],(function(){return uV.fetchAnomalyGroups(h,d,p,P===exports.InsightsTabs.INSIGHTS?exports.AnomalyTypeFilter.INSIGHT:exports.AnomalyTypeFilter.PERF_ANOMALY,M,m)}),{onSuccess:function(e){N(e)}}),fe=null===(l=null===(a=null===(o=null==he?void 0:he.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===l?void 0:l.error;n.useQuery([exports.QUERY_KEY.fetchSpecificRuntimeConfigs],(function(){return uV.fetchSpecificRuntimeConfigs(_l,[bl.SHOW_QUERIES_VIEW,bl.SHOW_TOPK_METRICS_VIEW,bl.SHOW_DB_CLUSTER_LOAD_VIEW],m)}),{onSuccess:function(e){var t,n,r,i="true"===(null===(t=null==e?void 0:e.find((function(e){return e.path===bl.SHOW_TOPK_METRICS_VIEW})))||void 0===t?void 0:t.value),o=(null===(n=null==e?void 0:e.find((function(e){return e.path===bl.SHOW_QUERIES_VIEW})))||void 0===n||n.value,"true"===(null===(r=null==e?void 0:e.find((function(e){return e.path===bl.SHOW_DB_CLUSTER_LOAD_VIEW})))||void 0===r?void 0:r.value));W(ce(0,!!i,!o))},onError:function(){W(ce(0,!1,!1))}}),t.useEffect((function(){ne===exports.AnomalyDetectionStatusText.SUCCESS&&he.refetch()}),[ne]),t.useEffect((function(){(P===exports.InsightsTabs.CLUSTER_LOAD&&$===exports.ClusterLoadTabs.ANOMALIES||P===exports.InsightsTabs.INSIGHTS)&&he.refetch()}),[d,p,P,oe,ae,se,le]),t.useEffect((function(){var e=window.location.pathname,t=new URLSearchParams(window.location.search).get("tab");if(e.includes("/".concat(Xs.CLUSTER_LOAD))||t===Xs.CLUSTER_LOAD){B(exports.InsightsTabs.CLUSTER_LOAD),T(exports.InsightsTabs.CLUSTER_LOAD);var n=e.endsWith("/".concat(Xs.CLUSTER_LOAD,"/").concat(Xs.ANOMALIES));if(K(n?exports.ClusterLoadTabs.ANOMALIES:exports.ClusterLoadTabs.QUERIES),e.endsWith("/".concat(Xs.CLUSTER_LOAD))){var r=new URLSearchParams(window.location.search).toString(),i="".concat(e,"/").concat(Xs.QUERIES).concat(r?"?".concat(r):"");window.history.replaceState(null,"",i)}}else if(e.includes("/".concat(Xs.CLUSTER_LOAD_DB))||t===Xs.CLUSTER_LOAD_DB)B(exports.InsightsTabs.CLUSTER_LOAD_DB),T(exports.InsightsTabs.CLUSTER_LOAD_DB);else if(e.includes("/".concat(Xs.METRICS))||t===Xs.METRICS)B(exports.InsightsTabs.METRICS),T(exports.InsightsTabs.METRICS);else if(e.includes("/".concat(Xs.INSIGHTS))||t===Xs.INSIGHTS)B(exports.InsightsTabs.INSIGHTS),T(exports.InsightsTabs.INSIGHTS);else if(f!==exports.AppName.YBA){r=new URLSearchParams(window.location.search).toString(),i="".concat(e,"/").concat(Xs.QUERIES).concat(r?"?".concat(r):"");window.history.replaceState(null,"",i)}}),[]);var ge=function(t){switch(t){case exports.InsightsTabs.METRICS:return e.jsx(Qq,{universeUuid:h,appName:f,timezone:g,apiUrl:m,onEChartsDateSelect:w,getClusterDetails:M});case exports.InsightsTabs.INSIGHTS:return e.jsx(r.Box,{mt:.5});case exports.InsightsTabs.CLUSTER_LOAD:case exports.InsightsTabs.CLUSTER_LOAD_DB:return e.jsx(r.Box,{children:e.jsx(Vq,{dbWaitEventType:_,isDbClusterLoadView:t===exports.InsightsTabs.CLUSTER_LOAD_DB,startTime:d,endTime:p,apiUrl:m,universeUuid:h,appName:f,metricKey:"cluster_load",groupByOperation:q,shouldAbbreviateTraceName:!0,timezone:g,isAshEnabled:v,isAshSupported:y,onFilterBarData:ue,onSetGroupByOperation:de,onEChartsDateSelect:w,getClusterDetails:M})});default:return null}};return e.jsxs(r.Box,F({className:E.tabBox},{children:[f===exports.AppName.WEB&&e.jsx(r.Box,{children:e.jsxs(s.TabContext,F({value:P},{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center",className:E.tabsContainer,mt:1.5},{children:e.jsx(r.Tabs,F({value:P,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){if(t!==P){B(t),T(t);var n=window.location.pathname,r=new URLSearchParams(window.location.search).toString();n=n.replace(/\/anomalies|\/dbLoad\/?|\/insights|\/metricsNew(\/[^/]+)?|\/clusterLoad(\/[^/]+)?|\/queries/g,""),t===exports.InsightsTabs.METRICS?n="".concat(n,"/").concat(Xs.METRICS).concat(r?"?".concat(r):""):t===exports.InsightsTabs.INSIGHTS?n="".concat(n,"/").concat(Xs.INSIGHTS).concat(r?"?".concat(r):""):t===exports.InsightsTabs.CLUSTER_LOAD?n="".concat(n,"/").concat(Xs.CLUSTER_LOAD,"/").concat(Xs.QUERIES).concat(r?"?".concat(r):""):t===exports.InsightsTabs.CLUSTER_LOAD_DB&&(n="".concat(n,"/").concat(Xs.CLUSTER_LOAD_DB).concat(r?"?".concat(r):"")),window.history.pushState(null,"",n)}}},{children:V.map((function(t,n){return e.jsx(r.Tab,{"data-testid":"".concat(t,"Tab"),value:t,label:t,classes:{root:Y(E.tabButton),wrapper:E.tabLabelWrapper}},n)}))}))})),e.jsx(s.TabPanel,F({className:I.tabPanelPrimary,value:exports.InsightsTabs.METRICS},{children:ge(exports.InsightsTabs.METRICS)})),e.jsx(s.TabPanel,F({className:I.tabPanelPrimary,value:exports.InsightsTabs.CLUSTER_LOAD},{children:ge(exports.InsightsTabs.CLUSTER_LOAD)})),e.jsx(s.TabPanel,F({className:I.tabPanelPrimary,value:exports.InsightsTabs.CLUSTER_LOAD_DB},{children:ge(exports.InsightsTabs.CLUSTER_LOAD_DB)}))]}))}),(f===exports.AppName.YBM||f===exports.AppName.YBA)&&e.jsx(e.Fragment,{children:ge(P)}),P===exports.InsightsTabs.CLUSTER_LOAD&&e.jsxs(r.Box,{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center",className:E.tabsContainer,mt:5},{children:e.jsxs(r.Tabs,F({value:$,onChange:function(e,t){if(t!==$){var n=window.location.pathname,r=new URLSearchParams(window.location.search).toString();if(K(t),P===exports.InsightsTabs.CLUSTER_LOAD){n=n.replace(/\/(clusterLoad(\/(anomalies|queries))?|anomalies|queries)$/,"");var i="";t===exports.ClusterLoadTabs.ANOMALIES?i="/".concat(Xs.CLUSTER_LOAD,"/").concat(Xs.ANOMALIES):t===exports.ClusterLoadTabs.QUERIES&&(i="/".concat(Xs.CLUSTER_LOAD,"/").concat(Xs.QUERIES)),n="".concat(n).concat(i).concat(r?"?".concat(r):"")}window.history.pushState(null,"",n)}},indicatorColor:"primary",textColor:"primary",style:{borderBottom:"0.5px solid #e0e0e0"}},{children:[e.jsx(r.Tab,{classes:{root:Y(E.tabButton),wrapper:E.tabLabelWrapper},icon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.5 4.5C4.237 4.5 3.214 5.523 3.214 6.786V11.357L1 12.5L3.214 13.643V18.214C3.214 19.477 4.237 20.5 5.5 20.5' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M18.4995 4.47221C19.7625 4.47221 20.7855 5.49521 20.7855 6.75821V11.3292L22.9995 12.4722L20.7855 13.6152V18.1862C20.7855 19.4492 19.7625 20.4722 18.4995 20.4722' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3crect x='7' y='14.5' width='2' height='3' rx='0.5' fill='%230B1117'/%3e%3crect x='11' y='11.5' width='2' height='6' rx='0.5' fill='%230B1117'/%3e%3crect x='15' y='7.5' width='2' height='10' rx='0.5' fill='%230B1117'/%3e%3c/svg%3e",alt:"Queries Icon",style:{marginRight:"8px"}}),value:exports.ClusterLoadTabs.QUERIES,label:exports.ClusterLoadTabs.QUERIES}),e.jsx(r.Tab,{classes:{root:Y(E.tabButton),wrapper:E.tabLabelWrapper},icon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='5.94943' cy='5.62132' r='2' transform='rotate(-135 5.94943 5.62132)' stroke='%230B1117'/%3e%3ccircle cx='8.94943' cy='12.6213' r='2' transform='rotate(-135 8.94943 12.6213)' stroke='%230B1117'/%3e%3ccircle cx='11.9494' cy='19.6213' r='2' transform='rotate(-135 11.9494 19.6213)' stroke='%230B1117'/%3e%3ccircle cx='13.1916' cy='5.62132' r='2' transform='rotate(-135 13.1916 5.62132)' stroke='%230B1117'/%3e%3ccircle cx='16.1916' cy='12.6213' r='2' transform='rotate(-135 16.1916 12.6213)' stroke='%230B1117'/%3e%3ccircle cx='19.1916' cy='19.6213' r='2' transform='rotate(-135 19.1916 19.6213)' stroke='%230B1117'/%3e%3ccircle cx='4.12131' cy='19.6213' r='2' transform='rotate(-135 4.12131 19.6213)' fill='%230B1117' stroke='%230B1117'/%3e%3c/svg%3e",alt:"Anomalies Icon",style:{marginRight:"8px"}}),value:exports.ClusterLoadTabs.ANOMALIES,label:exports.ClusterLoadTabs.ANOMALIES})]}))})),$===exports.ClusterLoadTabs.QUERIES&&e.jsx(r.Box,F({mt:2},{children:e.jsx(kq,{universeUuid:h,groupByOperation:q,apiUrl:m,startTime:d,endTime:p,appName:f,filteredLegends:D,queryType:x,onSelectedQuery:C,getClusterDetails:M})})),$===exports.ClusterLoadTabs.ANOMALIES&&e.jsx(r.Box,{mt:2})]}),(P===exports.InsightsTabs.INSIGHTS||P===exports.InsightsTabs.CLUSTER_LOAD&&$===exports.ClusterLoadTabs.ANOMALIES)&&e.jsxs(r.Box,F({mt:3,className:I.dataBox},{children:[e.jsxs(r.Box,F({display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},{children:[e.jsx(r.Box,F({display:"flex",flexDirection:"column"},{children:e.jsx(r.Box,{children:e.jsx(r.Typography,F({variant:"h5"},{children:P===exports.InsightsTabs.INSIGHTS?"Insights":"Detected Anomalies"}))})})),e.jsxs(r.Box,{children:[e.jsx(Q,F({variant:f===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx("img",{src:U?"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4.70711L3.85355 7.85355C3.65829 8.04882 3.34171 8.04882 3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645L7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L11.8536 7.14645C12.0488 7.34171 12.0488 7.65829 11.8536 7.85355C11.6583 8.04882 11.3417 8.04882 11.1464 7.85355L8 4.70711L8 15.5C8 15.7761 7.77614 16 7.5 16C7.22386 16 7 15.7761 7 15.5L7 4.70711ZM0.5 1C0.223858 1 1.81543e-07 0.776142 1.84836e-07 0.5C1.88129e-07 0.223858 0.223858 2.66948e-09 0.5 5.96244e-09L14.5 1.72911e-07C14.7761 1.76204e-07 15 0.223858 15 0.5C15 0.776142 14.7761 1 14.5 1L0.5 1Z' fill='%232B59C3'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 0.5C7 0.223857 7.22386 -3.39906e-07 7.5 -3.27835e-07C7.77614 -3.15765e-07 8 0.223857 8 0.5L8 11.2929ZM14.5 15C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16L0.499999 16C0.223857 16 -6.89597e-07 15.7761 -6.77527e-07 15.5C-6.65456e-07 15.2239 0.223857 15 0.499999 15L14.5 15Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Expand Icon"}),onClick:function(){z(!U)}},{children:e.jsx("span",F({className:E.expandAllButton},{children:U?"Collapse All":"Expand All"}))})),e.jsx(Q,F({variant:"primary",size:"medium",onClick:function(){pe.mutate()},className:E.detectionButton,disabled:ne===exports.AnomalyDetectionStatusText.SCHEDULED||ne===exports.AnomalyDetectionStatusText.IN_PROGRESS,showSpinner:ne===exports.AnomalyDetectionStatusText.SCHEDULED||ne===exports.AnomalyDetectionStatusText.IN_PROGRESS,startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_436_182000)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7.5C4 7.77614 3.77614 8 3.5 8C3.22386 8 3 7.77614 3 7.5V5.5C3 4.11929 4.11929 3 5.5 3H7.5C7.77614 3 8 3.22386 8 3.5C8 3.77614 7.77614 4 7.5 4H5.5C4.67157 4 4 4.67157 4 5.5V7.5ZM16.5 4C16.2239 4 16 3.77614 16 3.5C16 3.22386 16.2239 3 16.5 3H18.5C19.8807 3 21 4.11929 21 5.5V7.5C21 7.77614 20.7761 8 20.5 8C20.2239 8 20 7.77614 20 7.5V5.5C20 4.67157 19.3284 4 18.5 4H16.5ZM20 16.5C20 16.2239 20.2239 16 20.5 16C20.7761 16 21 16.2239 21 16.5V18.5C21 19.8807 19.8807 21 18.5 21H16.5C16.2239 21 16 20.7761 16 20.5C16 20.2239 16.2239 20 16.5 20H18.5C19.3284 20 20 19.3284 20 18.5V16.5ZM7.5 20C7.77614 20 8 20.2239 8 20.5C8 20.7761 7.77614 21 7.5 21H5.5C4.11929 21 3 19.8807 3 18.5V16.5C3 16.2239 3.22386 16 3.5 16C3.77614 16 4 16.2239 4 16.5V18.5C4 19.3284 4.67157 20 5.5 20H7.5Z' fill='white'/%3e%3cpath d='M12 7L12 9' stroke='white' stroke-linecap='round'/%3e%3cpath d='M12 15L12 17' stroke='white' stroke-linecap='round'/%3e%3cpath d='M7 12L9 12' stroke='white' stroke-linecap='round'/%3e%3cpath d='M15 12L17 12' stroke='white' stroke-linecap='round'/%3e%3ccircle cx='12' cy='12' r='3.5' stroke='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_436_182000'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",alt:"Detection Icon"})},{children:"Run Detection"}))]}),he.isLoading&&e.jsx(r.Box,F({mt:2,className:I.loadingBox},{children:e.jsx(dV,{className:Y(I.icon,I.inProgressIcon)})})),he.isError&&e.jsxs(r.Box,F({mt:2},{children:[(f===exports.AppName.YBA||f===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(fe)?fe:Xl.ANOMALIES_FETCH_ERROR}),f===exports.AppName.YBM&&e.jsx(kr,{text:Ja(fe)?fe:Xl.ANOMALIES_FETCH_ERROR})]}))]})),he.isSuccess&&(Ka(null==R?void 0:R.groups)?e.jsx(hV,{name:"gant-chart-insights",sourceData:null!=R?R:[],expandAll:U,showMoreOptions:!0,onClickShowMoreAnomalies:b,startTime:d,endTime:p,onSelectedIssue:S,appName:f,currentTab:P,isInsightsTab:P===exports.InsightsTabs.INSIGHTS},"gant-chart-insights"):e.jsx(r.Box,F({mt:2},{children:"No Anomalies were detected"})))]}))]}))},$q=r.makeStyles((function(e){return{tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"24px 24px 24px 16px",backgroundColor:"#FFFFFF",margin:e.spacing(3)}}})),Kq=function(i){var a,s,l,u,c,d=i.showMoreAnomalyCategory,p=i.selectedTab,h=i.startTime,f=i.endTime,g=i.apiUrl,m=i.universeUuid,v=i.appName,y=i.onClickShowMoreAnomalies,x=i.onSelectedIssue,_=$q(),b=Kl(),w=t.useState(null),S=w[0],C=w[1],T=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsByType,h,f],(function(){return uV.fetchAnomalyGroupsByType(m,h,f,d,g)}),{onSuccess:function(e){C(e)}}),M=null===(l=null===(s=null===(a=null==T?void 0:T.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;return e.jsxs(r.Box,F({className:_.tabBox},{children:[e.jsxs(r.Breadcrumbs,F({className:b.breadCrumb,separator:e.jsx(r.Typography,F({variant:"body2"},{children:"/"})),"aria-label":"breadcrumb","data-testid":"PrimaryDashboardBreadcrumb"},{children:[e.jsx(r.Link,F({className:b.breadcrumbColor,component:FW,variant:"h5",onClick:function(){y(null),window.history.pushState({},"",window.location.href)},to:"#"},{children:e.jsx("span",F({className:b.breadCrumbText},{children:p===exports.InsightsTabs.CLUSTER_LOAD?"Anomalies":"Insights"}))})),e.jsx(r.Typography,F({variant:"h5"},{children:e.jsx("span",F({className:Y(b.breadCrumbText,b.anomalyCategoryText)},{children:"".concat(null===(c=null===(u=null==S?void 0:S[0])||void 0===u?void 0:u.lastInstance)||void 0===c?void 0:c.title)||"".concat(wl[d])}))}))]})),e.jsxs(r.Box,F({mt:3},{children:[T.isLoading&&e.jsx(r.Box,{children:e.jsx(dV,{className:Y(b.icon,b.inProgressIcon)})}),T.isError&&e.jsxs(r.Box,F({mt:3},{children:[(v===exports.AppName.YBA||v===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(M)?M:Xl.SHOW_MORE_ANOMALIES_FETCH_ERROR}),v===exports.AppName.YBM&&e.jsx(kr,{text:Ja(M)?M:Xl.SHOW_MORE_ANOMALIES_FETCH_ERROR})]})),T.isSuccess&&($a(S)?e.jsxs(r.Box,{children:[e.jsxs(r.Box,F({display:"flex",alignItems:"center",mb:2,style:{marginLeft:"12px"},onClick:function(){if($a(S)){var e=null==S?void 0:S.map((function(e){var t;return null===(t=e.lastInstance)||void 0===t?void 0:t.entityDisplayName})).filter(Boolean).join("\n");navigator.clipboard.writeText(e)}}},{children:[e.jsx(o.FileCopy,{style:{cursor:"pointer",height:16,width:16}}),e.jsx(r.Typography,F({variant:"body2",style:{marginLeft:8,textDecoration:"underline",cursor:"pointer"}},{children:"Copy all entities"}))]})),e.jsx(hV,{name:"gant-chart-show-more-anomalies",sourceData:null!=S?S:[],showMoreOptions:!1,expandAll:!0,startTime:h,endTime:f,onSelectedIssue:x,appName:v,viewAllAnomalies:!0},"gant-chart-show-more-anomalies")]}):e.jsx(r.Box,{children:"No Anomalies were detected"}))]}))]}))},Jq=[{value:"ALL",label:"All"},{value:"IO",label:"IO"},{value:"CPU",label:"CPU"}],eQ=i.makeStyles((function(e){return{outlierSelectorButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",fontSize:"13px !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},borderOverallButton:{borderRadius:"8px 0px 0px 8px"},borderOutlierButton:{borderRadius:"0px 8px 8px 0px"},input:{width:"60px",height:"32px"}}})),tQ=function(n){var i=n.onChangeDbWaitEventType,o=eQ(),a=t.useState(0),s=a[0],l=a[1];return e.jsx(r.Box,F({ml:2,display:"flex",flexDirection:"row"},{children:Jq.map((function(t,n){var r,a=s===n;return e.jsx(e.Fragment,{children:e.jsx(Q,F({className:Y(o.outlierSelectorButton,a&&o.overrideMuiButton,(r={},r[o.borderOverallButton]=0===n,r[o.borderOutlierButton]=n===Jq.length-1,r)),"data-testid":"DbLoadHeader-".concat(n),onClick:function(){i(t.value),l(n)},size:"medium",variant:"secondary"},{children:t.label}))})}))}))},nQ=i.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),rQ=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=nQ(),c=n.useMutation((function(){return uV.deleteUniverseMetadata(i.id,a)}),{onSuccess:function(){tq.success("Universe removed successfully, no further troubleshooting on this universe willbe performed"),l(),s()},onError:function(e){var t,n,r;tq.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Not able to remove universe, please try again")}});return e.jsx(xs,F({open:o,onClose:s,title:"Remove Universe",onSubmit:function(){return z(void 0,void 0,void 0,(function(){return H(this,(function(e){return c.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Remove",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:u.root,dividers:!0}},{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"Are you sure you want to remove the universe ".concat(i.id," from Perf Advisor service ?")}))}))}))};!function(e){e.ACTIVE="Active",e.INACTIVE="Inactive"}(Bq||(Bq={}));var iQ=i.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},tagGreen:{backgroundColor:"#CDEFE1"},tagRed:{backgroundColor:"#FDE2E2"},tagTextGreen:{color:"#097245"},tagTextRed:{color:"#8F0000"},statusText:{fontFamily:"Inter",fontStyle:"normal",fontSize:"13px"},statusBox:{display:"flex",flexDirection:"row",alignItems:"center",height:"24px",borderRadius:"6px",padding:"10px 6px",width:"fit-content"},flexColumn:{display:"flex",flexDirection:"row"},tooltip:{marginLeft:e.spacing(.5)}}})),oQ=function(n){var i=n.metadata,o=n.apiUrl;n.customerUuid;var a=n.universeList,s=n.onActionPerformed,l=iQ(),u=Kl(),c=t.useState(!1),d=c[0],p=c[1],h=t.useState([]),f=h[0],g=h[1],m=t.useState(yl[0]),v=m[0],y=m[1],x=t.useState(""),_=x[0];x[1];var b=t.useState(0),w=b[0],S=b[1],C=t.useState(null),T=C[0],M=C[1],E=t.useState(i),I=E[0],A=E[1];return t.useEffect((function(){var e=i.map((function(e){var t,n=a.find((function(t){return e.id===t.universeUUID}));return e.name=null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"",e.lastSyncError=null==n?void 0:n.lastSyncError,e}));A(e)}),[a,i]),t.useEffect((function(){g([{name:"id",label:"Universe UUID",options:{sort:!0,display:!0}},{name:"name",label:"Universe Name",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"160px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t,n){var r=n.rowIndex,i=I[r],o=null==i?void 0:i.id;return e.jsx("a",F({href:"/universes/".concat(o,"/perfAdvisor?tab=").concat(Xs.ANOMALIES)},{children:t}))}}},{name:"dataMountPoints",label:"Data Mount Points",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(u.tableHeaderCell)}}}},{name:"otherMountPoints",label:"Other Mount Points",options:{sort:!1,display:!0}},{name:"lastSyncError",label:"Status",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t){return e.jsx(e.Fragment,{children:t?e.jsxs(r.Box,F({className:l.flexColumn},{children:[e.jsx(r.Box,F({className:Y(l.tagRed,l.statusBox)},{children:e.jsx("span",F({className:Y(l.tagTextRed,l.statusText)},{children:Bq.INACTIVE}))})),e.jsx(r.Tooltip,F({title:t,arrow:!0,placement:"top",className:l.tooltip},{children:e.jsx("img",{src:dq,alt:"info"})}))]})):e.jsx(r.Box,F({className:Y(l.tagGreen,l.statusBox)},{children:e.jsx("span",F({className:Y(l.tagTextGreen,l.statusText)},{children:Bq.ACTIVE}))}))})}}},{name:"",label:"Actions",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx(Q,F({size:"medium",variant:"ghost",onClick:function(){return e=I[i],M(e),void p(!0);var e}},{children:"Unregister"}))})}}}])}),[I]),e.jsxs(r.Box,F({mt:2,className:l.overrideMuiTableContainer},{children:[$a(I)&&$a(f)&&e.jsx(r.Box,F({mt:2},{children:e.jsx(Ds,{title:"Universe Metadata",className:u.overrideMuiTable,data:I,columns:f,options:{filter:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:v,page:w,onChangePage:function(e){return S(e)},onChangeRowsPerPage:function(e){y(e),S(0)},searchText:_,customSearch:function(e,t){for(var n=function(n){var r=String(t[n]).toLocaleLowerCase();if(r.includes(e.toLocaleLowerCase()))return{value:!0};if(n===t.length-1){var i=e.split(" ").filter(Boolean),o=0;return{value:i.every((function(e){var t=r.indexOf(e.toLocaleLowerCase(),o);return t>-1&&(o=t+e.length,!0)}))}}},r=1;r<t.length;r++){var i=n(r);if("object"==typeof i)return i.value}return!1},rowsPerPageOptions:yl}})})),d&&T&&e.jsx(rQ,{onActionPerformed:s,open:d,onClose:function(){p(!1)},data:T,apiUrl:o})]}))},aQ=i.makeStyles((function(e){return{refreshButton:{width:"120px",marginTop:e.spacing(2),alignSelf:"end"},flexColumn:{display:"flex",flexDirection:"column"},noUniverses:{alignSelf:"center"}}})),sQ=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),lQ=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=t.toast,c=sQ(),d=n.useMutation((function(){return uV.deleteRuntimeConfig(_l,null==i?void 0:i.path,a)}),{onSuccess:function(){u.success("Have reset runtime configuration key ".concat(i.path," successfully")),l(),s()},onError:function(e){var t,n,r;u.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot reset runtime configuration key, please try again")}});return e.jsx(xs,F({open:o,onClose:s,title:"Reset Runtime Configuration",onSubmit:function(){return z(void 0,void 0,void 0,(function(){return H(this,(function(e){return d.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Reset",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"Are you sure you want to reset the runtime configuration for the following key ".concat(i.path," ?")}))}))}))},uQ=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),cQ=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=t.toast,c=uQ(),d=Kn({defaultValues:{configValue:(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL?"true"===i.value:i.value},mode:"onChange",reValidateMode:"onChange"}),p=d.control,h=d.handleSubmit,f=n.useMutation((function(e){return uV.updateRuntimeConfig(_l,null==i?void 0:i.path,e.configValue?e.configValue.toString():i.value.toString(),a)}),{onSuccess:function(){u.success("Updated runtime configuration key ".concat(i.path," successfully")),l(),s()},onError:function(e){var t,n,r;u.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot update runtime configuration key, please try again")}}),g=h((function(e){var t={configValue:""};Object.assign(t,i),t.configValue=e.configValue,f.mutate(t)}));return e.jsx(xs,F({open:o,onClose:s,title:"Update Runtime Configuration",onSubmit:g,cancelLabel:"Cancel",submitLabel:"Update",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(Jt,F({},d,{children:e.jsxs(r.Box,F({mt:2},{children:[e.jsx(Ct,{children:"Config Key "}),e.jsx(r.Typography,F({variant:"body2"},{children:i.path})),e.jsxs(r.Box,F({mt:1},{children:[e.jsx(Ct,{children:"Config Value "}),(null==i?void 0:i.type)!==exports.RuntimeConfigType.BOOL&&e.jsx(er,{style:{marginTop:"8px"},name:"configValue",control:p,inputProps:{"data-testid":"UpdateRuntimeConfig-ConfigValue"},fullWidth:!0}),(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL&&e.jsx(ou,{name:"configValue",control:p,inputProps:{"data-testid":"UpdateRuntimeConfig-ConfigValue"}})]}))]}))}))}))},dQ=r.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"90% !important",marginTop:"3px"}},overrideMuiTable:{textAlign:"center","& .MuiTableCell-sizeSmall":{textAlign:"center"}},tooltip:{marginLeft:e.spacing(.5)},textColor:{color:"#303A78"},searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"}}}));exports.ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE="active_session_history_eps_client_node",exports.ACTIVE_SESSION_HISTORY_EPS_GLOBAL=al,exports.ACTIVE_SESSION_HISTORY_QUERY_EVENTS=sl,exports.ALL=Ks,exports.ALL_REGIONS=$s,exports.ALL_ZONES=Js,exports.ANOMALY_CATEGORY_LIST=xl,exports.ANOMALY_FILTER_DURATION_OPTIONS=El,exports.ANOMALY_TAG=Ll,exports.ANOMALY_TYPE_TO_NAME_MAP=wl,exports.ASH=el,exports.ASH_GROUPBY_VALUES=vl,exports.Aggregation=js,exports.BACKGROUND_QUERY_REQUEST_GRAPHS=gl,exports.CATALOG_READ_REQUEST_GRAPH=ml,exports.CATEGORY_HEADER_DATA_MAP=Al,exports.COLORS=Ql,exports.CORES=tl,exports.CPU_CORES=il,exports.CPU_COUNT=ll,exports.CQL_QUERY_REQUEST_GRAPHS=fl,exports.ClusterRegionSelector=gu,exports.ConfigureUniverseMetadata=function(i){var o=i.apiUrl,a=i.customerUuid,s=i.appName,l=void 0===s?exports.AppName.WEB:s,u=aQ(),c=Kl(),d=t.useState([]),p=d[0],h=d[1],f=t.useState([]),g=f[0],m=f[1],v=n.useQueryClient(),y=n.useQuery(exports.QUERY_KEY.fetchUniverseMetadataList,(function(){return uV.fetchUniverseMetadataList(o,a)}),{onSuccess:function(e){h(e)}}),x=y.isIdle,_=y.isLoading,b=y.isError,w=y.refetch,S=n.useQuery(exports.QUERY_KEY.fetchUniverseListDetails,(function(){return uV.fetchUniverseListDetails(o)}),{onSuccess:function(e){m(e)}}),C=S.isIdle,T=S.isLoading,M=S.isError,E=S.refetch;if((b||M)&&e.jsx(wt,{customErrorMessage:"Unable to fetch ".concat(l===exports.AppName.YBM?"cluster":"universe"," details")}),_||T||x&&void 0===p||C&&void 0===g)return e.jsx(r.Box,F({mt:4,className:c.loadingBox},{children:e.jsx(dV,{className:Y(c.icon,c.inProgressIcon)})}));var I=function(){z(void 0,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return v.invalidateQueries(exports.QUERY_KEY.fetchUniverseMetadataList),v.invalidateQueries(exports.QUERY_KEY.fetchUniverseListDetails),[4,w()];case 1:return e.sent(),[4,E()];case 2:return e.sent(),[2]}}))}))};return e.jsx(Ts,{body:e.jsxs(r.Box,F({ml:1,mr:1,mt:1,className:u.flexColumn},{children:[e.jsx(Q,F({variant:"secondary",size:"medium",onClick:function(){I()},className:u.refreshButton},{children:"Refresh"})),Ja(o)&&p.length>0?e.jsx(e.Fragment,{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(oQ,{apiUrl:o,customerUuid:a,metadata:p,universeList:g,onActionPerformed:I})}))}):e.jsx(r.Box,F({className:u.noUniverses},{children:Ja(o)?"Currently, there are no universes attached to Perf Advisor service":"Customer is not registered with Perf Advisor service. Please register and then enable Perf Advisor for universes."}))]}))})},exports.DB_CAPS_TAG_=Dl,exports.DB_TAG=Ol,exports.DEFAULT_ERROR_MESSAGES=Xl,exports.DEFAULT_RECORDS_PER_PAGE=yl,exports.ELLIPSIS="...",exports.GLOBAL_RUNTIME_CONFIG=_l,exports.GROUP_BY_OPERATIONS=qs,exports.GenericFailure=kr,exports.GroupEventsParam=Ns,exports.IN_DEVELOPMENT_MODE=ZH,exports.MAX_OUTLIER_NUM_NODES=10,exports.METRICS_OUTLIER_DATABASES_STORAGE_KEY=ql,exports.METRICS_OUTLIER_TABLES_STORAGE_KEY=Gl,exports.METRICS_SESSION_STORAGE_KEY=Yl,exports.METRIC_DB_RESOURCES_WITH_GRAPHS=zl,exports.METRIC_FONT=rl,exports.METRIC_NAMES=Wl,exports.METRIC_RESOURCES_WITH_GRAPHS=Hl,exports.METRIC_TABLES_RESOURCES_WITH_GRAPHS=Ul,exports.METRIC_TABS=Bl,exports.METRIC_TABS_DATABASES=Fl,exports.METRIC_TABS_TABLES=jl,exports.MIN_OUTLIER_NUM_NODES=3,exports.MORE=Sl,exports.MetricConsts=ol,exports.MetricOrigin={TABLE:"table",CUSTOMER:"customer",UNIVERSE:"universe"},exports.MetricSplitSelector=su,exports.MetricsAnalysisEntry=function(i){var o,a,s,l=i.universeUuid,u=i.troubleshootUuid,c=i.appName,d=i.timezone,p=i.apiUrl,h=i.onSelectedIssue,f=i.onSelectedQuery,g=Kl(),m=t.useState(null),v=m[0],y=m[1],x=t.useState(null),_=x[0],b=x[1],w=t.useState(null),S=w[0],C=w[1],T=t.useState(null),M=T[0],E=T[1],I=t.useState(null),A=I[0],D=I[1],k=new URLSearchParams(window.location.search),O=window.location.pathname,R=null;if(O.includes("/queries/")){var N=O.split("/"),L=N.indexOf("queries");R=N[L+1]||null}c!==exports.AppName.YBM&&c!==exports.AppName.YBA||(R=k.get("queryId"));var P=k.get("dbId"),B=k.get("userId"),j=Ja(R);t.useEffect((function(){localStorage.setItem("appName",c)}),[]);var U=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return uV.fetchUniverseById(l,p)})),z=null===(s=null===(a=null===(o=null==U?void 0:U.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,H=n.useQuery([exports.QUERY_KEY.fetchAnomalies,l],(function(){return uV.fetchAnomaliesById(l,u,p)}),{onSuccess:function(e){y(e),b(function(e){var t,n=null==e?void 0:e.mainGraphs.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n})),r=null===(t=null==e?void 0:e.rcaGuidelines)||void 0===t?void 0:t.map((function(t){var n;return null===(n=t.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(t){var n;return null===(n=t.supportingGraphs)||void 0===n?void 0:n.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n}))}))})),i=null==r?void 0:r.flat(2),o=null==i?void 0:i.filter((function(e){return Ka(e)}));return V(V([],n,!0),o,!0)}(e)),C(function(e){var t,n;if(vu=0,!e)return[];var r=null===(t=null==e?void 0:e.mainGraphs)||void 0===t?void 0:t.length,i=null===(n=null==e?void 0:e.rcaGuidelines)||void 0===n?void 0:n.map((function(e,t){var n,i={cause:"",name:[],groupByControl:[],description:"",index:[],rcaRecommendation:"",title:void 0};return i.name=[],i.groupByControl=[],i.cause=e.possibleCause,i.description=e.possibleCauseDescription,null===(n=e.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(e){var t;return e.supportingGraphs?null===(t=e.supportingGraphs)||void 0===t?void 0:t.map((function(t){return i.name.push(t.name),i.rcaRecommendation=e.recommendation,1===r?i.index.push(Cu()):r>1&&i.index.push(Cu()+r-1),i.title=t.displayName,i.groupByControl.push(t.groupByControl),i})):i}))})),o=null==i?void 0:i.flat(2),a=new Set(o);return Array.from(a)}(e))},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!j&&Ja(u)}),W=H.isLoading,G=H.isError,q=H.isIdle,Q=n.useQuery([exports.QUERY_KEY.fetchQueries,l],(function(){return uV.fetchQueries(l,p,{dbId:P,userId:B,queryId:R})}),{onSuccess:function(e){E(e)},onError:function(e){E([]),console.error("Failed to fetch queries",e)}}),Z=Q.isLoading,X=Q.isError,$=n.useQuery([exports.QUERY_KEY.fetchQueryStats,l],(function(){return uV.fetchQueryStats(l,{dbId:P,queryId:R},p)}),{onSuccess:function(e){D([e])},onError:function(e){D([]),console.error("Failed to fetch query stats",e)},enabled:j}),K=$.isLoading,J=$.isError;return W||K||Z?e.jsx(r.Box,F({mt:2,className:g.loadingBox},{children:e.jsx(dV,{className:Y(g.icon,g.inProgressIcon)})})):G||J||X||z||q&&void 0===v?e.jsxs(r.Box,F({mt:3},{children:[(c===exports.AppName.YBA||c===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:G?Xl.ANOMALIES_FETCH_ERROR:Xl.QUERY_STATS_FETCH_ERROR}),c===exports.AppName.YBM&&e.jsx(kr,{text:G?Xl.ANOMALIES_FETCH_ERROR:Xl.QUERY_STATS_FETCH_ERROR})]})):e.jsx(r.Box,{children:M&&(null==U?void 0:U.data)&&e.jsx(_G,{apiUrl:p,troubleshootUuid:u,anomalyData:v,universeData:null==U?void 0:U.data,universeUuid:l,appName:c,timezone:d,isHistoricalQueryView:j,amomalyGraphRequestParams:_,formattedAnomalyRca:S,universeQueryData:M,universeQueryStatsData:A,queryIdParam:R,onSelectedIssue:h,onSelectedQuery:f})})},exports.NAME_COLOR_MAPPING=Zl,exports.OutlierSelector=uu,exports.PerfAdvisorAPI=uV,exports.PerfAdvisorEntry=function(i){var o,a,s,l,u,c,d,p,h,f,g,m,v=i.timezone,y=i.universeUuid,x=i.appName,_=i.apiUrl,b=i.onSelectedIssue,w=i.onSelectedQuery,S=Kl(),C=new URLSearchParams(window.location.search),T=null==C?void 0:C.get("endTime"),M=T?new Date(T):new Date,E=new Date(M);(null==C?void 0:C.get("startTime"))?E=new Date(C.get("startTime")):E.setDate(E.getDate()-1);var I=t.useState($s),A=I[0],D=I[1],k=t.useState(Js),O=k[0],R=k[1],N=t.useState(!0),L=N[0],P=N[1],B=t.useState(Ks),j=B[0],U=B[1],z=t.useState(Ks),H=z[0],V=z[1],W=t.useState(Ks),G=W[0],q=W[1],Q=t.useState(Ks),Z=Q[0],X=Q[1],$=t.useState(exports.MetricMeasure.OVERALL),K=$[0],J=$[1],ee=t.useState(Bs.ALL),te=ee[0],ne=ee[1],re=t.useState(Ls.TOP),ie=re[0],oe=re[1],ae=t.useState(Ks.toUpperCase()),se=ae[0],le=ae[1],ue=null==C?void 0:C.get("duration"),ce=t.useState(null!=ue?ue:El[0].value),de=ce[0],pe=ce[1],he=t.useState(3),fe=he[0],ge=he[1],me=t.useState((function(){return Nu(de,M,E)})),ve=me[0],ye=me[1];t.useEffect((function(){localStorage.setItem("appName",x)}),[]);var xe=t.useState(null),_e=xe[0],be=xe[1],we=t.useState(exports.InsightsTabs.CLUSTER_LOAD),Se=we[0],Ce=we[1],Te=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return uV.fetchUniverseById(y,_)})),Me=n.useQuery(exports.QUERY_KEY.getUniverseMetadata,(function(){return uV.getUniverseMetadata(y,_)})),Ee=null===(s=null===(a=null===(o=null==Te?void 0:Te.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,Ie=null===(c=null===(u=null===(l=null==Me?void 0:Me.error)||void 0===l?void 0:l.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error,Ae=null===(d=null==Te?void 0:Te.data)||void 0===d?void 0:d.ashEnabled,De=null===(p=null==Te?void 0:Te.data)||void 0===p?void 0:p.ashSupported,ke=function(e){be(e)},Oe=function(){if(de!==Ml.CUSTOM){var e=Ru(de,M),t=e.formattedStartDate,n=e.formattedEndDate;ye({startDateTime:t,endDateTime:n})}};t.useEffect((function(){Oe()}),[de]),t.useEffect((function(){ue&&Ja(ue)&&Oe()}),[]);var Re=Se===exports.InsightsTabs.METRICS,Ne=Se!==exports.InsightsTabs.METRICS;return e.jsxs(r.Box,{children:[Me.isLoading||Te.isLoading&&e.jsx(r.Box,F({mt:2,className:S.loadingBox},{children:e.jsx(dV,{className:Y(S.icon,S.inProgressIcon)})})),Me.isError||Te.isError&&e.jsxs(r.Box,F({mt:2},{children:[(x===exports.AppName.YBA||x===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Me.isError?Ja(Ie)?Ie:Xl.UNIVERSE_PA_STATUS_ERROR:Ja(Ee)?Ee:Xl.UNIVERSE_DETAILS_ERROR}),x===exports.AppName.YBM&&e.jsx(kr,{text:Me.isError?Ja(Ie)?Ie:Xl.UNIVERSE_PA_STATUS_ERROR:Ja(Ee)?Ee:Xl.UNIVERSE_DETAILS_ERROR})]})),Te.isSuccess&&e.jsxs(e.Fragment,{children:[e.jsx(Pu,{appName:x,filterDuration:de,startDateTime:ve.startDateTime,endDateTime:ve.endDateTime,timezone:v,isDrilldownView:!1,isClusterLoadView:Se===exports.InsightsTabs.CLUSTER_LOAD,isTopKMetricsView:Se===exports.InsightsTabs.METRICS,onSelectedFilterDuration:function(e){var t,n,r,i;pe(e);var o=new URLSearchParams(window.location.search);e===Tl.CUSTOM?(o.set("startTime",null!==(n=null===(t=null==ve?void 0:ve.startDateTime)||void 0===t?void 0:t.toISOString())&&void 0!==n?n:""),o.set("endTime",null!==(i=null===(r=null==ve?void 0:ve.endDateTime)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"")):(o.delete("startTime"),o.delete("endTime")),o.set("duration",e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(o.toString()))},metricMeasure:K,onStartDateChange:function(e){var t;ye((function(t){return F(F({},t),{startDateTime:new Date(e.target.value)})}));var n=new URLSearchParams(window.location.search);n.set("startTime",null===(t=null==ve?void 0:ve.startDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))},onEndDateChange:function(e){var t;ye((function(t){return F(F({},t),{endDateTime:new Date(e.target.value)})}));var n=new URLSearchParams(window.location.search);n.set("endTime",null===(t=null==ve?void 0:ve.endDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))},onRefresh:function(){ye((function(e){return F(F({},e),{endDateTime:new Date})}))}}),e.jsxs(r.Box,F({className:S.headerContainer,mt:2},{children:[!_e&&e.jsxs(r.Box,{children:[Se===exports.InsightsTabs.CLUSTER_LOAD_DB&&e.jsx(tQ,{onChangeDbWaitEventType:function(e){le(e)}}),Se!==exports.InsightsTabs.CLUSTER_LOAD_DB&&e.jsx(Lu,{appName:x,universeData:null==Te?void 0:Te.data,clusterRegionItem:A,zoneNodeItem:O,isPrimaryCluster:L,cluster:j,region:H,metricMeasure:K,outlierType:ie,numNodes:fe,isDrilldownView:!1,anomalyData:null,queryType:te,showSplitSelector:Re,showQueryTypeSelector:Ne,onZoneNodeSelected:function(e,t,n){n===Js&&(R(Js),q(Ks),X(Ks)),(e||t)&&(R(n),e&&(q(n),X("")),t&&(q(""),X(n)))},onClusterRegionSelected:function(e,t,n,r){P(r),n===$s&&(D($s),U(Ks),V(Ks)),(e||t)&&(D(n),e&&(U(n),V("")),t&&(V(n),U("")))},onOutlierTypeSelected:function(e){oe(e)},onSplitTypeSelected:function(e){J(e)},onNumNodesChanged:function(e){ge(e>10?10:e)},onQueryTypeSelected:function(e){ne(e)}}),e.jsx(r.Box,{children:e.jsx(Xq,{startTime:null===(h=null==ve?void 0:ve.startDateTime)||void 0===h?void 0:h.toISOString(),endTime:null===(f=null==ve?void 0:ve.endDateTime)||void 0===f?void 0:f.toISOString(),universeUuid:y,appName:x,timezone:v,isAshEnabled:!!Ae,isAshSupported:!!De,queryType:te,apiUrl:_,dbWaitEventType:se,onClickShowMoreAnomalies:ke,onEChartsDateSelect:function(e,t){var n=new Date(e),r=new Date(t);pe(Tl.CUSTOM),ye({startDateTime:new Date(e),endDateTime:new Date(t)});var i=new URLSearchParams(window.location.search);i.set("startTime",n.toISOString()),i.set("endTime",r.toISOString()),i.set("duration",Tl.CUSTOM),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(i.toString()))},onSelectedIssue:b,onSelectedQuery:w,notifyTabChange:function(e){Ce(e)},getClusterDetails:function(){var e=ve.startDateTime,t=ve.endDateTime;return{universeUuid:y,cluster:j,region:H,zone:G,node:Z,metricMeasure:K,numNodes:fe,outlierType:ie,formattedStartDate:e,formattedEndDate:t}}})})]}),Ja(_e)&&e.jsx(Kq,{onClickShowMoreAnomalies:ke,selectedTab:Se,showMoreAnomalyCategory:_e,startTime:null===(g=null==ve?void 0:ve.startDateTime)||void 0===g?void 0:g.toISOString(),endTime:null===(m=null==ve?void 0:ve.endDateTime)||void 0===m?void 0:m.toISOString(),universeUuid:y,appName:x,apiUrl:_,onSelectedIssue:b})]}))]})]})},exports.QUERIES=nl,exports.QUERY_DETAILS="QUERY DETAILS",exports.QUERY_TAG="QUERY",exports.QUERY_TYPE_TAG=kl,exports.QueryTypeMode=Bs,exports.RCA_GANT_CHART=Vl,exports.REACT_APP_API_URL=XH,exports.REGION_TAG="Region",exports.REGION_ZONE_TAG=Pl,exports.RUNTIME_CONFIG_KEYS=bl,exports.RuntimeConfigs=function(i){var o,a,s=i.apiUrl,l=i.appName,u=i.toast,c=dQ(),d=Kl(),p=n.useQueryClient(),h=t.useState(""),f=h[0],g=h[1],m=t.useState([]),v=m[0],y=m[1],x=t.useState(yl[0]),_=x[0],b=x[1],w=t.useState(0),S=w[0],C=w[1],T=t.useState(!1),M=T[0],E=T[1],I=t.useState(!1),A=I[0],D=I[1],k=t.useState(null),O=k[0],R=k[1],N=n.useQuery([exports.QUERY_KEY.fetchRuntimeConfigs],(function(){return uV.fetchRuntimeConfigs(_l,s)}),{onSuccess:function(e){y(e)}}),L=N.error,P=N.isLoading,B=N.isError,j=N.isIdle,U=N.refetch,V=null===(a=null===(o=null==L?void 0:L.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.error,W=function(){z(void 0,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return p.invalidateQueries(exports.QUERY_KEY.fetchRuntimeConfigs),[4,U()];case 1:return e.sent(),[2]}}))}))},G=[{name:"path",label:"Config Key",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsxs(r.Box,{children:[e.jsx("span",{children:v[i].path}),e.jsx(r.Tooltip,F({title:v[i].description,arrow:!0,placement:"top",className:c.tooltip},{children:e.jsx("img",{src:dq,alt:"info"})}))]})}}},{name:"description",label:"Config Description",options:{sort:!0,filter:!0}},{name:"value",label:"Config Value",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx("span",F({className:v[i].overriden?c.textColor:""},{children:v[i].value}))})}}},{name:"actions",label:"Actions",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var r=n.rowIndex;return e.jsxs(e.Fragment,{children:[e.jsx(Q,F({size:"medium",variant:"pill",onClick:function(){return e=v[r],R(e),void E(!0);var e}},{children:e.jsx("span",F({style:{color:"#303A78",textDecoration:"underline"}},{children:"Update"}))})),e.jsx(Q,F({size:"medium",onClick:function(){return e=v[r],R(e),void D(!0);var e}},{children:e.jsx("span",F({style:{color:"#303A78",textDecoration:"underline"}},{children:"Reset"}))}))]})}}}];return e.jsxs(r.Box,F({mt:2,ml:4,className:c.overrideMuiTableContainer},{children:[e.jsx(r.Typography,F({variant:"h4"},{children:"Global Runtime Configurations"})),P&&e.jsx(r.Box,F({className:d.loadingBox},{children:e.jsx(dV,{className:Y(d.icon,d.inProgressIcon)})})),(B||j&&null===v)&&e.jsxs(r.Box,F({className:d.recommendation},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(V)?V:Xl.RUNTIME_CONFIGS_ERROR}),l===exports.AppName.YBM&&e.jsx(kr,{text:Ja(V)?V:Xl.RUNTIME_CONFIGS_ERROR})]})),e.jsx(r.Box,F({display:"flex",flexDirection:"row-reverse",alignSelf:"center",mt:2},{children:e.jsx(Tt,{placeholder:"Search",className:c.searchBox,onChange:function(e){return g(e.target.value)},value:f,inputProps:{"data-testid":"RuntimeConfigs-SearchInput"}})})),$a(v)&&e.jsx(r.Box,F({mt:2},{children:e.jsx(Ds,{title:"Runtime Configuration Variables",className:c.overrideMuiTable,data:v,columns:G,options:{filter:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:_,page:S,onChangePage:function(e){return C(e)},onChangeRowsPerPage:function(e){b(e),C(0)},searchText:f,customSearch:function(e,t){for(var n=function(n){var r=String(t[n]).toLocaleLowerCase();if(r.includes(e.toLocaleLowerCase()))return{value:!0};if(n===t.length-1){var i=e.split(" ").filter(Boolean),o=0;return{value:i.every((function(e){var t=r.indexOf(e.toLocaleLowerCase(),o);return t>-1&&(o=t+e.length,!0)}))}}},r=1;r<t.length;r++){var i=n(r);if("object"==typeof i)return i.value}return!1},rowsPerPageOptions:yl}})})),M&&O&&e.jsx(cQ,{open:M,data:O,apiUrl:s,onActionPerformed:W,onClose:function(){E(!1)},toast:u}),A&&O&&e.jsx(lQ,{open:A,data:O,apiUrl:s,onActionPerformed:W,onClose:function(){D(!1)},toast:u})]}))},exports.SQL_QUERY_REQUEST_GRAPHS=hl,exports.SplitMode=Ls,exports.SplitType=Ps,exports.TABLET_ID_TAG=Nl,exports.TABLET_TAG="Tablet Id",exports.TABLE_REQUEST_GRAPHS=["table_scan_ops","table_tup_read_ops","table_write_ops"],exports.TABLE_TAG=Rl,exports.TIME_FILTER_LABEL=Tl,exports.TIME_FILTER_VALUES=Ml,exports.TYPE="type",exports.URL_TAB_PATH=Xs,exports.USER_TAG="User",exports.VIEW_MORE=Cl,exports.WAIT_EVENT_MAPPING=Gs,exports.YBAlert=Dr,exports.YBButton=Q,exports.YBCheckbox=Rr,exports.YBCheckboxField=mu,exports.YBCodeBlock=xt,exports.YBDateTimePicker=us,exports.YBErrorIndicator=wt,exports.YBInfinitePagination=Ss,exports.YBInput=Tt,exports.YBInputField=er,exports.YBLabel=Ct,exports.YBModal=xs,exports.YBPagination=bs,exports.YBPanelItem=Ts,exports.YBSelect=lr,exports.YBTable=Ds,exports.YBToggle=iu,exports.YBToggleField=ou,exports.YBTooltip=ar,exports.ZONE_TAG="Zone",exports.ZoneNodeSelector=hu,exports.filterDurations=Il,exports.getCustomFooterComponent=$l,exports.getRowCellComponent=tu,exports.isDefinedNotNull=Za,exports.isEmptyArray=Xa,exports.isEmptyObject=function(e){return void 0===e||Na(e)&&0===Object.keys(e).length},exports.isEmptyString=es,exports.isNonEmptyArray=$a,exports.isNonEmptyObject=Ka,exports.isNonEmptyString=Ja,exports.isNullOrEmpty=function(e){return null==e||Na(e)&&0===Object.keys(e).length},exports.isValidObject=ts,exports.isYAxisGreaterThanThousand=ns,exports.metricOutlierSelectors=dl,exports.metricSplitSelectors=ul,exports.otherSplitSelectors=cl,exports.queryTypeSelectors=pl,exports.removeNullProperties=function(e){for(var t in e)null!==e[t]&&void 0!==e[t]||delete e[t]},exports.useCodeBlockStyles=_t;
10
+ */var rg=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new _p,o=n.renderer||"canvas";tg[o]||(o=vc(tg)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new tg[o](t,i,n,e),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=Fu.node||Fu.worker||s?null:new yf(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Fu.touchEventsSupported:!!c)&&(l=Oc(n.pointerSize,44)),this.handler=new up(i,a,u,a.root,l),this.animation=new ef({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh()},e.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return vh(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=vh(t[i].color,1);return(n/=r)<.4}return!1}(e)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(e){var t,n=Zh();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=Zh();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this.handler.off(e,t)},e.prototype.trigger=function(e,t){this.handler.trigger(e,t)},e.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof eg&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete ng[e]},e}();function ig(e,t){var n=new rg(ic(),e,t);return ng[n.id]=n,n}var og=1e-4;function ag(e,t,n,r){var i=t[0],o=t[1],a=n[0],s=n[1],l=o-i,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r)if(l>0){if(e<=i)return a;if(e>=o)return s}else{if(e>=i)return a;if(e<=o)return s}else{if(e===i)return a;if(e===o)return s}return(e-i)/l*u+a}function sg(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return wc(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function lg(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function ug(e){return e.sort((function(e,t){return e-t})),e}function cg(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,o=t.indexOf("."),a=o<0?0:i-1-o;return Math.max(0,a-r)}(e)}function dg(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),o=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-i+o,0),20);return isFinite(a)?a:20}function pg(e,t){var n=Math.max(cg(e),cg(t)),r=e+t;return n>20?r:lg(r,n)}function hg(e){var t=2*Math.PI;return(e%t+t)%t}function fg(e){return e>-1e-4&&e<og}var gg=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function mg(e){if(e instanceof Date)return e;if(wc(e)){var t=gg.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function vg(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function yg(e,t){var n=vg(e),r=Math.pow(10,n),i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function xg(e){var t=parseFloat(e);return t==e&&(0!==t||!wc(e)||e.indexOf("x")<=0)?t:NaN}function _g(){return Math.round(9*Math.random())}function bg(e,t){return 0===t?e:bg(t,e%t)}function wg(e,t){return null==e?t:null==t?e:e*t/bg(e,t)}"undefined"!=typeof console&&console.warn&&console.log;function Sg(e){throw new Error(e)}function Cg(e,t,n){return(t-e)*n+e}var Tg="series\0";function Mg(e){return e instanceof Array?e:null==e?[]:[e]}function Eg(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var Ig=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Ag(e){return!Tc(e)||_c(e)||e instanceof Date?e:e.value}function Dg(e){return Tc(e)&&!(e instanceof Array)}function kg(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=Wc();hc(t,(function(e,n){Tc(e)||(t[n]=null)}));var s,l,u=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||Pg(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||i)&&function(e,t,n,r){hc(r,(function(i,o){if(i&&null!=i.id){var a=Rg(i.id),s=n.get(a);if(null!=s){var l=e[s];Pc(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=i,l.existing=t[s],r[o]=null}}}))}(u,e,a,t),r&&function(e,t){hc(t,(function(n,r){if(n&&null!=n.name)for(var i=0;i<e.length;i++){var o=e[i].existing;if(!e[i].newOption&&o&&(null==o.id||null==n.id)&&!Pg(n)&&!Pg(o)&&Og("name",o,n))return e[i].newOption=n,void(t[r]=null)}}))}(u,t),r||i?function(e,t,n){hc(t,(function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Pg(r.existing)||r.existing&&null!=t.id&&!Og("id",t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}}))}(u,t,i):o&&function(e,t){hc(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}(u,t),s=u,l=Wc(),hc(s,(function(e){var t=e.existing;t&&l.set(t.id,e)})),hc(s,(function(e){var t=e.newOption;Pc(!t||null==t.id||!l.get(t.id)||l.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&l.set(t.id,e),!e.keyInfo&&(e.keyInfo={})})),hc(s,(function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(Tc(r)){if(i.name=null!=r.name?Rg(r.name):n?n.name:Tg+t,n)i.id=Rg(n.id);else if(null!=r.id)i.id=Rg(r.id);else{var o=0;do{i.id="\0"+i.name+"\0"+o++}while(l.get(i.id))}l.set(i.id,e)}})),u}function Og(e,t,n){var r=Ng(t[e],null),i=Ng(n[e],null);return null!=r&&null!=i&&r===i}function Rg(e){return Ng(e,"")}function Ng(e,t){return null==e?t:wc(e)?e:Cc(e)||Sc(e)?e+"":t}function Lg(e){var t=e.name;return!(!t||!t.indexOf(Tg))}function Pg(e){return e&&null!=e.id&&0===Rg(e.id).indexOf("\0_ec_\0")}function Bg(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?_c(t.dataIndex)?fc(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?_c(t.name)?fc(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function jg(){var e="__ec_inner_"+Fg++;return function(t){return t[e]||(t[e]={})}}var Fg=_g();function Ug(e,t,n){var r=zg(t,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each((function(t,r){var i=Wg(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]})),a}function zg(e,t){var n;if(wc(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Wc(),o={},a=!1;return hc(n,(function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&cc(t.includeMainTypes,s)<0))a=a||!!s,(i.get(s)||i.set(s,{}))[l]=e}else o[n]=e})),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var Hg={useDefault:!0,enableAll:!1,enableNone:!1},Vg={useDefault:!1,enableAll:!0,enableNone:!0};function Wg(e,t,n,r){r=r||Hg;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===i||!1===i?(Pc(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(Pc(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=e.queryComponents({mainType:t,index:i,id:o,name:a}),s)}function Yg(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}var Gg="___EC__COMPONENT__CONTAINER___",qg="___EC__EXTENDED_CLASS___";function Qg(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function Zg(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return bc(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return j(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(t,this)),lc(t.prototype,e),t[qg]=!0,t.extend=this.extend,t.superCall=Kg,t.superApply=Jg,t.superClass=r,t}}function Xg(e,t){e.extend=t.extend}var $g=Math.round(10*Math.random());function Kg(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function Jg(e,t,n){return this.superClass.prototype[t].apply(e,n)}function em(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){Pc(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=Qg(r);if(i.sub){if(i.sub!==Gg){var o=function(e){var n=t[e.main];n&&n[Gg]||((n=t[e.main]={})[Gg]=!0);return n}(i);o[i.sub]=e}}else t[i.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Gg]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=Qg(e),r=[],i=t[n.main];return i&&i[Gg]?hc(i,(function(e,t){t!==Gg&&r.push(e)})):r.push(i),r},e.hasClass=function(e){var n=Qg(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return hc(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){var n=Qg(e),r=t[n.main];return r&&r[Gg]}}function tm(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&cc(r,s)>=0||i&&cc(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var nm=tm([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),rm=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return nm(this,e,t)},e}(),im=new Kp(50);function om(e){if("string"==typeof e){var t=im.get(e);return t&&t.image}return e}function am(e,t,n,r,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=im.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!lm(t=o.image)&&o.pending.push(a):((t=Yu.loadImage(e,sm,sm)).__zrImageSrc=e,im.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function sm(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function lm(e){return e&&e.width&&e.height}var um=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function cm(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=dm(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=pm(o[a],i);return o.join("\n")}function dm(e,t,n,r){var i=lc({},r=r||{});i.font=t,n=Oc(n,"..."),i.maxIterations=Oc(r.maxIterations,2);var o=i.minChar=Oc(r.minChar,0);i.cnCharWidth=Nf("国",t);var a=i.ascCharWidth=Nf("a",t);i.placeholder=Oc(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=Nf(n,t);return u>s&&(n="",u=0),s=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function pm(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=Nf(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?hm(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=Nf(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function hm(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}var fm=function(){},gm=function(e){this.tokens=[],e&&(this.tokens=e)},mm=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function vm(e,t,n,r,i){var o,a,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var p=l.padding,h=p?p[1]+p[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Uf(l.width,r.width)+h;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var g=_m(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+h,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var m=0;m<o.length;m++){var v=o[m],y=new fm;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:Nf(v,c),m||d)u.push(new gm([y]));else{var x=(u[u.length-1]||(u[0]=new gm)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(v||!_||s)&&x.push(y)}}}var ym=gc(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function xm(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!ym[e]}function _m(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var p=e.charAt(d);if("\n"!==p){var h=Nf(p,t),f=!r&&!xm(p);(o.length?c+h>n:i+c+h>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=h):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=h)):f?(o.push(l),a.push(u),l=p,u=h):(o.push(p),a.push(h)):(c+=h,f?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}var bm="__zr_style_"+Math.round(10*Math.random()),wm={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Sm={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};wm[bm]=!0;var Cm=["z","z2","invisible"],Tm=["invisible"],Mm=function(e){function t(t){return e.call(this,t)||this}var n;return j(t,e),t.prototype._init=function(t){for(var n=vc(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){Em.copy(e.getBoundingRect()),e.transform&&Em.applyTransform(e.transform);return Im.width=t,Im.height=n,!Em.intersect(Im)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new Kd(0,0,0,0)),t?Kd.applyTransform(e,n,t):e.copy(n),(i||o||a)&&(e.width+=2*i+Math.abs(o),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+o-i),e.y=Math.min(e.y,e.y+a-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Kd(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:lc(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Yc(wm,e)},t.prototype.useStyle=function(e){e[bm]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[bm]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,Cm)},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=vc(u),d=0;d<c.length;d++){(h=c[d])in s&&(s[h]=s[h],this.style[h]=u[h])}var p=vc(s);for(d=0;d<p.length;d++){var h=p[d];this.style[h]=this.style[h]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Tm:Cm;for(d=0;d<f.length;d++){h=f[d];n&&null!=n[h]?this[h]=n[h]:l&&null!=r[h]&&(this[h]=r[h])}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return lc(e,t),e},t.prototype.getAnimationStyleProps=function(){return Sm},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(Kf),Em=new Kd(0,0,0,0),Im=new Kd(0,0,0,0);var Am=Mm,Dm=Math.min,km=Math.max,Om=Math.sin,Rm=Math.cos,Nm=2*Math.PI,Lm=Xc(),Pm=Xc(),Bm=Xc();function jm(e,t,n,r,i,o){i[0]=Dm(e,n),i[1]=Dm(t,r),o[0]=km(e,n),o[1]=km(t,r)}var Fm=[],Um=[];function zm(e,t,n,r,i,o,a,s,l,u){var c=jp,d=Lp,p=c(e,n,i,a,Fm);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var f=d(e,n,i,a,Fm[h]);l[0]=Dm(f,l[0]),u[0]=km(f,u[0])}p=c(t,r,o,s,Um);for(h=0;h<p;h++){var g=d(t,r,o,s,Um[h]);l[1]=Dm(g,l[1]),u[1]=km(g,u[1])}l[0]=Dm(e,l[0]),u[0]=km(e,u[0]),l[0]=Dm(a,l[0]),u[0]=km(a,u[0]),l[1]=Dm(t,l[1]),u[1]=km(t,u[1]),l[1]=Dm(s,l[1]),u[1]=km(s,u[1])}function Hm(e,t,n,r,i,o,a,s){var l=Vp,u=zp,c=km(Dm(l(e,n,i),1),0),d=km(Dm(l(t,r,o),1),0),p=u(e,n,i,c),h=u(t,r,o,d);a[0]=Dm(e,i,p),a[1]=Dm(t,o,h),s[0]=km(e,i,p),s[1]=km(t,o,h)}function Vm(e,t,n,r,i,o,a,s,l){var u=ad,c=sd,d=Math.abs(i-o);if(d%Nm<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(Lm[0]=Rm(i)*n+e,Lm[1]=Om(i)*r+t,Pm[0]=Rm(o)*n+e,Pm[1]=Om(o)*r+t,u(s,Lm,Pm),c(l,Lm,Pm),(i%=Nm)<0&&(i+=Nm),(o%=Nm)<0&&(o+=Nm),i>o&&!a?o+=Nm:i<o&&a&&(i+=Nm),a){var p=o;o=i,i=p}for(var h=0;h<o;h+=Math.PI/2)h>i&&(Bm[0]=Rm(h)*n+e,Bm[1]=Om(h)*r+t,u(s,Bm,s),c(l,Bm,l))}var Wm={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ym=[],Gm=[],qm=[],Qm=[],Zm=[],Xm=[],$m=Math.min,Km=Math.max,Jm=Math.cos,ev=Math.sin,tv=Math.abs,nv=Math.PI,rv=2*nv,iv="undefined"!=typeof Float32Array,ov=[];function av(e){return Math.round(e/nv*1e8)/1e8%2*nv}var sv=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=tv(n/_f/e)||0,this._uy=tv(n/_f/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Wm.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=tv(e-this._xi),r=tv(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Wm.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData(Wm.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Wm.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),ov[0]=r,ov[1]=i,function(e,t){var n=av(e[0]);n<0&&(n+=rv);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=rv?i=n+rv:t&&n-i>=rv?i=n-rv:!t&&n>i?i=n+(rv-av(n-i)):t&&n<i&&(i=n-(rv-av(i-n))),e[0]=n,e[1]=i}(ov,o),r=ov[0];var a=(i=ov[1])-r;return this.addData(Wm.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=Jm(i)*n+e,this._yi=ev(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Wm.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Wm.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!iv||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();iv&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},e.prototype.addData=function(e,t,n,r,i,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,iv&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){qm[0]=qm[1]=Zm[0]=Zm[1]=Number.MAX_VALUE,Qm[0]=Qm[1]=Xm[0]=Xm[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(i=n=t[e],o=r=t[e+1]),a){case Wm.M:n=i=t[e++],r=o=t[e++],Zm[0]=i,Zm[1]=o,Xm[0]=i,Xm[1]=o;break;case Wm.L:jm(n,r,t[e],t[e+1],Zm,Xm),n=t[e++],r=t[e++];break;case Wm.C:zm(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],Zm,Xm),n=t[e++],r=t[e++];break;case Wm.Q:Hm(n,r,t[e++],t[e++],t[e],t[e+1],Zm,Xm),n=t[e++],r=t[e++];break;case Wm.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],p=t[e++],h=t[e++]+p;e+=1;var f=!t[e++];s&&(i=Jm(p)*c+l,o=ev(p)*d+u),Vm(l,u,c,d,p,h,f,Zm,Xm),n=Jm(h)*c+l,r=ev(h)*d+u;break;case Wm.R:jm(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],Zm,Xm);break;case Wm.Z:n=i,r=o}ad(qm,qm,Zm),sd(Qm,Qm,Xm)}return 0===e&&(qm[0]=qm[1]=Qm[0]=Qm[1]=0),new Kd(qm[0],qm[1],Qm[0]-qm[0],Qm[1]-qm[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var p=e[d++],h=1===d;h&&(a=i=e[d],s=o=e[d+1]);var f=-1;switch(p){case Wm.M:i=a=e[d++],o=s=e[d++];break;case Wm.L:var g=e[d++],m=(x=e[d++])-o;(tv(A=g-i)>n||tv(m)>r||d===t-1)&&(f=Math.sqrt(A*A+m*m),i=g,o=x);break;case Wm.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],b=e[d++];f=Up(i,o,v,y,g,x,_,b,10),i=_,o=b;break;case Wm.Q:f=Yp(i,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),i=g,o=x;break;case Wm.A:var w=e[d++],S=e[d++],C=e[d++],T=e[d++],M=e[d++],E=e[d++],I=E+M;d+=1,e[d++],h&&(a=Jm(M)*C+w,s=ev(M)*T+S),f=Km(C,T)*$m(rv,Math.abs(E)),i=Jm(I)*C+w,o=ev(I)*T+S;break;case Wm.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case Wm.Z:var A=a-i;m=s-o;f=Math.sqrt(A*A+m*m),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,l,u,c,d,p=this.data,h=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var _=0;_<g;){var b=p[_++],w=1===_;switch(w&&(n=i=p[_],r=o=p[_+1]),b!==Wm.L&&x>0&&(e.lineTo(c,d),x=0),b){case Wm.M:n=i=p[_++],r=o=p[_++],e.moveTo(i,o);break;case Wm.L:a=p[_++],s=p[_++];var S=tv(a-i),C=tv(s-o);if(S>h||C>f){if(m){if(v+(Q=l[y++])>u){var T=(u-v)/Q;e.lineTo(i*(1-T)+a*T,o*(1-T)+s*T);break e}v+=Q}e.lineTo(a,s),i=a,o=s,x=0}else{var M=S*S+C*C;M>x&&(c=a,d=s,x=M)}break;case Wm.C:var E=p[_++],I=p[_++],A=p[_++],D=p[_++],k=p[_++],O=p[_++];if(m){if(v+(Q=l[y++])>u){Fp(i,E,A,k,T=(u-v)/Q,Ym),Fp(o,I,D,O,T,Gm),e.bezierCurveTo(Ym[1],Gm[1],Ym[2],Gm[2],Ym[3],Gm[3]);break e}v+=Q}e.bezierCurveTo(E,I,A,D,k,O),i=k,o=O;break;case Wm.Q:E=p[_++],I=p[_++],A=p[_++],D=p[_++];if(m){if(v+(Q=l[y++])>u){Wp(i,E,A,T=(u-v)/Q,Ym),Wp(o,I,D,T,Gm),e.quadraticCurveTo(Ym[1],Gm[1],Ym[2],Gm[2]);break e}v+=Q}e.quadraticCurveTo(E,I,A,D),i=A,o=D;break;case Wm.A:var R=p[_++],N=p[_++],L=p[_++],P=p[_++],B=p[_++],j=p[_++],F=p[_++],U=!p[_++],z=L>P?L:P,H=tv(L-P)>.001,V=B+j,W=!1;if(m)v+(Q=l[y++])>u&&(V=B+j*(u-v)/Q,W=!0),v+=Q;if(H&&e.ellipse?e.ellipse(R,N,L,P,F,B,V,U):e.arc(R,N,z,B,V,U),W)break e;w&&(n=Jm(B)*L+R,r=ev(B)*P+N),i=Jm(V)*L+R,o=ev(V)*P+N;break;case Wm.R:n=i=p[_],r=o=p[_+1],a=p[_++],s=p[_++];var Y=p[_++],G=p[_++];if(m){if(v+(Q=l[y++])>u){var q=u-v;e.moveTo(a,s),e.lineTo(a+$m(q,Y),s),(q-=Y)>0&&e.lineTo(a+Y,s+$m(q,G)),(q-=G)>0&&e.lineTo(a+Km(Y-q,0),s+G),(q-=Y)>0&&e.lineTo(a,s+Km(G-q,0));break e}v+=Q}e.rect(a,s,Y,G);break;case Wm.Z:if(m){var Q;if(v+(Q=l[y++])>u){T=(u-v)/Q;e.lineTo(i*(1-T)+n*T,o*(1-T)+r*T);break e}v+=Q}e.closePath(),i=n,o=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Wm,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),lv=sv;function uv(e,t,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>t+s&&a>r+s||a<t-s&&a<r-s||o>e+s&&o>n+s||o<e-s&&o<n-s)return!1;if(e===n)return Math.abs(o-e)<=s/2;var u=(l=(t-r)/(e-n))*o-a+(e*r-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function cv(e,t,n,r,i,o,a,s,l,u,c){if(0===l)return!1;var d=l;if(c>t+d&&c>r+d&&c>o+d&&c>s+d||c<t-d&&c<r-d&&c<o-d&&c<s-d||u>e+d&&u>n+d&&u>i+d&&u>a+d||u<e-d&&u<n-d&&u<i-d&&u<a-d)return!1;var p=function(e,t,n,r,i,o,a,s,l,u,c){var d,p,h,f,g,m=.005,v=1/0;Dp[0]=l,Dp[1]=u;for(var y=0;y<1;y+=.05)kp[0]=Lp(e,n,i,a,y),kp[1]=Lp(t,r,o,s,y),(f=id(Dp,kp))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Ep);x++)p=d-m,h=d+m,kp[0]=Lp(e,n,i,a,p),kp[1]=Lp(t,r,o,s,p),f=id(kp,Dp),p>=0&&f<v?(d=p,v=f):(Op[0]=Lp(e,n,i,a,h),Op[1]=Lp(t,r,o,s,h),g=id(Op,Dp),h<=1&&g<v?(d=h,v=g):m*=.5);return c&&(c[0]=Lp(e,n,i,a,d),c[1]=Lp(t,r,o,s,d)),Tp(v)}(e,t,n,r,i,o,a,s,u,c,null);return p<=d/2}function dv(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;if(l>t+u&&l>r+u&&l>o+u||l<t-u&&l<r-u&&l<o-u||s>e+u&&s>n+u&&s>i+u||s<e-u&&s<n-u&&s<i-u)return!1;var c=function(e,t,n,r,i,o,a,s,l){var u,c=.005,d=1/0;Dp[0]=a,Dp[1]=s;for(var p=0;p<1;p+=.05)kp[0]=zp(e,n,i,p),kp[1]=zp(t,r,o,p),(m=id(Dp,kp))<d&&(u=p,d=m);d=1/0;for(var h=0;h<32&&!(c<Ep);h++){var f=u-c,g=u+c;kp[0]=zp(e,n,i,f),kp[1]=zp(t,r,o,f);var m=id(kp,Dp);if(f>=0&&m<d)u=f,d=m;else{Op[0]=zp(e,n,i,g),Op[1]=zp(t,r,o,g);var v=id(Op,Dp);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=zp(e,n,i,u),l[1]=zp(t,r,o,u)),Tp(d)}(e,t,n,r,i,o,s,l,null);return c<=u/2}var pv=2*Math.PI;function hv(e){return(e%=pv)<0&&(e+=pv),e}var fv=2*Math.PI;function gv(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-i)%fv<1e-4)return!0;if(o){var d=r;r=hv(i),i=hv(d)}else r=hv(r),i=hv(i);r>i&&(i+=fv);var p=Math.atan2(l,s);return p<0&&(p+=fv),p>=r&&p<=i||p+fv>=r&&p+fv<=i}function mv(e,t,n,r,i,o){if(o>t&&o>r||o<t&&o<r)return 0;if(r===t)return 0;var a=(o-t)/(r-t),s=r<t?1:-1;1!==a&&0!==a||(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===i?1/0:l>i?s:0}var vv=lv.CMD,yv=2*Math.PI;var xv=[-1,-1,-1],_v=[-1,-1];function bv(e,t,n,r,i,o,a,s,l,u){if(u>t&&u>r&&u>o&&u>s||u<t&&u<r&&u<o&&u<s)return 0;var c,d=Bp(t,r,o,s,u,xv);if(0===d)return 0;for(var p=0,h=-1,f=void 0,g=void 0,m=0;m<d;m++){var v=xv[m],y=0===v||1===v?.5:1;Lp(e,n,i,a,v)<l||(h<0&&(h=jp(t,r,o,s,_v),_v[1]<_v[0]&&h>1&&(c=void 0,c=_v[0],_v[0]=_v[1],_v[1]=c),f=Lp(t,r,o,s,_v[0]),h>1&&(g=Lp(t,r,o,s,_v[1]))),2===h?v<_v[0]?p+=f<t?y:-y:v<_v[1]?p+=g<f?y:-y:p+=s<g?y:-y:v<_v[0]?p+=f<t?y:-y:p+=s<f?y:-y)}return p}function wv(e,t,n,r,i,o,a,s){if(s>t&&s>r&&s>o||s<t&&s<r&&s<o)return 0;var l=function(e,t,n,r,i){var o=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(Rp(o))Np(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(Rp(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=Tp(u),p=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),p>=0&&p<=1&&(i[l++]=p)}}return l}(t,r,o,s,xv);if(0===l)return 0;var u=Vp(t,r,o);if(u>=0&&u<=1){for(var c=0,d=zp(t,r,o,u),p=0;p<l;p++){var h=0===xv[p]||1===xv[p]?.5:1;zp(e,n,i,xv[p])<a||(xv[p]<u?c+=d<t?h:-h:c+=o<d?h:-h)}return c}h=0===xv[0]||1===xv[0]?.5:1;return zp(e,n,i,xv[0])<a?0:o<t?h:-h}function Sv(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);xv[0]=-l,xv[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=yv-1e-4){r=0,i=yv;var c=o?1:-1;return a>=xv[0]+e&&a<=xv[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=yv,i+=yv);for(var p=0,h=0;h<2;h++){var f=xv[h];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=yv+g),(g>=r&&g<=i||g+yv>=r&&g+yv<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function Cv(e,t,n,r,i){for(var o,a,s,l,u=e.data,c=e.len(),d=0,p=0,h=0,f=0,g=0,m=0;m<c;){var v=u[m++],y=1===m;switch(v===vv.M&&m>1&&(n||(d+=mv(p,h,f,g,r,i))),y&&(f=p=u[m],g=h=u[m+1]),v){case vv.M:p=f=u[m++],h=g=u[m++];break;case vv.L:if(n){if(uv(p,h,u[m],u[m+1],t,r,i))return!0}else d+=mv(p,h,u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case vv.C:if(n){if(cv(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=bv(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case vv.Q:if(n){if(dv(p,h,u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=wv(p,h,u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case vv.A:var x=u[m++],_=u[m++],b=u[m++],w=u[m++],S=u[m++],C=u[m++];m+=1;var T=!!(1-u[m++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,y?(f=o,g=a):d+=mv(p,h,o,a,r,i);var M=(r-x)*w/b+x;if(n){if(gv(x,_,w,S,S+C,T,t,M,i))return!0}else d+=Sv(x,_,w,S,S+C,T,M,i);p=Math.cos(S+C)*b+x,h=Math.sin(S+C)*w+_;break;case vv.R:if(f=p=u[m++],g=h=u[m++],o=f+u[m++],a=g+u[m++],n){if(uv(f,g,o,g,t,r,i)||uv(o,g,o,a,t,r,i)||uv(o,a,f,a,t,r,i)||uv(f,a,f,g,t,r,i))return!0}else d+=mv(o,g,o,a,r,i),d+=mv(f,a,f,g,r,i);break;case vv.Z:if(n){if(uv(p,h,f,g,t,r,i))return!0}else d+=mv(p,h,f,g,r,i);p=f,h=g}}return n||(s=h,l=g,Math.abs(s-l)<1e-4)||(d+=mv(p,h,f,g,r,i)||0),0!==d}var Tv=uc({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},wm),Mv={style:uc({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Sm.style)},Ev=kf.concat(["invisible","culling","z","z2","zlevel","parent"]),Iv=function(e){function t(t){return e.call(this,t)||this}var n;return j(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<Ev.length;++s)i[Ev[s]]=this[Ev[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=vc(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=t[o];"style"===o?this.style?lc(this.style,a):this.useStyle(a):"shape"===o?lc(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(wc(e)){var t=vh(e,0);return t>.5?bf:t>.2?"#eee":wf}if(e)return wf}return bf},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(wc(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===vh(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new lv(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){o.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return Cv(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return Cv(e,0,!1,t,n)}(o,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:lc(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return Yc(Tv,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=lc({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=lc({},r.shape),lc(s,n.shape)):(s=lc({},i?this.shape:r.shape),lc(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=lc({},this.shape);for(var u={},c=vc(s),d=0;d<c.length;d++){var p=c[d];"object"==typeof s[p]?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return Mv},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return j(n,t),n.prototype.getDefaultStyle=function(){return ac(e.style)},n.prototype.getDefaultShape=function(){return ac(e.shape)},n}(t);for(var r in e)"function"==typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(Am),Av=Iv,Dv=uc({strokeFirst:!0,font:zu,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Tv),kv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return Yc(Dv,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=Pf(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Am);kv.prototype.type="tspan";var Ov=kv,Rv=uc({x:0,y:0},wm),Nv={style:uc({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Sm.style)};var Lv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.createStyle=function(e){return Yc(Rv,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r=function(e){return!!(e&&"string"!=typeof e&&e.width&&e.height)}(t.image)?t.image:this.__image;if(!r)return 0;var i="width"===e?"height":"width",o=t[i];return null==o?r[e]:r[e]/r[i]*o},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Nv},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Kd(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Am);Lv.prototype.type="image";var Pv=Lv;var Bv=Math.round;function jv(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s?(Bv(2*r)===Bv(2*i)&&(e.x1=e.x2=Uv(r,s,!0)),Bv(2*o)===Bv(2*a)&&(e.y1=e.y2=Uv(o,s,!0)),e):e}}function Fv(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Uv(r,s,!0),e.y=Uv(i,s,!0),e.width=Math.max(Uv(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(Uv(i+a,s,!1)-e.y,0===a?0:1),e):e}}function Uv(e,t,n){if(!t)return e;var r=Bv(2*e);return(r+Bv(t))%2==0?r/2:(r+(n?1:-1))/2}var zv=function(){this.x=0,this.y=0,this.width=0,this.height=0},Hv={},Vv=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new zv},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Fv(Hv,t,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,i=t.width,o=t.height;t.r?function(e,t){var n,r,i,o,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=i=o=d:d instanceof Array?1===d.length?n=r=i=o=d[0]:2===d.length?(n=i=d[0],r=o=d[1]):3===d.length?(n=d[0],r=o=d[1],i=d[2]):(n=d[0],r=d[1],i=d[2],o=d[3]):n=r=i=o=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-i),0!==i&&e.arc(s+u-i,l+c-i,i,0,Math.PI/2),e.lineTo(s+o,l+c),0!==o&&e.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,i,o)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Av);Vv.prototype.type="rect";var Wv=Vv,Yv={fill:"#000"},Gv={style:uc({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Sm.style)},qv=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Yv,n.attr(t),n}return j(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,ey(e=this.style),hc(e.rich,ey),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Kd(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o=t[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Yv},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return lc(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=vc(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},lc(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Gv},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||zu,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a="truncate"===r,s=Ff(o),l=Oc(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=t.width,p=(n=null==d||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?_m(e,t.font,d,"breakAll"===r,0).lines:[]).length*l,h=Oc(t.height,p);if(p>h&&c){var f=Math.floor(h/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var g=dm(d,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m=0;m<n.length;m++)n[m]=pm(n[m],g);var v=h,y=0;for(m=0;m<n.length;m++)y=Math.max(Nf(n[m],o),y);null==d&&(d=y);var x=y;return i&&(v+=i[0]+i[2],x+=i[1]+i[3],d+=i[1]+i[3]),u&&(x=d),{lines:n,height:h,outerWidth:x,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:p,width:d}}(iy(e),e),i=oy(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle,p=e.x||0,h=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=p,v=jf(h,r.contentHeight,g);if(i||n){var y=Bf(p,s,f),x=jf(h,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=ry(p,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var _=0,b=!1,w=(ny("fill"in e?e.fill:(b=!0,d.fill))),S=(ty("stroke"in e?e.stroke:o||d.autoStroke&&!b?null:(_=2,d.stroke))),C=e.textShadowBlur>0,T=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=r.calculatedLineHeight,E=0;E<u.length;E++){var I=this._getOrCreateChild(Ov),A=I.createStyle();I.useStyle(A),A.text=u[E],A.x=m,A.y=v,f&&(A.textAlign=f),A.textBaseline="middle",A.opacity=e.opacity,A.strokeFirst=!0,C&&(A.shadowBlur=e.textShadowBlur||0,A.shadowColor=e.textShadowColor||"transparent",A.shadowOffsetX=e.textShadowOffsetX||0,A.shadowOffsetY=e.textShadowOffsetY||0),A.stroke=S,A.fill=w,S&&(A.lineWidth=e.lineWidth||_,A.lineDash=e.lineDash,A.lineDashOffset=e.lineDashOffset||0),A.font=t,Kv(A,e),v+=c,T&&I.setBoundingRect(new Kd(Bf(A.x,e.width,A.textAlign),jf(A.y,M,A.textBaseline),l,M))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new mm;if(null!=e&&(e+=""),!e)return n;for(var r,i=t.width,o=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==i?null:{width:i,accumWidth:0,breakAll:"breakAll"===a},l=um.lastIndex=0;null!=(r=um.exec(e));){var u=r.index;u>l&&vm(n,e.substring(l,u),t,s),vm(n,r[2],t,s,r[1]),l=um.lastIndex}l<e.length&&vm(n,e.substring(l,e.length),t,s);var c=[],d=0,p=0,h=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,p=Math.max(p,t)}e:for(var v=0;v<n.lines.length;v++){for(var y=n.lines[v],x=0,_=0,b=0;b<y.tokens.length;b++){var w=(O=y.tokens[b]).styleName&&t.rich[O.styleName]||{},S=O.textPadding=w.padding,C=S?S[1]+S[3]:0,T=O.font=w.font||t.font;O.contentHeight=Ff(T);var M=Oc(w.height,O.contentHeight);if(O.innerHeight=M,S&&(M+=S[0]+S[2]),O.height=M,O.lineHeight=Rc(w.lineHeight,t.lineHeight,M),O.align=w&&w.align||t.align,O.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=o&&d+O.lineHeight>o){b>0?(y.tokens=y.tokens.slice(0,b),m(y,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var E=w.width,I=null==E||"auto"===E;if("string"==typeof E&&"%"===E.charAt(E.length-1))O.percentWidth=E,c.push(O),O.contentWidth=Nf(O.text,T);else{if(I){var A=w.backgroundColor,D=A&&A.image;D&&lm(D=om(D))&&(O.width=Math.max(O.width,D.width*M/D.height))}var k=f&&null!=i?i-_:null;null!=k&&k<O.width?!I||k<C?(O.text="",O.width=O.contentWidth=0):(O.text=cm(O.text,k-C,T,t.ellipsis,{minChar:t.truncateMinChar}),O.width=O.contentWidth=Nf(O.text,T)):O.contentWidth=Nf(O.text,T)}O.width+=C,_+=O.width,w&&(x=Math.max(x,O.lineHeight))}m(y,_,x)}for(n.outerWidth=n.width=Oc(i,p),n.outerHeight=n.height=Oc(o,d),n.contentHeight=d,n.contentWidth=p,h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]),v=0;v<c.length;v++){var O,R=(O=c[v]).percentWidth;O.width=parseInt(R,10)/100*n.width}return n}(iy(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign,d=Bf(a,r,u),p=jf(s,i,c),h=d,f=p;o&&(h+=o[3],f+=o[0]);var g=h+n;oy(e)&&this._renderBackground(e,e,d,p,r,i);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,_=x.length,b=y.lineHeight,w=y.width,S=0,C=h,T=g,M=_-1,E=void 0;S<_&&(!(E=x[S]).align||"left"===E.align);)this._placeToken(E,e,b,f,C,"left",m),w-=E.width,C+=E.width,S++;for(;M>=0&&"right"===(E=x[M]).align;)this._placeToken(E,e,b,f,T,"right",m),w-=E.width,T-=E.width,M--;for(C+=(n-(C-h)-(g-T)-w)/2;S<=M;)E=x[S],this._placeToken(E,e,b,f,C+E.width/2,"center",m),C+=E.width,S++;f+=b}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&oy(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(i=ry(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(Ov),h=p.createStyle();p.useStyle(h);var f=this._defaultStyle,g=!1,m=0,v=ny("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=ty("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;h.text=e.text,h.x=i,h.y=u,x&&(h.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,h.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",h.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,h.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),h.textAlign=o,h.textBaseline="middle",h.font=e.font||zu,h.opacity=Rc(s.opacity,t.opacity,1),Kv(h,s),y&&(h.lineWidth=Rc(s.lineWidth,t.lineWidth,m),h.lineDash=Oc(s.lineDash,t.lineDash),h.lineDashOffset=t.lineDashOffset||0,h.stroke=y),v&&(h.fill=v);var _=e.contentWidth,b=e.contentHeight;p.setBoundingRect(new Kd(Bf(h.x,_,h.textAlign),jf(h.y,b,h.textBaseline),_,b))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,p=u&&u.image,h=u&&!p,f=e.borderRadius,g=this;if(h||e.lineHeight||c&&d){(a=this._getOrCreateChild(Wv)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=r,m.width=i,m.height=o,m.r=f,a.dirtyShape()}if(h)(l=a.style).fill=u||null,l.fillOpacity=Oc(e.fillOpacity,1);else if(p){(s=this._getOrCreateChild(Pv)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=i,v.height=o}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Oc(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Rc(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return Jv(e)&&(t=[e.fontStyle,e.fontWeight,$v(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Bc(t)||e.textFont||e.font},t}(Am),Qv={left:!0,right:1,center:1},Zv={top:1,bottom:1,middle:1},Xv=["fontStyle","fontWeight","fontSize","fontFamily"];function $v(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function Kv(e,t){for(var n=0;n<Xv.length;n++){var r=Xv[n],i=t[r];null!=i&&(e[r]=i)}}function Jv(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function ey(e){if(e){e.font=qv.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||Qv[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||Zv[n]?n:"top",e.padding&&(e.padding=Lc(e.padding))}}function ty(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function ny(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function ry(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function iy(e){var t=e.text;return null!=t&&(t+=""),t}function oy(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var ay=qv,sy=jg(),ly=1,uy={},cy=jg(),dy=jg(),py=["emphasis","blur","select"],hy=["normal","emphasis","blur","select"],fy="highlight",gy="downplay",my="select",vy="unselect",yy="toggleSelect";function xy(e){return null!=e&&"none"!==e}var _y=new Kp(100);function by(e){if(wc(e)){var t=_y.get(e);return t||(t=hh(e,-.1),_y.put(e,t)),t}if(Ac(e)){var n=lc({},e);return n.colorStops=fc(e.colorStops,(function(e){return{offset:e.offset,color:hh(e.color,-.1)}})),n}return e}function wy(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Sy(e){wy(e,"emphasis",2)}function Cy(e){2===e.hoverState&&wy(e,"normal",0)}function Ty(e){wy(e,"blur",1)}function My(e){1===e.hoverState&&wy(e,"normal",0)}function Ey(e){e.selected=!0}function Iy(e){e.selected=!1}function Ay(e,t,n){t(e,n)}function Dy(e,t,n){Ay(e,t,n),e.isGroup&&e.traverse((function(e){Ay(e,t,n)}))}function ky(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function Oy(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&cc(n,"select")>=0,o=!1;if(e instanceof Av){var a=cy(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(xy(s)||xy(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=lc({},r),(u=lc({},u)).fill=s):!xy(u.fill)&&xy(s)?(o=!0,r=lc({},r),(u=lc({},u)).fill=by(s)):!xy(u.stroke)&&xy(l)&&(o||(r=lc({},r),u=lc({},u)),u.stroke=by(l)),r.style=u}}if(r&&null==r.z2){o||(r=lc({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=cc(e.currentStates,t)>=0,i=e.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=i[s];o[s]=null==l?r&&r[s]:l}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(o,t)}return o}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=lc({},n),a=lc({opacity:r?i:.1*o.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=lc({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function Ry(e){e.stateProxy=Oy;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Oy),n&&(n.stateProxy=Oy)}function Ny(e,t){!zy(e,t)&&!e.__highByOuter&&Dy(e,Sy)}function Ly(e,t){!zy(e,t)&&!e.__highByOuter&&Dy(e,Cy)}function Py(e,t){e.__highByOuter|=1<<(t||0),Dy(e,Sy)}function By(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Dy(e,Cy)}function jy(e){Dy(e,My)}function Fy(e){Dy(e,Ey)}function Uy(e){Dy(e,Iy)}function zy(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Hy(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,i){var o=dy(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(e){My(e)})),a&&n.push(i)),o.isBlured=!1})),hc(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function Vy(e,t,n,r){var i=r.getModel();function o(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&jy(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=i.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries((function(e){var i=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&s?u===s:i)||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse((function(e){e.__highByOuter&&i&&"self"===t||Ty(e)})),pc(t))o(e.getData(),t);else if(Tc(t))for(var c=vc(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),dy(e).isBlured=!0}})),i.eachComponent((function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}}))}}function Wy(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){dy(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse((function(e){Ty(e)}))}}}function Yy(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;var o=r.getModel().getComponent(e,t);if(!o)return i;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return i;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===sy(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Gy(e){hc(e.getAllData(),(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){e.isSelected(n,r)?Fy(t):Uy(t)}))}))}function qy(e){var t=[];return e.eachSeries((function(e){hc(e.getAllData(),(function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:e.seriesIndex};null!=r&&(o.dataType=r),t.push(o)}}))})),t}function Qy(e,t,n){Jy(e,!0),Dy(e,Ry),function(e,t,n){var r=sy(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function Zy(e,t,n,r){r?function(e){Jy(e,!1)}(e):Qy(e,t,n)}var Xy=["emphasis","blur","select"],$y={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ky(e,t,n,r){n=n||"itemStyle";for(var i=0;i<Xy.length;i++){var o=Xy[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[$y[n]]()}}function Jy(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function ex(e){return!(!e||!e.__highDownDispatcher)}function tx(e){var t=e.type;return t===my||t===vy||t===yy}function nx(e){var t=e.type;return t===fy||t===gy}var rx=lv.CMD,ix=[[],[],[]],ox=Math.sqrt,ax=Math.atan2;var sx=Math.sqrt,lx=Math.sin,ux=Math.cos,cx=Math.PI;function dx(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function px(e,t){return(e[0]*t[0]+e[1]*t[1])/(dx(e)*dx(t))}function hx(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(px(e,t))}function fx(e,t,n,r,i,o,a,s,l,u,c){var d=l*(cx/180),p=ux(d)*(e-n)/2+lx(d)*(t-r)/2,h=-1*lx(d)*(e-n)/2+ux(d)*(t-r)/2,f=p*p/(a*a)+h*h/(s*s);f>1&&(a*=sx(f),s*=sx(f));var g=(i===o?-1:1)*sx((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,m=g*a*h/s,v=g*-s*p/a,y=(e+n)/2+ux(d)*m-lx(d)*v,x=(t+r)/2+lx(d)*m+ux(d)*v,_=hx([1,0],[(p-m)/a,(h-v)/s]),b=[(p-m)/a,(h-v)/s],w=[(-1*p-m)/a,(-1*h-v)/s],S=hx(b,w);if(px(b,w)<=-1&&(S=cx),px(b,w)>=1&&(S=0),S<0){var C=Math.round(S/cx*1e6)/1e6;S=2*cx+C%2*cx}c.addData(u,y,x,a,s,_,S,d,o)}var gx=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,mx=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var vx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.applyTransform=function(e){},t}(Av);function yx(e){return null!=e.setData}function xx(e,t){var n=function(e){var t=new lv;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=lv.CMD,l=e.match(gx);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),p=void 0,h=c.match(mx)||[],f=h.length,g=0;g<f;g++)h[g]=parseFloat(h[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,C=r,T=i,M=void 0,E=void 0;switch(d){case"l":r+=h[m++],i+=h[m++],p=s.L,t.addData(p,r,i);break;case"L":r=h[m++],i=h[m++],p=s.L,t.addData(p,r,i);break;case"m":r+=h[m++],i+=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="l";break;case"M":r=h[m++],i=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="L";break;case"h":r+=h[m++],p=s.L,t.addData(p,r,i);break;case"H":r=h[m++],p=s.L,t.addData(p,r,i);break;case"v":i+=h[m++],p=s.L,t.addData(p,r,i);break;case"V":i=h[m++],p=s.L,t.addData(p,r,i);break;case"C":p=s.C,t.addData(p,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),r=h[m-2],i=h[m-1];break;case"c":p=s.C,t.addData(p,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i),r+=h[m-2],i+=h[m-1];break;case"S":v=r,y=i,M=t.len(),E=t.data,n===s.C&&(v+=r-E[M-4],y+=i-E[M-3]),p=s.C,C=h[m++],T=h[m++],r=h[m++],i=h[m++],t.addData(p,v,y,C,T,r,i);break;case"s":v=r,y=i,M=t.len(),E=t.data,n===s.C&&(v+=r-E[M-4],y+=i-E[M-3]),p=s.C,C=r+h[m++],T=i+h[m++],r+=h[m++],i+=h[m++],t.addData(p,v,y,C,T,r,i);break;case"Q":C=h[m++],T=h[m++],r=h[m++],i=h[m++],p=s.Q,t.addData(p,C,T,r,i);break;case"q":C=h[m++]+r,T=h[m++]+i,r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,C,T,r,i);break;case"T":v=r,y=i,M=t.len(),E=t.data,n===s.Q&&(v+=r-E[M-4],y+=i-E[M-3]),r=h[m++],i=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"t":v=r,y=i,M=t.len(),E=t.data,n===s.Q&&(v+=r-E[M-4],y+=i-E[M-3]),r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"A":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],fx(C=r,T=i,r=h[m++],i=h[m++],w,S,x,_,b,p=s.A,t);break;case"a":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],fx(C=r,T=i,r+=h[m++],i+=h[m++],w,S,x,_,b,p=s.A,t)}}"z"!==d&&"Z"!==d||(p=s.Z,t.addData(p),r=o,i=a),n=p}return t.toStatic(),t}(e),r=lc({},t);return r.buildPath=function(e){if(yx(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){!function(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=rx.M,d=rx.C,p=rx.L,h=rx.R,f=rx.A,g=rx.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case p:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=ox(t[0]*t[0]+t[1]*t[1]),x=ox(t[2]*t[2]+t[3]*t[3]),_=ax(-t[1]/x,t[0]/y);l[i]*=y,l[i++]+=m,l[i]*=x,l[i++]+=v,l[i++]*=y,l[i++]*=x,l[i++]+=_,l[i++]+=_,o=i+=2;break;case h:s[0]=l[i++],s[1]=l[i++],od(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],od(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var b=ix[a];b[0]=l[i++],b[1]=l[i++],od(b,b,t),l[o++]=b[0],l[o++]=b[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var _x=function(){this.cx=0,this.cy=0,this.r=0},bx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new _x},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(Av);bx.prototype.type="circle";var Sx=bx,Cx=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Tx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Cx},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=o*n,l=a*n;e.moveTo(r-o,i),e.bezierCurveTo(r-o,i-l,r-s,i-a,r,i-a),e.bezierCurveTo(r+s,i-a,r+o,i-l,r+o,i),e.bezierCurveTo(r+o,i+l,r+s,i+a,r,i+a),e.bezierCurveTo(r-s,i+a,r-o,i+l,r-o,i),e.closePath()},t}(Av);Tx.prototype.type="ellipse";var Mx=Tx,Ex=Math.PI,Ix=2*Ex,Ax=Math.sin,Dx=Math.cos,kx=Math.acos,Ox=Math.atan2,Rx=Math.abs,Nx=Math.sqrt,Lx=Math.max,Px=Math.min,Bx=1e-4;function jx(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/Nx(s*s+l*l),c=u*l,d=-u*s,p=e+c,h=t+d,f=n+c,g=r+d,m=(p+f)/2,v=(h+g)/2,y=f-p,x=g-h,_=y*y+x*x,b=i-o,w=p*g-f*h,S=(x<0?-1:1)*Nx(Lx(0,b*b*_-w*w)),C=(w*x-y*S)/_,T=(-w*y-x*S)/_,M=(w*x+y*S)/_,E=(-w*y+x*S)/_,I=C-m,A=T-v,D=M-m,k=E-v;return I*I+A*A>D*D+k*k&&(C=M,T=E),{cx:C,cy:T,x0:-c,y0:-d,x1:C*(i/b-1),y1:T*(i/b-1)}}function Fx(e,t){var n,r=Lx(t.r,0),i=Lx(t.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,p=Rx(l-s),h=p>Ix&&p%Ix;if(h>Bx&&(p=h),r>Bx)if(p>Ix-Bx)e.moveTo(u+r*Dx(s),c+r*Ax(s)),e.arc(u,c,r,s,l,!d),i>Bx&&(e.moveTo(u+i*Dx(l),c+i*Ax(l)),e.arc(u,c,i,l,s,d));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,C=void 0,T=void 0,M=void 0,E=void 0,I=void 0,A=void 0,D=r*Dx(s),k=r*Ax(s),O=i*Dx(l),R=i*Ax(l),N=p>Bx;if(N){var L=t.cornerRadius;L&&(n=function(e){var t;if(_c(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(L),f=n[0],g=n[1],m=n[2],v=n[3]);var P=Rx(r-i)/2;if(y=Px(P,m),x=Px(P,v),_=Px(P,f),b=Px(P,g),C=w=Lx(y,x),T=S=Lx(_,b),(w>Bx||S>Bx)&&(M=r*Dx(l),E=r*Ax(l),I=i*Dx(s),A=i*Ax(s),p<Ex)){var B=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,p=d*l-c*u;if(!(p*p<Bx))return[e+(p=(c*(t-o)-d*(e-i))/p)*l,t+p*u]}(D,k,I,A,M,E,O,R);if(B){var j=D-B[0],F=k-B[1],U=M-B[0],z=E-B[1],H=1/Ax(kx((j*U+F*z)/(Nx(j*j+F*F)*Nx(U*U+z*z)))/2),V=Nx(B[0]*B[0]+B[1]*B[1]);C=Px(w,(r-V)/(H+1)),T=Px(S,(i-V)/(H-1))}}}if(N)if(C>Bx){var W=Px(m,C),Y=Px(v,C),G=jx(I,A,D,k,r,W,d),q=jx(M,E,O,R,r,Y,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),C<w&&W===Y?e.arc(u+G.cx,c+G.cy,C,Ox(G.y0,G.x0),Ox(q.y0,q.x0),!d):(W>0&&e.arc(u+G.cx,c+G.cy,W,Ox(G.y0,G.x0),Ox(G.y1,G.x1),!d),e.arc(u,c,r,Ox(G.cy+G.y1,G.cx+G.x1),Ox(q.cy+q.y1,q.cx+q.x1),!d),Y>0&&e.arc(u+q.cx,c+q.cy,Y,Ox(q.y1,q.x1),Ox(q.y0,q.x0),!d))}else e.moveTo(u+D,c+k),e.arc(u,c,r,s,l,!d);else e.moveTo(u+D,c+k);if(i>Bx&&N)if(T>Bx){W=Px(f,T),G=jx(O,R,M,E,i,-(Y=Px(g,T)),d),q=jx(D,k,I,A,i,-W,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),T<S&&W===Y?e.arc(u+G.cx,c+G.cy,T,Ox(G.y0,G.x0),Ox(q.y0,q.x0),!d):(Y>0&&e.arc(u+G.cx,c+G.cy,Y,Ox(G.y0,G.x0),Ox(G.y1,G.x1),!d),e.arc(u,c,i,Ox(G.cy+G.y1,G.cx+G.x1),Ox(q.cy+q.y1,q.cx+q.x1),d),W>0&&e.arc(u+q.cx,c+q.cy,W,Ox(q.y1,q.x1),Ox(q.y0,q.x0),!d))}else e.lineTo(u+O,c+R),e.arc(u,c,i,l,s,d);else e.lineTo(u+O,c+R)}else e.moveTo(u,c);e.closePath()}}}var Ux=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},zx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Ux},t.prototype.buildPath=function(e,t){Fx(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Av);zx.prototype.type="sector";var Hx=zx,Vx=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Wx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Vx},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Av);Wx.prototype.type="ring";var Yx=Wx;function Gx(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var o=function(e,t,n,r){var i,o,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,h=e.length;p<h;p++)ad(a,a,e[p]),sd(s,s,e[p]);ad(a,a,r[0]),sd(s,s,r[1])}for(p=0,h=e.length;p<h;p++){var f=e[p];if(n)i=e[p?p-1:h-1],o=e[(p+1)%h];else{if(0===p||p===h-1){l.push($c(e[p]));continue}i=e[p-1],o=e[p+1]}Jc(u,o,i),ed(u,u,t);var g=nd(f,i),m=nd(f,o),v=g+m;0!==v&&(g/=v,m/=v),ed(c,u,-g),ed(d,u,m);var y=Kc([],f,c),x=Kc([],f,d);r&&(sd(y,y,a),ad(y,y,s),sd(x,x,a),ad(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);s=1;for(var d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var qx=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Qx=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new qx},t.prototype.buildPath=function(e,t){Gx(e,t,!0)},t}(Av);Qx.prototype.type="polygon";var Zx=Qx,Xx=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},$x=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Xx},t.prototype.buildPath=function(e,t){Gx(e,t,!1)},t}(Av);$x.prototype.type="polyline";var Kx=$x,Jx={},e_=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},t_=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new e_},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=jv(Jx,t,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=t.x1,r=t.y1,i=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),e.lineTo(i,o))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Av);t_.prototype.type="line";var n_=t_,r_=[],i_=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function o_(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?Pp:Lp)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Pp:Lp)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Hp:zp)(e.x1,e.cpx1,e.x2,t),(n?Hp:zp)(e.y1,e.cpy1,e.y2,t)]}var a_=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new i_},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&(Wp(n,a,i,c,r_),a=r_[1],i=r_[2],Wp(r,s,o,c,r_),s=r_[1],o=r_[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(Fp(n,a,l,i,c,r_),a=r_[1],l=r_[2],i=r_[3],Fp(r,s,u,o,c,r_),s=r_[1],u=r_[2],o=r_[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return o_(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=o_(this.shape,e,!0);return td(t,t)},t}(Av);a_.prototype.type="bezier-curve";var s_=a_,l_=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},u_=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new l_},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(o),u=Math.sin(o);e.moveTo(l*i+n,u*i+r),e.arc(n,r,i,o,a,!s)},t}(Av);u_.prototype.type="arc";var c_=u_,d_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return j(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Av.prototype.getBoundingRect.call(this)},t}(Av),p_=d_,h_=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),f_=function(e){function t(t,n,r,i,o,a){var s=e.call(this,o)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=a||!1,s}return j(t,e),t}(h_),g_=function(e){function t(t,n,r,i,o){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return j(t,e),t}(h_),m_=[0,0],v_=[0,0],y_=new Hd,x_=new Hd,__=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Hd;for(n=0;n<2;n++)this._axes[n]=new Hd;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width,s=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);Hd.sub(r[0],n[1],n[0]),Hd.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return y_.set(1/0,1/0),x_.set(0,0),!this._intersectCheckOneSide(this,e,y_,x_,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,y_,x_,r,-1)&&(n=!1,r)||r||Hd.copy(t,n?y_:x_),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,m_),this._getProjMinMaxOnAxis(s,t._corners,v_),m_[1]<v_[0]||m_[0]>v_[1]){if(a=!1,i)return a;var u=Math.abs(v_[0]-m_[1]),c=Math.abs(m_[0]-v_[1]);Math.min(u,c)>r.len()&&(u<c?Hd.scale(r,l,-u*o):Hd.scale(r,l,c*o))}else if(n){u=Math.abs(v_[0]-m_[1]),c=Math.abs(m_[0]-v_[1]);Math.min(u,c)<n.len()&&(u<c?Hd.scale(n,l,u*o):Hd.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}(),b_=__,w_=[],S_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return j(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Kd(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(w_)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},t}(Am),C_=jg();function T_(e,t,n,r,i,o,a){var s,l=!1;bc(i)?(a=o,o=i,i=null):Tc(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=function(e,t,n,r,i){var o;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=Oc(r.duration,200),u=Oc(r.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(l=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),bc(c)&&(c=c(n,i)),bc(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),o&&o()}function M_(e,t,n,r,i,o){T_("update",e,t,n,r,i,o)}function E_(e,t,n,r,i,o){T_("enter",e,t,n,r,i,o)}function I_(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function A_(e,t,n,r,i,o){I_(e)||T_("leave",e,t,n,r,i,o)}function D_(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),A_(e,{style:{opacity:0}},t,n,r)}function k_(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||D_(e,t,n,r)})):D_(e,t,n,r)}function O_(e){C_(e).oldStyle=e.style}var R_=Math.max,N_=Math.min,L_={};var P_=function(e,t){var n=xx(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return j(t,e),t}(vx)};function B_(e,t){L_[e]=t}function j_(e,t,n,r){var i=function(e,t){return new vx(xx(e,t))}(e,t);return n&&("center"===r&&(n=U_(n,i.getBoundingRect())),H_(i,n)),i}function F_(e,t,n){var r=new Pv({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(U_(t,i))}}});return r}function U_(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var z_=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}var a=new Av(t);return a.createPathProxy(),a.buildPath=function(e){if(yx(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function H_(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function V_(e,t){return jv(e,e,{lineWidth:t}),e}var W_=Uv;function Y_(e,t){for(var n=Pd([]);e&&e!==t;)Bd(n,e.getLocalTransform(),n),e=e.parent;return n}function G_(e,t,n){return t&&!pc(t)&&(t=Df.getLocalTransform(t)),n&&(t=Ud([],t)),od([],e,t)}function q_(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return o=G_(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Q_(e){return!e.isGroup}function Z_(e,t,n){if(e&&t){var r,i=(r={},e.traverse((function(e){Q_(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(Q_(e)&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),M_(e,r,n,sy(e).dataIndex)}}}))}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=lc({},e.shape)),t}}function X_(e,t){return fc(e,(function(e){var n=e[0];n=R_(n,t.x),n=N_(n,t.x+t.width);var r=e[1];return r=R_(r,t.y),[n,r=N_(r,t.y+t.height)]}))}function $_(e,t,n){var r=lc({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),uc(i,n),new Pv(r)):j_(e.replace("path://",""),r,n,"center")}function K_(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(J_(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function J_(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,p=s-o,h=eb(d,p,u,c);if((l=h)<=1e-6&&l>=-1e-6)return!1;var f=e-i,g=t-o,m=eb(f,g,u,c)/h;if(m<0||m>1)return!1;var v=eb(f,g,d,p)/h;return!(v<0||v>1)}function eb(e,t,n,r){return e*r-n*t}function tb(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=wc(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&hc(vc(l),(function(e){qc(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=sy(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:uc({content:r,formatterParams:s},i)}}function nb(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function rb(e,t){if(e)if(_c(e))for(var n=0;n<e.length;n++)nb(e[n],t);else nb(e,t)}B_("circle",Sx),B_("ellipse",Mx),B_("sector",Hx),B_("ring",Yx),B_("polygon",Zx),B_("polyline",Kx),B_("rect",Wv),B_("line",n_),B_("bezierCurve",s_),B_("arc",c_);var ib=Object.freeze({__proto__:null,updateProps:M_,initProps:E_,removeElement:A_,removeElementWithFadeOut:k_,isElementRemoved:I_,extendShape:function(e){return Av.extend(e)},extendPath:function(e,t){return P_(e,t)},registerShape:B_,getShapeClass:function(e){if(L_.hasOwnProperty(e))return L_[e]},makePath:j_,makeImage:F_,mergePath:z_,resizePath:H_,subPixelOptimizeLine:V_,subPixelOptimizeRect:function(e){return Fv(e.shape,e.shape,e.style),e},subPixelOptimize:W_,getTransform:Y_,applyTransform:G_,transformDirection:q_,groupTransition:Z_,clipPointsByRect:X_,clipRectByRect:function(e,t){var n=R_(e.x,t.x),r=N_(e.x+e.width,t.x+t.width),i=R_(e.y,t.y),o=N_(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}},createIcon:$_,linePolygonIntersect:K_,lineLineIntersect:J_,setTooltipConfig:tb,traverseElements:rb,Group:eg,Image:Pv,Text:ay,Circle:Sx,Ellipse:Mx,Sector:Hx,Ring:Yx,Polygon:Zx,Polyline:Kx,Rect:Wv,Line:n_,BezierCurve:s_,Arc:c_,IncrementalDisplayable:S_,CompoundPath:p_,LinearGradient:f_,RadialGradient:g_,BoundingRect:Kd,OrientedBoundingRect:b_,Point:Hd,Path:Av}),ob={};function ab(e,t,n){var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=bc(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<py.length;u++){var c=py[u],d=t[c];l[c]=Oc(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function sb(e,t,n,r){n=n||ob;for(var i=e instanceof ay,o=!1,a=0;a<hy.length;a++){if((p=t[hy[a]])&&p.getShallow("show")){o=!0;break}}var s=i?e:e.getTextContent();if(o){i||(s||(s=new ay,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=ab(n,t),u=t.normal,c=!!u.getShallow("show"),d=ub(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(cb(u,n,!1));for(a=0;a<py.length;a++){var p,h=py[a];if(p=t[h]){var f=s.ensureState(h),g=!!Oc(p.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=ub(p,r&&r[h],n,!0,!i),f.style.text=l[h],!i)e.ensureState(h).textConfig=cb(p,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(gb(s).setLabelText=function(e){var r=ab(n,t,e);!function(e,t){for(var n=0;n<py.length;n++){var r=py[n],i=t[r],o=e.ensureState(r);o.style=o.style||{},o.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}(s,r)})}else s&&(s.ignore=!0);e.dirty()}function lb(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<py.length;r++){var i=py[r];n[i]=e.getModel([i,t])}return n}function ub(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||ob;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||ob).rich;if(n){t=t||{};for(var r=vc(n),i=0;i<r.length;i++){t[r[i]]=1}}e=e.parentModel}return t}(t);if(l)for(var u in o={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);fb(o[u]={},c,s,n,r,i,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var p=t.get("minMargin");null!=p&&(e.margin=p);fb(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&lc(o,t),o}function cb(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=Oc(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var db=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],pb=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],hb=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function fb(e,t,n,r,i,o,a,s){n=!i&&n||ob;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=Oc(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var p=Oc(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=Oc(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var f=Oc(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),i||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),i||o||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var g=0;g<db.length;g++){var m=db[g];null!=(y=Oc(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<pb.length;g++){m=pb[g];null!=(y=t.getShallow(m))&&(e[m]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!a||!r.disableBox){for(g=0;g<hb.length;g++){var y;m=hb[g];null!=(y=t.getShallow(m))&&(e[m]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}var gb=jg();var mb,vb,yb=["textStyle","color"],xb=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],_b=new ay,bb=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(yb):null)},e.prototype.getFont=function(){return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},t=this.ecModel,n=t&&t.getModel("textStyle"),Bc([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "));var e,t,n},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<xb.length;n++)t[xb[n]]=this.getShallow(xb[n]);return _b.useStyle(t),_b.update(),_b.getBoundingRect()},e}(),wb=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Sb=tm(wb),Cb=function(){function e(){}return e.prototype.getLineStyle=function(e){return Sb(this,e)},e}(),Tb=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Mb=tm(Tb),Eb=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Mb(this,e,t)},e}(),Ib=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){sc(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(ac(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Fu.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();Zg(Ib),mb=Ib,vb=["__\0is_clz",$g++].join("_"),mb.prototype[vb]=!0,mb.isInstance=function(e){return!(!e||!e[vb])},dc(Ib,Cb),dc(Ib,Eb),dc(Ib,rm),dc(Ib,bb);var Ab=Ib,Db=Math.round(10*Math.random());function kb(e){return[e||"",Db++].join("_")}function Ob(e,t){return sc(sc({},e,!0),t,!0)}var Rb="ZH",Nb="EN",Lb=Nb,Pb={},Bb={},jb=Fu.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(Rb)>-1?Rb:Lb;function Fb(e,t){e=e.toUpperCase(),Bb[e]=new Ab(t),Pb[e]=t}Fb(Nb,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Fb(Rb,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Ub=1e3,zb=6e4,Hb=36e5,Vb=864e5,Wb=31536e6,Yb={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Gb="{yyyy}-{MM}-{dd}",qb={year:"{yyyy}",month:"{yyyy}-{MM}",day:Gb,hour:Gb+" "+Yb.hour,minute:Gb+" "+Yb.minute,second:Gb+" "+Yb.second,millisecond:Yb.none},Qb=["year","month","day","hour","minute","second","millisecond"],Zb=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Xb(e,t){return"0000".substr(0,t-(e+="").length)+e}function $b(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Kb(e){return e===$b(e)}function Jb(e,t,n,r){var i=mg(e),o=i[nw(n)](),a=i[rw(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[iw(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[ow(n)](),d=(c-1)%12+1,p=i[aw(n)](),h=i[sw(n)](),f=i[lw(n)](),g=r instanceof Ab?r:function(e){return Bb[e]}(r||jb)||Bb[Lb],m=g.getModel("time"),v=m.get("month"),y=m.get("monthAbbr"),x=m.get("dayOfWeek"),_=m.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,Xb(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,Xb(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Xb(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Xb(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Xb(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Xb(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Xb(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Xb(f,3)).replace(/{S}/g,f+"")}function ew(e,t){var n=mg(e),r=n[rw(t)]()+1,i=n[iw(t)](),o=n[ow(t)](),a=n[aw(t)](),s=n[sw(t)](),l=0===n[lw(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,p=d&&1===i;return p&&1===r?"year":p?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function tw(e,t,n){var r=Cc(e)?mg(e):e;switch(t=t||ew(e,n)){case"year":return r[nw(n)]();case"half-year":return r[rw(n)]()>=6?1:0;case"quarter":return Math.floor((r[rw(n)]()+1)/4);case"month":return r[rw(n)]();case"day":return r[iw(n)]();case"half-day":return r[ow(n)]()/24;case"hour":return r[ow(n)]();case"minute":return r[aw(n)]();case"second":return r[sw(n)]();case"millisecond":return r[lw(n)]()}}function nw(e){return e?"getUTCFullYear":"getFullYear"}function rw(e){return e?"getUTCMonth":"getMonth"}function iw(e){return e?"getUTCDate":"getDate"}function ow(e){return e?"getUTCHours":"getHours"}function aw(e){return e?"getUTCMinutes":"getMinutes"}function sw(e){return e?"getUTCSeconds":"getSeconds"}function lw(e){return e?"getUTCMilliseconds":"getMilliseconds"}function uw(e){return e?"setUTCFullYear":"setFullYear"}function cw(e){return e?"setUTCMonth":"setMonth"}function dw(e){return e?"setUTCDate":"setDate"}function pw(e){return e?"setUTCHours":"setHours"}function hw(e){return e?"setUTCMinutes":"setMinutes"}function fw(e){return e?"setUTCSeconds":"setSeconds"}function gw(e){return e?"setUTCMilliseconds":"setMilliseconds"}function mw(e){if(isNaN(xg(e)))return wc(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function vw(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var yw=Lc;function xw(e,t,n){function r(e){return e&&Bc(e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?mg(e):e;if(!isNaN(+s))return Jb(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return Sc(e)?r(e):Cc(e)&&i(e)?e+"":"-";var l=xg(e);return i(l)?mw(l):Sc(e)?r(e):"boolean"==typeof e?e+"":"-"}var _w=["a","b","c","d","e","f","g"],bw=function(e,t){return"{"+e+(null==t?"":t)+"}"};function ww(e,t,n){_c(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=_w[o];e=e.replace(bw(a),bw(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(bw(_w[l],s),n?wd(u):u)}return e}function Sw(e,t){return t=t||"transparent",wc(e)?e:Tc(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Cw(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var Tw=hc,Mw=["left","right","top","bottom","width","height"],Ew=[["width","left","right"],["height","top","bottom"]];function Iw(e,t,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild((function(l,u){var c,d,p=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect();if("horizontal"===e){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var m=p.height+(f?-f.y+p.y:0);(d=a+m)>i||l.newline?(o+=s+n,a=0,d=m,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)}))}var Aw=Iw;function Dw(e,t,n){n=yw(n||0);var r=t.width,i=t.height,o=sg(e.left,r),a=sg(e.top,i),s=sg(e.right,r),l=sg(e.bottom,i),u=sg(e.width,r),c=sg(e.height,i),d=n[2]+n[0],p=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-p-o),isNaN(c)&&(c=i-l-d-a),null!=h&&(isNaN(u)&&isNaN(c)&&(h>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(o)&&(o=r-s-u-p),isNaN(a)&&(a=i-l-c-d),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-p}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-d}o=o||0,a=a||0,isNaN(u)&&(u=r-p-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new Kd(o+n[3],a+n[0],u,c);return f.margin=n,f}function kw(e){var t=e.layoutMode||e.constructor.layoutMode;return Tc(t)?t:t?{type:t}:null}function Ow(e,t,n){var r=n&&n.ignoreSize;!_c(r)&&(r=[r,r]);var i=a(Ew[0],0),o=a(Ew[1],1);function a(n,i){var o={},a=0,u={},c=0;if(Tw(n,(function(t){u[t]=e[t]})),Tw(n,(function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++})),r[i])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var d=0;d<n.length;d++){var p=n[d];if(!s(o,p)&&s(e,p)){o[p]=e[p];break}}return o}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){Tw(e,(function(e){t[e]=n[e]}))}u(Ew[0],e,i),u(Ew[1],e,o)}function Rw(e){return function(e,t){return t&&e&&Tw(Mw,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}({},e)}xc(Iw,"vertical"),xc(Iw,"horizontal");var Nw=jg(),Lw=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=kb("ec_cpt_model"),i}return j(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=kw(this),r=n?Rw(e):{};sc(e,t.getTheme().get(this.mainType)),sc(e,this.getDefaultOption()),n&&Ow(e,r,n)},t.prototype.mergeOption=function(e,t){sc(this.option,e,!0);var n=kw(this);n&&Ow(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[qg])}(e))return e.defaultOption;var t=Nw(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=sc(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Wg(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Ab);Xg(Lw,Ab),em(Lw),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Qg(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=Qg(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(Lw),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,i,o){if(e.length){var a=function(e){var r={},i=[];return hc(e,(function(o){var a=n(r,o),s=function(e,t){var n=[];return hc(e,(function(e){cc(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),hc(s,(function(e){cc(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);cc(t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(hc(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],p=!!u[c];p&&(i.call(o,c,d.originalDeps.slice()),delete u[c]),hc(d.successor,p?f:h)}hc(u,(function(){throw new Error("")}))}function h(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,h(e)}}}(Lw,(function(e){var t=[];hc(Lw.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=fc(t,(function(e){return Qg(e).main})),"dataset"!==e&&cc(t,"dataset")<=0&&t.unshift("dataset");return t}));var Pw=Lw,Bw="";"undefined"!=typeof navigator&&(Bw=navigator.platform||"");var jw="rgba(0, 0, 0, 0.2)",Fw={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:jw,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:jw,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:jw,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:jw,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:jw,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:jw,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Bw.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Uw=Wc(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),zw="original",Hw="arrayRows",Vw="objectRows",Ww="keyedColumns",Yw="typedArray",Gw="unknown",qw="column",Qw="row",Zw=1,Xw=2,$w=3,Kw=jg();function Jw(e,t,n){var r={},i=eS(t);if(!i||!e)return r;var o,a,s=[],l=[],u=t.ecModel,c=Kw(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;hc(e=e.slice(),(function(t,n){var i=Tc(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]}));var p=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function h(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return hc(e,(function(e,t){var n=e.name,i=f(e);if(null==o){var a=p.valueWayDim;h(r[n],a,i),h(l,a,i),p.valueWayDim+=i}else if(o===t)h(r[n],0,i),h(s,0,i);else{a=p.categoryWayDim;h(r[n],a,i),h(l,a,i),p.categoryWayDim+=i}})),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function eS(e){if(!e.get("data",!0))return Wg(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Hg).models[0]}function tS(e,t){return function(e,t,n,r,i,o){var a,s,l,u=5;if(Ec(e))return $w;if(r){var c=r[o];Tc(c)?(s=c.name,l=c.type):wc(c)&&(s=c)}if(null!=l)return"ordinal"===l?Zw:$w;if(t===Hw){var d=e;if(n===Qw){for(var p=d[o],h=0;h<(p||[]).length&&h<u;h++)if(null!=(a=x(p[i+h])))return a}else for(h=0;h<d.length&&h<u;h++){var f=d[i+h];if(f&&null!=(a=x(f[o])))return a}}else if(t===Vw){var g=e;if(!s)return $w;for(h=0;h<g.length&&h<u;h++){if((v=g[h])&&null!=(a=x(v[s])))return a}}else if(t===Ww){if(!s)return $w;if(!(p=e[s])||Ec(p))return $w;for(h=0;h<p.length&&h<u;h++)if(null!=(a=x(p[h])))return a}else if(t===zw){var m=e;for(h=0;h<m.length&&h<u;h++){var v,y=Ag(v=m[h]);if(!_c(y))return $w;if(null!=(a=x(y[o])))return a}}function x(e){var t=wc(e);return null!=e&&isFinite(e)&&""!==e?t?Xw:$w:t&&"-"!==e?Zw:void 0}return $w}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var nS=Wc();var rS=jg();jg();var iS,oS,aS,sS=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Mg(this.get("color",!0)),i=this.get("colorLayer",!0);return function(e,t,n,r,i,o,a){o=o||e;var s=t(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if(c=c||n,!c||!c.length)return;var d=c[l];i&&(u[i]=d);return s.paletteIdx=(l+1)%c.length,d}(this,rS,r,i,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,rS)},e}();var lS="\0_ec_inner",uS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new Ab(r),this._locale=new Ab(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=pS(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,pS(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):aS(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&hc(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=Wc(),s=t&&t.replaceMergeMainTypeMap;Kw(this).datasetMap=Wc(),hc(e,(function(e,t){null!=e&&(Pw.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?ac(e):sc(n[t],e,!0))})),s&&s.each((function(e,t){Pw.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),Pw.topologicalTravel(o,Pw.getAllClassMainTypes(),(function(t){var o=function(e,t,n){var r=nS.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,Mg(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=kg(a,o,l);(function(e,t,n){hc(e,(function(e){var r=e.newOption;Tc(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,Pw),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],p=[],h=0;hc(u,(function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=Pw.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(c)return;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=lc({componentIndex:n},e.keyInfo);lc(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),p.push(r),h++):(d.push(void 0),p.push(void 0))}),this),n[t]=d,r.set(t,p),i.set(t,h),"series"===t&&iS(this)}),this),this._seriesIndices||iS(this)},t.prototype.getOption=function(){var e=ac(this.option);return hc(e,(function(t,n){if(Pw.hasClass(n)){for(var r=Mg(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!Pg(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e[lS],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,i=e.id,o=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=r?(n=[],hc(Mg(r),(function(e){a[e]&&n.push(a[e])}))):n=null!=i?cS("id",i,a):null!=o?cS("name",o,a):mc(a,(function(e){return!!e})),dS(n,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,o,a=e.query,s=e.mainType,l=(n=s+"Index",r=s+"Id",i=s+"Name",!(t=a)||null==t[n]&&null==t[r]&&null==t[i]?null:{mainType:s,index:t[n],id:t[r],name:t[i]}),u=l?this.queryComponents(l):mc(this._componentsMap.get(s),(function(e){return!!e}));return o=dS(u,e),e.filter?mc(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(bc(e)){var i=t,o=e;r.each((function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&o.call(i,t,r,r.componentIndex)}}))}else for(var a=wc(e)?r.get(e):Tc(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=Ng(e,null);return mc(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return mc(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return mc(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){oS(this),hc(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},t.prototype.eachRawSeries=function(e,t){hc(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,n){oS(this),hc(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)}),this)},t.prototype.eachRawSeriesByType=function(e,t,n){return hc(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return oS(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){oS(this);var n=[];hc(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)}),this),this._seriesIndices=n,this._seriesIndicesMap=Wc(n)},t.prototype.restoreData=function(e){iS(this);var t=this._componentsMap,n=[];t.each((function(e,t){Pw.hasClass(t)&&n.push(t)})),Pw.topologicalTravel(n,Pw.getAllClassMainTypes(),(function(n){hc(t.get(n),(function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e)||t.restoreData()}))}))},t.internalField=(iS=function(e){var t=e._seriesIndices=[];hc(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=Wc(t)},oS=function(e){},void(aS=function(e,t){e.option={},e.option[lS]=1,e._componentsMap=Wc({series:[]}),e._componentsCount=Wc();var n=t.aria;Tc(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;hc(t,(function(t,r){"colorLayer"===r&&n||Pw.hasClass(r)||("object"==typeof t?e[r]=e[r]?sc(e[r],t,!1):ac(t):null==e[r]&&(e[r]=t))}))}(t,e._theme.option),sc(t,Fw,!1),e._mergeOption(t,null)})),t}(Ab);function cS(e,t,n){if(_c(t)){var r=Wc();return hc(t,(function(e){null!=e&&(null!=Ng(e,null)&&r.set(e,!0))})),mc(n,(function(t){return t&&r.get(t[e])}))}var i=Ng(t,null);return mc(n,(function(t){return t&&null!=i&&t[e]===i}))}function dS(e,t){return t.hasOwnProperty("subType")?mc(e,(function(e){return e&&e.subType===t.subType})):e}function pS(e){var t=Wc();return e&&hc(Mg(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}dc(uS,sS);var hS=uS,fS=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],gS=function(e){hc(fS,(function(t){this[t]=yc(e[t],e)}),this)},mS={},vS=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];hc(mS,(function(r,i){var o=r.create(e,t);n=n.concat(o||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){hc(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){mS[e]=t},e.get=function(e){return mS[e]},e}(),yS=/^(min|max)?(.+)$/,xS=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(hc(Mg(e.series),(function(e){e&&e.data&&Ec(e.data)&&Fc(e.data)})),hc(Mg(e.dataset),(function(e){e&&e.source&&Ec(e.source)&&Fc(e.source)}))),e=ac(e);var r=this._optionBackup,i=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(i=a).timeline||(i.timeline=s):((d||c)&&(e.options=e.media=null),i=e);c&&_c(u)&&hc(u,(function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}));function p(e){hc(t,(function(t){t(e,n)}))}return p(i),hc(l,(function(e){return p(e)})),hc(o,(function(e){return p(e.option)})),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],ac(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=ac(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)_S(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=fc(s,(function(e){return ac(-1===e?a.option:o[e].option)}))),this._currentMediaIndices=s,l},e}();function _S(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return hc(e,(function(e,t){var n=t.match(yS);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(r[a],e,o)||(i=!1)}})),i}var bS=xS,wS=hc,SS=Tc,CS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function TS(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=CS.length;n<r;n++){var i=CS[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?sc(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?sc(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function MS(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,uc(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function ES(e){MS(e,"itemStyle"),MS(e,"lineStyle"),MS(e,"areaStyle"),MS(e,"label"),MS(e,"labelLine"),MS(e,"upperLabel"),MS(e,"edgeLabel")}function IS(e,t){var n=SS(e)&&e[t],r=SS(n)&&n.textStyle;if(r)for(var i=0,o=Ig.length;i<o;i++){var a=Ig[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function AS(e){e&&(ES(e),IS(e,"label"),e.emphasis&&IS(e.emphasis,"label"))}function DS(e){return _c(e)?e:e?[e]:[]}function kS(e){return(_c(e)?e[0]:e)||{}}function OS(e,t){wS(DS(e.series),(function(e){SS(e)&&function(e){if(SS(e)){TS(e),ES(e),IS(e,"label"),IS(e,"upperLabel"),IS(e,"edgeLabel"),e.emphasis&&(IS(e.emphasis,"label"),IS(e.emphasis,"upperLabel"),IS(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(TS(t),AS(t));var n=e.markLine;n&&(TS(n),AS(n));var r=e.markArea;r&&AS(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!Ec(o))for(var a=0;a<o.length;a++)AS(o[a]);hc(e.categories,(function(e){ES(e)}))}if(i&&!Ec(i))for(a=0;a<i.length;a++)AS(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)AS(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)_c(l[a])?(AS(l[a][0]),AS(l[a][1])):AS(l[a])}"gauge"===e.type?(IS(e,"axisLabel"),IS(e,"title"),IS(e,"detail")):"treemap"===e.type?(MS(e.breadcrumb,"itemStyle"),hc(e.levels,(function(e){ES(e)}))):"tree"===e.type&&ES(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),wS(n,(function(t){wS(DS(e[t]),(function(e){e&&(IS(e,"axisLabel"),IS(e.axisPointer,"label"))}))})),wS(DS(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;IS(t,"axisLabel"),IS(t&&t.axisPointer,"label")})),wS(DS(e.calendar),(function(e){MS(e,"itemStyle"),IS(e,"dayLabel"),IS(e,"monthLabel"),IS(e,"yearLabel")})),wS(DS(e.radar),(function(e){IS(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),wS(DS(e.geo),(function(e){SS(e)&&(AS(e),wS(DS(e.regions),(function(e){AS(e)})))})),wS(DS(e.timeline),(function(e){AS(e),MS(e,"label"),MS(e,"itemStyle"),MS(e,"controlStyle",!0);var t=e.data;_c(t)&&hc(t,(function(e){Tc(e)&&(MS(e,"label"),MS(e,"itemStyle"))}))})),wS(DS(e.toolbox),(function(e){MS(e,"iconStyle"),wS(e.feature,(function(e){MS(e,"iconStyle")}))})),IS(kS(e.axisPointer),"label"),IS(kS(e.tooltip).axisPointer,"label")}function RS(e){e&&hc(NS,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var NS=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],LS=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],PS=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function BS(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<PS.length;n++){var r=PS[n][1],i=PS[n][0];null!=t[r]&&(t[i]=t[r])}}function jS(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function FS(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function US(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&US(e[n].children,t)}function zS(e,t){OS(e,t),e.series=Mg(e.series),hc(e.series,(function(e){if(Tc(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),jS(e.label),(i=e.data)&&!Ec(i))for(var n=0;n<i.length;n++)jS(i[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=function(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=r&&function(e,t,n,r){for(var i,o=t.split(","),a=e,s=0;s<o.length-1;s++)null==a[i=o[s]]&&(a[i]={}),a=a[i];(r||null==a[o[s]])&&(a[o[s]]=n)}(e,"itemStyle.color",r)}else if("bar"===t){var i;if(BS(e),BS(e.backgroundStyle),BS(e.emphasis),(i=e.data)&&!Ec(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(BS(i[n]),BS(i[n]&&i[n].emphasis))}else if("sunburst"===t){var o=e.highlightPolicy;o&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=o)),FS(e),US(e.data,FS)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&uc(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),RS(e)}})),e.dataRange&&(e.visualMap=e.dataRange),hc(LS,(function(t){var n=e[t];n&&(_c(n)||(n=[n]),hc(n,(function(e){RS(e)})))}))}function HS(e){hc(e,(function(t,n){var r=[],i=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,u,c){var d,p,h=a.get(t.stackedDimension,c);if(isNaN(h))return i;s?p=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var v=m.data.getByRawIndex(m.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&h>=0&&v>0||"samesign"===l&&h<=0&&v<0){h=pg(h,v),f=v;break}}}return r[0]=h,r[1]=f,r}))}))}var VS,WS,YS,GS,qS,QS=function(e){this.data=e.data||(e.sourceFormat===Ww?{}:[]),this.sourceFormat=e.sourceFormat||Gw,this.seriesLayoutBy=e.seriesLayoutBy||qw,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&tS(this,n)===Zw&&(r.type="ordinal")}};function ZS(e){return e instanceof QS}function XS(e,t,n){n=n||JS(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:eC(i),startIndex:a,dimensionsDetectedCount:o};if(t===Hw){var s=e;"auto"===r||null==r?tC((function(e){null!=e&&"-"!==e&&(wc(e)?null==a&&(a=1):a=0)}),n,s,10):a=Cc(r)?r:r?1:0,i||1!==a||(i=[],tC((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:n===Qw?s.length:s[0]?s[0].length:null}else if(t===Vw)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return vc(t)}(e));else if(t===Ww)i||(i=[],hc(e,(function(e,t){i.push(t)})));else if(t===zw){var l=Ag(e[0]);o=_c(l)&&l.length||1}return{startIndex:a,dimensionsDefine:eC(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new QS({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ac(t)})}function $S(e){return new QS({data:e,sourceFormat:Ec(e)?Yw:zw})}function KS(e){return new QS({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:ac(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function JS(e){var t=Gw;if(Ec(e))t=Yw;else if(_c(e)){0===e.length&&(t=Hw);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(_c(i)){t=Hw;break}if(Tc(i)){t=Vw;break}}}}else if(Tc(e))for(var o in e)if(qc(e,o)&&pc(e[o])){t=Ww;break}return t}function eC(e){if(e){var t=Wc();return fc(e,(function(e,n){var r={name:(e=Tc(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r}))}}function tC(e,t,n,r){if(t===Qw)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else{var o=n[0]||[];for(i=0;i<o.length&&i<r;i++)e(o[i],i)}}function nC(e){var t=e.sourceFormat;return t===Vw||t===Ww}var rC=function(){function e(e,t){var n=ZS(e)?e:$S(e);this._source=n;var r=this._data=n.data;n.sourceFormat===Yw&&(this._offset=0,this._dimSize=t,this._data=r),qS(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;qS=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(lc(e,GS[hC(a,s)]),a===Yw)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=aC(a,s);e.getItem=yc(c,null,i,l,u);var d=uC(a,s);e.count=yc(d,null,i,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},n=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],p=0;p<c;p++){var h=i[p*o+a];d[e+p]=h,h<l&&(l=h),h>u&&(u=h)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[Hw+"_"+qw]={pure:!0,appendData:i},e[Hw+"_"+Qw]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Vw]={pure:!0,appendData:i},e[Ww]={pure:!0,appendData:function(e){var t=this._data;hc(e,(function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])}))}},e[zw]={appendData:i},e[Yw]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},GS=e}(),e}(),iC=function(e,t,n,r){return e[r]},oC=((VS={})[Hw+"_"+qw]=function(e,t,n,r){return e[r+t]},VS[Hw+"_"+Qw]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=e,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[r]:null}return o},VS[Vw]=iC,VS[Ww]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},VS[zw]=iC,VS);function aC(e,t){return oC[hC(e,t)]}var sC=function(e,t,n){return e.length},lC=((WS={})[Hw+"_"+qw]=function(e,t,n){return Math.max(0,e.length-t)},WS[Hw+"_"+Qw]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},WS[Vw]=sC,WS[Ww]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},WS[zw]=sC,WS);function uC(e,t){return lC[hC(e,t)]}var cC=function(e,t,n){return e[t]},dC=((YS={})[Hw]=cC,YS[Vw]=function(e,t,n){return e[n]},YS[Ww]=cC,YS[zw]=function(e,t,n){var r=Ag(e);return r instanceof Array?r[t]:r},YS[Yw]=cC,YS);function pC(e){return dC[e]}function hC(e,t){return e===Hw?e+"_"+t:e}function fC(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=i.getDimensionProperty(a);return pC(o)(r,a,s)}var l=r;return o===zw&&(l=Ag(r)),l}}}var gC=/\{@(.+?)\}/g,mC=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,p=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:a,dataType:t,value:r,color:l,borderColor:u,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(o&&(s.value=o.interpolatedValue),null!=r&&_c(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return bc(i)?(s.status=t,s.dimensionIndex=r,i(s)):wc(i)?ww(i,s).replace(gC,(function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=fC(a,e,i);if(o&&_c(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return fC(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function vC(e){var t,n;return Tc(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function yC(e){return new xC(e)}var xC=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,h=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(o||p<h)){var f=this._progress;if(_c(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],p,h,l,u);else this._doProgress(f,p,h,l,u)}this._dueIndex=h;var m=null!=this._settedOutputEnd?this._settedOutputEnd:h;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){_C.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:_C.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),_c(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),_C=function(){var e,t,n,r,i,o={reset:function(l,u,c,d){t=l,e=u,n=c,r=d,i=Math.ceil(r/n),o.next=n>1&&r>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%i*n+Math.ceil(t/i),a=t>=e?null:o<r?o:t;return t++,a}}();function bC(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||Cc(e)||null==e||"-"===e||(e=+mg(e)),null==e||""===e?NaN:+e)}Wc({number:function(e){return parseFloat(e)},time:function(e){return+mg(e)},trim:function(e){return wc(e)?Bc(e):e}});var wC=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Cc(e)?e:xg(e),r=Cc(t)?t:xg(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=wc(e),s=wc(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),SC=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return bC(e,t)},e}();function CC(e){if(!DC(e.sourceFormat)){Sg("")}return e.data}function TC(e){var t=e.sourceFormat,n=e.data;if(!DC(t)){Sg("")}if(t===Hw){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===Vw){for(r=[],i=0,o=n.length;i<o;i++)r.push(lc({},n[i]));return r}}function MC(e,t,n){if(null!=n)return Cc(n)||!isNaN(n)&&!qc(t,n)?e[n]:qc(t,n)?t[n]:void 0}function EC(e){return ac(e)}var IC=Wc();function AC(e,t,n,r){t.length||Sg(""),Tc(e)||Sg("");var i=e.type,o=IC.get(i);o||Sg("");var a=fc(t,(function(e){return function(e,t){var n=new SC,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==qw&&Sg("");var a=[],s={},l=e.dimensionsDefine;if(l)hc(l,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(qc(s,n)&&Sg(""),s[n]=r)}));else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=aC(i,qw);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=yc(CC,null,e)),n.cloneRawData=yc(TC,null,e);var d=uC(i,qw);n.count=yc(d,null,r,o,a);var p=pC(i);n.retrieveValue=function(e,t){var n=c(r,o,a,e);return h(n,t)};var h=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=yc(MC,null,a,s),n.cloneAllDimensionInfo=yc(EC,null,a),n}(e,o)}));return fc(Mg(o.transform({upstream:a[0],upstreamList:a,config:ac(e.config)})),(function(e,n){var r;Tc(e)||Sg(""),e.data||Sg(""),DC(JS(e.data))||Sg("");var i=t[0];if(i&&0===n&&!e.dimensions){var o=i.startIndex;o&&(e.data=i.data.slice(0,o).concat(e.data)),r={seriesLayoutBy:qw,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:qw,sourceHeader:0,dimensions:e.dimensions};return XS(e.data,r,null)}))}function DC(e){return e===Hw||e===Vw}var kC,OC="undefined",RC=typeof Uint32Array===OC?Array:Uint32Array,NC=typeof Uint16Array===OC?Array:Uint16Array,LC=typeof Int32Array===OC?Array:Int32Array,PC=typeof Float64Array===OC?Array:Float64Array,BC={float:PC,int:LC,ordinal:Array,number:Array,time:PC};function jC(e){return e>65535?RC:NC}function FC(e,t,n,r,i){var o=BC[n||"float"];if(i){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(r)}var UC=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Wc()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=kC[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],nC(r),this._dimensions=fc(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new BC[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[e]=[1/0,-1/0]);for(var s=i[e],l=o;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<i;l++){FC(n,l,(h=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,p=0;p<i;p++){var h=r[p],f=kC.arrayRows.call(this,e[d]||u,h.property,d,p);n[p][c]=f;var g=o[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=fc(o,(function(e){return e.property})),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=[1/0,-1/0]),FC(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],p=e;p<t;p++){d=r.getItem(p,d);for(var h=0;h<a;h++){var f=i[h],g=this._dimValueGetter(d,l[h],p,h);f[p]=g;var m=s[h];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;i=0;for(var o=r.length;i<o;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],(function(e){isNaN(e)||t.push(e)}));var n=t.sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=o+1;else{if(!(t[o]>e))return o;i=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-r[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<o||d===o&&c>=0&&a<0)&&(o=d,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{e=new(n=jC(this._rawCount))(this.count());for(i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(jC(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,p=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][p],c)}else{for(var h=0;h<a;h++)o[h]=u[e[h]][p];o[h]=c,d=t.apply(null,o)}d&&(i[s++]=p)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=vc(e),i=r.length;if(!i)return this;var o=t.count(),a=new(jC(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,p=!1;if(!t._indices){var h=0;if(1===i){for(var f=d[r[0]],g=0;g<n;g++){((x=f[g])>=u&&x<=c||isNaN(x))&&(a[s++]=h),h++}p=!0}else if(2===i){f=d[r[0]];var m=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(g=0;g<n;g++){var x=f[g],_=m[g];(x>=u&&x<=c||isNaN(x))&&(_>=v&&_<=y||isNaN(_))&&(a[s++]=h),h++}p=!0}}if(!p)if(1===i)for(g=0;g<o;g++){var b=t.getRawIndex(g);((x=d[r[0]][b])>=u&&x<=c||isNaN(x))&&(a[s++]=b)}else for(g=0;g<o;g++){for(var w=!0,S=(b=t.getRawIndex(g),0);S<i;S++){var C=r[S];((x=d[C][b])<e[C][0]||x>e[C][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(g))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=[1/0,-1/0];for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),p=0;p<o;p++)s[p]=r[t[p]][d];s[o]=c;var h=n&&n.apply(null,s);if(null!=h){"object"!=typeof h&&(i[0]=h,h=i);for(u=0;u<h.length;u++){var f=t[u],g=h[u],m=l[f],v=r[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,o=this.clone([e],!0),a=o._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(jC(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var p=1;p<s-1;p+=u){for(var h=Math.min(p+u,s-1),f=Math.min(p+2*u,s),g=(f+h)/2,m=0,v=h;v<f;v++){var y=a[T=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-h;var x=p,_=Math.min(p+u,s),b=p-1,w=a[c];n=-1,i=x;var S=-1,C=0;for(v=x;v<_;v++){var T;y=a[T=this.getRawIndex(v)];isNaN(y)?(C++,S<0&&(S=T)):(r=Math.abs((b-g)*(y-w)-(b-v)*(m-w)))>n&&(n=r,i=T)}C>0&&C<_-x&&(d[l++]=Math.min(S,i),i=Math.max(S,i)),d[l++]=i,c=i}return d[l++]=this.getRawIndex(s-1),o._count=l,o._indices=d,o.getRawIndex=this._getRawIdx,o},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=i._rawExtent[e]=[1/0,-1/0],d=new(jC(this._rawCount))(Math.ceil(u/s)),p=0,h=0;h<u;h+=s){s>u-h&&(s=u-h,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(h+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(h+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[p++]=v}return i._count=p,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var r,i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var o=(r=n)[0],a=r[1],s=0;s<i;s++){var l=t[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return r=[o,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r,i,o=new e,a=this._chunks,s=t&&gc(t,(function(e,t){return e[t]=!0,e}),{});if(s)for(var l=0;l<a.length;l++)o._chunks[l]=s[l]?(r=a[l],i=void 0,(i=r.constructor)===Array?r.slice():new i(r)):a[l];else o._chunks=a;return this._copyCommonProps(o),n||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=ac(this._extent),e._rawExtent=ac(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return bC(e[r],this._dimensions[r])}kC={arrayRows:e,objectRows:function(e,t,n,r){return bC(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return bC(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),zC=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(HC(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Ec(a=o.get("data",!0))?Yw:zw,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},p=Oc(c.seriesLayoutBy,d.seriesLayoutBy)||null,h=Oc(c.sourceHeader,d.sourceHeader),f=Oc(c.dimensions,d.dimensions);e=p!==d.seriesLayoutBy||!!h!=!!d.sourceHeader||f?[XS(a,{seriesLayoutBy:p,sourceHeader:h,dimensions:f},s)]:[]}else{var g=n;if(i){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[XS(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==e.length&&VC("")}var o=[],a=[];return hc(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||VC(""),o.push(t),a.push(e._getVersionSign())})),r?t=function(e,t){var n=Mg(e),r=n.length;r||Sg("");for(var i=0,o=r;i<o;i++)t=AC(n[i],t),i!==o-1&&(t.length=Math.max(t.length,1));return t}(r,o,n.componentIndex):null!=i&&(t=[KS(o[0])]),{sourceList:t,upstreamSignList:a}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];HC(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new UC).initData(new rC(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(HC(e)){var t=eS(e);return t?[t.getSourceManager()]:[]}return fc(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Wg(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Hg).models:[]}(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(HC(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=r;e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function HC(e){return"series"===e.mainType}function VC(e){throw new Error(e)}var WC="line-height:1";function YC(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+wd(r+"")+"px;color:"+wd(n)+";font-weight:"+wd(i+""),valueStyle:"font-size:"+wd(a+"")+"px;color:"+wd(o)+";font-weight:"+wd(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var GC=[0,10,20,30],qC=["","\n","\n\n","\n\n\n"];function QC(e,t){return t.type=e,t}function ZC(e){return"section"===e.type}function XC(e){return ZC(e)?KC:JC}function $C(e){if(ZC(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return hc(e.blocks,(function(e){var n=$C(e);n>=t&&(t=n+ +(r&&(!n||ZC(e)&&!e.noHeader)))})),t}return 0}function KC(e,t,n,r){var i,o=t.noHeader,a=(i=$C(t),{html:GC[i],richText:qC[i]}),s=[],l=t.blocks||[];Pc(!l||_c(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(qc(c,u)){var d=new wC(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}hc(l,(function(n,i){var o=t.valueFormatter,l=XC(n)(o?lc(lc({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)}));var p="richText"===e.renderMode?s.join(a.richText):tT(s.join(""),o?n:a.html);if(o)return p;var h=xw(t.header,"ordinal",e.useUTC),f=YC(r,e.renderMode).nameStyle;return"richText"===e.renderMode?nT(e,h,f)+a.richText+p:tT('<div style="'+f+";"+WC+';">'+wd(h)+"</div>"+p,n)}function JC(e,t,n,r){var i=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return fc(e=_c(e)?e:[e],(function(e,t){return xw(e,_c(h)?h[t]:h,u)}))};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),p=o?"":xw(l,"ordinal",u),h=t.valueType,f=a?[]:c(t.value),g=!s||!o,m=!s&&o,v=YC(r,i),y=v.nameStyle,x=v.valueStyle;return"richText"===i?(s?"":d)+(o?"":nT(e,p,y))+(a?"":function(e,t,n,r,i){var o=[i],a=r?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(_c(t)?t.join(" "):t,o)}(e,f,g,m,x)):tT((s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+wd(e)+"</span>"}(p,!s,y))+(a?"":function(e,t,n,r){var i=n?"10px":"20px",o=t?"float:right;margin-left:"+i:"";return e=_c(e)?e:[e],'<span style="'+o+";"+r+'">'+fc(e,(function(e){return wd(e)})).join("&nbsp;&nbsp;")+"</span>"}(f,g,m,x)),n)}}function eT(e,t,n,r,i,o){if(e)return XC(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function tT(e,t){return'<div style="'+("margin: "+t+"px 0 0")+";"+WC+';">'+e+'<div style="clear:both"></div></div>'}function nT(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function rT(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var iT=function(){function e(){this.richTextStyles={},this._nextStyleNameId=_g()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,i=function(e,t){var n=wc(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+wd(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+wd(r)+";"+(t||"")+'"></span>':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return wc(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};_c(t)?hc(t,(function(e){return lc(n,e)})):lc(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function oT(e){var t,n,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=o.getRawValue(a),p=_c(d),h=function(e,t){return Sw(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(o,a);if(c>1||p&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=gc(e,(function(e,t,n){var r=o.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(QC("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?hc(r,(function(e){c(fC(o,n,e),e)})):hc(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,h);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=fC(l,a,u[0]),n=g.type}else i=t=p?d[0]:d;var m=Lg(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return QC("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[QC("nameValue",{markerType:"item",markerColor:h,name:x,noName:!Bc(x),value:t,valueType:n})].concat(r||[])})}var aT=jg();function sT(e,t){return e.getName(t)||e.getId(t)}var lT=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return j(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=yC({count:cT,reset:dT}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(aT(this).sourceManager=new zC(this)).prepareSource();var r=this.getInitialData(e,n);hT(r,this),this.dataTask.context.data=r,aT(this).dataBeforeProcessed=r,uT(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=kw(this),r=n?Rw(e):{},i=this.subType;Pw.hasClass(i)&&(i+="Series"),sc(e,t.getTheme().get(this.subType)),sc(e,this.getDefaultOption()),Eg(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Ow(e,r,n)},t.prototype.mergeOption=function(e,t){e=sc(this.option,e,!0),this.fillDataTextStyle(e.data);var n=kw(this);n&&Ow(this.option,e,n);var r=aT(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);hT(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,aT(this).dataBeforeProcessed=i,uT(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Ec(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Eg(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=gT(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return aT(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=gT(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}aT(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Wc(e)},t.prototype.getSourceManager=function(){return aT(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return aT(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return oT({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Fu.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=sS.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<e.length;o++){var a=sT(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=vc(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[sT(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,o=i.selectedMode,a=t.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){Tc(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l];s[d=sT(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=sT(e,c);i.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(c),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each((function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)})),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Pw.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(Pw);function uT(e){var t=e.name;Lg(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return hc(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function cT(e){return e.model.getRawData().count()}function dT(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),pT}function pT(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function hT(e,t){hc(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,xc(fT,t))}))}function fT(e,t){var n=gT(e);return n&&n.setOutputEnd((t||this).count()),t}function gT(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}dc(lT,mC),dc(lT,sS),Xg(lT,Pw);var mT=lT,vT=function(){function e(){this.group=new eg,this.uid=kb("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Zg(vT),em(vT);var yT=vT;function xT(){var e=jg();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}var _T=jg(),bT=xT(),wT=function(){function e(){this.group=new eg,this.uid=kb("viewChart"),this.renderTask=yC({plan:TT,reset:MT}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&CT(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&CT(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){rb(this.group,e)},e.markUpdateMethod=function(e,t){_T(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function ST(e,t,n){e&&ex(e)&&("emphasis"===t?Py:By)(e,n)}function CT(e,t,n){var r=Bg(e,t),i=t&&null!=t.highlightKey?function(e){var t=uy[e];return null==t&&ly<=32&&(t=uy[e]=ly++),t}(t.highlightKey):null;null!=r?hc(Mg(r),(function(t){ST(e.getItemGraphicEl(t),n,i)})):e.eachItemGraphicEl((function(e){ST(e,n,i)}))}function TT(e){return bT(e.model)}function MT(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&_T(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),ET[l]}Zg(wT),em(wT);var ET={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},IT=wT,AT="\0__throttleOriginMethod",DT="\0__throttleRate",kT="\0__throttleType";function OT(e,t,n){var r,i,o,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(o,a||[])}t=t||0;var p=function(){for(var e=[],p=0;p<arguments.length;p++)e[p]=arguments[p];r=(new Date).getTime(),o=this,a=e;var h=s||t,f=s||n;s=null,i=r-(f?l:u)-h,clearTimeout(c),f?c=setTimeout(d,h):i>=0?d():c=setTimeout(d,-i),l=r};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(e){s=e},p}function RT(e,t,n,r){var i=e[t];if(i){var o=i[AT]||i,a=i[kT];if(i[DT]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=OT(o,n,"debounce"===r))[AT]=o,i[kT]=r,i[DT]=n}return i}}function NT(e,t){var n=e[t];n&&n[AT]&&(n.clear&&n.clear(),e[t]=n[AT])}var LT=jg(),PT={itemStyle:tm(Tb,!0),lineStyle:tm(wb,!0)},BT={lineStyle:"stroke",itemStyle:"fill"};function jT(e,t){var n=e.visualStyleMapper||PT[t];return n||(console.warn("Unknown style type '"+t+"'."),PT.itemStyle)}function FT(e,t){var n=e.visualDrawType||BT[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var UT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=jT(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=FT(e,r),l=o[s],u=bc(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=d,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||bc(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||bc(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=lc({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},zT=new Ab,HT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=jT(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){zT.option=n[r];var a=i(zT);lc(e.ensureUniqueItemVisual(t,"style"),a),zT.option.decal&&(e.setItemVisual(t,"decal",zT.option.decal),zT.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},VT={performRawSeries:!0,overallReset:function(e){var t=Wc();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),LT(e).scope=i}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=LT(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=FT(t,a);i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}}))}}))}},WT=Math.PI;var YT=function(){function e(e,t,n,r){this._stageTaskMap=Wc(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Wc();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;hc(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});Pc(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}hc(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,p=c.agentStubMap;p.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),o.updatePayload(c,n);var h=o.getPerformArgs(c,r.block);p.each((function(e){e.perform(h)})),c.perform(h)&&(i=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=Wc(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||yC({plan:XT,reset:$T,count:eM}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||yC({reset:GT});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=Wc(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function p(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,yC({reset:qT,onDirty:ZT})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}Pc(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):(c=!1,hc(n.getSeries(),p)),d&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return bc(e)&&(e={overallReset:e,seriesType:tM(e)}),e.uid=kb("stageHandler"),t&&(e.visualType=t),e},e}();function GT(e){e.overallReset(e.ecModel,e.api,e.payload)}function qT(e){return e.overallProgress&&QT}function QT(){this.agent.dirty(),this.getDownstream().dirty()}function ZT(){this.agent&&this.agent.dirty()}function XT(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function $T(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Mg(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?fc(t,(function(e,t){return JT(t)})):KT}var KT=JT(0);function JT(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function eM(e){return e.data.count()}function tM(e){nM=null;try{e(rM,iM)}catch(e){}return nM}var nM,rM={},iM={};function oM(e,t){for(var n in t.prototype)e[n]=Qc}oM(rM,hS),oM(iM,gS),rM.eachSeriesByType=rM.eachRawSeriesByType=function(e){nM=e},rM.eachComponent=function(e){"series"===e.mainType&&e.subType&&(nM=e.subType)};var aM=YT,sM=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],lM={color:sM,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],sM]},uM="#B9B8CE",cM="#100C2A",dM=function(){return{axisLine:{lineStyle:{color:uM}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},pM=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],hM={darkMode:!0,color:pM,backgroundColor:cM,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:uM}},textStyle:{color:uM},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:uM}},dataZoom:{borderColor:"#71708A",textStyle:{color:uM},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:uM}},timeline:{lineStyle:{color:uM},label:{color:uM},controlStyle:{color:uM,borderColor:uM}},calendar:{itemStyle:{color:cM},dayLabel:{color:uM},monthLabel:{color:uM},yearLabel:{color:uM}},timeAxis:dM(),logAxis:dM(),valueAxis:dM(),categoryAxis:dM(),line:{symbol:"circle"},graph:{color:pM},gauge:{title:{color:uM},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:uM},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};hM.categoryAxis.splitLine.show=!1;var fM=hM,gM=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(wc(e)){var i=Qg(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};hc(e,(function(e,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),mM=["symbol","symbolSize","symbolRotate","symbolOffset"],vM=mM.concat(["symbolKeepAspect"]),yM={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a<mM.length;a++){var s=mM[a],l=e.get(s);bc(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(lc({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=vc(i);return{dataEach:o?function(t,n){for(var r=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,i[s](r,o))}}:null}}}}},xM={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<vM.length;r++){var i=vM[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function _M(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function bM(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=Bg(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:_c(u)?l.getName(u[0]):l.getName(u),selected:wc(r)?r:lc({},r)})}}))}function wM(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var SM=Math.round(9*Math.random()),CM="function"==typeof Object.defineProperty,TM=function(){function e(){this._id="__ec_inner_"+SM++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return CM?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),MM=TM,EM=Av.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r+o),e.lineTo(n-i,r+o),e.closePath()}}),IM=Av.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r),e.lineTo(n,r+o),e.lineTo(n-i,r),e.closePath()}}),AM=Av.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=Math.max(i,t.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),p=Math.cos(u),h=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*h,l+s+p*h,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*h,l+s+p*h,n-c,l+s),e.closePath()}}),DM=Av.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,o=t.y,a=r/3*2;e.moveTo(i,o),e.lineTo(i+a,o+n),e.lineTo(i,o+n/4*3),e.lineTo(i-a,o+n),e.lineTo(i,o),e.closePath()}}),kM={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var o=Math.min(n,r);i.x=e,i.y=t,i.width=o,i.height=o},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},OM={};hc({line:n_,rect:Wv,roundRect:Wv,square:Wv,circle:Sx,diamond:IM,pin:AM,arrow:DM,triangle:EM},(function(e,t){OM[t]=new e}));var RM=Av.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=zf(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=OM[r];i||(i=OM[r="rect"]),kM[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function NM(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function LM(e,t,n,r,i,o,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?F_(e.slice(8),new Kd(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?j_(e.slice(7),{},new Kd(t,n,r,i),a?"center":"cover"):new RM({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=NM,o&&s.setColor(o),s}function PM(e,t){if(null!=e)return _c(e)||(e=[e,e]),[sg(e[0],t[0])||0,sg(Oc(e[1],e[0]),t[1])||0]}function BM(e){return isFinite(e)}function jM(e,t,n){for(var r="radial"===t.type?function(e,t,n){var r=n.width,i=n.height,o=Math.min(r,i),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*r+n.x,s=s*i+n.y,l*=o),a=BM(a)?a:.5,s=BM(s)?s:.5,l=l>=0&&BM(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,o=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=BM(r)?r:0,i=BM(i)?i:1,o=BM(o)?o:0,a=BM(a)?a:0,e.createLinearGradient(r,o,i,a)}(e,t,n),i=t.colorStops,o=0;o<i.length;o++)r.addColorStop(i[o].offset,i[o].color);return r}function FM(e){return parseInt(e,10)}function UM(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||FM(s[r])||FM(e.style[r]))-(FM(s[o])||0)-(FM(s[a])||0)|0}function zM(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:Cc(t)?[t]:_c(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=fc(i,(function(e){return e/a})),o/=a)}return[i,o]}var HM=new lv(!0);function VM(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function WM(e){return"string"==typeof e&&"none"!==e}function YM(e){var t=e.fill;return null!=t&&"none"!==t}function GM(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function qM(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function QM(e,t,n){var r=am(t.image,t.__image,n);if(lm(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*Zc),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var ZM=["shadowBlur","shadowOffsetX","shadowOffsetY"],XM=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function $M(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){eE(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?wm.opacity:a}(r||t.blend!==n.blend)&&(o||(eE(e,i),o=!0),e.globalCompositeOperation=t.blend||wm.blend);for(var s=0;s<ZM.length;s++){var l=ZM[s];(r||t[l]!==n[l])&&(o||(eE(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(eE(e,i),o=!0),e.shadowColor=t.shadowColor||wm.shadowColor),o}function KM(e,t,n,r,i){var o=tE(t,i.inHover),a=r?null:n&&tE(n,i.inHover)||{};if(o===a)return!1;var s=$M(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(eE(e,i),s=!0),WM(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(eE(e,i),s=!0),WM(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(eE(e,i),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(eE(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<XM.length;u++){var c=XM[u],d=c[0];(r||o[d]!==a[d])&&(s||(eE(e,i),s=!0),e[d]=o[d]||c[1])}return s}function JM(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function eE(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function tE(e,t){return t&&e.__hoverStyle||e.style}function nE(e,t){rE(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function rE(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var o=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,a)||(a&&a.length&&(eE(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(eE(e,n),e.save(),function(e,t,n){for(var r=!1,i=0;i<e.length;i++){var o=e[i];r=r||o.isZeroArea(),JM(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=r}(o,e,n),s=!0),n.prevElClipPaths=o),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c,d,p=t instanceof Av&&t.autoBatch&&function(e){var t=YM(e),n=VM(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);s||(c=i,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(eE(e,n),JM(e,t)):p||eE(e,n);var h=tE(t,n.inHover);t instanceof Av?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),KM(e,t,u,l,n),p&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o=VM(n),a=YM(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||HM,d=t.__dirty;if(!r){var p=n.fill,h=n.stroke,f=a&&!!p.colorStops,g=o&&!!h.colorStops,m=a&&!!p.image,v=o&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0;(f||g)&&(w=t.getBoundingRect()),f&&(y=d?jM(e,p,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?jM(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(_=d||!t.__canvasFillPattern?QM(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(b=d||!t.__canvasStrokePattern?QM(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:m&&(_?e.fillStyle=_:a=!1),g?e.strokeStyle=x:v&&(b?e.strokeStyle=b:o=!1)}var S,C,T=t.getGlobalScale();c.setScale(T[0],T[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(S=(i=zM(t))[0],C=i[1]);var M=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),M=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),M&&c.rebuildPath(e,l?s:1),S&&(e.setLineDash(S),e.lineDashOffset=C),r||(n.strokeFirst?(o&&qM(e,n),a&&GM(e,n)):(a&&GM(e,n),o&&qM(e,n))),S&&e.setLineDash([])}(e,t,h,p),p&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"")):t instanceof Ov?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),KM(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||zu,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=zM(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(VM(n)&&e.strokeText(i,n.x,n.y),YM(n)&&e.fillText(i,n.x,n.y)):(YM(n)&&e.fillText(i,n.x,n.y),VM(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,h)):t instanceof Pv?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){$M(e,tE(t,i.inHover),n&&tE(n,i.inHover),r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=am(n.image,t.__image,t,t.onload);if(r&&lm(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var d=a-(u=n.sx),p=s-(c=n.sy);e.drawImage(r,u,c,d,p,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,h)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=t.getCursor(),a=r.length;o<a;o++){(c=r[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),rE(e,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c;(c=i[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),rE(e,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),p&&r&&eE(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var iE=new MM,oE=new Kp(100),aE=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function sE(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&iE.delete(e);var o=iE.get(e);if(o)return o;var a=uc(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,o=[n],s=!0,l=0;l<aE.length;++l){var u=a[aE[l]];if(null!=u&&!_c(u)&&!wc(u)&&!Cc(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(i?"-svg":"");var c=oE.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,p=uE(a.dashArrayX),h=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(Cc(e)){var t=Math.ceil(e);return[t,t]}var n=fc(e,(function(e){return Math.ceil(e)}));return e.length%2?n.concat(n):n}(a.dashArrayY),f=lE(a.symbol),g=(_=p,fc(_,(function(e){return cE(e)}))),m=cE(h),v=!i&&Yu.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=wg(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=wg(r,f[t].length);e*=r;var i=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var _;v&&(v.width=x.width*n,v.height=x.height*n,d=v.getContext("2d"));(function(){d&&(d.clearRect(0,0,v.width,v.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<h.length;++t)e+=h[t];if(e<=0)return;var o=-m,s=0,l=0,u=0;for(;o<x.height;){if(s%2==0){for(var c=l/2%f.length,g=0,_=0,b=0;g<2*x.width;){var w=0;for(t=0;t<p[u].length;++t)w+=p[u][t];if(w<=0)break;if(_%2==0){var S=.5*(1-a.symbolSize),C=g+p[u][_]*S,T=o+h[s]*S,M=p[u][_]*a.symbolSize,E=h[s]*a.symbolSize,I=b/2%f[c].length;A(C,T,M,E,f[c][I])}g+=p[u][_],++b,++_===p[u].length&&(_=0)}++u===p.length&&(u=0)}o+=h[s],++l,++s===h.length&&(s=0)}function A(e,t,o,s,l){var u=i?1:n,c=LM(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(i){var p=r.painter.renderOneToVNode(c);p&&y.children.push(p)}else nE(d,c)}})(),s&&oE.put(t,v||y);e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=i?1:1/n,iE.set(e,s),e.dirty=!1,s}function lE(e){if(!e||0===e.length)return[["rect"]];if(wc(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!wc(e[n])){t=!1;break}if(t)return lE([e]);var r=[];for(n=0;n<e.length;++n)wc(e[n])?r.push([e[n]]):r.push(e[n]);return r}function uE(e){if(!e||0===e.length)return[[0,0]];if(Cc(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!Cc(e[n])){t=!1;break}if(t)return uE([e]);var r=[];for(n=0;n<e.length;++n)if(Cc(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=fc(e[n],(function(e){return Math.ceil(e)}))).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function cE(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var dE=new pd,pE={};var hE=2e3,fE=4500,gE={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:hE,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:fE,ARIA:6e3,DECAL:7e3}},mE="__flagInMainProcess",vE="__pendingUpdate",yE="__needsUpdateStatus",xE=/^[a-zA-Z0-9_]+$/,_E="__connectUpdateStatus";function bE(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return SE(this,e,t);this.id}}function wE(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return SE(this,e,t)}}function SE(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),pd.prototype[t].apply(e,n)}var CE,TE,ME,EE,IE,AE,DE,kE,OE,RE,NE,LE,PE,BE,jE,FE,UE,zE,HE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t}(pd),VE=HE.prototype;VE.on=wE("on"),VE.off=wE("off");var WE=function(e){function t(t,n,r){var i=e.call(this,new gM)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},wc(n)&&(n=KE[n]),i._dom=t;var o=i._zr=ig(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:Oc(r.useDirtyRect,!1),useCoarsePointer:Oc(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=OT(yc(o.flush,o),17),(n=ac(n))&&zS(n,!0),i._theme=n,i._locale=function(e){if(wc(e)){var t=Pb[e.toUpperCase()]||{};return e===Rb||e===Nb?ac(t):sc(ac(t),ac(Pb[Lb]),!1)}return sc(ac(e),ac(Pb[Lb]),!1)}(r.locale||jb),i._coordSysMgr=new vS;var a=i._api=jE(i);function s(e,t){return e.__prio-t.__prio}return gp($E,s),gp(ZE,s),i._scheduler=new aM(i,a,ZE,$E),i._messageCenter=new HE,i._initEvents(),i.resize=yc(i.resize,i),o.animation.on("frame",i._onframe,i),RE(o,i),NE(o,i),Fc(i),i}return j(t,e),t.prototype._onframe=function(){if(!this._disposed){zE(this);var e=this._scheduler;if(this[vE]){var t=this[vE].silent;this[mE]=!0;try{CE(this),EE.update.call(this,null,this[vE].updateParams)}catch(e){throw this[mE]=!1,this[vE]=null,e}this._zr.flush(),this[mE]=!1,this[vE]=null,kE.call(this,t),OE.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),AE(this,r),e.performVisualTasks(r),BE(this,this._model,i,"remain",{}),n-=+new Date-o}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[mE])if(this._disposed)this.id;else{var r,i,o;if(Tc(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[mE]=!0,!this._model||t){var a=new bS(this._api),s=this._theme,l=this._model=new hS;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},XE);var u={seriesTransition:o,optionChanged:!0};if(n)this[vE]={silent:r,updateParams:u},this[mE]=!1,this.getZr().wakeUp();else{try{CE(this),EE.update.call(this,null,u)}catch(e){throw this[vE]=null,this[mE]=!1,e}this._ssr||this._zr.flush(),this[vE]=null,this[mE]=!1,kE.call(this,r),OE.call(this,r)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Fu.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Fu.svgSupported){var e=this._zr;return hc(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;hc(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return hc(r,(function(e){e.group.ignore=!1})),o}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if(tI[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();hc(eI,(function(o,d){if(o.group===n){var p=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(ac(e)),h=o.getDom().getBoundingClientRect();a=r(h.left,a),s=r(h.top,s),l=i(h.right,l),u=i(h.bottom,u),c.push({dom:p,left:h.left,top:h.top})}}));var p=(l*=d)-(a*=d),h=(u*=d)-(s*=d),f=Yu.createCanvas(),g=ig(f,{renderer:t?"svg":"canvas"});if(g.resize({width:p,height:h}),t){var m="";return hc(c,(function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Wv({shape:{x:0,y:0,width:p,height:h},style:{fill:e.connectedBackgroundColor}})),hc(c,(function(e){var t=new Pv({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,t){return IE(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return IE(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return hc(Ug(this._model,e),(function(e,r){r.indexOf("Models")>=0&&hc(e,(function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}}),this)}),this),!!n;this.id},t.prototype.getVisual=function(e,t){var n=Ug(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?_M(r,i,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;hc(GE,(function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&wM(o,(function(e){var t=sy(e);if(t&&null!=t.dataIndex){var r=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return n=lc({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),hc(QE,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),hc(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(bM("map","selectchanged",t,r,e),bM("pie","selectchanged",t,r,e)):"select"===e.fromAction?(bM("map","selected",t,r,e),bM("pie","selected",t,r,e)):"unselect"===e.fromAction&&(bM("map","unselected",t,r,e),bM("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Yg(this.getDom(),iI,"");var e=this,t=e._api,n=e._model;hc(e._componentsViews,(function(e){e.dispose(n,t)})),hc(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete eI[e.id]}},t.prototype.resize=function(e){if(!this[mE])if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[vE]&&(null==r&&(r=this[vE].silent),n=!0,this[vE]=null),this[mE]=!0;try{n&&CE(this),EE.update.call(this,{type:"resize",animation:lc({duration:0},e&&e.animation)})}catch(e){throw this[mE]=!1,e}this[mE]=!1,kE.call(this,r),OE.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(Tc(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),JE[e]){var n=JE[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=lc({},e);return t.type=QE[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(Tc(t)||(t={silent:!!t}),qE[e.type]&&this._model)if(this[mE])this._pendingActions.push(e);else{var n=t.silent;DE.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Fu.browser.weChat&&this._throttledZrFlush(),kE.call(this,n),OE.call(this,n)}},t.prototype.updateLabelLayout=function(){dE.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,i=e.get("zlevel")||0;t.eachRendered((function(e){return r(e,n,i,-1/0),!0}))}}function r(e,t,n,i){var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)i=Math.max(r(s[l],t,n,i),i);else e.z=t,e.zlevel=n,i=Math.max(e.z2,i);if(o&&(o.z=t,o.zlevel=n,isFinite(i)&&(o.z2=i+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function i(e,t){t.eachRendered((function(e){if(!I_(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}}))}function o(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(I_(e))return;if(e instanceof Av&&function(e){var t=cy(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(i){e.stateTransition=a;var r=e.getTextContent(),o=e.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}CE=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),TE(e,!0),TE(e,!1),t.plan()},TE=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&o[u];if(!c){var d=Qg(e.type);(c=new(t?yT.getClass(d.main,d.sub):IT.getClass(d.sub))).init(n,s),o[u]=c,i.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(c,e,n,s)}t?n.eachComponent((function(e,t){"series"!==e&&u(t)})):n.eachSeries(u);for(l=0;l<i.length;){var c=i[l];c.__alive?l++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},ME=function(e,t,n,r,i){var o=e._model;if(o.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};i&&(s.subType=i);var l,u=n.excludeSeriesId;null!=u&&(l=Wc(),hc(Mg(u),(function(e){var t=Ng(e,null);null!=t&&l.set(t,!0)}))),o&&o.eachComponent(s,(function(t){if(!(l&&null!=l.get(t.id)))if(nx(n))if(t instanceof mT)n.type!==fy||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=Bg(i,t);o=(_c(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=sy(a);Vy(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&Vy(r,c,d,n)}}}(t,n,e._api);else{var r=Yy(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,o=r.dispatchers;n.type===fy&&i&&!n.notBlur&&Wy(t.mainType,t.componentIndex,e._api),o&&hc(o,(function(e){n.type===fy?Py(e):By(e)}))}else tx(n)&&t instanceof mT&&(!function(e,t){if(tx(t)){var n=t.dataType,r=Bg(e.getData(n),t);_c(r)||(r=[r]),e[t.type===yy?"toggleSelect":t.type===my?"select":"unselect"](r,n)}}(t,n,e._api),Gy(t),UE(e))}),e),o&&o.eachComponent(s,(function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else hc([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,n)}},EE={prepareAndUpdate:function(e){CE(this),EE.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,t),AE(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),LE(this,r,i,t,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),dE.trigger("afterupdate",r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var o=[];r.eachComponent((function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,i,t);l&&l.update&&o.push(s)}else o.push(s)}}));var a=Wc();r.eachSeries((function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,r,i,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)})),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),BE(this,r,i,t,{},a),dE.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),IT.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),LE(this,n,this._api,t,{}),dE.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries((function(e){e.getData().clearAllVisual()})),IT.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent((function(e,i){if("series"!==e){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,t)}})),r.eachSeries((function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)})),dE.trigger("afterupdate",r,this._api))},updateLayout:function(e){EE.update.call(this,e)}},IE=function(e,t,n,r){if(e._disposed)e.id;else for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=Ug(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},AE=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},DE=function(e,t){var n=this,r=this.getModel(),i=e.type,o=e.escapeConnect,a=qE[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&Qg(l[0]);this[mE]=!0;var d=[e],p=!1;e.batch&&(p=!0,d=fc(e.batch,(function(t){return(t=uc(lc({},t),e)).batch=null,t})));var h,f=[],g=tx(e),m=nx(e);if(m&&Hy(this._api),hc(d,(function(t){if((h=(h=a.action(t,n._model,n._api))||lc({},t)).type=s.event||h.type,f.push(h),m){var r=zg(e),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";ME(n,u,t,o),UE(n)}else g?(ME(n,u,t,"series"),UE(n)):c&&ME(n,u,t,c.main,c.sub)})),"none"!==u&&!m&&!g&&!c)try{this[vE]?(CE(this),EE.update.call(this,e),this[vE]=null):EE[u].call(this,e)}catch(e){throw this[mE]=!1,e}if(h=p?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[mE]=!1,!t){var v=this._messageCenter;if(v.trigger(h.type,h),g){var y={type:"selectchanged",escapeConnect:o,selected:qy(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},kE=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();DE.call(this,n,e)}},OE=function(e){!e&&this.trigger("updated")},RE=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[vE]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},NE=function(e,t){e.on("mouseover",(function(e){var n=wM(e.target,ex);n&&(!function(e,t,n){var r=sy(e),i=Yy(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&Wy(r.componentMainType,r.componentIndex,n),hc(o,(function(e){return Ny(e,t)}))):(Vy(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&Wy(r.componentMainType,r.componentIndex,n),Ny(e,t))}(n,e,t._api),UE(t))})).on("mouseout",(function(e){var n=wM(e.target,ex);n&&(!function(e,t,n){Hy(n);var r=sy(e),i=Yy(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?hc(i,(function(e){return Ly(e,t)})):Ly(e,t)}(n,e,t._api),UE(t))})).on("click",(function(e){var n=wM(e.target,(function(e){return null!=sy(e).dataIndex}),!0);if(n){var r=n.selected?"unselect":"select",i=sy(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}}))},LE=function(e,t,n,r,i){!function(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})})),r){var i,o,a=t.concat(n);gp(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),hc(a,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)}))}}(t),PE(e,t,n,r,i),hc(e._chartsViews,(function(e){e.__alive=!1})),BE(e,t,n,r,i),hc(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},PE=function(e,t,r,a,s,l){hc(l||e._componentsViews,(function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)}))},BE=function(e,t,r,a,s,l){var u=e._scheduler;s=lc(s||{},{updatedSeries:t.getSeries()}),dE.trigger("series:beforeupdate",t,r,s);var c=!1;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;u.updatePayload(r,a),i(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}(t,n),Gy(t)})),u.unfinished=c||u.unfinished,dE.trigger("series:layoutlabels",t,r,s),dE.trigger("series:transition",t,r,s),t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];n(t,r),o(t,r)})),function(e,t){var n=e._zr,r=n.storage,i=0;r.traverse((function(e){e.isGroup||i++})),i>t.get("hoverLayerThreshold")&&!Fu.node&&!Fu.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),dE.trigger("series:afterupdate",t,r,s)},UE=function(e){e[yE]=!0,e.getZr().wakeUp()},zE=function(e){e[yE]&&(e.getZr().storage.traverse((function(e){I_(e)||t(e)})),e[yE]=!1)},jE=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return j(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Py(t,n),UE(e)},n.prototype.leaveEmphasis=function(t,n){By(t,n),UE(e)},n.prototype.enterBlur=function(t){!function(e){Dy(e,Ty)}(t),UE(e)},n.prototype.leaveBlur=function(t){jy(t),UE(e)},n.prototype.enterSelect=function(t){Fy(t),UE(e)},n.prototype.leaveSelect=function(t){Uy(t),UE(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(gS))(e)},FE=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][_E]=t}}hc(QE,(function(n,r){e._messageCenter.on(r,(function(n){if(tI[e.group]&&0!==e[_E]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];hc(eI,(function(t){t!==e&&t.group===e.group&&i.push(t)})),t(i,0),hc(i,(function(e){1!==e[_E]&&e.dispatchAction(r)})),t(i,2)}}))}))}}(),t}(pd),YE=WE.prototype;YE.on=bE("on"),YE.off=bE("off"),YE.one=function(e,t,n){var r=this;this.on.call(this,e,(function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)}),n)};var GE=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var qE={},QE={},ZE=[],XE=[],$E=[],KE={},JE={},eI={},tI={},nI=+new Date-0,rI=+new Date-0,iI="_echarts_instance_";function oI(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return eI[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,iI)]}(e);if(i)return i}var o=new WE(e,t,n);return o.id="ec_"+nI++,eI[o.id]=o,r&&Yg(e,iI,o.id),FE(o),dE.trigger("afterinit",o),o}function aI(e){if(_c(e)){var t=e;e=null,hc(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+rI++,hc(t,(function(t){t.group=e}))}return tI[e]=!0,e}function sI(e){tI[e]=!1}function lI(e,t){KE[e]=t}function uI(e){cc(XE,e)<0&&XE.push(e)}function cI(e,t){gI(ZE,e,t,2e3)}function dI(e,t){dE.on(e,t)}function pI(e,t,n){bc(t)&&(n=t,t="");var r=Tc(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,QE[t]||(Pc(xE.test(r)&&xE.test(t)),qE[r]||(qE[r]={action:n,actionInfo:e}),QE[t]=r)}function hI(e,t){gI($E,e,t,3e3,"visual")}var fI=[];function gI(e,t,n,r,i){if((bc(t)||Tc(t))&&(n=t,t=r),!(cc(fI,n)>=0)){fI.push(n);var o=aM.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function mI(e,t){JE[e]=t}var vI=function(e){var t=(e=ac(e)).type;t||Sg("");var n=t.split(":");2!==n.length&&Sg("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,IC.set(t,e)};function yI(e){return null==e?0:e.length||1}function xI(e){return e}hI(hE,UT),hI(fE,HT),hI(fE,VT),hI(hE,yM),hI(fE,xM),hI(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=sE(n,t))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=sE(i,t)}}))})),uI(zS),cI(900,(function(e){var t=Wc();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),t.each(HS)})),mI("default",(function(e,t){uc(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new eg,r=new Wv({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new ay({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Wv({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new c_({shape:{startAngle:-WT/2,endAngle:-WT/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*WT/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*WT/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),pI({type:fy,event:fy,update:fy},Qc),pI({type:gy,event:gy,update:gy},Qc),pI({type:my,event:my,update:my},Qc),pI({type:vy,event:vy,update:vy},Qc),pI({type:yy,event:yy,update:yy},Qc),lI("light",lM),lI("dark",fM);var _I=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||xI,this._newKeyGetter=r||xI,this.context=i,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=r[o],s=n[a],l=yI(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=yI(l),d=yI(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var p=0;p<c;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(o,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=yI(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[r](e[o],o);if(i||(n[o]=a),t){var s=t[a],l=yI(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),bI=_I,wI=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function SI(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var CI=function(e){this.otherDims={},null!=e&&lc(this,e)},TI=jg(),MI={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},EI=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=DI(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Oc(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=nC(this.source),n=!kI(e),r="",i=[],o=0,a=0;o<e;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(o);d&&(s=t?d.name:null,l=d.type)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=MI[l]||"f",u&&(r+=u.uid),r+="$"}var p=this.source;return{dimensions:i,hash:[p.seriesLayoutBy,p.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function II(e){return e instanceof EI}function AI(e){for(var t=Wc(),n=0;n<(e||[]).length;n++){var r=e[n],i=Tc(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function DI(e){var t=TI(e);return t.dimNameMap||(t.dimNameMap=AI(e.dimensionsDefine))}function kI(e){return e>30}var OI,RI,NI,LI,PI,BI,jI,FI=Tc,UI=fc,zI="undefined"==typeof Int32Array?Array:Int32Array,HI=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],VI=["_approximateExtent"],WI=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;II(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=wc(c)?new CI({name:c}):c instanceof CI?c:new CI(c),p=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=p,d.coordDimIndex=0);var h=d.otherDims=d.otherDims||{};o.push(p),i[p]=d,null!=l[p]&&(s=!0),d.createInvertedIndices&&(a[p]=[]),0===h.itemName&&(this._nameDimIdx=u),0===h.itemId&&(this._idDimIdx=u),r&&(d.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=Wc();hc(o,(function(e){f.set(i[e].storeDimIndex,e)}))}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(Cc(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,i=this;if(e instanceof UC&&(r=e),!r){var o=this.dimensions,a=ZS(e)||pc(e)?new rC(e,o.length):e;r=new UC;var s=UI(o,(function(e){return{type:i._dimInfos[e].type,property:e}}));r.initData(a,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n={},r=n.encode={},i=Wc(),o=[],a=[],s={};hc(e.dimensions,(function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;SI(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),SI(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}Uw.each((function(e,t){var n=SI(r,t),i=l.otherDims[t];null!=i&&!1!==i&&(n[i]=l.name)}))}));var l=[],u={};i.each((function(e,t){var n=r[t];u[t]=n[0],l=l.concat(n)})),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=fc(l,(function(t){return e.getDimensionInfo(t).storeDimIndex})),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(o=c.slice());var d=r.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,n.userOutput=new wI(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=t[s],o&&jI(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==Yw&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===zw&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&Dg(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=Ng(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=Ng(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)jI(this,a);OI(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){FI(e)?lc(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=NI(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return RI(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return _c(e)?r.getValues(UI(e,(function(e){return n._getStoreDimIndex(e)})),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){bc(e)&&(n=t,t=e,e=[]);var r=n||this,i=UI(LI(e),this._getStoreDimIndex,this);this._store.each(i,r?yc(t,r):t)},e.prototype.filterSelf=function(e,t,n){bc(e)&&(n=t,t=e,e=[]);var r=n||this,i=UI(LI(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?yc(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={};return hc(vc(e),(function(r){var i=t._getStoreDimIndex(r);n[i]=e[r]})),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){bc(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,o=UI(LI(e),this._getStoreDimIndex,this),a=BI(this);return a._store=this._store.map(o,i?yc(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=UI(LI(e),this._getStoreDimIndex,this);this._store.modify(o,i?yc(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=BI(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=BI(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new Ab(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new bI(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return RI(e,t)}),(function(e){return RI(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},FI(e)?lc(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(_c(i=this.getVisual(t))?i=i.slice():FI(i)&&(i=lc({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,FI(t)?lc(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){FI(e)?lc(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?lc(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){!function(e,t,n,r){if(r){var i=sy(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,"group"===r.type&&r.traverse((function(r){var i=sy(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){hc(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:UI(this.dimensions,this._getDimInfo,this),this.hostModel)),PI(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];bc(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Nc(arguments)))})},e.internalField=(OI=function(e){var t=e._invertedIndicesMap;hc(t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new zI(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}}))},NI=function(e,t,n){return Ng(e._getCategory(t,n),null)},RI=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=NI(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},LI=function(e){return _c(e)||(e=null!=e?[e]:[]),e},BI=function(t){var n=new e(t._schema?t._schema:UI(t.dimensions,t._getDimInfo,t),t.hostModel);return PI(n,t),n},PI=function(e,t){hc(HI.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,hc(VI,(function(n){e[n]=ac(t[n])})),e._calculationInfo=lc({},t._calculationInfo)},void(jI=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=NI(e,i,t)),null==s&&null!=o&&(r[t]=s=NI(e,o,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[t]=s}})),e}(),YI=WI;function GI(e,t){ZS(e)||(e=$S(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Wc(),o=[],a=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return hc(t,(function(e){var t;Tc(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&kI(a),l=r===e.dimensionsDefine,u=l?DI(e):AI(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Wc(c),p=new LC(a),h=0;h<p.length;h++)p[h]=-1;function f(e){var t=p[e];if(t<0){var n=r[e],i=Tc(n)?n:{name:n},a=new CI,s=i.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var l=o.length;return p[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(h=0;h<a;h++)f(h);d.each((function(e,t){var n=Mg(e).slice();if(1===n.length&&!wc(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);hc(n,(function(e,n){var i=wc(e)?u.get(e):e;null!=i&&i<a&&(r[n]=i,m(f(i),t,n))}))}}));var g=0;function m(e,t,n){null!=Uw.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}hc(n,(function(e){var t,n,r,i;if(wc(e))t=e,i={};else{t=(i=e).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=lc({},i)).ordinalMeta=o,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=Mg(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}hc(s,(function(e,o){var a=f(e);if(l&&null!=i.type&&(a.type=i.type),m(uc(a,i),t,o),null==a.name&&n){var s=n[o];!Tc(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&uc(a.otherDims,r)}))}}));var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var _=v||"value";function b(e){null==e.name&&(e.name=e.coordDim)}if(s)hc(o,(function(e){b(e)})),o.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var w=0;w<a;w++){var S=f(w);null==S.coordDim&&(S.coordDim=qI(_,i,x),S.coordDimIndex=0,(!v||y<=0)&&(S.isExtraCoord=!0),y--),b(S),null!=S.type||tS(e,w)!==Zw&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(e){for(var t=Wc(),n=0;n<e.length;n++){var r=e[n],i=r.name,o=t.get(i)||0;o>0&&(r.name=i+(o-1)),o++,t.set(i,o)}}(o),new EI({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function qI(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var QI=function(e){this.coordSysDims=[],this.axisMap=Wc(),this.categoryAxisMap=Wc(),this.coordSysName=e};var ZI={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",Hg).models[0],o=e.getReferringComponents("yAxis",Hg).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),XI(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),XI(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",Hg).models[0];t.coordSysDims=["single"],n.set("single",i),XI(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",Hg).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),XI(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),XI(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();hc(o.parallelAxisIndex,(function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),XI(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function XI(e){return"category"===e.get("type")}function $I(e,t,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!II(e.schema)}(t)?(i=t.schema,r=i.dimensions,o=t.store):r=t;var l,u,c,d,p=!(!e||!e.get("stack"));if(hc(r,(function(e,t){wc(e)&&(r[t]=e={name:e}),p&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,f=u.type,g=0;hc(r,(function(e){e.coordDim===h&&g++}));var m={name:c,coordDim:h,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(d,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),i.appendCalculationDimension(m),i.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function KI(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function JI(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=$S(e)):o=(r=i.getSource()).sourceFormat===zw;var a=function(e){var t=e.get("coordinateSystem"),n=new QI(t),r=ZI[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=vS.get(r);return t&&t.coordSysDims&&(n=fc(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=bc(l)?l:l?xc(Jw,s,t):null,c=GI(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var r,i;return n&&hc(e,(function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)})),i||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),p=o?null:i.getSharedDataStore(c),h=$I(t,{schema:c,store:p}),f=new YI(c,t);f.setCalculationInfo(h);var g=null!=d&&function(e){if(e.sourceFormat===zw){return!_c(Ag(function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(o?r:p,null,g),f}var eA=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();em(eA);var tA=eA,nA=0,rA=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++nA}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&fc(r,iA);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!wc(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Wc(this.categories))},e}();function iA(e){return Tc(e)&&null!=e.value?e.value:e+""}var oA=rA;function aA(e){return"interval"===e.type||"log"===e.type}function sA(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=yg(o/t,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=uA(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),cA(e,0,t),cA(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[lg(Math.ceil(e[0]/a)*a,s),lg(Math.floor(e[1]/a)*a,s)],e),i}function lA(e){var t=Math.pow(10,vg(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,lg(n*t)}function uA(e){return cg(e)+2}function cA(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function dA(e,t){return e>=t[0]&&e<=t[1]}function pA(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function hA(e,t){return e*(t[1]-t[0])+t[0]}var fA=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new oA({})),_c(r)&&(r=new oA({categories:fc(r,(function(e){return Tc(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return j(t,e),t.prototype.parse=function(e){return null==e?NaN:wc(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return dA(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return pA(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(hA(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(tA);tA.registerClass(fA);var gA=fA,mA=lg,vA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return j(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return dA(e,this._extent)},t.prototype.normalize=function(e){return pA(e,this._extent)},t.prototype.scale=function(e){return hA(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=uA(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]<r[0]&&(e?o.push({value:mA(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=mA(a+t,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:mA(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=mA(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=cg(e.value)||0:"auto"===n&&(n=this._intervalPrecision),mw(mA(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var o=sA(r,e,t,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=mA(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=mA(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(tA);tA.registerClass(vA);var yA=vA,xA="undefined"!=typeof Float32Array,_A=xA?Float32Array:Array;function bA(e){return _c(e)?xA?new Float32Array(e):e:new _A(e)}function wA(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function SA(e){return e.dim+e.index}function CA(e,t){var n=[];return t.eachSeriesByType(e,(function(e){EA(e)&&n.push(e)})),n}function TA(e){var t=function(e){var t={};hc(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[i]?t[i].push(u):t[i]=[u]}}));var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort((function(e,t){return e-t}));for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return hc(e,(function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,s=t[a],l=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(o[1]-o[0])/d.count()}var p=sg(e.get("barWidth"),r),h=sg(e.get("barMaxWidth"),r),f=sg(e.get("barMinWidth")||(IA(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:h,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:SA(i),stackId:wA(e)})})),function(e){var t={};hc(e,(function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var p=e.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return hc(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=vc(r).length;o=Math.max(35-4*a,15)+"%"}var s=sg(o,i),l=sg(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),hc(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var p,h=0;hc(r,(function(e,t){e.width||(e.width=d),p=e,h+=e.width*(1+l)})),p&&(h-=p.width*l);var f=-h/2;hc(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}(n)}function MA(e,t){var n=CA(e,t),r=TA(n);hc(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=wA(e),o=r[SA(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function EA(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function IA(e){return e.pipelineContext&&e.pipelineContext.large}var AA=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return j(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return Jb(e.value,qb[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}($b(this._minLevelUnit))]||qb.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,i){var o=null;if(wc(n))o=n;else if(bc(n))o=n(e.value,t,{level:e.level});else{var a=lc({},Yb);if(e.level>0)for(var s=0;s<Qb.length;++s)a[Qb[s]]="{primary|"+a[Qb[s]]+"}";var l=n?!1===n.inherit?n:uc(n,a):a,u=ew(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=Zb.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(_c(o)){var c=null==e.level?0:e.level>=0?e.level:o.length+e.level;o=o[c=Math.min(c,o.length-1)]}}return Jb(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),i=function(e,t,n,r){var i=1e4,o=Zb,a=0;function s(e,t,n,i,o,a,s){for(var l=new Date(t),u=t,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=e,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(e,i,o){var a=[],l=!i.length;if(!function(e,t,n,r){var i=mg(t),o=mg(n),a=function(e){return tw(i,e,r)===tw(o,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},p=function(){return d()&&a("second")},h=function(){return p()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return p();case"millisecond":return h()}}($b(e),r[0],r[1],n)){l&&(i=[{value:PA(new Date(r[0]),e,n)},{value:r[1]}]);for(var u=0;u<i.length-1;u++){var c=i[u].value,d=i[u+1].value;if(c!==d){var p=void 0,h=void 0,f=void 0,g=!1;switch(e){case"year":p=Math.max(1,Math.round(t/Vb/365)),h=nw(n),f=uw(n);break;case"half-year":case"quarter":case"month":p=OA(t),h=rw(n),f=cw(n);break;case"week":case"half-week":case"day":p=kA(t),h=iw(n),f=dw(n),g=!0;break;case"half-day":case"quarter-day":case"hour":p=RA(t),h=ow(n),f=pw(n);break;case"minute":p=NA(t,!0),h=aw(n),f=hw(n);break;case"second":p=NA(t,!1),h=sw(n),f=fw(n);break;case"millisecond":p=LA(t),h=lw(n),f=gw(n)}s(p,c,d,h,f,g,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,p=0,h=0;h<o.length&&a++<i;++h){var f=$b(o[h]);if(Kb(o[h]))if(l(o[h],u[u.length-1]||[],c),f!==(o[h+1]?$b(o[h+1]):null)){if(c.length){p=d,c.sort((function(e,t){return e.value-t.value}));for(var g=[],m=0;m<c.length;++m){var v=c[m].value;0!==m&&c[m-1].value===v||(g.push(c[m]),v>=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&p>y/1.5)break;if(u.push(g),d>y||e===o[h])break}c=[]}}var x=mc(fc(u,(function(e){return mc(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),_=[],b=x.length-1;for(h=0;h<x.length;++h)for(var w=x[h],S=0;S<w.length;++S)_.push({value:w[S].value,level:b-h});_.sort((function(e,t){return e.value-t.value}));var C=[];for(h=0;h<_.length;++h)0!==h&&_[h].value===_[h-1].value||C.push(_[h]);return C}(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(i)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=Vb,t[1]+=Vb),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-Vb}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,i=r[1]-r[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=DA.length,a=Math.min(function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n}(DA,this._approxInterval,0,o),o-1);this._interval=DA[a][1],this._minLevelUnit=DA[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Cc(e)?e:+mg(e)},t.prototype.contain=function(e){return dA(this.parse(e),this._extent)},t.prototype.normalize=function(e){return pA(this.parse(e),this._extent)},t.prototype.scale=function(e){return hA(e,this._extent)},t.type="time",t}(yA),DA=[["second",Ub],["minute",zb],["hour",Hb],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",Wb/2],["year",Wb]];function kA(e,t){return(e/=Vb)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function OA(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function RA(e){return(e/=Hb)>12?12:e>6?6:e>3.5?4:e>2?2:1}function NA(e,t){return(e/=t?zb:Ub)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function LA(e){return yg(e,!0)}function PA(e,t,n){var r=new Date(e);switch($b(t)){case"year":case"month":r[cw(n)](0);case"day":r[dw(n)](1);case"hour":r[pw(n)](0);case"minute":r[hw(n)](0);case"second":r[fw(n)](0),r[gw(n)](0)}return r.getTime()}tA.registerClass(AA);var BA=AA,jA=tA.prototype,FA=yA.prototype,UA=lg,zA=Math.floor,HA=Math.ceil,VA=Math.pow,WA=Math.log,YA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new yA,t._interval=0,t}return j(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return fc(FA.getTicks.call(this,e),(function(e){var t=e.value,i=lg(VA(this.base,t));return i=t===n[0]&&this._fixMin?qA(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?qA(i,r[1]):i}}),this)},t.prototype.setExtent=function(e,t){var n=WA(this.base);e=WA(Math.max(0,e))/n,t=WA(Math.max(0,t))/n,FA.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=jA.getExtent.call(this);t[0]=VA(e,t[0]),t[1]=VA(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=qA(t[0],n[0])),this._fixMax&&(t[1]=qA(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=WA(e[0])/WA(t),e[1]=WA(e[1])/WA(t),jA.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,vg(r)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[lg(HA(t[0]/i)*i),lg(zA(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){FA.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return dA(e=WA(e)/WA(this.base),this._extent)},t.prototype.normalize=function(e){return pA(e=WA(e)/WA(this.base),this._extent)},t.prototype.scale=function(e){return e=hA(e,this._extent),VA(this.base,e)},t.type="log",t}(tA),GA=YA.prototype;function qA(e,t){return UA(e,cg(t))}GA.getMinorTicks=FA.getMinorTicks,GA.getLabel=FA.getLabel,tA.registerClass(YA);var QA=YA,ZA=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);bc(i)?this._modelMinNum=JA(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=JA(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(bc(o)?this._modelMaxNum=JA(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=JA(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=_c(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Uf(s[0],1),Uf(s[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=e?r?0:NaN:t-i[0]*o),null==s&&(s=e?r?r-1:NaN:n+i[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=Dc(a)||Dc(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(a=d,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[$A[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[XA[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),XA={min:"_determinedMin",max:"_determinedMax"},$A={min:"_dataMin",max:"_dataMax"};function KA(e,t,n){var r=e.rawExtentInfo;return r||(r=new ZA(e,t,n),e.rawExtentInfo=r,r)}function JA(e,t){return null==t?null:Dc(t)?NaN:e.parse(t)}function eD(e,t){var n=e.type,r=KA(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=CA("bar",a),l=!1;if(hc(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=TA(s),c=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=function(e,t,n){if(e&&t){var r=e[SA(t)];return null!=r&&null!=n?r[wA(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;hc(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;hc(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/o)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(i,o,t,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function tD(e,t){var n=t,r=eD(e,n),i=r.extent,o=n.get("splitNumber");e instanceof QA&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function nD(e){var t,n,r=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):wc(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):bc(r)?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(rD(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function rD(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function iD(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new Kd(e.x,e.y,o,a)}function oD(e){var t=e.get("interval");return null==t?"auto":t}function aD(e){return"category"===e.type&&0===oD(e.getLabelModel())}function sD(e,t){var n={};return hc(e.mapDimensionsAll(t),(function(t){n[function(e,t){return KI(e,t)?e.getCalculationInfo("stackResultDimension"):t}(e,t)]=!0})),vc(n)}var lD=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),uD=[],cD={registerPreprocessor:uI,registerProcessor:cI,registerPostInit:function(e){dI("afterinit",e)},registerPostUpdate:function(e){dI("afterupdate",e)},registerUpdateLifecycle:dI,registerAction:pI,registerCoordinateSystem:function(e,t){vS.register(e,t)},registerLayout:function(e,t){gI($E,e,t,1e3,"layout")},registerVisual:hI,registerTransform:vI,registerLoading:mI,registerMap:function(e,t,n){var r=function(e){return pE[e]}("registerMap");r&&r(e,t,n)},registerImpl:function(e,t){pE[e]=t},PRIORITY:gE,ComponentModel:Pw,ComponentView:yT,SeriesModel:mT,ChartView:IT,registerComponentModel:function(e){Pw.registerClass(e)},registerComponentView:function(e){yT.registerClass(e)},registerSeriesModel:function(e){mT.registerClass(e)},registerChartView:function(e){IT.registerClass(e)},registerSubTypeDefaulter:function(e,t){Pw.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){!function(e,t){tg[e]=t}(e,t)}};function dD(e){_c(e)?hc(e,(function(e){dD(e)})):cc(uD,e)>=0||(uD.push(e),bc(e)&&(e={install:e}),e.install(cD))}function pD(e,t){return Math.abs(e-t)<1e-8}function hD(e,t,n){var r=0,i=e[0];if(!i)return!1;for(var o=1;o<e.length;o++){var a=e[o];r+=mv(i[0],i[1],a[0],a[1],t,n),i=a}var s=e[0];return pD(i[0],s[0])&&pD(i[1],s[1])||(r+=mv(i[0],i[1],s[0],s[1],t,n)),0!==r}var fD=jg();function gD(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=vD(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=nD(e);return{labels:fc(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function mD(e,t){return"category"===e.type?function(e,t){var n,r,i=yD(e,"ticks"),o=oD(t),a=xD(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(bc(o))n=wD(e,o,!0);else if("auto"===o){var s=vD(e,e.getLabelModel());r=s.labelCategoryInterval,n=fc(s.labels,(function(e){return e.tickValue}))}else n=bD(e,r=o,!0);return _D(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:fc(e.scale.getTicks(),(function(e){return e.value}))}}function vD(e,t){var n,r,i=yD(e,"labels"),o=oD(t),a=xD(i,o);return a||(bc(o)?n=wD(e,o):(r="auto"===o?function(e){var t=fD(e).autoInterval;return null!=t?t:fD(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=bD(e,r)),_D(i,o,{labels:n,labelCategoryInterval:r}))}function yD(e,t){return fD(e)[t]||(fD(e)[t]=[])}function xD(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function _D(e,t,n){return e.push({key:t,value:n}),n}function bD(e,t,n){var r=nD(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=aD(e),p=a.get("showMinLabel")||d,h=a.get("showMaxLabel")||d;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return h&&f-l!==o[1]&&g(o[1]),s}function wD(e,t,n){var r=e.scale,i=nD(e),o=[];return hc(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var SD=[0,1],CD=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return dg(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&TD(n=n.slice(),r.count()),ag(e,SD,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&TD(n=n.slice(),r.count());var i=ag(e,n,SD,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=fc(mD(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var o,a,s=e.getExtent();if(1===i)t[0].coord=s[0],o=t[1]={coord:s[1]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;hc(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*a},t.push(o)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],o.coord)&&(r?o.coord=s[1]:t.pop());r&&d(o.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=lg(e),t=lg(t),c?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),fc(this.scale.getMinorTicks(e),(function(e){return fc(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return gD(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=nD(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),p=0,h=0;l<=o[1];l+=s){var f,g,m=Pf(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,p=Math.max(p,f,7),h=Math.max(h,g,7)}var v=p/c,y=h/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=fD(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},e}();function TD(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var MD=CD;function ED(e,t){return e===t||e!=e&&t!=t}function ID(e,t){for(var n=e.length;n--;)if(ED(e[n][0],t))return n;return-1}var AD=Array.prototype.splice;function DD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}DD.prototype.clear=function(){this.__data__=[],this.size=0},DD.prototype.delete=function(e){var t=this.__data__,n=ID(t,e);return!(n<0)&&(n==t.length-1?t.pop():AD.call(t,n,1),--this.size,!0)},DD.prototype.get=function(e){var t=this.__data__,n=ID(t,e);return n<0?void 0:t[n][1]},DD.prototype.has=function(e){return ID(this.__data__,e)>-1},DD.prototype.set=function(e,t){var n=this.__data__,r=ID(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function kD(e){if(!Na(e))return!1;var t=Ga(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var OD,RD=ja["__core-js_shared__"],ND=(OD=/[^.]+$/.exec(RD&&RD.keys&&RD.keys.IE_PROTO||""))?"Symbol(src)_1."+OD:"";var LD=Function.prototype.toString;function PD(e){if(null!=e){try{return LD.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var BD=/^\[object .+?Constructor\]$/,jD=Function.prototype,FD=Object.prototype,UD=jD.toString,zD=FD.hasOwnProperty,HD=RegExp("^"+UD.call(zD).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function VD(e){return!(!Na(e)||(t=e,ND&&ND in t))&&(kD(e)?HD:BD).test(PD(e));var t}function WD(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return VD(n)?n:void 0}var YD=WD(ja,"Map"),GD=WD(Object,"create");var qD=Object.prototype.hasOwnProperty;var QD=Object.prototype.hasOwnProperty;function ZD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function XD(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function $D(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ZD.prototype.clear=function(){this.__data__=GD?GD(null):{},this.size=0},ZD.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ZD.prototype.get=function(e){var t=this.__data__;if(GD){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return qD.call(t,e)?t[e]:void 0},ZD.prototype.has=function(e){var t=this.__data__;return GD?void 0!==t[e]:QD.call(t,e)},ZD.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=GD&&void 0===t?"__lodash_hash_undefined__":t,this},$D.prototype.clear=function(){this.size=0,this.__data__={hash:new ZD,map:new(YD||DD),string:new ZD}},$D.prototype.delete=function(e){var t=XD(this,e).delete(e);return this.size-=t?1:0,t},$D.prototype.get=function(e){return XD(this,e).get(e)},$D.prototype.has=function(e){return XD(this,e).has(e)},$D.prototype.set=function(e,t){var n=XD(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function KD(e){var t=this.__data__=new DD(e);this.size=t.size}KD.prototype.clear=function(){this.__data__=new DD,this.size=0},KD.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},KD.prototype.get=function(e){return this.__data__.get(e)},KD.prototype.has=function(e){return this.__data__.has(e)},KD.prototype.set=function(e,t){var n=this.__data__;if(n instanceof DD){var r=n.__data__;if(!YD||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $D(r)}return n.set(e,t),this.size=n.size,this};var JD=function(){try{var e=WD(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function ek(e,t,n){"__proto__"==t&&JD?JD(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var tk=Object.prototype.hasOwnProperty;function nk(e,t,n){var r=e[t];tk.call(e,t)&&ED(r,n)&&(void 0!==n||t in e)||ek(e,t,n)}function rk(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?ek(n,s,l):nk(n,s,l)}return n}function ik(e){return qa(e)&&"[object Arguments]"==Ga(e)}var ok=Object.prototype,ak=ok.hasOwnProperty,sk=ok.propertyIsEnumerable,lk=ik(function(){return arguments}())?ik:function(e){return qa(e)&&ak.call(e,"callee")&&!sk.call(e,"callee")};var uk="object"==typeof exports&&exports&&!exports.nodeType&&exports,ck=uk&&"object"==typeof module&&module&&!module.nodeType&&module,dk=ck&&ck.exports===uk?ja.Buffer:void 0,pk=(dk?dk.isBuffer:void 0)||function(){return!1},hk=/^(?:0|[1-9]\d*)$/;function fk(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&hk.test(e))&&e>-1&&e%1==0&&e<t}function gk(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var mk={};function vk(e){return function(t){return e(t)}}mk["[object Float32Array]"]=mk["[object Float64Array]"]=mk["[object Int8Array]"]=mk["[object Int16Array]"]=mk["[object Int32Array]"]=mk["[object Uint8Array]"]=mk["[object Uint8ClampedArray]"]=mk["[object Uint16Array]"]=mk["[object Uint32Array]"]=!0,mk["[object Arguments]"]=mk["[object Array]"]=mk["[object ArrayBuffer]"]=mk["[object Boolean]"]=mk["[object DataView]"]=mk["[object Date]"]=mk["[object Error]"]=mk["[object Function]"]=mk["[object Map]"]=mk["[object Number]"]=mk["[object Object]"]=mk["[object RegExp]"]=mk["[object Set]"]=mk["[object String]"]=mk["[object WeakMap]"]=!1;var yk="object"==typeof exports&&exports&&!exports.nodeType&&exports,xk=yk&&"object"==typeof module&&module&&!module.nodeType&&module,_k=xk&&xk.exports===yk&&Pa.process,bk=function(){try{var e=xk&&xk.require&&xk.require("util").types;return e||_k&&_k.binding&&_k.binding("util")}catch(e){}}(),wk=bk&&bk.isTypedArray,Sk=wk?vk(wk):function(e){return qa(e)&&gk(e.length)&&!!mk[Ga(e)]},Ck=Object.prototype.hasOwnProperty;function Tk(e,t){var n=La(e),r=!n&&lk(e),i=!n&&!r&&pk(e),o=!n&&!r&&!i&&Sk(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var u in e)!t&&!Ck.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||fk(u,l))||s.push(u);return s}var Mk=Object.prototype;function Ek(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Mk)}function Ik(e,t){return function(n){return e(t(n))}}var Ak=Ik(Object.keys,Object),Dk=Object.prototype.hasOwnProperty;function kk(e){return null!=e&&gk(e.length)&&!kD(e)}function Ok(e){return kk(e)?Tk(e):function(e){if(!Ek(e))return Ak(e);var t=[];for(var n in Object(e))Dk.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var Rk=Object.prototype.hasOwnProperty;function Nk(e){if(!Na(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ek(e),n=[];for(var r in e)("constructor"!=r||!t&&Rk.call(e,r))&&n.push(r);return n}function Lk(e){return kk(e)?Tk(e,!0):Nk(e)}var Pk="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bk=Pk&&"object"==typeof module&&module&&!module.nodeType&&module,jk=Bk&&Bk.exports===Pk?ja.Buffer:void 0,Fk=jk?jk.allocUnsafe:void 0;function Uk(){return[]}var zk=Object.prototype.propertyIsEnumerable,Hk=Object.getOwnPropertySymbols,Vk=Hk?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(Hk(e),(function(t){return zk.call(e,t)})))}:Uk,Wk=Vk;function Yk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Gk=Ik(Object.getPrototypeOf,Object),qk=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Yk(t,Wk(e)),e=Gk(e);return t}:Uk;function Qk(e,t,n){var r=t(e);return La(e)?r:Yk(r,n(e))}function Zk(e){return Qk(e,Ok,Wk)}function Xk(e){return Qk(e,Lk,qk)}var $k=WD(ja,"DataView"),Kk=WD(ja,"Promise"),Jk=WD(ja,"Set"),eO=WD(ja,"WeakMap"),tO="[object Map]",nO="[object Promise]",rO="[object Set]",iO="[object WeakMap]",oO="[object DataView]",aO=PD($k),sO=PD(YD),lO=PD(Kk),uO=PD(Jk),cO=PD(eO),dO=Ga;($k&&dO(new $k(new ArrayBuffer(1)))!=oO||YD&&dO(new YD)!=tO||Kk&&dO(Kk.resolve())!=nO||Jk&&dO(new Jk)!=rO||eO&&dO(new eO)!=iO)&&(dO=function(e){var t=Ga(e),n="[object Object]"==t?e.constructor:void 0,r=n?PD(n):"";if(r)switch(r){case aO:return oO;case sO:return tO;case lO:return nO;case uO:return rO;case cO:return iO}return t});var pO=dO,hO=Object.prototype.hasOwnProperty;var fO=ja.Uint8Array;function gO(e){var t=new e.constructor(e.byteLength);return new fO(t).set(new fO(e)),t}var mO=/\w*$/;var vO=Fa?Fa.prototype:void 0,yO=vO?vO.valueOf:void 0;function xO(e,t,n){var r,i=e.constructor;switch(t){case"[object ArrayBuffer]":return gO(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?gO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?gO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,mO.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,yO?Object(yO.call(r)):{}}}var _O=Object.create,bO=function(){function e(){}return function(t){if(!Na(t))return{};if(_O)return _O(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),wO=bO;var SO=bk&&bk.isMap,CO=SO?vk(SO):function(e){return qa(e)&&"[object Map]"==pO(e)};var TO=bk&&bk.isSet,MO=TO?vk(TO):function(e){return qa(e)&&"[object Set]"==pO(e)},EO="[object Arguments]",IO="[object Function]",AO="[object Object]",DO={};function kO(e,t,n,r,i,o){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Na(e))return e;var c=La(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&hO.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,a)}else{var d=pO(e),p=d==IO||"[object GeneratorFunction]"==d;if(pk(e))return function(e,t){if(t)return e.slice();var n=e.length,r=Fk?Fk(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==AO||d==EO||p&&!i){if(a=l||p?{}:function(e){return"function"!=typeof e.constructor||Ek(e)?{}:wO(Gk(e))}(e),!s)return l?function(e,t){return rk(e,qk(e),t)}(e,function(e,t){return e&&rk(t,Lk(t),e)}(a,e)):function(e,t){return rk(e,Wk(e),t)}(e,function(e,t){return e&&rk(t,Ok(t),e)}(a,e))}else{if(!DO[d])return i?e:{};a=xO(e,d,s)}}o||(o=new KD);var h=o.get(e);if(h)return h;o.set(e,a),MO(e)?e.forEach((function(r){a.add(kO(r,t,n,r,e,o))})):CO(e)&&e.forEach((function(r,i){a.set(i,kO(r,t,n,i,e,o))}));var f=c?void 0:(u?l?Xk:Zk:l?Lk:Ok)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(f||e,(function(r,i){f&&(r=e[i=r]),nk(a,i,kO(r,t,n,i,e,o))})),a}DO[EO]=DO["[object Array]"]=DO["[object ArrayBuffer]"]=DO["[object DataView]"]=DO["[object Boolean]"]=DO["[object Date]"]=DO["[object Float32Array]"]=DO["[object Float64Array]"]=DO["[object Int8Array]"]=DO["[object Int16Array]"]=DO["[object Int32Array]"]=DO["[object Map]"]=DO["[object Number]"]=DO[AO]=DO["[object RegExp]"]=DO["[object Set]"]=DO["[object String]"]=DO["[object Symbol]"]=DO["[object Uint8Array]"]=DO["[object Uint8ClampedArray]"]=DO["[object Uint16Array]"]=DO["[object Uint32Array]"]=!0,DO["[object Error]"]=DO[IO]=DO["[object WeakMap]"]=!1;var OO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(Pw),RO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Hg).models[0]},t.type="cartesian2dAxis",t}(Pw);dc(RO,lD);var NO={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},LO=sc({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},NO),PO=sc({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},NO),BO={category:LO,value:PO,time:sc({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},PO),log:uc({logBase:10},PO)},jO={value:1,category:1,time:1,log:1};function FO(e,t,n,r){hc(jO,(function(i,o){var a=sc(sc({},BO[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return j(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=kw(this),r=n?Rw(e):{};sc(e,t.getTheme().get(o+"Axis")),sc(e,this.getDefaultOption()),e.type=UO(e),n&&Ow(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=oA.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",UO)}function UO(e){return e.type||(e.data?"category":"value")}var zO=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return fc(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),mc(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),HO=["x","y"];function VO(e){return"interval"===e.type||"time"===e.type}var WO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=HO,t}return j(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(VO(e)&&VO(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,p=this._transform=[l,0,0,u,c,d];this._invTransform=Ud([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),o=new Kd(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return od(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return od(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),i=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-r;return new Kd(n,r,i,o)},t}(zO),YO=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return j(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(MD),GO=YO;function qO(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f="x"===u?[d[2]-h,d[3]+h]:[d[0]-h,d[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:d[0],"x"===u?f[p[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),kc(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function QO(e){return"cartesian2d"===e.get("coordinateSystem")}function ZO(e){var t={xAxisModel:null,yAxisModel:null};return hc(t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,Hg).models[0];t[r]=o})),t}var XO=Math.log;var $O=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=HO,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=vc(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;aA(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(tD(l,s),aA(l)&&(t=a))}i.length&&(t||tD((t=i.pop()).scale,t.model),hc(i,(function(e){!function(e,t,n){var r=yA.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=eD(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var p=XO(e.base);u=[XO(u[0])/p,XO(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var h=r.getExtent.call(e);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var f=r.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=lA(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=lA(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=lA(f));var v=f*a;(g=lg((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=lg(v)):m>0&&u[1]<=0&&(m=0,g=-lg(v))}var y=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+f*y,m+f*x),r.setInterval.call(e,f),(y||x)&&r.setNiceExtent.call(e,g+f,m-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};hc(n.x,(function(e){JO(n,"y",e,i)})),hc(n.y,(function(e){JO(n,"x",e,i)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=Dw(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){hc(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?o.x:o.y)}))}s(),i&&(hc(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();i=n instanceof gA?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=nD(e),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var d=l(r?r[c]:{value:o[0]+c},c),p=iD(s.getTextRect(d),s.get("rotate")||0);a?a.union(p):a=p}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}})),s()),hc(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}Tc(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",Hg).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",Hg).models[0],a=e.gridModel,s=this._coordsList;if(r)cc(s,t=r.coordinateSystem)<0&&(t=null);else if(i&&o)t=this.getCartesian(i.componentIndex,o.componentIndex);else if(i)n=this.getAxis("x",i.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(KO(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new GO(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new gA({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new BA({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(tA.getClass(t)||yA)}}(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,hc(a.x,(function(t,n){hc(a.y,(function(i,o){var a="x"+n+"y"+o,s=new WO(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)}))}))},e.prototype._updateScale=function(e,t){function n(e,t){hc(sD(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}hc(this._axesList,(function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}})),e.eachSeries((function(e){if(QO(e)){var r=ZO(e),i=r.xAxisModel,o=r.yAxisModel;if(!KO(i,t)||!KO(o,t))return;var a=this.getCartesian(i.componentIndex,o.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}),this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return hc(this.getCartesians(),(function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);cc(t,i)<0&&t.push(i),cc(n,o)<0&&n.push(o)})),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",(function(i,o){var a=new e(i,t,n);a.name="grid_"+o,a.resize(i,n,!0),i.coordinateSystem=a,r.push(a)})),t.eachSeries((function(e){if(QO(e)){var t=ZO(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}})),r},e.dimensions=HO,e}();function KO(e,t){return e.getCoordSysModel()===t}function JO(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)eR(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&eR(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function eR(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}(e)}var tR=$O,nR=Math.PI,rR=function(){function e(e,t){this.group=new eg,this.opt=t,this.axisModel=e,uc(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new eg({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!iR[e]},e.prototype.add=function(e){iR[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,i,o=hg(t-e);return fg(o)?(i=n>0?"top":"bottom",r="center"):fg(o-nR)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<nR?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),iR={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(od(s,s,a),od(l,l,a));var c=lc({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new n_({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});V_(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var p=t.get(["axisLine","symbol"]);if(null!=p){var h=t.get(["axisLine","symbolSize"]);wc(p)&&(p=[p,p]),(wc(h)||Cc(h))&&(h=[h,h]);var f=PM(t.get(["axisLine","symbolOffset"])||0,h),g=h[0],m=h[1];hc([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==p[r]&&null!=p[r]){var i=LM(p[r],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;i.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=lR(i.getTicksCoords(),t.transform,l,uc(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}(n,r,t,e),o=function(e,t,n,r){var i=n.axis,o=kc(r.axisLabelShow,n.get(["axisLabel","show"]));if(!o||i.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=i.getViewLabels(),u=(kc(r.labelRotate,a.get("rotate"))||0)*nR/180,c=rR.innerTextLayout(r.rotation,u,r.labelDirection),d=n.getCategories&&n.getCategories(!0),p=[],h=rR.isLabelSilent(n),f=n.get("triggerEvent");return hc(l,(function(o,l){var u="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,g=o.formattedLabel,m=o.rawLabel,v=a;if(d&&d[u]){var y=d[u];Tc(y)&&y.textStyle&&(v=new Ab(y.textStyle,a,n.ecModel))}var x=v.getTextColor()||n.get(["axisLine","lineStyle","color"]),_=i.dataToCoord(u),b=new ay({x:_,y:r.labelOffset+r.labelDirection*s,rotation:c.rotation,silent:h,z2:10+(o.level||0),style:ub(v,{text:g,align:v.getShallow("align",!0)||c.textAlign,verticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||c.textVerticalAlign,fill:bc(x)?x("category"===i.type?m:"value"===i.type?u+"":u,l):x})});if(b.anid="label_"+u,f){var w=rR.makeAxisEventDataBase(n);w.targetType="axisLabel",w.value=m,w.tickIndex=l,"category"===i.type&&(w.dataIndex=u),sy(b).eventData=w}t.add(b),b.updateTransform(),p.push(b),e.add(b),b.decomposeTransform()})),p}(n,r,t,e);(function(e,t,n){if(aD(e.axis))return;var r=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],p=n[n.length-2];!1===r?(oR(o),oR(u)):aR(o,a)&&(r?(oR(a),oR(c)):(oR(o),oR(u)));!1===i?(oR(s),oR(d)):aR(l,s)&&(i?(oR(l),oR(p)):(oR(s),oR(d)))}(t,o,i),function(e,t,n,r){var i=n.axis,o=n.getModel("minorTick");if(!o.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var s=o.getModel("lineStyle"),l=r*o.get("length"),u=uc(s.getLineStyle(),uc(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=lR(a[c],t.transform,l,u,"minorticks_"+c),p=0;p<d.length;p++)e.add(d[p])}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&function(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new Kd(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var o=e[i],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=o.obb,p=!1,h=0;h<t.length;h++){var f=t[h];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new b_(f.localRect,f.transform)),d||(d=new b_(s,l)),d.intersect(f.obb)){p=!0;break}}}p?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new b_(a,o):null;t.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return t}(fc(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var i=kc(e.axisName,t.get("name"));if(i){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),p=d[0]>d[1]?-1:1,h=["start"===s?d[0]-p*c:"end"===s?d[1]+p*c:(d[0]+d[1])/2,sR(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*nR/180),sR(s)?o=rR.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,r){var i,o,a=hg(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;fg(a-nR/2)?(o=l?"bottom":"top",i="center"):fg(a-1.5*nR)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*nR&&a>nR/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,y=kc(e.nameTruncateMaxWidth,m.maxWidth,a),x=new ay({x:h[0],y:h[1],rotation:o.rotation,silent:rR.isLabelSilent(t),style:ub(u,{text:i,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(tb({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=rR.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,sy(x).eventData=_}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function oR(e){e&&(e.ignore=!0)}function aR(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=Pd([]);return Fd(i,i,-e.rotation),n.applyTransform(Bd([],i,e.getLocalTransform())),r.applyTransform(Bd([],i,t.getLocalTransform())),n.intersect(r)}}function sR(e){return"middle"===e||"center"===e}function lR(e,t,n,r,i){for(var o=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(od(a,a,t),od(s,s,t));var c=new n_({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});V_(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}var uR=rR;function cR(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var r=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),o=i.get("link",!0)||[],a=[];hc(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=fR(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(hc(n.getAxes(),xc(h,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),p=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&hc(p.baseAxes,xc(h,!d||"cross",c)),d&&hc(p.otherAxes,xc(h,"cross",!1))}}function h(r,s,c){var d=c.model.getModel("axisPointer",i),p=d.get("show");if(p&&("auto"!==p||r||hR(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};hc(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=ac(a.get(e))})),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===i){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&uc(l,c.textStyle)}}return e.model.getModel("axisPointer",new Ab(s,n,r))}(c,u,i,t,r,s):d;var h=d.get("snap"),f=d.get("triggerEmphasis"),g=fR(c.model),m=s||h||"category"===c.type,v=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:h,useHandle:hR(d),seriesModels:[],linkGroup:null};l[g]=v,e.seriesInvolved=e.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(dR(o[r+"AxisId"],n.id)||dR(o[r+"AxisIndex"],n.componentIndex)||dR(o[r+"AxisName"],n.name))return i}}(o,c);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=o[y].mapper,v.linkGroup=x}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&hc(e.coordSysAxesInfo[fR(n.model)],(function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}))}(n,e),n}function dR(e,t){return"all"===e||_c(e)&&cc(e,t)>=0||e===t}function pR(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[fR(e)]}function hR(e){return!!e.get(["handle","show"])}function fR(e){return e.type+"||"+e.id}var gR={},mR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=pR(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=hR(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),i.value=a,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=function(e){var t=pR(e);return t&&t.axisPointerModel}(e);o?(this._axisPointer||(this._axisPointer=new i)).render(e,o,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){gR[e]=t},t.getAxisPointerClass=function(e){return e&&gR[e]},t.type="axis",t}(yT),vR=mR,yR=jg();var xR=["axisLine","axisTickLabel","axisName"],_R=["splitArea","splitLine","minorSplitLine"],bR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return j(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new eg,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=qO(a,t),l=new uR(t,lc({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(aA(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));hc(xR,l.add,l),this._axisGroup.add(l.getGroup()),hc(_R,(function(e){t.get([e,"show"])&&wR[e](this,this._axisGroup,t,a)}),this),i&&"changeAxisOrder"===i.type&&i.isInitSort||Z_(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){yR(this).splitAreaColors=null},t.type="cartesianAxis",t}(vR),wR={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=_c(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o}),p=[],h=[],f=a.getLineStyle(),g=0;g<d.length;g++){var m=i.toGlobalCoord(d[g].coord);u?(p[0]=m,p[1]=l.y,h[0]=m,h[1]=l.y+l.height):(p[0]=l.x,p[1]=m,h[0]=l.x+l.width,h[1]=m);var v=c++%s.length,y=d[g].tickValue,x=new n_({anid:null!=y?"line_"+d[g].tickValue:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:h[0],y2:h[1]},style:uc({stroke:s[v]},f),silent:!0});V_(x.shape,f.lineWidth),t.add(x)}}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=o.getLineStyle(),p=0;p<l.length;p++)for(var h=0;h<l[p].length;h++){var f=i.toGlobalCoord(l[p][h].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new n_({anid:"minor_line_"+l[p][h].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});V_(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,d=yR(e).splitAreaColors,p=Wc(),h=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){h=(g+(c-1)*f)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();for(s=_c(s)?s:[s],f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,_=void 0,b=void 0,w=void 0;i.isHorizontal()?(x=m,_=l.y,b=y-x,w=l.height,m=x+b):(x=l.x,_=m,b=l.width,m=_+(w=y-_));var S=u[f-1].tickValue;null!=S&&p.set(S,h),t.add(new Wv({anid:null!=S?"area_"+S:null,shape:{x:x,y:_,width:b,height:w},style:uc({fill:s[h]},v),autoBatch:!0,silent:!0})),h=(h+1)%c}yR(e).splitAreaColors=p}}}(e,t,n,r)}},SR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="xAxis",t}(bR),CR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=SR.type,t}return j(t,e),t.type="yAxis",t}(bR),TR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return j(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Wv({shape:e.coordinateSystem.getRect(),style:uc({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(yT),MR={offset:0};function ER(e){e.registerComponentView(TR),e.registerComponentModel(OO),e.registerCoordinateSystem("cartesian2d",tR),FO(e,"x",RO,MR),FO(e,"y",RO,MR),e.registerComponentView(SR),e.registerComponentView(CR),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}var IR=jg(),AR=ac,DR=yc,kR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=xc(OR,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new eg,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);PR(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=pR(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=IR(e).pointerEl=new ib[i.type](AR(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=IR(e).labelEl=new ay(AR(t.label));e.add(i),NR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=IR(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=IR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),NR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=$_(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){kd(e.event)},onmousedown:DR(this._onHandleDragMove,this,0,0),drift:DR(this._onHandleDragMove,this),ondragend:DR(this._onHandleDragEnd,this)}),r.add(i)),PR(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");_c(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,RT(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){OR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,LR(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(LR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(LR(r)),IR(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),NT(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function OR(e,t,n,r){RR(IR(n).lastProp,r)||(IR(n).lastProp=r,t?M_(n,r,e):(n.stopAnimation(),n.attr(r)))}function RR(e,t){if(Tc(e)&&Tc(t)){var n=!0;return hc(t,(function(t,r){n=n&&RR(e[r],t)})),!!n}return e===t}function NR(e,t){e[t.get(["label","show"])?"show":"hide"]()}function LR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function PR(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)}))}function BR(e,t,n,r,i){var o=jR(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=yw(a.get("padding")||0),l=a.getFont(),u=Pf(o,l),c=i.position,d=u.width+s[1]+s[3],p=u.height+s[0]+s[2],h=i.align;"right"===h&&(c[0]-=d),"center"===h&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(e,t,n,r){var i=r.getWidth(),o=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,p,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:ub(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function jR(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:rD(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};hc(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),wc(a)?o=a.replace("{value}",o):bc(a)&&(o=a(s))}return o}function FR(e,t,n){var r=[1,0,0,1,0,0];return Fd(r,r,n.rotation),jd(r,r,n.position),G_([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var UR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=zR(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=HR[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,i,o){var a=uR.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),BR(t,r,i,o,{position:FR(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,qO(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=qO(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=FR(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=zR(o,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(kR);function zR(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var HR={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],o=VR(e),{x1:r[o=o||0],y1:r[1-o],x2:i[o],y2:i[1-o]})}},shadow:function(e,t,n){var r,i,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],i=[a,s],o=VR(e),{x:r[o=o||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function VR(e){return"x"===e.dim?0:1}var WR=UR,YR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(Pw),GR=jg(),qR=hc;function QR(e,t,n){if(!Fu.node){var r=t.getZr();GR(r).records||(GR(r).records={}),function(e,t){if(GR(e).initialized)return;function n(n,r){e.on(n,(function(n){var i=function(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);qR(GR(e).records,(function(e){e&&r(e,n,i.dispatchAction)})),function(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)}))}GR(e).initialized=!0,n("click",xc(XR,"click")),n("mousemove",xc(XR,"mousemove")),n("globalout",ZR)}(r,t),(GR(r).records[e]||(GR(r).records[e]={})).handler=n}}function ZR(e,t,n){e.handler("leave",null,n)}function XR(e,t,n,r){t.handler(e,n,r)}function $R(e,t){if(!Fu.node){var n=t.getZr();(GR(n).records||{})[e]&&(GR(n).records[e]=null)}}var KR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";QR("axisPointer",n,(function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){$R("axisPointer",t)},t.prototype.dispose=function(e,t){$R("axisPointer",t)},t.type="axisPointer",t}(yT),JR=KR;function eN(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=Bg(o,e);if(null==a||a<0||_c(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,p="x"===c||"radius"===c?1:0,h=o.mapDimension(d),f=[];f[p]=o.get(h,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(fc(l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var tN=jg();function nN(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||yc(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){sN(i)&&(i=eN({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=sN(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||sN(i),p={},h={},f={list:[],map:{}},g={showPointer:xc(iN,h),showTooltip:xc(oN,f)};hc(s.coordSysMap,(function(e,t){var n=l||e.containPoint(i);hc(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=r.pointToData(i)),null!=a&&rN(e,a,g,!1,p)}}))}));var m={};return hc(c,(function(e,t){var n=e.linkGroup;n&&!h[t]&&hc(n.axesInfo,(function(t,r){var i=h[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,aN(t),aN(e)))),m[e.key]=o}}))})),hc(m,(function(e,t){rN(c[t],e,g,!0,p)})),function(e,t,n){var r=n.axesInfo=[];hc(t,(function(t,n){var i=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}))}(h,c,p),function(e,t,n,r){if(sN(t)||!e.list.length)return void r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(f,i,e,a),function(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",o=tN(r)[i]||{},a=tN(r)[i]={};hc(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&hc(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];hc(o,(function(e,t){!a[t]&&l.push(e)})),hc(a,(function(e,t){!o[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),p}}function rN(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,i=e,o=[],a=Number.MAX_VALUE,s=-1;return hc(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(d,e,n);c=p.dataIndices,u=p.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var h=e-u,f=Math.abs(h);f<=a&&((f<a||h>=0&&s<0)&&(a=f,s=h,i=u,o.length=0),hc(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:i}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==i.seriesIndex&&lc(i,s[0]),!r&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function iN(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function oN(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=fR(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function aN(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function sN(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function lN(e){vR.registerAxisPointerClass("CartesianAxisPointer",WR),e.registerComponentModel(YR),e.registerComponentView(JR),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!_c(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=cR(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},nN)}function uN(e){dD(ER),dD(lN)}var cN="\0_ec_interaction_mutex";function dN(e,t){return!!pN(e)[t]}function pN(e){return e[cN]||(e[cN]={})}pI({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Qc);var hN=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=yc(n._mousedownHandler,n),i=yc(n._mousemoveHandler,n),o=yc(n._mouseupHandler,n),a=yc(n._mousewheelHandler,n),s=yc(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=uc(ac(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return j(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Od(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&mN("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!dN(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y,o=t-r,a=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&kd(e.event),gN(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Od(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=mN("zoomOnMouseWheel",e,this._opt),n=mN("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;fN(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);fN(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){dN(this._zr,"globalPan")||fN(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(pd);function fN(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(kd(r.event),gN(e,t,n,r,i))}function gN(e,t,n,r,i){i.isAvailableBehavior=yc(mN,null,n,r),e.trigger(t,i)}function mN(e,t,n){var r=n[e];return!e||r&&(!wc(r)||t.event[r+"Key"])}var vN=hN,yN={axisPointer:1,tooltip:1,brush:1};function xN(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=bN(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=bN(s,[0,a]),i=o=bN(s,[i,o]),r=0}t[0]=bN(t[0],n),t[1]=bN(t[1],n);var l=_N(t,r);t[r]+=e;var u,c=i||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[r]=bN(t[r],d),u=_N(t,r),null!=i&&(u.sign!==l.sign||u.span<i)&&(t[1-r]=t[r]+l.sign*i),u=_N(t,r),null!=o&&u.span>o&&(t[1-r]=t[r]+u.sign*o),t}function _N(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function bN(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var wN=!0,SN=Math.min,CN=Math.max,TN=Math.pow,MN="globalPan",EN={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},IN={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},AN={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},DN=0,kN=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new eg,n._uid="brushController_"+DN++,hc(iL,(function(e,t){this._handlers[t]=yc(e,this)}),n),n}return j(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){pN(e)[t]=n}(t,MN,this._uid),hc(this._handlers,(function(e,n){t.on(n,e)})),this._brushType=e.brushType,this._brushOption=sc(ac(AN),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=pN(e);r[t]===n&&(r[t]=null)}(e,MN,this._uid),hc(this._handlers,(function(t,n){e.off(n,t)})),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};hc(e,(function(e){t[e.panelId]=ac(e)}))}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=fc(e,(function(e){return sc(ac(AN),e,!0)}));var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new bI(t,e,(function(e,t){return o(e.__brushOption,t)}),o).add(a).update(a).remove((function(e){t[e]!==i&&r.group.remove(t[e])})).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(o,a){var s=e[o];if(null!=a&&t[a]===i)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):RN(r,ON(r,s));PN(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),UN(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(pd);function ON(e,t){var n=aL[t.brushType].createCover(e,t);return n.__brushOption=t,LN(n,t),e.group.add(n),n}function RN(e,t){var n=BN(t);return n.endCreating&&(n.endCreating(e,t),LN(t,t.__brushOption)),t}function NN(e,t){var n=t.__brushOption;BN(t).updateCoverShape(e,t,n.range,n)}function LN(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function PN(e,t){BN(t).updateCommon(e,t),NN(e,t)}function BN(e){return aL[e.__brushOption.brushType]}function jN(e,t,n){var r,i=e._panels;if(!i)return wN;var o=e._transform;return hc(i,(function(e){e.isTargetByCursor(t,n,o)&&(r=e)})),r}function FN(e,t){var n=e._panels;if(!n)return wN;var r=t.__brushOption.panelId;return null!=r?n[r]:wN}function UN(e){var t=e._covers,n=t.length;return hc(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function zN(e,t){var n=fc(e._covers,(function(e){var t=e.__brushOption,n=ac(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function HN(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function VN(e,t,n,r){var i=new eg;return i.add(new Wv({name:"main",style:qN(n),silent:!0,draggable:!0,cursor:"move",drift:xc(XN,e,t,i,["n","s","w","e"]),ondragend:xc(zN,t,{isEnd:!0})})),hc(r,(function(n){i.add(new Wv({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:xc(XN,e,t,i,n),ondragend:xc(zN,t,{isEnd:!0})}))})),i}function WN(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=CN(i,6),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],d=n[1][1],p=c-o+i/2,h=d-o+i/2,f=c-a,g=d-s,m=f+i,v=g+i;GN(e,t,"main",a,s,f,g),r.transformable&&(GN(e,t,"w",l,u,o,v),GN(e,t,"e",p,u,o,v),GN(e,t,"n",l,u,m,o),GN(e,t,"s",l,h,m,o),GN(e,t,"nw",l,u,o,o),GN(e,t,"ne",p,u,o,o),GN(e,t,"sw",l,h,o,o),GN(e,t,"se",p,h,o,o))}function YN(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(qN(n)),i.attr({silent:!r,cursor:r?"move":"default"}),hc([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var i=t.childOfName(n.join("")),o=1===n.length?ZN(e,n[0]):function(e,t){var n=[ZN(e,t[0]),ZN(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?IN[o]+"-resize":null})}))}function GN(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=SN(e[0][0],e[1][0]),n=SN(e[0][1],e[1][1]),r=CN(e[0][0],e[1][0]),i=CN(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}(JN(e,t,[[r,i],[r+o,i+a]])))}function qN(e){return uc({strokeNoScale:!0},e.brushStyle)}function QN(e,t,n,r){var i=[SN(e,n),SN(t,r)],o=[CN(e,n),CN(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function ZN(e,t){var n=q_({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return Y_(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function XN(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=KN(t,i,o);hc(r,(function(e){var t=EN[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(QN(s[0][0],s[1][0],s[0][1],s[1][1])),PN(t,n),zN(t,{isEnd:!1})}function $N(e,t,n,r){var i=t.__brushOption.range,o=KN(e,n,r);hc(i,(function(e){e[0]+=o[0],e[1]+=o[1]})),PN(e,t),zN(e,{isEnd:!1})}function KN(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function JN(e,t,n){var r=FN(e,t);return r&&r!==wN?r.clipPath(n,e._transform):ac(n)}function eL(e){var t=e.event;t.preventDefault&&t.preventDefault()}function tL(e,t,n){return e.childOfName("main").contain(t,n)}function nL(e,t,n,r){var i,o=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return TN(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&UN(e);var l=ac(s);l.brushType=rL(l.brushType,a),l.panelId=a===wN?null:a.panelId,o=e._creatingCover=ON(e,l),e._covers.push(o)}if(o){var u=aL[rL(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(JN(e,o,e._track)),r&&(RN(e,o),u.updateCommon(e,o)),NN(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&jN(e,t,n)&&UN(e)&&(i={isEnd:r,removeOnClick:!0});return i}function rL(e,t){return"auto"===e?t.defaultBrushType:e}var iL={mousedown:function(e){if(this._dragging)oL(this,e);else if(!e.target||!e.target.draggable){eL(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=jN(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,i=e._covers,o=jN(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var s=i[a].__brushOption;if(o&&(o===wN||s.panelId===o.panelId)&&aL[s.brushType].contain(i[a],n[0],n[1]))return}o&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){eL(e);var i=nL(this,e,r,!1);i&&zN(this,i)}},mouseup:function(e){oL(this,e)}};function oL(e,t){if(e._dragging){eL(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=nL(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&zN(e,o)}}var aL={lineX:sL(0),lineY:sL(1),rect:{createCover:function(e,t){function n(e){return e}return VN({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=HN(e);return QN(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){WN(e,t,n,r)},updateCommon:YN,contain:tL},polygon:{createCover:function(e,t){var n=new eg;return n.add(new Kx({name:"main",style:qN(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Zx({name:"main",draggable:!0,drift:xc($N,e,t),ondragend:xc(zN,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:JN(e,t,n)})},updateCommon:YN,contain:tL}};function sL(e){return{createCover:function(t,n){return VN({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=HN(t);return[SN(n[0][e],n[1][e]),CN(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=FN(t,n);if(a!==wN&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),WN(t,n,l,i)},updateCommon:YN,contain:tL}}var lL=kN;function uL(e){return e=pL(e),function(t){return X_(t,e)}}function cL(e,t){return e=pL(e),function(n){var r=null!=t?t:n,i=r?e.width:e.height,o=r?e.x:e.y;return[o,o+(i||0)]}}function dL(e,t,n){var r=pL(e);return function(e,i){return r.contain(i[0],i[1])&&!function(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!yN.hasOwnProperty(r.mainType)&&i&&i.model!==n}(e,t,n)}}function pL(e){return Kd.create(e)}var hL=["x","y","radius","angle","single"],fL=["cartesian2d","polar","singleAxis"];function gL(e){return e+"Axis"}function mL(e,t){var n,r=Wc(),i=[],o=Wc();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return i}function vL(e){var t=e.ecModel,n={infoList:[],infoMap:Wc()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(gL(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var yL=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),xL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return j(t,e),t.prototype.init=function(e,t,n){var r=_L(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=_L(e);sc(this.option,e,!0),sc(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;hc([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Wc();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return hc(hL,(function(n){var r=this.getReferringComponents(gL(n),Vg);if(r.specified){t=!0;var i=new yL;hc(r.models,(function(e){i.add(e.componentIndex)})),e.set(n,i)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x";o(n.findComponents({mainType:i+"Axis"}),i)}r&&o(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function o(t,n){var i=t[0];if(i){var o=new yL;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",Hg).models[0];a&&hc(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",Hg).models[0]&&o.add(e.componentIndex)}))}}}r&&hc(hL,(function(t){if(r){var i=n.findComponents({mainType:gL(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new yL;o.add(i[0].componentIndex),e.set(t,o),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");hc([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(gL(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){hc(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(gL(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;hc([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;hc(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(i,o.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(Pw);function _L(e){var t={};return hc(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var bL=xL,wL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(yT),SL=hc,CL=ug,TL=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return cc(fL,t)>=0}(t)){var n=gL(this._dimName),r=t.getReferringComponents(n,Hg).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return ac(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];SL(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(ag(c,o,n))):(t=!0,c=ag(d=null==d?n[u]:r.parse(d),n,o)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?o[u]:c})),CL(s),CL(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";xN(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=ag(e[s],n,i,!0),o&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];SL(n,(function(e){!function(e,t,n){t&&hc(sD(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var i=e.getAxisModel(),o=KA(i.axis.scale,i,r).calculate();return[o.min,o.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&SL(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=fc(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,i,l=0;l<r.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<o[0],p=u>o[1];if(c&&!d&&!p)return!0;c&&(i=!0),d&&(t=!0),p&&(n=!0)}return i&&t&&n}))}else SL(r,(function(n){if("empty"===i)e.setData(t=t.map(n,(function(e){return function(e){return e>=o[0]&&e<=o[1]}(e)?e:NaN})));else{var r={};r[n]=o,t.selectRange(r)}}));SL(r,(function(e){t.setApproximateExtent(o,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;SL(["min","max"],(function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=ag(n[0]+o,n,[0,100],!0):null!=i&&(o=ag(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=dg(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();var ML=TL,EL={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(gL(r),i);t(r,i,o,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new ML(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=Wc();return hc(n,(function(e){hc(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var IL=!1;function AL(e){IL||(IL=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,EL),function(e){e.registerAction("dataZoom",(function(e,t){hc(mL(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}var DL=function(){},kL={};var OL=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],RL=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=LL(t,e);hc(PL,(function(e,t){(!n||!n.include||cc(n.include,t)>=0)&&e(i,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=FL[e.brushType](0,n,t);e.__rangeOffset={offset:zL[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){hc(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&hc(r.coordSyses,(function(r){var i=FL[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){hc(e,(function(e){var n,r,i,o,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=FL[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?zL[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,i=VL(n),o=VL(r),a=[i[0]/o[0],i[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return fc(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:uL(r),isTargetByCursor:dL(r,e,n.coordSysModel),getLinearBrushOtherExtent:cL(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&cc(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=LL(t,e),i=0;i<n.length;i++){var o=n[i],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<BL.length;s++)if(BL[s](r,o))return o}return!0},e}();function NL(e){return e[0]>e[1]&&e.reverse(),e}function LL(e,t){return Ug(e,t,{includeMainTypes:OL})}var PL={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=Wc(),a={},s={};(n||r||i)&&(hc(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),hc(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),hc(i,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var i=e.coordinateSystem,o=[];hc(i.getCartesians(),(function(e,t){(cc(n,e.getAxis("x").model)>=0||cc(r,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:jL.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){hc(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:jL.geo})}))}},BL=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],jL={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(Y_(e)),t}},FL={lineX:xc(UL,0),lineY:xc(UL,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[NL([i[0],o[0]]),NL([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:fc(n,(function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o})),xyMinMax:i}}};function UL(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=NL(fc([0,1],(function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var zL={lineX:xc(HL,0),lineY:xc(HL,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return fc(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function HL(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function VL(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var WL=RL,YL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(Pw);function GL(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function qL(e){if(Fu.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var QL=qL(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function ZL(e,t){if(!e)return t;t=vw(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var XL=ZL(qL(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),$L=ZL(QL,"transform"),KL="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Fu.transform3dSupported?"will-change:transform;":"");function JL(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Fu.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=Fu.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+$L+":"+a+";":[["top",0],["left",0],[QL,a]]}function eP(e,t,n){var r=[],i=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=rT(e,"html"),p=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+p),t&&i&&r.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,i="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,i+=Fu.transformSupported?","+$L+r:",left"+r+",top"+r),XL+":"+i}(i,n)),o&&r.push("background-color:"+o),hc(["width","color","radius"],(function(t){var n="border-"+t,i=vw(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))})),r.push(function(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+a+"px "+s+"px "+o+"px "+i),hc(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}(c)),null!=d&&r.push("padding:"+yw(d).join("px ")+"px"),r.join(";")+";"}function tP(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,r,i){yd(vd,t,r,i,!0)&&yd(e,n,vd[0],vd[1])}(e,a,document.body,r,i)}else{e[0]=r,e[1]=i;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var nP=function(){function e(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Fu.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;tP(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;Ad(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){var t,n,r,i=this._container,o=(n="position",(r=(t=i).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t))?n?r[n]:r:null),a=i.style;"absolute"!==a.position&&"absolute"!==o&&(a.position="relative");var s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=KL+eP(e,!this._firstShow,this._longHide)+JL(i[0],i[1],!0)+"border-color:"+Sw(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null!=e){var a="";if(wc(i)&&"item"===n.get("trigger")&&!GL(n)&&(a=function(e,t,n){if(!wc(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=Sw(t);var o,a,s="left"===(o=n)?"right":"right"===o?"left":"top"===o?"bottom":"top",l=Math.max(1.5*Math.round(i),6),u="",c=$L+":";cc(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,p=l+i,h=p*Math.abs(Math.cos(d))+p*Math.abs(Math.sin(d)),f=t+" solid "+i+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-p)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),wc(e))o.innerHTML=e+a;else if(e){o.innerHTML="",_c(e)||(e=[e]);for(var s=0;s<e.length;s++)Ic(e[s])&&e[s].parentNode!==o&&o.appendChild(e[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}}else o.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if(tP(n,this._zr,this._appendToBody,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;hc(JL(n[0],n[1]),(function(e){r[e[0]]=e[1]}))}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Fu.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(yc(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},e}(),rP=nP;function iP(e){return Math.max(0,e)}function oP(e){var t=iP(e.shadowBlur||0),n=iP(e.shadowOffsetX||0),r=iP(e.shadowOffsetY||0);return{left:iP(t-n),right:iP(t+n),top:iP(t-r),bottom:iP(t+r)}}function aP(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var sP=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),aP(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var o=this;Tc(e)&&Sg(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new ay({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:rT(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),hc(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){o.el.style[e]=n.get(e)})),hc(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){o.el.style[e]=a.get(e)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=oP(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;aP(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=iP(i.borderWidth||0),a=oP(i);n.x=e+o+a.left,n.y=t+o+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(yc(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}(),lP=new Wv({shape:{x:-1,y:-1,width:2,height:2}}),uP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.init=function(e,t){if(!Fu.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?Fu.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new sP(t):new rP(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)})}},t.prototype.render=function(e,t,n){if(!Fu.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?RT(this,"_updatePosition",50,"fixRate"):NT(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");QR("itemTooltip",this._api,yc((function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Fu.node&&n.getDom()){var i=dP(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=zg(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=Wg(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=sy(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=lP;l.x=r.x,l.y=r.y,l.update(),sy(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=eN(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(dP(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s)if("axis"===cP([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var i,o;this._lastDataByCoordSys=null,wM(n,(function(e){return null!=sy(e).dataIndex?(i=e,!0):null!=sy(e).tooltipConfig?(o=e,!0):void 0}),!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=yc(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=cP([t.tooltipOption],r),a=this._renderMode,s=[],l=QC("section",{blocks:[],noHeader:!0}),u=[],c=new iT;hc(e,(function(e){hc(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=jR(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=QC("section",{header:o,noHeader:!Bc(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),hc(e.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=p.getDataParams(h);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=rD(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",Sw(f.color),a);var g=vC(p.formatTooltip(h,!0,null)),m=g.frag;if(m){var v=cP([p],r).get("valueFormatter");d.blocks.push(v?lc({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,p=o.get("order"),h=eT(l,c,a,p,n.get("useUTC"),o.get("textStyle"));h&&u.unshift(h);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=sy(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,p=e.positionDefault,h=cP([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=h.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new iT;g.marker=m.makeTooltipMarker("item",Sw(g.color),d);var v=vC(s.formatTooltip(l,!1,u)),y=h.get("order"),x=h.get("valueFormatter"),_=v.frag,b=_?eT(x?lc({valueFormatter:x},_):_,m,d,y,r.get("useUTC"),h.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,b,g,w,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=sy(t),i=r.tooltipConfig.option||{};if(wc(i)){i={content:i,formatter:i}}var o=[i],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a),o.push({formatter:i.content});var s=e.positionDefault,l=cP(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new iT;this._showOrMove(l,(function(){var n=ac(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,p=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(wc(c)){var h=e.ecModel.get("useUTC"),f=_c(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=Jb(f.axisValue,d,h)),d=ww(d,n,!0)}else if(bc(c)){var g=yc((function(t,r){t===this._ticket&&(u.setContent(r,l,e,p,a),this._updatePosition(e,a,i,o,u,n,s))}),this);this._ticket=r,d=c(n,r,g)}else d=c;u.setContent(d,l,e,p,a),u.show(e,p),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||_c(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:_c(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),bc(t)&&(t=t([n,r],o,i.el,p,{viewSize:[s,l],contentSize:u.slice()})),_c(t))n=sg(t[0],s),r=sg(t[1],l);else if(Tc(t)){var h=t;h.width=u[0],h.height=u[1];var f=Dw(h,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(wc(t)&&a){var g=function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}(t,p,u,e.get("borderWidth"));n=g[0],r=g[1]}else{g=function(e,t,n,r,i,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(e+l+o+2>r?e-=l+o:e+=o);null!=a&&(t+u+a>i?t-=u+a:t+=a);return[e,t]}(n,r,i,s,l,c?null:20,d?null:20);n=g[0],r=g[1]}if(c&&(n-=pP(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=pP(d)?u[1]/2:"bottom"===d?u[1]:0),GL(e)){g=function(e,t,n,r,i){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,i,s,l);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&hc(n,(function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&hc(a,(function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&hc(a,(function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&hc(e.seriesDataIndices,(function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Fu.node&&t.getDom()&&(NT(this,"_updatePosition"),this._tooltipContent.dispose(),$R("itemTooltip",t))},t.type="tooltip",t}(yT);function cP(e,t,n){var r,i=t.ecModel;n?(r=new Ab(n,i,i),r=new Ab(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof Ab&&(a=a.get("tooltip",!0)),wc(a)&&(a={formatter:a}),a&&(r=new Ab(a,r,i)))}return r}function dP(e,t){return e.dispatchAction||yc(t.dispatchAction,t)}function pP(e){return"center"===e||"middle"===e}var hP=uP;function fP(e){dD(lN),e.registerComponentModel(YL),e.registerComponentView(hP),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Qc),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Qc)}var gP=["rect","polygon","keep","clear"];function mP(e,t){var n=Mg(e?e.brush:[]);if(n.length){var r=[];hc(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;_c(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(e){var t={};hc(e,(function(e){t[e]=1})),e.length=0,hc(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,gP)}}var vP=hc,yP=Tc,xP=-1,_P=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=ac(t);this.type=r,this.mappingMethod=n,this._normalizeData=DP[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(bP(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,hc(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===n?i.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(vP(t,(function(e,t){n[e]=t})),!_c(r)){var i=[];Tc(r)?vP(r,(function(e,t){var r=n[t];i[null!=r?r:xP]=e})):i[-1]=r,r=AP(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):bP(i,!0):(Pc("linear"!==n||i.dataExtent),bP(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return yc(this._normalizeData,this)},e.listVisualTypes=function(){return vc(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){Tc(e)?hc(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=_c(t)?[]:Tc(t)?{}:(i=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,r={};return t&&vP(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(_c(e))e=e.slice();else{if(!yP(e))return[];var t=[];vP(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||wc(s)&&s===e+"")return o;n&&d(s,o)}}for(o=0,a=t.length;o<a;o++){var l=t[o],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(kP(c[1],e,u[1]))return o}else if(u[1]===1/0){if(kP(c[0],u[0],e))return o}else if(kP(c[0],u[0],e)&&kP(c[1],e,u[1]))return o;n&&d(u[0],o),n&&d(u[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:CP("color"),getColorMapper:function(){var e=this.option;return yc("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),TP.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=fh(t,e.parsedVisual,r),i?r:mh(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return mh(fh(e,this.option.parsedVisual),"rgba")},category:TP,piecewise:function(e,t){var n=IP.call(this,t);return null==n&&(n=mh(fh(e,this.option.parsedVisual),"rgba")),n},fixed:MP}},colorHue:wP((function(e,t){return gh(e,t)})),colorSaturation:wP((function(e,t){return gh(e,null,t)})),colorLightness:wP((function(e,t){return gh(e,null,null,t)})),colorAlpha:wP((function(e,t){return function(e,t){var n=dh(e);if(n&&null!=t)return n[3]=th(t),mh(n,"rgba")}(e,t)})),decal:{applyVisual:CP("decal"),_normalizedToVisual:{linear:null,category:TP,piecewise:null,fixed:null}},opacity:{applyVisual:CP("opacity"),_normalizedToVisual:EP([0,1])},liftZ:{applyVisual:CP("liftZ"),_normalizedToVisual:{linear:MP,category:MP,piecewise:MP,fixed:MP}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:SP,category:TP,piecewise:function(e,t){var n=IP.call(this,t);return null==n&&(n=SP.call(this,e)),n},fixed:MP}},symbolSize:{applyVisual:CP("symbolSize"),_normalizedToVisual:EP([0,1])}},e}();function bP(e,t){var n=e.visual,r=[];Tc(n)?vP(n,(function(e){r.push(e)})):null!=n&&r.push(n);t||1!==r.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(r[1]=r[0]),AP(e,r)}function wP(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:EP([0,1])}}function SP(e){var t=this.option.visual;return t[Math.round(ag(e,[0,1],[0,t.length-1],!0))]||{}}function CP(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function TP(e){var t=this.option.visual;return t[this.option.loop&&e!==xP?e%t.length:e]}function MP(){return this.option.visual[0]}function EP(e){return{linear:function(t){return ag(t,e,this.option.visual,!0)},category:TP,piecewise:function(t,n){var r=IP.call(this,n);return null==r&&(r=ag(t,e,this.option.visual,!0)),r},fixed:MP}}function IP(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[_P.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function AP(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=fc(t,(function(e){var t=dh(e);return t||[0,0,0,1]}))),t}var DP={linear:function(e){return ag(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=_P.findPieceIndex(e,t,!0);if(null!=n)return ag(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?xP:t},fixed:Qc};function kP(e,t,n){return e?t<=n:t<n}var OP=_P,RP=hc;function NP(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var LP={lineX:PP(0),lineY:PP(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&hD(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,o=e.y,a=e.width,s=e.height,l=r[0];return!!(hD(r,i,o)||hD(r,i+a,o)||hD(r,i,o+s)||hD(r,i+a,o+s)||Kd.create(e).contain(l[0],l[1])||K_(i,o,i+a,o,r)||K_(i,o,i,o+s,r)||K_(i+a,o,i+a,o+s,r)||K_(i,o+s,i+a,o+s,r))||void 0}}};function PP(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return BP(t[e],i)}},rect:function(r,i,o){if(r){var a=o.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),BP(s[0],a)||BP(s[1],a)||BP(a[0],s)||BP(a[1],s)}}}}function BP(e,t){return t[0]<=e&&e<=t[1]}var jP=["inBrush","outOfBrush"],FP="__ecBrushSelect",UP="__ecInBrushSelectEvent";function zP(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new WL(t.option,e)).setInputRanges(t.areas,e)}))}function HP(e,t,n){var r,i,o=[];e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),zP(e),e.eachComponent({mainType:"brush"},(function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:ac(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],p=!1;n||(r=s.throttleType,i=s.throttleDelay);var h=fc(t.areas,(function(e){var t=YP[e.brushType],n=uc({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return LP[t].point(r,n,e)},rect:function(r){return LP[t].rect(r,n,e)}};return n}(n),n})),f=function(e,t,n){var r={};return RP(t,(function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);RP(e[t],(function(e,r){if(OP.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new OP(i),"opacity"===r&&((i=ac(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new OP(i))}}))})),r}(t.option,jP,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}_c(l)&&hc(l,(function(e){u[e]=1})),e.eachSeries((function(n,r){var i=d[r]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;p=p||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,r):function(n,r,i){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(_c(n)?cc(n,t)<0:t!==n)}(t,r))return;if(hc(h,(function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),p=p||m(i)})),g(r)&&m(i)){var o=n.getData();o.each((function(e){WP(n,i,o,e)&&(c[e]=1)}))}}(n,r,i)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var r=d[t],i=e.getData(),o=g(t)?function(e){return c[e]?(n.dataIndex.push(i.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return WP(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?p:m(r))&&function(e,t,n,r,i,o){var a,s={};function l(e){return _M(n,a,e)}function u(e,t){!function(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}(n,a,e,t)}function c(e,c){a=null==o?e:c;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var p=r.call(i,e),h=t[p],f=s[p],g=0,m=f.length;g<m;g++){var v=f[g];h[v]&&h[v].applyVisual(e,l,u)}}hc(e,(function(e){var n=OP.prepareVisualTypes(t[e]);s[e]=n})),null==o?n.each(c):n.each([o],c)}(jP,f,i,o)}))})),function(e,t,n,r,i){if(!i)return;var o=e.getZr();if(o[UP])return;o[FP]||(o[FP]=VP);var a=RT(o,FP,n,t);a(e,r)}(t,r,i,o,n)}function VP(e,t){if(!e.isDisposed()){var n=e.getZr();n[UP]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[UP]=!1}}function WP(e,t,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i];if(e.brushSelector(r,n,a.selectors,a))return!0}}var YP={rect:function(e){return GP(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=n[r];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&GP(t)}};function GP(e){return new Kd(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var qP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new lL(t.getZr())).on("brush",yc(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){zP(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:ac(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:ac(n),$from:t})},t.type="brush",t}(yT),QP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return j(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&function(e,t,n){var r;hc(n,(function(e){t.hasOwnProperty(e)&&NP(t[e])&&(r=!0)})),r&&hc(n,(function(n){t.hasOwnProperty(n)&&NP(t[n])?e[n]=ac(t[n]):delete e[n]}))}(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=fc(e,(function(e){return ZP(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=ZP(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Pw);function ZP(e,t){return sc({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Ab(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var XP=QP,$P=["rect","polygon","lineX","lineY","keep","clear"],KP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.render=function(e,t,n){var r,i,o;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,i=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=r,this._brushMode=i,hc(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?o:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return hc(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){return{show:!0,type:$P.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(DL),JP=KP;function eB(e){e.registerComponentView(qP),e.registerComponentModel(XP),e.registerPreprocessor(mP),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,HP),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Qc),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Qc),function(e,t){kL[e]=t}("brush",JP)}var tB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return j(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Pw),nB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Oc(e.get("textBaseline"),e.get("textVerticalAlign")),l=new ay({style:ub(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new ay({style:ub(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),h=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!p&&!f,d.silent=!h&&!f,p&&l.on("click",(function(){Cw(p,"_"+e.get("target"))})),h&&d.on("click",(function(){Cw(h,"_"+e.get("subtarget"))})),sy(l).eventData=sy(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=Dw(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=r.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new Wv({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});r.add(b)}},t.type="title",t}(yT);function rB(e){e.registerComponentModel(tB),e.registerComponentView(nB)}function iB(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=fC(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(fC(e,t,n[a]));return o.join(" ")}}function oB(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!_c(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);o>=0&&r.push(t[o])}return r.join(" ")}var aB=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return j(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=LM(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=sB,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Py(this.childAt(0))},t.prototype.downplay=function(){By(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(d):M_(p,d,a,n),O_(p)}if(this._updateCommon(e,n,s,r,i),l){var p=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,E_(p,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f=this.childAt(0),g=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,p=r.hoverScale,h=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=lb(m),p=v.getShallow("scale"),h=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=PM(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),h&&f.attr("cursor",h);var _=e.getItemVisual(t,"style"),b=_.fill;if(f instanceof Pv){var w=f.style;f.useStyle(lc({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(lc({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),C=this._z2;null!=S?null==C&&(this._z2=f.z2,f.z2+=S):null!=C&&(f.z2=C,this._z2=null);var T=i&&i.useNameLabel;sb(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return T?e.getName(t):iB(e,t)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var E=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;M.scaleX=this._sizeX*E,M.scaleY=this._sizeY*E,this.setSymbolScale(1),Zy(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=sy(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&A_(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();A_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return _c(n=e.getItemVisual(t,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},t}(eg);function sB(e,t){this.parent.drift(e,t)}var lB=aB;function uB(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function cB(e){return null==e||Tc(e)||(e={isIgnore:e}),e||{}}function dB(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:lb(t),cursorStyle:t.get("cursor")}}var pB=function(){function e(e){this.group=new eg,this._SymbolCtor=e||lB}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=cB(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=dB(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add((function(r){var i=u(r);if(uB(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var p=i.getItemGraphicEl(d),h=u(c);if(uB(e,h,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(e,c,s,l)).setPosition(h);else{p.updateData(e,c,s,l);var m={x:h[0],y:h[1]};a?p.attr(m):M_(p,m,r)}n.add(p),e.setItemGraphicEl(c,p)}else n.remove(p)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=dB(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=cB(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(uB(t,o,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){rb(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),n.hostModel)})):t.removeAll()},e}(),hB=pB;function fB(e,t){return e.type===t}var gB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return j(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),_c(t)&&hc(t,(function(e,r){wc(e)&&(e={type:e}),t[r]=sc(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries((function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&Lg(r)&&t.push(r.name)})),this._availableNames=n;var r=this.get("data")||t,i=Wc(),o=fc(r,(function(e){return(wc(e)||Cc(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new Ab(e,this,this.ecModel))}),this);this._data=mc(o,(function(e){return!!e}))},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&hc(this._data,(function(e){t[e.get("name")]=!1}));t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;hc(e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;hc(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&cc(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(Pw),mB=gB,vB=xc,yB=hc,xB=eg,_B=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return j(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new xB),this.group.add(this._selectorGroup=new xB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=Dw(l,u,c),p=this.layoutInner(e,i,d,r,a,s),h=Dw(uc({width:p.width,height:p.height},l),u,c);this.group.x=h.x-p.x,this.group.y=h.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(e,t){var n=yw(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),new Wv({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),l=Wc(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),yB(t.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new xB;return d.newline=!0,void s.add(d)}var p=n.getSeriesByName(a)[0];if(!l.get(a))if(p){var h=p.getData(),f=h.getVisual("legendLineStyle")||{},g=h.getVisual("legendIcon"),m=h.getVisual("style");this._createItem(p,a,o,i,t,e,f,m,g,u,r).on("click",vB(bB,a,null,r,c)).on("mouseover",vB(SB,p.name,null,r,c)).on("mouseout",vB(CB,p.name,null,r,c)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var d=s.indexOfName(a),p=s.getItemVisual(d,"style"),h=s.getItemVisual(d,"legendIcon"),f=dh(p.fill);f&&0===f[3]&&(f[3]=.2,p=lc(lc({},p),{fill:mh(f,"rgba")})),this._createItem(n,a,o,i,t,e,{},p,h,u,r).on("click",vB(bB,null,a,r,c)).on("mouseover",vB(SB,null,a,r,c)).on("mouseout",vB(CB,null,a,r,c)),l.set(a,!0)}}),this)}),this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();yB(e,(function(e){var r=e.type,i=new ay({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),sb(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),Qy(i)}))},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,p=i.get("itemWidth"),h=i.get("itemHeight"),f=i.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),yB(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?sE(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity);s(u,r);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}(l=v||l||"roundRect",r,a,s,d,f,c),x=new xB,_=r.getModel("textStyle");if(!bc(e.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=LM(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:h,icon:l,iconRotate:b,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:p,itemHeight:h,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var w="left"===o?p+5:-5,S=o,C=i.get("formatter"),T=t;wc(C)&&C?T=C.replace("{name}",null!=t?t:""):bc(C)&&(T=C(t));var M=f?_.getTextColor():r.get("inactiveColor");x.add(new ay({style:ub(_,{text:T,x:w,y:h/2,fill:M,align:S,verticalAlign:"middle"},{inheritColor:M})}));var E=new Wv({shape:x.getBoundingRect(),invisible:!0}),I=r.getModel("tooltip");return I.get("show")&&tb({el:E,componentModel:i,itemName:t,itemTooltipOption:I.option}),x.add(E),x.eachChild((function(e){e.silent=!0})),E.silent=!u,this.getContentGroup().add(x),Qy(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Aw(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),i){Aw("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),h=e.getOrient().index,f=0===h?"width":"height",g=0===h?"height":"width",m=0===h?"y":"x";"end"===o?d[h]+=l[f]+p:u[h]+=c[f]+p,d[1-h]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-h]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(yT);function bB(e,t,n,r){CB(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),SB(e,t,n,r)}function wB(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function SB(e,t,n,r){wB(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function CB(e,t,n,r){wB(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}var TB=_B;function MB(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))}function EB(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",(function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),hc(n.getData(),(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);i.hasOwnProperty(t)?i[t]=i[t]&&r:i[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function IB(e){e.registerComponentModel(mB),e.registerComponentView(TB),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,MB),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(e){e.registerAction("legendToggleSelect","legendselectchanged",xc(EB,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",xc(EB,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",xc(EB,"inverseSelect")),e.registerAction("legendSelect","legendselected",xc(EB,"select")),e.registerAction("legendUnSelect","legendunselected",xc(EB,"unSelect"))}(e)}function AB(e,t,n){var r=[1,1];r[e.getOrient().index]=0,Ow(t,n,{type:"box",ignoreSize:!!r})}var DB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Rw(t);e.prototype.init.call(this,t,n,r),AB(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),AB(this,this.option,t)},t.type="legend.scroll",t.defaultOption=Ob(mB.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(mB),kB=eg,OB=["width","height"],RB=["x","y"],NB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return j(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new kB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new kB)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=_c(c)?c:[c,c];h("pagePrev",0);var p=n.getModel("pageTextStyle");function h(e,t){var r=e+"DataIndex",o=$_(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:yc(l._pageGo,l,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});o.name=e,u.add(o)}u.add(new ay({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=OB[s],u=RB[s],c=OB[1-s],d=RB[1-s];i&&Aw("horizontal",a,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),h=a.getBoundingRect(),f=[-h.x,-h.y],g=ac(n);i&&(g[l]=n[l]-h[l]-p);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(i){if("end"===o)f[s]+=m[l]+p;else{var v=h[l]+p;f[s]-=v,m[u]-=v}m[l]+=h[l]+p,f[1-s]+=m[d]+m[c]/2-h[c]/2,m[c]=Math.max(m[c],h[c]),m[d]=Math.min(m[d],h[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;Aw(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),Aw("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),p=c.getBoundingRect(),h=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-p.x,-p.y],v=Oc(e.get("pageButtonGap",!0),e.get("itemGap",!0));h&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-p[i]:g[r]+=p[i]+v);m[1-r]+=d[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=h?n[i]:d[i],y[o]=Math.max(d[o],p[o]),y[a]=Math.min(0,p[a]+m[1-r]),u.__rectSize=n[i],h){var x={x:0,y:0};x[i]=Math.max(n[i]-p[i]-v,0),x[o]=y[o],u.setClipPath(new Wv({shape:x})),u.__rectSize=x[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&M_(l,{x:_.contentPosition[0],y:_.contentPosition[1]},h?e:null),this._updatePageInfoView(e,_),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;hc(["pagePrev","pageNext"],(function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",wc(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=OB[i],a=RB[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,p={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var h=y(u);p.contentPosition[i]=-h.s;for(var f=s+1,g=h,m=h,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+r||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),m=v;for(f=s-1,g=h,m=h,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=v;return p;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(TB),LB=NB;function PB(e){dD(IB),e.registerComponentModel(DB),e.registerComponentView(LB),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}function BB(e){dD(IB),dD(PB)}var jB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="dataZoom.inside",t.defaultOption=Ob(bL.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(bL),FB=jg();function UB(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function zB(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function HB(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function VB(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=FB(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Wc());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){hc(vL(e).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:xc(HB,t),dispatchAction:xc(zB,e),dataZoomInfoMap:null,controller:null},r=n.controller=new vN(e.getZr());return hc(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&a&&r.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Wc())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(t=i.get(o))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each((function(e){var o=e.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),i=i&&o.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),RT(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else UB(r,e)}))}))}var WB=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return j(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){FB(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:yc(YB.pan,this),zoom:yc(YB.zoom,this),scrollMove:yc(YB.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=FB(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||UB(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(wL),YB={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=qB[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return xN(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:GB((function(e,t,n,r,i,o){var a=qB[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:GB((function(e,t,n,r,i,o){return qB[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta}))};function GB(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return xN(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var qB={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},QB=WB;function ZB(e){AL(e),e.registerComponentModel(jB),e.registerComponentView(QB),VB(e)}var XB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Ob(bL.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(bL),$B=Wv,KB="horizontal",JB="vertical",ej=["line","bar","candlestick","scatter"],tj={easing:"cubicOut",duration:100,delay:0},nj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return j(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=yc(this._onBrush,this),this._onBrushEnd=yc(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),RT(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){NT(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new eg;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===KB?{right:i.width-r.x-r.width,top:i.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=Rw(e.option);hc(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=o[e])}));var s=Dw(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===JB&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==KB||i?n===KB&&i?{scaleY:a?1:-1,scaleX:-1}:n!==JB||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new $B({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new $B({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:yc(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=i.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,p=[0,t[1]],h=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=h[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(y>0&&t%y)v+=m;else{var n=null==e||isNaN(e)||""===e,r=n?0:ag(e,u,p,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=m,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new eg,r=new Zx({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new Kx({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(i,o){hc(e.getAxisProxy(i,o).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&cc(ej,e.get("type"))<0)){var a,s=r.getComponent(gL(i),o).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(i),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:i,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new $B({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new $B({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),hc([0,1],(function(t){var o=a.get("handleIcon");!OM[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=LM(o,-1,0,2,2,null,!0);s.attr({cursor:rj(this._orient),draggable:!0,drift:yc(this._onDragMove,this,t),ondragend:yc(this._onDragEnd,this),onmouseover:yc(this._showDataInfo,this,!0),onmouseout:yc(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=sg(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Qy(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new ay({silent:!0,invisible:!0,style:ub(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var p=sg(a.get("moveHandleSize"),o[1]),h=t.moveHandle=new Wv({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=t.moveHandleIcon=LM(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(p,10));(d=t.moveZone=new Wv({invisible:!0,shape:{y:o[1]-m,height:p+m}})).on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),i.add(h),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:rj(this._orient),drift:yc(this._onDragMove,this,"all"),ondragstart:yc(this._showDataInfo,this,!0),ondragend:yc(this._onDragEnd,this),onmouseover:yc(this._showDataInfo,this,!0),onmouseout:yc(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[ag(e[0],[0,100],t,!0),ag(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];xN(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?ag(o.minSpan,a,i,!0):null,null!=o.maxSpan?ag(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=ug([ag(r[0],i,a,!0),ag(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=ug(n.slice()),i=this._size;hc([0,1],(function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new Wv,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,o=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=ug(this._handleEnds.slice());function d(e){var t=Y_(n.handles[e].parent,this.group),a=q_(0===e?"right":"left",t),s=this._handleWidth/2+5,l=G_([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===KB?"middle":a,align:i===KB?a:"center",text:o[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),i=n.get("labelPrecision");null!=i&&"auto"!==i||(i=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return bc(r)?r(e,o):wc(r)?r.replace("{value}",o):o},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,kd(r.event);var i=G_([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Hd(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100];this._range=ug([ag(n.x,r,i,!0),ag(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(kd(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new $B({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?tj:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=vL(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(wL);function rj(e){return"vertical"===e?"ns-resize":"ew-resize"}var ij=nj;function oj(e){e.registerComponentModel(XB),e.registerComponentView(ij),AL(e)}function aj(e){dD(ZB),dD(oj)}var sj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return j(t,e),t.prototype.getInitialData=function(e){return JI(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new eg,n=LM("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*e.itemHeight,s=LM(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?i:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(mT);function lj(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),o=function(e,t){var n=0,r=e.scale.getExtent();"start"===t?n=r[0]:"end"===t?n=r[1]:Cc(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=fc(e.dimensions,(function(e){return t.mapDimension(e)})),p=!1,h=t.getCalculationInfo("stackResultDimension");return KI(t,d[0])&&(p=!0,d[0]=h),KI(t,d[1])&&(p=!0,d[1]=h),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function uj(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var cj=Math.min,dj=Math.max;function pj(e,t){return isNaN(e)||isNaN(t)}function hj(e,t,n,r,i,o,a,s,l){for(var u,c,d,p,h,f,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(pj(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,p=y;else{var x=v-u,_=y-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],S=t[2*b+1];w===v&&S===y&&m<r;)m++,g+=o,w=t[2*(b+=o)],S=t[2*b+1],x=(v=t[2*g])-u,_=(y=t[2*g+1])-c;var C=m+1;if(l)for(;pj(w,S)&&C<r;)C++,w=t[2*(b+=o)],S=t[2*b+1];var T=.5,M=0,E=0,I=void 0,A=void 0;if(C>=r||pj(w,S))h=v,f=y;else{M=w-u,E=S-c;var D=v-u,k=w-v,O=y-c,R=S-y,N=void 0,L=void 0;if("x"===s){var P=M>0?1:-1;h=v-P*(N=Math.abs(D))*a,f=y,I=v+P*(L=Math.abs(k))*a,A=y}else if("y"===s){var B=E>0?1:-1;h=v,f=y-B*(N=Math.abs(O))*a,I=v,A=y+B*(L=Math.abs(R))*a}else N=Math.sqrt(D*D+O*O),h=v-M*a*(1-(T=(L=Math.sqrt(k*k+R*R))/(L+N))),f=y-E*a*(1-T),A=y+E*a*T,I=cj(I=v+M*a*T,dj(w,v)),A=cj(A,dj(S,y)),I=dj(I,cj(w,v)),f=y-(E=(A=dj(A,cj(S,y)))-y)*N/L,h=cj(h=v-(M=I-v)*N/L,dj(u,v)),f=cj(f,dj(c,y)),I=v+(M=v-(h=dj(h,cj(u,v))))*L/N,A=y+(E=y-(f=dj(f,cj(c,y))))*L/N}e.bezierCurveTo(d,p,h,f,v,y),d=I,p=A}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var fj=function(){this.smooth=0,this.smoothConstraint=!0},gj=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new fj},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&pj(n[2*i-2],n[2*i-1]);i--);for(;r<i&&pj(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=hj(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,o=lv.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,p=void 0,h=void 0,f=void 0,g=void 0;switch(i[l++]){case o.M:n=i[l++],r=i[l++];break;case o.L:if(u=i[l++],c=i[l++],(g=a?(e-n)/(u-n):(e-r)/(c-r))<=1&&g>=0){var m=a?(c-r)*g+r:(u-n)*g+n;return a?[e,m]:[m,e]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],d=i[l++],p=i[l++],h=i[l++],f=i[l++];var v=a?Bp(n,u,d,h,e,s):Bp(r,c,p,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?Lp(r,c,p,f,x):Lp(n,u,d,h,x);return a?[e,m]:[m,e]}}n=h,r=f}}},t}(Av),mj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t}(fj),vj=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return j(t,e),t.prototype.getDefaultShape=function(){return new mj},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&pj(n[2*o-2],n[2*o-1]);o--);for(;i<o&&pj(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=hj(e,n,i,o,o,1,t.smooth,a,t.connectNulls);hj(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(Av);function yj(e,t,n,r,i){var o=e.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,a=Math.floor(a),l=Math.round(l);var d=new Wv({shape:{x:a,y:s,width:l,height:u}});if(t){var p=e.getBaseAxis(),h=p.isHorizontal(),f=p.inverse;h?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=bc(i)?function(e){i(e,d)}:null;E_(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function xj(e,t,n){var r=e.getArea(),i=lg(r.r0,1),o=lg(r.r,1),a=new Hx({shape:{cx:lg(e.cx,1),cy:lg(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,E_(a,{shape:{endAngle:r.endAngle,r:o}},n));return a}function _j(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function bj(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function wj(e,t){var n=bj(e),r=n[0],i=n[1],o=bj(t),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function Sj(e){return Cc(e)?e:e?.5:0}function Cj(e,t,n,r){var i=t.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],s=0,l=[],u=[],c=[],d=[];if(r){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||d.push(e[s],e[s+1]);e=d}for(s=0;s<e.length-2;s+=2)switch(c[0]=e[s+2],c[1]=e[s+3],u[0]=e[s],u[1]=e[s+1],a.push(u[0],u[1]),n){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var p=(u[o]+c[o])/2,h=[];l[o]=h[o]=p,l[1-o]=u[1-o],h[1-o]=c[1-o],a.push(l[0],l[1]),a.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function Tj(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=dh(t[i]),s=dh(t[o]),l=r-i,u=mh([eh(oh(a[0],s[0],l)),eh(oh(a[1],s[1],l)),eh(oh(a[2],s[2],l)),th(oh(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function Mj(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*lB.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return hc(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function Ej(e,t){return[e[2*t],e[2*t+1]]}function Ij(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<py.length;t++)if(e.get([py[t],"endLabel","show"]))return!0;return!1}function Aj(e,t,n,r){if(fB(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=Ij(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=yj(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),l);if(!r.get("clip",!0)){var d=c.shape,p=Math.max(d.width,d.height);u?(d.y-=p,d.height+=2*p):(d.x-=p,d.width+=2*p)}return l&&l(1,c),c}return xj(t,n,r)}var Dj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.init=function(){var e=new eg,t=new hB;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem,o=this.group,a=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),u=a.getLayout("points")||[],c="polar"===i.type,d=this._coordSys,p=this._symbolDraw,h=this._polyline,f=this._polygon,g=this._lineGroup,m=!t.ssr&&e.isAnimationEnabled(),v=!l.isEmpty(),y=l.get("origin"),x=lj(i,a,y),_=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=bA(2*r),o=0;o<r;o++){var a=uj(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(i,a,x),b=e.get("showSymbol"),w=e.get("connectNulls"),S=b&&!c&&Mj(e,a,i),C=this._data;C&&C.eachItemGraphicEl((function(e,t){e.__temp&&(o.remove(e),C.setItemGraphicEl(t,null))})),b||p.remove(),o.add(g);var T,M=!c&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(T=i.getArea()).width?(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2):T.r0&&(T.r0-=.5,T.r+=.5)),this._clipShapeForSymbol=T;var E=function(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,o,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){o=r[a];break}}if(o){var l=t.getAxis(i),u=fc(o.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var p=Tj(u,"x"===i?n.getWidth():n.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=p[0].coord-10,g=p[h-1].coord+10,m=g-f;if(m<.001)return"transparent";hc(p,(function(e){e.offset=(e.coord-f)/m})),p.push({offset:h?p[h-1].offset:.5,color:d[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:d[0]||"transparent"});var v=new f_(0,0,0,0,p,!0);return v[i]=f,v[i+"2"]=g,v}}}(a,i,n)||a.getVisual("style")[a.getVisual("drawType")];if(h&&d.type===i.type&&M===this._step){v&&!f?f=this._newPolygon(u,_):f&&!v&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,Sw(E));var I=g.getClipPath();if(I)E_(I,{shape:Aj(this,i,!1,e).shape},e);else g.setClipPath(Aj(this,i,!0,e));b&&p.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),_j(this._stackedOnPoints,_)&&_j(this._points,u)||(m?this._doUpdateAnimation(a,_,i,n,M,y,w):(M&&(u=Cj(u,i,M,w),_&&(_=Cj(_,i,M,w))),h.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))}else b&&p.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),m&&this._initSymbolLabelAnimation(a,i,T),M&&(u=Cj(u,i,M,w),_&&(_=Cj(_,i,M,w))),h=this._newPolyline(u),v?f=this._newPolygon(u,_):f&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,Sw(E)),g.setClipPath(Aj(this,i,!0,e));var A=e.getModel("emphasis"),D=A.get("focus"),k=A.get("blurScope"),O=A.get("disabled");(h.useStyle(uc(s.getLineStyle(),{fill:"none",stroke:E,lineJoin:"bevel"})),Ky(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);sy(h).seriesIndex=e.seriesIndex,Zy(h,D,k,O);var R=Sj(e.get("smooth")),N=e.get("smoothMonotone");if(h.setShape({smooth:R,smoothMonotone:N,connectNulls:w}),f){var L=a.getCalculationInfo("stackedOnSeries"),P=0;f.useStyle(uc(l.getAreaStyle(),{fill:E,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),L&&(P=Sj(L.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:P,smoothMonotone:N,connectNulls:w}),Ky(f,e,"areaStyle"),sy(f).seriesIndex=e.seriesIndex,Zy(f,D,k,O)}var B=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=B)})),this._polyline.onHoverStateChange=B,this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=M,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,h),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){sy(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=Bg(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new lB(i,o)).x=l,s.y=u,s.setZ(c,d);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=d,p.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else IT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=Bg(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else IT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;ky(this._polyline,e),t&&ky(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new gj({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new vj({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");bc(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=bc(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var d=[e.x,e.y],p=void 0,h=void 0,f=void 0;if(n)if(i){var g=n,m=t.pointToCoord(d);r?(p=g.startAngle,h=g.endAngle,f=-m[1]/180*Math.PI):(p=g.r0,h=g.r,f=m[0])}else{var v=n;r?(p=v.x,h=v.x+v.width,f=e.x):(p=v.y+v.height,h=v.y,f=e.y)}var y=h===p?0:(f-p)/(h-p);a&&(y=1-y);var x=bc(u)?u(o):l*y+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(Ij(e)){var i=e.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new ay({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(sb(o,lb(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?oB(i,n):iB(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||o,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),p=o.get("precision"),h=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?h:0)*(m?-1:1),_=(g?0:-h)*(m?-1:1),b=g?"x":"y",w=function(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(i=e[2*u+a],!isNaN(i)&&!isNaN(e[2*u+1-a]))if(0!==u){if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(t-r)/(i-r)}}(u,y,b),S=w.range,C=S[1]-S[0],T=void 0;if(C>=1){if(C>1&&!d){var M=Ej(u,S[0]);s.attr({x:M[0]+x,y:M[1]+_}),i&&(T=c.getRawValue(S[0]))}else{(M=l.getPointOn(y,b))&&s.attr({x:M[0]+x,y:M[1]+_});var E=c.getRawValue(S[0]),I=c.getRawValue(S[1]);i&&(T=function(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(Cc(r))return lg(f=Cg(n||0,r,i),o?Math.max(cg(n||0),cg(r)):t);if(wc(r))return i<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(i<1&&s?s:l)[c];else{var p=s&&s[c]?s[c]:0,h=l[c],f=Cg(p,h,i);a[c]=lg(f,o?Math.max(cg(p),cg(h)):t)}}return a}(n,p,E,I,w.t))}r.lastFrameIndex=S[0]}else{var A=1===e||r.lastFrameIndex>0?S[0]:0;M=Ej(u,A);i&&(T=c.getRawValue(A)),s.attr({x:M[0]+x,y:M[1]+_})}if(i){var D=gb(s);"function"==typeof D.setLabelText&&D.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,o,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],p=[],h=[],f=[],g=lj(i,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=2*x.idx,w=2*x.idx1;var S=m[b],C=m[b+1],T=v[w],M=v[w+1];(isNaN(S)||isNaN(C))&&(S=T,C=M),l.push(S,C),u.push(T,M),c.push(n[b],n[b+1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var E=x.idx,I=g.dataDimsForPoint,A=i.dataToPoint([t.get(I[0],E),t.get(I[1],E)]);w=2*E,l.push(A[0],A[1]),u.push(v[w],v[w+1]);var D=uj(g,i,t,E);c.push(D[0],D[1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(E));break;case"-":_=!1}_&&(p.push(x),h.push(h.length))}h.sort((function(e,t){return f[e]-f[t]}));var k=l.length,O=bA(k),R=bA(k),N=bA(k),L=bA(k),P=[];for(y=0;y<h.length;y++){var B=h[y],j=2*y,F=2*B;O[j]=l[F],O[j+1]=l[F+1],R[j]=u[F],R[j+1]=u[F+1],N[j]=c[F],N[j+1]=c[F+1],L[j]=d[F],L[j+1]=d[F+1],P[y]=p[B]}return{current:O,next:R,stackedOnCurrent:N,stackedOnNext:L,status:P}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,p=c.stackedOnCurrent,h=c.next,f=c.stackedOnNext;if(i&&(d=Cj(c.current,n,i,a),p=Cj(c.stackedOnCurrent,n,i,a),h=Cj(c.next,n,i,a),f=Cj(c.stackedOnNext,n,i,a)),wj(d,h)>3e3||l&&wj(p,f)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:h}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),M_(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:p}),l.stopAnimation(),M_(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;y<v.length;y++){if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}}))},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(IT),kj=Dj;var Oj={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},Rj=function(e){return Math.round(e.length/2)};function Nj(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),p=Math.round(a/d);if(isFinite(p)&&p>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/p));var h=void 0;wc(i)?h=Oj[i]:bc(i)&&(h=i),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/p,h,Rj))}}}}}function Lj(e){e.registerChartView(kj),e.registerSeriesModel(sj),e.registerLayout(function(e,t){return{seriesType:e,plan:xT(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=fc(r.dimensions,(function(e){return n.mapDimension(e)})).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");KI(n,a[0])&&(a[0]=l),KI(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=o&&bA(n*s),a=[],l=[],p=e.start,h=0;p<e.end;p++){var f=void 0;if(1===s){var g=u.get(c,p);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,p),a[1]=u.get(d,p),f=r.dataToPoint(a,null,l);o?(i[h++]=f[0],i[h++]=f[1]):t.setItemLayout(p,f.slice())}o&&t.setLayout("points",i)}}}}}}("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Nj("line"))}var Pj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.getInitialData=function(e,t){return JI(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)hc(r.getAxes(),(function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=i[n],s="x1"===t[n]||"y1"===t[n];if(s&&(a+=1),r.length<2)return;if(2===r.length)return void(o[n]=e.toGlobalCoord(e.getExtent()[s?1:0]));for(var l=void 0,u=void 0,c=1,d=0;d<r.length;d++){var p=r[d].coord,h=d===r.length-1?r[d-1].tickValue+c:r[d].tickValue;if(h===a){u=p;break}if(h<a)l=p;else if(null!=l&&h>a){u=(p+l)/2;break}1===d&&(c=h-r[0].tickValue)}null==u&&(l?l&&(u=r[r.length-1].coord):u=r[0].coord),o[n]=e.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(mT);mT.registerClass(Pj);var Bj=Pj,jj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.getInitialData=function(){return JI(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Ob(Bj.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(Bj),Fj=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Uj=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return j(t,e),t.prototype.getDefaultShape=function(){return new Fj},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,p=c?u-l<d:l-u<d;p||(l=u-(c?d:-d));var h=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);p?(e.moveTo(h*i+n,f*i+r),e.arc(h*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(h*o+n,f*o+r),e.arc(n,r,o,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(Av),zj=Uj;function Hj(e,t,n){return t*Math.sin(e)*(n?-1:1)}function Vj(e,t,n){return t*Math.cos(e)*(n?1:-1)}var Wj=Math.max,Yj=Math.min;var Gj=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return j(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"!==i&&"polar"!==i||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){rb(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var p=e.get("clip",!0)||d,h=function(e,t){var n=e.getArea&&e.getArea();if(fB(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,_=r&&r.isInitSort,b=r&&"changeAxisOrder"===r.type;function w(e){var t=eF[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?Hx:Wv;return new r({shape:sF(t,n,e),silent:!0,z2:0})}(l,i,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=eF[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&Jj[l.type](r)){var s=!1;p&&(s=qj[l.type](h,r));var m=Qj[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),nF(m,a,t,n,r,e,i,"polar"===l.type),_?m.attr({shape:r}):d?Zj(d,c,m,r,t,i,!1,!1):E_(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),S=eF[l.type](a,t,r);if(g){var C=void 0;0===x.length?C=w(n):((C=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",v):C.setShape("cornerRadius",v),y[t]=C);var T=eF[l.type](a,t);M_(C,{shape:sF(i,T,l)},c,t)}var M=s.getItemGraphicEl(n);if(a.hasValue(t)&&Jj[l.type](S)){var E=!1;if(p&&(E=qj[l.type](h,S))&&o.remove(M),M?O_(M):M=Qj[l.type](e,a,t,S,i,c,u.model,!!M,f),d&&(M.forceLabelAnimation=!0),b){var I=M.getTextContent();if(I){var A=gb(I);null!=A.prevValue&&(A.prevValue=A.value)}}else nF(M,a,t,r,S,e,i,"polar"===l.type);_?M.attr({shape:S}):d?Zj(d,c,M,S,t,i,!0,b):M_(M,{shape:S},e,t,null),a.setItemGraphicEl(t,M),M.ignore=E,o.add(M)}else o.remove(M)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&k_(n,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new eg);S.removeAll();for(var C=0;C<y.length;++C)S.add(y[C]);o.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),oF(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),oF(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,r,i){return e?"polar"===e.type?xj(e,t,n):"cartesian2d"===e.type?yj(e,t,n,r,i):null:null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),(function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})})),r.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:fc(r,(function(e){return e.ordinalNumber}))}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){k_(t,e,sy(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(IT),qj={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=Wj(t.x,e.x),s=Yj(t.x+t.width,i),l=Wj(t.y,e.y),u=Yj(t.y+t.height,o),c=s<a,d=u<l;return t.x=c&&a>i?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=Yj(t.r,e.r),o=Wj(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},Qj={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new Wv({shape:lc({},r),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[i?"height":"width"]=0);return u},polar:function(e,t,n,r,i,o,a,s,l){var u=!i&&l?zj:Hx,c=new u({shape:r,z2:1});c.name="item";var d,p,h=tF(i);if(c.calculateTextPosition=(d=h,p=({isRoundCap:u===zj}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return zf(e,t,n);var i=d(r),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,h=(u+c)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=p?Math.abs(u-c)/2:0,y=Math.cos,x=Math.sin,_=s+u*y(f),b=l+u*x(f),w="left",S="top";switch(i){case"startArc":_=s+(c-o)*y(m),b=l+(c-o)*x(m),w="center",S="top";break;case"insideStartArc":_=s+(c+o)*y(m),b=l+(c+o)*x(m),w="center",S="bottom";break;case"startAngle":_=s+h*y(f)+Hj(f,o+v,!1),b=l+h*x(f)+Vj(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+h*y(f)+Hj(f,-o+v,!1),b=l+h*x(f)+Vj(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+h*y(m),b=l+h*x(m),w="center",S="middle";break;case"endArc":_=s+(u+o)*y(m),b=l+(u+o)*x(m),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*y(m),b=l+(u-o)*x(m),w="center",S="top";break;case"endAngle":_=s+h*y(g)+Hj(g,o+v,!0),b=l+h*x(g)+Vj(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+h*y(g)+Hj(g,-o+v,!0),b=l+h*x(g)+Vj(g,-o+v,!0),w="right",S="middle";break;default:return zf(e,t,n)}return(e=e||{}).x=_,e.y=b,e.align=w,e.verticalAlign=S,e}),o){var f=i?"r":"endAngle",g={};c.shape[f]=i?r.r0:r.startAngle,g[f]=r[f],(s?M_:E_)(c,{shape:g},o)}return c}};function Zj(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?M_:E_)(n,{shape:l},t,i,null),(a?M_:E_)(n,{shape:u},t?e.baseAxis.model:null,i)}function Xj(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var $j=["x","y","width","height"],Kj=["cx","cy","r","startAngle","endAngle"],Jj={cartesian2d:function(e){return!Xj(e,$j)},polar:function(e){return!Xj(e,Kj)}},eF={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),i=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,o)}(n,r):0,o=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function tF(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function nF(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;lc(u,function(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;_c(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:fc(r,(function(e){return Uf(e,i)}))}}(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var p=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",h=lb(r);sb(e,h,{labelFetcher:o,labelDataIndex:n,defaultText:iB(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=e.getTextContent();if(s&&f){var g=r.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,r){if(Cc(r))e.setTextConfig({rotation:r});else if(_c(t))e.setTextConfig({rotation:0});else{var i,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===g?p:g,tF(a),r.get(["label","rotate"]))}!function(e,t,n,r){if(e){var i=gb(e);i.prevValue=i.value,i.value=n;var o=t.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}(f,h,o.getRawValue(n),(function(e){return oB(t,e)}));var m=r.getModel(["emphasis"]);Zy(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Ky(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",hc(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var rF=function(){},iF=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return j(t,e),t.prototype.getDefaultShape=function(){return new rF},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],a[0],a[1])},t}(Av);function oF(e,t,n,r){var i=e.getData(),o=i.getLayout("valueAxisHorizontal")?1:0,a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new iF({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new iF({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(i.getVisual("style")),sy(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",aF),d.on("mousemove",aF)),n&&n.push(d)}var aF=OT((function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c<d;c++){var p=3*c;if(l[r]=u,l[i]=o[p+2],s[r]=o[p+r],s[i]=o[p+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);sy(this).dataIndex=t>=0?t:null}),30,!1);function sF(e,t,n){if(fB(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var o=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:o.r0,r:e?i.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}var lF=Gj;function uF(e){e.registerChartView(lF),e.registerSeriesModel(jj),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,xc(MA,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,function(e){return{seriesType:e,plan:xT(),reset:function(e){if(EA(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(i.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=KI(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),p=function(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}(0,i),h=IA(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),m=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=h&&bA(3*i),u=h&&s&&bA(3*i),y=h&&bA(i),x=n.master.getRect(),_=d?x.width:x.height,b=t.getStore(),w=0;null!=(r=e.next());){var S=b.get(c?g:o,r),C=b.get(a,r),T=p,M=void 0;c&&(M=+S-b.get(o,r));var E=void 0,I=void 0,A=void 0,D=void 0;if(d){var k=n.dataToPoint([S,C]);c&&(T=n.dataToPoint([M,C])[0]),E=T,I=k[1]+v,A=k[0]-T,D=m,Math.abs(A)<f&&(A=(A<0?-1:1)*f)}else k=n.dataToPoint([C,S]),c&&(T=n.dataToPoint([C,M])[1]),E=k[0]+v,I=T,A=m,D=k[1]-T,Math.abs(D)<f&&(D=(D<=0?-1:1)*f);h?(l[w]=E,l[w+1]=I,l[w+2]=d?A:D,u&&(u[w]=d?x.x:E,u[w+1]=d?I:x.y,u[w+2]=_),y[r]=r):t.setItemLayout(r,{x:E,y:I,width:A,height:D}),w+=3}h&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Nj("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var cF=Math.sin,dF=Math.cos,pF=Math.PI,hF=2*Math.PI,fF=180/pF,gF=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){this._add("C",e,t,n,r,i,o)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,o){this.ellipse(e,t,n,n,0,r,i,o)},e.prototype.ellipse=function(e,t,n,r,i,o,a,s){var l=a-o,u=!s,c=Math.abs(l),d=bh(c-hF)||(u?l>=hF:-l>=hF),p=l>0?l%hF:l%hF+hF,h=!1;h=!!d||!bh(c)&&p>=pF==!!u;var f=e+n*dF(o),g=t+r*cF(o);this._start&&this._add("M",f,g);var m=Math.round(i*fF);if(d){var v=1/this._p,y=(u?1:-1)*(hF-v);this._add("A",n,r,m,1,+u,e+n*dF(o+y),t+r*cF(o+y)),v>.01&&this._add("A",n,r,m,0,+u,f,g)}else{var x=e+n*dF(a),_=t+r*cF(a);this._add("A",n,r,m,+h,+u,x,_)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,i,o,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p))return void(this._invalid=!0);u.push(Math.round(p*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),mF="none",vF=Math.round;var yF=["lineCap","miterLimit","lineJoin"],xF=fc(yF,(function(e){return"stroke-"+e.toLowerCase()}));function _F(e,t,n,r){var i=null==t.opacity?1:t.opacity;if(n instanceof Pv)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==mF}(t)){var o=xh(t.fill);e("fill",o.color);var a=null!=t.fillOpacity?t.fillOpacity*o.opacity*i:o.opacity*i;(r||a<1)&&e("fill-opacity",a)}else e("fill",mF);if(function(e){var t=e.stroke;return null!=t&&t!==mF}(t)){var s=xh(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*i:s.opacity*i,d=t.strokeFirst;if((r||1!==u)&&e("stroke-width",u),(r||d)&&e("paint-order",d?"stroke":"fill"),(r||c<1)&&e("stroke-opacity",c),t.lineDash){var p=zM(n),h=p[0],f=p[1];h&&(f=vF(f||0),e("stroke-dasharray",h.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",mF);for(var g=0;g<yF.length;g++){var m=yF[g];if(r||t[m]!==Tv[m]){var v=t[m]||Tv[m];v&&e(xF[g],v)}}}else r&&e("stroke",mF)}}var bF="http://www.w3.org/2000/svg",wF="http://www.w3.org/1999/xlink";function SF(e){return document.createElementNS(bF,e)}function CF(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function TF(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var r=t.children,i=t.tag,o=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var r in t){var i=t[r],o=r;!1!==i&&(!0!==i&&null!=i&&(o+='="'+i+'"'),n.push(o))}return"<"+e+" "+n.join(" ")+">"}(i,o)+("style"!==i?wd(a):a||"")+(r?""+n+fc(r,(function(t){return e(t)})).join(n)+n:"")+function(e){return"</"+e+">"}(i)}(e)}function MF(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function EF(e,t,n,r){return CF("svg","root",{width:e,height:t,xmlns:bF,"xmlns:xlink":wF,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var IF={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},AF="transform-origin";function DF(e,t,n){var r=lc({},e.shape);lc(r,t),e.buildPath(n,r);var i=new gF;return i.reset(kh(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function kF(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[AF]=n+"px "+r+"px")}var OF={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function RF(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function NF(e){return wc(e)?IF[e]?"cubic-bezier("+IF[e]+")":qp(e)?e:"":""}function LF(e,t,n,r){var i=e.animators,o=i.length,a=[];if(e instanceof p_){var s=function(e,t,n){var r,i,o=e.shape.paths,a={};if(hc(o,(function(e){var t=MF(n.zrId);t.animation=!0,LF(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=vc(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var d in c){var p=c[d];a[d]=a[d]||{d:""},a[d].d+=p.d||""}for(var h in s){var f=s[h].animation;f.indexOf(i)>=0&&(r=f)}}})),r){t.d=!1;var s=RF(a,n);return r.replace(i,s)}}(e,t,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u<o;u++){var c=i[u],d=[c.getMaxTime()/1e3+"s"],p=NF(c.getClip().easing),h=c.getDelay();p?d.push(p):d.push("linear"),h&&d.push(h/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function g(i){var o,a=i[1],s=a.length,l={},u={},c={},d="animation-timing-function";function p(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),o=0;o<r.length;o++){var a=r[o];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var c=s[u],p=Math.round(c.time/i*100)+"%",h=NF(c.easing),f=c.rawValue;(wc(f)||Cc(f))&&(t[p]=t[p]||{},t[p][l]=c.rawValue,h&&(t[p][d]=h))}}}}for(var h=0;h<s;h++){(S=(w=a[h]).targetName)?"shape"===S&&p(w,u):!r&&p(w,l)}for(var f in l){var g={};Of(g,e),lc(g,l[f]);var m=Oh(g),v=l[f][d];c[f]=m?{transform:m}:{},kF(c[f],g),v&&(c[f][d]=v)}var y=!0;for(var f in u){c[f]=c[f]||{};var x=!o;v=u[f][d];x&&(o=new lv);var _=o.len();o.reset(),c[f].d=DF(e,u[f],o);var b=o.len();if(!x&&_!==b){y=!1;break}v&&(c[f][d]=v)}if(!y)for(var f in c)delete c[f].d;if(!r)for(h=0;h<s;h++){var w,S;"style"===(S=(w=a[h]).targetName)&&p(w,c,(function(e){return OF[e]}))}var C,T=vc(c),M=!0;for(h=1;h<T.length;h++){var E=T[h-1],I=T[h];if(c[E][AF]!==c[I][AF]){M=!1;break}C=c[E][AF]}if(M&&C){for(var f in c)c[f][AF]&&delete c[f][AF];t[AF]=C}if(mc(T,(function(e){return vc(c[e]).length>0})).length)return RF(c,n)+" "+i[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}var PF=Math.round;function BF(e){return e&&wc(e.src)}function jF(e){return e&&bc(e.toDataURL)}function FF(e,t,n,r){_F((function(i,o){var a="fill"===i||"stroke"===i;a&&Ah(o)?ZF(t,e,i,r):a&&Mh(o)?XF(n,e,i,r):e[i]=o}),t,n,!1),function(e,t,n){var r=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(r)){var i=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),o=n.shadowCache,a=o[i];if(!a){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,d=r.shadowOffsetY||0,p=r.shadowBlur,h=xh(r.shadowColor),f=h.opacity,g=h.color,m=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=CF("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[CF("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[i]=a}t.filter=Dh(a)}}(n,e,r)}function UF(e){return bh(e[0]-1)&&bh(e[1])&&bh(e[2])&&bh(e[3]-1)}function zF(e,t,n){if(t&&(!function(e){return bh(e[4])&&bh(e[5])}(t)||!UF(t))){var r=n?10:1e4;e.transform=UF(t)?"translate("+PF(t[4]*r)/r+" "+PF(t[5]*r)/r+")":function(e){return"matrix("+wh(e[0])+","+wh(e[1])+","+wh(e[2])+","+wh(e[3])+","+Sh(e[4])+","+Sh(e[5])+")"}(t)}}function HF(e,t,n){for(var r=e.points,i=[],o=0;o<r.length;o++)i.push(PF(r[o][0]*n)/n),i.push(PF(r[o][1]*n)/n);t.points=i.join(" ")}function VF(e){return!e.smooth}var WF,YF,GF={circle:[(WF=["cx","cy","r"],YF=fc(WF,(function(e){return"string"==typeof e?[e,e]:e})),function(e,t,n){for(var r=0;r<YF.length;r++){var i=YF[r],o=e[i[0]];null!=o&&(t[i[1]]=PF(o*n)/n)}})],polyline:[HF,VF],polygon:[HF,VF]};function qF(e,t){var n=e.style,r=e.shape,i=GF[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&kh(e)||4;if(!i||t.willUpdate||i[1]&&!i[1](r)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||l<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),h=e,f=h.__svgPathBuilder;h.__svgPathVersion===p&&f&&l===h.__svgPathStrokePercent||(f||(f=h.__svgPathBuilder=new gF),f.reset(u),d.rebuildPath(f,l),f.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);i[0](r,o,g)}return zF(o,e.transform),FF(o,n,e,t),t.animation&&LF(e,o,t),CF(s,e.id+"",o)}function QF(e,t){return e instanceof Av?qF(e,t):e instanceof Pv?function(e,t){var n=e.style,r=n.image;if(r&&!wc(r)&&(BF(r)?r=r.src:jF(r)&&(r=r.toDataURL())),r){var i=n.x||0,o=n.y||0,a={href:r,width:n.width,height:n.height};return i&&(a.x=i),o&&(a.y=o),zF(a,e.transform),FF(a,n,e,t),t.animation&&LF(e,a,t),CF("image",e.id+"",a)}}(e,t):e instanceof Ov?function(e,t){var n=e.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||zu,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,Ff(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":Ch[n.textAlign]||n.textAlign};if(Jv(n)){var l="",u=n.fontStyle,c=$v(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Uu,p=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),p&&"normal"!==p&&(l+="font-weight:"+p+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),zF(s,e.transform),FF(s,n,e,t),t.animation&&LF(e,s,t),CF("text",e.id+"",s,void 0,r)}}(e,t):void 0}function ZF(e,t,n,r){var i,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Eh(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Ih(o))return;i="radialGradient",a.cx=Oc(o.x,.5),a.cy=Oc(o.y,.5),a.r=Oc(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*Sh(s[u].offset)+"%",p=xh(s[u].color),h=p.color,f=p.opacity,g={offset:d};g["stop-color"]=h,f<1&&(g["stop-opacity"]=f),l.push(CF("stop",u+"",g))}var m=TF(CF(i,"",a,l)),v=r.gradientCache,y=v[m];y||(y=r.zrId+"-g"+r.gradientIdx++,v[m]=y,a.id=y,r.defs[y]=CF(i,y,a,l)),t[n]=Dh(y)}function XF(e,t,n,r){var i,o=e.style[n],a=e.getBoundingRect(),s={},l=o.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(Th(o)){var p=o.imageWidth,h=o.imageHeight,f=void 0,g=o.image;if(wc(g)?f=g:BF(g)?f=g.src:jF(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";Pc(p,m),Pc(h,m)}else if(null==p||null==h){var v=function(e,t){if(e){var n=e.elm,r=p||t.width,i=h||t.height;"pattern"===e.tag&&(c?(i=1,r/=a.width):d&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute("width",r),n.setAttribute("height",i))}},y=am(f,null,e,(function(e){u||v(w,e),v(i,e)}));y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}i=CF("image","img",{href:f,width:p,height:h}),s.width=p,s.height=h}else o.svgElement&&(i=ac(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(i){var x,_;u?x=_=1:c?(_=1,x=s.width/a.width):d?(x=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==_||isNaN(_)||(s.height=_);var b=Oh(o);b&&(s.patternTransform=b);var w=CF("pattern","",s,[i]),S=TF(w),C=r.patternCache,T=C[S];T||(T=r.zrId+"-p"+r.patternIdx++,C[S]=T,s.id=T,w=r.defs[T]=CF("pattern",T,s,[i])),t[n]=Dh(T)}}function $F(e,t,n){var r=n.clipPathCache,i=n.defs,o=r[e.id];if(!o){var a={id:o=n.zrId+"-c"+n.clipPathIdx++};r[e.id]=o,i[o]=CF("clipPath",o,a,[qF(e,n)])}t["clip-path"]=Dh(o)}function KF(e){return document.createTextNode(e)}function JF(e,t,n){e.insertBefore(t,n)}function eU(e,t){e.removeChild(t)}function tU(e,t){e.appendChild(t)}function nU(e){return e.parentNode}function rU(e){return e.nextSibling}function iU(e,t){e.textContent=t}var oU=CF("","");function aU(e){return void 0===e}function sU(e){return void 0!==e}function lU(e,t,n){for(var r={},i=t;i<=n;++i){var o=e[i].key;void 0!==o&&(r[o]=i)}return r}function uU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function cU(e){var t,n=e.children,r=e.tag;if(sU(r)){var i=e.elm=SF(r);if(hU(oU,e),_c(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&tU(i,cU(o))}else sU(e.text)&&!Tc(e.text)&&tU(i,KF(e.text))}else e.elm=KF(e.text);return e.elm}function dU(e,t,n,r,i){for(;r<=i;++r){var o=n[r];null!=o&&JF(e,cU(o),t)}}function pU(e,t,n,r){for(;n<=r;++n){var i=t[n];if(null!=i)if(sU(i.tag))eU(nU(i.elm),i.elm);else eU(e,i.elm)}}function hU(e,t){var n,r=t.elm,i=e&&e.attrs||{},o=t.attrs||{};if(i!==o){for(n in o){var a=o[n];i[n]!==a&&(!0===a?r.setAttribute(n,""):!1===a?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?r.setAttributeNS(wF,n,a):r.setAttribute(n,a))}for(n in i)n in o||r.removeAttribute(n)}}function fU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(hU(e,t),aU(t.text)?sU(r)&&sU(i)?r!==i&&function(e,t,n){for(var r,i,o,a=0,s=0,l=t.length-1,u=t[0],c=t[l],d=n.length-1,p=n[0],h=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==p?p=n[++s]:null==h?h=n[--d]:uU(u,p)?(fU(u,p),u=t[++a],p=n[++s]):uU(c,h)?(fU(c,h),c=t[--l],h=n[--d]):uU(u,h)?(fU(u,h),JF(e,u.elm,rU(c.elm)),u=t[++a],h=n[--d]):uU(c,p)?(fU(c,p),JF(e,c.elm,u.elm),c=t[--l],p=n[++s]):(aU(r)&&(r=lU(t,a,l)),aU(i=r[p.key])||(o=t[i]).tag!==p.tag?JF(e,cU(p),u.elm):(fU(o,p),t[i]=void 0,JF(e,o.elm,u.elm)),p=n[++s]);(a<=l||s<=d)&&(a>l?dU(e,null==n[d+1]?null:n[d+1].elm,n,s,d):pU(e,t,a,l))}(n,r,i):sU(i)?(sU(e.text)&&iU(n,""),dU(n,null,i,0,i.length-1)):sU(r)?pU(n,r,0,r.length-1):sU(e.text)&&iU(n,""):e.text!==t.text&&(sU(r)&&pU(n,r,0,r.length-1),iU(n,t.text)))}var gU=0,mU=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=t,this._opts=n=lc({},n),this.root=e,this._id="zr"+gU++,this._oldVNode=EF(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=SF("svg");hU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(uU(e,t))fU(e,t);else{var n=e.elm,r=nU(n);cU(t),null!==r&&(JF(r,t.elm,rU(n)),pU(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return QF(e,MF(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=MF(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress;var o=[],a=this._bgVNode=function(e,t,n,r){var i;if(n&&"none"!==n)if(i=CF("rect","bg",{width:e,height:t,x:"0",y:"0",id:"0"}),Ah(n))ZF({fill:n},i.attrs,"fill",r);else if(Mh(n))XF({style:{fill:n},dirty:Qc,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",r);else{var o=xh(n),a=o.color,s=o.opacity;i.attrs.fill=a,s<1&&(i.attrs["fill-opacity"]=s)}return i}(n,r,this._backgroundColor,i);a&&o.push(a);var s=e.compress?null:this._mainVNode=CF("g","main",{},[]);this._paintList(t,i,s?s.children:o),s&&o.push(s);var l=fc(vc(i.defs),(function(e){return i.defs[e]}));if(l.length&&o.push(CF("defs","defs",{},l)),e.animation){var u=function(e,t,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=fc(vc(e),(function(t){return t+i+fc(vc(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+o})).join(r),s=fc(vc(t),(function(e){return"@keyframes "+e+i+fc(vc(t[e]),(function(n){return n+i+fc(vc(t[e][n]),(function(r){var i=t[e][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=CF("style","stl",{},[],u);o.push(c)}}return EF(n,r,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},TF(this.renderToVNode({animation:Oc(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Oc(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,i,o=e.length,a=[],s=0,l=0,u=0;u<o;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,p=d&&d.length||0,h=i&&i.length||0,f=void 0;for(f=Math.max(p-1,h-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var g=h-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<p;m++){var v={};$F(d[m],v,t);var y=CF("g","clip-g-"+l++,v,[]);(r?r.children:n).push(y),a[s++]=y,r=y}i=d;var x=QF(c,t);x&&(r?r.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),r&&i&&(i.style.display="none",e=UM(r,0,n),t=UM(r,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(Mh(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=Rh(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();var vU=mU;function yU(e,t,n){var r=Yu.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var xU=function(e){function t(t,n,r){var i,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||_f,"string"==typeof t?i=yU(t,n,r):Tc(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(Gc(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return j(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=yU("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new Kd(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new Kd(0,0,0,0)).copy(e),o.push(t)}else{for(var t,n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var d=new Kd(0,0,0,0);d.copy(c),d.union(e),o[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var p=e.width*e.height,h=c.width*c.height,f=l.width*l.height-p-h;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n)(t=new Kd(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(h=e[c]){var d=h.shouldBePainted(n,r,!0,!0);(f=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null)&&u(f);var p=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null;p&&u(p)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h,f;d=(h=t[c]).shouldBePainted(n,r,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered)(f=h.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(i=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(i);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/u,a/u));var d=this.domBack;function p(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;if(Ac(t))a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||jM(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o;else null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=QM(i,t,{dirty:function(){c.setUnpainted(),c.__painter.refresh()}}));i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(d,e,n,r,o),i.restore())}!n||s?p(0,0,o,a):n.length&&hc(n,(function(e){p(e.x*u,e.y*u,e.width*u,e.height*u)}))},t}(pd),_U=xU,bU=1e5,wU=314159,SU=.01;var CU=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=lc({},n||{}),this.dpr=n.devicePixelRatio||_f,this._singleCanvas=i,this.root=e,e.style&&(Gc(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var s=e,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new _U(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=wU,o.push(wU),this._domRoot=e}else{this._width=UM(e,0,n),this._height=UM(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<t;o++){var a=e[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(bU)),r||(r=n.ctx).save(),rE(r,a,i,o===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(bU)},e.prototype.paintOne=function(e,t){nE(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer((function(e){e.afterBrush&&e.afterBrush()}));else{var s=this;bp((function(){s._paintList(e,t,n,r)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(wU).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&i.push(l)}for(var u=!0,c=!1,d=function(a){var s,l=i[a],d=l.ctx,h=o&&l.createRepaintRects(e,t,p._width,p._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,h);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,h)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var i=e[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(h)if(0===h.length)s=l.__endIndex;else for(var _=p.dpr,b=0;b<h.length;++b){var w=h[b];d.save(),d.beginPath(),d.rect(w.x*_,w.y*_,w.width*_,w.height*_),d.clip(),x(w),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},p=this,h=0;h<i.length;h++)d(h);return Fu.wxa&&hc(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,i,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(rE(a,e,i,o),e.setPrevPaintRect(s))}else rE(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=wU);var n=this._layers[e];return n||((n=new _U("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?sc(n,this._layerConfig[e],!0):this._layerConfig[e-SU]&&sc(n,this._layerConfig[e-SU],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(t.dom,l.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){o&&(o.__endIndex!==e&&(o.__dirty=!0),o.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,i,o=null,a=0;for(i=0;i<e.length;i++){var s,l=(s=e[i]).zlevel,u=void 0;r!==l&&(r=l,a=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?SU:0),this._needsManuallyCompositing),u.__builtin__||oc("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,t(i),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,hc(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?sc(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===e||i===e+SU)sc(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(cc(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=UM(i,0,r),t=UM(i,1,r),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(wU).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new _U("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];rE(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),TU=CU;function MU(e){var n=t.useRef();return t.useEffect((function(){n.current=e}),[e]),n.current}dD([rB,fP,BB,uN,aj,Lj,uF,function(e){e.registerPainter("canvas",TU)},eB]);var EU=(null===window||void 0===window?void 0:window.outerWidth)>1728?550:470,IU=(null===window||void 0===window?void 0:window.outerWidth)>1728?680:590,AU=r.makeStyles((function(){return{outlierOnlyButton:{borderRadius:"8px"},metricPanel:{position:"relative"},overideMuiSelect:{"& .MuiInput-input":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},"& .MuiInput-root":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"}},overrideDefaultMuiSelect:{maxHeight:"300px","& .MuiInput-root":{height:"32px"}},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},menuItem:{fontWeight:300,fontSize:"14px",padding:"15px 20px",height:"52px"},outlierButtonContainer:{position:"absolute",top:"8px",right:"8px",zIndex:2,pointerEvents:"auto",display:"flex"},prometheusIcon:{position:"absolute",top:"15px",right:"15px",marginLeft:"17px",marginTop:"5px"}}})),DU=C.default.memo((function(n){var i,o,a=n.metricData,s=n.appName,l=n.metricKey,u=n.metricMeasure,c=n.operations,d=n.groupByOperations;n.height;var p=n.timezone,h=n.graphTitle,f=n.graphType,g=n.queryData,m=n.dateTimeRange,v=n.isHistoricalQueryView,y=n.showTitle,x=void 0===y||y,_=n.onEChartsDateSelect,b=n.onSelectAshLabel,w=n.registerChartInstance,S=AU(),C=c,T="".concat("echart-").concat(l),M=t.useState(null==d?void 0:d[0]),E=M[0],I=M[1],A=t.useState(null==C?void 0:C[0]),D=A[0],k=A[1],O=t.useState("undefined"!=typeof window?window.innerWidth:1280),R=O[0],N=O[1],L=t.useState([]),P=L[0],B=L[1],j=t.useRef(P),U=t.useRef(null),z=t.useRef(null),H=MU(a),W=t.useCallback((function(){var e,t,n=f===exports.GraphType.SINGLE_SUPPORTING||f===exports.GraphType.MAIN_RCA,r=null===(t=null===(e=U.current)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement,i=r?r.clientWidth:R;if(n)return Math.max(.99*i,250);var o=Math.floor(i/500),a=16*((o=Math.max(1,o))-1),l=Math.floor((i-a)/o);return Math.max(Math.min(l,EU),s===exports.AppName.YBM?IU:490)}),[f,R]),G=t.useCallback((function(e){var t,n,r,i,o,l,d,f=kO(a,5),v=x?null!=h?h:null===(t=f.layout)||void 0===t?void 0:t.title:"";if(!Ka(f)||!$a(f.data))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:v,left:16,top:16,textStyle:{fontWeight:600,fontFamily:rl,fontSize:15,color:"#0B1117"}},legend:{data:[]},graphic:[{type:"text",left:"center",top:"50%",style:{text:"No Data Available",fontSize:11.5,fontWeight:600,fill:"#0B1117"}}]};var y=u===exports.MetricMeasure.OUTLIER,_=u===exports.MetricMeasure.OUTLIER_TABLES,b=u===exports.MetricMeasure.OUTLIER_DB,w=null!=e?e:null==c?void 0:c[0];((null==c?void 0:c.length)||e)&&(y||_||b)&&(f.data=f.data.filter((function(e){return(null==e?void 0:e.name)===w})));var S=null!==(o=null===(i=null===(r=null===(n=f.layout)||void 0===n?void 0:n.yaxis)||void 0===r?void 0:r.ticksuffix)||void 0===i?void 0:i.replace(/(&nbsp;|\s)+/g,""))&&void 0!==o?o:null,C=0,T=f.data.map((function(e,t){var n,r,i,o,a,s,l,c,d,h,m,v=e.name;if(e.instanceName&&e.name!==e.instanceName)v="".concat(e.name," (").concat(e.instanceName,")"),u===exports.MetricMeasure.OUTLIER&&(v=e.instanceName);else if(u!==exports.MetricMeasure.OUTLIER||e.instanceName||e.global){if(_)v=e.tableName;else if(b)v=e.dbName;else if((null===(n=null==f?void 0:f.layout)||void 0===n?void 0:n.type)===el&&u===exports.MetricMeasure.OVERALL&&(null===(o=null===(i=null===(r=null==f?void 0:f.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0])===exports.WaitEventClassification.QUERY_ID){var y=null==g?void 0:g.find((function(t){return t.id.queryId===e.name}));v=null==y?void 0:y.query}}else v=ol.NODE_AVERAGE;var x=v,w=(null==v?void 0:v.length)>30;(null===(a=null==f?void 0:f.layout)||void 0===a?void 0:a.type)===el&&u===exports.MetricMeasure.OVERALL&&(null===(c=null===(l=null===(s=null==f?void 0:f.layout)||void 0===s?void 0:s.metadata)||void 0===l?void 0:l.currentGroupBy)||void 0===c?void 0:c[0])===exports.WaitEventClassification.QUERY_ID?x=(null==v?void 0:v.substring(0,30))+"...":w&&u!==exports.MetricMeasure.OUTLIER?x=v.substring(0,30)+"...":u!==exports.MetricMeasure.OUTLIER||e.global?_?x=e.namespaceName?"".concat(e.namespaceName,".").concat(e.tableName):e.tableName:b&&(x=e.namespaceName):x=e.instanceName?"".concat(e.instanceName," (").concat(e.name,")"):ol.NODE_AVERAGE;var S=e.x.map((function(t,n){return[t,e.y[n]]})),C=(null===(d=null==f?void 0:f.layout)||void 0===d||d.type,S);return F(F({name:x,fullname:v,type:(null===(h=null==f?void 0:f.layout)||void 0===h?void 0:h.type)===el?"bar":"line",data:C,color:Ql[t%Ql.length]},e.name===ol.NODE_AVERAGE?{lineStyle:{type:"dashed"}}:{}),{tooltip:{formatter:function(e){var t=e.value[1],n=new Date(e.value[0]).toLocaleString(void 0,{timeZone:p});return"".concat(e.seriesName,": ").concat(t.toFixed(2)," at ").concat(n)}},stack:(null===(m=null==f?void 0:f.layout)||void 0===m?void 0:m.type)===el?"total":void 0,smooth:!1,showSymbol:!1})}));Ka(null===(l=f.layout)||void 0===l?void 0:l.yaxis)&&"µs"===S&&$a(f.data)&&ns(f.data)&&(T.forEach((function(e){e.data=e.data.map((function(e){return[e[0],e[1]/1e3]}))})),S="ms");var M=0;T.forEach((function(e){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>M&&(M=t)}));C=1.5*M,(null===(d=null==f?void 0:f.layout)||void 0===d?void 0:d.type)===el&&(C=3.5*M),0===C&&(C=1.01);var E={title:{text:s!==exports.AppName.YBA&&S?"".concat(v," (").concat(S,")"):v,left:16,top:16,textStyle:{fontWeight:600,fontFamily:rl,fontSize:15,color:"#0B1117"}},tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"shadow",shadowStyle:{color:"#E9EEF2"},lineStyle:{color:"#E9EEF2",width:1}},textStyle:{fontFamily:rl,fontSize:13,lineHeight:16,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; box-shadow:none;",formatter:function(e){var t,n=(null===(t=e[0])||void 0===t?void 0:t.axisValue)||"",r=new Date(n),i=Oa(p?Ra(r,p):r,"MMM d HH:mm (zzz)",{timeZone:null!=p?p:void 0}),o=e.map((function(e){var t=e.value[1],n=ku(e.color,e.seriesName),r=Ou(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(i,'</b><br/><span style="margin-top: 16px;">').concat(o,"</span></div>")}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:{left:"3%",right:"4%",bottom:"20%",containLabel:!0,top:"22%"},xAxis:{type:"time",boundaryGap:!1,splitNumber:6,axisLabel:{color:"#6D7C88",textStyle:{fontFamily:rl,fontSize:11.5},interval:"auto",formatter:function(e){var t,n=new Date(e),r=(t=m.startDateTime,(m.endDateTime-t)/864e5);return Oa(n,r>5?"MM/dd":r>2&&r<=5?"MM/dd, HH:mm":"HH:mm")}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}}},yAxis:{type:"value",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:rl,fontSize:11.5},formatter:function(e){return"".concat(null==e?void 0:e.toFixed(2)," ").concat(null!=S?S:"")}},axisLine:{lineStyle:{color:"#6D7C88"}},axisPointer:{label:{show:!1}},min:0,max:C},series:T,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0},legend:{type:T.length>3?"scroll":"plain",orient:"horizontal",textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#6D7C88",fontFamily:rl},symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,bottom:10,data:T.filter((function(e){return e&&e.name})).slice(0,8).map((function(e){return e.name}))}};return E}),[s,m,h,a,u,c,g,x,p]),q=function(e){var t,n,r,i,o;null===(t=null==e?void 0:e.current)||void 0===t||t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}});var a=!1,s=null;null===(r=null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getZr())||void 0===r||r.on("mousedown",(function(t){var n,r,i=[t.offsetX,t.offsetY],o=null===(n=e.current)||void 0===n?void 0:n.convertFromPixel({seriesIndex:0},i);s=null!==(r=null==o?void 0:o[0])&&void 0!==r?r:null,a=!0})),null===(o=null===(i=null==e?void 0:e.current)||void 0===i?void 0:i.getZr())||void 0===o||o.on("mouseup",(function(t){var n;if(a){var r=[t.offsetX,t.offsetY],i=null===(n=e.current)||void 0===n?void 0:n.convertFromPixel({seriesIndex:0},r),o=null==i?void 0:i[0];if(null!==s&&null!==o&&Math.abs(o-s)>10){var l=Math.min(s,o),u=Math.max(s,o);_(l,u)}}a=!1}))},Q=t.useCallback((function(){var e;if(U.current){z.current||(z.current=oI(U.current,"light",{renderer:"canvas"})),w&&w(z.current);var t=G(D);z.current.setOption(t,!0),f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==U?void 0:U.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),q(z)})):(null===(e=z.current)||void 0===e||e.resize({width:W()}),q(z)),function(e){var t;null===(t=null==e?void 0:e.current)||void 0===t||t.on("legendselectchanged",(function(t){var n,r,i=t.name,o=V([],j.current,!0),a=null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getOption(),s=((null==a?void 0:a.legend)&&Array.isArray(a.legend)&&(null===(r=a.legend[0])||void 0===r?void 0:r.data)?a.legend[0].data:[]).map((function(e){return"string"==typeof e?e:e.name}));o=0===j.current.length||j.current.length===s.length?[i]:j.current.includes(i)?j.current.filter((function(e){return e!==i})):V(V([],j.current,!0),[i],!1),s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:o.includes(t)?"legendSelect":"legendUnSelect",name:t})})),B(o)}))}(z)}}),[D,G,W]);t.useEffect((function(){var e=function(){return N(window.innerWidth)};return window.addEventListener("resize",e),Q(),function(){window.removeEventListener("resize",e),z.current&&(z.current.dispose(),z.current=null)}}),[Q]),t.useEffect((function(){j.current=P}),[P]),t.useEffect((function(){var e;if(z.current){var t=G(D);z.current.setOption(t,!0),f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==U?void 0:U.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0}),q(z)})):(null===(e=z.current)||void 0===e||e.resize({width:W()}),q(z))}}),[a,H,D,E,W,G]);t.useEffect((function(){var e;z.current&&(f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=z.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==U?void 0:U.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=z.current)||void 0===e||e.resize({width:W()}))}),[R,W]);var Z=D||(null==c?void 0:c[0]);return e.jsxs(r.Box,F({id:l,onClick:function(e){return e.stopPropagation()},className:S.metricPanel},{children:[e.jsxs("span",F({className:S.outlierButtonContainer},{children:[(null===(i=null==a?void 0:a.layout)||void 0===i?void 0:i.type)===el&&(u===exports.MetricMeasure.OUTLIER||u===exports.MetricMeasure.OUTLIER_TABLES||u===exports.MetricMeasure.OUTLIER_DB||v)&&$a(d)&&e.jsx(r.Box,F({ml:2,mr:2},{children:e.jsx(lr,F({value:E,className:Y(S.outlierOnlyButton,S.overrideDefaultMuiSelect,S.overrideDefaultMuiFormControl)},{children:null==d?void 0:d.map((function(t,n){return e.jsx(r.MenuItem,F({value:t,onClick:function(e){!function(e){var t;I(e),(null===(t=null==a?void 0:a.layout)||void 0===t?void 0:t.type)!==el||u!==exports.MetricMeasure.OUTLIER&&u!==exports.MetricMeasure.OUTLIER_TABLES&&u!==exports.MetricMeasure.OUTLIER_DB&&!v||null==b||b(e,a,!!v)}(t),e.stopPropagation()}},{children:t}),n)}))}))})),$a(C)&&((null===(o=null==a?void 0:a.layout)||void 0===o?void 0:o.type)===el||(null==C?void 0:C.length)>1)&&e.jsx(lr,F({value:D,className:Y(S.outlierOnlyButton,S.overrideDefaultMuiSelect,S.overrideDefaultMuiFormControl)},{children:null==C?void 0:C.map((function(t,n){return e.jsx(r.MenuItem,F({className:Y(t===Z&&S.overideMuiSelect,S.menuItem),value:t,onClick:function(e){!function(e){var t;if(k(e),(null===(t=null==a?void 0:a.layout)||void 0===t?void 0:t.type)===el&&u===exports.MetricMeasure.OVERALL&&$a(c)&&(null==b||b(e,a,!!v)),z.current){var n=G(e);z.current.setOption(n,!0)}}(t),e.stopPropagation()}},{children:t}),"".concat(t,"-").concat(n))}))}))]})),e.jsx("div",{ref:U,id:T,style:{overflow:"hidden",position:"relative",zIndex:1,minHeight:s===exports.AppName.WEB?320:340,width:"100%",minWidth:0}})]}))})),kU={exports:{}},OU=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},RU=OU,NU=Object.prototype.toString;function LU(e){return"[object Array]"===NU.call(e)}function PU(e){return void 0===e}function BU(e){return null!==e&&"object"==typeof e}function jU(e){if("[object Object]"!==NU.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function FU(e){return"[object Function]"===NU.call(e)}function UU(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),LU(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var zU={isArray:LU,isArrayBuffer:function(e){return"[object ArrayBuffer]"===NU.call(e)},isBuffer:function(e){return null!==e&&!PU(e)&&null!==e.constructor&&!PU(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:BU,isPlainObject:jU,isUndefined:PU,isDate:function(e){return"[object Date]"===NU.call(e)},isFile:function(e){return"[object File]"===NU.call(e)},isBlob:function(e){return"[object Blob]"===NU.call(e)},isFunction:FU,isStream:function(e){return BU(e)&&FU(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:UU,merge:function e(){var t={};function n(n,r){jU(t[r])&&jU(n)?t[r]=e(t[r],n):jU(n)?t[r]=e({},n):LU(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)UU(arguments[r],n);return t},extend:function(e,t,n){return UU(t,(function(t,r){e[r]=n&&"function"==typeof t?RU(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},HU=zU;function VU(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var WU=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(HU.isURLSearchParams(t))r=t.toString();else{var i=[];HU.forEach(t,(function(e,t){null!=e&&(HU.isArray(e)?t+="[]":e=[e],HU.forEach(e,(function(e){HU.isDate(e)?e=e.toISOString():HU.isObject(e)&&(e=JSON.stringify(e)),i.push(VU(t)+"="+VU(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},YU=zU;function GU(){this.handlers=[]}GU.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},GU.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},GU.prototype.forEach=function(e){YU.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var qU,QU,ZU,XU,$U,KU,JU,ez,tz,nz,rz,iz,oz,az,sz,lz,uz,cz,dz=GU,pz=zU,hz=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};function fz(){if(QU)return qU;QU=1;var e=hz;return qU=function(t,n,r,i,o){var a=new Error(t);return e(a,n,r,i,o)},qU}function gz(){if(XU)return ZU;XU=1;var e=fz();return ZU=function(t,n,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?n(e("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}}function mz(){if(KU)return $U;KU=1;var e=zU;return $U=e.isStandardBrowserEnv()?{write:function(t,n,r,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),e.isString(i)&&s.push("path="+i),e.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},$U}function vz(){return ez?JU:(ez=1,JU=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function yz(){return nz?tz:(nz=1,tz=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function xz(){if(iz)return rz;iz=1;var e=vz(),t=yz();return rz=function(n,r){return n&&!e(r)?t(n,r):r}}function _z(){if(az)return oz;az=1;var e=zU,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return oz=function(n){var r,i,o,a={};return n?(e.forEach(n.split("\n"),(function(n){if(o=n.indexOf(":"),r=e.trim(n.substr(0,o)).toLowerCase(),i=e.trim(n.substr(o+1)),r){if(a[r]&&t.indexOf(r)>=0)return;a[r]="set-cookie"===r?(a[r]?a[r]:[]).concat([i]):a[r]?a[r]+", "+i:i}})),a):a}}function bz(){if(lz)return sz;lz=1;var e=zU;return sz=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(n){var r=e.isString(n)?i(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}var wz,Sz,Cz,Tz,Mz,Ez={exports:{}},Iz={exports:{}},Az={exports:{}};function Dz(){if(Sz)return wz;Sz=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return wz=function(s,l){l=l||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*i;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(s);if("number"===u&&isFinite(s))return l.long?function(i){var o=Math.abs(i);if(o>=r)return a(i,o,r,"day");if(o>=n)return a(i,o,n,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},wz}function kz(){if(Tz)return Cz;return Tz=1,Cz=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Dz(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},Cz}var Oz,Rz,Nz,Lz,Pz,Bz,jz,Fz,Uz,zz={exports:{}};function Hz(){return Rz?Oz:(Rz=1,Oz=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function Vz(){return Pz||(Pz=1,function(e,t){const n=O.default,r=R.default;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(Lz)return Nz;Lz=1;const e=N.default,t=O.default,n=Hz(),{env:r}=process;let i;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(t,o){if(0===i)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===i)return 0;const a=i||0;if("dumb"===r.TERM)return a;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?i=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(i=1),"FORCE_COLOR"in r&&(i="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),Nz={supportsColor:function(e){return o(a(e,e&&e.isTTY))},stdout:o(a(!0,t.isatty(1))),stderr:o(a(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=kz()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(zz,zz.exports)),zz.exports}function Wz(){return Bz||(Bz=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Iz.exports=(Mz||(Mz=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=kz()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Az,Az.exports)),Az.exports):Iz.exports=Vz()),Iz.exports}function Yz(){if(Uz)return Ez.exports;Uz=1;var e,t,n,r=A.default,i=r.URL,o=E.default,a=I.default,s=D.default.Writable,l=k.default,u=function(){return Fz||(Fz=1,jz=function(){if(!e){try{e=Wz()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),jz;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=L(Error.captureStackTrace),e||!t&&n||console.warn("The follow-redirects package should be excluded from browser builds.");var c=!1;try{l(new i(""))}catch(e){c="ERR_INVALID_URL"===e.code}var d=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],p=["abort","aborted","connect","error","socket","timeout"],h=Object.create(null);p.forEach((function(e){h[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var f=O("ERR_INVALID_URL","Invalid URL",TypeError),g=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",g),v=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),y=O("ERR_STREAM_WRITE_AFTER_END","write after end"),x=s.prototype.destroy||w;function _(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof g?e:new g({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var o=r+":",a=n[o]=e[r],s=t[r]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,r,a){var s;return s=e,i&&s instanceof i?e=T(e):N(e)?e=T(S(e)):(a=r,r=C(e),e={protocol:o}),L(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,N(r.host)||N(r.hostname)||(r.hostname="::1"),l.equal(r.protocol,o,"protocol mismatch"),u("options",r),new _(r,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=s.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function w(){}function S(e){var t;if(c)t=new i(e);else if(!N((t=C(r.parse(e))).protocol))throw new f({input:e});return t}function C(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new f({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new f({input:e.href||e});return e}function T(e,t){var n=t||{};for(var r of d)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function M(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function O(e,t,n){function r(n){L(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function R(e,t){for(var n of p)e.removeListener(n,h[n]);e.on("error",w),e.destroy(t)}function N(e){return"string"==typeof e||e instanceof String}function L(e){return"function"==typeof e}return _.prototype=Object.create(s.prototype),_.prototype.abort=function(){R(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_.prototype.destroy=function(e){return R(this._currentRequest,e),x.call(this,e),this},_.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!N(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;L(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new v),this.abort()):n&&n()},_.prototype.end=function(e,t,n){if(L(e)?(n=e,e=t=null):L(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},_.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){_.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(_.prototype,e,{get:function(){return this._currentRequest[e]}})})),_.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(i._redirectable=this,p))i.on(o,h[o]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,l=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(a<l.length){var n=l[a++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()}()}},_.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,o=e.headers.location;if(!o||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(R(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],M(/^content-/i,this._options.headers));var d=M(/^host$/i,this._options.headers),p=S(this._currentUrl),h=d||p.host,f=/^\w+:/.test(o)?this._currentUrl:r.format(Object.assign(p,{host:h})),g=function(e,t){return c?new i(e,t):S(r.resolve(t,e))}(o,f);if(u("redirecting to",g.href),this._isRedirect=!0,T(g,this._options),(g.protocol!==p.protocol&&"https:"!==g.protocol||g.host!==h&&!function(e,t){l(N(e)&&N(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(g.host,h))&&M(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),L(a)){var v={headers:e.headers,statusCode:t},y={url:f,method:s,headers:n};a(this._options,v,y),this._sanitizeOptions(this._options)}this._performRequest()},Ez.exports=b({http:o,https:a}),Ez.exports.wrap=b,Ez.exports}var Gz,qz,Qz={name:"axios",version:"0.21.3",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};function Zz(){if(qz)return Gz;qz=1;var e=zU,t=gz(),n=xz(),r=WU,i=E.default,o=I.default,a=Yz().http,s=Yz().https,l=A.default,u=L.default,c=Qz,d=fz(),p=hz,h=/https:?/;function f(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,f(e,t,e.href)}}return Gz=function(g){return new Promise((function(m,v){var y=function(e){m(e)},x=function(e){v(e)},_=g.data,b=g.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+c.version,_&&!e.isStream(_)){if(Buffer.isBuffer(_));else if(e.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else{if(!e.isString(_))return x(d("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",g));_=Buffer.from(_,"utf-8")}b["Content-Length"]=_.length}var w=void 0;g.auth&&(w=(g.auth.username||"")+":"+(g.auth.password||""));var S=n(g.baseURL,g.url),C=l.parse(S),T=C.protocol||"http:";if(!w&&C.auth){var M=C.auth.split(":");w=(M[0]||"")+":"+(M[1]||"")}w&&delete b.Authorization;var E=h.test(T),I=E?g.httpsAgent:g.httpAgent,A={path:r(C.path,g.params,g.paramsSerializer).replace(/^\?/,""),method:g.method.toUpperCase(),headers:b,agent:I,agents:{http:g.httpAgent,https:g.httpsAgent},auth:w};g.socketPath?A.socketPath=g.socketPath:(A.hostname=C.hostname,A.port=C.port);var D,k=g.proxy;if(!k&&!1!==k){var O=T.slice(0,-1)+"_proxy",R=process.env[O]||process.env[O.toUpperCase()];if(R){var N=l.parse(R),L=process.env.no_proxy||process.env.NO_PROXY,P=!0;if(L)P=!L.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&C.hostname.substr(C.hostname.length-e.length)===e||C.hostname===e))}));if(P&&(k={host:N.hostname,port:N.port,protocol:N.protocol},N.auth)){var B=N.auth.split(":");k.auth={username:B[0],password:B[1]}}}}k&&(A.headers.host=C.hostname+(C.port?":"+C.port:""),f(A,k,T+"//"+C.hostname+(C.port?":"+C.port:"")+A.path));var j=E&&(!k||h.test(k.protocol));g.transport?D=g.transport:0===g.maxRedirects?D=j?o:i:(g.maxRedirects&&(A.maxRedirects=g.maxRedirects),D=j?s:a),g.maxBodyLength>-1&&(A.maxBodyLength=g.maxBodyLength);var F=D.request(A,(function(n){if(!F.aborted){var r=n,i=n.req||F;if(204!==n.statusCode&&"HEAD"!==i.method&&!1!==g.decompress)switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(u.createUnzip()),delete n.headers["content-encoding"]}var o={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:g,request:i};if("stream"===g.responseType)o.data=r,t(y,x,o);else{var a=[],s=0;r.on("data",(function(e){a.push(e),s+=e.length,g.maxContentLength>-1&&s>g.maxContentLength&&(r.destroy(),x(d("maxContentLength size of "+g.maxContentLength+" exceeded",g,null,i)))})),r.on("error",(function(e){F.aborted||x(p(e,g,null,i))})),r.on("end",(function(){var n=Buffer.concat(a);"arraybuffer"!==g.responseType&&(n=n.toString(g.responseEncoding),g.responseEncoding&&"utf8"!==g.responseEncoding||(n=e.stripBOM(n))),o.data=n,t(y,x,o)}))}}}));if(F.on("error",(function(e){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||x(p(e,g,null,F))})),g.timeout){var U=parseInt(g.timeout,10);if(isNaN(U))return void x(d("error trying to parse `config.timeout` to int",g,"ERR_PARSE_TIMEOUT",F));F.setTimeout(U,(function(){F.abort(),x(d("timeout of "+U+"ms exceeded",g,g.transitional&&g.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}g.cancelToken&&g.cancelToken.promise.then((function(e){F.aborted||(F.abort(),x(e))})),e.isStream(_)?_.on("error",(function(e){x(p(e,g,null,F))})).pipe(F):F.end(_)}))}}var Xz=zU,$z=function(e,t){pz.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Kz=hz,Jz={"Content-Type":"application/x-www-form-urlencoded"};function eH(e,t){!Xz.isUndefined(e)&&Xz.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var tH,nH={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?tH=function(){if(cz)return uz;cz=1;var e=zU,t=gz(),n=mz(),r=WU,i=xz(),o=_z(),a=bz(),s=fz();return uz=function(l){return new Promise((function(u,c){var d=l.data,p=l.headers,h=l.responseType;e.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var g=l.auth.username||"",m=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";p.Authorization="Basic "+btoa(g+":"+m)}var v=i(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,n={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:e,config:l,request:f};t(u,c,n),f=null}}if(f.open(l.method.toUpperCase(),r(v,l.params,l.paramsSerializer),!0),f.timeout=l.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(c(s("Request aborted",l,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(s("Network Error",l,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+l.timeout+"ms exceeded";l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),c(s(e,l,l.transitional&&l.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var x=(l.withCredentials||a(v))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;x&&(p[l.xsrfHeaderName]=x)}"setRequestHeader"in f&&e.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),h&&"json"!==h&&(f.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&f.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",l.onUploadProgress),l.cancelToken&&l.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),d||(d=null),f.send(d)}))}}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(tH=Zz()),tH),transformRequest:[function(e,t){return $z(t,"Accept"),$z(t,"Content-Type"),Xz.isFormData(e)||Xz.isArrayBuffer(e)||Xz.isBuffer(e)||Xz.isStream(e)||Xz.isFile(e)||Xz.isBlob(e)?e:Xz.isArrayBufferView(e)?e.buffer:Xz.isURLSearchParams(e)?(eH(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Xz.isObject(e)||t&&"application/json"===t["Content-Type"]?(eH(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&Xz.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw Kz(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};nH.headers={common:{Accept:"application/json, text/plain, */*"}},Xz.forEach(["delete","get","head"],(function(e){nH.headers[e]={}})),Xz.forEach(["post","put","patch"],(function(e){nH.headers[e]=Xz.merge(Jz)}));var rH,iH,oH=nH,aH=zU,sH=oH;function lH(){return iH?rH:(iH=1,rH=function(e){return!(!e||!e.__CANCEL__)})}var uH=zU,cH=function(e,t,n){var r=this||sH;return aH.forEach(n,(function(n){e=n.call(r,e,t)})),e},dH=lH(),pH=oH;function hH(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var fH=zU,gH=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return fH.isPlainObject(e)&&fH.isPlainObject(t)?fH.merge(e,t):fH.isPlainObject(t)?fH.merge({},t):fH.isArray(t)?t.slice():t}function l(r){fH.isUndefined(t[r])?fH.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}fH.forEach(r,(function(e){fH.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),fH.forEach(i,l),fH.forEach(o,(function(r){fH.isUndefined(t[r])?fH.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),fH.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var u=r.concat(i).concat(o).concat(a),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return fH.forEach(c,l),n},mH=Qz,vH={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){vH[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var yH={},xH=mH.version.split(".");function _H(e,t){for(var n=t?t.split("."):xH,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}vH.transitional=function(e,t,n){var r=t&&_H(t);function i(e,t){return"[Axios v"+mH.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,a){if(!1===e)throw new Error(i(o," has been removed in "+t));return r&&!yH[o]&&(yH[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var bH,wH,SH,CH,TH,MH,EH,IH,AH={isOlderVersion:_H,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:vH},DH=zU,kH=WU,OH=dz,RH=function(e){return hH(e),e.headers=e.headers||{},e.data=cH.call(e,e.data,e.headers,e.transformRequest),e.headers=uH.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),uH.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||pH.adapter)(e).then((function(t){return hH(e),t.data=cH.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return dH(t)||(hH(e),t&&t.response&&(t.response.data=cH.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},NH=gH,LH=AH,PH=LH.validators;function BH(e){this.defaults=e,this.interceptors={request:new OH,response:new OH}}function jH(){if(wH)return bH;function e(e){this.message=e}return wH=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,bH=e}BH.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=NH(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&LH.assertOptions(t,{silentJSONParsing:PH.transitional(PH.boolean,"1.0.0"),forcedJSONParsing:PH.transitional(PH.boolean,"1.0.0"),clarifyTimeoutError:PH.transitional(PH.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var a=[RH,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),i=Promise.resolve(e);a.length;)i=i.then(a.shift(),a.shift());return i}for(var s=e;n.length;){var l=n.shift(),u=n.shift();try{s=l(s)}catch(e){u(e);break}}try{i=RH(s)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},BH.prototype.getUri=function(e){return e=NH(this.defaults,e),kH(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},DH.forEach(["delete","get","head","options"],(function(e){BH.prototype[e]=function(t,n){return this.request(NH(n||{},{method:e,url:t,data:(n||{}).data}))}})),DH.forEach(["post","put","patch"],(function(e){BH.prototype[e]=function(t,n,r){return this.request(NH(r||{},{method:e,url:t,data:n}))}}));var FH=zU,UH=OU,zH=BH,HH=gH;function VH(e){var t=new zH(e),n=UH(zH.prototype.request,t);return FH.extend(n,zH.prototype,t),FH.extend(n,t),n}var WH=VH(oH);WH.Axios=zH,WH.create=function(e){return VH(HH(WH.defaults,e))},WH.Cancel=jH(),WH.CancelToken=function(){if(CH)return SH;CH=1;var e=jH();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},SH=t}(),WH.isCancel=lH(),WH.all=function(e){return Promise.all(e)},WH.spread=MH?TH:(MH=1,TH=function(e){return function(t){return e.apply(null,t)}}),WH.isAxiosError=IH?EH:(IH=1,EH=function(e){return"object"==typeof e&&!0===e.isAxiosError}),kU.exports=WH,kU.exports.default=WH;var YH,GH,qH=Z(kU.exports),QH="undefined"!=typeof process&&process.env?process.env:{},ZH="development"===QH.NODE_ENV,XH=null!==(YH=QH.REACT_APP_API_URL)&&void 0!==YH?YH:ZH?"http://localhost:8080/api":"/api",$H=null;exports.QUERY_KEY=void 0,(GH=exports.QUERY_KEY||(exports.QUERY_KEY={})).fetchAnomalies="fetchAnomalies",GH.fetchGraphs="fetchGraphs",GH.fetchQueries="fetchQueries",GH.fetchUniverseMetadataList="fetchUniverseMetadataList",GH.deleteUniverseMetadata="deleteUniverseMetadata",GH.updateUniverseMetadata="updateUniverseMetadata",GH.fetchUniverseListDetails="fetchUniverseListDetails",GH.fetchUniverseById="fetchUniverseById",GH.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",GH.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",GH.fetchAnomaliesPage="fetchAnomaliesPage",GH.fetchQueriesPage="fetchQueriesPage",GH.fetchQueriesStatsPage="fetchQueriesStatsPage",GH.fetchQueriesDatabases="fetchQueriesDatabases",GH.fetchCustomerMetadataList="fetchCustomerMetadataList",GH.fetchQueryStats="fetchQueryStats",GH.fetchTablesPage="fetchTablesPage",GH.fetchNamespaces="fetchNamespaces",GH.deleteRuntimeConfig="deleteRuntimeConfig",GH.fetchRuntimeConfigs="fetchRuntimeConfigs",GH.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",GH.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",GH.updateRuntimeConfig="updateRuntimeConfig",GH.fetchAnomalyGroups="fetchAnomalyGroups",GH.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",GH.fetchAnomalyGroupsById="fetchAnomalyGroupsById",GH.getUniverseMetadata="getUniverseMetadata",GH.fetchMetricsGraphs="fetchMetricsGraphs";var KH=qH.create({baseURL:XH});KH.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===exports.AppName.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===exports.AppName.YBA&&n&&""!==n){var i=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=i}else t===exports.AppName.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var JH,eV,tV,nV,rV,iV,oV,aV,sV,lV=function(){this.fetchAnomalies=function(e,t,n,r){var i=Ja(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",o={};return t&&(o.startTime=t),n&&(o.endTime=n),KH.get(i,{params:o}).then((function(e){return e.data}))},this.fetchAnomaliesPage=function(e,t,n,r,i,o,a,s){void 0===r&&(r=10);var l=Ja(n)?"".concat(n,"/universe/").concat(e,"/anomalies/page"):"/universe/".concat(e,"/anomalies/page"),u={};return i&&(u.startTime=i),o&&(u.endTime=o),a&&a!==Ks&&(u.category=a),Ja(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,KH.get(l,{params:u})},this.fetchQueriesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=Ja(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),p={};return o&&(p.startTime=o),a&&(p.endTime=a),Ja(s)&&(p.query=s),l&&l!==Ks&&(p.dbName=l),p.sortBy=es(u)?"dbName":u,p.direction=es(c)?"DESC":c,p.offset=n*i,p.needTotalCount=!0,p.limit=i,KH.get(d,{params:p})},this.fetchQueriesStatsPage=function(e,t,n,r){var i=t.currentTablePage,o=t.apiUrl,a=t.pageSize,s=t.startTime,l=t.endTime,u=t.searchInput,c=t.database,d=t.sortBy,p=t.sortDirection,h=t.queryType,f=t.groupByOperation,g=n(),m=g.cluster,v=g.region,y=g.zone,x=g.node,_=new URLSearchParams;if(Ja(m)&&m!==Ks&&_.append("clusterUuid",m),Ja(v)&&v!==Ks&&_.append("regionCode",v),Ja(y)&&y!==Ks&&_.append("azCode",y),Ja(x)&&x!==Ks&&_.append("instanceName",x),$a(r)){var b=f===exports.WaitEventClassification.WAIT_EVENT?"events":"eventTypes";r.forEach((function(e){return _.append(b,e)}))}var w=Ja(o)?"".concat(o,"/universe/").concat(e,"/queries/stats/page?").concat(_.toString()):"/universe/".concat(e,"/queries/stats/page?").concat(_.toString()),S={};return h&&(S.queryType=h.toUpperCase()),s&&(S.startTime=s),l&&(S.endTime=l),Ja(u)&&(S.query=u),c&&c!==Ks&&(S.namespaceName=c),f&&f===exports.WaitEventClassification.WAIT_EVENT&&(S.groupEventsBy=Ns.waitEvent),S.sortBy=es(d)?"eps":d,S.direction=es(p)?"DESC":p,S.offset=i*a,S.needTotalCount=!0,S.limit=a,S.excludeTpUser=!0,KH.get(w,{params:S})},this.fetchNamespaceSchemas=function(e,t,n){var r=Ja(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return KH.get(r).then((function(e){return e.data}))},this.fetchQueryStats=function(e,t,n){var r={},i=t.startTime,o=t.endTime,a=t.queryId,s=t.dbId;i&&(r.startTime=i),o&&(r.endTime=o),a&&(r.queryId=a),s&&(r.dbId=s);var l=Ja(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return KH.get(l,{params:r}).then((function(e){return e.data}))},this.fetchTablesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startDateTime,a=t.endDateTime,s=t.searchInput,l=t.database,u=t.schema,c=t.sortBy,d=t.sortDirection,p=Ja(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),h={};return o&&(h.startTime=o),a&&(h.endTime=a),Ja(s)&&(h.tableName=s),l&&l!==Ks&&(h.namespaceName=l),u&&u!==Ks&&(h.schemaName=u),h.sortBy=es(c)?"namespaceName":c,h.direction=es(d)?"DESC":d,h.offset=n*i,h.needTotalCount=!0,h.limit=i,KH.get(p,{params:h})},this.fetchNamespaces=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return KH.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return KH.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=Ja(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return KH.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n){$H&&$H.abort(),$H=new AbortController;var r=Ja(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs"),i=qH.CancelToken.source();return $H.signal.addEventListener("abort",(function(){i.cancel("Request aborted")})),KH.post(r,t,{cancelToken:i.token}).then((function(e){return e.data}))},this.fetchQueries=function(e,t,n){var r={};Ka(n)&&(r.db_id=null==n?void 0:n.dbId,r.query_id=null==n?void 0:n.queryId,r.user_id=null==n?void 0:n.userId);var i=Ja(t)?"".concat(t,"/universe/").concat(e,"/queries"):"/universe/".concat(e,"/queries");return KH.get(i,{params:r}).then((function(e){return e.data}))},this.fetchCustomerMetadataList=function(e){var t=Ja(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return KH.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=Ja(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return KH.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=Ja(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return KH.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=Ja(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return KH.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=Ja(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",i={customer_uuid:t,universe_uuid:n};return KH.get(r,{params:i}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return KH.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=Ja(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return KH.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return KH.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},i=Ja(e)?"".concat(e,"/universe/details"):"/universe/details";return KH.get(i,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return KH.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return KH.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=Ja(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return KH.post(n,null).then((function(e){return e.data}))},this.fetchRuntimeConfigs=function(e,t){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var n=Ja(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return KH.get(n).then((function(e){return e.data}))},this.fetchSpecificRuntimeConfigs=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Ja(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return KH.get(r,{params:t.reduce((function(e,t){return e.append("path",t),e}),new URLSearchParams)}).then((function(e){return e.data}))},this.updateRuntimeConfig=function(e,t,n,r){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var i=Ja(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return KH.put(i,{value:n}).then((function(e){return e.data}))},this.deleteRuntimeConfig=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Ja(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return KH.delete(r).then((function(e){return e.data}))},this.fetchAnomalyGroups=function(e,t,n,r,i,o){void 0===r&&(r="");var a=i(),s=a.cluster,l=a.region,u=a.zone,c=a.node,d=new URLSearchParams;if(t&&d.append("startTime",t),n&&d.append("endTime",n),null===t&&null===n)return{};Ja(r)&&d.append("anomalyType",r),Ja(s)&&s!==Ks&&d.append("clusterUuid",s),Ja(l)&&l!==Ks&&d.append("regionCode",l),Ja(u)&&u!==Ks&&d.append("azCode",u),Ja(c)&&c!==Ks&&d.append("instanceName",c);var p=Ja(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(d.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(d.toString());return KH.get(p).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,i){var o=Ja(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r):"/universe/".concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r);return KH.get(o).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,i){if(null===n&&null===r)return{};var o=Ja(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r):"/universe/".concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r);return KH.get(o).then((function(e){return e.data}))}},uV=new lV;function cV(){return cV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cV.apply(null,arguments)}const dV=e=>S.createElement("svg",cV({xmlns:"http://www.w3.org/2000/svg",style:{display:"block",shapeRendering:"auto",backgroundPosition:"initial initial",backgroundRepeat:"initial initial"},width:24,height:24,viewBox:"30 30 40 40",preserveAspectRatio:"xMidYMid"},e),JH||(JH=S.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),eV||(eV=S.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),tV||(tV=S.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),nV||(nV=S.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),rV||(rV=S.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),iV||(iV=S.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),oV||(oV=S.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),aV||(aV=S.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),sV||(sV=S.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var pV=function(i){var o,a,s,l=i.metricMeasure,u=i.apiUrl,c=i.universeQueryStatsData,d=i.appName,p=i.timezone,h=i.urlParams,f=i.dateTimeRange,g=i.getClusterDetails,m=i.onEChartsDateSelect,v=Kl(),y=t.useRef([]),x=t.useState(null),_=x[0],b=x[1],w=t.useState([]),S=w[0],C=w[1],T=g(),M=T.universeUuid,E=T.cluster,I=T.region,A=T.zone,D=T.node,k=T.numNodes,O=T.outlierType,R=function(e,t,n){void 0===n&&(n=!1);var r=vl.WAIT_EVENT_COMPONENT;if("Class"===e?r=vl.WAIT_EVENT_CLASS:"Type"===e?r=vl.WAIT_EVENT_TYPE:"Event"===e?r=vl.WAIT_EVENT:"Query"===e?r=vl.QUERY:"Client IP"===e&&(r=vl.CLIENT_NODE_IP),n){var i=JSON.parse(JSON.stringify(S)),o=null;if(n){var a=null==i?void 0:i.filter((function(e){return e.name===(null==t?void 0:t.name)}));if(a.length>=2){var s=a.find((function(e,n){return n===a.length-1&&e.name===(null==t?void 0:t.name)}));o=s}else o=null==i?void 0:i.find((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)}))}else o=null==i?void 0:i.find((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)}));o&&(o.groupBy=[r]),i.map((function(e,n){return n>=0&&e.name===(null==t?void 0:t.name)?o:e})),C(i),N.mutate(i)}},N=n.useMutation({mutationKey:["fetchHistoricalQueryGraphs",M],mutationFn:function(e){return uV.fetchGraphs(M,e,u)},onSuccess:function(e){b(e)},onError:function(e){console.error("Failed to fetch Query graphs",e)}}),L=null===(s=null===(a=null===(o=null==N?void 0:N.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error;t.useEffect((function(){var e,t=Iu(!0,!1,0,g(),null,F(F({},h),{type:null!==(e=h.type)&&void 0!==e?e:null}));t&&C(t),t&&N.mutate(t)}),[l,f,I,E,A,D,O,k]);var P=function(e,t){y.current[t]=e};return t.useEffect((function(){y.current=[]}),[l]),t.useEffect((function(){return N.isSuccess&&_&&_.length>0&&y.current.length===_.length&&aI(y.current),function(){sI(y.current)}}),[N.isSuccess,_]),e.jsxs(r.Box,F({mt:3,mr:3},{children:[N.isLoading&&e.jsx(r.Box,F({mt:2,className:v.loadingBox},{children:e.jsx(dV,{className:Y(v.icon,v.inProgressIcon)})})),N.isError&&e.jsxs(r.Box,F({mt:4},{children:[(d===exports.AppName.YBA||d===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(L)?L:Xl.QUERIES_GRAPHS_FETCH_ERROR}),d===exports.AppName.YBM&&e.jsx(kr,{text:Ja(L)?L:Xl.QUERIES_GRAPHS_FETCH_ERROR})]})),N.isSuccess&&e.jsxs(r.Box,{children:[e.jsx(r.Box,F({className:Y(v.gridBox,v.gridBoxSingle)},{children:null==_?void 0:_.filter((function(e){var t;return null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.startsWith("active_session_history")})).map((function(t,n){var i,o,a=Mu(l,t,exports.GraphType.SINGLE_SUPPORTING,!0,S,!0),s=null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.startsWith("active_session_history"),u=t.name;if(s){var h=t.layout.metadata,g=h.currentGroupBy,v=null===(o=h.supportedGroupBy.find((function(e){return e.label===g[0]})))||void 0===o?void 0:o.name;v&&a.groupByOperations.sort((function(e,t){return e===v?-1:t===v?1:0}))}return e.jsx(r.Box,F({id:"HistoricalQueryView-ash-".concat(l,"-").concat(n)},{children:e.jsx(r.Box,F({style:{border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(DU,{metricData:t,metricKey:u,dateTimeRange:f,containerWidth:null,metricMeasure:l,operations:l===exports.MetricMeasure.OVERALL?[]:a.uniqueOperations,registerChartInstance:function(e){return P(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:a.groupByOperations,appName:d,timezone:p,queryData:c,onSelectAshLabel:R,isHistoricalQueryView:!0,onEChartsDateSelect:m,showTitle:!0},"".concat(l,"-").concat(u))}))}),"HistoricalQueryView-ash-".concat(l,"-").concat(n))}))})),e.jsx(r.Box,F({className:Y(v.gridBox,v.gridBoxThree)},{children:null==_?void 0:_.filter((function(e){var t;return!(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.startsWith("active_session_history"))})).map((function(t,n){var i=Mu(l,t,exports.GraphType.SINGLE_SUPPORTING,!0,S,!0),o=t.name;return e.jsx(r.Box,F({id:"HistoricalQueryView-".concat(l,"-").concat(n)},{children:e.jsx(r.Box,F({style:{border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(DU,{metricData:t,metricKey:o,dateTimeRange:f,containerWidth:null,metricMeasure:l,operations:l===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,registerChartInstance:function(e){return P(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:i.groupByOperations,appName:d,timezone:p,queryData:c,onSelectAshLabel:R,isHistoricalQueryView:!0,onEChartsDateSelect:m,showTitle:!0},"".concat(l,"-").concat(o))}))}),"HistoricalQueryView-".concat(l,"-").concat(n))}))}))]})]}))},hV=function(n){var i=n.sourceData,o=n.expandAll,a=void 0!==o&&o,s=n.showMoreOptions,l=void 0!==s&&s,u=n.onClickShowMoreAnomalies,c=n.onSelectedIssue,d=n.startTime,p=n.name,h=n.endTime,f=n.appName,g=n.showMultiline,m=void 0===g||g,v=n.isInsightsTab,y=void 0!==v&&v;n.currentTab;var _=n.viewAllAnomalies,b=void 0!==_&&_,w=f===exports.AppName.YBM?27:35,S=t.useState({}),C=S[0],T=S[1],M=t.useState({}),E=M[0],I=M[1],A=t.useRef(null),D=t.useRef(null);t.useEffect((function(){if(i){if(l){var e=function(e){for(var t,n={},r=0,i=Object.entries(e.groups);r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=Object.keys(s);for(var l=function(e,r){n[e]=(null===(t=r.groups)||void 0===t?void 0:t.map((function(t,n){return"".concat(e,"_").concat(n)})))||[]},u=0,c=Object.entries(s);u<c.length;u++){var d=c[u];l(d[0],d[1])}}return n}(i),t=function(e){for(var t={},n=0,r=Object.entries(e.groups);n<r.length;n++){var i=r[n],o=i[0],a=i[1];t[o]=!1;for(var s=0,l=Object.keys(a);s<l.length;s++)t[l[s]]=!1}return t}(i);I(e),T(t)}else I({}),T({})}}),[i]),t.useEffect((function(){T((function(e){var t=F({},e);return Object.keys(t).forEach((function(e){t[e]=a})),t}))}),[a]);var k=function(e){var t,n=0;for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))n+=null===(t=e[r])||void 0===t?void 0:t.totalCount}return n},O=function(e){for(var t=0,n=Object.entries(E);t<n.length;t++){var r=n[t],i=r[0];if(r[1].includes(e))return O(i)}return e};function R(){var e,t,n,r,i,o;document.querySelectorAll(".custom-group-separator-left, .custom-group-separator-right, .custom-group-separator-top, .custom-group-separator-bottom").forEach((function(e){return e.remove()}));var a=Array.from(document.querySelectorAll(".vis-labelset .vis-label.custom-group-row-1"));a.forEach((function(e,t){var n,r=function(e){var t=e.nextElementSibling;for(;t&&!t.classList.contains("custom-group-row-1");)t=t.nextElementSibling;return t}(e);if(r){var i=document.createElement("div");i.className="custom-group-separator-left",null===(n=e.parentNode)||void 0===n||n.insertBefore(i,r)}var o=document.querySelector(".vis-foreground");if(o&&null!==e.offsetTop&&t>0){var a=document.createElement("div");a.className="custom-group-separator-right",a.style.top="".concat(e.offsetTop,"px"),a.style.position="absolute",o.appendChild(a)}}));var s=a[0];if(!(null===(e=s.previousElementSibling)||void 0===e?void 0:e.classList.contains("custom-group-separator-top"))){var l=document.createElement("div");l.className="custom-group-separator-top",null===(t=s.parentNode)||void 0===t||t.insertBefore(l,s)}var u=a[a.length-1],c=function(e){var t=e.nextElementSibling;for(;t&&(t.classList.contains("custom-group-row-2")||t.classList.contains("custom-group-row-3"));)t=t.nextElementSibling;return t}(u);if(!(null===(n=null==c?void 0:c.previousElementSibling)||void 0===n?void 0:n.classList.contains("custom-group-separator-bottom"))&&!(null===(r=u.nextElementSibling)||void 0===r?void 0:r.classList.contains("custom-group-separator-bottom"))){var d=document.createElement("div");d.className="custom-group-separator-bottom",c?null===(i=u.parentNode)||void 0===i||i.insertBefore(d,c):null===(o=u.parentNode)||void 0===o||o.appendChild(d)}}return t.useEffect((function(){if((Object.keys(C).length>0||$a(i))&&A.current){var e=l?function(e){for(var t=[],n=[],r=0,i=function(e,i){t.push({id:e,content:"+ ".concat(e),name:e,categoryLevel:1,categoryCount:k(i)});for(var o=function(i,o){var a="".concat(i),s=o.title;t.push({categoryLevel:2,id:a,content:o.totalCount>=1?"&#xff0b;&nbsp;&nbsp;&nbsp;".concat(s):"&#x2212;&nbsp;&nbsp;&nbsp;".concat(s),parent:e,name:s,categoryCount:o.totalCount});var u=[];if(o.groups.forEach((function(e,i){var o,s,l="".concat(a,"_").concat(i),c=(null===(o=e.lastInstance)||void 0===o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:l,name:c,content:c,parent:a,uuid:null===(s=null==e?void 0:e.lastInstance)||void 0===s?void 0:s.uuid,categoryLevel:3}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:l})})),u.push.apply(u,e.anomalyIntervals)})),o.hasMore&&l){var c="".concat(a,"_").concat(Sl),d=Sl;t.push({id:c,name:d,content:Cl,parent:a,categoryLevel:3,grandParent:e,categoryCount:o.totalCount-3}),n.push({id:"anomaly-".concat(a,"-").concat(Sl),content:"anomaly-".concat(a,"-").concat(Sl),start:"",end:"",group:a})}Du(u).forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))},a=0,s=Object.entries(i);a<s.length;a++){var u=s[a];o(u[0],u[1])}var c=Object.values(i).flatMap((function(e){return e.groups.flatMap((function(e){return e.anomalyIntervals}))}));Du(c).forEach((function(t){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:t.startTime,end:t.endTime,group:e})}))},o=0,a=Object.entries(null==e?void 0:e.groups);o<a.length;o++){var s=a[o];i(s[0],s[1])}return{groups:t,items:n}}(i):function(e){var t=[],n=[],r=0;return null==e||e.forEach((function(e,i){var o=e.lastInstance,a="group-".concat(i),s=(null==o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:a,content:s,name:s,uuid:null==o?void 0:o.uuid,categoryLevel:1}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))})),{groups:t,items:n}}(i),t=e.items,n=e.groups,r={items:t,groups:n},o=n;if(l){var a=n.map((function(e){var t,n,r=(null===(t=E[e.id])||void 0===t?void 0:t.length)>0,i=null!==(n=C[e.id])&&void 0!==n&&n,o=r?i?"&#x2212;":"&#xff0b;":"",a=void 0!==(null==e?void 0:e.categoryCount)&&e.categoryCount>=0,s="",l=O(e.id);3===e.categoryLevel&&e.name===Sl&&(l=e.grandParent),1===e.categoryLevel?s="font-family: Inter;font-size: 13px; font-weight: 400 !important;":2===e.categoryLevel?s="font-family: Inter;font-size: 11.5px; font-weight: 600 !important;":3===e.categoryLevel&&(s="font-family: Inter;font-size: 11px; font-weight: 400 !important;");var u=0;2===e.categoryLevel?u=40:3===e.categoryLevel&&(u=44);var c="margin-left: ".concat(u,"px;"),d=r||3!==e.categoryLevel?"":"border-left: 2px solid #E9EEF2; height: 100%;",p="".concat(c).concat(d).concat("color: #0B1117 !important;").concat(s),h="",f="";if(l)switch(l){case exports.AnomalyCategory.DB:h="db-background",f="Database";break;case exports.AnomalyCategory.NODE:h="node-background",f="Node";break;case exports.AnomalyCategory.SQL:h="sql-background",f="SQL";break;case exports.AnomalyCategory.APP:h="app-background",f="Application";break;case exports.AnomalyCategory.INFRA:h="infra-background",f="Infrastructure"}var g="";1===e.categoryLevel?g="custom-group-row-1":2===e.categoryLevel?g="custom-group-row-2":3===e.categoryLevel&&(g="custom-group-row-3");var m=e.content.replace(/&nbsp;/g,"").length>w?"".concat(e.content.substring(0,w),"..."):e.content;return F(F({},e),{content:r?'<a title="'.concat(e.name,'">').concat(o,"&nbsp;&nbsp;&nbsp;").concat((null==e?void 0:e.name)&&e.name.length>w?1===e.categoryLevel?f:"".concat(e.name.substring(0,w),"..."):1===e.categoryLevel?f:e.name,"</a>").concat(1!==e.categoryLevel&&2!==e.categoryLevel||i?"":"<span>".concat(e.categoryCount,"</span>")):'<a title="'.concat(e.content,'">').concat(o).concat(m,"</a>").concat(a?"<span>".concat(3===e.categoryCount?"&#xff0b;":"").concat(e.categoryCount,"</span>"):""),className:[g,h].filter(Boolean).join(" "),style:p,visible:!e.parent||C[e.parent]})})),s=a.filter((function(e){return e.visible}));Object.entries(E).forEach((function(e){var t=e[0];e[1].forEach((function(e){var n=a.find((function(t){return t.id===e}));n&&(n.visible=C[t])}))}));var g=t.filter((function(e){var t,n=a.find((function(t){return t.id===e.group}));if(n&&n.visible){var r=(null===(t=E[n.id])||void 0===t?void 0:t.length)>0,i=C[n.id];return!r||!i}return!1}));r={items:S=g.map((function(e){var t=a.find((function(t){return t.id===e.group})),n=t?O(t.id):null,r="#CCCCCC";if(n)switch(n){case exports.AnomalyCategory.DB:r=Zl[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=Zl[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=Zl[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=Zl[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=Zl[exports.AnomalyCategory.INFRA]}return F(F({},e),{style:"background-color: ".concat(r,"; height: 8px;")})})),groups:s}}else{var v="custom-group-row",_=n.map((function(e){return F(F({},e),{content:m?'<a title="'.concat(e.content,'"> ').concat(e.content.length>w?"".concat(e.content.substring(0,w),"..."):e.content,"</a>"):"",style:"font-family: Inter; margin-left: 12px; font-size: 13px; font-weight: 400; border-bottom: 1px solid #D7DEE4",className:[v].filter(Boolean).join(" ")})})),S=t.map((function(e){var t,n,r="#CCCCCC",o=null===(n=null===(t=null==i?void 0:i[0])||void 0===t?void 0:t.lastInstance)||void 0===n?void 0:n.category;if(o)switch(o){case exports.AnomalyCategory.DB:r=Zl[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=Zl[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=Zl[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=Zl[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=Zl[exports.AnomalyCategory.INFRA]}return F(F({},e),{style:"background-color: ".concat(r,"; height: 8px")})}));r={items:S,groups:_}}if(D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current.setOptions(M),D.current.setItems(r.items),D.current.setGroups(r.groups),l&&!y&&R()}else{var M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new x.Timeline(A.current,r.items,r.groups,M)}D.current.on("changed",(function(){if(b){document.querySelectorAll(".vis-label.custom-group-row .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")}))}else{document.querySelectorAll(".vis-label.custom-group-row-1 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-1")})),document.querySelectorAll(".vis-label.custom-group-row-2 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-2")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-3")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")})),document.querySelectorAll(".vis-label.db-background .vis-inner span").forEach((function(e){return e.classList.add("db-inner-background")})),document.querySelectorAll(".vis-label.node-background .vis-inner span").forEach((function(e){return e.classList.add("node-inner-background")})),document.querySelectorAll(".vis-label.sql-background .vis-inner span").forEach((function(e){return e.classList.add("sql-inner-background")})),document.querySelectorAll(".vis-label.app-background .vis-inner span").forEach((function(e){return e.classList.add("app-inner-background")})),document.querySelectorAll(".vis-label.infra-background .vis-inner span").forEach((function(e){return e.classList.add("infra-inner-background")})),l&&!y&&R();var e=document.querySelector(".vis-panel.vis-center");if(e){var t=p===Vl?"my-custom-center-panel-rca":"my-custom-center-panel";e.classList.add(t)}var n=document.querySelector(".vis-labelset");if(n){t=p===Vl?"my-custom-labelset-rca":"my-custom-labelset";n.classList.add(t)}}})),null==D||D.current.on("click",(function(e){var t=window.scrollY;setTimeout((function(){return window.scrollTo(0,t)}),0);var n,r,i,a=e.group,s="",l=null;a&&(l=o.find((function(e){return e.id===a})))&&"string"==typeof l.content&&(s=l.id),(null==l?void 0:l.uuid)&&(f===exports.AppName.YBM?(n=l.uuid,r=new URLSearchParams(window.location.search),(i={}).duration=r.get("duration"),i.startTime=r.get("startTime"),i.endTime=r.get("endTime"),null==c||c(n,i)):f!==exports.AppName.WEB&&f!==exports.AppName.YBA||function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search),r=n.toString();f===exports.AppName.YBA&&n.set("anomalyUuid",e);var i="".concat(t,"/").concat(e).concat(r?"?".concat(r):"");window.open(i,"_blank")}(l.uuid)),(null==l?void 0:l.name)===Sl&&(null==u||u(l.parent)),s&&function(e){T((function(t){var n=F({},t),r=!n[e];if(n[e]=r,!r){var i=function(e){Object.keys(n).forEach((function(t){var r;(null===(r=E[e])||void 0===r?void 0:r.includes(t))&&(n[t]=!1,i(t))}))};i(e)}return n}))}(s)}))}else if(Xa(i)&&A.current&&!D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new x.Timeline(A.current,[],[],M),D.current.setOptions(M),D.current.setItems([]),D.current.setGroups([])}return function(){D.current&&(D.current.destroy(),D.current=null)}}),[C,i]),e.jsxs(r.Box,F({id:p},{children:[e.jsx("div",{ref:A,style:{backgroundColor:"#FFFFFF"}},p),e.jsx("style",{children:"\n .vis-foreground .vis-group {\n border-bottom: none;\n }\n .vis-foreground .vis-group.custom-group-row-1 {\n top: 8px;\n }\n .vis-foreground .vis-group.parent-category {\n border-top: 1px solid #E0E0E0 !important; /* Or whatever you want */\n }\n .vis-labelset .vis-label {\n border-right: 0px solid #ccc !important;\n border-bottom: none;\n border-top: none;\n }\n .vis-timeline {\n background-color: #FFFFFF !important;\n border: 0px solid #ccc !important;\n visibility: visible !important;\n }\n .vis-panel.vis-top {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-bottom {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-left {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-inner a {\n cursor: pointer;\n letter-spacing: 0.3px;\n text-decoration: none !important;\n outline: none !important;\n color: unset !important;\n &:focus {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n &:hover {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n }\n .vis-labelset .vis-label .vis-inner {\n padding: 0px;\n }\n .vis-inner span {\n padding: 2px 6px 2px 6px;\n height: 20px;\n width: fit-content;\n font-size: 11.5px;\n line-height: 16px;\n font-family: Inter;\n font-weight: 500;\n border-radius: 4px;\n }\n .vis-item.vis-range .vis-item-content {\n display: none;\n }\n .vis-item.vis-range {\n top: 10px !important;\n border-style: unset;\n border-radius: 8px;\n }\n .vis-labelset.my-custom-labelset-rca {\n width: 0px;\n }\n .vis-labelset {\n width: 250px;\n }\n .vis-inner {\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n }\n .vis-time-axis .vis-grid.vis-vertical {\n border-left: 1px dashed !important;\n color: #D7DEE4;\n }\n .vis-panel.vis-center {\n border-left-style: dashed !important;\n border-right-style: dashed !important;\n border-top-color: #D7DEE4;\n top: 1px !important;\n margin-left: 8px;\n left: 254px !important;\n }\n .vis-panel.vis-center.my-custom-center-panel-rca {\n left: 0px !important;\n }\n .vis-time-axis .vis-grid.vis-major {\n border-color: #e5e5e5 !important;\n }\n .custom-group-separator-left {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n margin-top: 2px;\n }\n .custom-group-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n }\n .custom-group-separator-bottom {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .custom-group-separator-top {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .item-separator {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n margin-top: 2px;\n }\n .item-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n }\n .vis-label.custom-group-row-1 .vis-inner {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .vis-label.custom-group-row-2 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row-3 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-foreground .vis-group.custom-group-row {\n border-bottom: 1px solid #D7DEE4;\n bottom: 3px;\n }\n .vis-label.custom-group-row .vis-inner .category-deeplink {\n text-decoration: underline !important;\n }\n .vis-label.custom-group-row-2 .vis-inner .category-badge-2 {\n margin-right: 40px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-badge-3 {\n margin-right: 44px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-deeplink {\n margin-left: 24px;\n text-decoration: underline !important;\n }\n .vis-label.db-background .vis-inner .db-inner-background {\n background-color: #E8E9FE !important;\n color: #30307F !important;\n }\n .vis-label.node-background .vis-inner .node-inner-background {\n background-color: #FFEEC8 !important;\n color: #9D6C00 !important;\n }\n .vis-label.sql-background .vis-inner .sql-inner-background {\n background-color: rgba(187, 66, 188, 0.15) !important;\n color: #7D2777 !important;\n }\n .vis-label.app-background .vis-inner .app-inner-background {\n background-color: #D7EFF4 !important;\n color: #2B59C3 !important;\n }\n .vis-label.infra-background .vis-inner .infra-inner-background {\n background-color: #c1ccec !important;\n color: #507ce1 !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n "})]}),p)},fV=function(i){var o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,C,T,M,E,I,A,D=i.metricMeasure,k=i.appName,O=i.timezone,R=i.universeQueryData,N=i.amomalyGraphRequestParams,L=i.formattedAnomalyRca,P=i.anomalyData,B=i.gantChartData,j=i.dateTimeRange,U=i.urlParams,z=i.apiUrl,H=i.getClusterDetails,V=i.onEChartsDateSelect,W=i.onSelectedIssue,G=t.useRef([]),q=Kl(),Q=t.useState(!1);Q[0],Q[1];var Z=t.useState(0),X=Z[0],$=Z[1],K=t.useState(P),J=K[0],ee=K[1],te=t.useState(null),ne=te[0],re=te[1],ie=t.useState(N),oe=ie[0],ae=ie[1],se=H(),le=se.universeUuid,ue=se.cluster,ce=se.region,de=se.zone,pe=se.node,he=se.numNodes,fe=se.outlierType,ge=MU(D),me=function(e,t,n){var r,i,o=vl.WAIT_EVENT_COMPONENT;if("Class"===e?o=vl.WAIT_EVENT_CLASS:"Type"===e?o=vl.WAIT_EVENT_TYPE:"Event"===e?o=vl.WAIT_EVENT:"Query"===e?o=vl.QUERY:"Client IP"===e&&(o=vl.CLIENT_NODE_IP),(null===(r=null==P?void 0:P.lastInstance)||void 0===r?void 0:r.category)&&(null===(i=null==P?void 0:P.lastInstance)||void 0===i?void 0:i.category)!==exports.AnomalyCategory.DB){var a=JSON.parse(JSON.stringify(oe)),s=null==a?void 0:a.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}));s&&(s.groupBy=[o]),a.map((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)?s:e})),ae(a),ve.mutate(a)}};t.useEffect((function(){ee(P)}),[P]),t.useEffect((function(){var e;ge&&ge!==D&&re(null);var t=JSON.parse(JSON.stringify(oe)),n=H(),r=Iu(!1,!1,0,n,t,F(F({},U),{type:null!==(e=U.type)&&void 0!==e?e:null})),i=null!=r?r:oe;ae(i),ve.mutate(i)}),[D,j,ce,ue,de,pe,fe,he]);var ve=n.useMutation({mutationKey:["fetchAnomalyGraphs"],mutationFn:function(e){return uV.fetchGraphs(le,e,z)},onSuccess:function(e){re(e)},onError:function(e){console.error("Failed to fetch RCA graphs",e)}}),ye=null===(s=null===(a=null===(o=null==ve?void 0:ve.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,xe=function(t,n,i,o,a,s){return e.jsx(r.Box,F({mt:3,mr:8},{children:e.jsx(DU,{metricData:t,metricKey:t.name,graphTitle:s,containerWidth:null,dateTimeRange:j,metricMeasure:D,operations:n,groupByOperations:i,registerChartInstance:function(e){return be(e,a)},appName:k,graphType:o,timezone:O,queryData:R,onSelectAshLabel:me,onEChartsDateSelect:V},"".concat(D,"-").concat(t.name))}))},_e=null==L?void 0:L.filter((function(e){var t;return(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.length)>0}));t.useEffect((function(){G.current=[]}),[D]);var be=function(e,t){G.current[t]=e};return t.useEffect((function(){return ve.isSuccess&&ne&&ne.length>0&&aI(G.current),function(){sI(G.current)}}),[ve.isSuccess,ne,X]),e.jsx(r.Box,{children:e.jsx(Ts,{bodyClassName:q.panelItemBody,body:e.jsxs(e.Fragment,{children:[ve.isLoading&&e.jsx(r.Box,F({mt:2,className:q.loadingBox},{children:e.jsx(dV,{className:Y(q.icon,q.inProgressIcon)})})),ve.isError&&e.jsxs(r.Box,F({mt:4},{children:[(k===exports.AppName.YBA||k===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(ye)?ye:Xl.RCA_GRAPHS_FETCH_ERROR}),k===exports.AppName.YBM&&e.jsx(kr,{text:Ja(ye)?ye:Xl.RCA_GRAPHS_FETCH_ERROR})]})),ve.isSuccess&&e.jsxs(r.Box,{children:[$a(ne)&&$a(null===(l=null==P?void 0:P.lastInstance)||void 0===l?void 0:l.mainGraphs)&&(null===(u=null==P?void 0:P.lastInstance)||void 0===u?void 0:u.mainGraphs.map((function(t,n){var i,o,a,s=null==ne?void 0:ne.find((function(e){return e.name===t.name})),l=t.groupByControl,u=D===exports.MetricMeasure.OVERALL?{uniqueOperations:[],groupByOperations:[]}:Mu(D,s,exports.GraphType.MAIN_RCA,l,N);return e.jsxs(r.Box,F({className:q.mainGraphBox},{children:[e.jsx(r.Box,F({className:q.mainGraphMetadataBox},{children:e.jsxs(r.Box,F({className:q.anomalyMetadataOneBox},{children:[e.jsx("span",F({className:q.headerTitle},{children:Ll})),e.jsx("span",F({className:q.metadataDetails},{children:null===(i=null==P?void 0:P.lastInstance)||void 0===i?void 0:i.title})),e.jsx("span",F({className:Y(q.regularMetadata,(null===(o=null==P?void 0:P.lastInstance)||void 0===o?void 0:o.category)===exports.AnomalyCategory.SQL&&q.restrictLines)},{children:null===(a=null==P?void 0:P.lastInstance)||void 0===a?void 0:a.summary}))]}))})),e.jsx(r.Box,F({mt:1,className:q.boxContainer},{children:xe(s,u.uniqueOperations,u.groupByOperations,exports.GraphType.MAIN_RCA,n+10)}))]}))}))),e.jsxs(r.Box,F({mt:2,mb:1},{children:[B.isLoading&&e.jsx(r.Box,F({mt:2,className:q.loadingBox},{children:e.jsx(dV,{className:Y(q.icon,q.inProgressIcon)})})),B.isError&&404!==(null===(d=null===(c=null==B?void 0:B.error)||void 0===c?void 0:c.response)||void 0===d?void 0:d.status)&&e.jsxs(r.Box,F({mt:2},{children:[(k===exports.AppName.WEB||k===exports.AppName.YBA)&&e.jsx(wt,{customErrorMessage:Ja(null===(f=null===(h=null===(p=null==B?void 0:B.error)||void 0===p?void 0:p.response)||void 0===h?void 0:h.data)||void 0===f?void 0:f.error)?null===(v=null===(m=null===(g=null==B?void 0:B.error)||void 0===g?void 0:g.response)||void 0===m?void 0:m.data)||void 0===v?void 0:v.error:Xl.GANTCHART_FETCH_ERROR}),k===exports.AppName.YBM&&e.jsx(kr,{text:Ja(null===(_=null===(x=null===(y=null==B?void 0:B.error)||void 0===y?void 0:y.response)||void 0===x?void 0:x.data)||void 0===_?void 0:_.error)?null===(S=null===(w=null===(b=null==B?void 0:B.error)||void 0===b?void 0:b.response)||void 0===w?void 0:w.data)||void 0===S?void 0:S.error:Xl.GANTCHART_FETCH_ERROR})]})),(B.isSuccess||B.isError&&404===(null===(T=null===(C=null==B?void 0:B.error)||void 0===C?void 0:C.response)||void 0===T?void 0:T.status))&&(Ka(J)?e.jsx(r.Box,F({className:q.rcaGantChartBox},{children:e.jsx(hV,{sourceData:B.isError&&404===(null===(E=null===(M=null==B?void 0:B.error)||void 0===M?void 0:M.response)||void 0===E?void 0:E.status)?[]:[J],name:Vl,showMoreOptions:!1,expandAll:!0,startTime:null===(I=null==j?void 0:j.startDateTime)||void 0===I?void 0:I.toISOString(),endTime:null===(A=null==j?void 0:j.endDateTime)||void 0===A?void 0:A.toISOString(),onSelectedIssue:W,appName:k,showMultiline:!1},Vl)})):e.jsxs(r.Box,F({mt:2},{children:[(k===exports.AppName.WEB||k===exports.AppName.YBA)&&e.jsx("span",{children:"Failed to fetch anomaly data, please try again."}),k===exports.AppName.YBM&&e.jsx(kr,{text:"Failed to fetch anomaly data, please try again."})]})))]})),$a(ne)&&$a(_e)&&e.jsxs(r.Box,F({className:q.causesBox},{children:[e.jsx(r.Tabs,F({value:X,onChange:function(e,t){var n=window.scrollY;$(t),setTimeout((function(){return window.scrollTo(0,n)}),0)},"aria-label":"anomaly causes tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto"},{children:null==_e?void 0:_e.map((function(t,n){return e.jsx(r.Tab,{component:"div",label:t.cause,classes:{root:Y(q.causeTabButton),wrapper:q.causeTabLabelWrapper}},n)}))})),null==_e?void 0:_e.map((function(t,n){var i,o;return e.jsx(r.Box,F({role:"tabpanel",hidden:X!==n,id:"tabpanel-".concat(n),"aria-labelledby":"tab-".concat(n)},{children:X===n&&e.jsxs(r.Box,F({mt:2,display:"flex",flexDirection:"column"},{children:[e.jsx("span",F({className:q.causeText},{children:t.cause})),e.jsxs(r.Box,{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e",alt:"path"}),e.jsx("span",F({className:q.descriptionText},{children:t.description}))]}),e.jsx(r.Box,F({mt:2,className:(null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.length)>1?Y(q.gridBox,q.gridBoxDouble):""},{children:null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.map((function(i,o){var a,s,l,u=null==ne?void 0:ne.find((function(e,n){return n>0&&(null==e?void 0:e.name)===i&&t.index.includes(n)})),c=1===(null===(a=null==t?void 0:t.name)||void 0===a?void 0:a.length),d=null===(s=t.groupByControl)||void 0===s?void 0:s[0];if(Ja(null!==(l=null==u?void 0:u.errorMessage)&&void 0!==l?l:""))return e.jsx(r.Box,{});var p=Mu(D,u,exports.GraphType.MULTI_SUPPORTING,d,N);return e.jsx(r.Box,F({style:{border:"1px solid #E9EEF2",borderRadius:"8px",marginRight:c?"0px":"16px"}},{children:xe(u,p.uniqueOperations,p.groupByOperations,c?exports.GraphType.SINGLE_SUPPORTING:exports.GraphType.MULTI_SUPPORTING,n+o,t.title)}))}))}))]}))}),n)}))]}))]})]})})})},gV=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}},mV=Z(gV),vV=Object.getOwnPropertySymbols,yV=Object.prototype.hasOwnProperty,xV=Object.prototype.propertyIsEnumerable;var _V=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))yV.call(n,a)&&(i[a]=n[a]);if(vV){r=vV(n);for(var s=0;s<r.length;s++)xV.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},bV=_V,wV={};function SV(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}var CV="mixins";var TV=function(e,t,n){var r=[],i={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},o={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},a={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)l(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=bV({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=bV({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=c(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=bV({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(SV(!(n in a),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return SV("DEFINE_MANY_MERGED"===(o.hasOwnProperty(n)?o[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=c(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function s(e,t){var n=i.hasOwnProperty(t)?i[t]:null;g.hasOwnProperty(t)&&SV("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&SV("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function l(e,n){if(n){SV("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),SV(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,o=r.__reactAutoBindPairs;for(var l in n.hasOwnProperty(CV)&&a.mixins(e,n.mixins),n)if(n.hasOwnProperty(l)&&l!==CV){var u=n[l],p=r.hasOwnProperty(l);if(s(p,l),a.hasOwnProperty(l))a[l](e,u);else{var h=i.hasOwnProperty(l);if("function"==typeof u&&!h&&!p&&!1!==n.autobind)o.push(l,u),r[l]=u;else if(p){var f=i[l];SV(h&&("DEFINE_MANY_MERGED"===f||"DEFINE_MANY"===f),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,l),"DEFINE_MANY_MERGED"===f?r[l]=c(r[l],u):"DEFINE_MANY"===f&&(r[l]=d(r[l],u))}else r[l]=u}}}}function u(e,t){for(var n in SV(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(SV(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function c(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return u(i,n),u(i,r),i}}function d(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function p(e,t){return t.bind(e)}var h={componentDidMount:function(){this.__isMounted=!0}},f={componentWillUnmount:function(){this.__isMounted=!1}},g={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},m=function(){};return bV(m.prototype,e.prototype,g),function(e){var t=function(e,r,i){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=p(e,i)}}(this),this.props=e,this.context=r,this.refs=wV,this.updater=i||n,this.state=null;var o=this.getInitialState?this.getInitialState():null;SV("object"==typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=o};for(var o in t.prototype=new m,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],r.forEach(l.bind(null,t)),l(t,h),l(t,e),l(t,f),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),SV(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),i)t.prototype[o]||(t.prototype[o]=null);return t}},MV=C.default,EV=TV;if(void 0===MV)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var IV,AV,DV,kV,OV=(new MV.Component).updater,RV=Z(EV(MV.Component,MV.isValidElement,OV)),NV={exports:{}};NV.exports=function(){if(kV)return DV;kV=1;var e=AV?IV:(AV=1,IV="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,DV=function(){function r(t,n,r,i,o,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();var LV=NV.exports,PV=Z(LV),BV=function(){};function jV(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var FV=Object.create(null);function UV(e){return FV[e]||(FV[e]=function(e){for(var t="",n=[],r=[],i=void 0,o=0,a=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g;i=a.exec(e);)i.index!==o&&(r.push(e.slice(o,i.index)),t+=jV(e.slice(o,i.index))),i[1]?(t+="([^/]+)",n.push(i[1])):"**"===i[0]?(t+="(.*)",n.push("splat")):"*"===i[0]?(t+="(.*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]?t+=")?":"\\("===i[0]?t+="\\(":"\\)"===i[0]&&(t+="\\)"),r.push(i[0]),o=a.lastIndex;return o!==e.length&&(r.push(e.slice(o,e.length)),t+=jV(e.slice(o,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}(e)),FV[e]}function zV(e,t){"/"!==e.charAt(0)&&(e="/"+e);var n=UV(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;"/"!==e.charAt(e.length-1)&&(r+="/?"),"*"===o[o.length-1]&&(r+="$");var a=t.match(new RegExp("^"+r,"i"));if(null==a)return null;var s=a[0],l=t.substr(s.length);if(l){if("/"!==s.charAt(s.length-1))return null;l="/"+l}return{remainingPathname:l,paramNames:i,paramValues:a.slice(1).map((function(e){return e&&decodeURIComponent(e)}))}}function HV(e){return UV(e).paramNames}function VV(e,t){t=t||{};for(var n=UV(e).tokens,r=0,i="",o=0,a=[],s=void 0,l=void 0,u=0,c=n.length;u<c;++u)if("*"===(s=n[u])||"**"===s)null!=(l=Array.isArray(t.splat)?t.splat[o++]:t.splat)||r>0||mV(!1),null!=l&&(i+=encodeURI(l));else if("("===s)a[r]="",r+=1;else if(")"===s){var d=a.pop();(r-=1)?a[r-1]+=d:i+=d}else if("\\("===s)i+="(";else if("\\)"===s)i+=")";else if(":"===s.charAt(0))if(null!=(l=t[s.substring(1)])||r>0||mV(!1),null==l){if(r){a[r-1]="";for(var p=n.indexOf(s),h=n.slice(p,n.length),f=-1,g=0;g<h.length;g++)if(")"==h[g]){f=g;break}f>0||mV(!1),u=p+f-1}}else r?a[r-1]+=encodeURIComponent(l):i+=encodeURIComponent(l);else r?a[r-1]+=s:i+=s;return r<=0||mV(!1),i.replace(/\/+/g,"/")}function WV(e,t){var n=e&&e.routes,r=t.routes,i=void 0,o=void 0,a=void 0;if(n){var s=!1;i=n.filter((function(n){if(s)return!0;var i=-1===r.indexOf(n)||function(e,t,n){return!!e.path&&HV(e.path).some((function(e){return t.params[e]!==n.params[e]}))}(n,e,t);return i&&(s=!0),i})),i.reverse(),a=[],o=[],r.forEach((function(e){var t=-1===n.indexOf(e),r=-1!==i.indexOf(e);t||r?a.push(e):o.push(e)}))}else i=[],o=[],a=r;return{leaveRoutes:i,changeRoutes:o,enterRoutes:a}}function YV(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0;function l(){i=!0,o?s=[].concat(Array.prototype.slice.call(arguments)):n.apply(this,arguments)}!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r<e&&a;)a=!1,t.call(this,r++,u,l);o=!1,i?n.apply(this,s):r>=e&&a&&(i=!0,n())}}()}function GV(e,t,n){var r=e.length,i=[];if(0===r)return n(null,i);var o=!1,a=0;e.forEach((function(e,s){t(e,s,(function(e,t){!function(e,t,s){o||(t?(o=!0,n(t)):(i[e]=s,(o=++a===r)&&n(null,i)))}(s,e,t)}))}))}var qV=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=[],this.add=function(e){return t.hooks.push(e)},this.remove=function(e){return t.hooks=t.hooks.filter((function(t){return t!==e}))},this.has=function(e){return-1!==t.hooks.indexOf(e)},this.clear=function(){return t.hooks=[]}};function QV(){var e=new qV,t=new qV;function n(e,t,n,r){var i=e.length<n,o=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];(e.apply(t,r),i)&&(0,r[r.length-1])()};return r.add(o),o}function r(e,t,n){if(e){var r=void 0;YV(e,(function(e,n,o){t(e,i,(function(e){e||r?o(e,r):n()}))}),n)}else n();function i(e){r=e}}return{runEnterHooks:function(t,i,o){e.clear();var a=function(t){return t.reduce((function(t,r){return r.onEnter&&t.push(n(r.onEnter,r,3,e)),t}),[])}(t);return r(a.length,(function(t,n,r){a[t](i,n,(function(){e.has(a[t])&&(r.apply(void 0,arguments),e.remove(a[t]))}))}),o)},runChangeHooks:function(e,i,o,a){t.clear();var s=function(e){return e.reduce((function(e,r){return r.onChange&&e.push(n(r.onChange,r,4,t)),e}),[])}(e);return r(s.length,(function(e,n,r){s[e](i,o,n,(function(){t.has(s[e])&&(r.apply(void 0,arguments),t.remove(s[e]))}))}),a)},runLeaveHooks:function(e,t){for(var n=0,r=e.length;n<r;++n)e[n].onLeave&&e[n].onLeave.call(e[n],t)}}}var ZV="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};function XV(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return XV(e,t[n])}));if("object"===(void 0===e?"undefined":ZV(e))){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(!XV(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function $V(e,t){return null==t?null==e:null==e||XV(e,t)}function KV(e,t,n,r,i){var o=e.pathname,a=e.query;return null!=n&&("/"!==o.charAt(0)&&(o="/"+o),!!(function(e,t){return"/"!==t.charAt(0)&&(t="/"+t),"/"!==e.charAt(e.length-1)&&(e+="/"),"/"!==t.charAt(t.length-1)&&(t+="/"),t===e}(o,n.pathname)||!t&&function(e,t,n){for(var r=e,i=[],o=[],a=0,s=t.length;a<s;++a){var l=t[a].path||"";if("/"===l.charAt(0)&&(r=e,i=[],o=[]),null!==r&&l){var u=zV(l,r);if(u?(r=u.remainingPathname,i=[].concat(i,u.paramNames),o=[].concat(o,u.paramValues)):r=null,""===r)return i.every((function(e,t){return String(o[t])===String(n[e])}))}}return!1}(o,r,i))&&$V(a,n.query))}function JV(e){return e&&"function"==typeof e.then}function eW(e,t){GV(e.routes,(function(t,n,r){!function(e,t,n){if(t.component||t.components)n(null,t.component||t.components);else{var r=t.getComponent||t.getComponents;if(r){var i=r.call(t,e,n);JV(i)&&i.then((function(e){return n(null,e)}),n)}else n()}}(e,t,r)}),t)}var tW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function nW(e){return null==e||C.default.isValidElement(e)}function rW(e){return nW(e)||Array.isArray(e)&&e.every(nW)}function iW(e){var t,n,r=e.type,i=(t=r.defaultProps,n=e.props,tW({},t,n));if(i.children){var o=oW(i.children,i);o.length&&(i.childRoutes=o),delete i.children}return i}function oW(e,t){var n=[];return C.default.Children.forEach(e,(function(e){if(C.default.isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(iW(e))})),n}function aW(e){return rW(e)?e=oW(e):e&&!Array.isArray(e)&&(e=[e]),e}var sW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function lW(e,t,n,r,i){if(e.childRoutes)return[null,e.childRoutes];if(!e.getChildRoutes)return[];var o=!0,a=void 0,s={location:t,params:cW(n,r)},l=e.getChildRoutes(s,(function(e,t){t=!e&&aW(t),o?a=[e,t]:i(e,t)}));return JV(l)&&l.then((function(e){return i(null,aW(e))}),i),o=!1,a}function uW(e,t,n,r,i){if(e.indexRoute)i(null,e.indexRoute);else if(e.getIndexRoute){var o={location:t,params:cW(n,r)},a=e.getIndexRoute(o,(function(e,t){i(e,!e&&aW(t)[0])}));JV(a)&&a.then((function(e){return i(null,aW(e)[0])}),i)}else if(e.childRoutes||e.getChildRoutes){var s=function(e,o){if(e)i(e);else{var a=o.filter((function(e){return!e.path}));YV(a.length,(function(e,i,o){uW(a[e],t,n,r,(function(t,n){if(t||n){var r=[a[e]].concat(Array.isArray(n)?n:[n]);o(t,r)}else i()}))}),(function(e,t){i(null,t)}))}},l=lW(e,t,n,r,s);l&&s.apply(void 0,l)}else i()}function cW(e,t){return function(e,t,n){return t.reduce((function(e,t,r){var i=n&&n[r];return Array.isArray(e[t])?e[t].push(i):e[t]=t in e?[e[t],i]:i,e}),e)}({},e,t)}function dW(e,t,n,r,i,o){var a=e.path||"";if("/"===a.charAt(0)&&(n=t.pathname,r=[],i=[]),null!==n&&a){try{var s=zV(a,n);s?(n=s.remainingPathname,r=[].concat(r,s.paramNames),i=[].concat(i,s.paramValues)):n=null}catch(e){o(e)}if(""===n){var l={routes:[e],params:cW(r,i)};return void uW(e,t,r,i,(function(e,t){if(e)o(e);else{var n;if(Array.isArray(t))(n=l.routes).push.apply(n,t);else t&&l.routes.push(t);o(null,l)}}))}}if(null!=n||e.childRoutes){var u=function(a,s){a?o(a):s?pW(s,t,(function(t,n){t?o(t):n?(n.routes.unshift(e),o(null,n)):o()}),n,r,i):o()},c=lW(e,t,r,i,u);c&&u.apply(void 0,c)}else o()}function pW(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];void 0===r&&("/"!==t.pathname.charAt(0)&&(t=sW({},t,{pathname:"/"+t.pathname})),r=t.pathname),YV(e.length,(function(n,a,s){dW(e[n],t,r,i,o,(function(e,t){e||t?s(e,t):a()}))}),n)}var hW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function fW(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function gW(e,t,n){if(e[t])return new Error("<"+n+'> should not have a "'+t+'" prop')}LV.shape({listen:LV.func.isRequired,push:LV.func.isRequired,replace:LV.func.isRequired,go:LV.func.isRequired,goBack:LV.func.isRequired,goForward:LV.func.isRequired});var mW,vW=LV.elementType,yW=LV.oneOfType([vW,LV.object]),xW=LV.oneOfType([LV.object,LV.element]),_W=LV.oneOfType([xW,LV.arrayOf(xW)]),bW={exports:{}},wW={};bW.exports=function(){if(mW)return wW;mW=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function _(e){return x(e)===u}return wW.AsyncMode=l,wW.ConcurrentMode=u,wW.ContextConsumer=s,wW.ContextProvider=a,wW.Element=t,wW.ForwardRef=c,wW.Fragment=r,wW.Lazy=f,wW.Memo=h,wW.Portal=n,wW.Profiler=o,wW.StrictMode=i,wW.Suspense=d,wW.isAsyncMode=function(e){return _(e)||x(e)===l},wW.isConcurrentMode=_,wW.isContextConsumer=function(e){return x(e)===s},wW.isContextProvider=function(e){return x(e)===a},wW.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},wW.isForwardRef=function(e){return x(e)===c},wW.isFragment=function(e){return x(e)===r},wW.isLazy=function(e){return x(e)===f},wW.isMemo=function(e){return x(e)===h},wW.isPortal=function(e){return x(e)===n},wW.isProfiler=function(e){return x(e)===o},wW.isStrictMode=function(e){return x(e)===i},wW.isSuspense=function(e){return x(e)===d},wW.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},wW.typeOf=x,wW}();var SW=bW.exports;var CW=PV.shape({subscribe:PV.func.isRequired,eventIndex:PV.number.isRequired});function TW(e){return"@@contextSubscriber/"+e}var MW=void 0!==C.default.forwardRef;var EW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IW="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},AW=RV({displayName:"RouterContext",mixins:[function(e){var t,n,r=TW(e),i=r+"/listeners",o=r+"/eventIndex",a=r+"/subscribe",s=((n={childContextTypes:(t={},t[r]=CW.isRequired,t),getChildContext:function(){var e;return(e={})[r]={eventIndex:this[o],subscribe:this[a]},e},componentWillMount:function(){this[i]=[],this[o]=0},componentWillReceiveProps:function(){this[o]++},componentDidUpdate:function(){var e=this;this[i].forEach((function(t){return t(e[o])}))}})[a]=function(e){var t=this;return this[i].push(e),function(){t[i]=t[i].filter((function(t){return t!==e}))}},n);return MW&&(s.UNSAFE_componentWillMount=s.componentWillMount,s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillMount,delete s.componentWillReceiveProps),s}("router")],propTypes:{router:LV.object.isRequired,location:LV.object.isRequired,routes:LV.array.isRequired,params:LV.object.isRequired,components:LV.array.isRequired,createElement:LV.func.isRequired},getDefaultProps:function(){return{createElement:C.default.createElement}},childContextTypes:{router:LV.object.isRequired},getChildContext:function(){return{router:this.props.router}},createElement:function(e,t){return null==e?null:this.props.createElement(e,t)},render:function(){var e=this,t=this.props,n=t.location,r=t.routes,i=t.params,o=t.components,a=t.router,s=null;return o&&(s=o.reduceRight((function(t,o,s){if(null==o)return t;var l=r[s],u=function(e,t){var n={};return e.path?(HV(e.path).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})),n):n}(l,i),c={location:n,params:i,route:l,router:a,routeParams:u,routes:r};if(rW(t))c.children=t;else if(t)for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(c[d]=t[d]);if("object"===(void 0===o?"undefined":IW(o))&&!SW.isValidElementType(o)){var p={};for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(p[h]=e.createElement(o[h],EW({key:h},c)));return p}return e.createElement(o,c)}),s)),null===s||!1===s||C.default.isValidElement(s)||mV(!1),s}}),DW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function kW(e,t){var n=t.location,r=t.params,i=t.routes;return e.location=n,e.params=r,e.routes=i,e}var OW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var RW={history:LV.object,children:_W,routes:_W,render:LV.func,createElement:LV.func,onError:LV.func,onUpdate:LV.func,matchContext:LV.object},NW=void 0!==C.default.forwardRef,LW=RV({displayName:"Router",propTypes:RW,getDefaultProps:function(){return{render:function(e){return C.default.createElement(AW,e)}}},getInitialState:function(){return{location:null,routes:null,params:null,components:null}},handleError:function(e){if(!this.props.onError)throw e;this.props.onError.call(this,e)},createRouterObject:function(e){var t=this.props.matchContext;return t?t.router:function(e,t,n){return kW(DW({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive}),n)}(this.props.history,this.transitionManager,e)},createTransitionManager:function(){var e=this.props.matchContext;if(e)return e.transitionManager;var t=this.props.history,n=this.props,r=n.routes,i=n.children;return t.getCurrentLocation||mV(!1),function(e,t){var n={},r=QV(),i=r.runEnterHooks,o=r.runChangeHooks,a=r.runLeaveHooks,s=void 0;function l(e,n){s&&s.location===e?u(s,n):pW(t,e,(function(t,r){t?n(t):r?u(hW({},r,{location:e}),n):n()}))}function u(e,t){var r=WV(n,e),s=r.leaveRoutes,l=r.changeRoutes,u=r.enterRoutes;function c(r,i){if(r||i)return d(r,i);eW(e,(function(r,i){r?t(r):t(null,null,n=hW({},e,{components:i}))}))}function d(e,n){e?t(e):t(null,n)}a(s,n),s.filter((function(e){return-1===u.indexOf(e)})).forEach(y),o(l,n,e,(function(t,n){if(t||n)return d(t,n);i(u,e,c)}))}var c=1;function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.__id__||t&&(e.__id__=c++)}var p=Object.create(null);function h(e){return e.map((function(e){return p[d(e)]})).filter((function(e){return e}))}function f(e,r){pW(t,e,(function(t,i){if(null!=i){s=hW({},i,{location:e});for(var o=h(WV(n,s).leaveRoutes),a=void 0,l=0,u=o.length;null==a&&l<u;++l)a=o[l](e);r(a)}else r()}))}function g(){if(n.routes){for(var e=h(n.routes),t=void 0,r=0,i=e.length;"string"!=typeof t&&r<i;++r)t=e[r]();return t}}var m=void 0,v=void 0;function y(e){var t=d(e);t&&(delete p[t],fW(p)||(m&&(m(),m=null),v&&(v(),v=null)))}return{isActive:function(t,r){return KV(t=e.createLocation(t),r,n.location,n.routes,n.params)},match:l,listenBeforeLeavingRoute:function(t,n){var r=!fW(p),i=d(t,!0);return p[i]=n,r&&(m=e.listenBefore(f),e.listenBeforeUnload&&(v=e.listenBeforeUnload(g))),function(){y(t)}},listen:function(t){function r(r){n.location===r?t(null,n):l(r,(function(n,r,i){n?t(n):r?e.replace(r):i&&t(null,i)}))}var i=e.listen(r);return n.location?t(null,n):r(e.getCurrentLocation()),i}}}(t,aW(r||i))},componentWillMount:function(){var e=this;this.transitionManager=this.createTransitionManager(),this.router=this.createRouterObject(this.state),this._unlisten=this.transitionManager.listen((function(t,n){t?e.handleError(t):(kW(e.router,n),e.setState(n,e.props.onUpdate))}))},componentWillReceiveProps:function(e){},componentWillUnmount:function(){this._unlisten&&this._unlisten()},render:function(){var e=this.state,t=e.location,n=e.routes,r=e.params,i=e.components,o=this.props,a=o.createElement,s=o.render,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(o,["createElement","render"]);return null==t?null:(Object.keys(RW).forEach((function(e){return delete l[e]})),s(OW({},l,{router:this.router,location:t,routes:n,params:r,components:i,createElement:a})))}});NW&&(LW.prototype.UNSAFE_componentWillReceiveProps=LW.prototype.componentWillReceiveProps,LW.prototype.UNSAFE_componentWillMount=LW.prototype.componentWillMount,delete LW.prototype.componentWillReceiveProps,delete LW.prototype.componentWillMount);var PW=LV.shape({push:LV.func.isRequired,replace:LV.func.isRequired,go:LV.func.isRequired,goBack:LV.func.isRequired,goForward:LV.func.isRequired,setRouteLeaveHook:LV.func.isRequired,isActive:LV.func.isRequired});LV.shape({pathname:LV.string.isRequired,search:LV.string.isRequired,state:LV.object,action:LV.string.isRequired,key:LV.string});var BW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function jW(e,t){return"function"==typeof e?e(t.location):e}var FW=RV({displayName:"Link",mixins:[function(e){var t,n,r=TW(e),i=r+"/lastRenderedEventIndex",o=r+"/handleContextUpdate",a=r+"/unsubscribe",s=((n={contextTypes:(t={},t[r]=CW,t),getInitialState:function(){var e;return this.context[r]?((e={})[i]=this.context[r].eventIndex,e):{}},componentDidMount:function(){this.context[r]&&(this[a]=this.context[r].subscribe(this[o]))},componentWillReceiveProps:function(){var e;this.context[r]&&this.setState(((e={})[i]=this.context[r].eventIndex,e))},componentWillUnmount:function(){this[a]&&(this[a](),this[a]=null)}})[o]=function(e){var t;e!==this.state[i]&&this.setState(((t={})[i]=e,t))},n);return MW&&(s.UNSAFE_componentWillReceiveProps=s.componentWillReceiveProps,delete s.componentWillReceiveProps),s}("router")],contextTypes:{router:PW},propTypes:{to:LV.oneOfType([LV.string,LV.object,LV.func]),activeStyle:LV.object,activeClassName:LV.string,onlyActiveOnIndex:LV.bool.isRequired,onClick:LV.func,target:LV.string,innerRef:LV.oneOfType([LV.string,LV.func,LV.shape({current:LV.elementType})])},getDefaultProps:function(){return{onlyActiveOnIndex:!1,style:{}}},handleClick:function(e){if(this.props.onClick&&this.props.onClick(e),!e.defaultPrevented){var t=this.context.router;t||mV(!1),!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)&&function(e){return 0===e.button}(e)&&(this.props.target||(e.preventDefault(),t.push(jW(this.props.to,t))))}},render:function(){var e=this.props,t=e.to,n=e.activeClassName,r=e.activeStyle,i=e.onlyActiveOnIndex,o=e.innerRef,a=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","activeClassName","activeStyle","onlyActiveOnIndex","innerRef"]),s=this.context.router;if(s){if(!t)return C.default.createElement("a",BW({},a,{ref:o}));var l=jW(t,s);a.href=s.createHref(l),(n||null!=r&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(r))&&s.isActive(l,i)&&(n&&(a.className?a.className+=" "+n:a.className=n),r&&(a.style=BW({},a.style,r)))}return C.default.createElement("a",BW({},a,{onClick:this.handleClick,ref:o}))}}),UW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};RV({displayName:"IndexLink",render:function(){return C.default.createElement(FW,UW({},this.props,{onlyActiveOnIndex:!0}))}});var zW,HW={exports:{}},VW={};HW.exports=function(){if(zW)return VW;zW=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function _(e){return x(e)===u}return VW.AsyncMode=l,VW.ConcurrentMode=u,VW.ContextConsumer=s,VW.ContextProvider=a,VW.Element=t,VW.ForwardRef=c,VW.Fragment=r,VW.Lazy=f,VW.Memo=h,VW.Portal=n,VW.Profiler=o,VW.StrictMode=i,VW.Suspense=d,VW.isAsyncMode=function(e){return _(e)||x(e)===l},VW.isConcurrentMode=_,VW.isContextConsumer=function(e){return x(e)===s},VW.isContextProvider=function(e){return x(e)===a},VW.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},VW.isForwardRef=function(e){return x(e)===c},VW.isFragment=function(e){return x(e)===r},VW.isLazy=function(e){return x(e)===f},VW.isMemo=function(e){return x(e)===h},VW.isPortal=function(e){return x(e)===n},VW.isProfiler=function(e){return x(e)===o},VW.isStrictMode=function(e){return x(e)===i},VW.isSuspense=function(e){return x(e)===d},VW.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},VW.typeOf=x,VW}();var WW=HW.exports,YW={};YW[WW.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},YW[WW.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var GW=RV({displayName:"Redirect",statics:{createRouteFromReactElement:function(e){var t=iW(e);return t.from&&(t.path=t.from),t.onEnter=function(e,n){var r=e.location,i=e.params,o=void 0;if("/"===t.to.charAt(0))o=VV(t.to,i);else if(t.to){var a=e.routes.indexOf(t);o=VV(GW.getRoutePattern(e.routes,a-1).replace(/\/*$/,"/")+t.to,i)}else o=r.pathname;n({pathname:o,query:t.query||r.query,state:t.state||r.state})},t},getRoutePattern:function(e,t){for(var n="",r=t;r>=0;r--){var i=e[r].path||"";if(n=i.replace(/\/*$/,"/")+n,0===i.indexOf("/"))break}return"/"+n}},propTypes:{path:LV.string,from:LV.string,to:LV.string.isRequired,query:LV.object,state:LV.object,onEnter:gW,children:gW},render:function(){mV(!1)}});RV({displayName:"IndexRedirect",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=GW.createRouteFromReactElement(e))}},propTypes:{to:LV.string.isRequired,query:LV.object,state:LV.object,onEnter:gW,children:gW},render:function(){mV(!1)}}),RV({displayName:"IndexRoute",statics:{createRouteFromReactElement:function(e,t){t&&(t.indexRoute=iW(e))}},propTypes:{path:gW,component:vW,components:yW,getComponent:LV.func,getComponents:LV.func},render:function(){mV(!1)}}),RV({displayName:"Route",statics:{createRouteFromReactElement:iW},propTypes:{path:LV.string,component:vW,components:yW,getComponent:LV.func,getComponents:LV.func},render:function(){mV(!1)}});var qW={__esModule:!0,PUSH:"PUSH",REPLACE:"REPLACE",POP:"POP"},QW={},ZW=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},XW=_V;function $W(e,t){return t.encode?t.strict?ZW(e):encodeURIComponent(e):e}function KW(e){return Array.isArray(e)?e.sort():"object"==typeof e?KW(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}QW.extract=function(e){return e.split("?")[1]||""},QW.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=XW({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(i),o,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=KW(n):e[t]=n,e}),Object.create(null))):r},QW.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[$W(t,e),"[",r,"]"].join(""):[$W(t,e),"[",$W(r,e),"]=",$W(n,e)].join("")};case"bracket":return function(t,n){return null===n?$W(t,e):[$W(t,e),"[]=",$W(n,e)].join("")};default:return function(t,n){return null===n?$W(t,e):[$W(t,e),"=",$W(n,e)].join("")}}}(t=XW({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return $W(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return $W(r,t)+"="+$W(i,t)})).filter((function(e){return e.length>0})).join("&"):""};var JW,eY={__esModule:!0};!(JW=BV)||JW.__esModule;eY.default=function(e,t,n){var r=e(t,n);e.length<2&&n(r)};var tY={},nY={__esModule:!0};nY.createPath=nY.parsePath=nY.getQueryStringValueFromPath=nY.stripQueryStringValueFromPath=nY.addQueryStringValueToPath=void 0,function(e){e&&e.__esModule}(BV),nY.addQueryStringValueToPath=function(e,t,n){var r=rY(e),i=r.pathname,o=r.search,a=r.hash;return iY({pathname:i,search:o+(-1===o.indexOf("?")?"?":"&")+t+"="+n,hash:a})},nY.stripQueryStringValueFromPath=function(e,t){var n=rY(e),r=n.pathname,i=n.search,o=n.hash;return iY({pathname:r,search:i.replace(new RegExp("([?&])"+t+"=[a-zA-Z0-9]+(&?)"),(function(e,t,n){return"?"===t?t:n})),hash:o})},nY.getQueryStringValueFromPath=function(e,t){var n=rY(e).search.match(new RegExp("[?&]"+t+"=([a-zA-Z0-9]+)"));return n&&n[1]};var rY=nY.parsePath=function(e){var t=function(e){var t=e.match(/^(https?:)?\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}(e),n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substring(i),t=t.substring(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substring(o),t=t.substring(0,o)),""===t&&(t="/"),{pathname:t,search:n,hash:r}},iY=nY.createPath=function(e){if(null==e||"string"==typeof e)return e;var t=e.basename,n=e.pathname,r=e.search,i=e.hash,o=(t||"")+n;return r&&"?"!==r&&(o+=r),i&&(o+=i),o};tY.__esModule=!0,tY.locationsAreEqual=tY.statesAreEqual=tY.createLocation=tY.createQuery=void 0;var oY="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},aY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sY=cY(gV);cY(BV);var lY=nY,uY=qW;function cY(e){return e&&e.__esModule?e:{default:e}}tY.createQuery=function(e){return aY(Object.create(null),e)},tY.createLocation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uY.POP,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r="string"==typeof e?(0,lY.parsePath)(e):e;return{pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:r.state,action:t,key:n}};var dY=function(e){return"[object Date]"===Object.prototype.toString.call(e)},pY=tY.statesAreEqual=function e(t,n){if(t===n)return!0;var r=void 0===t?"undefined":oY(t);if(r!==(void 0===n?"undefined":oY(n)))return!1;if("function"===r&&(0,sY.default)(!1),"object"===r){if(dY(t)&&dY(n)&&(0,sY.default)(!1),!Array.isArray(t)){var i=Object.keys(t),o=Object.keys(n);return i.length===o.length&&i.every((function(r){return e(t[r],n[r])}))}return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}))}return!1};tY.locationsAreEqual=function(e,t){return e.key===t.key&&e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&pY(e.state,t.state)};var hY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fY=QW,gY=function(e){return e&&e.__esModule?e:{default:e}}(eY),mY=tY,vY=nY;var yY=function(e){return(0,fY.stringify)(e).replace(/%20/g,"+")},xY=fY.parse,_Y=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.stringifyQuery,i=t.parseQueryString;"function"!=typeof r&&(r=yY),"function"!=typeof i&&(i=xY);var o=function(e){return e?(null==e.query&&(e.query=i(e.search.substring(1))),e):e},a=function(e,t){if(null==t)return e;var n="string"==typeof e?(0,vY.parsePath)(e):e,i=r(t);return hY({},n,{search:i?"?"+i:""})};return hY({},n,{getCurrentLocation:function(){return o(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,gY.default)(e,o(t),n)}))},listen:function(e){return n.listen((function(t){return e(o(t))}))},push:function(e){return n.push(a(e,e.query))},replace:function(e){return n.replace(a(e,e.query))},createPath:function(e){return n.createPath(a(e,e.query))},createHref:function(e){return n.createHref(a(e,e.query))},createLocation:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];var s=n.createLocation.apply(n,[a(e,e.query)].concat(r));return e.query&&(s.query=(0,mY.createQuery)(e.query)),o(s)}})}},bY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wY=function(e){return e&&e.__esModule?e:{default:e}}(eY),SY=nY;var CY=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(t),r=t.basename,i=function(e){return e?(r&&null==e.basename&&(0===e.pathname.toLowerCase().indexOf(r.toLowerCase())?(e.pathname=e.pathname.substring(r.length),e.basename=r,""===e.pathname&&(e.pathname="/")):e.basename=""),e):e},o=function(e){if(!r)return e;var t="string"==typeof e?(0,SY.parsePath)(e):e,n=t.pathname,i="/"===r.slice(-1)?r:r+"/",o="/"===n.charAt(0)?n.slice(1):n;return bY({},t,{pathname:i+o})};return bY({},n,{getCurrentLocation:function(){return i(n.getCurrentLocation())},listenBefore:function(e){return n.listenBefore((function(t,n){return(0,wY.default)(e,i(t),n)}))},listen:function(e){return n.listen((function(t){return e(i(t))}))},push:function(e){return n.push(o(e))},replace:function(e){return n.replace(o(e))},createPath:function(e){return n.createPath(o(e))},createHref:function(e){return n.createHref(o(e))},createLocation:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return i(n.createLocation.apply(n,[o(e)].concat(r)))}})}},TY={},MY={__esModule:!0,loopAsync:function(e,t,n){var r=0,i=!1,o=!1,a=!1,s=void 0,l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];i=!0,o?s=t:n.apply(void 0,t)};!function u(){if(!i&&(a=!0,!o)){for(o=!0;!i&&r<e&&a;)a=!1,t(r++,u,l);o=!1,i?n.apply(void 0,s):r>=e&&a&&(i=!0,n())}}()}};TY.__esModule=!0;var EY=MY,IY=nY,AY=function(e){return e&&e.__esModule?e:{default:e}}(eY),DY=qW,kY=tY;function OY(e){return e&&e.__esModule?e:{default:e}}TY.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getCurrentLocation,n=e.getUserConfirmation,r=e.pushLocation,i=e.replaceLocation,o=e.go,a=e.keyLength,s=void 0,l=void 0,u=[],c=[],d=[],p=function(e){var t=l&&l.action===DY.POP?d.indexOf(l.key):s?d.indexOf(s.key):-1;(s=e).action===DY.PUSH?d=[].concat(d.slice(0,t+1),[s.key]):s.action===DY.REPLACE&&(d[t]=s.key),c.forEach((function(e){return e(s)}))},h=function(e){var t,a;s&&(0,kY.locationsAreEqual)(s,e)||l&&(0,kY.locationsAreEqual)(l,e)||(l=e,t=e,a=function(t){if(l===e)if(l=null,t){if(e.action===DY.PUSH){var n=(0,IY.createPath)(s);(0,IY.createPath)(e)===n&&(0,kY.statesAreEqual)(s.state,e.state)&&(e.action=DY.REPLACE)}e.action===DY.POP?p(e):e.action===DY.PUSH?!1!==r(e)&&p(e):e.action===DY.REPLACE&&!1!==i(e)&&p(e)}else if(s&&e.action===DY.POP){var a=d.indexOf(s.key),u=d.indexOf(e.key);-1!==a&&-1!==u&&o(a-u)}},(0,EY.loopAsync)(u.length,(function(e,n,r){(0,AY.default)(u[e],t,(function(e){return null!=e?r(e):n()}))}),(function(e){n&&"string"==typeof e?n(e,(function(e){return a(!1!==e)})):a(!1!==e)})))},f=function(){return Math.random().toString(36).substr(2,a||6)},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f();return(0,kY.createLocation)(e,t,n)};return{getCurrentLocation:t,listenBefore:function(e){return u.push(e),function(){return u=u.filter((function(t){return t!==e}))}},listen:function(e){return c.push(e),function(){return c=c.filter((function(t){return t!==e}))}},transitionTo:h,push:function(e){return h(g(e,DY.PUSH))},replace:function(e){return h(g(e,DY.REPLACE))},go:o,goBack:function(){return o(-1)},goForward:function(){return o(1)},createKey:f,createPath:IY.createPath,createHref:function(e){return(0,IY.createPath)(e)},createLocation:g}},OY(BV),OY(gV),OY(TY);var RY={__esModule:!0};RY.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement);var NY={},LY={__esModule:!0,addEventListener:function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},supportsHistory:function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},supportsGoWithoutReloadUsingHash:function(){return-1===window.navigator.userAgent.indexOf("Firefox")},supportsPopstateOnHashchange:function(){return-1===window.navigator.userAgent.indexOf("Trident")},isExtraneousPopstateEvent:function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},PY={__esModule:!0};PY.readState=PY.saveState=void 0,function(e){e&&e.__esModule}(BV);var BY={QuotaExceededError:!0,QUOTA_EXCEEDED_ERR:!0},jY={SecurityError:!0},FY=function(e){return"@@History/"+e};PY.saveState=function(e,t){if(window.sessionStorage)try{null==t?window.sessionStorage.removeItem(FY(e)):window.sessionStorage.setItem(FY(e),JSON.stringify(t))}catch(e){if(jY[e.name])return;if(BY[e.name]&&0===window.sessionStorage.length)return;throw e}},PY.readState=function(e){var t=void 0;try{t=window.sessionStorage.getItem(FY(e))}catch(e){if(jY[e.name])return}if(t)try{return JSON.parse(t)}catch(e){}},NY.__esModule=!0,NY.go=NY.replaceLocation=NY.pushLocation=NY.startListener=NY.getUserConfirmation=NY.getCurrentLocation=void 0;var UY=tY,zY=LY,HY=PY,VY=nY,WY="popstate",YY="hashchange",GY=RY.canUseDOM&&!(0,zY.supportsPopstateOnHashchange)(),qY=function(e){var t=e&&e.key;return(0,UY.createLocation)({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:t?(0,HY.readState)(t):void 0},void 0,t)},QY=NY.getCurrentLocation=function(){var e=void 0;try{e=window.history.state||{}}catch(t){e={}}return qY(e)};NY.getUserConfirmation=function(e,t){return t(window.confirm(e))},NY.startListener=function(e){var t=function(t){(0,zY.isExtraneousPopstateEvent)(t)||e(qY(t.state))};(0,zY.addEventListener)(window,WY,t);var n=function(){return e(QY())};return GY&&(0,zY.addEventListener)(window,YY,n),function(){(0,zY.removeEventListener)(window,WY,t),GY&&(0,zY.removeEventListener)(window,YY,n)}};var ZY=function(e,t){var n=e.state,r=e.key;void 0!==n&&(0,HY.saveState)(r,n),t({key:r},(0,VY.createPath)(e))};NY.pushLocation=function(e){return ZY(e,(function(e,t){return window.history.pushState(e,null,t)}))},NY.replaceLocation=function(e){return ZY(e,(function(e,t){return window.history.replaceState(e,null,t)}))},NY.go=function(e){e&&window.history.go(e)};var XY={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=NY;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}});var n=tY,r=nY;e.getCurrentLocation=function(){return(0,n.createLocation)(window.location)},e.pushLocation=function(e){return window.location.href=(0,r.createPath)(e),!1},e.replaceLocation=function(e){return window.location.replace((0,r.createPath)(e)),!1}}(XY);var $Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KY=oG(gV),JY=RY,eG=iG(NY),tG=iG(XY),nG=LY,rG=oG(TY);function iG(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function oG(e){return e&&e.__esModule?e:{default:e}}var aG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};JY.canUseDOM||(0,KY.default)(!1);var t=e.forceRefresh||!(0,nG.supportsHistory)()?tG:eG,n=t.getUserConfirmation,r=t.getCurrentLocation,i=t.pushLocation,o=t.replaceLocation,a=t.go,s=(0,rG.default)($Y({getUserConfirmation:n},e,{getCurrentLocation:r,pushLocation:i,replaceLocation:o,go:a})),l=0,u=void 0,c=function(e,t){1==++l&&(u=eG.startListener(s.transitionTo));var n=t?s.listenBefore(e):s.listen(e);return function(){n(),0==--l&&u()}};return $Y({},s,{listenBefore:function(e){return c(e,!0)},listen:function(e){return c(e,!1)}})},sG=!("undefined"==typeof window||!window.document||!window.document.createElement);function lG(e){var t=void 0;return sG&&(t=function(e){return function(t){return _Y(CY(e))(t)}}(e)()),t}lG(aG);var uG={};!function(e){e.__esModule=!0,e.replaceLocation=e.pushLocation=e.startListener=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var t=NY;Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return t.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return t.go}}),function(e){e&&e.__esModule}(BV);var n=tY,r=LY,i=PY,o=nY;var a="hashchange",s=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},l=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)},u=e.getCurrentLocation=function(e,t){var r=e.decodePath(s()),a=(0,o.getQueryStringValueFromPath)(r,t),l=void 0;a&&(r=(0,o.stripQueryStringValueFromPath)(r,t),l=(0,i.readState)(a));var u=(0,o.parsePath)(r);return u.state=l,(0,n.createLocation)(u,void 0,a)},c=void 0;e.startListener=function(e,t,n){var i=function(){var r=s(),i=t.encodePath(r);if(r!==i)l(i);else{var o=u(t,n);if(c&&o.key&&c.key===o.key)return;c=o,e(o)}},o=s(),d=t.encodePath(o);return o!==d&&l(d),(0,r.addEventListener)(window,a,i),function(){return(0,r.removeEventListener)(window,a,i)}};var d=function(e,t,n,r){var a=e.state,s=e.key,l=t.encodePath((0,o.createPath)(e));void 0!==a&&(l=(0,o.addQueryStringValueToPath)(l,n,s),(0,i.saveState)(s,a)),c=e,r(l)};e.pushLocation=function(e,t,n){return d(e,t,n,(function(e){s()!==e&&function(e){window.location.hash=e}(e)}))},e.replaceLocation=function(e,t,n){return d(e,t,n,(function(e){s()!==e&&l(e)}))}}(uG);var cG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};mG(BV);var dG=mG(gV),pG=RY,hG=LY,fG=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(uG),gG=mG(TY);function mG(e){return e&&e.__esModule?e:{default:e}}var vG=function(e){return"/"===e.charAt(0)?e:"/"+e},yG={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!"+e},decodePath:function(e){return"!"===e.charAt(0)?e.substring(1):e}},noslash:{encodePath:function(e){return"/"===e.charAt(0)?e.substring(1):e},decodePath:vG},slash:{encodePath:vG,decodePath:vG}};lG((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};pG.canUseDOM||(0,dG.default)(!1);var t=e.queryKey,n=e.hashType;"string"!=typeof t&&(t="_k"),null==n&&(n="slash"),n in yG||(n="slash");var r=yG[n],i=fG.getUserConfirmation,o=(0,gG.default)(cG({getUserConfirmation:i},e,{getCurrentLocation:function(){return fG.getCurrentLocation(r,t)},pushLocation:function(e){return fG.pushLocation(e,r,t)},replaceLocation:function(e){return fG.replaceLocation(e,r,t)},go:fG.go})),a=0,s=void 0,l=function(e,n){1==++a&&(s=fG.startListener(o.transitionTo,r,t));var i=n?o.listenBefore(e):o.listen(e);return function(){i(),0==--a&&s()}};(0,hG.supportsGoWithoutReloadUsingHash)();return cG({},o,{listenBefore:function(e){return l(e,!0)},listen:function(e){return l(e,!1)},go:function(e){o.go(e)},createHref:function(e){return"#"+r.encodePath(o.createHref(e))}})}));var xG=function(n){var i,o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,C,T,M,E,I,A,D,k,O,R,N,L=n.appName,P=n.universeData,B=n.anomalyData,j=n.isDrilldownView,U=void 0===j||j,z=n.queryObject,H=n.onSelectedQuery,V=n.onSelectedIssue,W=Kl(),G=_t(),q=t.useState(!0),Z=q[0],X=q[1],$=window.location.pathname.includes("".concat(Xs.INSIGHTS)),K=window.location.href,J=K.substring(0,K.lastIndexOf("/")),ee=new URLSearchParams(window.location.search),te=ee.get("duration"),ne=ee.get("startTime"),re=ee.get("endTime"),ie=ee.get("dbId"),oe=ee.get("userId"),ae=ee.get("universeId"),se=ee.get("type"),le=ee.get("tab"),ue=new URLSearchParams;Ja(te)&&ue.append("duration",te),Ja(ne)&&ue.append("startTime",ne),Ja(re)&&ue.append("endTime",re),Ja(ie)&&ue.delete("dbId",ie),Ja(oe)&&ue.delete("userId",oe),Ja(ae)&&ue.delete("universeId",ae),Ja(se)&&ue.delete("type",se),L===exports.AppName.YBA&&Ja(le)&&ue.append("tab",le),N="".concat(J).concat(ue.toString()?"?".concat(ue.toString()):"");var ce=new URL(window.location.href);if(L===exports.AppName.YBM){["universeId","queryId","dbId","userId"].forEach((function(e){return ce.searchParams.delete(e)}))}var de="HOT_TABLET"===(null===(i=null==B?void 0:B.lastInstance)||void 0===i?void 0:i.type)||"LARGE_TABLET"===(null===(o=null==B?void 0:B.lastInstance)||void 0===o?void 0:o.type),pe=null===(a=null==B?void 0:B.lastInstance)||void 0===a?void 0:a.entityDisplayName,he=null===(s=null==B?void 0:B.lastInstance)||void 0===s?void 0:s.category,fe=(he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP)&&(null===(d=null===(c=null===(u=null===(l=null==P?void 0:P.universeDetails)||void 0===l?void 0:l.nodeDetailsSet)||void 0===u?void 0:u.find((function(e){return e.nodeName===pe})))||void 0===c?void 0:c.cloudInfo)||void 0===d?void 0:d.region),ge=(he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP)&&(null===(g=null===(f=null===(h=null===(p=null==P?void 0:P.universeDetails)||void 0===p?void 0:p.nodeDetailsSet)||void 0===h?void 0:h.find((function(e){return e.nodeName===pe})))||void 0===f?void 0:f.cloudInfo)||void 0===g?void 0:g.az);return e.jsxs(r.Box,{children:[e.jsxs(r.Box,F({display:"flex"},{children:[e.jsx(r.Box,{children:U&&e.jsxs(r.Breadcrumbs,F({className:W.breadCrumb,separator:e.jsx(r.Typography,F({variant:"body2",style:{fontSize:"18px"}},{children:"/"})),"aria-label":"breadcrumb","data-testid":"GenericHeader-Breadcrumb"},{children:[e.jsx(r.Link,F({className:W.breadcrumbColor,component:FW,variant:"h5",onClick:function(){L===exports.AppName.YBM?B?(null==V||V(null),window.history.pushState({},"",window.location.href)):(null==H||H(null),window.history.pushState({},"",ce.toString())):window.location.href=N},to:"#"},{children:e.jsx("span",F({className:W.breadCrumbText},{children:"Cluster Load"}))})),e.jsx(r.Link,F({className:W.breadcrumbColor,component:FW,variant:"h5",onClick:function(){L===exports.AppName.YBM?B?(null==V||V(null),window.history.pushState({},"",window.location.href)):(null==H||H(null),window.history.pushState({},"",ce.toString())):window.location.href=N},to:"#"},{children:B?e.jsx("span",F({className:Y(W.breadCrumbText),style:{color:"capitalize"}},{children:he?"".concat(he.charAt(0).toUpperCase()+he.slice(1).toLowerCase()," ").concat($?"Insights":"Anomalies"," "):"Unknown ".concat($?"Insights":"Anomalies")})):e.jsx("span",F({className:W.breadCrumbText},{children:"Query"}))})),e.jsx(r.Link,F({className:W.breadcrumbDefaultColor,component:"span",variant:"h5"},{children:B?e.jsx("span",F({className:Y(W.breadCrumbText)},{children:(null!==(m=null==pe?void 0:pe.length)&&void 0!==m?m:0)>30?"".concat(null==pe?void 0:pe.substring(0,30),"..."):pe})):e.jsx("span",F({className:Y(W.breadCrumbText)},{children:(null!==(y=null===(v=null==z?void 0:z.query)||void 0===v?void 0:v.length)&&void 0!==y?y:0)>30?"".concat(null===(x=null==z?void 0:z.query)||void 0===x?void 0:x.substring(0,30),"..."):null==z?void 0:z.query}))}))]}))}),e.jsx(r.Box,F({ml:2,style:{marginTop:"-4px"}},{children:!Z&&e.jsx(Q,F({size:"small",variant:"secondary",onClick:function(){return X(!0)},startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.66667 3.66667H1M4.33333 1H1M12.3333 6.33333H1M9.66667 9H1' stroke='%232B59C3' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Maximize Icon"})},{children:"Show Details"}))}))]})),U&&Z&&e.jsx(r.Box,F({className:Y(W.headerMetadataBox,W.boxContainer,W.flexColumn),mt:1},{children:B?e.jsxs(r.Box,F({className:W.flexRow,width:"100%",justifyContent:"space-between"},{children:[e.jsxs(r.Box,F({className:W.flexColumn},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:Ll})),e.jsx(r.Box,F({className:W.anomalyTypeTag},{children:e.jsx("span",F({className:W.anomalyTypeText},{children:wl[null===(_=null==B?void 0:B.lastInstance)||void 0===_?void 0:_.type]}))}))]})),e.jsxs(r.Box,F({className:W.flexColumn},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:null===(w=Al[null===(b=null==B?void 0:B.lastInstance)||void 0===b?void 0:b.type])||void 0===w?void 0:w.title})),e.jsxs(r.Box,{children:[e.jsx("span",F({className:W.regularMetadata},{children:(null===(C=null===(S=null==B?void 0:B.lastInstance)||void 0===S?void 0:S.entityDisplayName)||void 0===C?void 0:C.length)>30?"".concat(null==pe?void 0:pe.substring(0,he===exports.AnomalyCategory.SQL?40:30),"..."):pe})),e.jsx("img",{src:"data:image/svg+xml,%3csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.5 7.001V8.001H7C6.17157 8.001 5.5 8.67257 5.5 9.501V18.501C5.5 19.3294 6.17157 20.001 7 20.001H14C14.8284 20.001 15.5 19.3294 15.5 18.501V17.001H16.5V18.501C16.5 19.8817 15.3807 21.001 14 21.001H7C5.61929 21.001 4.5 19.8817 4.5 18.501V9.501C4.5 8.12029 5.61929 7.001 7 7.001H8.5ZM16.5 4.001H11C10.1716 4.001 9.5 4.67258 9.5 5.501V14.501C9.5 15.3294 10.1716 16.001 11 16.001H18C18.8284 16.001 19.5 15.3294 19.5 14.501V7.001H17C16.7239 7.001 16.5 6.77714 16.5 6.501V4.001ZM20.5 6.52898V14.501C20.5 15.8817 19.3807 17.001 18 17.001H11C9.61929 17.001 8.5 15.8817 8.5 14.501V5.501C8.5 4.12029 9.61929 3.001 11 3.001H16.972C17.1048 2.99258 17.2429 3.03684 17.3536 3.14745L20.3536 6.14745C20.4642 6.25806 20.5084 6.39623 20.5 6.52898ZM17.5 6.001H18.7929L17.5 4.70811V6.001ZM12 13.001C11.7239 13.001 11.5 12.7771 11.5 12.501C11.5 12.2249 11.7239 12.001 12 12.001H14C14.2761 12.001 14.5 12.2249 14.5 12.501C14.5 12.7771 14.2761 13.001 14 13.001H12ZM12 11.001C11.7239 11.001 11.5 10.7771 11.5 10.501C11.5 10.2249 11.7239 10.001 12 10.001H17C17.2761 10.001 17.5 10.2249 17.5 10.501C17.5 10.7771 17.2761 11.001 17 11.001H12ZM12 9.001C11.7239 9.001 11.5 8.77714 11.5 8.501C11.5 8.22486 11.7239 8.001 12 8.001H17C17.2761 8.001 17.5 8.22486 17.5 8.501C17.5 8.77714 17.2761 9.001 17 9.001H12Z' fill='%230B1117'/%3e%3c/svg%3e",alt:"Copy Icon",style:{marginLeft:"4px",cursor:"pointer"},onClick:function(){navigator.clipboard.writeText(pe)}})]})]})),e.jsxs(r.Box,F({className:W.flexColumn},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:he===exports.AnomalyCategory.DB?void 0!==de?de?Nl:Rl:Ol:he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP?Pl:null})),e.jsx(r.Box,{children:e.jsx("span",F({className:W.regularMetadata},{children:he===exports.AnomalyCategory.DB?de?null===(I=null===(E=null===(M=null===(T=null==B?void 0:B.lastInstance)||void 0===T?void 0:T.mainGraphs)||void 0===M?void 0:M[0].filters)||void 0===E?void 0:E.tabletId)||void 0===I?void 0:I[0]:null===(O=null===(k=null===(D=null===(A=null==B?void 0:B.lastInstance)||void 0===A?void 0:A.mainGraphs)||void 0===D?void 0:D[0].filters)||void 0===k?void 0:k.tableName)||void 0===O?void 0:O[0]:he===exports.AnomalyCategory.NODE||he===exports.AnomalyCategory.APP?e.jsxs(e.Fragment,{children:[fe,fe&&ge&&" / ",ge]}):null}))})]})),e.jsx(r.Box,{children:e.jsx(Q,F({size:"small",variant:"ghost",onClick:function(){return X(!1)}},{children:e.jsx("span",F({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))})]})):e.jsxs(r.Box,{children:[e.jsxs(r.Box,F({className:W.flexRow,width:"100%"},{children:[e.jsxs(r.Box,F({className:W.flexColumn,alignItems:"flex-start",flex:1},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:Dl})),e.jsx(r.Box,{children:null==z?void 0:z.namespaceName})]})),e.jsxs(r.Box,F({className:W.flexColumn,alignItems:"flex-start",flex:1},{children:[e.jsx(r.Box,F({className:W.headerTitle},{children:kl})),e.jsx(r.Box,{children:null==z?void 0:z.queryType})]})),e.jsx(r.Box,F({className:W.flexColumn,alignItems:"flex-start",ml:"auto"},{children:e.jsx(Q,F({size:"small",variant:"ghost",onClick:function(){return X(!1)}},{children:e.jsx("span",F({style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"}},{children:"Hide Details"}))}))}))]})),e.jsx(r.Box,F({className:W.flexColumn,mt:1},{children:e.jsx(r.Box,F({width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"}},{children:e.jsx(xt,{text:null!==(R=null==z?void 0:z.query)&&void 0!==R?R:"",showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,codeClassName:L===exports.AppName.YBM?G.queryCodeElement:G.queryCodeElementWeb,preClassName:G.queryPreBlockFull,containerClassName:G.queryContainerCode},"TableHelperQueries-query")}))}))]})}))]})},_G=C.default.memo((function(i){var o,a=i.universeUuid,s=i.universeData,l=i.anomalyData,u=i.amomalyGraphRequestParams,c=i.appName,d=i.timezone,p=i.formattedAnomalyRca,h=i.apiUrl,f=i.universeQueryData,g=i.universeQueryStatsData,m=i.isHistoricalQueryView,v=i.troubleshootUuid,y=i.queryIdParam,x=i.onSelectedIssue,_=i.onSelectedQuery,b=Kl(),w=function(e){var t,n,r,i,o,a,s=exports.MetricMeasure.OVERALL;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Ps.NONE&&(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitType)===Ps.NONE&&(s=exports.MetricMeasure.OVERALL),(null===(r=null==e?void 0:e.defaultSettings)||void 0===r?void 0:r.splitMode)!==Ls.TOP&&(null===(i=null==e?void 0:e.defaultSettings)||void 0===i?void 0:i.splitMode)!==Ls.BOTTOM||(s=exports.MetricMeasure.OUTLIER,(null===(o=null==e?void 0:e.defaultSettings)||void 0===o?void 0:o.splitType)===Ps.TABLE?s=exports.MetricMeasure.OUTLIER_TABLES:(null===(a=null==e?void 0:e.defaultSettings)||void 0===a?void 0:a.splitType)===Ps.NAMESPACE&&(s=exports.MetricMeasure.OUTLIER_DB)),s}(l),S=function(e){var t,n,r=Ls.TOP;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Ls.TOP?r=Ls.TOP:(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitMode)===Ls.BOTTOM&&(r=Ls.BOTTOM),r}(l),C=function(e){var t,n,r=3;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitCount)>0&&(r=null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitCount),r}(l),T=new URLSearchParams(window.location.search),M={startTime:T.get("startTime"),endTime:T.get("endTime"),duration:T.get("duration"),dbId:T.get("dbId"),queryId:null!=y?y:void 0,userId:T.get("userId"),type:T.get("type"),universeId:a},E=null==M?void 0:M.endTime,I=E?new Date(E):new Date,A=new Date(I);(null==M?void 0:M.startTime)?A=new Date(null==M?void 0:M.startTime):A.setDate(A.getDate()-1);var D=t.useState($s),k=D[0],O=D[1],R=t.useState(Js),N=R[0],L=R[1],P=t.useState(!0),B=P[0],j=P[1],U=t.useState(Ks),z=U[0],H=U[1],V=t.useState(Ks),W=V[0],Y=V[1],G=t.useState(Ks),q=G[0],Q=G[1],Z=t.useState(Ks),X=Z[0],$=Z[1],K=t.useState(w),J=K[0],ee=K[1],te=t.useState(S),ne=te[0],re=te[1],ie=t.useState(null!==(o=null==M?void 0:M.duration)&&void 0!==o?o:El[0].value),oe=ie[0],ae=ie[1],se=t.useState(C),le=se[0],ue=se[1],ce=t.useState((function(){return Nu(oe,I,A)})),de=ce[0],pe=ce[1],he=t.useState(null),fe=he[0],ge=he[1],me=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsById,a,null==l?void 0:l.groupId,de.startDateTime,de.endDateTime],(function(){return l&&(null==l?void 0:l.groupId)?uV.fetchAnomalyGroupById(a,l.groupId,de.startDateTime.toISOString(),de.endDateTime.toISOString(),h):Promise.reject(new Error("Anomaly data or group ID is missing"))}),{onSuccess:function(e){ge(e)},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!m&&Ja(v)}),ve=function(){var e,t,n=null===(e=de.startDateTime)||void 0===e?void 0:e.toISOString(),r=null===(t=de.endDateTime)||void 0===t?void 0:t.toISOString();return{universeUuid:a,cluster:z,region:W,zone:q,node:X,metricMeasure:J,numNodes:le,outlierType:ne,formattedStartDate:n,formattedEndDate:r}},ye=function(){if(oe!==Ml.CUSTOM){var e=Ru(oe,I),t=e.formattedStartDate,n=e.formattedEndDate;pe({startDateTime:t,endDateTime:n})}};t.useEffect((function(){ye()}),[oe]);var xe=function(e,t){pe({startDateTime:new Date(e),endDateTime:new Date(t)})};t.useEffect((function(){(null==M?void 0:M.duration)&&Ja(M.duration)&&ye()}),[]);var _e=function(e){ee(e)},be=function(e){re(e)},we=function(e){ue(e>10?10:e)},Se=function(e,t,n,r){j(r),n===$s&&(O($s),H(Ks),Y(Ks)),(e||t)&&(O(n),e&&(H(n),Y("")),t&&(Y(n),H("")))},Ce=function(e,t,n){n===Js&&(L(Js),Q(Ks),$(Ks)),(e||t)&&(L(n),e&&(Q(n),$("")),t&&(Q(""),$(n)))},Te=null==M?void 0:M.queryId,Me=m?Te:null==Te?void 0:Te[0],Ee=null==g?void 0:g.find((function(e){return e.queryId===Me}));return e.jsxs(r.Box,F({style:{height:"100vh",display:"flex",flexDirection:"column"}},{children:[e.jsx(xG,{appName:c,universeData:s,queryObject:Ee,anomalyData:Ka(fe)?fe:null,onSelectedIssue:Ka(l)?x:void 0,onSelectedQuery:_}),e.jsx(r.Box,F({className:b.stickyHeader},{children:e.jsx(Pu,{appName:c,filterDuration:oe,startDateTime:de.startDateTime,endDateTime:de.endDateTime,timezone:d,onSelectedFilterDuration:function(e){ae(e)},metricMeasure:J,onStartDateChange:function(e){pe((function(t){return F(F({},t),{startDateTime:new Date(e.target.value)})}))},onEndDateChange:function(e){pe((function(t){return F(F({},t),{endDateTime:new Date(e.target.value)})}))},onRefresh:function(){pe((function(e){return F(F({},e),{endDateTime:new Date})}))}})})),e.jsx(r.Box,F({className:b.headerContainer,style:{flex:1,overflow:"auto",paddingTop:"16px"}},{children:Ka(fe)?e.jsxs(e.Fragment,{children:[e.jsx(Lu,{appName:c,universeData:s,anomalyData:fe,clusterRegionItem:k,zoneNodeItem:N,isPrimaryCluster:B,cluster:z,region:W,metricMeasure:J,outlierType:ne,numNodes:le,onZoneNodeSelected:Ce,onClusterRegionSelected:Se,onOutlierTypeSelected:be,onSplitTypeSelected:_e,onNumNodesChanged:we}),e.jsx(fV,{metricMeasure:J,appName:c,dateTimeRange:de,timezone:d,universeQueryData:f,amomalyGraphRequestParams:u,formattedAnomalyRca:p,apiUrl:h,anomalyData:fe,gantChartData:me,onEChartsDateSelect:xe,onSelectedIssue:x,urlParams:M,getClusterDetails:ve})]}):e.jsxs(e.Fragment,{children:[e.jsx(Lu,{appName:c,universeData:s,anomalyData:null,clusterRegionItem:k,zoneNodeItem:N,isPrimaryCluster:B,cluster:z,region:W,metricMeasure:J,outlierType:ne,numNodes:le,onZoneNodeSelected:Ce,onClusterRegionSelected:Se,onOutlierTypeSelected:be,onSplitTypeSelected:_e,onNumNodesChanged:we}),e.jsx(pV,{urlParams:M,getClusterDetails:ve,metricMeasure:J,apiUrl:h,appName:c,timezone:d,dateTimeRange:de,universeQueryStatsData:g,onEChartsDateSelect:xe})]})}))]}))}));function bG(){return bG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bG.apply(this,arguments)}function wG(e){return"number"==typeof e&&!isNaN(e)}function SG(e){return"boolean"==typeof e}function CG(e){return"string"==typeof e}function TG(e){return"function"==typeof e}function MG(e){return CG(e)||TG(e)?e:null}function EG(e){return 0===e||e}var IG=!("undefined"==typeof window||!window.document||!window.document.createElement);function AG(e){return t.isValidElement(e)||CG(e)||TG(e)||wG(e)}var DG={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},kG={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function OG(e){var n=e.enter,r=e.exit,i=e.appendPosition,o=void 0!==i&&i,a=e.collapse,s=void 0===a||a,l=e.collapseDuration,u=void 0===l?300:l;return function(e){var i=e.children,a=e.position,l=e.preventExitTransition,c=e.done,d=e.nodeRef,p=e.isIn,h=o?n+"--"+a:n,f=o?r+"--"+a:r,g=t.useRef(),m=t.useRef(0);function v(){var e=d.current;e.removeEventListener("animationend",v),0===m.current&&(e.className=g.current)}function y(){var e=d.current;e.removeEventListener("animationend",y),s?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,c,u):c()}return t.useLayoutEffect((function(){!function(){var e=d.current;g.current=e.className,e.className+=" "+h,e.addEventListener("animationend",v)}()}),[]),t.useEffect((function(){p||(l?y():function(){m.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",y)}())}),[p]),C.default.createElement(C.default.Fragment,null,i)}}var RG={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function NG(e,n){void 0===n&&(n=!1);var r=t.useRef(e);return t.useEffect((function(){n&&(r.current=e)})),r.current}function LG(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case 1:return EG(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function PG(e){var n=t.useReducer((function(e){return e+1}),0)[1],r=t.useReducer(LG,[]),i=r[0],o=r[1],a=t.useRef(null),s=NG(0),l=NG([]),u=NG({}),c=NG({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:d,getToast:function(e){return u[e]||null}});function d(e){return-1!==i.indexOf(e)}function p(e){var t=e.containerId,n=c.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||c.containerId===t&&i)&&(s-=l.length,l=[])}function h(e){o({type:1,toastId:e})}function f(){var e=l.shift();m(e.toastContent,e.toastProps,e.staleId)}function g(e,r){var i=r.delay,o=r.staleId,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["delay","staleId"]);if(AG(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||c.props.enableMultiContainer&&t!==c.props.containerId||u[n]&&null==r)}(d)){var p=d.toastId,g=d.updateId,v=c.props,y=function(){return h(p)},x=null==d.updateId;x&&s++;var _,b,w={toastId:p,updateId:g,isIn:!1,key:d.key||c.toastKey++,type:d.type,closeToast:y,closeButton:d.closeButton,rtl:v.rtl,position:d.position||v.position,transition:d.transition||v.transition,className:MG(d.className||v.toastClassName),bodyClassName:MG(d.bodyClassName||v.bodyClassName),style:d.style||v.toastStyle,bodyStyle:d.bodyStyle||v.bodyStyle,onClick:d.onClick||v.onClick,pauseOnHover:SG(d.pauseOnHover)?d.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:SG(d.pauseOnFocusLoss)?d.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:SG(d.draggable)?d.draggable:v.draggable,draggablePercent:wG(d.draggablePercent)?d.draggablePercent:v.draggablePercent,draggableDirection:d.draggableDirection||v.draggableDirection,closeOnClick:SG(d.closeOnClick)?d.closeOnClick:v.closeOnClick,progressClassName:MG(d.progressClassName||v.progressClassName),progressStyle:d.progressStyle||v.progressStyle,autoClose:(_=d.autoClose,b=v.autoClose,!1===_||wG(_)&&_>0?_:b),hideProgressBar:SG(d.hideProgressBar)?d.hideProgressBar:v.hideProgressBar,progress:d.progress,role:CG(d.role)?d.role:v.role,deleteToast:function(){!function(e){delete u[e];var t=l.length;s=EG(e)?s-1:s-c.displayedToast,s<0&&(s=0);if(t>0){var r=EG(e)?1:c.props.limit;if(1===t||1===r)c.displayedToast++,f();else{var i=r>t?t:r;c.displayedToast=i;for(var o=0;o<i;o++)f()}}else n()}(p)}};TG(d.onOpen)&&(w.onOpen=d.onOpen),TG(d.onClose)&&(w.onClose=d.onClose),"y"===w.draggableDirection&&80===w.draggablePercent&&(w.draggablePercent*=1.5);var S=v.closeButton;!1===d.closeButton||AG(d.closeButton)?S=d.closeButton:!0===d.closeButton&&(S=!AG(v.closeButton)||v.closeButton),w.closeButton=S;var C=e;t.isValidElement(e)&&!CG(e.type)?C=t.cloneElement(e,{closeToast:y,toastProps:w}):TG(e)&&(C=e({closeToast:y,toastProps:w})),v.limit&&v.limit>0&&s>v.limit&&x?l.push({toastContent:C,toastProps:w,staleId:o}):wG(i)&&i>0?setTimeout((function(){m(C,w,o)}),i):m(C,w,o)}}function m(e,t,n){var r=t.toastId;n&&delete u[n],u[r]={content:e,props:t},o({type:0,toastId:r,staleId:n})}return t.useEffect((function(){return c.containerId=e.containerId,RG.cancelEmit(3).on(0,g).on(1,(function(e){return a.current&&h(e)})).on(5,p).emit(2,c),function(){return RG.emit(3,c)}}),[]),t.useEffect((function(){c.isToastActive=d,c.displayedToast=i.length,RG.emit(4,i.length,e.containerId)}),[i]),t.useEffect((function(){c.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(u).reverse():Object.keys(u),i=0;i<r.length;i++){var o=u[r[i]],a=o.props.position;n[a]||(n[a]=[]),n[a].push(o)}return Object.keys(n).map((function(e){return t(e,n[e])}))},collection:u,containerRef:a,isToastActive:d}}function BG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function jG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function FG(e){var n=t.useState(!0),r=n[0],i=n[1],o=t.useState(!1),a=o[0],s=o[1],l=t.useRef(null),u=NG({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),c=NG(e,!0),d=e.autoClose,p=e.pauseOnHover,h=e.closeToast,f=e.onClick,g=e.closeOnClick;function m(t){if(e.draggable){var n=l.current;u.canCloseOnClick=!0,u.canDrag=!0,u.boundingRect=n.getBoundingClientRect(),n.style.transition="",u.x=BG(t.nativeEvent),u.y=jG(t.nativeEvent),"x"===e.draggableDirection?(u.start=u.x,u.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(u.start=u.y,u.removalDistance=n.offsetHeight*(e.draggablePercent/100))}}function v(){if(u.boundingRect){var t=u.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&u.x>=i&&u.x<=o&&u.y>=n&&u.y<=r?x():y()}}function y(){i(!0)}function x(){i(!1)}function _(t){if(u.canDrag){t.preventDefault();var n=l.current;r&&x(),u.x=BG(t),u.y=jG(t),"x"===e.draggableDirection?u.delta=u.x-u.start:u.delta=u.y-u.start,u.start!==u.x&&(u.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+u.delta+"px)",n.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance))}}function b(){var t=l.current;if(u.canDrag){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}t.useEffect((function(){return TG(e.onOpen)&&e.onOpen(t.isValidElement(e.children)&&e.children.props),function(){TG(c.onClose)&&c.onClose(t.isValidElement(c.children)&&c.children.props)}}),[]),t.useEffect((function(){return e.draggable&&(document.addEventListener("mousemove",_),document.addEventListener("mouseup",b),document.addEventListener("touchmove",_),document.addEventListener("touchend",b)),function(){e.draggable&&(document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",b))}}),[e.draggable]),t.useEffect((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||x();window.addEventListener("focus",y),window.addEventListener("blur",x)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",x))}}),[e.pauseOnFocusLoss]);var w={onMouseDown:m,onTouchStart:m,onMouseUp:v,onTouchEnd:v};return d&&p&&(w.onMouseEnter=x,w.onMouseLeave=y),g&&(w.onClick=function(e){f&&f(e),u.canCloseOnClick&&h()}),{playToast:y,pauseToast:x,isRunning:r,preventExitTransition:a,toastRef:l,eventHandlers:w}}function UG(e){var n=e.closeToast,r=e.type,i=e.ariaLabel,o=void 0===i?"close":i;return t.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+r,type:"button",onClick:function(e){e.stopPropagation(),n(e)},"aria-label":o},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function zG(e){var n,r,i=e.delay,o=e.isRunning,a=e.closeToast,s=e.type,l=e.hide,u=e.className,c=e.style,d=e.controlledProgress,p=e.progress,h=e.rtl,f=e.isIn,g=bG({},c,{animationDuration:i+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(g.transform="scaleX("+p+")");var m=Y("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+s,((n={})["Toastify__progress-bar--rtl"]=h,n)),v=TG(u)?u({rtl:h,type:s,defaultClassName:m}):Y(m,u),y=((r={})[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]=d&&p<1?null:function(){f&&a()},r);return t.createElement("div",Object.assign({role:"progressbar",className:v,style:g},y))}zG.defaultProps={type:kG.DEFAULT,hide:!1};var HG=function(e){var n,r=FG(e),i=r.isRunning,o=r.preventExitTransition,a=r.toastRef,s=r.eventHandlers,l=e.closeButton,u=e.children,c=e.autoClose,d=e.onClick,p=e.type,h=e.hideProgressBar,f=e.closeToast,g=e.transition,m=e.position,v=e.className,y=e.style,x=e.bodyClassName,_=e.bodyStyle,b=e.progressClassName,w=e.progressStyle,S=e.updateId,C=e.role,T=e.progress,M=e.rtl,E=e.toastId,I=e.deleteToast,A=e.isIn,D=Y("Toastify__toast","Toastify__toast--"+p,((n={})["Toastify__toast--rtl"]=M,n)),k=TG(v)?v({rtl:M,position:m,type:p,defaultClassName:D}):Y(D,v),O=!!T;return t.createElement(g,{isIn:A,done:I,position:m,preventExitTransition:o,nodeRef:a},t.createElement("div",Object.assign({id:E,onClick:d,className:k},s,{style:y,ref:a}),t.createElement("div",Object.assign({},A&&{role:C},{className:TG(x)?x({type:p}):Y("Toastify__toast-body",x),style:_}),u),function(e){if(e){var n={closeToast:f,type:p};return TG(e)?e(n):t.isValidElement(e)?t.cloneElement(e,n):void 0}}(l),(c||O)&&t.createElement(zG,Object.assign({},S&&!O?{key:"pb-"+S}:{},{rtl:M,delay:c,isRunning:i,isIn:A,closeToast:f,hide:h,type:p,style:w,className:b,controlledProgress:O,progress:T}))))},VG=function(e){var n=PG(e),r=n.getToastToRender,i=n.containerRef,o=n.isToastActive,a=e.className,s=e.style,l=e.rtl,u=e.containerId;function c(e){var t,n=Y("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return TG(a)?a({position:e,rtl:l,defaultClassName:n}):Y(n,MG(a))}return t.createElement("div",{ref:i,className:"Toastify",id:u},r((function(e,n){var r=0===n.length?bG({},s,{pointerEvents:"none"}):bG({},s);return t.createElement("div",{className:c(e),style:r,key:"container-"+e},n.map((function(e){var n=e.content,r=e.props;return t.createElement(HG,Object.assign({},r,{isIn:o(r.toastId),key:"toast-"+r.key,closeButton:!0===r.closeButton?UG:r.closeButton}),n)})))})))};VG.defaultProps={position:DG.TOP_RIGHT,transition:OG({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:UG,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert"};var WG,YG,GG,qG=new Map,QG=[],ZG=!1;function XG(){return Math.random().toString(36).substr(2,9)}function $G(e){return e&&(CG(e.toastId)||wG(e.toastId))?e.toastId:XG()}function KG(e,n){return qG.size>0?RG.emit(0,e,n):(QG.push({content:e,options:n}),ZG&&IG&&(ZG=!1,YG=document.createElement("div"),document.body.appendChild(YG),y.render(t.createElement(VG,Object.assign({},GG)),YG))),n.toastId}function JG(e,t){return bG({},t,{type:t&&t.type||e,toastId:$G(t)})}var eq=function(e){return function(t,n){return KG(t,JG(e,n))}},tq=function(e,t){return KG(e,JG(kG.DEFAULT,t))};tq.success=eq(kG.SUCCESS),tq.info=eq(kG.INFO),tq.error=eq(kG.ERROR),tq.warning=eq(kG.WARNING),tq.dark=eq(kG.DARK),tq.warn=tq.warning,tq.dismiss=function(e){return RG.emit(1,e)},tq.clearWaitingQueue=function(e){return void 0===e&&(e={}),RG.emit(5,e)},tq.isActive=function(e){var t=!1;return qG.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},tq.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=qG.get(n||WG);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=bG({},r,t,{toastId:t.toastId||e,updateId:XG()});o.toastId!==e&&(o.staleId=e);var a=o.render||i;delete o.render,KG(a,o)}}),0)},tq.done=function(e){tq.update(e,{progress:1})},tq.onChange=function(e){return TG(e)&&RG.on(4,e),function(){TG(e)&&RG.off(4,e)}},tq.configure=function(e){void 0===e&&(e={}),ZG=!0,GG=e},tq.POSITION=DG,tq.TYPE=kG,RG.on(2,(function(e){WG=e.containerId||e,qG.set(WG,e),QG.forEach((function(e){RG.emit(0,e.content,e.options)})),QG=[]})).on(3,(function(e){qG.delete(e.containerId||e),0===qG.size&&RG.off(0).off(1).off(5),IG&&YG&&document.body.removeChild(YG)}));var nq,rq=r.makeStyles((function(e){return{itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},item:{paddingLeft:e.spacing(2)}}})),iq=function(n){var i,o=n.appName,a=n.columns,s=n.hiddenColumns,l=n.onColumnVisibilityChange,u=n.close,c=rq(),d=JSON.parse(null!==(i=sessionStorage.getItem("visibleQueryFields"))&&void 0!==i?i:"[]"),p=a.reduce((function(e,t){var n;return e[t.name]=d.length>0?d.includes(t.name):null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.display,e}),{}),h=Kn({defaultValues:p}),f=h.control,g=h.handleSubmit,m=h.reset;t.useEffect((function(){m(p)}),[a,m]);var v=function(){u()};return e.jsx(xs,F({open:!0,isSidePanel:!0,title:"Add and Remove Columns",onClose:v,onSubmit:g((function(e){var t=[];Object.keys(e).forEach((function(n){var r=e[n],i=n;l(i,r),r&&t.push(i)})),sessionStorage.setItem("visibleQueryFields",JSON.stringify(t)),v()})),enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,F({paddingLeft:2,paddingRight:2,paddingBottom:2},{children:e.jsx(r.Box,F({className:c.itemsContainer},{children:a.map((function(t){return s.includes(t.name)?null:e.jsx(r.Box,F({className:c.item},{children:e.jsx(mu,{name:t.name,label:t.label,control:f,inputProps:{"data-testid":t.name},showCheckedIcon:o===exports.AppName.WEB})}),t.name)}))}))}))}))},oq=function(n){var r=n.data,i=n.maxEPS,o=n.groupByOperation,a=t.useRef(null),s=t.useMemo((function(){var e=i<1?5:100,t=r.reduce((function(e,t){return e+t.eps}),0),n=Math.pow(t/i,.5)*e;return Math.max(n,10)+100}),[r,i]);return t.useEffect((function(){if(a.current){var e=oI(a.current),t=r.map((function(e){return o===exports.WaitEventClassification.WAIT_EVENT?e.waitEvent:e.waitEventType})).map((function(e,t){var n;return{name:e,type:"bar",stack:"total",label:{show:!1},data:[r[t].eps],itemStyle:{color:null!==(n=Zl[e])&&void 0!==n?n:Ql[t]}}})),n={animation:!1,grid:{left:50,right:50,top:20,bottom:40,containLabel:!1},tooltip:{trigger:"item",extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; z-index:9999;",formatter:function(e){var t=ku(e.color,e.seriesName),n=Ou(Number(e.value).toFixed(3)),r='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(t).concat(n,"\n </div>");return'<div style="letter-spacing:0.5px;">'.concat(r,"</div>")},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400}},xAxis:{type:"value",show:!1,min:0,max:i},yAxis:{type:"category",data:[""],show:!1},series:t};e.setOption(n);var s=new ResizeObserver((function(){e.resize()}));return s.observe(a.current),function(){s.disconnect(),e.dispose()}}}),[r,o,s,i]),e.jsx("div",{className:"query-events-chart-container",ref:a,style:{height:"".concat(80,"px"),width:"".concat(s,"px"),minWidth:"".concat(s,"px"),maxWidth:"".concat(s,"px"),display:"flex",top:"12px"}})};function aq(){return aq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aq.apply(null,arguments)}const sq=e=>S.createElement("svg",aq({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),nq||(nq=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 4a.5.5 0 0 1 .492.41l.008.09v4h4a.5.5 0 0 1 .09.992l-.09.008h-4v4a.5.5 0 0 1-.992.09l-.008-.09v-4h-4a.5.5 0 0 1-.09-.992l.09-.008h4v-4A.5.5 0 0 1 12 7Z"}))));var lq;function uq(){return uq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uq.apply(null,arguments)}const cq=e=>S.createElement("svg",uq({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),lq||(lq=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"#6D7C88",d:"M10 4a6 6 0 0 1 4.581 9.875l4.773 4.771a.5.5 0 0 1-.638.765l-.07-.057-4.771-4.773A6 6 0 1 1 10 4Zm0 1a5 5 0 1 0 0 10 5 5 0 0 0 0-10Z"}))));var dq="data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath opacity='0.5' fill-rule='evenodd' clip-rule='evenodd' d='M1.16699 6.99984C1.16699 3.77818 3.77866 1.1665 7.00033 1.1665C8.54742 1.1665 10.0312 1.78109 11.1251 2.87505C12.2191 3.96901 12.8337 5.45274 12.8337 6.99984C12.8337 10.2215 10.222 12.8332 7.00033 12.8332C3.77866 12.8332 1.16699 10.2215 1.16699 6.99984ZM6.41699 4.6665C6.41699 4.34434 6.67816 4.08317 7.00033 4.08317C7.32249 4.08317 7.58366 4.34434 7.58366 4.6665C7.58366 4.98867 7.32249 5.24984 7.00033 5.24984C6.67816 5.24984 6.41699 4.98867 6.41699 4.6665ZM6.41699 6.4165C6.41699 6.09434 6.67816 5.83317 7.00033 5.83317C7.32249 5.83317 7.58366 6.09434 7.58366 6.4165V9.33317C7.58366 9.65534 7.32249 9.9165 7.00033 9.9165C6.67816 9.9165 6.41699 9.65534 6.41699 9.33317V6.4165Z' fill='%2367666C'/%3e%3c/svg%3e",pq="databaseId",hq="eps",fq="events",gq="firstActive",mq="lastActive",vq="latencyAvg",yq="latencyP90",xq="latencyP99",_q="namespaceName",bq="query",wq="queryid",Sq="queryType",Cq="rowsAvg",Tq="rps",Mq="totalTime",Eq="universeId",Iq="totalEpsRatio",Aq={SHOW_ALL:"All Queries",SHOW_YSQL:"SQL Only",SHOW_YCQL:"CQL Only",SHOW_ACTIVITIES:"Background Tasks Only"},Dq=[wq,pq,Eq],kq=function(i){var o,a,s,l,u,c,d,p,h=i.universeUuid,f=i.apiUrl,g=i.startTime,m=i.endTime,v=i.appName,y=i.groupByOperation,x=i.filteredLegends,_=i.getClusterDetails,b=i.onSelectedQuery,w=_t(),S=Kl(),C=t.useState(null),T=C[0],M=C[1],E=t.useState(""),I=E[0],A=E[1],D=t.useState([]),k=D[0],O=D[1],R=t.useState(!1),N=R[0],L=R[1],P=t.useState(yl[0]),B=P[0],j=P[1],U=t.useState(0),z=U[0],H=U[1],V=t.useState(0),W=V[0],G=V[1],q=t.useState(Ks),Z=q[0],X=q[1],$=t.useState([]),K=$[0],J=$[1],ee=t.useState([]),te=ee[0],ne=ee[1],re=t.useState([]),ie=re[0],oe=re[1],ae=t.useState("eps"),se=ae[0],le=ae[1],ue=t.useState(null),ce=ue[0],de=ue[1],pe=t.useState(Aq.SHOW_ALL),he=pe[0],fe=pe[1],ge=t.useState(1),me=ge[0],ve=ge[1],ye=t.useState(exports.SortDirection.DESC),xe=ye[0],_e=ye[1],be=_(),we=be.cluster,Se=be.region,Ce=be.zone,Te=be.node,Me=n.useInfiniteQuery([exports.QUERY_KEY.fetchQueriesStatsPage,z,B,g,m],(function(){return uV.fetchQueriesStatsPage(h,{currentTablePage:z,apiUrl:f,pageSize:B,startTime:g,endTime:m,searchInput:I,database:Z,sortBy:se,sortDirection:xe,queryType:ce,groupByOperation:y},_,x)}),{getNextPageParam:function(e){return e.data.hasNext},onSuccess:function(e){var t,n,r,i,o,a,s,l,u,c,d,p,h,f;"eps"===se&&!1===(null===(r=null===(n=null===(t=null==e?void 0:e.pages)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||void 0===r?void 0:r.hasPrev)&&xe===exports.SortDirection.DESC&&(null===(a=null===(o=null===(i=null==e?void 0:e.pages)||void 0===i?void 0:i[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.entities)&&ve(null===(c=null===(u=null===(l=null===(s=null==e?void 0:e.pages)||void 0===s?void 0:s[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u.entities[0])||void 0===c?void 0:c.eps),oe(null===(p=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===p?void 0:p.entities),G(null===(f=null===(h=null==e?void 0:e.pages[0])||void 0===h?void 0:h.data)||void 0===f?void 0:f.totalCount)}}),Ee=Me.isFetching,Ie=Me.isError,Ae=Me.error,De=Me.fetchNextPage,ke=Me.hasNextPage,Oe=Me.refetch,Re=n.useQuery([exports.QUERY_KEY.fetchQueriesDatabases,h],(function(){return uV.fetchQueriesDatabases(h,f)}),{onSuccess:function(e){ne(e)}}),Ne=Re.isLoading,Le=Re.isError;t.useEffect((function(){}),[T]),t.useEffect((function(){Ie&&J([])}),[Ie]),t.useEffect((function(){Oe()}),[z,I,Z,se,xe,g,m,ce,y,Ce,Te,we,Se,x]),t.useEffect((function(){var t,n,i,o,a,s,l,u=sessionStorage.getItem("visibleQueryFields"),c=u?JSON.parse(u):null;O([{name:pq,label:"",options:{sort:!1,display:!1,filter:!1}},{name:Iq,label:"Total Load",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Percentage of the system load",placement:"top",arrow:!0},{children:e.jsxs("span",{children:["Total Load",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number.isFinite(Number(e))?"".concat((100*Number(e)).toLocaleString(void 0,{maximumFractionDigits:2}),"%"):"-"}}},{name:hq,label:"AAS",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Active Sessions per Second",placement:"top",arrow:!0},{children:e.jsxs("span",{children:["AAS",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:fq,label:"Events",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{minWidth:"70px",maxWidth:"200px",overflow:"visible",position:"relative",zIndex:10},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Active Session Events per Second",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Events",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(t){return $a(t)?e.jsx(oq,{data:t,maxEPS:me,groupByOperation:y}):"-"}}},{name:bq,label:"Query",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{},className:Y(),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Query Text",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Query",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Tooltip,F({title:t,placement:"top",arrow:!0},{children:e.jsx(r.TableCell,F({colSpan:100,className:w.queryTableCell},{children:e.jsx(xt,{text:t,showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,codeClassName:v===exports.AppName.YBM?w.queryCodeElement:w.queryCodeElementWeb,preClassName:v===exports.AppName.YBM?w.queryPreBlock:w.queryPreBlockWeb,containerClassName:w.queryContainerCode},"TableHelperQueries-".concat(z,"-").concat(i))}))}))}}},{name:_q,label:"Database",options:{sort:!0,display:null!==(t=null==c?void 0:c.includes(_q))&&void 0!==t&&t,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Database Name",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Database",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return e||"-"}}},{name:gq,label:"First Active Time",options:{sort:!0,display:null!==(n=null==c?void 0:c.includes(gq))&&void 0!==n&&n,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"First Active Time",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["First Time that the query was active",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return e||"-"}}},{name:mq,label:"Last Active Time",options:{sort:!0,display:null!==(i=null==c?void 0:c.includes(mq))&&void 0!==i&&i,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Last Active Time",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Last Time that the query was active",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return e||"-"}}},{name:vq,label:"Avg Latency (ms)",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"The average latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Avg Latency (ms)",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:yq,label:"P90 Latency (ms)",options:{sort:!0,display:null!==(o=null==c?void 0:c.includes(yq))&&void 0!==o&&o,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"The P90 latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["P90 Latency (ms)",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:xq,label:"P99 Latency (ms)",options:{sort:!0,display:null!==(a=null==c?void 0:c.includes(xq))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"The P99 latency of the query in ms",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["P99 Latency (ms)",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Sq,label:"Query Type",options:{sort:!1,display:null!==(s=null==c?void 0:c.includes(Sq))&&void 0!==s&&s,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder),onClick:function(e){return e.stopPropagation(),e.preventDefault(),!1}}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"SQL/CQL query or Background activity",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Query Type",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return e||"-"}}},{name:Mq,label:"Total Time (ms)",options:{sort:!0,display:null!==(l=null==c?void 0:c.includes(Mq))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Total time spent for query processing measured in ms",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Total Time (ms)",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Cq,label:"Avg Rows/Call",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Average rows returned",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["Avg Rows",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Tq,label:"Calls/Sec",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(S.tableHeaderCell,v===exports.AppName.WEB&&S.tableBorder)}},customHeadLabelRender:function(){return e.jsx(r.Tooltip,F({title:"Calls per second",arrow:!0,placement:"top"},{children:e.jsxs("span",{children:["RPS",e.jsx("img",{src:dq,alt:"info",className:S.infoIcon})]})}))},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[K,me,y]);t.useEffect((function(){J(ie)}),[ie]);var Pe=Ee||Ne;return e.jsxs(e.Fragment,{children:[N&&e.jsx(iq,{appName:v,hiddenColumns:[pq,vq,Cq,Tq,hq,fq,wq,Eq,bq],columns:k,onColumnVisibilityChange:function(e,t){O((function(n){return n.map((function(n){return n.name===e?F(F({},n),{options:F(F({},n.options),{display:t})}):n}))}))},close:function(){return L(!1)}}),e.jsxs(r.Box,F({mt:2,mb:2,className:S.dataBox},{children:[e.jsxs(r.Box,F({display:"flex",flexDirection:"column"},{children:[e.jsx(r.Box,F({mb:2},{children:e.jsx(r.Typography,F({variant:"h5"},{children:"Queries"}))})),e.jsxs(r.Box,F({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},{children:[e.jsxs(lr,F({label:"",value:Z,className:S.overrideMuiSelect,onChange:function(e){H(0),X(e.target.value)},menuProps:{PaperProps:{style:{paddingRight:"8px",maxHeight:"300px"}}}},{children:[e.jsx(r.MenuItem,F({value:Ks,"data-testid":"HistoricalQueryData-".concat(Ks)},{children:e.jsx("span",{children:ol.ALL_DATABASES})}),Ks),te.map((function(t){return e.jsx(r.MenuItem,F({value:t,"data-testid":"HistoricalQueryData-".concat(t)},{children:e.jsx("span",{children:t})}),t)}))]})),e.jsx(lr,F({style:{marginLeft:"16px"},label:"",value:he,className:S.overrideMuiSelect,onChange:function(e){e.target.value===Aq.SHOW_ALL&&de(null),e.target.value===Aq.SHOW_YSQL&&de(exports.QueryType.SQL),e.target.value===Aq.SHOW_YCQL&&de(exports.QueryType.CQL),e.target.value===Aq.SHOW_ACTIVITIES&&de(exports.QueryType.BACKGROUND),fe(e.target.value)},menuProps:{PaperProps:{style:{paddingRight:"8px",maxHeight:"300px"}}}},{children:Object.entries(Aq).map((function(t){var n=t[0],i=t[1];return e.jsx(r.MenuItem,F({value:i,"data-testid":"HistoricalQueryData-".concat(i)},{children:e.jsx("span",{children:i})}),n)}))})),e.jsx(Tt,{placeholder:"Filter Queries",className:S.searchInput,onChange:function(e){Ja(e.target.value)&&H(0),A(e.target.value)},value:I,inputProps:{"data-testid":"HistoricalQueryData-SearchInput"},InputProps:{startAdornment:e.jsx(r.InputAdornment,F({position:"end"},{children:e.jsx(cq,{})}))}}),e.jsx(Q,F({size:"medium",style:{marginLeft:"16px",marginTop:"4px"},variant:v===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(sq,{}),onClick:function(){return L(!0)},"data-testid":"HistoricalQueryData-AddFieldsBtn"},{children:"Add Columns"}))]}))]})),e.jsxs(r.Box,F({className:v===exports.AppName.YBM?S.overrideMuiTableContainer:S.overrideMuiTableContainerWeb},{children:[Pe&&e.jsx(r.Box,F({mt:2,className:S.loadingBox},{children:e.jsx(dV,{className:Y(S.icon,S.inProgressIcon)})})),(Ie||Le)&&e.jsxs(r.Box,F({mt:3,className:S.recommendation},{children:[(v===exports.AppName.YBA||v===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(null===(a=null===(o=null==Ae?void 0:Ae.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.error)?null===(l=null===(s=null==Ae?void 0:Ae.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error:Xl.HISTORICAL_QUERY_DATA_FETCH_ERROR}),v===exports.AppName.YBM&&e.jsx(kr,{text:Ja(null===(c=null===(u=null==Ae?void 0:Ae.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error)?null===(p=null===(d=null==Ae?void 0:Ae.response)||void 0===d?void 0:d.data)||void 0===p?void 0:p.error:Xl.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),!Pe&&$a(K)&&e.jsx(Ds,{id:"HistoricalQueryData-".concat(z),className:S.overrideMuiTable,data:K,columns:null==k?void 0:k.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),options:{filter:!0,count:W,serverSide:!0,pagination:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:B,page:z,onChangePage:function(e){return H(e)},onChangeRowsPerPage:function(e){j(e),H(0)},customRowRender:tu(v,z,K,w,!0,null==k?void 0:k.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),Dq,g,m,T,(function(e){M(e)}),b),rowsPerPageOptions:yl,onColumnSortChange:function(e,t){le(e),_e(t.toUpperCase())},customFooter:$l(De,"Rows per page:",K.length,ke)}},"HistoricalQueryData-".concat(z)),!Pe&&!$a(K)&&!Ie&&e.jsx(r.Box,F({mt:3},{children:e.jsx("span",{children:"There are no queries with the current ".concat(v===exports.AppName.YBM?"cluster":"universe")})}))]}))]}))]})},Oq=r.makeStyles((function(e){return{messageBox:{width:"100%",height:"228px",border:"1px dotted #CBDBFF",borderRadius:"8px",backgroundColor:"#F2F6FF",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},ashText:{color:"#4E5F6D",marginTop:e.spacing(2),marginBottom:e.spacing(2),marginLeft:e.spacing(1),marginRight:e.spacing(1),fontSize:"13px"},ashLink:{color:"#2B59C3",fontSize:"11.5px",textDecoration:"underline",fontStyle:"solid"}}})),Rq=[{text:"Learn more.",link:"https://docs.yugabyte.com/preview/yugabyte-platform/manage-deployments/upgrade-software-install/"},{text:"Learn more.",link:"https://docs.yugabyte.com/preview/explore/observability/active-session-history/"}],Nq=function(t){var n=t.isAshSupported,i=Oq();return e.jsxs(r.Box,F({className:i.messageBox},{children:[e.jsx("img",{src:n?"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M20.5 1L12.6314 8.86863C12.2354 9.26465 12.0373 9.46265 11.809 9.53684C11.6082 9.6021 11.3918 9.6021 11.191 9.53684C10.9627 9.46265 10.7646 9.26465 10.3686 8.86863L7.63137 6.13137C7.23535 5.73535 7.03735 5.53735 6.80902 5.46316C6.60817 5.3979 6.39183 5.3979 6.19098 5.46316C5.96265 5.53735 5.76465 5.73535 5.36863 6.13137L0.5 11M20.5 1H13.5M20.5 1V8' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='42' height='22' viewBox='0 0 42 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M41 1L25.2627 16.7373C24.4707 17.5293 24.0747 17.9253 23.618 18.0737C23.2163 18.2042 22.7837 18.2042 22.382 18.0737C21.9253 17.9253 21.5293 17.5293 20.7373 16.7373L15.2627 11.2627C14.4707 10.4707 14.0747 10.0747 13.618 9.92631C13.2163 9.7958 12.7837 9.7958 12.382 9.92631C11.9253 10.0747 11.5293 10.4707 10.7373 11.2627L1 21M41 1H27M41 1V15' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Arrow"}),e.jsx("span",F({className:i.ashText},{children:n?"The Cluster Load chart requires access to the Active Session History (ASH) view, which is not enabled on this cluster. To enable ASH for this cluster, contact Support.":"The Cluster Load chart requires YugabyteDB v2024.2 or later."})),e.jsxs(r.Box,F({display:"flex",flexDirection:"row"},{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.8002 13.7616H4.48019C3.95091 13.7616 3.52019 13.3308 3.52019 12.8016C3.52019 12.2723 3.95091 11.8416 4.48019 11.8416H12.1602C12.3368 11.8416 12.4802 11.6982 12.4802 11.5216V3.20156C12.4802 2.319 11.7621 1.60156 10.8802 1.60156H4.48019C3.59827 1.60156 2.88019 2.319 2.88019 3.20156V12.8016C2.88019 13.6841 3.59827 14.4016 4.48019 14.4016H12.8002C12.9768 14.4016 13.1202 14.2582 13.1202 14.0816C13.1202 13.9049 12.9768 13.7616 12.8002 13.7616ZM3.52019 3.20156C3.52019 2.67228 3.95091 2.24156 4.48019 2.24156H10.8802C11.4095 2.24156 11.8402 2.67228 11.8402 3.20156V11.2016H4.48019C4.12051 11.2016 3.78771 11.3212 3.52019 11.5222V3.20156Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 6.08203H5.76006C5.58342 6.08203 5.44006 6.22539 5.44006 6.40203C5.44006 6.57867 5.58342 6.72203 5.76006 6.72203H9.60006C9.7767 6.72203 9.92006 6.57867 9.92006 6.40203C9.92006 6.22539 9.7767 6.08203 9.60006 6.08203Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3cpath d='M9.6 4.30469H5.76C5.58336 4.30469 5.44 4.44805 5.44 4.62469C5.44 4.80133 5.58336 4.94469 5.76 4.94469H9.6C9.77664 4.94469 9.92 4.80133 9.92 4.62469C9.92 4.44805 9.77664 4.30469 9.6 4.30469Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Docs"}),e.jsx("a",F({className:i.ashLink,href:n?Rq[1].link:Rq[0].link,target:"_blank",rel:"noreferrer"},{children:n?Rq[1].text:Rq[0].text}))]}))]}))},Lq="Cluster Load Overview",Pq="Activity By Database";dD([Lj,uF,uN,fP,BB,aj,rB,function(e){e.registerPainter("svg",vU)},eB]);var Bq,jq=i.makeStyles((function(){return{metricPanel:{position:"relative",textOverflow:"ellipsis",whiteSpace:"nowrap",border:"1px solid #E9EEF2",borderRadius:"8px",padding:"16px 24px 20px 16px",backgroundColor:"#FFFFFF",height:"320px"},groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .MuiInput-root":{height:"32px"}},groupByContainer:{position:"absolute",top:"20px",right:"20px",display:"flex",flex:1,flexDirection:"row",alignItems:"center"},groupByText:{fontSize:"13px",fontFamily:"Inter, sans-serif",fontWeight:500,color:"#0B1117"},chartTypeSelectorButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",fontSize:"13px !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},borderBarButton:{borderRadius:"8px 0px 0px 8px"},borderLineButton:{borderRadius:"0px 8px 8px 0px"}}})),Fq=[{value:exports.ChartType.BAR,label:"Bar"},{value:exports.ChartType.LINE,label:"Line"}],Uq="Cpu",zq="IO",Hq="DiskIO",Vq=function(i){var o,a,s,l=i.startTime,u=i.endTime,c=i.appName,d=i.metricKey,p=i.shouldAbbreviateTraceName,h=i.groupByOperation,f=i.timezone,g=i.universeUuid,m=i.isAshEnabled,v=i.isAshSupported,y=i.apiUrl,x=i.dbWaitEventType,_=i.isDbClusterLoadView,b=void 0!==_&&_,w=i.onEChartsDateSelect,S=i.onSetGroupByOperation,C=i.onFilterBarData,T=i.getClusterDetails,M=jq(),E=Kl(),I=t.useRef(null),A=t.useRef(null),D=t.useState([]),k=D[0],O=D[1],R=t.useState(exports.ChartType.BAR),N=R[0],L=R[1],P=t.useRef(k),B=t.useState(null),j=B[0],U=B[1],z=T(),H=z.cluster,W=z.region,G=z.zone,q=z.node,Z=n.useMutation((function(e){return uV.fetchGraphs(g,e,y)}),{onSuccess:function(e){!$a(e)||U(e)},onError:function(e){console.error("Failed to fetch cluster load data",e)}}),X=null===(s=null===(a=null===(o=null==Z?void 0:Z.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,$=function(){var e={universeUuid:[g]};b?(delete e.clusterUuid,delete e.regionCode,delete e.azCode,delete e.instanceName,e.waitEventType=x===Ks.toUpperCase()?[Uq,zq,Hq]:["CPU"===x?Uq:zq,Hq]):(H&&H!==Ks?e.clusterUuid=[H]:delete e.clusterUuid,W&&W!==Ks?e.regionCode=[W]:delete e.regionCode,G&&G!==Ks?e.azCode=[G]:delete e.azCode,q&&q!==Ks?e.instanceName=[q]:delete e.instanceName);var t=function(t){return F(F({start:l,end:u,name:t,filters:e,settings:{aggregatedValueFunction:b?js.SUM:js.AVERAGE,returnAggregatedValue:!1,splitCount:b?5:3,splitMode:b?Ls.TOP:Ls.NONE,splitType:b?Ps.NAMESPACE:Ps.NONE}},t!==al||b?{}:{groupBy:[h]}),{stepSeconds:Au(l,u)})},n=[t(al)];b||(n.push(t(sl)),n.push(t(ll))),Ja(l)&&Ja(u)&&m&&Z.mutate(n)};t.useEffect((function(){$()}),[l,u,h,H,W,G,q,x]),t.useEffect((function(){return $(),function(){U(null)}}),[]);return t.useEffect((function(){P.current=k}),[k]),t.useEffect((function(){if($a(j)&&A.current){I.current||(I.current=oI(A.current,null,{renderer:"svg"}));var e=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f,g,m=i.shouldAbbreviateTraceName;i.appName;var v=i.timezone,y=void 0===v?"":v,x=i.groupByOperation;console.error("dbWaitEventType",t);var _=null==e?void 0:e.flatMap((function(e){return e.data||[]}));_&&(null==_?void 0:_.length)>1&&!n&&(_=V(V([],_.filter((function(e){var t;return"cpu"===(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0),_.filter((function(e){var t;return"cpu"!==(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0));var b=[];if(!_||0===(null==_?void 0:_.length))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:n?t===Ks.toUpperCase()?Pq:"".concat(t," Activity By Database"):Lq,left:16,top:16,textStyle:{fontWeight:600,fontFamily:rl,fontSize:15,color:"#0B1117"},legend:{data:[]}},graphic:[{type:"text",left:"center",top:"50%",style:{text:"No Data Available",fontSize:11.5,fontWeight:600,fill:"#0B1117"}}]};null==_||_.forEach((function(t,i){var o,a=n&&null!==(o=t.namespaceName)&&void 0!==o?o:t.name,s=null;if(a===tl){var l=null==e?void 0:e.find((function(e){var n;return null===(n=e.data)||void 0===n?void 0:n.includes(t)}));(s=null==l?void 0:l.name)===ll?a=il:s===sl&&(a=nl)}var u=x===exports.WaitEventClassification.WAIT_EVENT?22:25,c=m&&(null==a?void 0:a.length)>u?"".concat(a.substring(0,u),"..."):a;if(a===nl)b.push({name:c,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:!1,tooltip:{show:!1},lineStyle:{color:"white",width:4,type:"solid"},silent:!0,symbol:"none",z:1}),b.push({name:c,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:i<35,lineStyle:{color:"black",width:2,type:"solid"},symbol:"circle",symbolSize:6,itemStyle:{color:"transparent"},emphasis:{itemStyle:{color:"black"},lineStyle:{width:2},symbolSize:8},z:2});else{var d={name:c,type:"scatter"===t.type||n&&r===exports.ChartType.LINE?"line":"bar",stack:n?r===exports.ChartType.BAR?"total":null:"scatter"!==t.type?"total":null,data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:i<35,lineStyle:{color:a===il?"#888888":Zl[a]||Ql[i%Ql.length],width:2,type:a===il?"dashed":"solid"},itemStyle:{color:a===il?"transparent":Zl[a]||Ql[i%Ql.length]},symbolSize:6,symbol:n?"none":"circle",z:1,emphasis:{lineStyle:{color:a===il?"#888888":Zl[a]||Ql[i%Ql.length],width:2},itemStyle:{color:a===il?Zl[a]||Ql[i%Ql.length]:void 0},symbolSize:a===il?8:void 0}};b.push(d)}}));var w=(null===(a=null===(o=null==b?void 0:b[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.length)||0,S=[];if(w)for(var C=0;C<w;C++){for(var T=0,M=0,E=b;M<E.length;M++){var I=E[M];"bar"===I.type&&(T+=parseFloat(null===(s=I.data[C])||void 0===s?void 0:s[1])||0)}S.push(T)}var A=Math.max.apply(Math,V([.1],S,!1)),D=0;b.forEach((function(e){if("line"===e.type){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>D&&(D=t)}}));var k=Math.max(1,1.4*A,1.4*D),O=Math.ceil(k),R=null===(d=null===(c=null===(u=null===(l=null==e?void 0:e[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u[0])||void 0===c?void 0:c.x)||void 0===d?void 0:d[0],N=null===(g=null===(f=null===(h=null===(p=null==e?void 0:e[0])||void 0===p?void 0:p.data)||void 0===h?void 0:h[0])||void 0===f?void 0:f.x)||void 0===g?void 0:g.slice(-1)[0],L=N&&R?(new Date(N).getTime()-new Date(R).getTime())/864e5:0,P={title:{text:n?t===Ks.toUpperCase()?Pq:"".concat(t," Activity By Database"):Lq,left:16,top:16,textStyle:{fontWeight:600,fontFamily:rl,fontSize:15,color:"#0B1117"}},tooltip:{trigger:x===exports.WaitEventClassification.WAIT_EVENT?"item":"axis",axisPointer:{type:"shadow",shadowStyle:{color:"#E9EEF2"},lineStyle:{color:"#E9EEF2",width:1}},textStyle:{fontFamily:rl,fontSize:13,lineHeight:16,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px; box-shadow:none;",z:1,formatter:function(e){var t,n,r;if(Array.isArray(e)){var i=(null===(t=e[0])||void 0===t?void 0:t.axisValueLabel)||"",o=new Date(i),a=Oa(y?Ra(o,y):o,"MMM d HH:mm (zzz)",{timeZone:y||void 0}),s=e.map((function(e){var t=Array.isArray(e.value)?e.value[1]:e.value,n=ku(e.color,e.seriesName),r=Ou(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(a,'</b><br/><span style="margin-top: 16px;">').concat(s,"</span></div>")}i=null!==(r=null!==(n=e.axisValueLabel)&&void 0!==n?n:e.value&&e.value[0])&&void 0!==r?r:"",o=new Date(i),a=Oa(y?Ra(o,y):o,"MMM d HH:mm (zzz)",{timeZone:y||void 0});var l=Array.isArray(e.value)?e.value[1]:e.value,u=ku(e.color,e.seriesName),c=Ou(l);return s='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:8px;\n ">\n '.concat(u).concat(c,"\n </div>"),'<div style="letter-spacing:0.5px;padding: 12px 16px;"><b>'.concat(a,'</b><br/><span style="margin-top: 16px;">').concat(s,"</span></div>")}},legend:{type:"scroll",orient:"vertical",left:"1%",top:"18%",bottom:"10%",width:"250px",height:"220px",symbolSize:8,itemStyle:{borderColor:"#fff",borderWidth:1},itemGap:16,itemWidth:16,itemHeight:16,textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#6D7C88",fontFamily:rl,rich:{dashedLine:{backgroundColor:{image:'data:image/svg+xml;utf8,<svg width="24" height="6" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="3" x2="24" y2="3" stroke="%23888" stroke-width="2" stroke-dasharray="6,4" /></svg>'},width:24,height:6,padding:[0,4,0,0],lineHeight:14},thickLine:{backgroundColor:"black",width:24,height:0,borderWidth:1,borderColor:"black",borderType:"solid",padding:[2,4,0,0],lineHeight:14}}},data:b.filter((function(e){return e.showLegend})).map((function(e){return e.name===il||e.name===nl?{name:e.name,icon:"none"}:e.name})),formatter:function(e){return e===il?"{dashedLine|} # vCPU":e===nl?"{thickLine|} Queries":e}},grid:{left:"270px",right:"2%",top:"22%",bottom:"10%",containLabel:!0},xAxis:{type:"time",axisLabel:{color:"#6D7C88",textStyle:{fontFamily:rl,fontSize:11.5},formatter:function(e){var t=new Date(e);return Oa(y?Ra(t,y):t,L>1?"MMM d HH:mm":"HH:mm",{timeZone:y||void 0})}},axisLine:{lineStyle:{color:"#6D7C88"}}},yAxis:{type:"value",name:"Active Sessions",nameLocation:"middle",nameGap:50,nameTextStyle:{fontWeight:"bold",fontFamily:rl,fontSize:13,color:"#0B1117",rotate:90},axisLine:{lineStyle:{color:"#6D7C88"}},axisLabel:{color:"#6D7C88",textStyle:{fontFamily:rl,fontSize:11.5},precision:0},splitNumber:4,max:O},series:b,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0}};return P}(j,x,b,N,{shouldAbbreviateTraceName:p,appName:c,timezone:f,metricKey:d,groupByOperation:h});I.current.setOption(e),n=!1,r=null,(t=I).current.getZr().on("mousedown",(function(e){var i,o,a=[e.offsetX,e.offsetY],s=null===(i=t.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},a);r=null!==(o=null==s?void 0:s[0])&&void 0!==o?o:null,n=!0})),t.current.getZr().on("mouseup",(function(e){var i;if(n){var o=[e.offsetX,e.offsetY],a=null===(i=t.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},o),s=null==a?void 0:a[0];if(null!==r&&null!==s&&Math.abs(s-r)>10){var l=Math.min(r,s),u=Math.max(r,s);w(l,u)}}n=!1})),b||function(e){e.current.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}}),e.current.on("legendselectchanged",(function(t){var n,r,i=t.name,o=V([],P.current,!0),a=null===(n=e.current)||void 0===n?void 0:n.getOption(),s=((null==a?void 0:a.legend)&&Array.isArray(a.legend)&&(null===(r=a.legend[0])||void 0===r?void 0:r.data)?a.legend[0].data:[]).map((function(e){return"string"==typeof e?e:e.name}));o=0===P.current.length||P.current.length===s.length?[i]:P.current.includes(i)?P.current.filter((function(e){return e!==i})):V(V([],P.current,!0),[i],!1),s.forEach((function(t){var n;null===(n=e.current)||void 0===n||n.dispatchAction({type:o.includes(t)?"legendSelect":"legendUnSelect",name:t})})),O(o),C(o)}))}(I)}var t,n,r;return function(){I.current&&(I.current.dispose(),I.current=null)}}),[j,Z.isLoading,d,N]),t.useEffect((function(){var e=function(){I.current&&I.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),e.jsx(r.Box,F({mt:2},{children:e.jsxs(r.Box,{children:[Z.isLoading&&e.jsx(r.Box,F({mt:2,className:E.loadingBox},{children:e.jsx(dV,{className:Y(E.icon,E.inProgressIcon)})})),Z.isError&&e.jsxs(r.Box,F({mt:3},{children:[(c===exports.AppName.YBA||c===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(X)?X:Xl.CLUSTER_LOAD_FETCH_ERROR}),c===exports.AppName.YBM&&e.jsx(kr,{text:Ja(X)?X:Xl.CLUSTER_LOAD_FETCH_ERROR})]})),e.jsxs(r.Box,{children:[Z.isSuccess&&e.jsxs(r.Box,F({id:"".concat(d,"-wrapper"),display:"flex",flexDirection:"row",className:M.metricPanel,onClick:function(e){e.stopPropagation()},width:"100%"},{children:[e.jsx("div",{ref:A,id:d,style:{flexGrow:1,minWidth:0}}),!b&&e.jsxs("div",F({className:M.groupByContainer},{children:[e.jsxs("span",F({className:M.groupByText},{children:["Group By","   "]})),e.jsx(lr,F({value:h,className:Y(M.groupByOperationDropdown,M.overrideDefaultMuiSelect,M.overrideDefaultMuiFormControl)},{children:null==qs?void 0:qs.map((function(t,n){return e.jsx(r.MenuItem,F({value:t,onClick:function(e){S(t),e.stopPropagation()}},{children:Gs[t]}),"".concat(t,"-").concat(n))}))}))]})),b&&e.jsx("div",F({className:M.groupByContainer},{children:Fq.map((function(t,n){var r,i=N===t.value;return e.jsx(e.Fragment,{children:e.jsx(Q,{className:Y(M.chartTypeSelectorButton,i&&M.overrideMuiButton,(r={},r[M.borderBarButton]=0===n,r[M.borderLineButton]=1===n,r)),"data-testid":"DbLoadHeader-".concat(n),onClick:function(){var e;e=t.value,L(e)},size:"medium",variant:"secondary",startIcon:e.jsx("img",{src:t.value===exports.ChartType.BAR?"data:image/svg+xml,%3csvg width='18' height='16' viewBox='0 0 18 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0.599976 6.43334V14.6M5.93331 0.600006V14.6M11.2666 6.43334V14.6M16.6 0.600006V14.6' stroke='%232B59C3' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19.6 10.6L13.8724 4.62478C13.6553 4.39833 13.5468 4.28511 13.4159 4.22658C13.3003 4.17493 13.1729 4.15363 13.0464 4.16477C12.903 4.1774 12.7621 4.2489 12.4804 4.3919L7.7196 6.80811C7.43784 6.95111 7.29696 7.02261 7.15357 7.03524C7.027 7.04639 6.89966 7.02508 6.78409 6.97343C6.65315 6.91491 6.54462 6.80168 6.32755 6.57523L0.599976 0.600006' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Chart Type Icon",style:{color:i?"#2b59c3":"#0B1117"}})})})}))}))]})),!m&&e.jsx(r.Box,F({mt:2,mb:1.5},{children:e.jsx(Nq,{isAshSupported:v})}))]})]})}))},Wq=r.makeStyles((function(e){return{modal:{display:"flex",justifyContent:"flex-end"},paper:{width:"50vw",height:"100vh",backgroundColor:e.palette.background.paper,padding:e.spacing(2),overflowY:"auto",boxShadow:e.shadows[5],display:"flex",flexDirection:"column"},content:{flexGrow:1},footer:{paddingTop:e.spacing(2),borderTop:"1px solid #ccc",textAlign:"right"},search:{top:0,position:"sticky",padding:e.spacing(2,0),backgroundColor:e.palette.background.paper,zIndex:1},container:{border:"1px solid ".concat(e.palette.grey[200]),borderRadius:e.shape.borderRadius},itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},group:{"&:not(:first-child)":{borderTop:"1px solid ".concat(e.palette.grey[200])}},groupHeader:{height:44,padding:e.spacing(0,3),display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:r.alpha(e.palette.grey[200],.25)},iconRotate:{transform:"rotate(180deg)"},item:{paddingLeft:e.spacing(2)}}})),Yq=function(n){var i=n.open,o=n.selectedTabIndex,a=n.metricMeasure,s=n.onClose,l=n.onSubmit,u=n.metricResources,c=Wq(),d=a===exports.MetricMeasure.OUTLIER_TABLES,p=a===exports.MetricMeasure.OUTLIER_DB,h=d||p?d?jl[o]:Fl[o]:Bl[o],f=Hl.reduce((function(e,t){return e[t.name]=t.name===h,e}),{}),g=t.useState(f),m=g[0],v=g[1],y=function(){var e=d||p?d?sessionStorage.getItem(Gl):sessionStorage.getItem(ql):sessionStorage.getItem(Yl);if(e)return JSON.parse(e);var t={};return u.forEach((function(e){e.metrics.forEach((function(e){t[e]=!0}))})),t},x=t.useState(""),_=x[0],b=x[1],w=t.useState(y),S=w[0],C=w[1];t.useEffect((function(){C(y())}),[i]);var T=t.useMemo((function(){return u.map((function(e){var t=e.metrics.filter((function(e){return e.toLowerCase().includes(_.toLowerCase())}));return 0===t.length?null:F(F({},e),{metrics:t})})).filter(Boolean)}),[u,_]),M=0===T.length;return e.jsx(xs,F({open:i,isSidePanel:!0,title:"Add and Remove Charts",onClose:s,enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},onSubmit:function(){sessionStorage.setItem(d||p?d?Gl:ql:Yl,JSON.stringify(S)),l(S),s()},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,F({paddingLeft:2,paddingRight:2,paddingBottom:2},{children:e.jsxs(r.Box,F({className:c.itemsContainer},{children:[e.jsx(r.Box,F({className:c.search},{children:e.jsx(Tt,{fullWidth:!0,placeholder:"Search",value:_,inputProps:{"data-testid":"MetricsSelectionSearch"},InputProps:{startAdornment:e.jsx(r.InputAdornment,F({position:"end"},{children:e.jsx(cq,{})}))},onChange:function(e){b(e.target.value)}})})),M?e.jsx(r.Box,F({textAlign:"center",mt:3,"data-testid":"MetricsSelectionNoResult"},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"No results returned"}))})):e.jsx(r.Box,F({className:c.container},{children:T.map((function(t){if(!t.metrics.length)return null;var n=m[t.name]||!!_;return e.jsxs(r.Box,F({className:c.group},{children:[e.jsxs(r.Box,F({className:c.groupHeader,onClick:function(){return e=t.name,void v((function(t){var n;return F(F({},t),((n={})[e]=!t[e],n))}));var e}},{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center"},{children:e.jsx(r.Typography,F({variant:"body1"},{children:t.title}))})),e.jsx(P.default,{className:Y(n&&c.iconRotate)})]})),e.jsx(r.Collapse,F({in:n},{children:e.jsx(r.Box,F({className:c.itemsContainer},{children:t.metrics.map((function(n){return e.jsx(r.Box,F({className:Y(c.item)},{children:e.jsx(Rr,{name:"".concat(t.name,".").concat(n),label:Wl[n]||n,inputProps:{"data-testid":n},checked:!!S[n],onChange:function(){return e=n,void C((function(t){var n;return F(F({},t),((n={})[e]=!t[e],n))}));var e}})}),n)}))}))}))]}),t.name)}))}))]}))}))}))},Gq="metricsTab",qq=function(i){var o,a,s,l=i.appName,u=i.isMetricsDrawerOpen,c=i.apiUrl,d=i.timezone,p=i.metricMeasure,h=i.dateTimeRange,f=i.filterTrigger,g=i.urlParams,m=i.getClusterDetails,v=i.onEChartsDateSelect,y=i.handleFilterMetrics,x=i.openSelectionModal,_=i.closeSelectionModal,b=Kl(),w=t.useRef([]),S=t.useState(null),C=S[0],T=S[1],M=t.useState(0),E=M[0],I=M[1],A=t.useState(!1),D=A[0],k=A[1],O=m(),R=O.universeUuid,N=O.cluster,L=O.region,P=O.zone,B=O.node,j=O.numNodes,U=O.outlierType;t.useEffect((function(){var e=p===exports.MetricMeasure.OUTLIER_TABLES,t=p===exports.MetricMeasure.OUTLIER_DB,n=e?jl:Bl;if(e||t)I(0),k(!0);else if(p)if(l!==exports.AppName.YBA){var r=window.location.pathname.split("/"),i=r[r.length-1];if(i===Xs.METRICS){var o=n[0];return window.history.replaceState(null,"","".concat(window.location.pathname,"/").concat(o)),I(0),void k(!0)}if(-1!==(c=n.indexOf(i)))I(c),k(!0);else{o=n[0];var a=r.slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(o)),I(0),k(!0)}}else{a=window.location.pathname;var s=new URLSearchParams(window.location.search),u=(o=n[0],s.get(Gq)),c=n.indexOf(u);s.set(Gq,null!=u?u:o),window.history.replaceState(null,"","".concat(a,"?").concat(s.toString())),I(null!=c?c:0),k(!0)}}),[p]);var z=n.useMutation({mutationKey:[exports.QUERY_KEY.fetchMetricsGraphs,R,h],mutationFn:function(e){return uV.fetchGraphs(R,e,c)},onSuccess:function(e){T(e)},onError:function(e){console.error("Failed to fetch metrics",e)}}),H=null===(s=null===(a=null===(o=null==z?void 0:z.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error;return t.useEffect((function(){var e;if(D){var t=Iu(!1,!0,E,m(),null,F(F({},g),{type:null!==(e=g.type)&&void 0!==e?e:null}));t&&z.mutate(t)}}),[p,h,E,L,D,N,P,B,U,j,f]),t.useEffect((function(){return z.isSuccess&&C&&C.length>0&&w.current.length===C.length&&aI(w.current),function(){sI(w.current)}}),[z.isSuccess,C]),e.jsxs(r.Box,F({mt:2,mb:2,mr:2,className:b.metricsBox},{children:[e.jsxs(r.Box,F({display:"flex",alignItems:"center"},{children:[e.jsxs(r.Tabs,F({defaultValue:0,value:E,onChange:function(e,t){if(t!==E){var n=p===exports.MetricMeasure.OUTLIER_TABLES,r=p===exports.MetricMeasure.OUTLIER_DB,i=(n||r?n?jl:Fl:Bl)[t],o=window.location.pathname;if(l!==exports.AppName.YBA){var a=o.split("/").slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(i))}else{var s=new URLSearchParams(window.location.search);s.set(Gq,i),window.history.replaceState(null,"","".concat(o,"?").concat(s.toString()))}I(t)}},"aria-label":"metric tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto",style:{flexGrow:1}},{children:[(p===exports.MetricMeasure.OVERALL||p===exports.MetricMeasure.OUTLIER)&&Bl.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==Hl?void 0:Hl.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(b.causeTabButton),wrapper:b.causeTabLabelWrapper}},t)})),p===exports.MetricMeasure.OUTLIER_TABLES&&jl.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==Ul?void 0:Ul.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(b.causeTabButton),wrapper:b.causeTabLabelWrapper}},t)})),p===exports.MetricMeasure.OUTLIER_DB&&Fl.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==zl?void 0:zl.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(b.causeTabButton),wrapper:b.causeTabLabelWrapper}},t)}))]})),e.jsx(Q,F({variant:l===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(sq,{}),size:"medium",onClick:x,"data-testid":"GenericHeader-AddChartsBtn"},{children:"Add and Remove Charts"}))]})),z.isLoading&&e.jsx(r.Box,F({mt:2,className:b.loadingBox},{children:e.jsx(dV,{className:Y(b.icon,b.inProgressIcon)})})),z.isError&&e.jsxs(r.Box,F({mt:4},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(H)?H:Xl.METRICS_GRAPHS_FETCH_ERROR}),l===exports.AppName.YBM&&e.jsx(kr,{text:Ja(H)?H:Xl.METRICS_GRAPHS_FETCH_ERROR})]})),z.isSuccess&&e.jsx(r.Box,F({className:Y(b.gridBox,b.gridBoxDouble)},{children:null==C?void 0:C.map((function(t,n){if(Ja(null==t?void 0:t.errorMessage))return e.jsx(r.Box,{});var i=Mu(p,t,exports.GraphType.MULTI_SUPPORTING,!0,[],!0);return e.jsx(r.Box,F({style:{marginTop:"16px",marginRight:"16px",border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(r.Box,{children:e.jsx(DU,{metricData:t,metricKey:t.name,containerWidth:null,metricMeasure:p,operations:p===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,registerChartInstance:function(e){return function(e,t){w.current[t]=e}(e,n)},graphType:exports.GraphType.MULTI_SUPPORTING,dateTimeRange:h,groupByOperations:i.groupByOperations,appName:l,timezone:d,isHistoricalQueryView:!1,onEChartsDateSelect:v,showTitle:!0},"".concat(t.name,"-").concat(p))},"TopKMetricsView-".concat(n))}))}))})),u&&e.jsx(Yq,{onSubmit:y,metricResources:p===exports.MetricMeasure.OUTLIER_TABLES||p===exports.MetricMeasure.OUTLIER_DB?p===exports.MetricMeasure.OUTLIER_TABLES?Ul:zl:Hl,open:u,onClose:_,selectedTabIndex:E,metricMeasure:p})]}))},Qq=C.default.memo((function(n){var i,o,a,s=n.universeUuid,l=n.appName,u=n.timezone,c=n.apiUrl,d=n.onEChartsDateSelect,p=n.getClusterDetails,h=new URLSearchParams(window.location.search),f={startTime:h.get("startTime"),endTime:h.get("endTime"),duration:h.get("duration"),dbId:h.get("dbId"),queryId:void 0,userId:h.get("userId"),type:h.get("type"),universeId:s},g=t.useState(0),m=g[0],v=g[1],y=t.useState(!1),x=y[0],_=y[1];t.useEffect((function(){var e=sessionStorage.getItem(Yl),t=sessionStorage.getItem(Gl),n=sessionStorage.getItem(ql);if(!e){var r={};Hl.forEach((function(e){e.metrics.forEach((function(e){r[e]=!0}))})),sessionStorage.setItem(Yl,JSON.stringify(r))}if(!t){var i={};Ul.forEach((function(e){e.metrics.forEach((function(e){i[e]=!0}))})),sessionStorage.setItem(Gl,JSON.stringify(i))}if(!n){var o={};zl.forEach((function(e){e.metrics.forEach((function(e){o[e]=!0}))})),sessionStorage.setItem(ql,JSON.stringify(o))}}),[]);return e.jsx(r.Box,{children:e.jsx(qq,{apiUrl:c,isMetricsDrawerOpen:x,appName:l,timezone:u,metricMeasure:null===(i=p())||void 0===i?void 0:i.metricMeasure,dateTimeRange:{startDateTime:null===(o=p())||void 0===o?void 0:o.formattedStartDate,endDateTime:null===(a=p())||void 0===a?void 0:a.formattedEndDate},urlParams:f,filterTrigger:m,onEChartsDateSelect:d,openSelectionModal:function(){return _(!0)},closeSelectionModal:function(){return _(!1)},getClusterDetails:p,handleFilterMetrics:function(){v((function(e){return e+1}))}})})})),Zq=r.makeStyles((function(e){return{tabsContainer:{display:"flex",alignItems:"center",width:"100%",boxShadow:"inset 0px -1px 0px 0px ".concat(e.palette.grey[300]),"& .MuiTabs-fixed":{boxShadow:"none"}},tabButton:{textAlign:"left",marginRight:e.spacing(1),minHeight:e.spacing(4),maxHeight:e.spacing(4),marginBottom:e.spacing(.5),padding:e.spacing(0,2),boxSizing:"border-box","&:hover":{boxShadow:"none",borderRadius:e.shape.borderRadius},"& .Mui-selected":{background:e.palette.grey[300],borderRadius:e.spacing(1)},"& .MuiTab-wrapper":{alignItems:"center",display:"contents"}},tabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117",flexDirection:"row",alignItems:"center",justifyContent:"center"},tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"0px 24px 4px 16px",backgroundColor:"#FFFFFF",marginTop:e.spacing(2)},expandAllButton:{fontSize:"13px",fontWeight:600},detectionButton:{marginRight:e.spacing(2),marginLeft:e.spacing(2)},noteText:{fontSize:"11.5px",fontWeight:600,fontStyle:"semibold",fontFamily:"Inter",letterSpacing:"0px"},warningText:{fontSize:"11.5px",fontWeight:400,fontStyle:"regular",fontFamily:"Inter",letterSpacing:"0px"}}})),Xq=function(i){var o,a,l,u,c,d=i.startTime,p=i.endTime,h=i.universeUuid,f=i.appName,g=i.timezone,m=i.apiUrl,v=i.isAshEnabled,y=i.isAshSupported,x=i.queryType,_=i.dbWaitEventType,b=i.onClickShowMoreAnomalies,w=i.onEChartsDateSelect,S=i.onSelectedIssue,C=i.onSelectedQuery,T=i.notifyTabChange,M=i.getClusterDetails,E=Zq(),I=Kl(),A=t.useState([]),D=A[0],k=A[1],O=t.useState(null),R=O[0],N=O[1],L=t.useState((u=window.location.pathname,c=exports.InsightsTabs.CLUSTER_LOAD,u.includes("/".concat(Xs.METRICS))&&(c=exports.InsightsTabs.METRICS),u.includes("/".concat(Xs.INSIGHTS))&&(c=exports.InsightsTabs.INSIGHTS),u.includes("/".concat(Xs.CLUSTER_LOAD_DB))&&(c=exports.InsightsTabs.CLUSTER_LOAD_DB),u.includes("/".concat(Xs.CLUSTER_LOAD))&&(c=exports.InsightsTabs.CLUSTER_LOAD),c)),P=L[0],B=L[1],j=t.useState(!1),U=j[0],z=j[1],H=t.useState(Object.values(exports.InsightsTabs)),V=H[0],W=H[1],G=t.useState(qs[0]),q=G[0],Z=G[1],X=t.useState(exports.ClusterLoadTabs.QUERIES),$=X[0],K=X[1],J=t.useState(null);J[0];var ee=J[1],te=t.useState(exports.AnomalyDetectionStatusText.EMPTY),ne=te[0],re=te[1],ie=M(),oe=ie.cluster,ae=ie.region,se=ie.zone,le=ie.node,ue=function(e){k(e)},ce=function(e,t,n){var r=Object.values(exports.InsightsTabs);return t||(r=r.filter((function(e){return e!==exports.InsightsTabs.METRICS}))),n||(r=r.filter((function(e){return e!==exports.InsightsTabs.CLUSTER_LOAD_DB}))),r},de=function(e){Z(e)};n.useQuery(exports.QUERY_KEY.fetchAnomalyDetectionStatus,(function(){return uV.fetchAnomalyDetectionStatus(h,m)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||es(t))ee(null);else{var n=new Date(t),r=ss(n,as,g);ee(r)}re(e.status)},onError:function(e){console.error("Failed to fetch anomaly detection status",e)},refetchOnWindowFocus:!0,refetchInterval:1e4,enabled:ne!==exports.AnomalyDetectionStatusText.SUCCESS});var pe=n.useMutation((function(){return uV.scheduleAnomalyDetectionStatus(h,m)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||es(t))ee(null);else{var n=new Date(t),r=ss(n,as,g);ee(r)}re(e.status)},onError:function(e){var t,n,r,i;tq.error(Ja(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)?null===(i=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.error:Xl.ANOMALY_SCHEDULE_ERROR)}}),he=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroups,d],(function(){return uV.fetchAnomalyGroups(h,d,p,P===exports.InsightsTabs.INSIGHTS?exports.AnomalyTypeFilter.INSIGHT:exports.AnomalyTypeFilter.PERF_ANOMALY,M,m)}),{onSuccess:function(e){N(e)}}),fe=null===(l=null===(a=null===(o=null==he?void 0:he.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===l?void 0:l.error;n.useQuery([exports.QUERY_KEY.fetchSpecificRuntimeConfigs],(function(){return uV.fetchSpecificRuntimeConfigs(_l,[bl.SHOW_QUERIES_VIEW,bl.SHOW_TOPK_METRICS_VIEW,bl.SHOW_DB_CLUSTER_LOAD_VIEW],m)}),{onSuccess:function(e){var t,n,r,i="true"===(null===(t=null==e?void 0:e.find((function(e){return e.path===bl.SHOW_TOPK_METRICS_VIEW})))||void 0===t?void 0:t.value),o=(null===(n=null==e?void 0:e.find((function(e){return e.path===bl.SHOW_QUERIES_VIEW})))||void 0===n||n.value,"true"===(null===(r=null==e?void 0:e.find((function(e){return e.path===bl.SHOW_DB_CLUSTER_LOAD_VIEW})))||void 0===r?void 0:r.value));W(ce(0,!!i,!!o))},onError:function(){W(ce(0,!1,!1))}}),t.useEffect((function(){ne===exports.AnomalyDetectionStatusText.SUCCESS&&he.refetch()}),[ne]),t.useEffect((function(){(P===exports.InsightsTabs.CLUSTER_LOAD&&$===exports.ClusterLoadTabs.ANOMALIES||P===exports.InsightsTabs.INSIGHTS)&&he.refetch()}),[d,p,P,oe,ae,se,le]),t.useEffect((function(){var e=window.location.pathname,t=new URLSearchParams(window.location.search).get("tab");if(e.includes("/".concat(Xs.CLUSTER_LOAD))||t===Xs.CLUSTER_LOAD){B(exports.InsightsTabs.CLUSTER_LOAD),T(exports.InsightsTabs.CLUSTER_LOAD);var n=e.endsWith("/".concat(Xs.CLUSTER_LOAD,"/").concat(Xs.ANOMALIES));if(K(n?exports.ClusterLoadTabs.ANOMALIES:exports.ClusterLoadTabs.QUERIES),e.endsWith("/".concat(Xs.CLUSTER_LOAD))){var r=new URLSearchParams(window.location.search).toString(),i="".concat(e,"/").concat(Xs.QUERIES).concat(r?"?".concat(r):"");window.history.replaceState(null,"",i)}}else if(e.includes("/".concat(Xs.CLUSTER_LOAD_DB))||t===Xs.CLUSTER_LOAD_DB)B(exports.InsightsTabs.CLUSTER_LOAD_DB),T(exports.InsightsTabs.CLUSTER_LOAD_DB);else if(e.includes("/".concat(Xs.METRICS))||t===Xs.METRICS)B(exports.InsightsTabs.METRICS),T(exports.InsightsTabs.METRICS);else if(e.includes("/".concat(Xs.INSIGHTS))||t===Xs.INSIGHTS)B(exports.InsightsTabs.INSIGHTS),T(exports.InsightsTabs.INSIGHTS);else if(f!==exports.AppName.YBA){r=new URLSearchParams(window.location.search).toString(),i="".concat(e,"/").concat(Xs.QUERIES).concat(r?"?".concat(r):"");window.history.replaceState(null,"",i)}}),[]);var ge=function(t){switch(t){case exports.InsightsTabs.METRICS:return e.jsx(Qq,{universeUuid:h,appName:f,timezone:g,apiUrl:m,onEChartsDateSelect:w,getClusterDetails:M});case exports.InsightsTabs.INSIGHTS:return e.jsx(r.Box,{mt:.5});case exports.InsightsTabs.CLUSTER_LOAD:case exports.InsightsTabs.CLUSTER_LOAD_DB:return e.jsx(r.Box,{children:e.jsx(Vq,{dbWaitEventType:_,isDbClusterLoadView:t===exports.InsightsTabs.CLUSTER_LOAD_DB,startTime:d,endTime:p,apiUrl:m,universeUuid:h,appName:f,metricKey:"cluster_load",groupByOperation:q,shouldAbbreviateTraceName:!0,timezone:g,isAshEnabled:v,isAshSupported:y,onFilterBarData:ue,onSetGroupByOperation:de,onEChartsDateSelect:w,getClusterDetails:M})});default:return null}};return e.jsxs(r.Box,F({className:E.tabBox},{children:[f===exports.AppName.WEB&&e.jsx(r.Box,{children:e.jsxs(s.TabContext,F({value:P},{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center",className:E.tabsContainer,mt:1.5},{children:e.jsx(r.Tabs,F({value:P,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){if(t!==P){B(t),T(t);var n=window.location.pathname,r=new URLSearchParams(window.location.search).toString();n=n.replace(/\/anomalies|\/dbLoad\/?|\/insights|\/metricsNew(\/[^/]+)?|\/clusterLoad(\/[^/]+)?|\/queries/g,""),t===exports.InsightsTabs.METRICS?n="".concat(n,"/").concat(Xs.METRICS).concat(r?"?".concat(r):""):t===exports.InsightsTabs.INSIGHTS?n="".concat(n,"/").concat(Xs.INSIGHTS).concat(r?"?".concat(r):""):t===exports.InsightsTabs.CLUSTER_LOAD?n="".concat(n,"/").concat(Xs.CLUSTER_LOAD,"/").concat(Xs.QUERIES).concat(r?"?".concat(r):""):t===exports.InsightsTabs.CLUSTER_LOAD_DB&&(n="".concat(n,"/").concat(Xs.CLUSTER_LOAD_DB).concat(r?"?".concat(r):"")),window.history.pushState(null,"",n)}}},{children:V.map((function(t,n){return e.jsx(r.Tab,{"data-testid":"".concat(t,"Tab"),value:t,label:t,classes:{root:Y(E.tabButton),wrapper:E.tabLabelWrapper}},n)}))}))})),e.jsx(s.TabPanel,F({className:I.tabPanelPrimary,value:exports.InsightsTabs.METRICS},{children:ge(exports.InsightsTabs.METRICS)})),e.jsx(s.TabPanel,F({className:I.tabPanelPrimary,value:exports.InsightsTabs.CLUSTER_LOAD},{children:ge(exports.InsightsTabs.CLUSTER_LOAD)})),e.jsx(s.TabPanel,F({className:I.tabPanelPrimary,value:exports.InsightsTabs.CLUSTER_LOAD_DB},{children:ge(exports.InsightsTabs.CLUSTER_LOAD_DB)}))]}))}),(f===exports.AppName.YBM||f===exports.AppName.YBA)&&e.jsx(e.Fragment,{children:ge(P)}),P===exports.InsightsTabs.CLUSTER_LOAD&&e.jsxs(r.Box,{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center",className:E.tabsContainer,mt:5},{children:e.jsxs(r.Tabs,F({value:$,onChange:function(e,t){if(t!==$){var n=window.location.pathname,r=new URLSearchParams(window.location.search).toString();if(K(t),P===exports.InsightsTabs.CLUSTER_LOAD){n=n.replace(/\/(clusterLoad(\/(anomalies|queries))?|anomalies|queries)$/,"");var i="";t===exports.ClusterLoadTabs.ANOMALIES?i="/".concat(Xs.CLUSTER_LOAD,"/").concat(Xs.ANOMALIES):t===exports.ClusterLoadTabs.QUERIES&&(i="/".concat(Xs.CLUSTER_LOAD,"/").concat(Xs.QUERIES)),n="".concat(n).concat(i).concat(r?"?".concat(r):"")}window.history.pushState(null,"",n)}},indicatorColor:"primary",textColor:"primary",style:{borderBottom:"0.5px solid #e0e0e0"}},{children:[e.jsx(r.Tab,{classes:{root:Y(E.tabButton),wrapper:E.tabLabelWrapper},icon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.5 4.5C4.237 4.5 3.214 5.523 3.214 6.786V11.357L1 12.5L3.214 13.643V18.214C3.214 19.477 4.237 20.5 5.5 20.5' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M18.4995 4.47221C19.7625 4.47221 20.7855 5.49521 20.7855 6.75821V11.3292L22.9995 12.4722L20.7855 13.6152V18.1862C20.7855 19.4492 19.7625 20.4722 18.4995 20.4722' stroke='%230B1117' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3e%3crect x='7' y='14.5' width='2' height='3' rx='0.5' fill='%230B1117'/%3e%3crect x='11' y='11.5' width='2' height='6' rx='0.5' fill='%230B1117'/%3e%3crect x='15' y='7.5' width='2' height='10' rx='0.5' fill='%230B1117'/%3e%3c/svg%3e",alt:"Queries Icon",style:{marginRight:"8px"}}),value:exports.ClusterLoadTabs.QUERIES,label:exports.ClusterLoadTabs.QUERIES}),e.jsx(r.Tab,{classes:{root:Y(E.tabButton),wrapper:E.tabLabelWrapper},icon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='5.94943' cy='5.62132' r='2' transform='rotate(-135 5.94943 5.62132)' stroke='%230B1117'/%3e%3ccircle cx='8.94943' cy='12.6213' r='2' transform='rotate(-135 8.94943 12.6213)' stroke='%230B1117'/%3e%3ccircle cx='11.9494' cy='19.6213' r='2' transform='rotate(-135 11.9494 19.6213)' stroke='%230B1117'/%3e%3ccircle cx='13.1916' cy='5.62132' r='2' transform='rotate(-135 13.1916 5.62132)' stroke='%230B1117'/%3e%3ccircle cx='16.1916' cy='12.6213' r='2' transform='rotate(-135 16.1916 12.6213)' stroke='%230B1117'/%3e%3ccircle cx='19.1916' cy='19.6213' r='2' transform='rotate(-135 19.1916 19.6213)' stroke='%230B1117'/%3e%3ccircle cx='4.12131' cy='19.6213' r='2' transform='rotate(-135 4.12131 19.6213)' fill='%230B1117' stroke='%230B1117'/%3e%3c/svg%3e",alt:"Anomalies Icon",style:{marginRight:"8px"}}),value:exports.ClusterLoadTabs.ANOMALIES,label:exports.ClusterLoadTabs.ANOMALIES})]}))})),$===exports.ClusterLoadTabs.QUERIES&&e.jsx(r.Box,F({mt:2},{children:e.jsx(kq,{universeUuid:h,groupByOperation:q,apiUrl:m,startTime:d,endTime:p,appName:f,filteredLegends:D,queryType:x,onSelectedQuery:C,getClusterDetails:M})})),$===exports.ClusterLoadTabs.ANOMALIES&&e.jsx(r.Box,{mt:2})]}),(P===exports.InsightsTabs.INSIGHTS||P===exports.InsightsTabs.CLUSTER_LOAD&&$===exports.ClusterLoadTabs.ANOMALIES)&&e.jsxs(r.Box,F({mt:3,className:I.dataBox},{children:[e.jsxs(r.Box,F({display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},{children:[e.jsx(r.Box,F({display:"flex",flexDirection:"column"},{children:e.jsx(r.Box,{children:e.jsx(r.Typography,F({variant:"h5"},{children:P===exports.InsightsTabs.INSIGHTS?"Insights":"Detected Anomalies"}))})})),e.jsxs(r.Box,{children:[e.jsx(Q,F({variant:f===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx("img",{src:U?"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4.70711L3.85355 7.85355C3.65829 8.04882 3.34171 8.04882 3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645L7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L11.8536 7.14645C12.0488 7.34171 12.0488 7.65829 11.8536 7.85355C11.6583 8.04882 11.3417 8.04882 11.1464 7.85355L8 4.70711L8 15.5C8 15.7761 7.77614 16 7.5 16C7.22386 16 7 15.7761 7 15.5L7 4.70711ZM0.5 1C0.223858 1 1.81543e-07 0.776142 1.84836e-07 0.5C1.88129e-07 0.223858 0.223858 2.66948e-09 0.5 5.96244e-09L14.5 1.72911e-07C14.7761 1.76204e-07 15 0.223858 15 0.5C15 0.776142 14.7761 1 14.5 1L0.5 1Z' fill='%232B59C3'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 0.5C7 0.223857 7.22386 -3.39906e-07 7.5 -3.27835e-07C7.77614 -3.15765e-07 8 0.223857 8 0.5L8 11.2929ZM14.5 15C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16L0.499999 16C0.223857 16 -6.89597e-07 15.7761 -6.77527e-07 15.5C-6.65456e-07 15.2239 0.223857 15 0.499999 15L14.5 15Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Expand Icon"}),onClick:function(){z(!U)}},{children:e.jsx("span",F({className:E.expandAllButton},{children:U?"Collapse All":"Expand All"}))})),e.jsx(Q,F({variant:"primary",size:"medium",onClick:function(){pe.mutate()},className:E.detectionButton,disabled:ne===exports.AnomalyDetectionStatusText.SCHEDULED||ne===exports.AnomalyDetectionStatusText.IN_PROGRESS,showSpinner:ne===exports.AnomalyDetectionStatusText.SCHEDULED||ne===exports.AnomalyDetectionStatusText.IN_PROGRESS,startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_436_182000)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7.5C4 7.77614 3.77614 8 3.5 8C3.22386 8 3 7.77614 3 7.5V5.5C3 4.11929 4.11929 3 5.5 3H7.5C7.77614 3 8 3.22386 8 3.5C8 3.77614 7.77614 4 7.5 4H5.5C4.67157 4 4 4.67157 4 5.5V7.5ZM16.5 4C16.2239 4 16 3.77614 16 3.5C16 3.22386 16.2239 3 16.5 3H18.5C19.8807 3 21 4.11929 21 5.5V7.5C21 7.77614 20.7761 8 20.5 8C20.2239 8 20 7.77614 20 7.5V5.5C20 4.67157 19.3284 4 18.5 4H16.5ZM20 16.5C20 16.2239 20.2239 16 20.5 16C20.7761 16 21 16.2239 21 16.5V18.5C21 19.8807 19.8807 21 18.5 21H16.5C16.2239 21 16 20.7761 16 20.5C16 20.2239 16.2239 20 16.5 20H18.5C19.3284 20 20 19.3284 20 18.5V16.5ZM7.5 20C7.77614 20 8 20.2239 8 20.5C8 20.7761 7.77614 21 7.5 21H5.5C4.11929 21 3 19.8807 3 18.5V16.5C3 16.2239 3.22386 16 3.5 16C3.77614 16 4 16.2239 4 16.5V18.5C4 19.3284 4.67157 20 5.5 20H7.5Z' fill='white'/%3e%3cpath d='M12 7L12 9' stroke='white' stroke-linecap='round'/%3e%3cpath d='M12 15L12 17' stroke='white' stroke-linecap='round'/%3e%3cpath d='M7 12L9 12' stroke='white' stroke-linecap='round'/%3e%3cpath d='M15 12L17 12' stroke='white' stroke-linecap='round'/%3e%3ccircle cx='12' cy='12' r='3.5' stroke='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_436_182000'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",alt:"Detection Icon"})},{children:"Run Detection"}))]}),he.isLoading&&e.jsx(r.Box,F({mt:2,className:I.loadingBox},{children:e.jsx(dV,{className:Y(I.icon,I.inProgressIcon)})})),he.isError&&e.jsxs(r.Box,F({mt:2},{children:[(f===exports.AppName.YBA||f===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(fe)?fe:Xl.ANOMALIES_FETCH_ERROR}),f===exports.AppName.YBM&&e.jsx(kr,{text:Ja(fe)?fe:Xl.ANOMALIES_FETCH_ERROR})]}))]})),he.isSuccess&&(Ka(null==R?void 0:R.groups)?e.jsx(hV,{name:"gant-chart-insights",sourceData:null!=R?R:[],expandAll:U,showMoreOptions:!0,onClickShowMoreAnomalies:b,startTime:d,endTime:p,onSelectedIssue:S,appName:f,currentTab:P,isInsightsTab:P===exports.InsightsTabs.INSIGHTS},"gant-chart-insights"):e.jsx(r.Box,F({mt:2},{children:"No Anomalies were detected"})))]}))]}))},$q=r.makeStyles((function(e){return{tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"24px 24px 24px 16px",backgroundColor:"#FFFFFF",margin:e.spacing(3)}}})),Kq=function(i){var a,s,l,u,c,d=i.showMoreAnomalyCategory,p=i.selectedTab,h=i.startTime,f=i.endTime,g=i.apiUrl,m=i.universeUuid,v=i.appName,y=i.onClickShowMoreAnomalies,x=i.onSelectedIssue,_=$q(),b=Kl(),w=t.useState(null),S=w[0],C=w[1],T=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsByType,h,f],(function(){return uV.fetchAnomalyGroupsByType(m,h,f,d,g)}),{onSuccess:function(e){C(e)}}),M=null===(l=null===(s=null===(a=null==T?void 0:T.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;return e.jsxs(r.Box,F({className:_.tabBox},{children:[e.jsxs(r.Breadcrumbs,F({className:b.breadCrumb,separator:e.jsx(r.Typography,F({variant:"body2"},{children:"/"})),"aria-label":"breadcrumb","data-testid":"PrimaryDashboardBreadcrumb"},{children:[e.jsx(r.Link,F({className:b.breadcrumbColor,component:FW,variant:"h5",onClick:function(){y(null),window.history.pushState({},"",window.location.href)},to:"#"},{children:e.jsx("span",F({className:b.breadCrumbText},{children:p===exports.InsightsTabs.CLUSTER_LOAD?"Anomalies":"Insights"}))})),e.jsx(r.Typography,F({variant:"h5"},{children:e.jsx("span",F({className:Y(b.breadCrumbText,b.anomalyCategoryText)},{children:"".concat(null===(c=null===(u=null==S?void 0:S[0])||void 0===u?void 0:u.lastInstance)||void 0===c?void 0:c.title)||"".concat(wl[d])}))}))]})),e.jsxs(r.Box,F({mt:3},{children:[T.isLoading&&e.jsx(r.Box,{children:e.jsx(dV,{className:Y(b.icon,b.inProgressIcon)})}),T.isError&&e.jsxs(r.Box,F({mt:3},{children:[(v===exports.AppName.YBA||v===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(M)?M:Xl.SHOW_MORE_ANOMALIES_FETCH_ERROR}),v===exports.AppName.YBM&&e.jsx(kr,{text:Ja(M)?M:Xl.SHOW_MORE_ANOMALIES_FETCH_ERROR})]})),T.isSuccess&&($a(S)?e.jsxs(r.Box,{children:[e.jsxs(r.Box,F({display:"flex",alignItems:"center",mb:2,style:{marginLeft:"12px"},onClick:function(){if($a(S)){var e=null==S?void 0:S.map((function(e){var t;return null===(t=e.lastInstance)||void 0===t?void 0:t.entityDisplayName})).filter(Boolean).join("\n");navigator.clipboard.writeText(e)}}},{children:[e.jsx(o.FileCopy,{style:{cursor:"pointer",height:16,width:16}}),e.jsx(r.Typography,F({variant:"body2",style:{marginLeft:8,textDecoration:"underline",cursor:"pointer"}},{children:"Copy all entities"}))]})),e.jsx(hV,{name:"gant-chart-show-more-anomalies",sourceData:null!=S?S:[],showMoreOptions:!1,expandAll:!0,startTime:h,endTime:f,onSelectedIssue:x,appName:v,viewAllAnomalies:!0},"gant-chart-show-more-anomalies")]}):e.jsx(r.Box,{children:"No Anomalies were detected"}))]}))]}))},Jq=[{value:"ALL",label:"All"},{value:"IO",label:"IO"},{value:"CPU",label:"CPU"}],eQ=i.makeStyles((function(e){return{outlierSelectorButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",fontSize:"13px !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},borderOverallButton:{borderRadius:"8px 0px 0px 8px"},borderOutlierButton:{borderRadius:"0px 8px 8px 0px"},input:{width:"60px",height:"32px"}}})),tQ=function(n){var i=n.onChangeDbWaitEventType,o=eQ(),a=t.useState(0),s=a[0],l=a[1];return e.jsx(r.Box,F({ml:2,display:"flex",flexDirection:"row"},{children:Jq.map((function(t,n){var r,a=s===n;return e.jsx(e.Fragment,{children:e.jsx(Q,F({className:Y(o.outlierSelectorButton,a&&o.overrideMuiButton,(r={},r[o.borderOverallButton]=0===n,r[o.borderOutlierButton]=n===Jq.length-1,r)),"data-testid":"DbLoadHeader-".concat(n),onClick:function(){i(t.value),l(n)},size:"medium",variant:"secondary"},{children:t.label}))})}))}))},nQ=i.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),rQ=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=nQ(),c=n.useMutation((function(){return uV.deleteUniverseMetadata(i.id,a)}),{onSuccess:function(){tq.success("Universe removed successfully, no further troubleshooting on this universe willbe performed"),l(),s()},onError:function(e){var t,n,r;tq.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Not able to remove universe, please try again")}});return e.jsx(xs,F({open:o,onClose:s,title:"Remove Universe",onSubmit:function(){return z(void 0,void 0,void 0,(function(){return H(this,(function(e){return c.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Remove",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:u.root,dividers:!0}},{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"Are you sure you want to remove the universe ".concat(i.id," from Perf Advisor service ?")}))}))}))};!function(e){e.ACTIVE="Active",e.INACTIVE="Inactive"}(Bq||(Bq={}));var iQ=i.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},tagGreen:{backgroundColor:"#CDEFE1"},tagRed:{backgroundColor:"#FDE2E2"},tagTextGreen:{color:"#097245"},tagTextRed:{color:"#8F0000"},statusText:{fontFamily:"Inter",fontStyle:"normal",fontSize:"13px"},statusBox:{display:"flex",flexDirection:"row",alignItems:"center",height:"24px",borderRadius:"6px",padding:"10px 6px",width:"fit-content"},flexColumn:{display:"flex",flexDirection:"row"},tooltip:{marginLeft:e.spacing(.5)}}})),oQ=function(n){var i=n.metadata,o=n.apiUrl;n.customerUuid;var a=n.universeList,s=n.onActionPerformed,l=iQ(),u=Kl(),c=t.useState(!1),d=c[0],p=c[1],h=t.useState([]),f=h[0],g=h[1],m=t.useState(yl[0]),v=m[0],y=m[1],x=t.useState(""),_=x[0];x[1];var b=t.useState(0),w=b[0],S=b[1],C=t.useState(null),T=C[0],M=C[1],E=t.useState(i),I=E[0],A=E[1];return t.useEffect((function(){var e=i.map((function(e){var t,n=a.find((function(t){return e.id===t.universeUUID}));return e.name=null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"",e.lastSyncError=null==n?void 0:n.lastSyncError,e}));A(e)}),[a,i]),t.useEffect((function(){g([{name:"id",label:"Universe UUID",options:{sort:!0,display:!0}},{name:"name",label:"Universe Name",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"160px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t,n){var r=n.rowIndex,i=I[r],o=null==i?void 0:i.id;return e.jsx("a",F({href:"/universes/".concat(o,"/perfAdvisor?tab=").concat(Xs.ANOMALIES)},{children:t}))}}},{name:"dataMountPoints",label:"Data Mount Points",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(u.tableHeaderCell)}}}},{name:"otherMountPoints",label:"Other Mount Points",options:{sort:!1,display:!0}},{name:"lastSyncError",label:"Status",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t){return e.jsx(e.Fragment,{children:t?e.jsxs(r.Box,F({className:l.flexColumn},{children:[e.jsx(r.Box,F({className:Y(l.tagRed,l.statusBox)},{children:e.jsx("span",F({className:Y(l.tagTextRed,l.statusText)},{children:Bq.INACTIVE}))})),e.jsx(r.Tooltip,F({title:t,arrow:!0,placement:"top",className:l.tooltip},{children:e.jsx("img",{src:dq,alt:"info"})}))]})):e.jsx(r.Box,F({className:Y(l.tagGreen,l.statusBox)},{children:e.jsx("span",F({className:Y(l.tagTextGreen,l.statusText)},{children:Bq.ACTIVE}))}))})}}},{name:"",label:"Actions",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx(Q,F({size:"medium",variant:"ghost",onClick:function(){return e=I[i],M(e),void p(!0);var e}},{children:"Unregister"}))})}}}])}),[I]),e.jsxs(r.Box,F({mt:2,className:l.overrideMuiTableContainer},{children:[$a(I)&&$a(f)&&e.jsx(r.Box,F({mt:2},{children:e.jsx(Ds,{title:"Universe Metadata",className:u.overrideMuiTable,data:I,columns:f,options:{filter:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:v,page:w,onChangePage:function(e){return S(e)},onChangeRowsPerPage:function(e){y(e),S(0)},searchText:_,customSearch:function(e,t){for(var n=function(n){var r=String(t[n]).toLocaleLowerCase();if(r.includes(e.toLocaleLowerCase()))return{value:!0};if(n===t.length-1){var i=e.split(" ").filter(Boolean),o=0;return{value:i.every((function(e){var t=r.indexOf(e.toLocaleLowerCase(),o);return t>-1&&(o=t+e.length,!0)}))}}},r=1;r<t.length;r++){var i=n(r);if("object"==typeof i)return i.value}return!1},rowsPerPageOptions:yl}})})),d&&T&&e.jsx(rQ,{onActionPerformed:s,open:d,onClose:function(){p(!1)},data:T,apiUrl:o})]}))},aQ=i.makeStyles((function(e){return{refreshButton:{width:"120px",marginTop:e.spacing(2),alignSelf:"end"},flexColumn:{display:"flex",flexDirection:"column"},noUniverses:{alignSelf:"center"}}})),sQ=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),lQ=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=t.toast,c=sQ(),d=n.useMutation((function(){return uV.deleteRuntimeConfig(_l,null==i?void 0:i.path,a)}),{onSuccess:function(){u.success("Have reset runtime configuration key ".concat(i.path," successfully")),l(),s()},onError:function(e){var t,n,r;u.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot reset runtime configuration key, please try again")}});return e.jsx(xs,F({open:o,onClose:s,title:"Reset Runtime Configuration",onSubmit:function(){return z(void 0,void 0,void 0,(function(){return H(this,(function(e){return d.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Reset",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"Are you sure you want to reset the runtime configuration for the following key ".concat(i.path," ?")}))}))}))},uQ=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),cQ=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=t.toast,c=uQ(),d=Kn({defaultValues:{configValue:(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL?"true"===i.value:i.value},mode:"onChange",reValidateMode:"onChange"}),p=d.control,h=d.handleSubmit,f=n.useMutation((function(e){return uV.updateRuntimeConfig(_l,null==i?void 0:i.path,e.configValue?e.configValue.toString():i.value.toString(),a)}),{onSuccess:function(){u.success("Updated runtime configuration key ".concat(i.path," successfully")),l(),s()},onError:function(e){var t,n,r;u.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot update runtime configuration key, please try again")}}),g=h((function(e){var t={configValue:""};Object.assign(t,i),t.configValue=e.configValue,f.mutate(t)}));return e.jsx(xs,F({open:o,onClose:s,title:"Update Runtime Configuration",onSubmit:g,cancelLabel:"Cancel",submitLabel:"Update",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(Jt,F({},d,{children:e.jsxs(r.Box,F({mt:2},{children:[e.jsx(Ct,{children:"Config Key "}),e.jsx(r.Typography,F({variant:"body2"},{children:i.path})),e.jsxs(r.Box,F({mt:1},{children:[e.jsx(Ct,{children:"Config Value "}),(null==i?void 0:i.type)!==exports.RuntimeConfigType.BOOL&&e.jsx(er,{style:{marginTop:"8px"},name:"configValue",control:p,inputProps:{"data-testid":"UpdateRuntimeConfig-ConfigValue"},fullWidth:!0}),(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL&&e.jsx(ou,{name:"configValue",control:p,inputProps:{"data-testid":"UpdateRuntimeConfig-ConfigValue"}})]}))]}))}))}))},dQ=r.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"90% !important",marginTop:"3px"}},overrideMuiTable:{textAlign:"center","& .MuiTableCell-sizeSmall":{textAlign:"center"}},tooltip:{marginLeft:e.spacing(.5)},textColor:{color:"#303A78"},searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"}}}));exports.ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE="active_session_history_eps_client_node",exports.ACTIVE_SESSION_HISTORY_EPS_GLOBAL=al,exports.ACTIVE_SESSION_HISTORY_QUERY_EVENTS=sl,exports.ALL=Ks,exports.ALL_REGIONS=$s,exports.ALL_ZONES=Js,exports.ANOMALY_CATEGORY_LIST=xl,exports.ANOMALY_FILTER_DURATION_OPTIONS=El,exports.ANOMALY_TAG=Ll,exports.ANOMALY_TYPE_TO_NAME_MAP=wl,exports.ASH=el,exports.ASH_GROUPBY_VALUES=vl,exports.Aggregation=js,exports.BACKGROUND_QUERY_REQUEST_GRAPHS=gl,exports.CATALOG_READ_REQUEST_GRAPH=ml,exports.CATEGORY_HEADER_DATA_MAP=Al,exports.COLORS=Ql,exports.CORES=tl,exports.CPU_CORES=il,exports.CPU_COUNT=ll,exports.CQL_QUERY_REQUEST_GRAPHS=fl,exports.ClusterRegionSelector=gu,exports.ConfigureUniverseMetadata=function(i){var o=i.apiUrl,a=i.customerUuid,s=i.appName,l=void 0===s?exports.AppName.WEB:s,u=aQ(),c=Kl(),d=t.useState([]),p=d[0],h=d[1],f=t.useState([]),g=f[0],m=f[1],v=n.useQueryClient(),y=n.useQuery(exports.QUERY_KEY.fetchUniverseMetadataList,(function(){return uV.fetchUniverseMetadataList(o,a)}),{onSuccess:function(e){h(e)}}),x=y.isIdle,_=y.isLoading,b=y.isError,w=y.refetch,S=n.useQuery(exports.QUERY_KEY.fetchUniverseListDetails,(function(){return uV.fetchUniverseListDetails(o)}),{onSuccess:function(e){m(e)}}),C=S.isIdle,T=S.isLoading,M=S.isError,E=S.refetch;if((b||M)&&e.jsx(wt,{customErrorMessage:"Unable to fetch ".concat(l===exports.AppName.YBM?"cluster":"universe"," details")}),_||T||x&&void 0===p||C&&void 0===g)return e.jsx(r.Box,F({mt:4,className:c.loadingBox},{children:e.jsx(dV,{className:Y(c.icon,c.inProgressIcon)})}));var I=function(){z(void 0,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return v.invalidateQueries(exports.QUERY_KEY.fetchUniverseMetadataList),v.invalidateQueries(exports.QUERY_KEY.fetchUniverseListDetails),[4,w()];case 1:return e.sent(),[4,E()];case 2:return e.sent(),[2]}}))}))};return e.jsx(Ts,{body:e.jsxs(r.Box,F({ml:1,mr:1,mt:1,className:u.flexColumn},{children:[e.jsx(Q,F({variant:"secondary",size:"medium",onClick:function(){I()},className:u.refreshButton},{children:"Refresh"})),Ja(o)&&p.length>0?e.jsx(e.Fragment,{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(oQ,{apiUrl:o,customerUuid:a,metadata:p,universeList:g,onActionPerformed:I})}))}):e.jsx(r.Box,F({className:u.noUniverses},{children:Ja(o)?"Currently, there are no universes attached to Perf Advisor service":"Customer is not registered with Perf Advisor service. Please register and then enable Perf Advisor for universes."}))]}))})},exports.DB_CAPS_TAG_=Dl,exports.DB_TAG=Ol,exports.DEFAULT_ERROR_MESSAGES=Xl,exports.DEFAULT_RECORDS_PER_PAGE=yl,exports.ELLIPSIS="...",exports.GLOBAL_RUNTIME_CONFIG=_l,exports.GROUP_BY_OPERATIONS=qs,exports.GenericFailure=kr,exports.GroupEventsParam=Ns,exports.IN_DEVELOPMENT_MODE=ZH,exports.MAX_OUTLIER_NUM_NODES=10,exports.METRICS_OUTLIER_DATABASES_STORAGE_KEY=ql,exports.METRICS_OUTLIER_TABLES_STORAGE_KEY=Gl,exports.METRICS_SESSION_STORAGE_KEY=Yl,exports.METRIC_DB_RESOURCES_WITH_GRAPHS=zl,exports.METRIC_FONT=rl,exports.METRIC_NAMES=Wl,exports.METRIC_RESOURCES_WITH_GRAPHS=Hl,exports.METRIC_TABLES_RESOURCES_WITH_GRAPHS=Ul,exports.METRIC_TABS=Bl,exports.METRIC_TABS_DATABASES=Fl,exports.METRIC_TABS_TABLES=jl,exports.MIN_OUTLIER_NUM_NODES=3,exports.MORE=Sl,exports.MetricConsts=ol,exports.MetricOrigin={TABLE:"table",CUSTOMER:"customer",UNIVERSE:"universe"},exports.MetricSplitSelector=su,exports.MetricsAnalysisEntry=function(i){var o,a,s,l=i.universeUuid,u=i.troubleshootUuid,c=i.appName,d=i.timezone,p=i.apiUrl,h=i.onSelectedIssue,f=i.onSelectedQuery,g=Kl(),m=t.useState(null),v=m[0],y=m[1],x=t.useState(null),_=x[0],b=x[1],w=t.useState(null),S=w[0],C=w[1],T=t.useState(null),M=T[0],E=T[1],I=t.useState(null),A=I[0],D=I[1],k=new URLSearchParams(window.location.search),O=window.location.pathname,R=null;if(O.includes("/queries/")){var N=O.split("/"),L=N.indexOf("queries");R=N[L+1]||null}c!==exports.AppName.YBM&&c!==exports.AppName.YBA||(R=k.get("queryId"));var P=k.get("dbId"),B=k.get("userId"),j=Ja(R);t.useEffect((function(){localStorage.setItem("appName",c)}),[]);var U=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return uV.fetchUniverseById(l,p)})),z=null===(s=null===(a=null===(o=null==U?void 0:U.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,H=n.useQuery([exports.QUERY_KEY.fetchAnomalies,l],(function(){return uV.fetchAnomaliesById(l,u,p)}),{onSuccess:function(e){y(e),b(function(e){var t,n=null==e?void 0:e.mainGraphs.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n})),r=null===(t=null==e?void 0:e.rcaGuidelines)||void 0===t?void 0:t.map((function(t){var n;return null===(n=t.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(t){var n;return null===(n=t.supportingGraphs)||void 0===n?void 0:n.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n}))}))})),i=null==r?void 0:r.flat(2),o=null==i?void 0:i.filter((function(e){return Ka(e)}));return V(V([],n,!0),o,!0)}(e)),C(function(e){var t,n;if(vu=0,!e)return[];var r=null===(t=null==e?void 0:e.mainGraphs)||void 0===t?void 0:t.length,i=null===(n=null==e?void 0:e.rcaGuidelines)||void 0===n?void 0:n.map((function(e,t){var n,i={cause:"",name:[],groupByControl:[],description:"",index:[],rcaRecommendation:"",title:void 0};return i.name=[],i.groupByControl=[],i.cause=e.possibleCause,i.description=e.possibleCauseDescription,null===(n=e.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(e){var t;return e.supportingGraphs?null===(t=e.supportingGraphs)||void 0===t?void 0:t.map((function(t){return i.name.push(t.name),i.rcaRecommendation=e.recommendation,1===r?i.index.push(Cu()):r>1&&i.index.push(Cu()+r-1),i.title=t.displayName,i.groupByControl.push(t.groupByControl),i})):i}))})),o=null==i?void 0:i.flat(2),a=new Set(o);return Array.from(a)}(e))},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!j&&Ja(u)}),W=H.isLoading,G=H.isError,q=H.isIdle,Q=n.useQuery([exports.QUERY_KEY.fetchQueries,l],(function(){return uV.fetchQueries(l,p,{dbId:P,userId:B,queryId:R})}),{onSuccess:function(e){E(e)},onError:function(e){E([]),console.error("Failed to fetch queries",e)}}),Z=Q.isLoading,X=Q.isError,$=n.useQuery([exports.QUERY_KEY.fetchQueryStats,l],(function(){return uV.fetchQueryStats(l,{dbId:P,queryId:R},p)}),{onSuccess:function(e){D([e])},onError:function(e){D([]),console.error("Failed to fetch query stats",e)},enabled:j}),K=$.isLoading,J=$.isError;return W||K||Z?e.jsx(r.Box,F({mt:2,className:g.loadingBox},{children:e.jsx(dV,{className:Y(g.icon,g.inProgressIcon)})})):G||J||X||z||q&&void 0===v?e.jsxs(r.Box,F({mt:3},{children:[(c===exports.AppName.YBA||c===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:G?Xl.ANOMALIES_FETCH_ERROR:Xl.QUERY_STATS_FETCH_ERROR}),c===exports.AppName.YBM&&e.jsx(kr,{text:G?Xl.ANOMALIES_FETCH_ERROR:Xl.QUERY_STATS_FETCH_ERROR})]})):e.jsx(r.Box,{children:M&&(null==U?void 0:U.data)&&e.jsx(_G,{apiUrl:p,troubleshootUuid:u,anomalyData:v,universeData:null==U?void 0:U.data,universeUuid:l,appName:c,timezone:d,isHistoricalQueryView:j,amomalyGraphRequestParams:_,formattedAnomalyRca:S,universeQueryData:M,universeQueryStatsData:A,queryIdParam:R,onSelectedIssue:h,onSelectedQuery:f})})},exports.NAME_COLOR_MAPPING=Zl,exports.OutlierSelector=uu,exports.PerfAdvisorAPI=uV,exports.PerfAdvisorEntry=function(i){var o,a,s,l,u,c,d,p,h,f,g,m,v=i.timezone,y=i.universeUuid,x=i.appName,_=i.apiUrl,b=i.onSelectedIssue,w=i.onSelectedQuery,S=Kl(),C=new URLSearchParams(window.location.search),T=null==C?void 0:C.get("endTime"),M=T?new Date(T):new Date,E=new Date(M);(null==C?void 0:C.get("startTime"))?E=new Date(C.get("startTime")):E.setDate(E.getDate()-1);var I=t.useState($s),A=I[0],D=I[1],k=t.useState(Js),O=k[0],R=k[1],N=t.useState(!0),L=N[0],P=N[1],B=t.useState(Ks),j=B[0],U=B[1],z=t.useState(Ks),H=z[0],V=z[1],W=t.useState(Ks),G=W[0],q=W[1],Q=t.useState(Ks),Z=Q[0],X=Q[1],$=t.useState(exports.MetricMeasure.OVERALL),K=$[0],J=$[1],ee=t.useState(Bs.ALL),te=ee[0],ne=ee[1],re=t.useState(Ls.TOP),ie=re[0],oe=re[1],ae=t.useState(Ks.toUpperCase()),se=ae[0],le=ae[1],ue=null==C?void 0:C.get("duration"),ce=t.useState(null!=ue?ue:El[0].value),de=ce[0],pe=ce[1],he=t.useState(3),fe=he[0],ge=he[1],me=t.useState((function(){return Nu(de,M,E)})),ve=me[0],ye=me[1];t.useEffect((function(){localStorage.setItem("appName",x)}),[]);var xe=t.useState(null),_e=xe[0],be=xe[1],we=t.useState(exports.InsightsTabs.CLUSTER_LOAD),Se=we[0],Ce=we[1],Te=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return uV.fetchUniverseById(y,_)})),Me=n.useQuery(exports.QUERY_KEY.getUniverseMetadata,(function(){return uV.getUniverseMetadata(y,_)})),Ee=null===(s=null===(a=null===(o=null==Te?void 0:Te.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,Ie=null===(c=null===(u=null===(l=null==Me?void 0:Me.error)||void 0===l?void 0:l.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error,Ae=null===(d=null==Te?void 0:Te.data)||void 0===d?void 0:d.ashEnabled,De=null===(p=null==Te?void 0:Te.data)||void 0===p?void 0:p.ashSupported,ke=function(e){be(e)},Oe=function(){if(de!==Ml.CUSTOM){var e=Ru(de,M),t=e.formattedStartDate,n=e.formattedEndDate;ye({startDateTime:t,endDateTime:n})}};t.useEffect((function(){Oe()}),[de]),t.useEffect((function(){ue&&Ja(ue)&&Oe()}),[]);var Re=Se===exports.InsightsTabs.METRICS,Ne=Se!==exports.InsightsTabs.METRICS;return e.jsxs(r.Box,{children:[Me.isLoading||Te.isLoading&&e.jsx(r.Box,F({mt:2,className:S.loadingBox},{children:e.jsx(dV,{className:Y(S.icon,S.inProgressIcon)})})),Me.isError||Te.isError&&e.jsxs(r.Box,F({mt:2},{children:[(x===exports.AppName.YBA||x===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Me.isError?Ja(Ie)?Ie:Xl.UNIVERSE_PA_STATUS_ERROR:Ja(Ee)?Ee:Xl.UNIVERSE_DETAILS_ERROR}),x===exports.AppName.YBM&&e.jsx(kr,{text:Me.isError?Ja(Ie)?Ie:Xl.UNIVERSE_PA_STATUS_ERROR:Ja(Ee)?Ee:Xl.UNIVERSE_DETAILS_ERROR})]})),Te.isSuccess&&e.jsxs(e.Fragment,{children:[e.jsx(Pu,{appName:x,filterDuration:de,startDateTime:ve.startDateTime,endDateTime:ve.endDateTime,timezone:v,isDrilldownView:!1,isClusterLoadView:Se===exports.InsightsTabs.CLUSTER_LOAD,isTopKMetricsView:Se===exports.InsightsTabs.METRICS,onSelectedFilterDuration:function(e){var t,n,r,i;pe(e);var o=new URLSearchParams(window.location.search);e===Tl.CUSTOM?(o.set("startTime",null!==(n=null===(t=null==ve?void 0:ve.startDateTime)||void 0===t?void 0:t.toISOString())&&void 0!==n?n:""),o.set("endTime",null!==(i=null===(r=null==ve?void 0:ve.endDateTime)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"")):(o.delete("startTime"),o.delete("endTime")),o.set("duration",e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(o.toString()))},metricMeasure:K,onStartDateChange:function(e){var t;ye((function(t){return F(F({},t),{startDateTime:new Date(e.target.value)})}));var n=new URLSearchParams(window.location.search);n.set("startTime",null===(t=null==ve?void 0:ve.startDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))},onEndDateChange:function(e){var t;ye((function(t){return F(F({},t),{endDateTime:new Date(e.target.value)})}));var n=new URLSearchParams(window.location.search);n.set("endTime",null===(t=null==ve?void 0:ve.endDateTime)||void 0===t?void 0:t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))},onRefresh:function(){ye((function(e){return F(F({},e),{endDateTime:new Date})}))}}),e.jsxs(r.Box,F({className:S.headerContainer,mt:2},{children:[!_e&&e.jsxs(r.Box,{children:[Se===exports.InsightsTabs.CLUSTER_LOAD_DB&&e.jsx(tQ,{onChangeDbWaitEventType:function(e){le(e)}}),Se!==exports.InsightsTabs.CLUSTER_LOAD_DB&&e.jsx(Lu,{appName:x,universeData:null==Te?void 0:Te.data,clusterRegionItem:A,zoneNodeItem:O,isPrimaryCluster:L,cluster:j,region:H,metricMeasure:K,outlierType:ie,numNodes:fe,isDrilldownView:!1,anomalyData:null,queryType:te,showSplitSelector:Re,showQueryTypeSelector:Ne,onZoneNodeSelected:function(e,t,n){n===Js&&(R(Js),q(Ks),X(Ks)),(e||t)&&(R(n),e&&(q(n),X("")),t&&(q(""),X(n)))},onClusterRegionSelected:function(e,t,n,r){P(r),n===$s&&(D($s),U(Ks),V(Ks)),(e||t)&&(D(n),e&&(U(n),V("")),t&&(V(n),U("")))},onOutlierTypeSelected:function(e){oe(e)},onSplitTypeSelected:function(e){J(e)},onNumNodesChanged:function(e){ge(e>10?10:e)},onQueryTypeSelected:function(e){ne(e)}}),e.jsx(r.Box,{children:e.jsx(Xq,{startTime:null===(h=null==ve?void 0:ve.startDateTime)||void 0===h?void 0:h.toISOString(),endTime:null===(f=null==ve?void 0:ve.endDateTime)||void 0===f?void 0:f.toISOString(),universeUuid:y,appName:x,timezone:v,isAshEnabled:!!Ae,isAshSupported:!!De,queryType:te,apiUrl:_,dbWaitEventType:se,onClickShowMoreAnomalies:ke,onEChartsDateSelect:function(e,t){var n=new Date(e),r=new Date(t);pe(Tl.CUSTOM),ye({startDateTime:new Date(e),endDateTime:new Date(t)});var i=new URLSearchParams(window.location.search);i.set("startTime",n.toISOString()),i.set("endTime",r.toISOString()),i.set("duration",Tl.CUSTOM),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(i.toString()))},onSelectedIssue:b,onSelectedQuery:w,notifyTabChange:function(e){Ce(e)},getClusterDetails:function(){var e=ve.startDateTime,t=ve.endDateTime;return{universeUuid:y,cluster:j,region:H,zone:G,node:Z,metricMeasure:K,numNodes:fe,outlierType:ie,formattedStartDate:e,formattedEndDate:t}}})})]}),Ja(_e)&&e.jsx(Kq,{onClickShowMoreAnomalies:ke,selectedTab:Se,showMoreAnomalyCategory:_e,startTime:null===(g=null==ve?void 0:ve.startDateTime)||void 0===g?void 0:g.toISOString(),endTime:null===(m=null==ve?void 0:ve.endDateTime)||void 0===m?void 0:m.toISOString(),universeUuid:y,appName:x,apiUrl:_,onSelectedIssue:b})]}))]})]})},exports.QUERIES=nl,exports.QUERY_DETAILS="QUERY DETAILS",exports.QUERY_TAG="QUERY",exports.QUERY_TYPE_TAG=kl,exports.QueryTypeMode=Bs,exports.RCA_GANT_CHART=Vl,exports.REACT_APP_API_URL=XH,exports.REGION_TAG="Region",exports.REGION_ZONE_TAG=Pl,exports.RUNTIME_CONFIG_KEYS=bl,exports.RuntimeConfigs=function(i){var o,a,s=i.apiUrl,l=i.appName,u=i.toast,c=dQ(),d=Kl(),p=n.useQueryClient(),h=t.useState(""),f=h[0],g=h[1],m=t.useState([]),v=m[0],y=m[1],x=t.useState(yl[0]),_=x[0],b=x[1],w=t.useState(0),S=w[0],C=w[1],T=t.useState(!1),M=T[0],E=T[1],I=t.useState(!1),A=I[0],D=I[1],k=t.useState(null),O=k[0],R=k[1],N=n.useQuery([exports.QUERY_KEY.fetchRuntimeConfigs],(function(){return uV.fetchRuntimeConfigs(_l,s)}),{onSuccess:function(e){y(e)}}),L=N.error,P=N.isLoading,B=N.isError,j=N.isIdle,U=N.refetch,V=null===(a=null===(o=null==L?void 0:L.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.error,W=function(){z(void 0,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return p.invalidateQueries(exports.QUERY_KEY.fetchRuntimeConfigs),[4,U()];case 1:return e.sent(),[2]}}))}))},G=[{name:"path",label:"Config Key",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsxs(r.Box,{children:[e.jsx("span",{children:v[i].path}),e.jsx(r.Tooltip,F({title:v[i].description,arrow:!0,placement:"top",className:c.tooltip},{children:e.jsx("img",{src:dq,alt:"info"})}))]})}}},{name:"description",label:"Config Description",options:{sort:!0,filter:!0}},{name:"value",label:"Config Value",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx("span",F({className:v[i].overriden?c.textColor:""},{children:v[i].value}))})}}},{name:"actions",label:"Actions",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var r=n.rowIndex;return e.jsxs(e.Fragment,{children:[e.jsx(Q,F({size:"medium",variant:"pill",onClick:function(){return e=v[r],R(e),void E(!0);var e}},{children:e.jsx("span",F({style:{color:"#303A78",textDecoration:"underline"}},{children:"Update"}))})),e.jsx(Q,F({size:"medium",onClick:function(){return e=v[r],R(e),void D(!0);var e}},{children:e.jsx("span",F({style:{color:"#303A78",textDecoration:"underline"}},{children:"Reset"}))}))]})}}}];return e.jsxs(r.Box,F({mt:2,ml:4,className:c.overrideMuiTableContainer},{children:[e.jsx(r.Typography,F({variant:"h4"},{children:"Global Runtime Configurations"})),P&&e.jsx(r.Box,F({className:d.loadingBox},{children:e.jsx(dV,{className:Y(d.icon,d.inProgressIcon)})})),(B||j&&null===v)&&e.jsxs(r.Box,F({className:d.recommendation},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(wt,{customErrorMessage:Ja(V)?V:Xl.RUNTIME_CONFIGS_ERROR}),l===exports.AppName.YBM&&e.jsx(kr,{text:Ja(V)?V:Xl.RUNTIME_CONFIGS_ERROR})]})),e.jsx(r.Box,F({display:"flex",flexDirection:"row-reverse",alignSelf:"center",mt:2},{children:e.jsx(Tt,{placeholder:"Search",className:c.searchBox,onChange:function(e){return g(e.target.value)},value:f,inputProps:{"data-testid":"RuntimeConfigs-SearchInput"}})})),$a(v)&&e.jsx(r.Box,F({mt:2},{children:e.jsx(Ds,{title:"Runtime Configuration Variables",className:c.overrideMuiTable,data:v,columns:G,options:{filter:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:_,page:S,onChangePage:function(e){return C(e)},onChangeRowsPerPage:function(e){b(e),C(0)},searchText:f,customSearch:function(e,t){for(var n=function(n){var r=String(t[n]).toLocaleLowerCase();if(r.includes(e.toLocaleLowerCase()))return{value:!0};if(n===t.length-1){var i=e.split(" ").filter(Boolean),o=0;return{value:i.every((function(e){var t=r.indexOf(e.toLocaleLowerCase(),o);return t>-1&&(o=t+e.length,!0)}))}}},r=1;r<t.length;r++){var i=n(r);if("object"==typeof i)return i.value}return!1},rowsPerPageOptions:yl}})})),M&&O&&e.jsx(cQ,{open:M,data:O,apiUrl:s,onActionPerformed:W,onClose:function(){E(!1)},toast:u}),A&&O&&e.jsx(lQ,{open:A,data:O,apiUrl:s,onActionPerformed:W,onClose:function(){D(!1)},toast:u})]}))},exports.SQL_QUERY_REQUEST_GRAPHS=hl,exports.SplitMode=Ls,exports.SplitType=Ps,exports.TABLET_ID_TAG=Nl,exports.TABLET_TAG="Tablet Id",exports.TABLE_REQUEST_GRAPHS=["table_scan_ops","table_tup_read_ops","table_write_ops"],exports.TABLE_TAG=Rl,exports.TIME_FILTER_LABEL=Tl,exports.TIME_FILTER_VALUES=Ml,exports.TYPE="type",exports.URL_TAB_PATH=Xs,exports.USER_TAG="User",exports.VIEW_MORE=Cl,exports.WAIT_EVENT_MAPPING=Gs,exports.YBAlert=Dr,exports.YBButton=Q,exports.YBCheckbox=Rr,exports.YBCheckboxField=mu,exports.YBCodeBlock=xt,exports.YBDateTimePicker=us,exports.YBErrorIndicator=wt,exports.YBInfinitePagination=Ss,exports.YBInput=Tt,exports.YBInputField=er,exports.YBLabel=Ct,exports.YBModal=xs,exports.YBPagination=bs,exports.YBPanelItem=Ts,exports.YBSelect=lr,exports.YBTable=Ds,exports.YBToggle=iu,exports.YBToggleField=ou,exports.YBTooltip=ar,exports.ZONE_TAG="Zone",exports.ZoneNodeSelector=hu,exports.filterDurations=Il,exports.getCustomFooterComponent=$l,exports.getRowCellComponent=tu,exports.isDefinedNotNull=Za,exports.isEmptyArray=Xa,exports.isEmptyObject=function(e){return void 0===e||Na(e)&&0===Object.keys(e).length},exports.isEmptyString=es,exports.isNonEmptyArray=$a,exports.isNonEmptyObject=Ka,exports.isNonEmptyString=Ja,exports.isNullOrEmpty=function(e){return null==e||Na(e)&&0===Object.keys(e).length},exports.isValidObject=ts,exports.isYAxisGreaterThanThousand=ns,exports.metricOutlierSelectors=dl,exports.metricSplitSelectors=ul,exports.otherSplitSelectors=cl,exports.queryTypeSelectors=pl,exports.removeNullProperties=function(e){for(var t in e)null!==e[t]&&void 0!==e[t]||delete e[t]},exports.useCodeBlockStyles=_t;
11
11
  //# sourceMappingURL=index.js.map